From 9e4755b066d7e33db6c4daab91964789337d89bd Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 6 Dec 2023 13:09:20 -0500 Subject: [PATCH] v2.3.0: blackmisth no longer works with cursed items --- core/src/main/assets/messages/windows/windows.properties | 8 ++++---- .../shatteredpixeldungeon/windows/WndBlacksmith.java | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index 66be8896f..ae5ed60f9 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -1,12 +1,12 @@ -windows.wndblacksmith.prompt=Okay, a deal's a deal. Here's what I can do for you.\n\n_Current Favor: %d_ +windows.wndblacksmith.prompt=Okay, a deal's a deal. Here's what I can do for you. I only work with identified and uncursed items.\n\n_Current Favor: %d_ windows.wndblacksmith.pickaxe=_Pickaxe (%d favor):_ I guess I can give you the pickaxe back if you want. I've got plenty more. windows.wndblacksmith.pickaxe_verify=You sure you want dis old thing? The rock around here isn't soft like in the mine, so you won't be able to do any more digging with it. windows.wndblacksmith.pickaxe_free=Eh, you did a pretty good job, I'll give it to you for free. windows.wndblacksmith.pickaxe_yes=Yes, I want it. windows.wndblacksmith.pickaxe_no=Nevermind. -windows.wndblacksmith.reforge=_Reforge (%d favor):_ I can reforge two of the same type of identified item into one of a higher quality. -windows.wndblacksmith.harden=_Harden (%d favor):_ I can harden an identified weapon or armor, so it's easier to keep an enchantment or glyph. -windows.wndblacksmith.upgrade=_Upgrade (%d favor):_ If you've got an identified item below +2 I can upgrade it for you. +windows.wndblacksmith.reforge=_Reforge (%d favor):_ I can reforge two of the same type of item into one of a higher quality. +windows.wndblacksmith.harden=_Harden (%d favor):_ I can harden a weapon or armor, so it's easier to keep an enchantment or glyph. +windows.wndblacksmith.upgrade=_Upgrade (%d favor):_ If you've got an item below +2 I can upgrade it for you. windows.wndblacksmith.smith=_Smith (%d favor):_ I can try forging a weapon or armor for you from scratch. It'll be higher tier and probably upgraded, and you'll get some choice over what you get. windows.wndblacksmith.smith_verify=Alright, I'll get the forge warmed up and then you can pick what you want. windows.wndblacksmith.smith_yes=Okay, warm the forge. 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 f54d37735..e08608c9c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java @@ -327,7 +327,7 @@ public class WndBlacksmith extends Window { @Override public boolean itemSelectable(Item item) { - return item.isIdentified() && item.isUpgradable(); + return item.isIdentified() && !item.cursed && item.isUpgradable(); } @Override @@ -374,7 +374,7 @@ public class WndBlacksmith extends Window { @Override public boolean itemSelectable(Item item) { return item.isUpgradable() - && item.isIdentified() + && item.isIdentified() && !item.cursed && ((item instanceof MeleeWeapon && !((Weapon) item).enchantHardened) || (item instanceof Armor && !((Armor) item).glyphHardened)); } @@ -419,6 +419,7 @@ public class WndBlacksmith extends Window { public boolean itemSelectable(Item item) { return item.isUpgradable() && item.isIdentified() + && !item.cursed && item.level() < 2; }