@Override
  public int attackProc(Char enemy, int damage) {
    if (Random.Int(2) == 0) {
      Buff.prolong(enemy, Cripple.class, Cripple.DURATION);
    }

    return damage;
  }
Exemple #2
0
  @Override
  protected void evolve() {

    for (int i = 0; i < LENGTH; i++) {

      int offv = cur[i] > 0 ? cur[i] - 1 : 0;
      off[i] = offv;

      if (offv > 0) {

        volume += offv;

        Char ch = Actor.findChar(i);
        if (ch != null) {
          Buff.prolong(ch, Roots.class, TICK);
        }
      }
    }
  }
Exemple #3
0
  public static void heroLand() {

    Hero hero = Dungeon.hero;

    hero.sprite.burst(hero.sprite.blood(), 10);
    Camera.main.shake(4, 0.2f);

    Buff.prolong(hero, Cripple.class, Cripple.DURATION);
    hero.damage(
        Random.IntRange(hero.HT / 3, hero.HT / 2),
        new Hero.Doom() {
          @Override
          public void onDeath() {
            Badges.validateDeathFromFalling();

            Dungeon.fail(Utils.format(ResultDescriptions.FALL, Dungeon.depth));
            GLog.n("You fell to death...");
          }
        });
  }
  @Override
  public int attackProc(Char enemy, int damage) {
    KindOfWeapon wep = rangedWeapon != null ? rangedWeapon : belongings.weapon;
    if (wep != null) {

      wep.proc(this, enemy, damage);

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

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

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

    return damage;
  }
 @Override
 public void proc(Char attacker, Char defender, int damage) {
   Buff.prolong(defender, Paralysis.class, DURATION);
   super.proc(attacker, defender, damage);
 }
 @Override
 protected void apply(Hero hero) {
   GLog.w(TXT_NO_SMELL);
   Buff.prolong(hero, GasesImmunity.class, GasesImmunity.DURATION);
   setKnown();
 }