@Override public void emit(Emitter emitter, int index, float x, float y) { PixelParticle p = (PixelParticle) emitter.recycle(PixelParticle.Shrinking.class); p.reset(x, y, color, 4, Random.Float(0.5f, 1.0f)); p.speed.polar(Random.Float(dir - cone / 2, dir + cone / 2), Random.Float(40, 80)); p.acc.set(0, +100); }
@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; }