Fi saves and challenges rolls

This commit is contained in:
2024-12-30 10:29:42 +01:00
parent ddf547b959
commit a7f7e26d01
33 changed files with 193 additions and 147 deletions

View File

@@ -314,7 +314,7 @@ i.lethalfantasy {
.lethalfantasy .character-main .character-saves .character-save {
display: flex;
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:focus {
@@ -322,12 +322,13 @@ i.lethalfantasy {
cursor: pointer;
}
.lethalfantasy .character-main .character-saves .character-save .name {
flex: 1;
min-width: 3rem;
margin-left: 0.5rem;
flex: 0;
min-width: 5rem;
max-width: 5rem;
margin-left: 0.7rem;
}
.lethalfantasy .character-main .character-saves .character-save .form-group {
flex: 1;
flex: 0;
padding-left: 5px;
}
.lethalfantasy .character-main .character-saves .character-save .form-group .form-fields {

View File

@@ -478,6 +478,8 @@
"Platinums": "Platinum"
},
"Label": {
"titleChallenge": "Challenge",
"titleSave": "Save",
"Movement": "Movement",
"movement": {
"walk": "Walk",
@@ -550,6 +552,7 @@
},
"Roll": {
"save": "Save roll {save}",
"modifierBonusMalus": "Modifier bonus/malus",
"changeDice": "Change dice",
"damage": "Jet de dégâts <br> {item}",
"attack": "Jet d'attaque <br> {item}",

View File

@@ -172,14 +172,15 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
console.log(event, target)
const rollType = event.target.dataset.rollType
let rollTarget
let rollKey = event.target.dataset.rollKey
switch (rollType) {
case "challenge":
let rollKey = event.target.dataset.rollKey
rollTarget = foundry.utils.duplicate(this.document.system.challenges[rollKey])
rollTarget.rollKey = rollKey
break
case ROLL_TYPE.RESOURCE:
rollTarget = elt.dataset.rollTarget
case "save":
rollTarget = foundry.utils.duplicate(this.document.system.saves[rollKey])
rollTarget.rollKey = rollKey
break
case ROLL_TYPE.DAMAGE:
rollTarget = elt.dataset.itemId

View File

@@ -71,7 +71,9 @@ export const CHOICE_DICE = {
"D4": "D4",
"D6": "D6",
"D8": "D8",
"D10": "D10"
"D10": "D10",
"D12": "D12",
"D20": "D20"
}
export const CHOICE_MODIFIERS = {

View File

@@ -11,23 +11,11 @@ export default class LethalFantasyRoll extends Roll {
get type() {
return this.options.type
}
get isChallenge() {
return this.type === "challenge"
get titleFormula() {
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() {
return this.options.target
}
@@ -167,14 +155,14 @@ export default class LethalFantasyRoll extends Roll {
static async prompt(options = {}) {
let dice = "1D20"
let maxValue = 20
let formula = "1D20"
let baseFormula = "1D20"
let modifierFormula = "1d0"
let hasModifier = true
let hasChangeDice = false
if (options.rollType === "challenge") {
if (options.rollType === "challenge" || options.rollType === "save") {
if ( options.rollTarget.rollKey === "dying") {
dice = options.rollTarget.value
maxValue = Number(options.rollTarget.value.match(/\d+/)[0])
formula = `${dice}`
hasModifier = false
hasChangeDice = true
} else {
@@ -198,8 +186,7 @@ export default class LethalFantasyRoll extends Roll {
let targetName
let dialogContext = {
isSave: options.rollType === "save",
isChallenge: options.rollType === "challenge",
rollType: options.rollType,
rollTarget: options.rollTarget,
rollModes,
hasModifier,
@@ -209,7 +196,7 @@ export default class LethalFantasyRoll extends Roll {
fieldRollMode,
choiceModifier,
choiceDice,
formula,
baseFormula,
dice,
hasTarget: options.hasTarget,
modifier,
@@ -241,36 +228,40 @@ export default class LethalFantasyRoll extends Roll {
// If the user cancels the dialog, exit
if (rollContext === null) return
let treshold
let fullModifier = 0
let titleFormula = ""
dice = rollContext.changeDice || dice
if (options.rollType === "challenge") {
if (options.rollType === "challenge" || options.rollType === "save") {
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
if (fullModifier < 0) {
let modAbs = Math.abs(fullModifier)
formula = `${dice} - (d${modAbs + 1} - 1)`
} else if (fullModifier > 0) {
formula = `${dice} + (d${fullModifier + 1} - 1)`
if (fullModifier === 0) {
modifierFormula = "0"
} else {
formula = `${dice} + 1d0`
}
let modAbs = Math.abs(fullModifier)
modifierFormula = `d${modAbs + 1} - 1`
}
let sign = fullModifier < 0 ? "-" : "+"
titleFormula = `${dice}E ${sign} ${modifierFormula}`
} else {
modifierFormula = "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 = {
type: options.rollType,
rollType: options.rollType,
target: options.rollTarget,
actorId: options.actorId,
actorName: options.actorName,
actorImage: options.actorImage,
rollMode: rollContext.visibility,
hasTarget: options.hasTarget,
titleFormula,
targetName,
...rollContext,
}
@@ -285,39 +276,45 @@ export default class LethalFantasyRoll extends Roll {
*/
if (Hooks.call("fvtt-lethal-fantasy.preRoll", options, rollData) === false) return
const roll = new this(formula, options.data, rollData)
await roll.evaluate()
const rollBase = new this(baseFormula, options.data, rollData)
await rollBase.evaluate()
const rollModifier = new Roll(modifierFormula, options.data, rollData)
await rollModifier.evaluate()
let rollTotal = -1
let diceResults = []
let resultType
if (options.rollType === "challenge") {
let d20result = roll.dice[0].results[0].result
diceResults.push({ dice: `${dice}`, value: d20result})
let d20sum = d20result
while (d20result === maxValue) {
let r = await new Roll(`${dice}`).evaluate()
d20result = r.dice[0].results[0].result
diceResults.push( {dice: `${dice}-1`, value: d20result-1})
d20sum += (d20result - 1)
if (options.rollType === "challenge" || options.rollType === "save") {
let diceResult = rollBase.dice[0].results[0].result
diceResults.push({ dice: `${dice}`, value: diceResult})
let diceSum = diceResult
while (diceResult === maxValue) {
let r = await new Roll(baseFormula).evaluate()
diceResult = r.dice[0].results[0].result
diceResults.push( {dice: `${dice}-1`, value: diceResult-1})
diceSum += (diceResult - 1)
}
if (hasModifier) {
let minus1 = (fullModifier === 0) ? 0 : 1
diceResults.push({ dice: `${roll.dice[1].formula}-${minus1}`, value: roll.dice[1].results[0].result - minus1 })
rollTotal = Math.max(d20sum + roll.dice[1].results[0].result - minus1, 0)
if (fullModifier !== 0) {
diceResults.push({ dice: `${rollModifier.formula}`, value: rollModifier.total })
if ( fullModifier < 0) {
rollTotal = Math.max(diceSum - rollModifier.total, 0)
} else {
rollTotal = diceSum + rollModifier.total
}
} else {
rollTotal = d20sum
rollTotal = diceSum
}
} else if (options.rollType === ROLL_TYPE.RESOURCE) {
//resultType = roll.total === 1 || roll.total === 2 ? "failure" : "success"
}
roll.options.resultType = resultType
roll.options.introText = roll._createIntroText()
roll.options.introTextTooltip = roll._createIntroTextTooltip()
roll.options.rollTotal = rollTotal
roll.options.diceResults = diceResults
roll.options.rollTarget = options.rollTarget
rollBase.options.resultType = resultType
rollBase.options.introText = rollBase._createIntroText()
rollBase.options.introTextTooltip = rollBase._createIntroTextTooltip()
rollBase.options.rollTotal = rollTotal
rollBase.options.diceResults = diceResults
rollBase.options.rollTarget = options.rollTarget
rollBase.options.titleFormula = titleFormula
/**
* 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.
* @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) {
switch (type) {
case "challenge":
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleSave")} : ${game.i18n.localize(`LETHALFANTASY.Manager.${target}`)}`
case ROLL_TYPE.RESOURCE:
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleResource")} : ${game.i18n.localize(`LETHALFANTASY.Manager.${target}`)}`
return `${game.i18n.localize("LETHALFANTASY.Label.titleChallenge")}`
case "save":
return `${game.i18n.localize("LETHALFANTASY.Label.titleSave")}`
case ROLL_TYPE.DAMAGE:
return `${game.i18n.localize("LETHALFANTASY.Dialog.titleDamage")} : ${target}`
case ROLL_TYPE.ATTACK:
@@ -395,11 +392,10 @@ export default class LethalFantasyRoll extends Roll {
diceTotal: this.dice.reduce((t, d) => t + d.total, 0),
isGM: game.user.isGM,
formula: this.formula,
titleFormula: this.titleFormula,
rollType: this.type,
rollTarget: this.rollTarget,
total: this.rollTotal,
isSave: this.isSave,
isChallenge: this.isChallenge,
isFailure: this.isFailure,
actorId: this.actorId,
diceResults: this.diceResults,

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.

Binary file not shown.

BIN
packs/lf-gifts/MANIFEST-000042 LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
packs/lf-skills/MANIFEST-000046 LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -201,19 +201,20 @@
.character-save {
display: flex;
align-items: center;
margin-right: 1rem;
margin-right: 0.2rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.name {
flex: 1;
min-width: 3rem;
margin-left: 0.5rem;
flex: 0;
min-width: 5rem;
max-width: 5rem;
margin-left: 0.7rem;
}
.form-group {
flex: 1;
flex: 0;
padding-left: 5px;
.form-fields {
flex: none;

View File

@@ -19,21 +19,27 @@
</div>
<div class="flexrow character-hp">
<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>
{{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 class="flexrow character-hp">
<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>
{{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 class="flexrow character-hp">
<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>
{{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>
</fieldset>
@@ -51,26 +57,53 @@
<legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend>
<div class="character-saves">
<div class="character-save">
<span class="name">{{localize "LETHALFANTASY.Label.saves.will"}}</span>
{{formField systemFields.saves.fields.will.fields.value value=system.saves.will.value disabled=isPlayMode
classes="rollable" data-save-id="will" }}
<span class="name">{{localize "LETHALFANTASY.Label.saves.dodge"}}</span>
{{formField systemFields.saves.fields.dodge.fields.value value=system.saves.dodge.value disabled=isPlayMode
classes="rollable" data-save-id="dodge" }}
<span class="name">{{localize "LETHALFANTASY.Label.saves.toughness"}}</span>
<span class="name"><a class="rollable" data-roll-type="save" data-roll-key="will"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.will"}}
</a></span>
{{formField systemFields.saves.fields.will.fields.value value=system.saves.will.value
disabled=isPlayMode}}
<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
disabled=isPlayMode classes="rollable" data-save-id="toughness" }}
disabled=isPlayMode}}
</div>
<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
disabled=isPlayMode classes="rollable" data-save-id="contagion" }}
<span class="name">{{localize "LETHALFANTASY.Label.saves.poison"}}</span>
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value
disabled=isPlayMode classes="rollable" data-save-id="poison" }}
<span class="name">{{localize "LETHALFANTASY.Label.saves.pain"}}</span>
{{formField systemFields.saves.fields.pain.fields.value value=system.saves.pain.value disabled=isPlayMode
classes="rollable" data-save-id="pain" }}
disabled=isPlayMode }}
<span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="poison"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.poison"}}
</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>
</fieldset>
@@ -79,15 +112,23 @@
<legend>{{localize "LETHALFANTASY.Label.Challenges"}}</legend>
<div class="character-challenges">
<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>
{{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="str"><i
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>
{{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>
<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>
{{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
disabled=isPlayMode }}
disabled=isPlayMode }}
</div>
</div>
</fieldset>
@@ -114,14 +155,14 @@
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.str"}}
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
disabled=isPlayMode classes="rollable" data-char-id="str" }}
{{formField systemFields.characteristics.fields.str.fields.percent value=system.characteristics.str.percent
disabled=isPlayMode type="number"}}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.int"}}
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
disabled=isPlayMode classes="rollable" data-char-id="int" }}
@@ -129,7 +170,7 @@
{{formField systemFields.characteristics.fields.int.fields.percent value=system.characteristics.int.percent
disabled=isPlayMode type="number" }}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.wis"}}
{{formField systemFields.characteristics.fields.wis.fields.value value=system.characteristics.wis.value
disabled=isPlayMode classes="rollable" data-char-id="wis" }}
@@ -137,7 +178,7 @@
{{formField systemFields.characteristics.fields.wis.fields.percent value=system.characteristics.wis.percent
disabled=isPlayMode type="number"}}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.dex"}}
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
disabled=isPlayMode classes="rollable" data-char-id="wis" }}
@@ -145,7 +186,7 @@
{{formField systemFields.characteristics.fields.dex.fields.percent value=system.characteristics.dex.percent
disabled=isPlayMode type="number" }}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.con"}}
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
disabled=isPlayMode classes="rollable" data-char-id="con" }}
@@ -153,7 +194,7 @@
{{formField systemFields.characteristics.fields.con.fields.percent value=system.characteristics.con.percent
disabled=isPlayMode type="number"}}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.cha"}}
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
disabled=isPlayMode classes="rollable" data-char-id="cha" }}
@@ -161,7 +202,7 @@
{{formField systemFields.characteristics.fields.cha.fields.percent value=system.characteristics.cha.percent
disabled=isPlayMode type="number"}}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.luc"}}
{{formField systemFields.characteristics.fields.luc.fields.value value=system.characteristics.luc.value
disabled=isPlayMode classes="rollable" data-char-id="luc" }}
@@ -169,7 +210,7 @@
{{formField systemFields.characteristics.fields.luc.fields.percent value=system.characteristics.luc.percent
disabled=isPlayMode type="number"}}
</div>
<div class="character-characteristic" >
<div class="character-characteristic">
{{localize "LETHALFANTASY.Label.app"}}
{{formField systemFields.characteristics.fields.app.fields.value value=system.characteristics.app.value
disabled=isPlayMode classes="rollable" data-char-id="app" }}

View File

@@ -8,6 +8,7 @@
<div class="intro-right">
<span>{{upperFirst rollType}} : {{upperCase rollTarget.rollKey}}</span>
<span>Formula : {{titleFormula}}</span>
{{#each diceResults as |result|}}
<span>{{result.dice}} : {{result.value}}</span>
{{/each}}
@@ -41,8 +42,6 @@
{{#unless isPrivate}}
<div class="dice-result">
<h4 class="dice-total">{{total}}</h4>
<div class="dice-formula">{{formula}}</div>
{{{tooltip}}}
</div>
{{/unless}}
</div>

View File

@@ -1,19 +1,22 @@
{{log "roll-dialog" this}}
<div class="lethalfantasy-roll-dialog">
{{#if isChallenge}}
<fieldSet>
<fieldSet>
{{#if (eq rollType "challenge")}}
<legend>{{localize "LETHALFANTASY.Label.challenge"}}</legend>
{{#if hasModifier}}
<div class="dialog-save">{{upperCase rollTarget.rollKey}} : {{formula}} + {{baseValue}}</div>
{{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}}
</fieldSet>
{{#if hasModifier}}
<fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.modifier"}}</legend>
<legend>{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}</legend>
<select name="modifier" data-tooltip-direction="UP">
{{selectOptions choiceModifier selected=modifier}}
</select>
@@ -29,7 +32,6 @@
</fieldSet>
{{/if}}
{{/if}}
<fieldSet>
<legend>{{localize "LETHALFANTASY.Roll.visibility"}}</legend>
<select name="visibility">