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 4107a6fda..27d1a753c 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 @@ -64,7 +64,7 @@ public class Blacksmith extends NPC { Notes.remove( Notes.Landmark.TROLL ); return true; } - if (Dungeon.level.visited[pos]){ + if (Dungeon.level.visited[pos] && !Quest.started()){ Notes.add( Notes.Landmark.TROLL ); } return super.act(); @@ -202,7 +202,7 @@ public class Blacksmith extends NPC { } }); - } else if (Quest.favor > 0 || Quest.pickaxe != null && Statistics.questScores[2] >= 2500) { + } else if (Quest.rewardsAvailable()) { Game.runOnRenderThread(new Callback() { @Override @@ -497,6 +497,12 @@ public class Blacksmith extends NPC { Statistics.questScores[2] = favor; } + public static boolean rewardsAvailable(){ + return favor > 0 + || (Quest.smithRewards != null && Quest.smiths > 0) + || (pickaxe != null && Statistics.questScores[2] >= 2500); + } + //if the blacksmith is generated pre-v2.2.0, and the player never spawned a mining test floor public static boolean oldQuestMineBlocked(){ return type == OLD && !Dungeon.levelHasBeenGenerated(Dungeon.depth, 1); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java index 6ccce9a16..f54d37735 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; +import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -96,6 +97,10 @@ public class WndBlacksmith extends Window { Blacksmith.Quest.favor -= pickaxeCost; Blacksmith.Quest.pickaxe = null; WndBlacksmith.this.hide(); + + if (!Blacksmith.Quest.rewardsAvailable()){ + Notes.remove( Notes.Landmark.TROLL ); + } } } }); @@ -290,6 +295,10 @@ public class WndBlacksmith extends Window { Blacksmith.Quest.favor -= 500 + 1000*Blacksmith.Quest.reforges; Blacksmith.Quest.reforges++; + if (!Blacksmith.Quest.rewardsAvailable()){ + Notes.remove( Notes.Landmark.TROLL ); + } + hide(); if (wndParent != null){ wndParent.hide(); @@ -386,6 +395,10 @@ public class WndBlacksmith extends Window { Sample.INSTANCE.play(Assets.Sounds.EVOKE); Item.evoke( Dungeon.hero ); + + if (!Blacksmith.Quest.rewardsAvailable()){ + Notes.remove( Notes.Landmark.TROLL ); + } } } } @@ -424,6 +437,10 @@ public class WndBlacksmith extends Window { Item.evoke( Dungeon.hero ); Badges.validateItemLevelAquired( item ); + + if (!Blacksmith.Quest.rewardsAvailable()){ + Notes.remove( Notes.Landmark.TROLL ); + } } } } @@ -498,6 +515,10 @@ public class WndBlacksmith extends Window { } WndSmith.this.hide(); Blacksmith.Quest.smithRewards = null; + + if (!Blacksmith.Quest.rewardsAvailable()){ + Notes.remove( Notes.Landmark.TROLL ); + } } }; btnConfirm.setRect(0, height+2, width/2-1, 16);