Program: 164322
Project: 164322
Buggy source:
@Override protected void onZap(Ballistica beam){
  for (  int c : beam.subPath(0,beam.dist))   CellEmitter.center(c).burst(BloodParticle.BURST,1);
  int cell=beam.collisionPos;
  Char ch=Actor.findChar(cell);
  Heap heap=Dungeon.level.heaps.get(cell);
  if (ch != null && ch instanceof Mob) {
    if (((Mob)ch).ally || ch.buff(Charm.class) != null || ch.buff(Corruption.class) != null) {
      int missingHP=ch.HT - ch.HP;
      int healing=(int)Math.ceil((missingHP * (0.30f + (0.03f * level))));
      ch.HP+=healing;
      ch.sprite.emitter().burst(Speck.factory(Speck.HEALING),1 + level / 2);
      ch.sprite.showStatus(CharSprite.POSITIVE,"String_Node_Str",healing);
    }
 else     if (undeadMobs.contains(ch.getClass())) {
      int damage=(int)Math.ceil(ch.HT * (0.3f + (0.05f * level)));
      ch.damage(damage,this);
      ch.sprite.emitter().start(ShadowParticle.UP,0.05f,10 + level);
      Sample.INSTANCE.play(Assets.SND_BURNING);
    }
 else {
      float duration=5 + level;
      Buff.affect(ch,Charm.class,Charm.durationFactor(ch) * duration).object=curUser.id();
      duration*=Random.Float(0.75f,1f);
      Buff.affect(curUser,Charm.class,Charm.durationFactor(ch) * duration).object=curUser.id();
      ch.sprite.centerEmitter().start(Speck.factory(Speck.HEART),0.2f,5);
      curUser.sprite.centerEmitter().start(Speck.factory(Speck.HEART),0.2f,5);
    }
  }
 else   if (heap != null && heap.type == Heap.Type.HEAP) {
    Item item=heap.peek();
    if (item != null && Random.Float() <= 0.3f + level * 0.1f) {
      if (item.cursed) {
        item.cursed=false;
        CellEmitter.get(cell).start(ShadowParticle.UP,0.05f,10);
        Sample.INSTANCE.play(Assets.SND_BURNING);
      }
      int lvldiffFromBase=item.level - (item instanceof Ring ? 1 : 0);
      if (lvldiffFromBase < 0) {
        item.upgrade(-lvldiffFromBase);
        CellEmitter.get(cell).start(Speck.factory(Speck.UP),0.2f,3);
        Sample.INSTANCE.play(Assets.SND_EVOKE);
      }
    }
  }
 else   if (Dungeon.level.map[cell] == Terrain.GRASS) {
    Dungeon.level.set(cell,Terrain.HIGH_GRASS);
    GameScene.updateMap(cell);
    CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC,4);
  }
 else   if (Dungeon.level.map[cell] == Terrain.EMBERS) {
    if (Random.Float() <= 0.3f + level * 0.03f) {
      Dungeon.level.plant((Plant.Seed)Generator.random(Generator.Category.SEED),cell);
      CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC,8);
      GameScene.updateMap(cell);
    }
 else {
      Dungeon.level.set(cell,Terrain.HIGH_GRASS);
      GameScene.updateMap(cell);
      CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC,4);
    }
  }
 else   return;
  if (!freeCharge) {
    damageHero();
  }
 else {
    freeCharge=false;
  }
}

Fixed version (ground truth):
@Override protected void onZap(Ballistica beam){
  for (  int c : beam.subPath(0,beam.dist))   CellEmitter.center(c).burst(BloodParticle.BURST,1);
  int cell=beam.collisionPos;
  Char ch=Actor.findChar(cell);
  Heap heap=Dungeon.level.heaps.get(cell);
  if (ch != null && ch instanceof Mob) {
    if (((Mob)ch).ally || ch.buff(Charm.class) != null || ch.buff(Corruption.class) != null) {
      int missingHP=ch.HT - ch.HP;
      int healing=(int)Math.ceil((missingHP * (0.30f + (0.03f * level))));
      ch.HP+=healing;
      ch.sprite.emitter().burst(Speck.factory(Speck.HEALING),1 + level / 2);
      ch.sprite.showStatus(CharSprite.POSITIVE,"String_Node_Str",healing);
    }
 else     if (undeadMobs.contains(ch.getClass())) {
      int damage=(int)Math.ceil(ch.HT * (0.3f + (0.05f * level)));
      ch.damage(damage,this);
      ch.sprite.emitter().start(ShadowParticle.UP,0.05f,10 + level);
      Sample.INSTANCE.play(Assets.SND_BURNING);
    }
 else {
      float duration=5 + level;
      Buff.affect(ch,Charm.class,Charm.durationFactor(ch) * duration).object=curUser.id();
      duration*=Random.Float(0.75f,1f);
      Buff.affect(curUser,Charm.class,Charm.durationFactor(ch) * duration).object=ch.id();
      ch.sprite.centerEmitter().start(Speck.factory(Speck.HEART),0.2f,5);
      curUser.sprite.centerEmitter().start(Speck.factory(Speck.HEART),0.2f,5);
    }
  }
 else   if (heap != null && heap.type == Heap.Type.HEAP) {
    Item item=heap.peek();
    if (item != null && Random.Float() <= 0.3f + level * 0.1f) {
      if (item.cursed) {
        item.cursed=false;
        CellEmitter.get(cell).start(ShadowParticle.UP,0.05f,10);
        Sample.INSTANCE.play(Assets.SND_BURNING);
      }
      int lvldiffFromBase=item.level - (item instanceof Ring ? 1 : 0);
      if (lvldiffFromBase < 0) {
        item.upgrade(-lvldiffFromBase);
        CellEmitter.get(cell).start(Speck.factory(Speck.UP),0.2f,3);
        Sample.INSTANCE.play(Assets.SND_EVOKE);
      }
    }
  }
 else   if (Dungeon.level.map[cell] == Terrain.GRASS) {
    Dungeon.level.set(cell,Terrain.HIGH_GRASS);
    GameScene.updateMap(cell);
    CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC,4);
  }
 else   if (Dungeon.level.map[cell] == Terrain.EMBERS) {
    if (Random.Float() <= 0.3f + level * 0.03f) {
      Dungeon.level.plant((Plant.Seed)Generator.random(Generator.Category.SEED),cell);
      CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC,8);
      GameScene.updateMap(cell);
    }
 else {
      Dungeon.level.set(cell,Terrain.HIGH_GRASS);
      GameScene.updateMap(cell);
      CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC,4);
    }
  }
 else   return;
  if (!freeCharge) {
    damageHero();
  }
 else {
    freeCharge=false;
  }
}