md5-fight-plus
Version:
29 lines (28 loc) • 998 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.snowball = void 0;
exports._snowball = _snowball;
const utils_1 = require("../../utils");
const firing_1 = require("../firing");
const getInfo = (player, atk) => {
const info = [
`${player.name}搓了搓手,召唤并丢出一个...雪球!造成${atk}伤害,【霜蚀】8`,
];
return (0, utils_1.getRandomItem)(info);
};
function _snowball(player) {
const id = player.hooks.onAttack.tap("snowball", (props) => {
const atk = 2;
(0, utils_1.releaseFrostbite)(player, 8);
player.battleField.logger.addInfo(getInfo(player, atk), player.hooks.onAttack);
return Object.assign(Object.assign({}, props), { damage: atk });
});
(0, utils_1.removeHookInRoundEnd)(player, id, "onAttack");
}
exports.snowball = {
name: "丢雪球",
description: "造成2点伤害,【霜蚀】8",
mana: 2,
run: _snowball,
type: [firing_1.FIRE_TYPE],
};