fix: fix current tick not being calculated correctly

This commit is contained in:
Johannes Loher 2022-05-19 23:47:21 +02:00
parent 36d7d21960
commit 3ea4f29afd

View file

@ -33,7 +33,7 @@ const CombatMixin = (BaseCombat: typeof Combat) => {
*/
get tickValue(): number {
const tickValues = this.combatants
.filter((combatant) => !combatant.isDefeated)
.filter((combatant) => !combatant.isDefeated && !combatant.waiting)
.map((combatant) => combatant.initiative)
.filter((tickValue): tickValue is number => tickValue !== null);
const tickValue = Math.min(...tickValues);