Fi saves and challenges rolls
This commit is contained in:
@@ -314,7 +314,7 @@ i.lethalfantasy {
|
|||||||
.lethalfantasy .character-main .character-saves .character-save {
|
.lethalfantasy .character-main .character-saves .character-save {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 1rem;
|
margin-right: 0.2rem;
|
||||||
}
|
}
|
||||||
.lethalfantasy .character-main .character-saves .character-save .rollable:hover,
|
.lethalfantasy .character-main .character-saves .character-save .rollable:hover,
|
||||||
.lethalfantasy .character-main .character-saves .character-save .rollable:focus {
|
.lethalfantasy .character-main .character-saves .character-save .rollable:focus {
|
||||||
@@ -322,12 +322,13 @@ i.lethalfantasy {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.lethalfantasy .character-main .character-saves .character-save .name {
|
.lethalfantasy .character-main .character-saves .character-save .name {
|
||||||
flex: 1;
|
flex: 0;
|
||||||
min-width: 3rem;
|
min-width: 5rem;
|
||||||
margin-left: 0.5rem;
|
max-width: 5rem;
|
||||||
|
margin-left: 0.7rem;
|
||||||
}
|
}
|
||||||
.lethalfantasy .character-main .character-saves .character-save .form-group {
|
.lethalfantasy .character-main .character-saves .character-save .form-group {
|
||||||
flex: 1;
|
flex: 0;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
.lethalfantasy .character-main .character-saves .character-save .form-group .form-fields {
|
.lethalfantasy .character-main .character-saves .character-save .form-group .form-fields {
|
||||||
|
|||||||
@@ -478,6 +478,8 @@
|
|||||||
"Platinums": "Platinum"
|
"Platinums": "Platinum"
|
||||||
},
|
},
|
||||||
"Label": {
|
"Label": {
|
||||||
|
"titleChallenge": "Challenge",
|
||||||
|
"titleSave": "Save",
|
||||||
"Movement": "Movement",
|
"Movement": "Movement",
|
||||||
"movement": {
|
"movement": {
|
||||||
"walk": "Walk",
|
"walk": "Walk",
|
||||||
@@ -550,6 +552,7 @@
|
|||||||
},
|
},
|
||||||
"Roll": {
|
"Roll": {
|
||||||
"save": "Save roll {save}",
|
"save": "Save roll {save}",
|
||||||
|
"modifierBonusMalus": "Modifier bonus/malus",
|
||||||
"changeDice": "Change dice",
|
"changeDice": "Change dice",
|
||||||
"damage": "Jet de dégâts <br> {item}",
|
"damage": "Jet de dégâts <br> {item}",
|
||||||
"attack": "Jet d'attaque <br> {item}",
|
"attack": "Jet d'attaque <br> {item}",
|
||||||
|
|||||||
@@ -172,14 +172,15 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
|||||||
console.log(event, target)
|
console.log(event, target)
|
||||||
const rollType = event.target.dataset.rollType
|
const rollType = event.target.dataset.rollType
|
||||||
let rollTarget
|
let rollTarget
|
||||||
|
let rollKey = event.target.dataset.rollKey
|
||||||
switch (rollType) {
|
switch (rollType) {
|
||||||
case "challenge":
|
case "challenge":
|
||||||
let rollKey = event.target.dataset.rollKey
|
|
||||||
rollTarget = foundry.utils.duplicate(this.document.system.challenges[rollKey])
|
rollTarget = foundry.utils.duplicate(this.document.system.challenges[rollKey])
|
||||||
rollTarget.rollKey = rollKey
|
rollTarget.rollKey = rollKey
|
||||||
break
|
break
|
||||||
case ROLL_TYPE.RESOURCE:
|
case "save":
|
||||||
rollTarget = elt.dataset.rollTarget
|
rollTarget = foundry.utils.duplicate(this.document.system.saves[rollKey])
|
||||||
|
rollTarget.rollKey = rollKey
|
||||||
break
|
break
|
||||||
case ROLL_TYPE.DAMAGE:
|
case ROLL_TYPE.DAMAGE:
|
||||||
rollTarget = elt.dataset.itemId
|
rollTarget = elt.dataset.itemId
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ export const CHOICE_DICE = {
|
|||||||
"D4": "D4",
|
"D4": "D4",
|
||||||
"D6": "D6",
|
"D6": "D6",
|
||||||
"D8": "D8",
|
"D8": "D8",
|
||||||
"D10": "D10"
|
"D10": "D10",
|
||||||
|
"D12": "D12",
|
||||||
|
"D20": "D20"
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CHOICE_MODIFIERS = {
|
export const CHOICE_MODIFIERS = {
|
||||||
|
|||||||
+56
-60
@@ -12,20 +12,8 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
return this.options.type
|
return this.options.type
|
||||||
}
|
}
|
||||||
|
|
||||||
get isChallenge() {
|
get titleFormula() {
|
||||||
return this.type === "challenge"
|
return this.options.titleFormula
|
||||||
}
|
|
||||||
|
|
||||||
get isSave() {
|
|
||||||
return this.type === ROLL_TYPE.SAVE
|
|
||||||
}
|
|
||||||
|
|
||||||
get isResource() {
|
|
||||||
return this.type === ROLL_TYPE.RESOURCE
|
|
||||||
}
|
|
||||||
|
|
||||||
get isDamage() {
|
|
||||||
return this.type === ROLL_TYPE.DAMAGE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get target() {
|
get target() {
|
||||||
@@ -167,14 +155,14 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
static async prompt(options = {}) {
|
static async prompt(options = {}) {
|
||||||
let dice = "1D20"
|
let dice = "1D20"
|
||||||
let maxValue = 20
|
let maxValue = 20
|
||||||
let formula = "1D20"
|
let baseFormula = "1D20"
|
||||||
|
let modifierFormula = "1d0"
|
||||||
let hasModifier = true
|
let hasModifier = true
|
||||||
let hasChangeDice = false
|
let hasChangeDice = false
|
||||||
if (options.rollType === "challenge") {
|
if (options.rollType === "challenge" || options.rollType === "save") {
|
||||||
if ( options.rollTarget.rollKey === "dying") {
|
if ( options.rollTarget.rollKey === "dying") {
|
||||||
dice = options.rollTarget.value
|
dice = options.rollTarget.value
|
||||||
maxValue = Number(options.rollTarget.value.match(/\d+/)[0])
|
maxValue = Number(options.rollTarget.value.match(/\d+/)[0])
|
||||||
formula = `${dice}`
|
|
||||||
hasModifier = false
|
hasModifier = false
|
||||||
hasChangeDice = true
|
hasChangeDice = true
|
||||||
} else {
|
} else {
|
||||||
@@ -198,8 +186,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
let targetName
|
let targetName
|
||||||
|
|
||||||
let dialogContext = {
|
let dialogContext = {
|
||||||
isSave: options.rollType === "save",
|
rollType: options.rollType,
|
||||||
isChallenge: options.rollType === "challenge",
|
|
||||||
rollTarget: options.rollTarget,
|
rollTarget: options.rollTarget,
|
||||||
rollModes,
|
rollModes,
|
||||||
hasModifier,
|
hasModifier,
|
||||||
@@ -209,7 +196,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
fieldRollMode,
|
fieldRollMode,
|
||||||
choiceModifier,
|
choiceModifier,
|
||||||
choiceDice,
|
choiceDice,
|
||||||
formula,
|
baseFormula,
|
||||||
dice,
|
dice,
|
||||||
hasTarget: options.hasTarget,
|
hasTarget: options.hasTarget,
|
||||||
modifier,
|
modifier,
|
||||||
@@ -241,36 +228,40 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
// If the user cancels the dialog, exit
|
// If the user cancels the dialog, exit
|
||||||
if (rollContext === null) return
|
if (rollContext === null) return
|
||||||
|
|
||||||
let treshold
|
|
||||||
let fullModifier = 0
|
let fullModifier = 0
|
||||||
|
let titleFormula = ""
|
||||||
dice = rollContext.changeDice || dice
|
dice = rollContext.changeDice || dice
|
||||||
if (options.rollType === "challenge") {
|
if (options.rollType === "challenge" || options.rollType === "save") {
|
||||||
if (hasModifier) {
|
if (hasModifier) {
|
||||||
let bonus = (options.rollTarget.rollKey === "dying") ? 0 : Number(options.rollTarget.value)
|
let bonus = Number(options.rollTarget.value)
|
||||||
fullModifier = rollContext.modifier === "" ? 0 : parseInt(rollContext.modifier, 10) + bonus
|
fullModifier = rollContext.modifier === "" ? 0 : parseInt(rollContext.modifier, 10) + bonus
|
||||||
if (fullModifier < 0) {
|
if (fullModifier === 0) {
|
||||||
let modAbs = Math.abs(fullModifier)
|
modifierFormula = "0"
|
||||||
formula = `${dice} - (d${modAbs + 1} - 1)`
|
|
||||||
} else if (fullModifier > 0) {
|
|
||||||
formula = `${dice} + (d${fullModifier + 1} - 1)`
|
|
||||||
} else {
|
} else {
|
||||||
formula = `${dice} + 1d0`
|
let modAbs = Math.abs(fullModifier)
|
||||||
|
modifierFormula = `d${modAbs + 1} - 1`
|
||||||
}
|
}
|
||||||
|
let sign = fullModifier < 0 ? "-" : "+"
|
||||||
|
titleFormula = `${dice}E ${sign} ${modifierFormula}`
|
||||||
} else {
|
} else {
|
||||||
|
modifierFormula = "0"
|
||||||
fullModifier = 0
|
fullModifier = 0
|
||||||
formula = `${dice}`
|
baseFormula = `${dice}`
|
||||||
|
titleFormula = `${dice}E`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maxValue = Number(dice.match(/\d+/)[0])
|
maxValue = Number(baseFormula.match(/\d+$/)[0]) // Update the max value agains
|
||||||
|
|
||||||
const rollData = {
|
const rollData = {
|
||||||
type: options.rollType,
|
type: options.rollType,
|
||||||
|
rollType: options.rollType,
|
||||||
target: options.rollTarget,
|
target: options.rollTarget,
|
||||||
actorId: options.actorId,
|
actorId: options.actorId,
|
||||||
actorName: options.actorName,
|
actorName: options.actorName,
|
||||||
actorImage: options.actorImage,
|
actorImage: options.actorImage,
|
||||||
rollMode: rollContext.visibility,
|
rollMode: rollContext.visibility,
|
||||||
hasTarget: options.hasTarget,
|
hasTarget: options.hasTarget,
|
||||||
|
titleFormula,
|
||||||
targetName,
|
targetName,
|
||||||
...rollContext,
|
...rollContext,
|
||||||
}
|
}
|
||||||
@@ -285,39 +276,45 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
*/
|
*/
|
||||||
if (Hooks.call("fvtt-lethal-fantasy.preRoll", options, rollData) === false) return
|
if (Hooks.call("fvtt-lethal-fantasy.preRoll", options, rollData) === false) return
|
||||||
|
|
||||||
const roll = new this(formula, options.data, rollData)
|
const rollBase = new this(baseFormula, options.data, rollData)
|
||||||
await roll.evaluate()
|
await rollBase.evaluate()
|
||||||
|
const rollModifier = new Roll(modifierFormula, options.data, rollData)
|
||||||
|
await rollModifier.evaluate()
|
||||||
|
|
||||||
let rollTotal = -1
|
let rollTotal = -1
|
||||||
let diceResults = []
|
let diceResults = []
|
||||||
let resultType
|
let resultType
|
||||||
if (options.rollType === "challenge") {
|
if (options.rollType === "challenge" || options.rollType === "save") {
|
||||||
let d20result = roll.dice[0].results[0].result
|
let diceResult = rollBase.dice[0].results[0].result
|
||||||
diceResults.push({ dice: `${dice}`, value: d20result})
|
diceResults.push({ dice: `${dice}`, value: diceResult})
|
||||||
let d20sum = d20result
|
let diceSum = diceResult
|
||||||
while (d20result === maxValue) {
|
while (diceResult === maxValue) {
|
||||||
let r = await new Roll(`${dice}`).evaluate()
|
let r = await new Roll(baseFormula).evaluate()
|
||||||
d20result = r.dice[0].results[0].result
|
diceResult = r.dice[0].results[0].result
|
||||||
diceResults.push( {dice: `${dice}-1`, value: d20result-1})
|
diceResults.push( {dice: `${dice}-1`, value: diceResult-1})
|
||||||
d20sum += (d20result - 1)
|
diceSum += (diceResult - 1)
|
||||||
}
|
}
|
||||||
if (hasModifier) {
|
if (fullModifier !== 0) {
|
||||||
let minus1 = (fullModifier === 0) ? 0 : 1
|
diceResults.push({ dice: `${rollModifier.formula}`, value: rollModifier.total })
|
||||||
diceResults.push({ dice: `${roll.dice[1].formula}-${minus1}`, value: roll.dice[1].results[0].result - minus1 })
|
if ( fullModifier < 0) {
|
||||||
rollTotal = Math.max(d20sum + roll.dice[1].results[0].result - minus1, 0)
|
rollTotal = Math.max(diceSum - rollModifier.total, 0)
|
||||||
|
} else {
|
||||||
|
rollTotal = diceSum + rollModifier.total
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rollTotal = d20sum
|
rollTotal = diceSum
|
||||||
}
|
}
|
||||||
} else if (options.rollType === ROLL_TYPE.RESOURCE) {
|
} else if (options.rollType === ROLL_TYPE.RESOURCE) {
|
||||||
//resultType = roll.total === 1 || roll.total === 2 ? "failure" : "success"
|
//resultType = roll.total === 1 || roll.total === 2 ? "failure" : "success"
|
||||||
}
|
}
|
||||||
|
|
||||||
roll.options.resultType = resultType
|
rollBase.options.resultType = resultType
|
||||||
roll.options.introText = roll._createIntroText()
|
rollBase.options.introText = rollBase._createIntroText()
|
||||||
roll.options.introTextTooltip = roll._createIntroTextTooltip()
|
rollBase.options.introTextTooltip = rollBase._createIntroTextTooltip()
|
||||||
roll.options.rollTotal = rollTotal
|
rollBase.options.rollTotal = rollTotal
|
||||||
roll.options.diceResults = diceResults
|
rollBase.options.diceResults = diceResults
|
||||||
roll.options.rollTarget = options.rollTarget
|
rollBase.options.rollTarget = options.rollTarget
|
||||||
|
rollBase.options.titleFormula = titleFormula
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hook event that fires after the roll has been made.
|
* A hook event that fires after the roll has been made.
|
||||||
@@ -328,9 +325,9 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
@param {LethalFantasyRoll} roll The resulting roll.
|
@param {LethalFantasyRoll} roll The resulting roll.
|
||||||
* @returns {boolean} Explicitly return `false` to prevent roll to be made.
|
* @returns {boolean} Explicitly return `false` to prevent roll to be made.
|
||||||
*/
|
*/
|
||||||
if (Hooks.call("fvtt-lethal-fantasy.Roll", options, rollData, roll) === false) return
|
if (Hooks.call("fvtt-lethal-fantasy.Roll", options, rollData, rollBase) === false) return
|
||||||
|
|
||||||
return roll
|
return rollBase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -343,9 +340,9 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
static createTitle(type, target) {
|
static createTitle(type, target) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "challenge":
|
case "challenge":
|
||||||
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleSave")} : ${game.i18n.localize(`LETHALFANTASY.Manager.${target}`)}`
|
return `${game.i18n.localize("LETHALFANTASY.Label.titleChallenge")}`
|
||||||
case ROLL_TYPE.RESOURCE:
|
case "save":
|
||||||
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleResource")} : ${game.i18n.localize(`LETHALFANTASY.Manager.${target}`)}`
|
return `${game.i18n.localize("LETHALFANTASY.Label.titleSave")}`
|
||||||
case ROLL_TYPE.DAMAGE:
|
case ROLL_TYPE.DAMAGE:
|
||||||
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleDamage")} : ${target}`
|
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleDamage")} : ${target}`
|
||||||
case ROLL_TYPE.ATTACK:
|
case ROLL_TYPE.ATTACK:
|
||||||
@@ -395,11 +392,10 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
diceTotal: this.dice.reduce((t, d) => t + d.total, 0),
|
diceTotal: this.dice.reduce((t, d) => t + d.total, 0),
|
||||||
isGM: game.user.isGM,
|
isGM: game.user.isGM,
|
||||||
formula: this.formula,
|
formula: this.formula,
|
||||||
|
titleFormula: this.titleFormula,
|
||||||
rollType: this.type,
|
rollType: this.type,
|
||||||
rollTarget: this.rollTarget,
|
rollTarget: this.rollTarget,
|
||||||
total: this.rollTotal,
|
total: this.rollTotal,
|
||||||
isSave: this.isSave,
|
|
||||||
isChallenge: this.isChallenge,
|
|
||||||
isFailure: this.isFailure,
|
isFailure: this.isFailure,
|
||||||
actorId: this.actorId,
|
actorId: this.actorId,
|
||||||
diceResults: this.diceResults,
|
diceResults: this.diceResults,
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -201,19 +201,20 @@
|
|||||||
.character-save {
|
.character-save {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 1rem;
|
margin-right: 0.2rem;
|
||||||
.rollable:hover,
|
.rollable:hover,
|
||||||
.rollable:focus {
|
.rollable:focus {
|
||||||
text-shadow: 0 0 8px var(--color-shadow-primary);
|
text-shadow: 0 0 8px var(--color-shadow-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
flex: 1;
|
flex: 0;
|
||||||
min-width: 3rem;
|
min-width: 5rem;
|
||||||
margin-left: 0.5rem;
|
max-width: 5rem;
|
||||||
|
margin-left: 0.7rem;
|
||||||
}
|
}
|
||||||
.form-group {
|
.form-group {
|
||||||
flex: 1;
|
flex: 0;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
.form-fields {
|
.form-fields {
|
||||||
flex: none;
|
flex: none;
|
||||||
|
|||||||
@@ -19,21 +19,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flexrow character-hp">
|
<div class="flexrow character-hp">
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.perception"}}</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.perception"}}</span>
|
||||||
{{formInput systemFields.perception.fields.value value=system.perception.value disabled=isPlayMode classes="character-hp"}}
|
{{formInput systemFields.perception.fields.value value=system.perception.value disabled=isPlayMode
|
||||||
|
classes="character-hp"}}
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.bonus"}}</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.bonus"}}</span>
|
||||||
{{formInput systemFields.perception.fields.bonus value=system.perception.bonus disabled=isPlayMode classes="character-hp"}}
|
{{formInput systemFields.perception.fields.bonus value=system.perception.bonus disabled=isPlayMode
|
||||||
|
classes="character-hp"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flexrow character-hp">
|
<div class="flexrow character-hp">
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.grit"}}</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.grit"}}</span>
|
||||||
{{formInput systemFields.grit.fields.current value=system.grit.current disabled=isPlayMode classes="character-hp"}}
|
{{formInput systemFields.grit.fields.current value=system.grit.current disabled=isPlayMode
|
||||||
|
classes="character-hp"}}
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.gritEarned"}}</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.gritEarned"}}</span>
|
||||||
{{formInput systemFields.grit.fields.earned value=system.grit.earned disabled=isPlayMode classes="character-hp"}}
|
{{formInput systemFields.grit.fields.earned value=system.grit.earned disabled=isPlayMode
|
||||||
|
classes="character-hp"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flexrow character-hp">
|
<div class="flexrow character-hp">
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.luck"}}</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.luck"}}</span>
|
||||||
{{formInput systemFields.luck.fields.current value=system.luck.current disabled=isPlayMode classes="character-hp"}}
|
{{formInput systemFields.luck.fields.current value=system.luck.current disabled=isPlayMode
|
||||||
|
classes="character-hp"}}
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.luckEarned"}}</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.luckEarned"}}</span>
|
||||||
{{formInput systemFields.luck.fields.earned value=system.luck.earned disabled=isPlayMode classes="character-hp"}}
|
{{formInput systemFields.luck.fields.earned value=system.luck.earned disabled=isPlayMode
|
||||||
|
classes="character-hp"}}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
@@ -51,26 +57,53 @@
|
|||||||
<legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend>
|
||||||
<div class="character-saves">
|
<div class="character-saves">
|
||||||
<div class="character-save">
|
<div class="character-save">
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.saves.will"}}</span>
|
<span class="name"><a class="rollable" data-roll-type="save" data-roll-key="will"><i
|
||||||
{{formField systemFields.saves.fields.will.fields.value value=system.saves.will.value disabled=isPlayMode
|
class="lf-roll-small fa-solid fa-dice-d20"></i>
|
||||||
classes="rollable" data-save-id="will" }}
|
{{localize "LETHALFANTASY.Label.saves.will"}}
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.saves.dodge"}}</span>
|
</a></span>
|
||||||
{{formField systemFields.saves.fields.dodge.fields.value value=system.saves.dodge.value disabled=isPlayMode
|
{{formField systemFields.saves.fields.will.fields.value value=system.saves.will.value
|
||||||
classes="rollable" data-save-id="dodge" }}
|
disabled=isPlayMode}}
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.saves.toughness"}}</span>
|
<span class="name">
|
||||||
|
<a class="rollable" data-roll-type="save" data-roll-key="dodge"><i
|
||||||
|
class="lf-roll-small fa-solid fa-dice-d20"></i>
|
||||||
|
{{localize "LETHALFANTASY.Label.saves.dodge"}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{{formField systemFields.saves.fields.dodge.fields.value value=system.saves.dodge.value
|
||||||
|
disabled=isPlayMode}}
|
||||||
|
<span class="name">
|
||||||
|
<a class="rollable" data-roll-type="save" data-roll-key="toughness"><i
|
||||||
|
class="lf-roll-small fa-solid fa-dice-d20"></i>
|
||||||
|
{{localize "LETHALFANTASY.Label.saves.toughness"}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
{{formField systemFields.saves.fields.toughness.fields.value value=system.saves.toughness.value
|
{{formField systemFields.saves.fields.toughness.fields.value value=system.saves.toughness.value
|
||||||
disabled=isPlayMode classes="rollable" data-save-id="toughness" }}
|
disabled=isPlayMode}}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-save">
|
<div class="character-save">
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.saves.contagion"}}</span>
|
<span class="name">
|
||||||
|
<a class="rollable" data-roll-type="save" data-roll-key="contagion"><i
|
||||||
|
class="lf-roll-small fa-solid fa-dice-d20"></i>
|
||||||
|
{{localize "LETHALFANTASY.Label.saves.contagion"}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
{{formField systemFields.saves.fields.contagion.fields.value value=system.saves.contagion.value
|
{{formField systemFields.saves.fields.contagion.fields.value value=system.saves.contagion.value
|
||||||
disabled=isPlayMode classes="rollable" data-save-id="contagion" }}
|
disabled=isPlayMode }}
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.saves.poison"}}</span>
|
|
||||||
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value
|
<span class="name">
|
||||||
disabled=isPlayMode classes="rollable" data-save-id="poison" }}
|
<a class="rollable" data-roll-type="save" data-roll-key="poison"><i
|
||||||
<span class="name">{{localize "LETHALFANTASY.Label.saves.pain"}}</span>
|
class="lf-roll-small fa-solid fa-dice-d20"></i>
|
||||||
{{formField systemFields.saves.fields.pain.fields.value value=system.saves.pain.value disabled=isPlayMode
|
{{localize "LETHALFANTASY.Label.saves.poison"}}
|
||||||
classes="rollable" data-save-id="pain" }}
|
</a>
|
||||||
|
</span>
|
||||||
|
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value
|
||||||
|
disabled=isPlayMode }}
|
||||||
|
|
||||||
|
<span class="name">
|
||||||
|
<a class="rollable" data-roll-type="save" data-roll-key="pain"><i
|
||||||
|
class="lf-roll-small fa-solid fa-dice-d20"></i>
|
||||||
|
{{localize "LETHALFANTASY.Label.saves.pain"}}</span>
|
||||||
|
{{formField systemFields.saves.fields.pain.fields.value value=system.saves.pain.value disabled=isPlayMode}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -79,15 +112,23 @@
|
|||||||
<legend>{{localize "LETHALFANTASY.Label.Challenges"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.Challenges"}}</legend>
|
||||||
<div class="character-challenges">
|
<div class="character-challenges">
|
||||||
<div class="character-challenge">
|
<div class="character-challenge">
|
||||||
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="str"><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize "LETHALFANTASY.Label.challenges.strength"}}</a></span>
|
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="str"><i
|
||||||
{{formField systemFields.challenges.fields.str.fields.value value=system.challenges.str.value disabled=isPlayMode
|
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
|
||||||
|
"LETHALFANTASY.Label.challenges.strength"}}</a></span>
|
||||||
|
{{formField systemFields.challenges.fields.str.fields.value value=system.challenges.str.value
|
||||||
|
disabled=isPlayMode
|
||||||
}}
|
}}
|
||||||
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="agility"><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize "LETHALFANTASY.Label.challenges.agility"}}</a></span>
|
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="agility"><i
|
||||||
{{formField systemFields.challenges.fields.agility.fields.value value=system.challenges.agility.value disabled=isPlayMode
|
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
|
||||||
}}
|
"LETHALFANTASY.Label.challenges.agility"}}</a></span>
|
||||||
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="dying"><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize "LETHALFANTASY.Label.challenges.dying"}}</a></span>
|
{{formField systemFields.challenges.fields.agility.fields.value value=system.challenges.agility.value
|
||||||
|
disabled=isPlayMode
|
||||||
|
}}
|
||||||
|
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="dying"><i
|
||||||
|
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
|
||||||
|
"LETHALFANTASY.Label.challenges.dying"}}</a></span>
|
||||||
{{formField systemFields.challenges.fields.dying.fields.value value=system.challenges.dying.value
|
{{formField systemFields.challenges.fields.dying.fields.value value=system.challenges.dying.value
|
||||||
disabled=isPlayMode }}
|
disabled=isPlayMode }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -114,14 +155,14 @@
|
|||||||
|
|
||||||
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
|
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
|
||||||
<legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.str"}}
|
{{localize "LETHALFANTASY.Label.str"}}
|
||||||
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
|
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="str" }}
|
disabled=isPlayMode classes="rollable" data-char-id="str" }}
|
||||||
{{formField systemFields.characteristics.fields.str.fields.percent value=system.characteristics.str.percent
|
{{formField systemFields.characteristics.fields.str.fields.percent value=system.characteristics.str.percent
|
||||||
disabled=isPlayMode type="number"}}
|
disabled=isPlayMode type="number"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.int"}}
|
{{localize "LETHALFANTASY.Label.int"}}
|
||||||
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
|
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="int" }}
|
disabled=isPlayMode classes="rollable" data-char-id="int" }}
|
||||||
@@ -129,7 +170,7 @@
|
|||||||
{{formField systemFields.characteristics.fields.int.fields.percent value=system.characteristics.int.percent
|
{{formField systemFields.characteristics.fields.int.fields.percent value=system.characteristics.int.percent
|
||||||
disabled=isPlayMode type="number" }}
|
disabled=isPlayMode type="number" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.wis"}}
|
{{localize "LETHALFANTASY.Label.wis"}}
|
||||||
{{formField systemFields.characteristics.fields.wis.fields.value value=system.characteristics.wis.value
|
{{formField systemFields.characteristics.fields.wis.fields.value value=system.characteristics.wis.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="wis" }}
|
disabled=isPlayMode classes="rollable" data-char-id="wis" }}
|
||||||
@@ -137,7 +178,7 @@
|
|||||||
{{formField systemFields.characteristics.fields.wis.fields.percent value=system.characteristics.wis.percent
|
{{formField systemFields.characteristics.fields.wis.fields.percent value=system.characteristics.wis.percent
|
||||||
disabled=isPlayMode type="number"}}
|
disabled=isPlayMode type="number"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.dex"}}
|
{{localize "LETHALFANTASY.Label.dex"}}
|
||||||
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
|
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="wis" }}
|
disabled=isPlayMode classes="rollable" data-char-id="wis" }}
|
||||||
@@ -145,7 +186,7 @@
|
|||||||
{{formField systemFields.characteristics.fields.dex.fields.percent value=system.characteristics.dex.percent
|
{{formField systemFields.characteristics.fields.dex.fields.percent value=system.characteristics.dex.percent
|
||||||
disabled=isPlayMode type="number" }}
|
disabled=isPlayMode type="number" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.con"}}
|
{{localize "LETHALFANTASY.Label.con"}}
|
||||||
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
|
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="con" }}
|
disabled=isPlayMode classes="rollable" data-char-id="con" }}
|
||||||
@@ -153,7 +194,7 @@
|
|||||||
{{formField systemFields.characteristics.fields.con.fields.percent value=system.characteristics.con.percent
|
{{formField systemFields.characteristics.fields.con.fields.percent value=system.characteristics.con.percent
|
||||||
disabled=isPlayMode type="number"}}
|
disabled=isPlayMode type="number"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.cha"}}
|
{{localize "LETHALFANTASY.Label.cha"}}
|
||||||
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
|
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="cha" }}
|
disabled=isPlayMode classes="rollable" data-char-id="cha" }}
|
||||||
@@ -161,7 +202,7 @@
|
|||||||
{{formField systemFields.characteristics.fields.cha.fields.percent value=system.characteristics.cha.percent
|
{{formField systemFields.characteristics.fields.cha.fields.percent value=system.characteristics.cha.percent
|
||||||
disabled=isPlayMode type="number"}}
|
disabled=isPlayMode type="number"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.luc"}}
|
{{localize "LETHALFANTASY.Label.luc"}}
|
||||||
{{formField systemFields.characteristics.fields.luc.fields.value value=system.characteristics.luc.value
|
{{formField systemFields.characteristics.fields.luc.fields.value value=system.characteristics.luc.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="luc" }}
|
disabled=isPlayMode classes="rollable" data-char-id="luc" }}
|
||||||
@@ -169,7 +210,7 @@
|
|||||||
{{formField systemFields.characteristics.fields.luc.fields.percent value=system.characteristics.luc.percent
|
{{formField systemFields.characteristics.fields.luc.fields.percent value=system.characteristics.luc.percent
|
||||||
disabled=isPlayMode type="number"}}
|
disabled=isPlayMode type="number"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="character-characteristic" >
|
<div class="character-characteristic">
|
||||||
{{localize "LETHALFANTASY.Label.app"}}
|
{{localize "LETHALFANTASY.Label.app"}}
|
||||||
{{formField systemFields.characteristics.fields.app.fields.value value=system.characteristics.app.value
|
{{formField systemFields.characteristics.fields.app.fields.value value=system.characteristics.app.value
|
||||||
disabled=isPlayMode classes="rollable" data-char-id="app" }}
|
disabled=isPlayMode classes="rollable" data-char-id="app" }}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<div class="intro-right">
|
<div class="intro-right">
|
||||||
<span>{{upperFirst rollType}} : {{upperCase rollTarget.rollKey}}</span>
|
<span>{{upperFirst rollType}} : {{upperCase rollTarget.rollKey}}</span>
|
||||||
|
<span>Formula : {{titleFormula}}</span>
|
||||||
{{#each diceResults as |result|}}
|
{{#each diceResults as |result|}}
|
||||||
<span>{{result.dice}} : {{result.value}}</span>
|
<span>{{result.dice}} : {{result.value}}</span>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -41,8 +42,6 @@
|
|||||||
{{#unless isPrivate}}
|
{{#unless isPrivate}}
|
||||||
<div class="dice-result">
|
<div class="dice-result">
|
||||||
<h4 class="dice-total">{{total}}</h4>
|
<h4 class="dice-total">{{total}}</h4>
|
||||||
<div class="dice-formula">{{formula}}</div>
|
|
||||||
{{{tooltip}}}
|
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
{{log "roll-dialog" this}}
|
{{log "roll-dialog" this}}
|
||||||
<div class="lethalfantasy-roll-dialog">
|
<div class="lethalfantasy-roll-dialog">
|
||||||
|
|
||||||
{{#if isChallenge}}
|
|
||||||
<fieldSet>
|
<fieldSet>
|
||||||
|
{{#if (eq rollType "challenge")}}
|
||||||
<legend>{{localize "LETHALFANTASY.Label.challenge"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.challenge"}}</legend>
|
||||||
{{#if hasModifier}}
|
|
||||||
<div class="dialog-save">{{upperCase rollTarget.rollKey}} : {{formula}} + {{baseValue}}</div>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="dialog-save">{{upperCase rollTarget.rollKey}} : {{formula}}</div>
|
<legend>{{localize "LETHALFANTASY.Label.save"}}</legend>
|
||||||
|
{{/if}}
|
||||||
|
{{#if hasModifier}}
|
||||||
|
<div class="dialog-save">{{upperCase rollTarget.rollKey}} : {{baseFormula}} + {{baseValue}}</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="dialog-save">{{upperCase rollTarget.rollKey}} : {{baseFormula}}</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</fieldSet>
|
</fieldSet>
|
||||||
|
|
||||||
{{#if hasModifier}}
|
{{#if hasModifier}}
|
||||||
<fieldSet class="dialog-modifier">
|
<fieldSet class="dialog-modifier">
|
||||||
<legend>{{localize "LETHALFANTASY.Roll.modifier"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}</legend>
|
||||||
<select name="modifier" data-tooltip-direction="UP">
|
<select name="modifier" data-tooltip-direction="UP">
|
||||||
{{selectOptions choiceModifier selected=modifier}}
|
{{selectOptions choiceModifier selected=modifier}}
|
||||||
</select>
|
</select>
|
||||||
@@ -29,7 +32,6 @@
|
|||||||
</fieldSet>
|
</fieldSet>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{/if}}
|
|
||||||
<fieldSet>
|
<fieldSet>
|
||||||
<legend>{{localize "LETHALFANTASY.Roll.visibility"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Roll.visibility"}}</legend>
|
||||||
<select name="visibility">
|
<select name="visibility">
|
||||||
|
|||||||
Reference in New Issue
Block a user