Compare commits

...

4 Commits

Author SHA1 Message Date
8af5851246 v10/v11 compatibility 2023-05-25 08:04:31 +02:00
14b536cc52 Fix sur ajout tarots 2023-05-08 23:24:05 +02:00
9944ebe64d Fix sur armes et affichage 2023-03-08 20:24:19 +01:00
165c836f39 Fix sur tarots et message 2023-02-28 13:06:46 +01:00
9 changed files with 32 additions and 28 deletions

View File

@ -372,7 +372,7 @@ export class MaleficesActor extends Actor {
arme = duplicate(arme)
let rollData = this.getCommonRollData()
if (arme.system.armetype == "mainsnues" || arme.system.armetype == "epee") {
rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor( (this.getPhysiqueMalus()+this.system.attributs.physique+this.system.attributs.habilite) / 2) }
rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor( (this.getPhysiqueMalus()+this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) }
} else {
rollData.attr = duplicate(this.system.attributs.habilite)
}

View File

@ -138,6 +138,7 @@ export class MaleficesCommands {
selectedCard.system.ispositif = (Math.random() > 0.5)
}
selectedCard.system.isgm = false
selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown
MaleficesUtility.createChatMessage(game.user.name, "", {
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
})

View File

@ -64,6 +64,8 @@ Hooks.once("init", async function () {
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
MaleficesUtility.init()
});
/* -------------------------------------------- */
@ -77,7 +79,7 @@ function welcomeMessage() {
<p>Le Livre de Base de Maléfices v4 est nécessaire pour jouer : https://arkhane-asylum.fr/en/malefices/</p>
<p>Maléfices et un jeu de rôle publié par Arkhane Asylum Publishing, tout les droits leur appartiennent.</p>
<p>Système développé par LeRatierBretonnien avec l'aide de la Dame du Lac et Malik, support sur le <a href="https://discord.gg/pPSDNJk">Discord FR de Foundry</a>.</p>
<p>Commandes : /tirage pour le tirage des tarots, /tirer pour tirer une simple carte et /resume pour le résumé des PJs (MJ seulement)` });
<p>Commandes : /tirage pour le tirage des tarots, /carte pour tirer une simple carte et /resume pour le résumé des PJs (MJ seulement)` });
}
}
/* -------------------------------------------- */
@ -120,12 +122,6 @@ Hooks.once("ready", function () {
});
}
// CSS patch for v9
if (game.version) {
let sidebar = document.getElementById("sidebar");
sidebar.style.width = "min-content";
}
registerUsageCount('fvtt-malefices')
welcomeMessage();
MaleficesUtility.ready()

View File

@ -5,18 +5,18 @@ import { MaleficesCommands } from "./malefices-commands.js";
/* -------------------------------------------- */
export class MaleficesUtility {
/* -------------------------------------------- */
static async ready() {
static async init() {
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
/*Hooks.on("dropCanvasData", (canvas, data) => {
MaleficesUtility.dropItemOnToken(canvas, data)
});*/
this.rollDataStore = {}
this.defenderStore = {}
MaleficesCommands.init();
}
/* -------------------------------------------- */
static async ready() {
Handlebars.registerHelper('count', function (list) {
return list.length;
@ -404,7 +404,7 @@ export class MaleficesUtility {
console.log("Roll formula", diceFormula)
let myRoll = new Roll(diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = myRoll
rollData.roll = duplicate(myRoll)
rollData.total = myRoll.total
this.computeResults(rollData)

View File

@ -235,6 +235,11 @@ table {border: 1px solid #7a7971;}
object-position: 50% 0;
border-width: 0px;
}
.profile-img-container {
margin-right: 0.2rem;
max-width: 140px;
width: 140px;
}
.button-img {
vertical-align: baseline;
@ -954,8 +959,6 @@ ul, li {
}
#sidebar #sidebar-tabs i{
width: 25px;
height: 25px;
display: inline-block;
background-position:center;
background-size:cover;

View File

@ -61,8 +61,8 @@
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
"compatibility": {
"minimum": "10",
"verified": "10",
"maximum": "10"
"verified": "11",
"maximum": "11"
},
"id": "fvtt-malefices",
"primaryTokenAttribute": "secondary.health",
@ -73,7 +73,7 @@
],
"title": "Maléfices, le Jeu de Rôle",
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
"version": "10.1.1",
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.1.1.zip",
"version": "11.0.0",
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v11.0.0.zip",
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
}

View File

@ -132,7 +132,7 @@
"description": ""
},
"arme": {
"armetype": 0,
"armetype": "",
"porteecourte": "",
"porteemoyenne": "",
"dommagenormale": 0,

View File

@ -4,7 +4,11 @@
<header class="sheet-header">
<div class="header-fields">
<div class="flexrow">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="profile-img-container">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
</div>
<div class="flexcol">
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
@ -335,7 +339,7 @@
<label class="item-field-label-medium">Sens</label>
</span>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
<a class="item-control item-add" data-type="tarot" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each tarots as |tarot key|}}
@ -364,7 +368,7 @@
<label class="item-field-label-medium">Sens</label>
</span>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
<a class="item-control item-add" data-type="tarot" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each tarotsCache as |tarot key|}}

View File

@ -33,25 +33,25 @@
<li><label class="chat-result-text chat-result-success ">Réussite Critique !</label></li>
{{#if arme}}
{{#if arme.system.dommagecritiquemort}}
<li><label class="chat-result-text chat-result-success">La victime est morte !</label></li>
<li><label class="chat-result-success">La victime est morte !</label></li>
{{else}}
{{#if arme.system.dommagecritiqueko}}
<li><label class="chat-result-text chat-result-success ">La victime est KO !</label></li>
{{/if}}
<li><label class="chat-result-text chat-result-success ">La victime subit {{arme.system.dommagecritique}} dommages</label></li>
<li><label class="chat-result-success ">La victime subit {{arme.system.dommagecritique}} dommages</label></li>
{{/if}}
{{/if}}
{{else}}
{{#if isPart}}
<li><label class="chat-result-text chat-result-success ">Réussite Particulière !</label></li>
{{#if arme}}
<li><label class="chat-result-text chat-result-success ">La victime subit {{arme.system.dommagepart}} dommages</label></li>
<li><label class="chat-result-success ">La victime subit {{arme.system.dommagepart}} dommages</label></li>
{{/if}}
{{else}}
<li><label class="chat-result-text chat-result-success ">Succés !</label></li>
{{#if arme}}
<li><label class="chat-result-text chat-result-success ">La victime subit {{arme.system.dommagenormale}} dommages</label></li>
<li><label class="chat-result-success ">La victime subit {{arme.system.dommagenormale}} dommages</label></li>
{{/if}}
{{/if}}
{{/if}}