@Override public void execute(Hero hero, String action) { super.execute(hero, action); if (action.equals(AC_EAT)) { switch (Random.Int(5)) { case 0: GLog.w("Oh it's hot!"); Buff.affect(hero, Burning.class).reignite(hero); break; case 1: GLog.w("You can't feel your legs!"); Buff.prolong(hero, Roots.class, Paralysis.duration(hero)); break; case 2: GLog.w("You are not feeling well."); Buff.affect(hero, Poison.class).set(Poison.durationFactor(hero) * hero.HT / 5); break; case 3: GLog.w("You are stuffed."); Buff.prolong(hero, Slow.class, Slow.duration(hero)); break; } } }
@Override public int attackProc(Char enemy, int damage) { if (Random.Int(3) == 0) { Buff.affect(enemy, Ooze.class); enemy.sprite.burst(0xFF000000, 5); } return damage; }