Esempio n. 1
0
  @Override
  public void activate(Char ch) {
    super.activate(ch);

    if (ch != null) {
      int len = Random.Int(5, 10);
      Buff.prolong(ch, Blindness.class, len);
      Buff.prolong(ch, Cripple.class, len);
      if (ch instanceof Mob) {
        if (((Mob) ch).state == ((Mob) ch).HUNTING) ((Mob) ch).state = ((Mob) ch).WANDERING;
        ((Mob) ch).beckon(Dungeon.level.randomDestination());
      }
    }

    if (Dungeon.visible[pos]) {
      CellEmitter.get(pos).burst(Speck.factory(Speck.LIGHT), 4);
    }
  }
Esempio 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);
      }
    }
  }