diff --git a/src/js/sr2ini.js b/src/js/sr2ini.js index fe2ac15..5620521 100644 --- a/src/js/sr2ini.js +++ b/src/js/sr2ini.js @@ -105,9 +105,9 @@ function whoGoesFirst(a, b) { // compute a combatant's effective ini value (modified by wound penalties) function getEffectiveIni(tr) { - // return -1 if combatant is K.O. or dead + // return 0 if combatant is K.O. or dead if ($(tr).hasClass("ko-or-dead")) { - return -1; + return 0; } // otherwise compute effective ini (true ini minus wound penalties) let effectiveIni = parseInt($(tr).attr("data-true-ini")) - DAMAGE_PENALTY[parseInt($(tr).attr("data-damage-stun")) || 0] - DAMAGE_PENALTY[parseInt($(tr).attr("data-damage-physical")) || 0]; @@ -511,4 +511,4 @@ $(document).ready(function () { addTestCombatant(); }); -module.exports = { rollForInitiative, validateCombatant }; \ No newline at end of file +module.exports = { rollForInitiative, validateCombatant, whoGoesFirst, getEffectiveIni }; \ No newline at end of file