v0.9.3a: runestones now press cells when thrown
This commit is contained in:
parent
e80bc2c1c0
commit
082c2393cb
|
@ -38,6 +38,7 @@ public abstract class Runestone extends Item {
|
|||
if (Dungeon.level.pit[cell] || !defaultAction.equals(AC_THROW)){
|
||||
super.onThrow( cell );
|
||||
} else {
|
||||
Dungeon.level.pressCell( cell );
|
||||
activate(cell);
|
||||
Invisibility.dispel();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.stones;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
|
||||
|
@ -44,6 +45,18 @@ public class StoneOfDisarming extends Runestone {
|
|||
image = ItemSpriteSheet.STONE_DISARM;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onThrow(int cell) {
|
||||
//This runestone uniquely presses cells after its effect resolves, instead of before
|
||||
if (Dungeon.level.pit[cell] || !defaultAction.equals(AC_THROW)){
|
||||
super.onThrow( cell );
|
||||
} else {
|
||||
activate(cell);
|
||||
Invisibility.dispel();
|
||||
Dungeon.level.pressCell( cell );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void activate(final int cell) {
|
||||
boolean[] FOV = new boolean[Dungeon.level.length()];
|
||||
|
|
Loading…
Reference in New Issue
Block a user