{
  onModifyMove(move, attacker, defender) {
    if (move.flags["bone"]) {
      if (!move.ignoreImmunity || typeof move.ignoreImmunity !== 'object') {
        move.ignoreImmunity = {};
      }

      move.ignoreImmunity['Ground'] = true;
      move.ignoreImmunity['Ghost'] = true;

    }
  },
  onModifyDamage(damage, source, target, move) {
    if (move.flags["bone"]) {
      const hitData = target.getMoveHitData(move);
      if (hitData?.typeMod < 0) {
        this.add('-message', `${source.name}'s Bone Zone powered up ${move.name}!`);
        return this.chainModify(2);
      }
    }
  },

  name: "Bone Zone",
  rating: 3,
  num: -1006,
}  