v0.9.4: magical infusion now preserves curses

This commit is contained in:
Evan Debenham 2021-07-05 19:51:14 -04:00
parent 853ecad6e6
commit dfddf0fd94
2 changed files with 3 additions and 3 deletions

View File

@ -52,9 +52,9 @@ public class MagicalInfusion extends InventorySpell {
Degrade.detach( curUser, Degrade.class ); Degrade.detach( curUser, Degrade.class );
if (item instanceof Weapon && ((Weapon) item).enchantment != null && !((Weapon) item).hasCurseEnchant()) { if (item instanceof Weapon && ((Weapon) item).enchantment != null) {
((Weapon) item).upgrade(true); ((Weapon) item).upgrade(true);
} else if (item instanceof Armor && ((Armor) item).glyph != null && !((Armor) item).hasCurseGlyph()) { } else if (item instanceof Armor && ((Armor) item).glyph != null) {
((Armor) item).upgrade(true); ((Armor) item).upgrade(true);
} else { } else {
item.upgrade(); item.upgrade();

View File

@ -242,7 +242,7 @@ abstract public class Weapon extends KindOfWeapon {
public Item upgrade(boolean enchant ) { public Item upgrade(boolean enchant ) {
if (enchant){ if (enchant){
if (enchantment == null || hasCurseEnchant()){ if (enchantment == null){
enchant(Enchantment.random()); enchant(Enchantment.random());
} }
} else { } else {