@Override public void damage(int dmg, Object src) { restoreHealth = false; super.damage(dmg, src); if (subClass == HeroSubClass.BERSERKER && 0 < HP && HP <= HT * Fury.LEVEL) { Buff.affect(this, Fury.class); } }
@Override public int defenseProc(Char enemy, int damage) { RingOfThorns.Thorns thorns = buff(RingOfThorns.Thorns.class); if (thorns != null) { int dmg = Random.IntRange(0, damage); if (dmg > 0) { enemy.damage(dmg, thorns); } } Earthroot.Armor armor = buff(Earthroot.Armor.class); if (armor != null) { damage = armor.absorb(damage); } if (belongings.armor != null) { damage = belongings.armor.proc(enemy, this, damage); } return damage; }