diff --git a/Shadowrun5th/Shadowrun5th.html b/Shadowrun5th/Shadowrun5th.html index be8ac637e7..4a59c7097a 100644 --- a/Shadowrun5th/Shadowrun5th.html +++ b/Shadowrun5th/Shadowrun5th.html @@ -16710,7 +16710,7 @@ on('clicked:roll', async (event) => { if(amount > results.results.result.dice.length/2) { glitchComputed = 1; - if(results.results.result.dice.filter(x => x >= 6).length == 0) { + if(results.results.result.result == 0) { glitchComputed = 2; } } @@ -16742,7 +16742,7 @@ on('clicked:repeating_knowledge:roll clicked:repeating_alchemy:roll clicked:repe if(amount > results.results.result.dice.length/2) { glitchComputed = 1; - if(results.results.result.dice.filter(x => x >= 6).length == 0) { + if(results.results.result.result == 0) { glitchComputed = 2; } } @@ -16778,7 +16778,7 @@ on('clicked:repeating_rituals:roll clicked:rollSummoning', if(amount > results.results.result.dice.length/2) { glitchComputed = 1; - if(results.results.result.dice.filter(x => x >= 6).length == 0) { + if(results.results.result.result == 0) { glitchComputed = 2; } } @@ -16811,7 +16811,7 @@ on('clicked:extendedroll', async (event) => { if(amount > results.results.result.dice.length/2) { glitchComputed = 1; - if(results.results.result.dice.filter(x => x >= 6).length == 0) { + if(results.results.result.result == 0) { glitchComputed = 2; } } @@ -17010,6 +17010,10 @@ const rollReactSoak = async (ev) => { //AP only reduces armor let armorPenetration = attrs.armor_total + dmgRoll.attackAp < 0 ? -attrs.armor_total : dmgRoll.attackAp; + if(attrs.armor_total == 0){ + armorPenetration = 0; + } + let rollBase = `${attrs.gmroll}&{template:reactsoak}{{dmgTaken=[[0]]}}{{dmgType=[[0]]}}{{name=${attrs.character_name}}}{{body=[[${attrs.bod_total}}]]}}{{armor=[[${attrs.armor_total}]]}}{{ap=[[${armorPenetration}]]}}{{bonus=[[${attrs.soak_bonus}]]}}{{mod=[[?{Situational Modifiers|0}]]}}{{edge=${attrs.edgeroll}}}{{edge_num=[[${attrs.edg_total}]]}}{{result=[[([[${attrs.bod_total}}]]+[[${attrs.armor_total}]]+[[${attrs.soak_bonus}]]+[[${armorPenetration}]]+[[?{Situational Modifiers}]]+[[${attrs.edgn}*${attrs.edg_total}]])${attrs.standardroll}${attrs.edgeroll}]]}}`; let soakRoll = await startRoll(rollBase);