Exemplo n.º 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);
  }
Exemplo n.º 2
0
  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;
  }
Exemplo n.º 3
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();
  }
Exemplo n.º 4
0
 @Override
 public ItemSprite.Glowing glowing() {
   return glyph != null ? glyph.glowing() : null;
 }
Exemplo n.º 5
0
 @Override
 public String name() {
   return glyph == null ? super.name() : glyph.name(super.name());
 }