v1.1.0: fixed inconsistent magical infusion logic between weapons and armor, and added a bit of clarity text to magical infusion's description

This commit is contained in:
Evan Debenham 2021-10-22 15:42:16 -04:00
parent 7e590f27c5
commit e79cafb859
2 changed files with 12 additions and 5 deletions

View File

@ -1046,7 +1046,7 @@ items.spells.spell.no_magic=You can't cast spells while magic immune.
items.spells.magicalinfusion.name=magical infusion items.spells.magicalinfusion.name=magical infusion
items.spells.magicalinfusion.inv_title=Infuse an item items.spells.magicalinfusion.inv_title=Infuse an item
items.spells.magicalinfusion.infuse=Your %s is infused with arcane energy! items.spells.magicalinfusion.infuse=Your %s is infused with arcane energy!
items.spells.magicalinfusion.desc=This spell possesses the same magical power as a scroll of upgrade, but in a more stable form.\n\nIn addition to upgrading an item as normal, it will never erase an enchantment on a weapon or a glyph on armor. items.spells.magicalinfusion.desc=This spell possesses the same magical power as a scroll of upgrade, but in a more stable form.\n\nIn addition to upgrading an item as normal it will never erase an enchantment on a weapon or a glyph on armor, including curses.
items.spells.magicalporter.name=magical porter items.spells.magicalporter.name=magical porter
items.spells.magicalporter.inv_title=Port an item items.spells.magicalporter.inv_title=Port an item

View File

@ -56,6 +56,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Stone;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Swiftness; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Swiftness;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Thorns; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Thorns;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
@ -394,11 +395,17 @@ public class Armor extends EquipableItem {
public Item upgrade( boolean inscribe ) { public Item upgrade( boolean inscribe ) {
if (inscribe && (glyph == null || glyph.curse())){ if (inscribe){
if (glyph == null){
inscribe( Glyph.random() ); inscribe( Glyph.random() );
} else if (!inscribe && level() >= 4 && Random.Float(10) < Math.pow(2, level()-4)){ }
} else {
if (hasCurseGlyph()){
if (Random.Int(3) == 0) inscribe(null);
} else if (level() >= 4 && Random.Float(10) < Math.pow(2, level()-4)){
inscribe(null); inscribe(null);
} }
}
cursed = false; cursed = false;