summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-08 20:08:53 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-08 20:08:53 +0000
commit95d587c3feda35ad847d676165aa9e9a6c67bfb4 (patch)
treef62bf3770b9958bcd590466184a7386361a27b33 /crawl-ref/source/fight.cc
parent9da9f88dfcd5bbbc28cd41b33bdee86f05183398 (diff)
downloadcrawl-ref-95d587c3feda35ad847d676165aa9e9a6c67bfb4.tar.gz
crawl-ref-95d587c3feda35ad847d676165aa9e9a6c67bfb4.zip
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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc15
1 files changed, 15 insertions, 0 deletions
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;