Compare commits

..

5 Commits

Author SHA1 Message Date
2c92dd6ef9 Fix notes + CSS 2023-10-25 00:00:30 +02:00
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
35 changed files with 111 additions and 94 deletions

View File

@ -12,7 +12,7 @@ export class MaleficesActorSheet extends ActorSheet {
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return mergeObject(super.defaultOptions, {
classes: ["fvtt-malefices", "sheet", "actor"], classes: ["fvtt-malefices", "sheet", "actor", "malefices-actor-sheet"],
template: "systems/fvtt-malefices/templates/actors/actor-sheet.hbs", template: "systems/fvtt-malefices/templates/actors/actor-sheet.hbs",
width: 640, width: 640,
height:680, height:680,
@ -44,8 +44,8 @@ export class MaleficesActorSheet extends ActorSheet {
phyMalus: this.actor.getPhysiqueMalus(), phyMalus: this.actor.getPhysiqueMalus(),
elementsbio: this.actor.getElementsBio(), elementsbio: this.actor.getElementsBio(),
sorts: this.actor.getSorts(), sorts: this.actor.getSorts(),
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }), description: await TextEditor.enrichHTML(this.object.system.biodata.description, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }), notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, { async: true }),
equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }), equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }),
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,
@ -54,7 +54,7 @@ export class MaleficesActorSheet extends ActorSheet {
} }
this.formData = formData; this.formData = formData;
console.log("PC : ", formData, this.object); console.log("PC : ", formData, this.object );
return formData; return formData;
} }

View File

@ -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)
} }

View File

@ -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)
}) })

View File

