"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeathtouchApple = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const reborn_1 = require("../../../keywords/reborn");
const utils_1 = require("../../../utils");
exports.DeathtouchApple = {
    cardIds: ["BG35_MagicItem_731"],
    defaultScriptDataNum: (cardId) => 3,
    afterReborn: (trinket, input) => {
        if (trinket.scriptDataNum1 > 0) {
            const target = input.rebornEntity;
            if ((0, utils_1.hasCorrectTribe)(target, input.boardWithKilledMinionHero, reference_data_1.Race.UNDEAD, input.gameState.anomalies, input.gameState.allCards)) {
                (0, reborn_1.updateReborn)(target, true, input.boardWithKilledMinion, input.boardWithKilledMinionHero, input.opponentBoardHero, input.gameState);
                input.gameState.spectator.registerPowerTarget(trinket, target, input.boardWithKilledMinion, input.boardWithKilledMinionHero, input.opponentBoardHero);
                trinket.scriptDataNum1--;
            }
        }
    },
};
//# sourceMappingURL=deathtouch-apple.js.map