v0.9.4: magical infusion now preserves curses
This commit is contained in:
parent
853ecad6e6
commit
dfddf0fd94
|
@ -52,9 +52,9 @@ public class MagicalInfusion extends InventorySpell {
|
|||
|
||||
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);
|
||||
} 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);
|
||||
} else {
|
||||
item.upgrade();
|
||||
|
|
|
@ -242,7 +242,7 @@ abstract public class Weapon extends KindOfWeapon {
|
|||
public Item upgrade(boolean enchant ) {
|
||||
|
||||
if (enchant){
|
||||
if (enchantment == null || hasCurseEnchant()){
|
||||
if (enchantment == null){
|
||||
enchant(Enchantment.random());
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user