md5-fight-plus
Version:
28 lines (27 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.blizzard = void 0;
exports._blizzard = _blizzard;
const utils_1 = require("../../utils");
const firing_1 = require("../firing");
const getAttackInfo = (player, atk) => {
const info = [`${player.name}召唤【暴风雪】,造成${atk}点伤害!`];
return (0, utils_1.getRandomItem)(info);
};
function _blizzard(player) {
const id = player.hooks.onAttack.tap("blizzard", (props) => {
const defender = (0, utils_1.getOpponent)(player);
const frostbite = defender.runtimeProperty.frostbite;
const atk = frostbite * 3;
player.battleField.logger.addInfo(getAttackInfo(player, atk), player.hooks.onAttack);
return Object.assign(Object.assign({}, props), { damage: atk });
});
(0, utils_1.removeHookInRoundEnd)(player, id, "onAttack");
}
exports.blizzard = {
name: "暴风雪",
description: "造成【霜蚀】层数X3的伤害 ,并将目标的【霜蚀】层数清零",
mana: 5,
run: _blizzard,
type: [firing_1.FIRE_TYPE],
};