diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-17 20:07:05 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-17 20:07:05 +0000 |
commit | 8b9b77f9c1c5de85523182851329eca2280bf629 (patch) | |
tree | 97c6be30a2e844eacdbdb884b5db3dda6844d64b /crawl-ref | |
parent | a37bd53efcc5d4991660e1563ff47b59a08d31ce (diff) | |
download | crawl-ref-8b9b77f9c1c5de85523182851329eca2280bf629.tar.gz crawl-ref-8b9b77f9c1c5de85523182851329eca2280bf629.zip |
Really fix handling of monsters that TSO doesn't mind your using
unchivalric attacks against. Also, indicate the victim when handling
the stabbing conduct.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5111 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/fight.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 63239719cb..9819f6485c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1473,7 +1473,7 @@ int melee_attack::player_stab(int damage) exercise(SK_STABBING, 1 + random2avg(5, 4)); - did_god_conduct(DID_STABBING, 4); + did_god_conduct(DID_STABBING, 4, true, def); } else { @@ -2885,7 +2885,7 @@ void melee_attack::player_stab_check() cancel_attack = true; } else - did_god_conduct(DID_UNCHIVALRIC_ATTACK, 5); + did_god_conduct(DID_UNCHIVALRIC_ATTACK, 5, true, def); } } diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index b3b106ab1c..00cd805673 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1895,10 +1895,14 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, case DID_UNCHIVALRIC_ATTACK: case DID_POISON: - if (you.religion == GOD_SHINING_ONE - && (thing_done != DID_UNCHIVALRIC_ATTACK - || tso_unchivalric_attack_safe_monster(victim))) + if (you.religion == GOD_SHINING_ONE) { + if (thing_done == DID_UNCHIVALRIC_ATTACK + && tso_unchivalric_attack_safe_monster(victim)) + { + break; + } + ret = true; piety_change = -level; penance = level * 2; |