v0.4.0: reduced the chance of enchants/glyphs being erased by upgrades
This commit is contained in:
parent
e3a3428f97
commit
b8712493c0
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user