Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b0d4e032e | ||
|
|
539841c4ff | ||
|
|
ffba37b59e |
@@ -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"
|
||||||
|
|||||||
@@ -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