Fix sur armes et affichage

This commit is contained in:
LeRatierBretonnien 2023-03-08 20:24:19 +01:00
parent 165c836f39
commit 9944ebe64d
8 changed files with 25 additions and 22 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

@ -64,6 +64,8 @@ Hooks.once("init", async function () {
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
MaleficesUtility.init()
});
/* -------------------------------------------- */
@ -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;

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

@ -72,7 +72,7 @@
],
"title": "Maléfices, le Jeu de Rôle",
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
"version": "10.1.2",
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.1.2.zip",
"version": "10.1.3",
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.1.3.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">
<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>

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