v0.7.2: plant balance adjustments:
- increased total poison damage from sorrowmoss - increased duration of swiftthistle effect by 1 and allowed movement - buffed warden earthroot effect
This commit is contained in:
parent
5df7f84eea
commit
75f20247c2
|
@ -835,6 +835,8 @@ public class Hero extends Char {
|
||||||
|
|
||||||
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
||||||
Game.switchScene( InterlevelScene.class );
|
Game.switchScene( InterlevelScene.class );
|
||||||
|
@ -873,6 +875,8 @@ public class Hero extends Char {
|
||||||
|
|
||||||
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.ASCEND;
|
InterlevelScene.mode = InterlevelScene.Mode.ASCEND;
|
||||||
Game.switchScene( InterlevelScene.class );
|
Game.switchScene( InterlevelScene.class );
|
||||||
|
|
|
@ -53,6 +53,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
@ -451,7 +452,8 @@ public abstract class Mob extends Char {
|
||||||
@Override
|
@Override
|
||||||
public void updateSpriteState() {
|
public void updateSpriteState() {
|
||||||
super.updateSpriteState();
|
super.updateSpriteState();
|
||||||
if (Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class) != null)
|
if (Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class) != null
|
||||||
|
|| Dungeon.hero.buff(Swiftthistle.TimeBubble.class) != null)
|
||||||
sprite.add( CharSprite.State.PARALYSED );
|
sprite.add( CharSprite.State.PARALYSED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
|
@ -178,6 +179,8 @@ public class LloydsBeacon extends Artifact {
|
||||||
|
|
||||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||||
InterlevelScene.returnDepth = returnDepth;
|
InterlevelScene.returnDepth = returnDepth;
|
||||||
|
|
|
@ -335,7 +335,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public void detach(){
|
public void detach(){
|
||||||
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0]))
|
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0]))
|
||||||
mob.sprite.remove(CharSprite.State.PARALYSED);
|
if (mob.paralysed <= 0) mob.sprite.remove(CharSprite.State.PARALYSED);
|
||||||
GameScene.freezeEmitters = false;
|
GameScene.freezeEmitters = false;
|
||||||
|
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
|
@ -50,6 +51,8 @@ public class ScrollOfPassage extends ExoticScroll {
|
||||||
|
|
||||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||||
InterlevelScene.returnDepth = Math.max(1, (Dungeon.depth - 1 - (Dungeon.depth-2)%5));
|
InterlevelScene.returnDepth = Math.max(1, (Dungeon.depth - 1 - (Dungeon.depth-2)%5));
|
||||||
|
|
|
@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourg
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPassage;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPassage;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
|
@ -129,6 +130,8 @@ public class BeaconOfReturning extends Spell {
|
||||||
|
|
||||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||||
InterlevelScene.returnDepth = returnDepth;
|
InterlevelScene.returnDepth = returnDepth;
|
||||||
|
|
|
@ -60,6 +60,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.TargetHealthIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.TargetHealthIndicator;
|
||||||
|
@ -326,6 +327,9 @@ public class CursedWand {
|
||||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||||
InterlevelScene.returnDepth = depth;
|
InterlevelScene.returnDepth = depth;
|
||||||
InterlevelScene.returnPos = -1;
|
InterlevelScene.returnPos = -1;
|
||||||
|
|
|
@ -64,6 +64,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTiledVisual;
|
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTiledVisual;
|
||||||
|
@ -815,15 +816,18 @@ public abstract class Level implements Bundlable {
|
||||||
TimekeepersHourglass.timeFreeze timeFreeze =
|
TimekeepersHourglass.timeFreeze timeFreeze =
|
||||||
Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
|
|
||||||
if (timeFreeze == null) {
|
Swiftthistle.TimeBubble bubble =
|
||||||
|
Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
|
||||||
if (ch == Dungeon.hero) {
|
if (bubble != null){
|
||||||
Dungeon.hero.interrupt();
|
|
||||||
}
|
|
||||||
|
|
||||||
trap.trigger();
|
Sample.INSTANCE.play(Assets.SND_TRAP);
|
||||||
|
|
||||||
} else {
|
discover(cell);
|
||||||
|
|
||||||
|
bubble.setDelayedPress(cell);
|
||||||
|
|
||||||
|
} else if (timeFreeze != null){
|
||||||
|
|
||||||
Sample.INSTANCE.play(Assets.SND_TRAP);
|
Sample.INSTANCE.play(Assets.SND_TRAP);
|
||||||
|
|
||||||
|
@ -831,6 +835,14 @@ public abstract class Level implements Bundlable {
|
||||||
|
|
||||||
timeFreeze.setDelayedPress(cell);
|
timeFreeze.setDelayedPress(cell);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (ch == Dungeon.hero) {
|
||||||
|
Dungeon.hero.interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
|
trap.trigger();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite;
|
||||||
|
@ -74,6 +75,8 @@ public class Chasm {
|
||||||
|
|
||||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
if (Dungeon.hero.isAlive()) {
|
if (Dungeon.hero.isAlive()) {
|
||||||
Dungeon.hero.interrupt();
|
Dungeon.hero.interrupt();
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class Earthroot extends Plant {
|
||||||
|
|
||||||
if (ch == Dungeon.hero) {
|
if (ch == Dungeon.hero) {
|
||||||
if (Dungeon.hero.subClass == HeroSubClass.WARDEN){
|
if (Dungeon.hero.subClass == HeroSubClass.WARDEN){
|
||||||
Buff.affect(ch, Barkskin.class).set((Dungeon.depth + 5)/2, 5);
|
Buff.affect(ch, Barkskin.class).set(Dungeon.hero.lvl + 5, 5);
|
||||||
} else {
|
} else {
|
||||||
Buff.affect(ch, Armor.class).level(ch.HT);
|
Buff.affect(ch, Armor.class).level(ch.HT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ public class Fadeleaf extends Plant {
|
||||||
|
|
||||||
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
|
||||||
if (buff != null) buff.detach();
|
if (buff != null) buff.detach();
|
||||||
|
buff = Dungeon.hero.buff(Swiftthistle.TimeBubble.class);
|
||||||
|
if (buff != null) buff.detach();
|
||||||
|
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
|
||||||
InterlevelScene.returnDepth = Math.max(1, (Dungeon.depth - 1));
|
InterlevelScene.returnDepth = Math.max(1, (Dungeon.depth - 1));
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class Sorrowmoss extends Plant {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ch != null) {
|
if (ch != null) {
|
||||||
Buff.affect( ch, Poison.class ).set( 4 + Dungeon.depth / 2 );
|
Buff.affect( ch, Poison.class ).set( 5 + Math.round(2*Dungeon.depth / 3f) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dungeon.level.heroFOV[pos]) {
|
if (Dungeon.level.heroFOV[pos]) {
|
||||||
|
|
|
@ -27,12 +27,17 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Swiftthistle extends Plant {
|
public class Swiftthistle extends Plant {
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -44,7 +49,7 @@ public class Swiftthistle extends Plant {
|
||||||
if (ch == Dungeon.hero) {
|
if (ch == Dungeon.hero) {
|
||||||
Buff.affect(ch, TimeBubble.class).reset();
|
Buff.affect(ch, TimeBubble.class).reset();
|
||||||
if (Dungeon.hero.subClass == HeroSubClass.WARDEN){
|
if (Dungeon.hero.subClass == HeroSubClass.WARDEN){
|
||||||
Buff.affect(ch, Haste.class, 5f);
|
Buff.affect(ch, Haste.class, 1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,16 +62,18 @@ public class Swiftthistle extends Plant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class TimeBubble extends Buff {
|
//FIXME lots of copypasta from time freeze here
|
||||||
|
|
||||||
private float left;
|
public static class TimeBubble extends Buff {
|
||||||
private int pos;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
type = buffType.POSITIVE;
|
type = buffType.POSITIVE;
|
||||||
announced = true;
|
announced = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float left;
|
||||||
|
ArrayList<Integer> presses = new ArrayList<Integer>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int icon() {
|
public int icon() {
|
||||||
return BuffIndicator.SLOW;
|
return BuffIndicator.SLOW;
|
||||||
|
@ -74,25 +81,11 @@ public class Swiftthistle extends Plant {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tintIcon(Image icon) {
|
public void tintIcon(Image icon) {
|
||||||
if (left < 4) FlavourBuff.greyIcon(icon, 4f, left);
|
FlavourBuff.greyIcon(icon, 5f, left);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset(){
|
public void reset(){
|
||||||
pos = target.pos;
|
left = 7f;
|
||||||
left = 6f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void processTime( float time ){
|
|
||||||
if (target.pos != pos){
|
|
||||||
left = 0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
left -= time;
|
|
||||||
BuffIndicator.refreshHero();
|
|
||||||
|
|
||||||
if (left <= 0){
|
|
||||||
detach();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,21 +98,74 @@ public class Swiftthistle extends Plant {
|
||||||
return Messages.get(this, "desc", dispTurns(left));
|
return Messages.get(this, "desc", dispTurns(left));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String POS = "pos";
|
public void processTime(float time){
|
||||||
|
left -= time;
|
||||||
|
|
||||||
|
BuffIndicator.refreshHero();
|
||||||
|
|
||||||
|
if (left <= 0){
|
||||||
|
detach();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelayedPress(int cell){
|
||||||
|
if (!presses.contains(cell))
|
||||||
|
presses.add(cell);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void triggerPresses(){
|
||||||
|
for (int cell : presses)
|
||||||
|
Dungeon.level.press(cell, null, true);
|
||||||
|
|
||||||
|
presses = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean attachTo(Char target) {
|
||||||
|
if (Dungeon.level != null)
|
||||||
|
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0]))
|
||||||
|
mob.sprite.add(CharSprite.State.PARALYSED);
|
||||||
|
GameScene.freezeEmitters = true;
|
||||||
|
return super.attachTo(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detach(){
|
||||||
|
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0]))
|
||||||
|
if (mob.paralysed <= 0) mob.sprite.remove(CharSprite.State.PARALYSED);
|
||||||
|
GameScene.freezeEmitters = false;
|
||||||
|
|
||||||
|
super.detach();
|
||||||
|
triggerPresses();
|
||||||
|
target.next();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String PRESSES = "presses";
|
||||||
private static final String LEFT = "left";
|
private static final String LEFT = "left";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle(Bundle bundle) {
|
public void storeInBundle(Bundle bundle) {
|
||||||
super.storeInBundle(bundle);
|
super.storeInBundle(bundle);
|
||||||
bundle.put( POS, pos );
|
|
||||||
|
int[] values = new int[presses.size()];
|
||||||
|
for (int i = 0; i < values.length; i ++)
|
||||||
|
values[i] = presses.get(i);
|
||||||
|
bundle.put( PRESSES , values );
|
||||||
|
|
||||||
bundle.put( LEFT, left);
|
bundle.put( LEFT, left);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle(Bundle bundle) {
|
public void restoreFromBundle(Bundle bundle) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
pos = bundle.getInt( POS );
|
|
||||||
left = bundle.getInt( LEFT );
|
int[] values = bundle.getIntArray( PRESSES );
|
||||||
}
|
for (int value : values)
|
||||||
|
presses.add(value);
|
||||||
|
|
||||||
|
left = bundle.getFloat(LEFT);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,4 +60,4 @@ plants.swiftthistle.name=Swiftthistle
|
||||||
plants.swiftthistle.desc=When trampled, swiftthistle will briefly accelerate the flow of time around it, allowing the trampler to perform several actions instantly.
|
plants.swiftthistle.desc=When trampled, swiftthistle will briefly accelerate the flow of time around it, allowing the trampler to perform several actions instantly.
|
||||||
plants.swiftthistle$seed.name=seed of swiftthistle
|
plants.swiftthistle$seed.name=seed of swiftthistle
|
||||||
plants.swiftthistle$timebubble.name=Time Bubble
|
plants.swiftthistle$timebubble.name=Time Bubble
|
||||||
plants.swiftthistle$timebubble.desc=You are in a small bubble of accelerated time, allowing you to perform actions instantly. Attacking, moving, or using magic will break this effect however.\n\nTurns remaining: %s.
|
plants.swiftthistle$timebubble.desc=You are in a small bubble of accelerated time, allowing you to perform actions instantly. Attacking or using magic will break this effect however.\n\nTurns remaining: %s.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user