@Override
  protected void evolve() {
    super.evolve();

    Char ch;
    for (int i = 0; i < LENGTH; i++) {
      if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
        Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch));
      }
    }
  }
Ejemplo n.º 2
0
  @Override
  protected void evolve() {
    super.evolve();

    Char ch;
    for (int i = 0; i < LENGTH; i++) {
      if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
        if (!ch.immunities().contains(this.getClass()))
          Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch) / 5);
      }
    }
  }
Ejemplo n.º 3
0
  @Override
  protected void evolve() {
    super.evolve();

    Char ch;
    int cell;

    for (int i = area.left; i < area.right; i++) {
      for (int j = area.top; j < area.bottom; j++) {
        cell = i + j * Dungeon.level.width();
        if (cur[cell] > 0 && (ch = Actor.findChar(cell)) != null) {
          if (!ch.immunities().contains(this.getClass()))
            Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch) / 5);
        }
      }
    }
  }
Ejemplo n.º 4
0
  @Override
  protected void evolve() {
    super.evolve();

    if (volume > 0) {

      boolean mapUpdated = false;

      for (int i = 0; i < LENGTH; i++) {
        if (off[i] > 0) {
          int c = Dungeon.level.map[i];
          int c1 = c;
          if (c == Terrain.EMPTY || c == Terrain.EMBERS || c == Terrain.EMPTY_DECO) {
            c1 = cur[i] > 9 ? Terrain.HIGH_GRASS : Terrain.GRASS;
          } else if (c == Terrain.GRASS && cur[i] > 9) {
            c1 = Terrain.HIGH_GRASS;
          }

          if (c1 != c) {
            Level.set(i, Terrain.HIGH_GRASS);
            mapUpdated = true;

            GameScene.updateMap(i);
            if (Dungeon.visible[i]) {
              GameScene.discoverTile(i, c);
            }
          }

          Char ch = Actor.findChar(i);
          if (ch != null) {
            Buff.prolong(ch, Roots.class, TICK);
          }
        }
      }

      if (mapUpdated) {
        Dungeon.observe();
      }
    }
  }
Ejemplo n.º 5
0
  @Override
  protected void evolve() {
    super.evolve();

    int levelDamage = 5 + Dungeon.depth * 5;

    Char ch;
    for (int i = 0; i < LENGTH; i++) {
      if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {

        int damage = (ch.HT + levelDamage) / 40;
        if (damage < 1) {
          damage = 1;
        }

        ch.damage(damage, this);
      }
    }

    Blob blob = Dungeon.level.blobs.get(ParalyticGas.class);
    if (blob != null) {

      int par[] = blob.cur;

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

        int t = cur[i];
        int p = par[i];

        if (p >= t) {
          volume -= t;
          cur[i] = 0;
        } else {
          blob.volume -= p;
          par[i] = 0;
        }
      }
    }
  }