Fi creature sheet
This commit is contained in:
parent
43c5f6570c
commit
ad8354217c
@ -53,8 +53,6 @@ export class RdDActorCreatureSheet extends ActorSheet {
|
||||
data.data.nbGraves = this.actor.GetNumberBlessures(data.data.blessures.graves.liste );
|
||||
data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.liste );
|
||||
|
||||
// low is normal, this the base used to compute the grid.
|
||||
data.data.fatigueHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix( data.data.sante.fatigue.value, data.data.sante.endurance.max ).html() + "</table>";
|
||||
data.data.competencecreature = data.itemsByType["competencecreature"];
|
||||
|
||||
return data;
|
||||
@ -147,14 +145,6 @@ export class RdDActorCreatureSheet extends ActorSheet {
|
||||
this.actor.santeIncDec("endurance", -1);
|
||||
this.render(true);
|
||||
});
|
||||
html.find('#fatigue-plus').click((event) => {
|
||||
this.actor.santeIncDec("fatigue", 1);
|
||||
this.render(true);
|
||||
});
|
||||
html.find('#fatigue-moins').click((event) => {
|
||||
this.actor.santeIncDec("fatigue", -1);
|
||||
this.render(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -494,7 +494,7 @@ export class RdDActor extends Actor {
|
||||
//console.log(name, inc, data.value);
|
||||
|
||||
let diffEndurance = sante.endurance.max - this.data.data.sante.endurance.value;
|
||||
if ( sante.fatigue.value < diffEndurance) // If endurance lost, then the same amount of fatigue cannot be recovered
|
||||
if ( sante.fatigue && sante.fatigue.value < diffEndurance) // If endurance lost, then the same amount of fatigue cannot be recovered
|
||||
sante.fatigue.value = diffEndurance;
|
||||
//console.log("SANTE::::", sante);
|
||||
|
||||
@ -728,7 +728,6 @@ export class RdDActor extends Actor {
|
||||
armeItem = { name: compName, data: { dommages: compItem.data.dommages} };
|
||||
}
|
||||
compItem.data.defaut_carac = "carac_creature"; // Fake default competence
|
||||
console.log("V:", compItem.data.carac_value, compItem)
|
||||
let rollData = {
|
||||
"competence": compItem,
|
||||
"arme": armeItem,
|
||||
|
@ -337,6 +337,8 @@ button {
|
||||
.description-label {
|
||||
flex-grow: 2;
|
||||
}
|
||||
.attribut-value,
|
||||
.sante-value,
|
||||
.competence-value {
|
||||
flex-grow: 0;
|
||||
flex-basis: 64px;
|
||||
@ -381,6 +383,7 @@ button {
|
||||
margin-right: 4px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.input-sante-header,
|
||||
.stress-style {
|
||||
flex-grow: 0;
|
||||
flex-basis: 64px;
|
||||
|
@ -2,10 +2,10 @@
|
||||
"name": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||
"version": "0.9.9",
|
||||
"version": "0.9.13",
|
||||
"minimumCoreVersion": "0.6.0",
|
||||
"compatibleCoreVersion": "0.6.6",
|
||||
"templateVersion": 34,
|
||||
"templateVersion": 37,
|
||||
"author": "LeRatierBretonnien",
|
||||
"esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ],
|
||||
"styles": ["styles/simple.css"],
|
||||
|
@ -67,21 +67,14 @@
|
||||
"max": 10,
|
||||
"value": 10,
|
||||
"label": "Vie",
|
||||
"derivee": true
|
||||
"derivee": false
|
||||
},
|
||||
"endurance": {
|
||||
"type": "number",
|
||||
"max": 10,
|
||||
"value": 10,
|
||||
"label": "Endurance",
|
||||
"derivee": true
|
||||
},
|
||||
"fatigue": {
|
||||
"type": "number",
|
||||
"max": 0,
|
||||
"value": 0,
|
||||
"label": "Fatigue",
|
||||
"derivee": true
|
||||
"derivee": false
|
||||
},
|
||||
"sonne": {
|
||||
"value": false,
|
||||
@ -105,35 +98,29 @@
|
||||
}
|
||||
},
|
||||
"attributs": {
|
||||
"sconst": {
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"label": "S. Const",
|
||||
"derivee": true
|
||||
},
|
||||
"sust": {
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"label": "Sustentation",
|
||||
"derivee": true
|
||||
},
|
||||
"plusdom": {
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"label": "+dom",
|
||||
"derivee": true
|
||||
},
|
||||
"vitesse": {
|
||||
"type": "string",
|
||||
"value": 0,
|
||||
"label": "Vitesse",
|
||||
"derivee": true
|
||||
},
|
||||
"encombrement": {
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"label": "Encombrement",
|
||||
"derivee": true
|
||||
"derivee": false
|
||||
},
|
||||
"malusarmure": {
|
||||
"protection": {
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"label": "Malus Armure",
|
||||
"derivee": true
|
||||
"label": "Protection",
|
||||
"derivee": false
|
||||
}
|
||||
},
|
||||
"compteurs": {
|
||||
|
@ -5,26 +5,6 @@
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
|
||||
<div class="flexrow">
|
||||
<div class="flex-group-center">
|
||||
<div>
|
||||
<span>Vie <a id="vie-plus">+</a> / <a id="vie-moins">-</a></span>
|
||||
<input class="resource-content" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/>/{{data.sante.vie.max}}
|
||||
</div>
|
||||
<div>
|
||||
<span>Endurance <a id="endurance-plus">+</a> / <a id="endurance-moins">-</a></span>
|
||||
<input class="resource-content" type="text" name="data.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/>/{{data.sante.endurance.max}}
|
||||
</div>
|
||||
<div>
|
||||
<span>Sonné :</span>
|
||||
<input class="resource-content" type="checkbox" name="data.sante.sonne.value" value="{{data.sante.sonne.value}}" {{#if data.sante.sonne.value}}checked{{/if}} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-group-center flex-fatigue">
|
||||
Fatigue <a id="fatigue-plus">+</a> / <a id="fatigue-moins">-</a>
|
||||
<span>{{{data.fatigueHTML}}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexrow">
|
||||
<div class="flex-group-center">Blessures légères : {{data.nbLegeres}}</div>
|
||||
@ -58,12 +38,7 @@
|
||||
{{else}}
|
||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
|
||||
{{/if}}
|
||||
{{#if carac.derivee}}
|
||||
<label class="competence-value flexrow">{{carac.value}}</label>
|
||||
{{else}}
|
||||
<input class="competence-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}"/>
|
||||
<input class="competence-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number"/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
<li class="competence flexrow">
|
||||
@ -76,14 +51,27 @@
|
||||
<ol class="carac-list">
|
||||
{{#each data.attributs as |attr key|}}
|
||||
<li class="competence flexrow" data-attribute="{{key}}">
|
||||
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : {{attr.value}}</span>
|
||||
<span class="carac-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : </span>
|
||||
<span><input class="attribut-value flexrow" type="text" name="data.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.type}}"/></span>
|
||||
</li>
|
||||
{{/each}}
|
||||
{{#each data.sante as |point key|}}
|
||||
<li class="competence flexrow" data-attribute="{{key}}">
|
||||
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{point.label}} : {{point.value}} / {{point.max}}</span>
|
||||
<li class="competence flexrow" data-attribute="vie">
|
||||
<span class="competence-label flexrow" name="data.sante.vie.label">Vie : </span>
|
||||
<span><input class="sante-value flexrow" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/></span><span>/ </span>
|
||||
<span><input class="sante-value flexrow" type="text" name="data.sante.vie.max" value="{{data.sante.vie.max}}" data-dtype="Number"/></span>
|
||||
</li>
|
||||
<li class="competence flexrow" data-attribute="endurance">
|
||||
<span class="competence-label flexrow" name="data.sante.endurance.label">Endurance : </span>
|
||||
<span><input class="sante-value flexrow" type="text" name="data.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/></span><span>/ </span>
|
||||
<span><input class="sante-value flexrow" type="text" name="data.sante.endurance.max" value="{{data.sante.endurance.max}}" data-dtype="Number"/></span>
|
||||
</li>
|
||||
<li class="competence flexrow" data-attribute="sonne">
|
||||
<span class="competence-label flexrow" name="data.sante.sonne.label">Sonné : </span>
|
||||
<input class="resource-content" type="checkbox" name="data.sante.sonne.value" value="{{data.sante.sonne.value}}" {{#if data.sante.sonne.value}}checked{{/if}} />
|
||||
</li>
|
||||
<li class="competence flexrow" data-attribute="etat">
|
||||
<span class="competence-label flexrow" name="data.compteurs.etat.label">Etat Général : </span> <span>{{data.compteurs.etat.value}}</span>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user