diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index a089ac812..eb1e63b47 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -371,6 +371,7 @@ windows.wndupgrade.enchant=Upgrading this item also has a %d%% chance to destroy windows.wndupgrade.glyph=Upgrading this item also has a %d%% chance to destroy its glyph! windows.wndupgrade.harden=Upgrading this item also has a %d%% chance to break its hardening! windows.wndupgrade.resin=This wand has been enhanced with arcane resin, normal upgrades will override resin upgrades! +windows.wndupgrade.thrown_dust=Weapons from this set that aren't in your inventory will crumble to dust. windows.wndupgrade.damage=Damage windows.wndupgrade.blocking=Blocking windows.wndupgrade.weight=Weight diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java index f591148dd..9ffc9b843 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java @@ -149,7 +149,13 @@ abstract public class MissileWeapon extends Weapon { quantity = defaultQuantity(); Buff.affect(Dungeon.hero, UpgradedSetTracker.class).levelThresholds.put(setID, level()+1); } - return super.upgrade( enchant ); + //thrown weapons don't get curse weakened + boolean wasCursed = cursed; + super.upgrade( enchant ); + if (wasCursed && hasCurseEnchant()){ + cursed = wasCursed; + } + return this; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java index 67ac2dedd..5816049bf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java @@ -387,7 +387,7 @@ public class WndUpgrade extends Window { || (toUpgrade instanceof Armor && ((Armor) toUpgrade).hasCurseGlyph())) && toUpgrade.cursedKnown) { - if (toUpgrade.cursed && (toUpgrade instanceof Weapon && ((Weapon) toUpgrade).hasCurseEnchant()) + if (toUpgrade.cursed && (toUpgrade instanceof MeleeWeapon && ((Weapon) toUpgrade).hasCurseEnchant()) || (toUpgrade instanceof Armor && ((Armor) toUpgrade).hasCurseGlyph())){ bottom = addMessage(Messages.get(this, "cursed_weaken"), CharSprite.POSITIVE, bottom); } else { @@ -406,7 +406,7 @@ public class WndUpgrade extends Window { } if (toUpgrade instanceof MissileWeapon && ((MissileWeapon) toUpgrade).extraThrownLeft){ - bottom = addMessage("Weapons from this set that aren't in your inventory will crumble to dust.", CharSprite.WARNING, bottom); + bottom = addMessage(Messages.get(this, "thrown_dust"), CharSprite.WARNING, bottom); } // *** Buttons for confirming/cancelling ***