v3.2.0: fixed incorrect info relating to thrown upgrading

This commit is contained in:
Evan Debenham
2025-07-20 13:57:50 -04:00
parent 9545a3b333
commit 70ecd817fd
3 changed files with 10 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 ***