Fix malus

This commit is contained in:
LeRatierBretonnien 2023-04-23 23:13:31 +02:00
parent 2da1f56a91
commit 55a2a8e3c3
3 changed files with 7 additions and 8 deletions

View File

@ -304,12 +304,12 @@ export class HeritiersActor extends Actor {
/* -------------------------------------------- */
getPvMalus() {
if (this.system.pv.value > 0) {
if (this.system.pv.value < this.system.pv.max / 2) {
return { name: "Santé", value: -1 }
}
if (this.system.pv.value < 5) {
return { name: "Santé", value: -2 }
}
if (this.system.pv.value < this.system.pv.max / 2) {
return { name: "Santé", value: -1 }
}
return { name: "Santé", value: 0 }
}
return { name: "Moribond(e)", value: -50 }

View File

@ -1,7 +1,7 @@
{
"id": "fvtt-les-heritiers",
"description": "Les Héritiers pour FoundryVTT",
"version": "10.1.1",
"version": "10.1.2",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@ -19,7 +19,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.1.1.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.1.2.zip",
"languages": [
{
"lang": "fr",
@ -122,7 +122,6 @@
"background": "systems/fvtt-les-heritiers/assets/ui/wallpaper_foundry2.webp",
"compatibility": {
"minimum": "10",
"verified": "10",
"maximum": "10"
"verified": "10"
}
}

View File

@ -47,7 +47,7 @@
<input type="text" class="item-field-label-short" name="system.pv.value" value="{{system.pv.value}}" data-dtype="Number" />
<input type="text" class="item-field-label-short" name="system.pv.max" value="{{system.pv.max}}" data-dtype="Number" />
<label class="item-field-label-short">Malus</label>
<input type="text" class="item-field-label-short" value="{{pvMalus}}" data-dtype="Number" disabled />
<input type="text" class="item-field-label-short" value="{{pvMalus.value}}" data-dtype="Number" disabled />
<span>&nbsp;&nbsp;</span>
<select class="item-field-label-medium" type="text" name="system.statutmasque" value="{{system.statutmasque}}" data-dtype="string">