From 10b49dedece71d4b6a8b0a8dce6fb5abc1267626 Mon Sep 17 00:00:00 2001
From: Djjus <59532170+Djjus@users.noreply.github.com>
Date: Thu, 25 Jul 2024 17:30:13 +0100
Subject: [PATCH] update 1.72c minor
---
Warhammer 4e Character Sheet/README.md | 5 +++++
.../Warhammer 4e Character Sheet.html | 19 ++++++++++++-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/Warhammer 4e Character Sheet/README.md b/Warhammer 4e Character Sheet/README.md
index b7d39ae2bd..aebf95c13c 100644
--- a/Warhammer 4e Character Sheet/README.md
+++ b/Warhammer 4e Character Sheet/README.md
@@ -82,6 +82,11 @@ Note conditions are not intended for out of combat situations, GM simply makes t
///// ============ Change Log ============ /////
+July 25th 2024 v1.72c
+
+- Critical Damage Rules Houserule 3#: Changed spells RT crit button, will now Default to Elemental table on the drop down menu.
+
+
June 28th 2024 v1.72b
- Fix issue with Failed Melee test not showing Dual Wield and Furious Assault text and follow up buttons. They now display irrelevant of roll outcome.
diff --git a/Warhammer 4e Character Sheet/Warhammer 4e Character Sheet.html b/Warhammer 4e Character Sheet/Warhammer 4e Character Sheet.html
index 0c5c6fe9c3..d10a070b14 100644
--- a/Warhammer 4e Character Sheet/Warhammer 4e Character Sheet.html
+++ b/Warhammer 4e Character Sheet/Warhammer 4e Character Sheet.html
@@ -1004,6 +1004,8 @@
+
+
@@ -48038,7 +48040,7 @@ on('clicked:repeating_spellbookpetty:spellcast clicked:repeating_spellbookpetty:
if (skill === "spellcast") {rollDmgPart = '';
if (qspell > 0) {prefix = eventInfo.triggerName.slice(8, -11);} else {prefix = eventInfo.triggerName.slice(8, -10);}}
- if (skill === "spellcastdmg") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critical}}}';
+ if (skill === "spellcastdmg") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critcast}}}';
if (qspell > 0) {prefix = eventInfo.triggerName.slice(8, -14);} else {prefix = eventInfo.triggerName.slice(8, -13);}}
prermod = parseInt(v.Quick_Spell_Mod) - (parseInt(v.Quick_Spell_LoreMod)*10);
@@ -48122,10 +48124,10 @@ on('clicked:repeating_spellbookarcane:spellcast clicked:repeating_spellbookarcan
if (skill === "spellcastreroll") {rollDmgPart = ' {{reroll=[1](~@{character_name}|prefix2-_spellcastreroll)}}';
var accumod = '@{LastRollAccuExtSL}';
var prefix = eventInfo.triggerName.slice(8, -16);}
- if (skill === "spellcastdmg") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critical}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
+ if (skill === "spellcastdmg") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critcast}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
var accumod = '@{prefix2-_spellchannelsl}';
var prefix = eventInfo.triggerName.slice(8, -13);}
- if (skill === "spellcastdmgreroll") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critical}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
+ if (skill === "spellcastdmgreroll") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critcast}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
var accumod = '@{LastRollAccuExtSL}';
var prefix = eventInfo.triggerName.slice(8, -19);}
@@ -48445,10 +48447,10 @@ on('clicked:repeating_spellbookrituals:spellcast clicked:repeating_spellbookrit
if (skill === "spellcastreroll") {rollDmgPart = ' {{reroll=[1](~@{character_name}|prefix2-_spellcastreroll)}}';
var accumod = '@{LastRollAccuExtSL}';
var prefix = eventInfo.triggerName.slice(8, -16);}
- if (skill === "spellcastdmg") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critical}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
+ if (skill === "spellcastdmg") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critcast}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
var accumod = '@{prefix2-_spellchannelsl}';
var prefix = eventInfo.triggerName.slice(8, -13);}
- if (skill === "spellcastdmgreroll") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critical}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
+ if (skill === "spellcastdmgreroll") {rollDmgPart = ' {{hitlocation=true}} {{spelldamage=[[@{prefix2-_spelldamage}+@{prefix2-_spelldamagewb}]]}} {{RTcrit=@{RT-critcast}}} {{reroll=[1](~@{character_name}|prefix2-_spellcastdmgreroll)}}';
var accumod = '@{LastRollAccuExtSL}';
var prefix = eventInfo.triggerName.slice(8, -19);}
@@ -49801,16 +49803,19 @@ on('clicked:hypnotismroll', (eventInfo) => {
});
});
-on('clicked:criticalroll', (eventInfo) => {
+on('clicked:criticalroll clicked:criticalrollcast', (eventInfo) => {
getAttrs(["initiative_houserule", "CritTable"], function(v) {
- if (v.CritTable == 2) {roll = '{{table=[[?{Crit Type|Weapon,0|Unarmed,1|Elemental/Magic,2}]]}} {{critlocation=[[?{Choose a Hit Location|Random (1d100),[[1d100]]|Head,1|Right Arm,10|Left Arm,30|Body,46|Right Leg,85|Left Leg,96}]]}} {{critv2=[[(1d100)+?{Crit Roll Modifier|0}]]}}' ;} else {roll = ' {{critlocation=[[?{Choose a Hit Location|Random (1d100),[[1d100]]|Head,1|Right Arm,10|Left Arm,30|Body,46|Right Leg,85|Left Leg,96}]]}} {{critv2=[[(1d100)+?{Crit Roll Modifier|0}]]}}';}
+ if (v.CritTable == 2) {roll = '{{table=[[>table<]]}} {{critlocation=[[?{Choose a Hit Location|Random (1d100),[[1d100]]|Head,1|Right Arm,10|Left Arm,30|Body,46|Right Leg,85|Left Leg,96}]]}} {{critv2=[[(1d100)+?{Crit Roll Modifier|0}]]}}' ;} else {roll = ' {{critlocation=[[?{Choose a Hit Location|Random (1d100),[[1d100]]|Head,1|Right Arm,10|Left Arm,30|Body,46|Right Leg,85|Left Leg,96}]]}} {{critv2=[[(1d100)+?{Crit Roll Modifier|0}]]}}';}
roll += ' {{unconscious=[[@{UnconsciousMod}]]}} {{title=Critical Roll}} {{character_name=@{character_name}}} {{attacktype=[[0]]}} {{critroll=[[(1d100)+?{Crit Roll Modifier|0}]]}} {{modvalue=[[?{Crit Roll Modifier|0}]]}} {{critdmgbonus=[[@{Talent_StrikeToInjureLvl} [STRIKE TO INJURE]]]}} {{critname=[[0]]}} {{critdisc=[[0]]}} {{critdmg=[[0]]}} {{critname2=[[0]]}} {{critdisc2=[[0]]}} {{critdmg2=[[0]]}}';
var trigger = eventInfo.triggerName.slice(8);
var prefix = trigger.split('_').slice(0,3).join('_') + '_';
let rollBegins = '@{Whisper} &{template:whfrp2e}';
let rollPart = roll;
+
+ if (trigger === "criticalroll") {rollPart = roll.replaceAll('>table<', `(?{Crit Type|Weapon,0|Unarmed,1|Elemental/Magic,2})`); console.log("Roll");} else if
+ (trigger === "criticalrollcast") {rollPart = roll.replaceAll('>table<', `(?{Crit Type|Elemental/Magic,2|Weapon,0|Unarmed,1})`); console.log("RollCast");}
if (v.CritTable == 1) {rollPart += ' {{table=[[0]]}} {{critv2=[[(1d100)+?{Crit Roll Modifier|0}]]}}';}
if (v.CritTable == 0) {rollPart += ' {{table=[[0]]}}';}