Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b0d4e032e | |||
| 539841c4ff | |||
| ffba37b59e | |||
| 1a7585e1f6 | |||
| b567c8bbea |
@@ -57,7 +57,7 @@ jobs:
|
|||||||
token: ${{ secrets.FOUNDRY_PUBLISH_KEY }}
|
token: ${{ secrets.FOUNDRY_PUBLISH_KEY }}
|
||||||
id: "fvtt-lethal-fantasy"
|
id: "fvtt-lethal-fantasy"
|
||||||
version: ${{github.event.release.tag_name}}
|
version: ${{github.event.release.tag_name}}
|
||||||
manifest: "https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json"
|
manifest: "https://www.uberwald.me/gitea/uberwald/fvtt-lethal-fantasy/releases/download/latest/system.json"
|
||||||
notes: "https://www.uberwald.me/gitea/public/fvtt-lethal-fantasy/raw/branch/main/changelog.md"
|
notes: "https://www.uberwald.me/gitea/public/fvtt-lethal-fantasy/raw/branch/main/changelog.md"
|
||||||
compatibility-minimum: "14"
|
compatibility-minimum: "14"
|
||||||
compatibility-verified: "14"
|
compatibility-verified: "14"
|
||||||
|
|||||||
+9
-1
@@ -873,6 +873,7 @@ Hooks.on("createChatMessage", async (message) => {
|
|||||||
|
|
||||||
// ── D30 bonus dice (attack) — resolved before grit/luck ────────────────
|
// ── D30 bonus dice (attack) — resolved before grit/luck ────────────────
|
||||||
if (attackD30message && !attackD30Processed) {
|
if (attackD30message && !attackD30Processed) {
|
||||||
|
const preD30AttackRoll = attackRollFinal
|
||||||
const canDialog = isPrimaryController(attacker)
|
const canDialog = isPrimaryController(attacker)
|
||||||
const d30Result = await LethalFantasyUtils.processD30BonusDice(attackD30message, "attack", attackNaturalRoll, attacker, canDialog)
|
const d30Result = await LethalFantasyUtils.processD30BonusDice(attackD30message, "attack", attackNaturalRoll, attacker, canDialog)
|
||||||
if (d30Result.modifier) {
|
if (d30Result.modifier) {
|
||||||
@@ -913,10 +914,17 @@ Hooks.on("createChatMessage", async (message) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
attackD30Processed = true
|
attackD30Processed = true
|
||||||
|
// If D30 boosted attack past defense, restart so defender can react.
|
||||||
|
// Only restart when D30 actually changed the outcome (pre-D30 defender was
|
||||||
|
// winning or tied, post-D30 defender is losing).
|
||||||
|
if (defender && preD30AttackRoll <= defenseRoll && defenseRoll < attackRollFinal) {
|
||||||
|
mulliganRestart = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Attack reaction loop ───────────────────────────────────────────────
|
// ── Attack reaction loop ───────────────────────────────────────────────
|
||||||
if (!defenderHandledBonus && attacker && attackRollFinal <= defenseRoll && isPrimaryController(attacker)) {
|
if (attacker && attackRollFinal <= defenseRoll && isPrimaryController(attacker)) {
|
||||||
while (attackRollFinal <= defenseRoll) {
|
while (attackRollFinal <= defenseRoll) {
|
||||||
const currentGrit = Number(attacker.system?.grit?.current) || 0
|
const currentGrit = Number(attacker.system?.grit?.current) || 0
|
||||||
const buttons = []
|
const buttons = []
|
||||||
|
|||||||
@@ -73,20 +73,6 @@
|
|||||||
],
|
],
|
||||||
"description": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack"
|
"description": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "choice",
|
|
||||||
"choices": [
|
|
||||||
{
|
|
||||||
"type": "spell_calamity"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "bonus_dice",
|
|
||||||
"dice": "D20E",
|
|
||||||
"target": "spell_defense"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Possible Spell Catastrophe or adds D20E to Spell Defense"
|
|
||||||
},
|
|
||||||
"skill_rolls": {
|
"skill_rolls": {
|
||||||
"type": "skill_auto_success",
|
"type": "skill_auto_success",
|
||||||
"description": "Skill Succeeds Regardless of Opposing Roll"
|
"description": "Skill Succeeds Regardless of Opposing Roll"
|
||||||
@@ -109,9 +95,19 @@
|
|||||||
],
|
],
|
||||||
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
|
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
|
||||||
},
|
},
|
||||||
"saving_throws": {
|
"arcane_spell_defense": {
|
||||||
"type": "save_auto_success",
|
"type": "choice",
|
||||||
"description": "Saving Throw Succeeds Regardless of Opposing Roll"
|
"choices": [
|
||||||
|
{
|
||||||
|
"type": "spell_calamity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "bonus_dice",
|
||||||
|
"dice": "D20E",
|
||||||
|
"target": "spell_defense"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Possible Spell Catastrophe or adds D20E to Spell Defense"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"29": {
|
"29": {
|
||||||
@@ -135,11 +131,6 @@
|
|||||||
"amount": 1,
|
"amount": 1,
|
||||||
"description": "Gain 1 Grit"
|
"description": "Gain 1 Grit"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "gain_grit",
|
|
||||||
"amount": 1,
|
|
||||||
"description": "Gain 1 Grit"
|
|
||||||
},
|
|
||||||
"skill_rolls": {
|
"skill_rolls": {
|
||||||
"type": "gain_grit",
|
"type": "gain_grit",
|
||||||
"amount": 1,
|
"amount": 1,
|
||||||
@@ -150,7 +141,7 @@
|
|||||||
"amount": 1,
|
"amount": 1,
|
||||||
"description": "Gain 1 Grit"
|
"description": "Gain 1 Grit"
|
||||||
},
|
},
|
||||||
"saving_throws": {
|
"arcane_spell_defense": {
|
||||||
"type": "gain_grit",
|
"type": "gain_grit",
|
||||||
"amount": 1,
|
"amount": 1,
|
||||||
"description": "Gain 1 Grit"
|
"description": "Gain 1 Grit"
|
||||||
@@ -184,16 +175,16 @@
|
|||||||
"type": "no_lethargy",
|
"type": "no_lethargy",
|
||||||
"description": "No Spell Lethargy the Aether Approves of Characters Efforts"
|
"description": "No Spell Lethargy the Aether Approves of Characters Efforts"
|
||||||
},
|
},
|
||||||
|
"ranged_defense": {
|
||||||
|
"type": "luck_die",
|
||||||
|
"scope": "combat",
|
||||||
|
"description": "Granted 1 Luck dice for Use in This Combat Only"
|
||||||
|
},
|
||||||
"arcane_spell_defense": {
|
"arcane_spell_defense": {
|
||||||
"type": "flash_of_pain",
|
"type": "flash_of_pain",
|
||||||
"duration_dice": "1D6E",
|
"duration_dice": "1D6E",
|
||||||
"target": "caster",
|
"target": "caster",
|
||||||
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
||||||
},
|
|
||||||
"ranged_defense": {
|
|
||||||
"type": "luck_die",
|
|
||||||
"scope": "combat",
|
|
||||||
"description": "Granted 1 Luck dice for Use in This Combat Only"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"26": {
|
"26": {
|
||||||
@@ -208,12 +199,6 @@
|
|||||||
"amount": 1,
|
"amount": 1,
|
||||||
"target": "skill",
|
"target": "skill",
|
||||||
"description": "Add 1 to Skill Roll"
|
"description": "Add 1 to Skill Roll"
|
||||||
},
|
|
||||||
"saving_throws": {
|
|
||||||
"type": "bonus_flat",
|
|
||||||
"amount": 1,
|
|
||||||
"target": "save",
|
|
||||||
"description": "Add 1 to Saving Throw"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"21": {
|
"21": {
|
||||||
@@ -239,12 +224,6 @@
|
|||||||
"target": "defender",
|
"target": "defender",
|
||||||
"description": "Magical Damage inflicts Flash of pain 1D6E seconds"
|
"description": "Magical Damage inflicts Flash of pain 1D6E seconds"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "flash_of_pain",
|
|
||||||
"duration_dice": "1D6E",
|
|
||||||
"target": "caster",
|
|
||||||
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
|
||||||
},
|
|
||||||
"skill_rolls": {
|
"skill_rolls": {
|
||||||
"type": "bonus_dice",
|
"type": "bonus_dice",
|
||||||
"dice": "D6",
|
"dice": "D6",
|
||||||
@@ -255,11 +234,11 @@
|
|||||||
"type": "recover_pain",
|
"type": "recover_pain",
|
||||||
"description": "Defender Recovers or ignores any flash of pain"
|
"description": "Defender Recovers or ignores any flash of pain"
|
||||||
},
|
},
|
||||||
"saving_throws": {
|
"arcane_spell_defense": {
|
||||||
"type": "bonus_dice",
|
"type": "flash_of_pain",
|
||||||
"dice": "D6",
|
"duration_dice": "1D6E",
|
||||||
"target": "save",
|
"target": "caster",
|
||||||
"description": "Granted D6 (1-6) Saving Throw Modifier for this Saving Throw Attempt"
|
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"20": {
|
"20": {
|
||||||
@@ -331,23 +310,6 @@
|
|||||||
],
|
],
|
||||||
"description": "Possible Vicious Application of a Magical Attack or add D12 to attack"
|
"description": "Possible Vicious Application of a Magical Attack or add D12 to attack"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "choice",
|
|
||||||
"choices": [
|
|
||||||
{
|
|
||||||
"type": "special_defense",
|
|
||||||
"options": [
|
|
||||||
"perfect_spell"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "bonus_dice",
|
|
||||||
"dice": "D12",
|
|
||||||
"target": "spell_defense"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to spell defense"
|
|
||||||
},
|
|
||||||
"skill_rolls": {
|
"skill_rolls": {
|
||||||
"type": "bonus_flat",
|
"type": "bonus_flat",
|
||||||
"amount": 20,
|
"amount": 20,
|
||||||
@@ -371,11 +333,22 @@
|
|||||||
],
|
],
|
||||||
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
|
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
|
||||||
},
|
},
|
||||||
"saving_throws": {
|
"arcane_spell_defense": {
|
||||||
"type": "bonus_flat",
|
"type": "choice",
|
||||||
"amount": 20,
|
"choices": [
|
||||||
"target": "save",
|
{
|
||||||
"description": "20 Added to Saving Throw"
|
"type": "special_defense",
|
||||||
|
"options": [
|
||||||
|
"perfect_spell"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "bonus_dice",
|
||||||
|
"dice": "D12",
|
||||||
|
"target": "spell_defense"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to spell defense"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"15": {
|
"15": {
|
||||||
@@ -416,12 +389,6 @@
|
|||||||
"punch"
|
"punch"
|
||||||
],
|
],
|
||||||
"description": "Kick or Punch"
|
"description": "Kick or Punch"
|
||||||
},
|
|
||||||
"saving_throws": {
|
|
||||||
"type": "bonus_flat",
|
|
||||||
"amount": 1,
|
|
||||||
"target": "save",
|
|
||||||
"description": "Add 1 to Saving Throw"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"13": {},
|
"13": {},
|
||||||
@@ -474,12 +441,6 @@
|
|||||||
"punch"
|
"punch"
|
||||||
],
|
],
|
||||||
"description": "Kick or Punch"
|
"description": "Kick or Punch"
|
||||||
},
|
|
||||||
"saving_throws": {
|
|
||||||
"type": "bonus_flat",
|
|
||||||
"amount": 1,
|
|
||||||
"target": "save",
|
|
||||||
"description": "Add 1 to Saving Throw"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
@@ -499,10 +460,6 @@
|
|||||||
"type": "mulligan",
|
"type": "mulligan",
|
||||||
"description": "Mulligan, Can Re-Roll This Spell Attack"
|
"description": "Mulligan, Can Re-Roll This Spell Attack"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "mulligan",
|
|
||||||
"description": "Mulligan, Can Re-Roll This Spell Defense"
|
|
||||||
},
|
|
||||||
"skill_rolls": {
|
"skill_rolls": {
|
||||||
"type": "mulligan",
|
"type": "mulligan",
|
||||||
"description": "Mulligan, Can Re-Roll This Skill roll"
|
"description": "Mulligan, Can Re-Roll This Skill roll"
|
||||||
@@ -511,9 +468,9 @@
|
|||||||
"type": "mulligan",
|
"type": "mulligan",
|
||||||
"description": "Mulligan, Can Choose to Re-Roll This Defense"
|
"description": "Mulligan, Can Choose to Re-Roll This Defense"
|
||||||
},
|
},
|
||||||
"saving_throws": {
|
"arcane_spell_defense": {
|
||||||
"type": "mulligan",
|
"type": "mulligan",
|
||||||
"description": "Mulligan, Can Re-Roll This Saving Throw"
|
"description": "Mulligan, Can Re-Roll This Spell Defense"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
@@ -565,12 +522,6 @@
|
|||||||
"punch"
|
"punch"
|
||||||
],
|
],
|
||||||
"description": "Kick or Punch"
|
"description": "Kick or Punch"
|
||||||
},
|
|
||||||
"saving_throws": {
|
|
||||||
"type": "bonus_flat",
|
|
||||||
"amount": 1,
|
|
||||||
"target": "save",
|
|
||||||
"description": "Add 1 to Saving Throw"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
@@ -595,17 +546,17 @@
|
|||||||
"multiplier": 3,
|
"multiplier": 3,
|
||||||
"description": "Triple Damage on Spell Damage"
|
"description": "Triple Damage on Spell Damage"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "bonus_dice",
|
|
||||||
"dice": "D12",
|
|
||||||
"target": "spell_defense",
|
|
||||||
"description": "D12 Added to Spell Defense Modifier"
|
|
||||||
},
|
|
||||||
"ranged_defense": {
|
"ranged_defense": {
|
||||||
"type": "dr_multiplier",
|
"type": "dr_multiplier",
|
||||||
"multiplier": 3,
|
"multiplier": 3,
|
||||||
"includes_shield": true,
|
"includes_shield": true,
|
||||||
"description": "DR Tripled including Shield"
|
"description": "DR Tripled including Shield"
|
||||||
|
},
|
||||||
|
"arcane_spell_defense": {
|
||||||
|
"type": "bonus_dice",
|
||||||
|
"dice": "D12",
|
||||||
|
"target": "spell_defense",
|
||||||
|
"description": "D12 Added to Spell Defense Modifier"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
@@ -630,17 +581,17 @@
|
|||||||
"multiplier": 2,
|
"multiplier": 2,
|
||||||
"description": "Double Damage on Spell Damage"
|
"description": "Double Damage on Spell Damage"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "bonus_dice",
|
|
||||||
"dice": "D6",
|
|
||||||
"target": "spell_defense",
|
|
||||||
"description": "D6 Added to Spell Defense Modifier"
|
|
||||||
},
|
|
||||||
"ranged_defense": {
|
"ranged_defense": {
|
||||||
"type": "dr_multiplier",
|
"type": "dr_multiplier",
|
||||||
"multiplier": 2,
|
"multiplier": 2,
|
||||||
"includes_shield": true,
|
"includes_shield": true,
|
||||||
"description": "DR Doubled including Shield"
|
"description": "DR Doubled including Shield"
|
||||||
|
},
|
||||||
|
"arcane_spell_defense": {
|
||||||
|
"type": "bonus_dice",
|
||||||
|
"dice": "D6",
|
||||||
|
"target": "spell_defense",
|
||||||
|
"description": "D6 Added to Spell Defense Modifier"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
@@ -653,10 +604,6 @@
|
|||||||
"type": "spell_calamity",
|
"type": "spell_calamity",
|
||||||
"description": "A possible spell calamity has occurred"
|
"description": "A possible spell calamity has occurred"
|
||||||
},
|
},
|
||||||
"arcane_spell_defense": {
|
|
||||||
"type": "spell_calamity",
|
|
||||||
"description": "Possible Spell Calamity or Catastrophe"
|
|
||||||
},
|
|
||||||
"melee_attack": {
|
"melee_attack": {
|
||||||
"type": "fumble",
|
"type": "fumble",
|
||||||
"detail": "melee_fumble",
|
"detail": "melee_fumble",
|
||||||
|
|||||||
@@ -27,8 +27,7 @@ export default class D30Roll {
|
|||||||
RANGED_DEFENSE: "ranged_defense",
|
RANGED_DEFENSE: "ranged_defense",
|
||||||
ARCANE_SPELL_ATTACK: "arcane_spell_attack",
|
ARCANE_SPELL_ATTACK: "arcane_spell_attack",
|
||||||
ARCANE_SPELL_DEFENSE: "arcane_spell_defense",
|
ARCANE_SPELL_DEFENSE: "arcane_spell_defense",
|
||||||
SKILL_ROLLS: "skill_rolls",
|
SKILL_ROLLS: "skill_rolls"
|
||||||
SAVING_THROWS: "saving_throws"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,8 +133,9 @@ export default class D30Roll {
|
|||||||
return options.isRanged ? this.ROLL_TYPES.RANGED_DEFENSE : this.ROLL_TYPES.MELEE_DEFENSE
|
return options.isRanged ? this.ROLL_TYPES.RANGED_DEFENSE : this.ROLL_TYPES.MELEE_DEFENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spell types
|
// Spell/Miracle types
|
||||||
if (externalType === "spell-attack" || externalType === "spell" || externalType === "spell-power") {
|
if (externalType === "spell-attack" || externalType === "spell" || externalType === "spell-power"
|
||||||
|
|| externalType === "miracle-attack" || externalType === "miracle" || externalType === "miracle-power") {
|
||||||
return this.ROLL_TYPES.ARCANE_SPELL_ATTACK
|
return this.ROLL_TYPES.ARCANE_SPELL_ATTACK
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ export default class D30Roll {
|
|||||||
|
|
||||||
// Saving throw types
|
// Saving throw types
|
||||||
if (externalType === "save") {
|
if (externalType === "save") {
|
||||||
return options.isSpellSave ? this.ROLL_TYPES.ARCANE_SPELL_DEFENSE : this.ROLL_TYPES.SAVING_THROWS
|
return this.ROLL_TYPES.ARCANE_SPELL_DEFENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no match, return null
|
// If no match, return null
|
||||||
|
|||||||
@@ -616,8 +616,10 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
|
|
||||||
let singleDice = `1D${maxValue}`
|
let singleDice = `1D${maxValue}`
|
||||||
for (let i = 0; i < rollBase.dice.length; i++) {
|
for (let i = 0; i < rollBase.dice.length; i++) {
|
||||||
for (let j = 0; j < rollBase.dice[i].results.length; j++) {
|
const dieResults = rollBase.dice[i].results
|
||||||
let diceResult = rollBase.dice[i].results[j].result
|
const resultCount = dieResults.length
|
||||||
|
for (let j = 0; j < resultCount; j++) {
|
||||||
|
let diceResult = dieResults[j].result
|
||||||
diceResults.push({ dice: `${singleDice.toUpperCase()}`, value: diceResult })
|
diceResults.push({ dice: `${singleDice.toUpperCase()}`, value: diceResult })
|
||||||
diceSum += diceResult
|
diceSum += diceResult
|
||||||
if (hasMaxValue) {
|
if (hasMaxValue) {
|
||||||
@@ -626,6 +628,8 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
diceResult = r.dice[0].results[0].result
|
diceResult = r.dice[0].results[0].result
|
||||||
diceResults.push({ dice: `${singleDice.toUpperCase()}-1`, value: diceResult - 1 })
|
diceResults.push({ dice: `${singleDice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||||
diceSum += (diceResult - 1)
|
diceSum += (diceResult - 1)
|
||||||
|
// Add to DieTerm results so DSN/Foundry display shows explosion dice
|
||||||
|
dieResults.push({ result: diceResult, active: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1214,6 +1218,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
diceResult = r.dice[0].results[0].result
|
diceResult = r.dice[0].results[0].result
|
||||||
diceResults.push({ dice: `${dice.toUpperCase()}-1`, value: diceResult - 1 })
|
diceResults.push({ dice: `${dice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||||
diceSum += (diceResult - 1)
|
diceSum += (diceResult - 1)
|
||||||
|
rollBase.dice[0].results.push({ result: diceResult, active: true })
|
||||||
}
|
}
|
||||||
if (fullModifier !== 0) {
|
if (fullModifier !== 0) {
|
||||||
diceResults.push({ dice: `${rollModifier.formula.toUpperCase()}`, value: rollModifier.total })
|
diceResults.push({ dice: `${rollModifier.formula.toUpperCase()}`, value: rollModifier.total })
|
||||||
@@ -1376,6 +1381,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
diceResult = r.dice[0].results[0].result
|
diceResult = r.dice[0].results[0].result
|
||||||
diceResults.push({ dice: `${dice.toUpperCase()}-1`, value: diceResult - 1 })
|
diceResults.push({ dice: `${dice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||||
diceSum += (diceResult - 1)
|
diceSum += (diceResult - 1)
|
||||||
|
rollBase.dice[0].results.push({ result: diceResult, active: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullModifier !== 0) {
|
if (fullModifier !== 0) {
|
||||||
@@ -1588,7 +1594,8 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
let diceSum = 0
|
let diceSum = 0
|
||||||
for (const term of roll.dice) {
|
for (const term of roll.dice) {
|
||||||
const singleDice = `1D${term.faces}`
|
const singleDice = `1D${term.faces}`
|
||||||
for (const r of term.results) {
|
const termResults = Array.from(term.results)
|
||||||
|
for (const r of termResults) {
|
||||||
let diceResult = r.result
|
let diceResult = r.result
|
||||||
diceResults.push({ dice: singleDice.toUpperCase(), value: diceResult })
|
diceResults.push({ dice: singleDice.toUpperCase(), value: diceResult })
|
||||||
diceSum += diceResult
|
diceSum += diceResult
|
||||||
@@ -1599,6 +1606,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
diceResult = xr.dice?.[0]?.results?.[0]?.result ?? (term.faces - 1)
|
diceResult = xr.dice?.[0]?.results?.[0]?.result ?? (term.faces - 1)
|
||||||
diceResults.push({ dice: `${singleDice.toUpperCase()}-1`, value: diceResult - 1 })
|
diceResults.push({ dice: `${singleDice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||||
diceSum += (diceResult - 1)
|
diceSum += (diceResult - 1)
|
||||||
|
term.results.push({ result: diceResult, active: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user