v2.3.0: curse infusion now only replaces existing curses after first use
This commit is contained in:
@@ -1145,7 +1145,7 @@ items.spells.beaconofreturning.desc=This intricate spell grants the user the abi
|
||||
|
||||
items.spells.curseinfusion.name=curse infusion
|
||||
items.spells.curseinfusion.inv_title=Curse an item
|
||||
items.spells.curseinfusion.desc=This spell infuses a piece of equipment with the same powerful malignant magic present within DM-300. The item it is used on will immediately be cursed, and any enchantment or glyph it may have had will be overridden.\n\nIn the case of weapons, armor, and wands, the item will gain upgrades in addition to being cursed. Curse infusion upgrades do not stack, and the upgrades are lost if the item becomes uncursed.
|
||||
items.spells.curseinfusion.desc=This spell infuses a piece of equipment with the same powerful malignant magic present within DM-300. The item it is used on will immediately be cursed, and any enchantment or glyph it may have had will be overridden.\n\nIn the case of weapons, armor, and wands, the item will gain upgrades in addition to being cursed. Curse infusion upgrades do not stack, and the upgrades are lost if the item becomes uncursed.\n\nMultiple curse infusions can also be used to change the curse on a weapon or armor.
|
||||
|
||||
items.spells.featherfall.name=feather fall
|
||||
items.spells.featherfall.light=You feel light as a feather!
|
||||
|
||||
@@ -61,7 +61,10 @@ public class CurseInfusion extends InventorySpell {
|
||||
if (item instanceof MeleeWeapon || item instanceof SpiritBow) {
|
||||
Weapon w = (Weapon) item;
|
||||
if (w.enchantment != null) {
|
||||
w.enchant(Weapon.Enchantment.randomCurse(w.enchantment.getClass()));
|
||||
//if we are freshly applying curse infusion, don't replace an existing curse
|
||||
if (w.hasGoodEnchant() || w.curseInfusionBonus) {
|
||||
w.enchant(Weapon.Enchantment.randomCurse(w.enchantment.getClass()));
|
||||
}
|
||||
} else {
|
||||
w.enchant(Weapon.Enchantment.randomCurse());
|
||||
}
|
||||
@@ -72,8 +75,11 @@ public class CurseInfusion extends InventorySpell {
|
||||
} else if (item instanceof Armor){
|
||||
Armor a = (Armor) item;
|
||||
if (a.glyph != null){
|
||||
a.inscribe(Armor.Glyph.randomCurse(a.glyph.getClass()));
|
||||
} else {
|
||||
//if we are freshly applying curse infusion, don't replace an existing curse
|
||||
if (a.hasGoodGlyph() || a.curseInfusionBonus) {
|
||||
a.inscribe(Armor.Glyph.randomCurse(a.glyph.getClass()));
|
||||
}
|
||||
} else if (a.hasGoodGlyph() || a.curseInfusionBonus) {
|
||||
a.inscribe(Armor.Glyph.randomCurse());
|
||||
}
|
||||
a.curseInfusionBonus = true;
|
||||
|
||||
Reference in New Issue
Block a user