Mourblade : add initiative

This commit is contained in:
sladecraven 2022-09-26 14:01:58 +02:00
parent 98ccd8fde1
commit 0f2348fec6
4 changed files with 65 additions and 36 deletions

View File

@ -44,6 +44,8 @@ export class MournbladeActorSheet extends ActorSheet {
protections: duplicate(this.actor.getArmors()),
dons: duplicate(this.actor.getDons()),
alignement: this.actor.getAlignement(),
aspect: this.actor.getAspect(),
marge: this.actor.getMarge(),
tendances:duplicate(this.actor.getTendances()),
runes:duplicate(this.actor.getRunes()),
origine: duplicate(this.actor.getOrigine() || {}),

View File

@ -145,6 +145,12 @@ export class MournbladeActor extends Actor {
}
/* -------------------------------------------- */
getAspect() {
return (this.system.balance.loi > this.system.balance.chaos) ? this.system.balance.loi : this.system.balance.chaos
}
getMarge() {
return Math.abs( this.system.balance.loi - this.system.balance.chaos)
}
getAlignement() {
return (this.system.balance.loi > this.system.balance.chaos) ? "loyal" : "chaotique"
}

View File

@ -1,7 +1,7 @@
{
"id": "fvtt-mournblade",
"description": "Mournblade RPG for FoundryVTT",
"version": "10.0.2",
"version": "10.0.4",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@ -15,7 +15,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.2.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.4.zip",
"packs": [
{
"type": "Item",

View File

@ -8,41 +8,62 @@
<div class="flexcol">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow">
<span class="flexrow">
<h4 class="item-name-label competence-name item-field-label-short">{{upperFirst alignement}}</h4>
<label class="item-name-label competence-name item-field-label-short">Loi</label>
<select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.loi" value="{{data.balance.loi}}" data-dtype="Number">
{{#select data.balance.loi}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
<label class="item-name-label competence-name item-field-label-short">Chaos</label>
<select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number">
{{#select data.balance.chaos}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
</span>
</div>
<div class="flexrow">
<h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Actuelle</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />
</div>
<div class="flexrow">
<h4 class="item-name-label competence-name item-field-label-short">Eclat</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />
<h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
<ul class="item-list alternate-list">
<li class="item flexrow ">
<label class="item-name-label competence-name item-field-label-short"><strong>Loi</strong></label>
<label class="item-name-label competence-name item-field-label-short">Niveau</label><input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.balance.loi" value="{{data.balance.loi}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Points</label>
<select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.pointsloi" value="{{data.balance.pointsloi}}" data-dtype="Number">
{{#select data.balance.pointsloi}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
<label class="item-name-label competence-name item-field-label-medium">Aspect {{aspect}}</label>
</li>
<li class="item flexrow ">
<label class="item-name-label competence-name item-field-label-short"><strong>Chaos</strong></label>
<label class="item-name-label competence-name item-field-label-short">Niveau</label><input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Points</label><select class="status-small-label color-class-common item-field-label-short" type="text"
name="system.balance.pointschaos" value="{{data.balance.pointschaos}}" data-dtype="Number">
{{#select data.balance.pointschaos}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}}
</select>
<label class="item-name-label competence-name item-field-label-medium">Marge {{marge}}</label>
</li>
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Actuelle</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />
</li>
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Alignement {{alignement}}</h4>
<h4 class="item-name-label competence-name item-field-label-short">Eclat</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />
<h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
</li>
</ul>
</div>
</div>