diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-06 14:32:02 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-06 14:32:02 +0000 |
commit | 8dbcc4dbe18b959b2eab5a2c20aac3f97c6179f9 (patch) | |
tree | 43dcc1b16a420b31b645bbafc938c0c0a3d1b03d /crawl-ref/source/monstuff.cc | |
parent | 31fb4f573fea4f4ebcceb1f4fcfc478daa0897dc (diff) | |
download | crawl-ref-8dbcc4dbe18b959b2eab5a2c20aac3f97c6179f9.tar.gz crawl-ref-8dbcc4dbe18b959b2eab5a2c20aac3f97c6179f9.zip |
Restore a monster's attitude from the beginning of the attack if it
changes during the attack and the monster is about to die, so that
you don't get Okawaru piety for killing an ally just before you
receive the penance. Fixes [2436051].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8925 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index e15e4bf1eb..b987a9d0c2 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1120,22 +1120,22 @@ int monster_die(monsters *monster, killer_type killer, if (you.religion == GOD_TROG && !player_under_penance() && you.piety > random2(1000)) { - int bonus = 3 + random2avg( 10, 2 ); + const int bonus = 3 + random2avg( 10, 2 ); you.duration[DUR_BERSERKER] += bonus; you.duration[DUR_MIGHT] += bonus; - haste_player( bonus ); + haste_player(bonus); mpr("You feel the power of Trog in you as your rage grows.", MSGCH_GOD, GOD_TROG); } - else if (wearing_amulet( AMU_RAGE ) && one_chance_in(30)) + else if (wearing_amulet(AMU_RAGE) && one_chance_in(30)) { - int bonus = 2 + random2(4); + const int bonus = 2 + random2(4); you.duration[DUR_BERSERKER] += bonus; you.duration[DUR_MIGHT] += bonus; - haste_player( bonus ); + haste_player(bonus); mpr("Your amulet glows a violent red."); } |