import { ARMOR_SETS, hasSet, safeAddEffect, safeRemoveEffect, setTag, E } from "./armors_index.js";

export function jadeSet(player, eqIds) {
  const jade = hasSet(eqIds, ARMOR_SETS.jade);
  setTag(player, "jade_armor", jade);

  if (!jade) return;

  safeRemoveEffect(player, E.poison);
  safeRemoveEffect(player, E.wither);
  safeRemoveEffect(player, E.fatalPoison);
  safeRemoveEffect(player, E.blindness);

  safeAddEffect(player, E.resistance, 0);
}
