Fix dice default

This commit is contained in:
LeRatierBretonnien 2023-03-29 23:04:02 +02:00
parent 75d562f922
commit e7f3851daa
4 changed files with 13 additions and 16 deletions

View File

@ -677,10 +677,10 @@ export class BoLDefaultRoll {
async sendChatMessage() {
let actor = BoLUtility.getActorFromRollData(this.rollData)
this._buildChatMessage(this.rollData).then(async msgFlavor => {
//console.log("MSG", msgFlavor )
let msg = await this.rollData.roll.toMessage({
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
//whisper: BoLUtility.getWhisperRecipientsAndGMs(this.rollData.actor.name),
flavor: msgFlavor,
speaker: ChatMessage.getSpeaker({ actor: actor }),
})

View File

@ -31,7 +31,7 @@ export class BoLUtility {
hint: "Sélectionne la formule de dés (par défaut 2d6)",
scope: "world",
config: true,
default: "2d6",
default: "6",
type: String,
choices: { "6": "2d6", "8":"2d8", "10":"2d10", "12":"2d12", "20":"2d20"},
onChange: value => {
@ -149,7 +149,7 @@ export class BoLUtility {
df = "6"
}
return {
diceFormula: this.diceFormula,
diceFormula: df,
successValue : this.successValue,
criticalSuccessValue: this.criticalSuccessValue,
criticalFailureValue: this.criticalFailureValue

View File

@ -14,7 +14,7 @@
],
"url": "https://www.uberwald.me/gitea/public/bol",
"license": "LICENSE.txt",
"version": "10.5.11",
"version": "10.5.12",
"compatibility": {
"minimum": "10",
"verified": "10"
@ -202,7 +202,7 @@
],
"socket": true,
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.5.11.zip",
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.5.12.zip",
"background": "systems/bol/ui/page_accueil.webp",
"gridDistance": 1.5,
"gridUnits": "m",

View File

@ -1,20 +1,20 @@
<div>
{{#if isSuccess}}
{{#if isLegendary}}
<h2 class="success critical"><i class="fas fa-check-double"></i>&nbsp;{{localize "BOL.ui.criticallegend"}}...
<h2 class="success critical"><i class="fas fa-check-double"></i> {{localize "BOL.ui.criticallegend"}}...
{{else}}
{{#if isCritical}}
<h2 class="success critical"><i class="fas fa-check-double"></i>&nbsp;{{localize "BOL.ui.critical"}}...
<h2 class="success critical"><i class="fas fa-check-double"></i> {{localize "BOL.ui.critical"}}...
{{else}}
<h2 class="success"><i class="fas fa-check"></i>&nbsp;{{localize "BOL.ui.success"}}...
<h2 class="success"><i class="fas fa-check"></i> {{localize "BOL.ui.success"}}...
{{/if}}
{{/if}}
{{/if}}
{{#if isFailure}}
{{#if isFumble}}
<h2 class="failure fumble"><i class="fas fa-skull-crossbones"></i>&nbsp;{{localize "BOL.ui.fumble"}}...
<h2 class="failure fumble"><i class="fas fa-skull-crossbones"></i> {{localize "BOL.ui.fumble"}}...
{{else}}
<h2 class="failure"><i class="fas fa-times"></i>&nbsp;{{localize "BOL.ui.failure"}}...
<h2 class="failure"><i class="fas fa-times"></i> {{localize "BOL.ui.failure"}}...
{{/if}}
{{/if}}
<img class="chat-icon" src="{{img}}" alt="{{actor.name}}"/>
@ -52,9 +52,6 @@
{{/if}}
<div id="{{optionsId}}">
{{#if isCritical}}
<div>
{{localize "BOL.chat.criticalinfo"}}
@ -83,14 +80,14 @@
{{/if}}
{{#if reroll}}
<button class="chat-button button hero-reroll bol-margin-tb-2" data-roll-id=="{{rollId}}" data-actor-id="{{actor.id}}">{{localize "BOL.chat.reroll"}}</button>
<button class="chat-button button hero-reroll bol-margin-tb-2" data-actor-id="{{actorId}}">{{localize "BOL.chat.reroll"}}</button>
{{/if}}
{{#if (and isSuccess (not isCritical))}}
<button class="chat-button button transform-heroic-roll bol-margin-tb-2" data-roll-id=="{{rollId}}" data-actor-id="{{actor.id}}">{{localize "BOL.chat.toheroic"}}</button>
<button class="chat-button button transform-heroic-roll bol-margin-tb-2" data-actor-id="{{actorId}}">{{localize "BOL.chat.toheroic"}}</button>
{{/if}}
{{#if isRealCritical}}
<button class="chat-button button transform-legendary-roll bol-margin-tb-2" data-roll-id=="{{rollId}}" data-actor-id="{{actor.id}}">{{localize "BOL.chat.tolegend"}}</button>
<button class="chat-button button transform-legendary-roll bol-margin-tb-2" data-actor-id="{{actorId}}">{{localize "BOL.chat.tolegend"}}</button>
{{/if}}
<br>