Compare commits

..

6 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
c34bfbf229 Enhance welcome message 2022-09-26 16:39:36 +02:00
e7de42cf16 Mourblade : add initiative 2022-09-26 14:23:37 +02:00
0f2348fec6 Mourblade : add initiative 2022-09-26 14:01:58 +02:00
98ccd8fde1 Mourblade : add initiative 2022-09-26 13:39:19 +02:00
11 changed files with 137 additions and 46 deletions

View File

@@ -1,4 +1,23 @@
# fvtt-mournblade
# Système Foundry pour Mournblade (French RPG, Titam France/Sombres Projets)
FoundryVTT system for Mournblade from Sombres Projets
## EN
Unofficial system for Mournblade (French version from Titam France).
Books are mandatory to play and are available at : http://www.titam-france.fr
## FR
Système non-officiel pour le JDR Mournblade (Titam France).
Ce système a été autorisé par Ludospherik ( http://www.ludospherik.fr/ ), merci à eux !
Les livres du jeu sont nécessaires pour jouer, et sont disponibles ici : http://www.titam-france.fr
# Credits
Mournblade, le jeu de rôle de Sword & Sorcery, is a property of Titam France/Sombres Projets.
# Developmement
LeRatierBretonnien

View File

@@ -44,6 +44,8 @@ export class MournbladeActorSheet extends ActorSheet {
protections: duplicate(this.actor.getArmors()),
dons: duplicate(this.actor.getDons()),
alignement: this.actor.getAlignement(),
aspect: this.actor.getAspect(),
marge: this.actor.getMarge(),
tendances:duplicate(this.actor.getTendances()),
runes:duplicate(this.actor.getRunes()),
origine: duplicate(this.actor.getOrigine() || {}),
@@ -51,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

@@ -145,6 +145,12 @@ export class MournbladeActor extends Actor {
}
/* -------------------------------------------- */
getAspect() {
return (this.system.balance.loi > this.system.balance.chaos) ? this.system.balance.loi : this.system.balance.chaos
}
getMarge() {
return Math.abs( this.system.balance.loi - this.system.balance.chaos)
}
getAlignement() {
return (this.system.balance.loi > this.system.balance.chaos) ? "loyal" : "chaotique"
}
@@ -406,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

@@ -12,7 +12,7 @@ export class MournbladeCombat extends Combat {
let initBonus = c.actor ? c.actor.getInitiativeScore() : 0
let roll = new Roll("1d10 + "+initBonus).roll({ async: false})
await MournbladeUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
console.log("Init bonus", initBonus, roll.total)
//console.log("Init bonus", initBonus, roll.total)
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: roll.total } ]);
}

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

@@ -67,9 +67,37 @@ function welcomeMessage() {
whisper: [game.user.id],
content: `<div id="welcome-message-Mournblade"><span class="rdd-roll-part">
<strong>Bienvenue dans les Jeunes Royaumes de Mournblade !</strong>
<p>Les livres de Mournblade sont nécessaires pour jouer : https://www.titam-france.fr</p>
<p>Mournblade est jeude rôle publié par Titam France/Sombres projets, tout les droits leur appartiennent.<p>
` });
}
/* -------------------------------------------- */
// Register world usage statistics
function registerUsageCount( registerKey ) {
if ( game.user.isGM ) {
game.settings.register(registerKey, "world-key", {
name: "Unique world key",
scope: "world",
config: false,
default: "",
type: String
});
let worldKey = game.settings.get(registerKey, "world-key")
if ( worldKey == undefined || worldKey == "" ) {
worldKey = randomID(32)
game.settings.set(registerKey, "world-key", worldKey )
}
// Simple API counter
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
//$.ajaxSetup({
//headers: { 'Access-Control-Allow-Origin': '*' }
//})
$.ajax(regURL)
}
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
@@ -90,7 +118,7 @@ Hooks.once("ready", function () {
let sidebar = document.getElementById("sidebar");
sidebar.style.width = "min-content";
}
registerUsageCount('fvtt-mournblade')
welcomeMessage();
});

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.2",
"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.2.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.7.zip",
"packs": [
{
"type": "Item",

View File

@@ -8,41 +8,62 @@
<div class="flexcol">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow">
<span class="flexrow">
<h4 class="item-name-label competence-name item-field-label-short">{{upperFirst alignement}}</h4>
<label class="item-name-label competence-name item-field-label-short">Loi</label>
<select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.loi" value="{{data.balance.loi}}" data-dtype="Number">
{{#select data.balance.loi}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
<label class="item-name-label competence-name item-field-label-short">Chaos</label>
<select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number">
{{#select data.balance.chaos}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
</span>
</div>
<div class="flexrow">
<h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Actuelle</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />
</div>
<div class="flexrow">
<h4 class="item-name-label competence-name item-field-label-short">Eclat</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />
<h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
<ul class="item-list alternate-list">
<li class="item flexrow ">
<label class="item-name-label competence-name item-field-label-short"><strong>Loi</strong></label>
<label class="item-name-label competence-name item-field-label-short">Niveau</label><input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.balance.loi" value="{{data.balance.loi}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Points</label>
<select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.pointsloi" value="{{data.balance.pointsloi}}" data-dtype="Number">
{{#select data.balance.pointsloi}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
<label class="item-name-label competence-name item-field-label-medium">Aspect {{aspect}}</label>
</li>
<li class="item flexrow ">
<label class="item-name-label competence-name item-field-label-short"><strong>Chaos</strong></label>
<label class="item-name-label competence-name item-field-label-short">Niveau</label><input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Points</label><select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.pointschaos" value="{{data.balance.pointschaos}}" data-dtype="Number">
{{#select data.balance.pointschaos}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
<label class="item-name-label competence-name item-field-label-medium">Marge {{marge}}</label>
</li>
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Actuelle</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />
</li>
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Alignement {{alignement}}</h4>
<h4 class="item-name-label competence-name item-field-label-short">Eclat</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />
<h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
</li>
</ul>
</div>
</div>
@@ -511,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>