@ -19,20 +19,6 @@ export class MaleficesItemSheet extends ItemSheet {
}); });
} }
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
// Add "Post to chat" button
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
buttons.unshift(
{
class: "post",
icon: "fas fa-comment",
onclick: ev => { }
})
return buttons
}
/* -------------------------------------------- */ /* -------------------------------------------- */
/** @override */ /** @override */
setPosition(options = {}) { setPosition(options = {}) {

View File

@ -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()

View File

@ -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)

View File

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000002

View File

View File

@ -0,0 +1,5 @@
2023/10/24-22:56:59.069067 7f688bfff6c0 Delete type=3 #1
2023/10/24-23:14:50.933686 7f660b7ef6c0 Level-0 table #5: started
2023/10/24-23:14:50.938288 7f660b7ef6c0 Level-0 table #5: 49972 bytes OK
2023/10/24-23:14:50.946150 7f660b7ef6c0 Delete type=0 #3
2023/10/24-23:14:50.965618 7f660b7ef6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000002

View File

View File

@ -0,0 +1,5 @@
2023/10/24-22:56:59.028963 7f68a0df86c0 Delete type=3 #1
2023/10/24-23:14:50.922783 7f660b7ef6c0 Level-0 table #5: started
2023/10/24-23:14:50.926620 7f660b7ef6c0 Level-0 table #5: 1991 bytes OK
2023/10/24-23:14:50.933356 7f660b7ef6c0 Delete type=0 #3
2023/10/24-23:14:50.957490 7f660b7ef6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000002

View File

View File

@ -0,0 +1,5 @@
2023/10/24-22:56:59.116622 7f68a0df86c0 Delete type=3 #1
2023/10/24-23:14:50.946390 7f660b7ef6c0 Level-0 table #5: started
2023/10/24-23:14:50.949887 7f660b7ef6c0 Level-0 table #5: 803 bytes OK
2023/10/24-23:14:50.956586 7f660b7ef6c0 Delete type=0 #3
2023/10/24-23:14:50.965669 7f660b7ef6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000002

View File

View File

@ -0,0 +1,5 @@
2023/10/24-22:56:58.978401 7f688bfff6c0 Delete type=3 #1
2023/10/24-23:14:50.900132 7f660b7ef6c0 Level-0 table #5: started
2023/10/24-23:14:50.904356 7f660b7ef6c0 Level-0 table #5: 3817 bytes OK
2023/10/24-23:14:50.911636 7f660b7ef6c0 Delete type=0 #3
2023/10/24-23:14:50.922754 7f660b7ef6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

@ -1,11 +1,11 @@
/* ==================== (A) Fonts ==================== */ /* ==================== (A) Fonts ==================== */
@font-face { @font-face {
font-family: "Rivanna"; font-family: "Rivanna";
src: url('../fonts/rivanna.ttf') format("truetype"); src: url('../fonts/rivanna.ttf') format("truetype");
} }
:root { :root {
/* =================== 1. ACTOR SHEET FONT STYLES =========== */ /* =================== 1. ACTOR SHEET FONT STYLES =========== */
--window-header-title-font-size: 1.3rem; --window-header-title-font-size: 1.3rem;
--window-header-title-font-weight: normal; --window-header-title-font-weight: normal;
--window-header-title-color: #f5f5f5; --window-header-title-color: #f5f5f5;
@ -27,7 +27,7 @@
--actor-label-font-weight: 700; --actor-label-font-weight: 700;
--actor-label-color: #464331c4; --actor-label-color: #464331c4;
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */ /* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
--debug-background-color-red: #ff000054; --debug-background-color-red: #ff000054;
--debug-background-color-blue: #1d00ff54; --debug-background-color-blue: #1d00ff54;
--debug-background-color-green: #54ff0054; --debug-background-color-green: #54ff0054;
@ -35,29 +35,29 @@
--debug-box-shadow-red: inset 0 0 2px red; --debug-box-shadow-red: inset 0 0 2px red;
--debug-box-shadow-blue: inset 0 0 2px blue; --debug-box-shadow-blue: inset 0 0 2px blue;
--debug-box-shadow-green: inset 0 0 2px green; --debug-box-shadow-green: inset 0 0 2px green;
} }
/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/ /*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
/* Global styles & Font */ /* Global styles & Font */
.window-app { .fvtt-malefices .window-app {
text-align: justify; text-align: justify;
font-size: 16px; font-size: 16px;
letter-spacing: 1px; letter-spacing: 1px;
} }
/* Fonts */ /* Fonts */
.sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item { .sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item {
font-size: 1.0rem; font-size: 1.0rem;
} /* For title, sidebar character and scene */ } /* For title, sidebar character and scene */
.sheet nav.sheet-tabs { .fvtt-malefices .sheet nav.sheet-tabs {
font-size: 0.8rem; font-size: 0.8rem;
} /* For nav and title */ } /* For nav and title */
.window-app input, .fvtt-malefices .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { .window-app input, .fvtt-malefices .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
font-size: 0.8rem; font-size: 0.8rem;
} }
.window-header{ .window-header{
background: rgba(0,0,0,0.75); background: rgba(0,0,0,0.75);
} }
.window-app.sheet .window-content { .window-app.sheet .window-content {
@ -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;
@ -396,7 +401,7 @@ li.folder > .folder-header h3 {
/* ======================================== */ /* ======================================== */
/* Sheet */ /* Sheet */
.window-app.sheet .window-content .sheet-header{ .fvtt-malefices .window-app.sheet .window-content .sheet-header{
color: rgba(19, 18, 18, 0.95); color: rgba(19, 18, 18, 0.95);
background: url("../images/ui/background_01_clear.webp"); background: url("../images/ui/background_01_clear.webp");
/*background: #494e6b;*/ /*background: #494e6b;*/
@ -442,7 +447,7 @@ select {
margin-left: 2px; margin-left: 2px;
} }
.window-app .window-content, .window-app.sheet .window-content .sheet-body{ .fvtt-malefices .window-app .window-content, .fvtt-malefices .window-app.sheet .window-content .sheet-body{
font-size: 0.8rem; font-size: 0.8rem;
/*background: url("../images/ui/pc_sheet_bg.webp") repeat left top;*/ /*background: url("../images/ui/pc_sheet_bg.webp") repeat left top;*/
background: url("../images/ui/background_01_clear.webp"); background: url("../images/ui/background_01_clear.webp");
@ -460,7 +465,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
padding: 0; padding: 0;
} }
.sheet nav.sheet-tabs { .malefices-actor-sheet nav.sheet-tabs {
font-size: 1.2rem; font-size: 1.2rem;
font-weight: bold; font-weight: bold;
height: 3rem; height: 3rem;
@ -490,7 +495,7 @@ nav.sheet-tabs .item:after {
right: 0; right: 0;
height: 2rem; height: 2rem;
width: 1px; width: 1px;
border-right: 1px dashed rgba(52, 52, 52, 0.25); /*border-right: 1px dashed rgba(52, 52, 52, 0.25);*/
} }
.sheet .tab[data-tab] { .sheet .tab[data-tab] {
@ -798,6 +803,9 @@ ul, li {
color: rgba(19, 18, 18, 0.95); color: rgba(19, 18, 18, 0.95);
} }
#sidebar .scene {
color: rgba(237, 240, 199, 0.95);
}
/* background: rgb(105,85,65) url("../images/ui/texture_feuille_perso_onglets.webp") no-repeat right bottom;*/ /* background: rgb(105,85,65) url("../images/ui/texture_feuille_perso_onglets.webp") no-repeat right bottom;*/
#sidebar.collapsed { #sidebar.collapsed {
@ -954,8 +962,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;

View File

@ -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.1",
"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.1.zip",
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp" "background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
} }

View File

@ -25,6 +25,7 @@
"religion": "", "religion": "",
"fantastique": "", "fantastique": "",
"description": "", "description": "",
"notes": "",
"gmnotes": "" "gmnotes": ""
} }
}, },
@ -132,7 +133,7 @@
"description": "" "description": ""
}, },
"arme": { "arme": {
"armetype": 0, "armetype": "",
"porteecourte": "", "porteecourte": "",
"porteemoyenne": "", "porteemoyenne": "",
"dommagenormale": 0, "dommagenormale": 0,

View File

@ -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|}}
@ -392,8 +396,7 @@
<h3><label class="items-title-text">Background</label></h3> <h3><label class="items-title-text">Background</label></h3>
</span> </span>
<div class="form-group editor"> <div class="form-group editor">
{{editor description target="system.biodata.description" button=true owner=owner {{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
editable=editable}}
</div> </div>
<hr> <hr>
<span class="item-name-label-header items-title-bg"> <span class="item-name-label-header items-title-bg">

View File

@ -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}}