v0.9.4: moving between floors now disarms pressed traps, instead of ending time freeze. Warping beacon also now dispells invis after moving the hero.
This commit is contained in:
parent
a0b6e77af2
commit
74762c158f
|
@ -993,10 +993,10 @@ public class Hero extends Char {
|
|||
|
||||
curAction = null;
|
||||
|
||||
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
||||
Game.switchScene( InterlevelScene.class );
|
||||
|
@ -1046,10 +1046,10 @@ public class Hero extends Char {
|
|||
|
||||
curAction = null;
|
||||
|
||||
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.ASCEND;
|
||||
Game.switchScene( InterlevelScene.class );
|
||||
|
|
|
@ -112,7 +112,6 @@ public class WarpBeacon extends ArmorAbility {
|
|||
if (tracker.depth == Dungeon.depth){
|
||||
Char existing = Actor.findChar(tracker.pos);
|
||||
|
||||
Invisibility.dispel();
|
||||
ScrollOfTeleportation.appear(hero, tracker.pos);
|
||||
|
||||
if (existing != null && existing != hero){
|
||||
|
@ -153,6 +152,7 @@ public class WarpBeacon extends ArmorAbility {
|
|||
}
|
||||
}
|
||||
|
||||
Invisibility.dispel();
|
||||
Dungeon.observe();
|
||||
|
||||
} else {
|
||||
|
@ -162,11 +162,11 @@ public class WarpBeacon extends ArmorAbility {
|
|||
return;
|
||||
}
|
||||
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
Invisibility.dispel();
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||
InterlevelScene.returnDepth = tracker.depth;
|
||||
|
|
|
@ -177,10 +177,10 @@ public class LloydsBeacon extends Artifact {
|
|||
GameScene.updateFog();
|
||||
} else {
|
||||
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||
InterlevelScene.returnDepth = returnDepth;
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
|
@ -334,13 +335,22 @@ public class TimekeepersHourglass extends Artifact {
|
|||
presses.add(cell);
|
||||
}
|
||||
|
||||
private void triggerPresses(){
|
||||
public void triggerPresses(){
|
||||
for (int cell : presses)
|
||||
Dungeon.level.pressCell(cell);
|
||||
|
||||
presses = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void disarmPressedTraps(){
|
||||
for (int cell : presses){
|
||||
Trap t = Dungeon.level.traps.get(cell);
|
||||
if (t != null) t.disarm();
|
||||
}
|
||||
|
||||
presses = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach(){
|
||||
updateQuickslot();
|
||||
|
|
|
@ -49,12 +49,12 @@ public class ScrollOfPassage extends ExoticScroll {
|
|||
return;
|
||||
|
||||
}
|
||||
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
|
||||
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||
InterlevelScene.returnDepth = Math.max(1, (Dungeon.depth - 1 - (Dungeon.depth-2)%5));
|
||||
InterlevelScene.returnPos = -1;
|
||||
|
|
|
@ -141,11 +141,11 @@ public class BeaconOfReturning extends Spell {
|
|||
Dungeon.observe();
|
||||
GameScene.updateFog();
|
||||
} else {
|
||||
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||
InterlevelScene.returnDepth = returnDepth;
|
||||
|
|
|
@ -299,11 +299,10 @@ public class CursedWand {
|
|||
for (int i = 1; i < Dungeon.depth; i++) depths[i-1] = i;
|
||||
int depth = 1+Random.chances(depths);
|
||||
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||
InterlevelScene.returnDepth = depth;
|
||||
|
|
|
@ -82,10 +82,10 @@ public class Chasm implements Hero.Doom {
|
|||
|
||||
Sample.INSTANCE.play( Assets.Sounds.FALLING );
|
||||
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
if (Dungeon.hero.isAlive()) {
|
||||
Dungeon.hero.interrupt();
|
||||
|
|
|
@ -58,11 +58,11 @@ public class Fadeleaf extends Plant {
|
|||
return;
|
||||
|
||||
}
|
||||
|
||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (buff != null) buff.detach();
|
||||
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (buff != null) buff.detach();
|
||||
|
||||
TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||
if (timeFreeze != null) timeFreeze.disarmPressedTraps();
|
||||
Swiftthistle.TimeBubble timeBubble = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||
if (timeBubble != null) timeBubble.disarmPressedTraps();
|
||||
|
||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||
InterlevelScene.returnDepth = Math.max(1, (Dungeon.depth - 1));
|
||||
|
|
|
@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
@ -114,16 +115,27 @@ public class Swiftthistle extends Plant {
|
|||
}
|
||||
|
||||
public void setDelayedPress(int cell){
|
||||
if (!presses.contains(cell))
|
||||
if (!presses.contains(cell)) {
|
||||
presses.add(cell);
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerPresses(){
|
||||
for (int cell : presses)
|
||||
|
||||
public void triggerPresses() {
|
||||
for (int cell : presses) {
|
||||
Dungeon.level.pressCell(cell);
|
||||
}
|
||||
|
||||
presses = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void disarmPressedTraps(){
|
||||
for (int cell : presses){
|
||||
Trap t = Dungeon.level.traps.get(cell);
|
||||
if (t != null) t.disarm();
|
||||
}
|
||||
|
||||
presses = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach(){
|
||||
|
|
Loading…
Reference in New Issue
Block a user