UNPKG

md5-fight-plus

Version:

24 lines (23 loc) 884 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.initRound = initRound; const SyncBailHook_1 = require("../hooks/SyncBailHook"); function initRound(battleField) { battleField.round = () => { //回合开始阶段 battleField.roundHooks.roundStart.call(battleField); const attacker = battleField.players.left; //准备阶段 attacker.hooks.prepare.call(battleField); battleField.roundHooks.rounding.call(battleField); //回合结束阶段 battleField.roundHooks.roundEnd.call(battleField); }; battleField.roundHooks = { //职责:选择进攻顺序,选择技能组 roundEnd: new SyncBailHook_1.SyncBailHook(), rounding: new SyncBailHook_1.SyncBailHook(), roundStart: new SyncBailHook_1.SyncBailHook(), }; battleField.roundCount = 0; }