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
@@ -180,7 +180,7 @@ abstract public class Weapon extends KindOfWeapon {
public Item upgrade( boolean enchant ) {
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") );
enchant( null );
}