@Override protected void doRead() { GameScene.flash(0xFFFFFF); Sample.INSTANCE.play(Assets.SND_BLAST); Invisibility.dispel(); for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) { if (Level.fieldOfView[mob.pos]) { mob.damage(mob.HT, this); } } curUser.damage(Math.max(curUser.HT / 5, curUser.HP / 2), this); Buff.prolong(curUser, Paralysis.class, Random.Int(4, 6)); Buff.prolong(curUser, Blindness.class, Random.Int(6, 9)); Dungeon.observe(); setKnown(); curUser.spendAndNext(TIME_TO_READ); // no animation here, the flash interrupts it anyway. if (!curUser.isAlive()) { Dungeon.fail(Utils.format(ResultDescriptions.ITEM, name)); GLog.n("The Psionic Blast tears your mind apart..."); } }
@Override public void shatter(int cell) { if (Dungeon.visible[cell]) { setKnown(); splash(cell); Sample.INSTANCE.play(Assets.SND_SHATTER); } GameScene.add(Blob.seed(cell, 1000, ConfusionGas.class)); }