diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-17 18:04:46 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-17 18:04:46 +0000 |
commit | 18a94062a4fdde6994e4c4ad1598e38d79c24ee4 (patch) | |
tree | 14973f2d973acc92e77eded21da43adf413d4ab4 /crawl-ref/source/spells3.cc | |
parent | 2c1931a103ed51b5cc3b9ee203de22e74d5b6843 (diff) | |
download | crawl-ref-18a94062a4fdde6994e4c4ad1598e38d79c24ee4.tar.gz crawl-ref-18a94062a4fdde6994e4c4ad1598e38d79c24ee4.zip |
Enable handling of long-distance unchivalric attacks, and increase the
penalty from 4 to 5 for consistency with similar attacks frowned upon by
the good gods.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5100 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 144d9bffae..4e56db545b 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -31,6 +31,7 @@ #include "debug.h" #include "delay.h" #include "effects.h" // holy word +#include "fight.h" #include "food.h" #include "itemname.h" #include "itemprop.h" @@ -220,6 +221,9 @@ int cast_smiting(int power, dist &beam) else if (mons_neutral(monster)) did_god_conduct(DID_ATTACK_NEUTRAL, 5, true, monster); + if (is_unchivalric_attack(&you, monster, monster)) + did_god_conduct(DID_UNCHIVALRIC_ATTACK, 5, true, monster); + if (mons_is_holy(monster)) did_god_conduct(DID_ATTACK_HOLY, monster->hit_dice, true, monster); @@ -279,6 +283,9 @@ int airstrike(int power, dist &beam) else if (mons_neutral(monster)) did_god_conduct(DID_ATTACK_NEUTRAL, 5, true, monster); + if (is_unchivalric_attack(&you, monster, monster)) + did_god_conduct(DID_UNCHIVALRIC_ATTACK, 5, true, monster); + if (mons_is_holy(monster)) did_god_conduct(DID_ATTACK_HOLY, monster->hit_dice, true, monster); |