@Override public int proc(Armor armor, Char attacker, Char defender, int damage) { int level = Math.max(0, armor.level); if (Random.Int(4) == 0) { Buff.prolong(defender, Roots.class, 5 - level / 5); Buff.affect(defender, Earthroot.Armor.class).level(5 * (level + 1)); CellEmitter.bottom(defender.pos).start(EarthParticle.FACTORY, 0.05f, 8); Camera.main.shake(1, 0.4f); } return damage; }
@Override public int proc(Armor armor, Char attacker, Char defender, int damage) { int level = Math.max(0, armor.level); if (Level.adjacent(attacker.pos, defender.pos) && Random.Int(level + 6) >= 5) { Buff.prolong(attacker, Frost.class, Frost.duration(attacker) * Random.Float(1f, 1.5f)); CellEmitter.get(attacker.pos).start(SnowParticle.FACTORY, 0.2f, 6); Buff.affect(defender, Burning.class).reignite(defender); defender.sprite.emitter().burst(FlameParticle.FACTORY, 5); } return damage; }