v1.4.2: plants now trigger like traps from time freeze
This commit is contained in:
@@ -1109,36 +1109,27 @@ public abstract class Level implements Bundlable {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trap != null) {
|
|
||||||
|
|
||||||
TimekeepersHourglass.timeFreeze timeFreeze =
|
TimekeepersHourglass.timeFreeze timeFreeze =
|
||||||
Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
|
|
||||||
Swiftthistle.TimeBubble bubble =
|
Swiftthistle.TimeBubble bubble =
|
||||||
Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
|
||||||
|
if (trap != null) {
|
||||||
if (bubble != null){
|
if (bubble != null){
|
||||||
|
|
||||||
Sample.INSTANCE.play(Assets.Sounds.TRAP);
|
Sample.INSTANCE.play(Assets.Sounds.TRAP);
|
||||||
|
|
||||||
discover(cell);
|
discover(cell);
|
||||||
|
|
||||||
bubble.setDelayedPress(cell);
|
bubble.setDelayedPress(cell);
|
||||||
|
|
||||||
} else if (timeFreeze != null){
|
} else if (timeFreeze != null){
|
||||||
|
|
||||||
Sample.INSTANCE.play(Assets.Sounds.TRAP);
|
Sample.INSTANCE.play(Assets.Sounds.TRAP);
|
||||||
|
|
||||||
discover(cell);
|
discover(cell);
|
||||||
|
|
||||||
timeFreeze.setDelayedPress(cell);
|
timeFreeze.setDelayedPress(cell);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (Dungeon.hero.pos == cell) {
|
if (Dungeon.hero.pos == cell) {
|
||||||
Dungeon.hero.interrupt();
|
Dungeon.hero.interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
trap.trigger();
|
trap.trigger();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1146,7 +1137,18 @@ public abstract class Level implements Bundlable {
|
|||||||
|
|
||||||
Plant plant = plants.get( cell );
|
Plant plant = plants.get( cell );
|
||||||
if (plant != null) {
|
if (plant != null) {
|
||||||
|
if (bubble != null){
|
||||||
|
Sample.INSTANCE.play(Assets.Sounds.TRAMPLE, 1, Random.Float( 0.96f, 1.05f ) );
|
||||||
|
bubble.setDelayedPress(cell);
|
||||||
|
|
||||||
|
} else if (timeFreeze != null){
|
||||||
|
Sample.INSTANCE.play(Assets.Sounds.TRAMPLE, 1, Random.Float( 0.96f, 1.05f ) );
|
||||||
|
timeFreeze.setDelayedPress(cell);
|
||||||
|
|
||||||
|
} else {
|
||||||
plant.trigger();
|
plant.trigger();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hard && Blob.volumeAt(cell, Web.class) > 0){
|
if (hard && Blob.volumeAt(cell, Web.class) > 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user