Compare commits

...

2 Commits

Author SHA1 Message Date
da6d6584c4 Minor fixes 2022-09-28 20:36:54 +02:00
f08ec8eaff Enable links in editor 2022-09-27 21:27:38 +02:00
8 changed files with 23 additions and 8 deletions

View File

@@ -53,6 +53,7 @@ export class MournbladeActorSheet extends ActorSheet {
metier: duplicate(this.actor.getMetier() || {}),
combat: this.actor.getCombatValues(),
equipements: duplicate(this.actor.getEquipments()),
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,

View File

@@ -412,6 +412,11 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */
async rollRune(runeId) {
let comp = this.items.find(comp => comp.type == "competence" && comp.name.toLowerCase() == "savoir : runes")
if ( !comp) {
ui.notifications.warn("La compétence Savoirs : Runes n'a pas été trouvée, abandon.")
return
}
let rollData = this.getCommonRollData("cla", undefined, "Savoir : Runes")
rollData.rune = duplicate(this.items.get(runeId) || {})
rollData.difficulte = rollData.rune?.system?.seuil || 0

View File

@@ -63,10 +63,14 @@ export class MournbladeItemSheet extends ItemSheet {
limited: this.object.limited,
options: this.options,
owner: this.document.isOwner,
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
mr: (this.object.type == 'specialisation'),
isGM: game.user.isGM
}
if ( objectData.type =="don") {
sacrifice = await TextEditor.enrichHTML(this.object.system.sacrifice, {async: true})
}
//this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;

View File

@@ -281,10 +281,11 @@ export class MournbladeUtility {
}
}
//console.log("Result : ", rollData)
if (rollData.difficulte > 0 && !rollData.isDramatique) {
rollData.isSuccess = (rollData.roll.finalResult >= rollData.difficulte)
rollData.isHeroique = ((rollData.roll.finalResult - rollData.difficulte) >= 10)
rollData.isDramatique = ((rollData.roll.finalResult - rollData.difficulte) <= -10)
rollData.isSuccess = (rollData.finalResult >= rollData.difficulte)
rollData.isHeroique = ((rollData.finalResult - rollData.difficulte) >= 10)
rollData.isDramatique = ((rollData.finalResult - rollData.difficulte) <= -10)
}
}
@@ -307,6 +308,7 @@ export class MournbladeUtility {
actor.changeEclat(-1)
}
}
//console.log("BEFORE COMP", rollData)
if (rollData.competence) {
rollData.predilections = duplicate( rollData.competence.system.predilections.filter( pred => !pred.used) || [] )
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
@@ -324,6 +326,9 @@ export class MournbladeUtility {
if ( rollData.runemode == "inscrire") {
rollData.runeduree *= 2
}
if ( rollData.runemode == "prononcer") {
rollData.runeduree = 1
}
}
let myRoll = new Roll(rollData.diceFormula).roll({ async: false })

View File

@@ -1,7 +1,7 @@
{
"id": "fvtt-mournblade",
"description": "Mournblade RPG for FoundryVTT",
"version": "10.0.5",
"version": "10.0.7",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@@ -15,7 +15,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.5.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.7.zip",
"packs": [
{
"type": "Item",

View File

@@ -532,7 +532,7 @@
<h3>Description</h3>
</span>
<div class="medium-editor item-text-long-line">
{{editor data.biodata.description target="system.biodata.description" button=true owner=owner editable=editable}}
{{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
</div>
</div>

View File

@@ -32,7 +32,7 @@
</span>
<div class="small-editor item-text-long-line">
{{editor data.sacrifice target="system.sacrifice" button=true owner=owner editable=editable}}
{{editor sacrifice target="system.sacrifice" button=true owner=owner editable=editable}}
</div>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@@ -2,5 +2,5 @@
<h3>Description</h3>
</span>
<div class="medium-editor item-text-long-line">
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>