{
    onTryHitPriority: 1,
    onTryHit(target, source, move) {
        const type = move.type;
        if (target.isActive && move.effectType === "Move" && target !== source && type !== "???" && !target.hasItem("terashard")) {
            if (!target.setType(type))
                return false;
            this.add("-start", target, "typechange", type, "[from] ability: Color Change");
            if (target.side.active.length === 2 && target.position === 1) {
                const action = this.queue.willMove(target);
                if (action && action.move.id === "curse") {
                    action.targetLoc = -1;
                }
            }
        }
    },
    name: "Color Change",
    rating: 0,
    num: 16
}
