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