v0.4.0: reduced the chance of enchants/glyphs being erased by upgrades

This commit is contained in:
Evan Debenham 2016-06-03 21:53:08 -04:00
parent e3a3428f97
commit b8712493c0
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ public class Armor extends EquipableItem {
public Item upgrade( boolean inscribe ) { public Item upgrade( boolean inscribe ) {
if (glyph != null) { if (glyph != null) {
if (!inscribe && Random.Int( level() ) > 0) { if (!inscribe && Random.Float() > Math.pow(0.9, level())) {
GLog.w( Messages.get(Armor.class, "incompatible") ); GLog.w( Messages.get(Armor.class, "incompatible") );
inscribe( null ); inscribe( null );
} }

View File

@ -180,7 +180,7 @@ abstract public class Weapon extends KindOfWeapon {
public Item upgrade( boolean enchant ) { public Item upgrade( boolean enchant ) {
if (enchantment != null) { if (enchantment != null) {
if (!enchant && Random.Int( level() ) > 0) { if (!enchant && Random.Float() > Math.pow(0.9, level())) {
GLog.w( Messages.get(Weapon.class, "incompatible") ); GLog.w( Messages.get(Weapon.class, "incompatible") );
enchant( null ); enchant( null );
} }