@Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { // lvl 0 - 33% // lvl 1 - 50% // lvl 2 - 60% if (Random.Int( level() + 3 ) >= 2) { Buff.affect( defender, Ooze.class ).set( 20f ); CellEmitter.center(defender.pos).burst( CorrosionParticle.SPLASH, 5 ); } }
@Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { // lvl 0 - 33% // lvl 1 - 50% // lvl 2 - 60% if (Random.Int( level() + 3 ) >= 2) { Buff.affect( defender, Ooze.class ).set( 20f ); CellEmitter.center(defender.pos).burst( CorrosionParticle.SPLASH, 5 ); } }
@Override protected void onZap(Ballistica bolt) { Blob corrosiveGas = Blob.seed(bolt.collisionPos, 50 + 10 * level(), CorrosiveGas.class); CellEmitter.center(bolt.collisionPos).burst( CorrosionParticle.SPLASH, 10 ); ((CorrosiveGas)corrosiveGas).setStrength(level()+1); GameScene.add(corrosiveGas); for (int i : PathFinder.NEIGHBOURS9) { Char ch = Actor.findChar(bolt.collisionPos + i); if (ch != null) { processSoulMark(ch, chargesPerCast()); } } if (Actor.findChar(bolt.collisionPos) == null){ Dungeon.level.press(bolt.collisionPos, null, true); } }
@Override protected void onZap(Ballistica bolt) { Blob corrosiveGas = Blob.seed(bolt.collisionPos, 50 + 10 * level(), CorrosiveGas.class); CellEmitter.center(bolt.collisionPos).burst( CorrosionParticle.SPLASH, 10 ); ((CorrosiveGas)corrosiveGas).setStrength(level()+1); GameScene.add(corrosiveGas); for (int i : PathFinder.NEIGHBOURS9) { Char ch = Actor.findChar(bolt.collisionPos + i); if (ch != null) { processSoulMark(ch, chargesPerCast()); } } if (Actor.findChar(bolt.collisionPos) == null){ Dungeon.level.press(bolt.collisionPos, null, true); } }