Пример #1
0
  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);
  }
Пример #2
0
  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();
  }