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()), protections: duplicate(this.actor.getArmors()),
dons: duplicate(this.actor.getDons()), dons: duplicate(this.actor.getDons()),
alignement: this.actor.getAlignement(), alignement: this.actor.getAlignement(),
aspect: this.actor.getAspect(),
marge: this.actor.getMarge(),
tendances:duplicate(this.actor.getTendances()), tendances:duplicate(this.actor.getTendances()),
runes:duplicate(this.actor.getRunes()), runes:duplicate(this.actor.getRunes()),
origine: duplicate(this.actor.getOrigine() || {}), 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() { getAlignement() {
return (this.system.balance.loi > this.system.balance.chaos) ? "loyal" : "chaotique" return (this.system.balance.loi > this.system.balance.chaos) ? "loyal" : "chaotique"
} }

View File

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

View File

@ -8,25 +8,41 @@
<div class="flexcol"> <div class="flexcol">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1> <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow"> <div class="flexrow">
<span class="flexrow">
<h4 class="item-name-label competence-name item-field-label-short">{{upperFirst alignement}}</h4> <ul class="item-list alternate-list">
<label class="item-name-label competence-name item-field-label-short">Loi</label> <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" <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"> name="system.balance.pointsloi" value="{{data.balance.pointsloi}}" data-dtype="Number">
{{#select data.balance.loi}} {{#select data.balance.pointsloi}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}} {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}} {{/select}}
</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" <label class="item-name-label competence-name item-field-label-medium">Aspect {{aspect}}</label>
name="system.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number"> </li>
{{#select data.balance.chaos}}
<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}} {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}} {{/select}}
</select> </select>
</span> <label class="item-name-label competence-name item-field-label-medium">Marge {{marge}}</label>
</div> </li>
<div class="flexrow">
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Bonne Aventure</h4> <h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label> <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" <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
@ -34,8 +50,10 @@
<label class="item-name-label competence-name item-field-label-short">Actuelle</label> <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" <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" /> name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />
</div> </li>
<div class="flexrow">
<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> <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" <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" /> name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />
@ -43,6 +61,9 @@
<h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4> <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" <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" /> name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
</li>
</ul>
</div> </div>
</div> </div>