diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index eea6e5236..56819159d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -1122,7 +1122,7 @@ public abstract class Mob extends Char { } else if (enemy == null) { sprite.showLost(); state = WANDERING; - target = Dungeon.level.randomDestination( Mob.this ); + target = ((Mob.Wandering)WANDERING).randomDestination(); spend( TICK ); return true; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java index d5fc82828..4107a6fda 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java @@ -102,8 +102,8 @@ public class Blacksmith extends NPC { switch (Quest.type){ case Quest.CRYSTAL: msg2 += Messages.get(Blacksmith.this, "intro_quest_crystal"); break; - case Quest.FUNGI: msg2 += Messages.get(Blacksmith.this, "intro_quest_fungi"); break; case Quest.GNOLL: msg2 += Messages.get(Blacksmith.this, "intro_quest_gnoll"); break; + case Quest.FUNGI: msg2 += Messages.get(Blacksmith.this, "intro_quest_fungi"); break; } } @@ -259,8 +259,8 @@ public class Blacksmith extends NPC { private static int type = 0; public static final int OLD = 0; public static final int CRYSTAL = 1; - public static final int FUNGI = 2; - public static final int GNOLL = 3; + public static final int GNOLL = 2; + public static final int FUNGI = 3; //pre-v2.2.0 private static boolean alternative; //false for mining gold, true for bat blood diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java index 06fb3eb1e..6ad3ade45 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java @@ -130,7 +130,7 @@ public class CavesLevel extends RegularLevel { GLog.w(Messages.get(Blacksmith.class, "cant_enter_old")); } else if (smith == null || !Blacksmith.Quest.given() || Blacksmith.Quest.completed()) { GLog.w(Messages.get(Blacksmith.class, "entrance_blocked")); - } else if (!Blacksmith.Quest.started() && Blacksmith.Quest.Type() != 0){ + } else if (!Blacksmith.Quest.started() && Blacksmith.Quest.Type() != Blacksmith.Quest.OLD){ final Pickaxe pick = hero.belongings.getItem(Pickaxe.class); Game.runOnRenderThread(new Callback() { @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java index eb087fe70..48421220e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/MiningLevel.java @@ -149,10 +149,10 @@ public class MiningLevel extends CavesLevel { return new Bat(); case Blacksmith.Quest.CRYSTAL: return new CrystalWisp(); - case Blacksmith.Quest.FUNGI: - return new Spinner(); case Blacksmith.Quest.GNOLL: return new GnollGuard(); + case Blacksmith.Quest.FUNGI: + return new Spinner(); } } @@ -212,8 +212,7 @@ public class MiningLevel extends CavesLevel { @Override public boolean activateTransition(Hero hero, LevelTransition transition) { if (transition.type == LevelTransition.Type.BRANCH_ENTRANCE - && !Blacksmith.Quest.completed() && Blacksmith.Quest.Type() != 0) { - + && !Blacksmith.Quest.completed() && Blacksmith.Quest.Type() != Blacksmith.Quest.OLD) { if (hero.belongings.getItem(Pickaxe.class) == null){ Game.runOnRenderThread(new Callback() { @@ -244,9 +243,9 @@ public class MiningLevel extends CavesLevel { if (!Blacksmith.Quest.bossBeaten()){ switch (Blacksmith.Quest.Type()){ - case 1: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_crystal"); break; - case 2: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_fungi"); break; - case 3: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_gnoll"); break; + case Blacksmith.Quest.CRYSTAL: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_crystal"); break; + case Blacksmith.Quest.GNOLL: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_gnoll"); break; + case Blacksmith.Quest.FUNGI: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_fungi"); break; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineGiantRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineGiantRoom.java index 2915ecb1b..bb9462593 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineGiantRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineGiantRoom.java @@ -67,16 +67,6 @@ public class MineGiantRoom extends CaveRoom { level.mobs.add(m); Painter.set(level, p, Terrain.EMPTY); - } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){ - Painter.fillEllipse(level, this, 3, Terrain.EMPTY); - - for (int i = 0; i < width()*height()/2; i ++){ - Point r = random(1); - if (level.map[level.pointToCell(r)] != Terrain.WALL) { - Painter.set(level, r, Terrain.HIGH_GRASS); - } - } - } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL){ Painter.fillEllipse(level, this, 3, Terrain.EMPTY); @@ -123,6 +113,16 @@ public class MineGiantRoom extends CaveRoom { } } + } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){ + Painter.fillEllipse(level, this, 3, Terrain.EMPTY); + + for (int i = 0; i < width()*height()/2; i ++){ + Point r = random(1); + if (level.map[level.pointToCell(r)] != Terrain.WALL) { + Painter.set(level, r, Terrain.HIGH_GRASS); + } + } + } else { Painter.fillEllipse(level, this, 3, Terrain.EMPTY); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineLargeRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineLargeRoom.java index 3dad128fc..e805df871 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineLargeRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineLargeRoom.java @@ -95,16 +95,6 @@ public class MineLargeRoom extends CaveRoom { level.mobs.add(m); Painter.set(level, p, Terrain.EMPTY); - } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){ - Painter.fillEllipse(level, this, 3, Terrain.EMPTY); - - for (int i = 0; i < width() * height() / 4; i++) { - Point r = random(1); - if (level.map[level.pointToCell(r)] != Terrain.WALL) { - Painter.set(level, r, Terrain.HIGH_GRASS); - } - } - } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL){ Painter.fillEllipse(level, this, 3, Terrain.EMPTY); @@ -179,6 +169,16 @@ public class MineLargeRoom extends CaveRoom { } } } + } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){ + Painter.fillEllipse(level, this, 3, Terrain.EMPTY); + + for (int i = 0; i < width() * height() / 4; i++) { + Point r = random(1); + if (level.map[level.pointToCell(r)] != Terrain.WALL) { + Painter.set(level, r, Terrain.HIGH_GRASS); + } + } + } else { Painter.fillEllipse(level, this, 3, Terrain.EMPTY); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineSecretRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineSecretRoom.java index 42234dfa6..397ba89f8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineSecretRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/quest/MineSecretRoom.java @@ -46,15 +46,15 @@ public class MineSecretRoom extends SecretRoom { if (Blacksmith.Quest.Type() == Blacksmith.Quest.CRYSTAL) { Painter.fill(level, this, 1, Terrain.MINE_CRYSTAL); + } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL) { + Painter.fill( level, this, 1, Terrain.EMPTY_SP ); + level.drop(new DarkGold().quantity(Random.NormalIntRange(3, 5)), level.pointToCell(center())).type = Heap.Type.CHEST; + return; } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI) { Painter.fill(level, this, 1, Terrain.HIGH_GRASS); //random plant? - } else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL) { - Painter.fill( level, this, 1, Terrain.EMPTY_SP ); - level.drop(new DarkGold().quantity(Random.NormalIntRange(3, 5)), level.pointToCell(center())).type = Heap.Type.CHEST; - return; } else { Painter.fill(level, this, 1, Terrain.EMPTY); }