From 95d587c3feda35ad847d676165aa9e9a6c67bfb4 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 8 Oct 2007 20:08:53 +0000 Subject: Orc knights and warlords can yell battle-cries to make lesser orcs fight better. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2387 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index e09e30410b..a9dcc7c14e 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2882,6 +2882,21 @@ int melee_attack::mons_calc_damage(const mon_attack_def &attk) // Berserk monsters get bonus damage. if (atk->has_ench(ENCH_BERSERK)) damage = damage * 3 / 2; + else if (atk->has_ench(ENCH_BATTLE_FRENZY)) + { + const mon_enchant ench = atk->get_ench(ENCH_BATTLE_FRENZY); + +#ifdef DEBUG_DIAGNOSTICS + const int orig_damage = damage; +#endif + + damage = damage * (115 + ench.degree * 15) / 100; + +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "%s frenzy damage: %d->%d", + attacker->name(DESC_PLAIN).c_str(), orig_damage, damage); +#endif + } if (water_attack) damage *= 2; -- cgit v1.2.3-54-g00ecf