diff --git a/TheWitcher/witchersheet.css b/TheWitcher/witchersheet.css
index 2e6c8efbac..b8886fd0f8 100644
--- a/TheWitcher/witchersheet.css
+++ b/TheWitcher/witchersheet.css
@@ -6803,6 +6803,7 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-saveroll table,
.sheet-rolltemplate-target table,
.sheet-rolltemplate-humanlocation table,
+.sheet-rolltemplate-critlocation table,
.sheet-rolltemplate-monsterlocation table,
.sheet-rolltemplate-fumble table,
.sheet-rolltemplate-save table,
@@ -6833,6 +6834,7 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-saveroll th,
.sheet-rolltemplate-target th,
.sheet-rolltemplate-humanlocation th,
+.sheet-rolltemplate-critlocation th,
.sheet-rolltemplate-monsterlocation th,
.sheet-rolltemplate-fumble th,
.sheet-rolltemplate-save th,
@@ -6864,6 +6866,7 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-saveroll .userscript-template-title,
.sheet-rolltemplate-target .userscript-template-title,
.sheet-rolltemplate-humanlocation .userscript-template-title,
+.sheet-rolltemplate-critlocation .userscript-template-title,
.sheet-rolltemplate-monsterlocation .userscript-template-title,
.sheet-rolltemplate-fumble .userscript-template-title,
.sheet-rolltemplate-save .userscript-template-title,
@@ -6890,6 +6893,7 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-saveroll td,
.sheet-rolltemplate-target td,
.sheet-rolltemplate-humanlocation td,
+.sheet-rolltemplate-critlocation td,
.sheet-rolltemplate-monsterlocation td,
.sheet-rolltemplate-fumble td,
.sheet-rolltemplate-save td,
@@ -6917,6 +6921,7 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-saveroll .inlinerollresult,
.sheet-rolltemplate-target .inlinerollresult,
.sheet-rolltemplate-humanlocation .inlinerollresult,
+.sheet-rolltemplate-critlocation .inlinerollresult,
.sheet-rolltemplate-monsterlocation .inlinerollresult,
.sheet-rolltemplate-fumble .inlinerollresult,
.sheet-rolltemplate-save .inlinerollresult,
@@ -6976,18 +6981,21 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-target th,
.sheet-rolltemplate-humanlocation th,
+.sheet-rolltemplate-critlocation th,
.sheet-rolltemplate-monsterlocation th {
background-color: #546696;
}
.sheet-rolltemplate-target tr:nth-child(odd),
.sheet-rolltemplate-humanlocation tr:nth-child(odd),
+.sheet-rolltemplate-critlocation tr:nth-child(odd),
.sheet-rolltemplate-monsterlocation tr:nth-child(odd) {
background-color: #b1b4d8;
}
.sheet-rolltemplate-target tr:nth-child(even),
.sheet-rolltemplate-humanlocation tr:nth-child(even),
+.sheet-rolltemplate-critlocation tr:nth-child(even),
.sheet-rolltemplate-monsterlocation tr:nth-child(even) {
background-color: #e0e0e0;
}
@@ -7217,6 +7225,7 @@ button[type=action].defense_skill_roll:active {
.sheet-rolltemplate-npcdefense .sheet-rolltemplate-calculation .inlinerollresult,
.sheet-rolltemplate-humanlocation .sheet-rolltemplate-calculation .inlinerollresult,
+.sheet-rolltemplate-critlocation .sheet-rolltemplate-calculation .inlinerollresult,
.sheet-rolltemplate-monsterlocation .sheet-rolltemplate-calculation .inlinerollresult {
border: none;
background-color: inherit;
diff --git a/TheWitcher/witchersheet.html b/TheWitcher/witchersheet.html
index b5d4694a11..36bc76e9be 100644
--- a/TheWitcher/witchersheet.html
+++ b/TheWitcher/witchersheet.html
@@ -3905,6 +3905,7 @@
+
@@ -4706,7 +4707,7 @@ on('clicked:monsterlocation', async (ev) => {
let passin = rollEscape.unescape(ev.originalRollId);
console.log(passin);
- let rollBase = `@{whisper}&{template:monsterlocation} {{title=TARGET LOCATION}} {{name=@{character_name}}} {{roll=[[1d10]]}}{{attackmultiplier=[[0]]}}{{weapondmg=[[0]]}}{{afterArmor=[[0]]}}{{locationmultiplier=[[0]]}}{{armor=[[0]]}}{{damage=[[0]]}}{{critdmg=[[0]]}}{{weapon_effect=${passin.weapon_effect}}}`
+ let rollBase = `@{whisper}&{template:monsterlocation} {{title=TARGET LOCATION}} {{name=@{character_name}}} {{roll=[[1d10]]}}{{attackmultiplier=[[0]]}}{{weapondmg=[[0[WEAPON]]]}}{{afterArmor=[[0]]}}{{locationmultiplier=[[0[LOCATION]]]}}{{armor=[[0[ARMOR]]]}}{{damage=[[0[TOTAL]]]}}{{critdmg=[[0[CRIT]]]}}{{weapon_effect=${passin.weapon_effect}}}`
let rollResult = await startRoll(rollBase);
console.log(rollResult);
@@ -4746,7 +4747,7 @@ on('clicked:humanlocation', async (ev) => {
let passin = rollEscape.unescape(ev.originalRollId);
console.log(passin);
- let rollBase = `@{whisper}&{template:humanlocation} {{title=TARGET LOCATION}} {{name=@{character_name}}} {{roll=[[1d10]]}}{{attackmultiplier=[[0]]}}{{weapondmg=[[0]]}}{{afterArmor=[[0]]}}{{locationmultiplier=[[0]]}}{{armor=[[0]]}}{{damage=[[0]]}}{{critdmg=[[0]]}}{{weapon_effect=${passin.weapon_effect}}}`
+ let rollBase = `@{whisper}&{template:humanlocation} {{title=TARGET LOCATION}} {{name=@{character_name}}} {{roll=[[1d10]]}}{{attackmultiplier=[[0]]}}{{weapondmg=[[0[WEAPON]]]}}{{afterArmor=[[0]]}}{{locationmultiplier=[[0[LOCATION]]]}}{{armor=[[0[ARMOR]]]}}{{damage=[[0[TOTAL]]]}}{{critdmg=[[0[CRIT]]]}}{{weapon_effect=${passin.weapon_effect}}}`
let rollResult = await startRoll(rollBase);
console.log(rollResult);
@@ -4782,6 +4783,46 @@ on('clicked:humanlocation', async (ev) => {
});
+on('clicked:critlocation', async (ev) => {
+ let passin = rollEscape.unescape(ev.originalRollId);
+ console.log(passin);
+
+ let rollBase = `@{whisper}&{template:critlocation} {{title=TARGET LOCATION}} {{name=@{character_name}}} {{roll=[[2d6]]}}{{attackmultiplier=[[0]]}}{{weapondmg=[[0[WEAPON]]]}}{{afterArmor=[[0]]}}{{locationmultiplier=[[0[LOCATION]]]}}{{armor=[[0[ARMOR]]]}}{{damage=[[0[TOTAL]]]}}{{critdmg=[[0[CRIT]]]}}{{weapon_effect=${passin.weapon_effect}}}`
+ let rollResult = await startRoll(rollBase);
+
+ console.log(rollResult);
+ var location = rollResult.results.roll.result;
+
+ let locationmultiplier = 1;
+ if(location === 12 || location === 11) {
+ locationmultiplier = 3;
+ }
+ else if(location > 5 && location < 11) {
+ locationmultiplier = 1;
+ }
+ else if(location > 6) {
+ locationmultiplier = 0.5;
+ }
+
+
+ //(attack multiplicator x rolled dmg - SP) * location * resistance + bonus crit damage
+ let damage = passin.afterArmor * locationmultiplier + passin.critdmg;
+
+ finishRoll(
+ rollResult.rollId,
+ {
+ attackmultiplier: passin.attackmultiplier,
+ locationmultiplier: locationmultiplier,
+ weapondmg: passin.weapondmg,
+ critdmg: passin.critdmg,
+ armor: passin.armor,
+ afterArmor: passin.afterArmor,
+ damage: damage
+ }
+ );
+
+});
+
//////////////////////////////
// Weapon Template Attacks //
@@ -5651,86 +5692,29 @@ const asw = (() => {
{{/rollGreater() computed::hit 0}}
{{#rollGreater() computed::hit 0}}
+
+
+
{{/rollGreater() computed::hit 0}}
-
-
-
- | {{title}} |
-
-
- | NAME: {{name}} |
-
- {{#rollTotal() roll 1}}| HEAD: If successful, your attack will deal x3 damage. |
{{/rollTotal() roll 1}}
- {{#rollBetween() roll 2 5}}| TORSO (MONSTER): If successful, your attack will deal standard damage. |
{{/rollBetween() roll 2 5}}
- {{#rollBetween() roll 6 7}}| RIGHT LIMB (MONSTER): If successful, your attack will deal half damage. |
{{/rollBetween() roll 6 7}}
- {{#rollBetween() roll 8 9}}| LEFT LIMB (MONSTER): If successful, your attack will deal half damage. |
{{/rollBetween() roll 8 9}}
- {{#rollTotal() roll 10}}| WING/TAIL (MONSTER): If successful, your attack will deal half damage. |
{{/rollTotal() roll 10}}
-
- | TARGET LOCATION: {{roll}} |
-
- {{#computed::damage}}
-
- |
- DAMAGE: ({{#^rollTotal() computed::attackmultiplier 1}}{{computed::attackmultiplier}} x {{/^rollTotal() computed::attackmultiplier 1}}{{computed::weapondmg}} - {{computed::armor}}) = {{computed::afterArmor}} x {{computed::locationmultiplier}} + {{computed::critdmg}} ={{computed::damage}}
- |
-
- {{/computed::damage}}
- {{#weapon_effect}}
-
- |
- EFFECT: {{weapon_effect}}
- |
-
- {{/weapon_effect}}
-
-
-
-
-
-
- | {{title}} |
-
-
- | NAME: {{name}} |
-
- {{#rollTotal() roll 1}}| HEAD: If successful, your attack will deal x3 damage. |
{{/rollTotal() roll 1}}
- {{#rollBetween() roll 2 4}}| TORSO (HUMANOID): If successful, your attack will deal standard damage. |
{{/rollBetween() roll 2 4}}
- {{#rollTotal() roll 5}}| RIGHT ARM (HUMANOID): If successful, your attack will deal half damage. |
{{/rollTotal() roll 5}}
- {{#rollTotal() roll 6}}| LEFT ARM (HUMANOID): If successful, your attack will deal half damage. |
{{/rollTotal() roll 6}}
- {{#rollBetween() roll 7 8}}| RIGHT LEG (HUMANOID): If successful, your attack will deal half damage. |
{{/rollBetween() roll 7 8}}
- {{#rollBetween() roll 9 10}}| LEFT LEG (HUMANOID): If successful, your attack will deal half damage. |
{{/rollBetween() roll 9 10}}
-
- | TARGET LOCATION: {{roll}} |
-
- {{#computed::damage}}
-
- |
- DAMAGE: ({{#^rollTotal() computed::attackmultiplier 1}}{{computed::attackmultiplier}} x {{/^rollTotal() computed::attackmultiplier 1}}{{computed::weapondmg}} - {{computed::armor}}) = {{computed::afterArmor}} x {{computed::locationmultiplier}} + {{computed::critdmg}} ={{computed::damage}}
- |
-
- {{/computed::damage}}
- {{#weapon_effect}}
-
- |
- EFFECT: {{weapon_effect}}
- |
-
- {{/weapon_effect}}
-
-
-
@@ -5797,4 +5781,135 @@ const asw = (() => {
{{/^rollWasCrit() roll}}
{{/rollWasFumble() roll}}
-
\ No newline at end of file
+
+
+
+
+
+
+ | {{title}} |
+
+
+ | NAME: {{name}} |
+
+ {{#rollTotal() roll 1}}| HEAD: If successful, your attack will deal x3 damage. |
{{/rollTotal() roll 1}}
+ {{#rollBetween() roll 2 5}}| TORSO (MONSTER): If successful, your attack will deal standard damage. |
{{/rollBetween() roll 2 5}}
+ {{#rollBetween() roll 6 7}}| RIGHT LIMB (MONSTER): If successful, your attack will deal half damage. |
{{/rollBetween() roll 6 7}}
+ {{#rollBetween() roll 8 9}}| LEFT LIMB (MONSTER): If successful, your attack will deal half damage. |
{{/rollBetween() roll 8 9}}
+ {{#rollTotal() roll 10}}| WING/TAIL (MONSTER): If successful, your attack will deal half damage. |
{{/rollTotal() roll 10}}
+
+ | TARGET LOCATION: {{roll}} |
+
+ {{#computed::damage}}
+
+ |
+ DAMAGE: ({{#^rollTotal() computed::attackmultiplier 1}}{{computed::attackmultiplier}} x {{/^rollTotal() computed::attackmultiplier 1}}{{computed::weapondmg}} - {{computed::armor}}) = {{computed::afterArmor}} x {{computed::locationmultiplier}} + {{computed::critdmg}} ={{computed::damage}}
+ |
+
+ {{/computed::damage}}
+ {{#weapon_effect}}
+
+ |
+ EFFECT: {{weapon_effect}}
+ |
+
+ {{/weapon_effect}}
+
+
+
+
+
+
+ | {{title}} |
+
+
+ | NAME: {{name}} |
+
+ {{#rollTotal() roll 1}}| HEAD: If successful, your attack will deal x3 damage. |
{{/rollTotal() roll 1}}
+ {{#rollBetween() roll 2 4}}| TORSO (HUMANOID): If successful, your attack will deal standard damage. |
{{/rollBetween() roll 2 4}}
+ {{#rollTotal() roll 5}}| RIGHT ARM (HUMANOID): If successful, your attack will deal half damage. |
{{/rollTotal() roll 5}}
+ {{#rollTotal() roll 6}}| LEFT ARM (HUMANOID): If successful, your attack will deal half damage. |
{{/rollTotal() roll 6}}
+ {{#rollBetween() roll 7 8}}| RIGHT LEG (HUMANOID): If successful, your attack will deal half damage. |
{{/rollBetween() roll 7 8}}
+ {{#rollBetween() roll 9 10}}| LEFT LEG (HUMANOID): If successful, your attack will deal half damage. |
{{/rollBetween() roll 9 10}}
+
+ | TARGET LOCATION: {{roll}} |
+
+ {{#computed::damage}}
+
+ |
+ DAMAGE: ({{#^rollTotal() computed::attackmultiplier 1}}{{computed::attackmultiplier}} x {{/^rollTotal() computed::attackmultiplier 1}}{{computed::weapondmg}} - {{computed::armor}}) = {{computed::afterArmor}} x {{computed::locationmultiplier}} + {{computed::critdmg}} ={{computed::damage}}
+ |
+
+ {{/computed::damage}}
+ {{#weapon_effect}}
+
+ |
+ EFFECT: {{weapon_effect}}
+ |
+
+ {{/weapon_effect}}
+
+
+
+
+
+
+ | {{title}} |
+
+
+ | NAME: {{name}} |
+
+ {{#rollTotal() computed::critdmg 3}}
+ {{#rollBetween() roll 2 3}}| SPRAINED LEG: -2 SPD, Dodge, Escape, Athletics |
{{/rollBetween() roll 2 3}}
+ {{#rollBetween() roll 4 5}}| SPRAINED ARM: -2 to actions with this arm |
{{/rollBetween() roll 4 5}}
+ {{#rollBetween() roll 6 8}}| FOREIGN OBJECT (TORSO): Recovery and Critical Healing are quartered |
{{/rollBetween() roll 6 8}}
+ {{#rollBetween() roll 9 10}}| CRACKED RIBS (TORSO): -2 BODY, does not affect Health Points |
{{/rollBetween() roll 9 10}}
+ {{#rollTotal() roll 11}}| DISFIGURING SCAR (HEAD): -3 empathic Verbal Combat |
{{/rollTotal() roll 11}}
+ {{#rollTotal() roll 12}}| CRACKED JAW (HEAD): -2 Magical Skills, Verbal Combat |
{{/rollTotal() roll 12}}
+ {{/rollTotal() computed::critdmg 3}}
+
+ {{#rollTotal() computed::critdmg 5}}
+ {{#rollBetween() roll 2 3}}| FRACTURED LEG: -3 SPD, Dodge, Escape, Athletics |
{{/rollBetween() roll 2 3}}
+ {{#rollBetween() roll 4 5}}| FRACTURED ARM: -3 to actions with this arm |
{{/rollBetween() roll 4 5}}
+ {{#rollBetween() roll 6 8}}| BROKEN RIBS (TORSO): -2 BODY; -1 REF/DEX |
{{/rollBetween() roll 6 8}}
+ {{#rollBetween() roll 9 10}}| RUPTURED SPLEEN (TORSO): Stun save every 5 rounds; bleeding |
{{/rollBetween() roll 9 10}}
+ {{#rollTotal() roll 11}}| LOST TEETH (HEAD): [[1d10]] teeth; -3 magical skills; verbal combat |
{{/rollTotal() roll 11}}
+ {{#rollTotal() roll 12}}| MINOR HEAD WOUND (HEAD): -1 to INT, WILL, STUN |
{{/rollTotal() roll 12}}
+ {{/rollTotal() computed::critdmg 5}}
+
+ {{#rollTotal() computed::critdmg 8}}
+ {{#rollBetween() roll 2 3}}| COMPOUND LEG FRACTURE: leg useless, quarter SPD Dodge/Escape Atheletics; bleeding |
{{/rollBetween() roll 2 3}}
+ {{#rollBetween() roll 4 5}}| COMPOUND ARM FRACTURE: arm useless; bleeding |
{{/rollBetween() roll 4 5}}
+ {{#rollBetween() roll 6 8}}| SUCKING CHEST WOUND (TORSO): -3 BODY,SPD; suffocating |
{{/rollBetween() roll 6 8}}
+ {{#rollBetween() roll 9 10}}| TORN STOMACH (TORSO): -2 to all action; 4 acid damage per round |
{{/rollBetween() roll 9 10}}
+ {{#rollTotal() roll 11}}| CONCUSSION (HEAD): all [[1d6]] rounds stun save; -2 INT/REF/DEX |
{{/rollTotal() roll 11}}
+ {{#rollTotal() roll 12}}| SKULL FRACTURE (HEAD): bleeding; -1 INT/DEX; 4x head damage |
{{/rollTotal() roll 12}}
+ {{/rollTotal() computed::critdmg 8}}
+
+ {{#rollTotal() computed::critdmg 10}}
+ {{#rollBetween() roll 2 3}}| DISMEMBERED LEG: leg useless; quarter SPD Dodge/Escape Atheletics; bleeding |
{{/rollBetween() roll 2 3}}
+ {{#rollBetween() roll 4 5}}| DISMEMBERED ARM: arm useless; bleeding |
{{/rollBetween() roll 4 5}}
+ {{#rollBetween() roll 6 8}}| SEPTIC SHOCK (TORSO): -3 INT, WILL, REF, DEX; poisoned |
{{/rollBetween() roll 6 8}}
+ {{#rollBetween() roll 9 10}}| HEART DAMAGE (TORSO): quarter Stamina, SPD, BODY; bleeding |
{{/rollBetween() roll 9 10}}
+ {{#rollTotal() roll 11}}| DAMAGED EYE (HEAD): -5 sight based Awareness; -4 DEX; bleeding |
{{/rollTotal() roll 11}}
+ {{#rollTotal() roll 12}}| SEPARATED SPINE/DECAPITATED (HEAD): You are dead |
{{/rollTotal() roll 12}}
+ {{/rollTotal() computed::critdmg 10}}
+
+ | TARGET LOCATION: {{roll}} |
+
+ {{#computed::damage}}
+
+ |
+ DAMAGE: ({{#^rollTotal() computed::attackmultiplier 1}}{{computed::attackmultiplier}} x {{/^rollTotal() computed::attackmultiplier 1}}{{computed::weapondmg}} - {{computed::armor}}) = {{computed::afterArmor}} x {{computed::locationmultiplier}} + {{computed::critdmg}} ={{computed::damage}}
+ |
+
+ {{/computed::damage}}
+ {{#weapon_effect}}
+
+ |
+ EFFECT: {{weapon_effect}}
+ |
+
+ {{/weapon_effect}}
+
+