public Armor inscribe() { Class<? extends Glyph> oldGlyphClass = glyph != null ? glyph.getClass() : null; Glyph gl = Glyph.random(); while (gl.getClass() == oldGlyphClass) { gl = Armor.Glyph.random(); } return inscribe(gl); }
public int proc(Char attacker, Char defender, int damage) { if (glyph != null) { damage = glyph.proc(this, attacker, defender, damage); } if (!levelKnown) { if (--hitsToKnow <= 0) { levelKnown = true; GLog.w(TXT_IDENTIFY, name(), toString()); Badges.validateItemLevelAquired(this); } } return damage; }
public Item upgrade(boolean inscribe) { if (glyph != null) { if (!inscribe && Random.Int(level()) > 0) { GLog.w(TXT_INCOMPATIBLE); inscribe(null); } } else { if (inscribe) { inscribe(Glyph.random()); } } ; STR--; return super.upgrade(); }
@Override public ItemSprite.Glowing glowing() { return glyph != null ? glyph.glowing() : null; }
@Override public String name() { return glyph == null ? super.name() : glyph.name(super.name()); }