fixed a bug preventing correct calculation of turn order on equal initiative and differing reaction in whoGoesFirst()
This commit is contained in:
parent
6c637fd9fa
commit
a036d12a7f
@ -90,10 +90,12 @@ function whoGoesFirst(a, b) {
|
|||||||
}
|
}
|
||||||
// tie; compare reaction
|
// tie; compare reaction
|
||||||
else {
|
else {
|
||||||
if ($(a).find(".combatant-rea").text() == "" || $(b).find(".combatant-rea").text() == "") {
|
let reaA = $(a).find(".combatant-rea").attr("data-combatant-rea");
|
||||||
|
let reaB = $(b).find(".combatant-rea").attr("data-combatant-rea");
|
||||||
|
if (reaA == "" || reaB == "") {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return parseInt($(b).find(".combatant-rea").text()) - parseInt($(a).find(".combatant-rea").text());
|
return parseInt(reaB) - parseInt(reaA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user