From 60b825a6efe077427d33eae94af6e9eb4b0e3191 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 26 Jul 2025 21:27:58 -0400 Subject: [PATCH] v3.2.0: added a thrown weapon to blacksmith's smith options --- .../actors/mobs/npcs/Blacksmith.java | 1 + .../shatteredpixeldungeon/windows/WndBlacksmith.java | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) 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 3c022d7a6..24657d17d 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 @@ -380,6 +380,7 @@ public class Blacksmith extends NPC { for (Item i : toUndo){ Generator.undoDrop(i); } + smithRewards.add(Generator.randomMissile(3, useDecks)); smithRewards.add(Generator.randomArmor(3)); //30%:+0, 45%:+1, 20%:+2, 5%:+3 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 7a5deea8c..fce0ed7dc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java @@ -454,9 +454,9 @@ public class WndBlacksmith extends Window { public static class WndSmith extends Window { - private static final int WIDTH = 120; - private static final int BTN_SIZE = 32; - private static final int BTN_GAP = 5; + private static final int WIDTH = 128; + private static final int BTN_SIZE = 28; + private static final int BTN_GAP = 4; private static final int GAP = 2; public WndSmith( Blacksmith troll, Hero hero ){ @@ -489,7 +489,9 @@ public class WndBlacksmith extends Window { } }; btnReward.item( i ); - btnReward.setRect( count*(WIDTH - BTN_GAP) / 3 - BTN_SIZE, message.top() + message.height() + BTN_GAP, BTN_SIZE, BTN_SIZE ); + btnReward.setRect( count*(WIDTH - BTN_GAP) / Blacksmith.Quest.smithRewards.size() - BTN_SIZE, + message.top() + message.height() + BTN_GAP, + BTN_SIZE, BTN_SIZE ); add( btnReward ); }