From 7737a83cf752ab895c89d0a6032881f32344dc6c Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 19 May 2008 16:03:12 +0000 Subject: Revert the previous conduct-related changes, so that attacking friendly or neutral monsters generates the proper conduct again. The previous consistency needs to be reimplemented. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5125 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 6 +++--- crawl-ref/source/spells2.cc | 2 +- crawl-ref/source/spells3.cc | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 207bbc080c..793b803e52 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -594,6 +594,9 @@ bool melee_attack::attack() // A lot of attack parameters get set in here. 'Ware. to_hit = calc_to_hit(); + // Allow god to get offended, etc. + attacker->attacking(defender); + // The attacker loses nutrition. attacker->make_hungry(3, true); @@ -606,9 +609,6 @@ bool melee_attack::attack() (defender->atype() == ACT_PLAYER) ? mons_attack_you() : mons_attack_mons()); - // Allow god to get offended, etc. - attacker->attacking(defender); - return retval; } diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 000d98db84..ca94362bf3 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -1210,7 +1210,7 @@ char burn_freeze(int pow, beam_type flavour) if (hurted) { - behaviour_event(monster, ME_WHACK, MHITYOU); + behaviour_event(monster, ME_ANNOY, MHITYOU); if (mons_friendly(monster)) did_god_conduct(DID_ATTACK_FRIEND, 5, true, monster); diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 9063d93df2..3214b7164f 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -212,8 +212,6 @@ int cast_smiting(int power, dist &beam) mprf("You smite %s!", monster->name(DESC_NOCAP_THE).c_str()); - behaviour_event(monster, ME_WHACK, MHITYOU); - // Maxes out at around 40 damage at 27 Invocations, which is plenty // in my book (the old max damage was around 70, which seems excessive) hurt_monster(monster, 7 + (random2(power) * 33 / 191)); @@ -229,6 +227,8 @@ int cast_smiting(int power, dist &beam) if (mons_is_holy(monster)) did_god_conduct(DID_ATTACK_HOLY, monster->hit_dice, true, monster); + behaviour_event(monster, ME_ANNOY, MHITYOU); + if (monster->hit_points < 1) monster_die(monster, KILL_YOU, 0); else @@ -276,8 +276,6 @@ int airstrike(int power, dist &beam) hurted = 0; else { - behaviour_event(monster, ME_WHACK, MHITYOU); - hurt_monster(monster, hurted); if (mons_friendly(monster)) @@ -291,6 +289,8 @@ int airstrike(int power, dist &beam) if (mons_is_holy(monster)) did_god_conduct(DID_ATTACK_HOLY, monster->hit_dice, true, monster); + behaviour_event(monster, ME_ANNOY, MHITYOU); + if (monster->hit_points < 1) monster_die(monster, KILL_YOU, 0); else -- cgit v1.2.3-54-g00ecf