summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-28 08:47:30 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-28 08:47:30 +0000
commit20a6609453ee2b51c388c296516c1abc1beab1d2 (patch)
tree201d735a3a4d66471005cb763078a6c05056752c /crawl-ref/source/fight.cc
parent7aed4c41d7fa0f9d70df56a82abbe69061e56269 (diff)
downloadcrawl-ref-20a6609453ee2b51c388c296516c1abc1beab1d2.tar.gz
crawl-ref-20a6609453ee2b51c388c296516c1abc1beab1d2.zip
Preliminary integration of Zooko's Xom patch (untested).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1489 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 80decc8bd1..8eca25a856 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -450,7 +450,10 @@ bool melee_attack::attack()
identify_mimic(def);
if (attacker->fumbles_attack())
+ {
+ xom_is_stimulated(14); // Xom thinks that is funny.
return (false);
+ }
// Allow god to get offended, etc.
attacker->attacking(defender);
@@ -2077,6 +2080,9 @@ int melee_attack::player_to_hit(bool random_factor)
{
if (wpn_skill != SK_FIGHTING)
{
+ if (you.skills[wpn_skill] < 1 && player_in_a_dangerous_place())
+ xom_is_stimulated(14); // Xom thinks that is mildly amusing.
+
your_to_hit += maybe_random2(you.skills[wpn_skill] + 1,
random_factor);
}