From 5d21ab53cd4c5c73b5aa0c69376619a4992c9414 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 7 Apr 2007 14:54:30 +0000 Subject: Moth of wrath angering attack was lost in 0.2, reintroduced. Monsters can now go berserk (the rage spell, or by moth of wrath attack). Rupert is now a crusading-style berserker. Moths of wrath can now enrage nearby monsters of similar attitude. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1256 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 4ccd1cb207..a8de265865 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2494,6 +2494,10 @@ int melee_attack::mons_calc_damage(const mon_attack_def &attk) damage_max += attk.damage; damage += 1 + random2(attk.damage); + // Berserk monsters get bonus damage. + if (atk->has_ench(ENCH_BERSERK)) + damage = damage * 3 / 2; + if (water_attack) damage *= 2; @@ -2887,6 +2891,19 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) case AF_DISTORT: distortion_affects_defender(); break; + + case AF_RAGE: + if (!one_chance_in(3) || !defender->can_go_berserk()) + break; + + if (needs_message) + mprf("%s %s %s!", + attacker->name(DESC_CAP_THE).c_str(), + attacker->conj_verb("infuriate").c_str(), + defender->name(DESC_NOCAP_THE).c_str()); + + defender->go_berserk(false); + break; } } -- cgit v1.2.3-54-g00ecf