@Override protected void onZap(int cell) { Char ch = Actor.findChar(cell); if (ch != null) { if (ch == Dungeon.hero) { Buff.affect(ch, Vertigo.class, Vertigo.duration(ch)); } else { Buff.affect(ch, Amok.class, 3f + power()); } } else { GLog.i("nothing happened"); } }
@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 attackProc(Char enemy, int damage) { KindOfWeapon wep = rangedWeapon != null ? rangedWeapon : belongings.weapon; if (wep != null) { wep.proc(this, enemy, damage); switch (subClass) { case GLADIATOR: if (wep instanceof MeleeWeapon) { damage += Buff.affect(this, Combo.class).hit(enemy, damage); } break; case BATTLEMAGE: if (wep instanceof Wand) { Wand wand = (Wand) wep; if (wand.curCharges >= wand.maxCharges) { wand.use(); } else if (damage > 0) { wand.curCharges++; wand.updateQuickslot(); ScrollOfRecharging.charge(this); } damage += wand.curCharges; } case SNIPER: if (rangedWeapon != null) { Buff.prolong(this, SnipersMark.class, attackDelay() * 1.1f).object = enemy.id(); } break; default: } } return damage; }
public void live() { Buff.affect(this, Regeneration.class); Buff.affect(this, Hunger.class); }