Exemple #1
0
  @Override
  public void damage(int dmg, Object src) {
    restoreHealth = false;
    super.damage(dmg, src);

    if (subClass == HeroSubClass.BERSERKER && 0 < HP && HP <= HT * Fury.LEVEL) {
      Buff.affect(this, Fury.class);
    }
  }
Exemple #2
0
  @Override
  public int attackProc(Char enemy, int damage) {
    if (belongings.weapon != null) {

      KindOfWeapon weapon = belongings.weapon;
      weapon.proc(this, enemy, damage);

      switch (subClass) {
        case GLADIATOR:
          if (weapon instanceof MeleeWeapon) {
            damage += Buff.affect(this, Combo.class).hit(enemy, damage);
          }
          break;
        case BATTLEMAGE:
          if (weapon instanceof Wand) {
            Wand wand = (Wand) weapon;
            if (wand.curCharges < wand.maxCharges && damage > 0) {

              wand.curCharges++;
              if (Dungeon.quickslot == wand) {
                QuickSlot.refresh();
              }

              ScrollOfRecharging.charge(this);
            }
            damage += wand.curCharges;
          }
        case SNIPER:
          if (usingRanged) {
            Buff.prolong(enemy, SnipersMark.class, attackDelay() * 1.1f);
          }
          break;
        default:
      }
    }

    return damage;
  }
Exemple #3
0
 public void live() {
   Buff.affect(this, Regeneration.class);
   Buff.affect(this, Hunger.class);
 }