Compare commits
4 Commits
fvtt-malef
...
fvtt-malef
Author | SHA1 | Date | |
---|---|---|---|
8af5851246 | |||
14b536cc52 | |||
9944ebe64d | |||
165c836f39 |
@ -372,7 +372,7 @@ export class MaleficesActor extends Actor {
|
|||||||
arme = duplicate(arme)
|
arme = duplicate(arme)
|
||||||
let rollData = this.getCommonRollData()
|
let rollData = this.getCommonRollData()
|
||||||
if (arme.system.armetype == "mainsnues" || arme.system.armetype == "epee") {
|
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 {
|
} else {
|
||||||
rollData.attr = duplicate(this.system.attributs.habilite)
|
rollData.attr = duplicate(this.system.attributs.habilite)
|
||||||
}
|
}
|
||||||
|
@ -138,6 +138,7 @@ export class MaleficesCommands {
|
|||||||
selectedCard.system.ispositif = (Math.random() > 0.5)
|
selectedCard.system.ispositif = (Math.random() > 0.5)
|
||||||
}
|
}
|
||||||
selectedCard.system.isgm = false
|
selectedCard.system.isgm = false
|
||||||
|
selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown
|
||||||
MaleficesUtility.createChatMessage(game.user.name, "", {
|
MaleficesUtility.createChatMessage(game.user.name, "", {
|
||||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
|
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
|
||||||
})
|
})
|
||||||
|
@ -64,6 +64,8 @@ Hooks.once("init", async function () {
|
|||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
|
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>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>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>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')
|
registerUsageCount('fvtt-malefices')
|
||||||
welcomeMessage();
|
welcomeMessage();
|
||||||
MaleficesUtility.ready()
|
MaleficesUtility.ready()
|
||||||
|
@ -5,18 +5,18 @@ import { MaleficesCommands } from "./malefices-commands.js";
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class MaleficesUtility {
|
export class MaleficesUtility {
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async ready() {
|
static async init() {
|
||||||
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
|
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
|
||||||
/*Hooks.on("dropCanvasData", (canvas, data) => {
|
|
||||||
MaleficesUtility.dropItemOnToken(canvas, data)
|
|
||||||
});*/
|
|
||||||
|
|
||||||
this.rollDataStore = {}
|
this.rollDataStore = {}
|
||||||
this.defenderStore = {}
|
this.defenderStore = {}
|
||||||
|
|
||||||
MaleficesCommands.init();
|
MaleficesCommands.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static async ready() {
|
||||||
|
|
||||||
Handlebars.registerHelper('count', function (list) {
|
Handlebars.registerHelper('count', function (list) {
|
||||||
return list.length;
|
return list.length;
|
||||||
@ -404,7 +404,7 @@ export class MaleficesUtility {
|
|||||||
console.log("Roll formula", diceFormula)
|
console.log("Roll formula", diceFormula)
|
||||||
let myRoll = new Roll(diceFormula).roll({ async: false })
|
let myRoll = new Roll(diceFormula).roll({ async: false })
|
||||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||||
rollData.roll = myRoll
|
rollData.roll = duplicate(myRoll)
|
||||||
rollData.total = myRoll.total
|
rollData.total = myRoll.total
|
||||||
|
|
||||||
this.computeResults(rollData)
|
this.computeResults(rollData)
|
||||||
|
@ -235,6 +235,11 @@ table {border: 1px solid #7a7971;}
|
|||||||
object-position: 50% 0;
|
object-position: 50% 0;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
}
|
}
|
||||||
|
.profile-img-container {
|
||||||
|
margin-right: 0.2rem;
|
||||||
|
max-width: 140px;
|
||||||
|
width: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
.button-img {
|
.button-img {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
@ -954,8 +959,6 @@ ul, li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#sidebar #sidebar-tabs i{
|
#sidebar #sidebar-tabs i{
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-position:center;
|
background-position:center;
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "11",
|
||||||
"maximum": "10"
|
"maximum": "11"
|
||||||
},
|
},
|
||||||
"id": "fvtt-malefices",
|
"id": "fvtt-malefices",
|
||||||
"primaryTokenAttribute": "secondary.health",
|
"primaryTokenAttribute": "secondary.health",
|
||||||
@ -73,7 +73,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Maléfices, le Jeu de Rôle",
|
"title": "Maléfices, le Jeu de Rôle",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
||||||
"version": "10.1.1",
|
"version": "11.0.0",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.1.1.zip",
|
"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"
|
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
|
||||||
}
|
}
|
@ -132,7 +132,7 @@
|
|||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"arme": {
|
"arme": {
|
||||||
"armetype": 0,
|
"armetype": "",
|
||||||
"porteecourte": "",
|
"porteecourte": "",
|
||||||
"porteemoyenne": "",
|
"porteemoyenne": "",
|
||||||
"dommagenormale": 0,
|
"dommagenormale": 0,
|
||||||
|
@ -4,7 +4,11 @@
|
|||||||
<header class="sheet-header">
|
<header class="sheet-header">
|
||||||
<div class="header-fields">
|
<div class="header-fields">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
|
|
||||||
|
<div class="profile-img-container">
|
||||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
<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>
|
<label class="item-field-label-medium">Sens</label>
|
||||||
</span>
|
</span>
|
||||||
<div class="item-controls item-controls-fixed">
|
<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>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{#each tarots as |tarot key|}}
|
{{#each tarots as |tarot key|}}
|
||||||
@ -364,7 +368,7 @@
|
|||||||
<label class="item-field-label-medium">Sens</label>
|
<label class="item-field-label-medium">Sens</label>
|
||||||
</span>
|
</span>
|
||||||
<div class="item-controls item-controls-fixed">
|
<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>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{#each tarotsCache as |tarot key|}}
|
{{#each tarotsCache as |tarot key|}}
|
||||||
|
@ -33,25 +33,25 @@
|
|||||||
<li><label class="chat-result-text chat-result-success ">Réussite Critique !</label></li>
|
<li><label class="chat-result-text chat-result-success ">Réussite Critique !</label></li>
|
||||||
{{#if arme}}
|
{{#if arme}}
|
||||||
{{#if arme.system.dommagecritiquemort}}
|
{{#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}}
|
{{else}}
|
||||||
{{#if arme.system.dommagecritiqueko}}
|
{{#if arme.system.dommagecritiqueko}}
|
||||||
<li><label class="chat-result-text chat-result-success ">La victime est KO !</label></li>
|
<li><label class="chat-result-text chat-result-success ">La victime est KO !</label></li>
|
||||||
{{/if}}
|
{{/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}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if isPart}}
|
{{#if isPart}}
|
||||||
<li><label class="chat-result-text chat-result-success ">Réussite Particulière !</label></li>
|
<li><label class="chat-result-text chat-result-success ">Réussite Particulière !</label></li>
|
||||||
{{#if arme}}
|
{{#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}}
|
{{/if}}
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<li><label class="chat-result-text chat-result-success ">Succés !</label></li>
|
<li><label class="chat-result-text chat-result-success ">Succés !</label></li>
|
||||||
{{#if arme}}
|
{{#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}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Reference in New Issue
Block a user