v0.9.3b: Stones of flock are now also trigger before pressing cells
This commit is contained in:
parent
73ca7b5354
commit
b01a79283a
|
@ -32,13 +32,16 @@ public abstract class Runestone extends Item {
|
|||
stackable = true;
|
||||
defaultAction = AC_THROW;
|
||||
}
|
||||
|
||||
|
||||
//runestones press the cell they're thrown to by default, but a couple stones override this
|
||||
protected boolean pressesCell = true;
|
||||
|
||||
@Override
|
||||
protected void onThrow(int cell) {
|
||||
if (Dungeon.level.pit[cell] || !defaultAction.equals(AC_THROW)){
|
||||
super.onThrow( cell );
|
||||
} else {
|
||||
Dungeon.level.pressCell( cell );
|
||||
if (pressesCell) Dungeon.level.pressCell( cell );
|
||||
activate(cell);
|
||||
Invisibility.dispel();
|
||||
}
|
||||
|
|
|
@ -43,18 +43,9 @@ 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 );
|
||||
}
|
||||
//so traps do not activate before the effect
|
||||
pressesCell = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,6 +37,9 @@ public class StoneOfFlock extends Runestone {
|
|||
|
||||
{
|
||||
image = ItemSpriteSheet.STONE_FLOCK;
|
||||
|
||||
//the sheep will press the cell instead
|
||||
pressesCell = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user