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.nbGraves = this.actor.GetNumberBlessures(data.data.blessures.graves.liste );
|
||||||
data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.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"];
|
data.data.competencecreature = data.itemsByType["competencecreature"];
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
@ -147,14 +145,6 @@ export class RdDActorCreatureSheet extends ActorSheet {
|
|||||||
this.actor.santeIncDec("endurance", -1);
|
this.actor.santeIncDec("endurance", -1);
|
||||||
this.render(true);
|
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);
|
//console.log(name, inc, data.value);
|
||||||
|
|
||||||
let diffEndurance = sante.endurance.max - this.data.data.sante.endurance.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;
|
sante.fatigue.value = diffEndurance;
|
||||||
//console.log("SANTE::::", sante);
|
//console.log("SANTE::::", sante);
|
||||||
|
|
||||||
@ -728,7 +728,6 @@ export class RdDActor extends Actor {
|
|||||||
armeItem = { name: compName, data: { dommages: compItem.data.dommages} };
|
armeItem = { name: compName, data: { dommages: compItem.data.dommages} };
|
||||||
}
|
}
|
||||||
compItem.data.defaut_carac = "carac_creature"; // Fake default competence
|
compItem.data.defaut_carac = "carac_creature"; // Fake default competence
|
||||||
console.log("V:", compItem.data.carac_value, compItem)
|
|
||||||
let rollData = {
|
let rollData = {
|
||||||
"competence": compItem,
|
"competence": compItem,
|
||||||
"arme": armeItem,
|
"arme": armeItem,
|
||||||
|
@ -337,6 +337,8 @@ button {
|
|||||||
.description-label {
|
.description-label {
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
}
|
}
|
||||||
|
.attribut-value,
|
||||||
|
.sante-value,
|
||||||
.competence-value {
|
.competence-value {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-basis: 64px;
|
flex-basis: 64px;
|
||||||
@ -381,6 +383,7 @@ button {
|
|||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
.input-sante-header,
|
||||||
.stress-style {
|
.stress-style {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-basis: 64px;
|
flex-basis: 64px;
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
"name": "foundryvtt-reve-de-dragon",
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||||
"version": "0.9.9",
|
"version": "0.9.13",
|
||||||
"minimumCoreVersion": "0.6.0",
|
"minimumCoreVersion": "0.6.0",
|
||||||
"compatibleCoreVersion": "0.6.6",
|
"compatibleCoreVersion": "0.6.6",
|
||||||
"templateVersion": 34,
|
"templateVersion": 37,
|
||||||
"author": "LeRatierBretonnien",
|
"author": "LeRatierBretonnien",
|
||||||
"esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ],
|
"esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ],
|
||||||
"styles": ["styles/simple.css"],
|
"styles": ["styles/simple.css"],
|
||||||
|
@ -67,21 +67,14 @@
|
|||||||
"max": 10,
|
"max": 10,
|
||||||
"value": 10,
|
"value": 10,
|
||||||
"label": "Vie",
|
"label": "Vie",
|
||||||
"derivee": true
|
"derivee": false
|
||||||
},
|
},
|
||||||
"endurance": {
|
"endurance": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"max": 10,
|
"max": 10,
|
||||||
"value": 10,
|
"value": 10,
|
||||||
"label": "Endurance",
|
"label": "Endurance",
|
||||||
"derivee": true
|
"derivee": false
|
||||||
},
|
|
||||||
"fatigue": {
|
|
||||||
"type": "number",
|
|
||||||
"max": 0,
|
|
||||||
"value": 0,
|
|
||||||
"label": "Fatigue",
|
|
||||||
"derivee": true
|
|
||||||
},
|
},
|
||||||
"sonne": {
|
"sonne": {
|
||||||
"value": false,
|
"value": false,
|
||||||
@ -105,35 +98,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attributs": {
|
"attributs": {
|
||||||
"sconst": {
|
|
||||||
"type": "number",
|
|
||||||
"value": 0,
|
|
||||||
"label": "S. Const",
|
|
||||||
"derivee": true
|
|
||||||
},
|
|
||||||
"sust": {
|
|
||||||
"type": "number",
|
|
||||||
"value": 0,
|
|
||||||
"label": "Sustentation",
|
|
||||||
"derivee": true
|
|
||||||
},
|
|
||||||
"plusdom": {
|
"plusdom": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"label": "+dom",
|
"label": "+dom",
|
||||||
"derivee": true
|
"derivee": true
|
||||||
},
|
},
|
||||||
|
"vitesse": {
|
||||||
|
"type": "string",
|
||||||
|
"value": 0,
|
||||||
|
"label": "Vitesse",
|
||||||
|
"derivee": true
|
||||||
|
},
|
||||||
"encombrement": {
|
"encombrement": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"label": "Encombrement",
|
"label": "Encombrement",
|
||||||
"derivee": true
|
"derivee": false
|
||||||
},
|
},
|
||||||
"malusarmure": {
|
"protection": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"label": "Malus Armure",
|
"label": "Protection",
|
||||||
"derivee": true
|
"derivee": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compteurs": {
|
"compteurs": {
|
||||||
|
@ -5,26 +5,6 @@
|
|||||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
||||||
<div class="header-fields">
|
<div class="header-fields">
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
|
<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="flexrow">
|
<div class="flexrow">
|
||||||
<div class="flex-group-center">Blessures légères : {{data.nbLegeres}}</div>
|
<div class="flex-group-center">Blessures légères : {{data.nbLegeres}}</div>
|
||||||
@ -58,12 +38,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
|
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
|
||||||
{{/if}}
|
{{/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-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>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<li class="competence flexrow">
|
<li class="competence flexrow">
|
||||||
@ -76,14 +51,27 @@
|
|||||||
<ol class="carac-list">
|
<ol class="carac-list">
|
||||||
{{#each data.attributs as |attr key|}}
|
{{#each data.attributs as |attr key|}}
|
||||||
<li class="competence flexrow" data-attribute="{{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>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each data.sante as |point key|}}
|
<li class="competence flexrow" data-attribute="vie">
|
||||||
<li class="competence flexrow" data-attribute="{{key}}">
|
<span class="competence-label flexrow" name="data.sante.vie.label">Vie : </span>
|
||||||
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{point.label}} : {{point.value}} / {{point.max}}</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>
|
</li>
|
||||||
{{/each}}
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user