Closed EternalRider closed 2 months ago
oh no, I forget the waitfor function; (it's copyed from warpgate) this is warpgate.wait(iterWaitTime) function:
/**
* Helper function. Waits for a specified amount of time in milliseconds (be sure to await!).
* Useful for timings with animations in the pre/post callbacks.
*
* @param {Number} ms Time to delay, in milliseconds
* @returns Promise
*/
static async wait(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
Thanks for the work! I'll add these changes in the next version.
Added to v1.16 (only compatible with Foundry v12 and SWADE system v4)
1.补上了战斗开始时的第一个回合的Hook; 2.令endTurn函数使用正确的combatant; 3.使用combatant自身的combat对象,以支持同时存在多遭遇的情况,以及修复在战斗过程中掉线重连时CombatControl对象重建导致丢失id的问题; 4.使用更准确的Boolean进行逻辑判断; 5.使用hasStarted和hasEnded标记以避免同一轮内调整combatant顺序时重复触发; ——————
Translated with DeepL.com (free version)