#11 gestion encombrement et malus associé
This commit is contained in:
parent
3b82817d91
commit
2f438ccd10
@ -86,15 +86,15 @@ export class RdDActorSheet extends ActorSheet {
|
||||
}
|
||||
|
||||
// To avoid armour and so on...
|
||||
data.data.armes_seules = duplicate( this._checkNull(data.itemsByType['arme']));
|
||||
data.data.combat = duplicate( this._checkNull(data.itemsByType['arme']));
|
||||
|
||||
if (data.competenceByCategory && data.competenceByCategory.melee) {
|
||||
//Specific case for Esquive and Corps à Corps
|
||||
for ( const melee of data.competenceByCategory.melee ) {
|
||||
if (melee.name == "Esquive")
|
||||
data.itemsByType.arme.push( { name: "Esquive", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Esquive", dommages: 0} } );
|
||||
data.data.combat.push( { name: "Esquive", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Esquive", dommages: 0} } );
|
||||
if (melee.name == "Corps à corps")
|
||||
data.itemsByType.arme.push( { name: "Corps à corps", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Corps à corps", dommages: data.data.attributs.plusdom.value } } );
|
||||
data.data.combat.push( { name: "Corps à corps", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Corps à corps", dommages: data.data.attributs.plusdom.value } } );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,10 +164,11 @@ export class RdDUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** Construit la structure récursive des conteneurs, avec imbrication potentielle
|
||||
*
|
||||
*/
|
||||
static buildConteneur( objet, niveau ) {
|
||||
if (!niveau) niveau = 1;
|
||||
let prefix = "";
|
||||
for (let i = 0; i < niveau; i++) prefix += " ";
|
||||
let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html']( { item: objet} );
|
||||
if (objet.type == 'conteneur') {
|
||||
str = str + "<ol class='item-list'>";
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||
"version": "0.9.32",
|
||||
"version": "0.9.33",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.6",
|
||||
"templateVersion": 44,
|
||||
|
@ -265,7 +265,7 @@
|
||||
<span class="competence-title">+dom</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
{{#each data.armes as |arme key|}}
|
||||
{{#each data.combat as |arme key|}}
|
||||
<li class="item flexrow" data-item-id="{{arme._id}}">
|
||||
<span class="arme-label" name="data.armes[{{key}}].name"><a>{{arme.name}}</a></span>
|
||||
<span class="competence-label" name="data.armes[{{key}}].data.competence">{{arme.data.competence}}</span>
|
||||
@ -421,7 +421,7 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
<span cass=item-name>Encombrement total/max : {{data.encombrementTotal}} / {{data.attributs.encombrement.value}}</span>
|
||||
<span cass=item-name>Encombrement total/max : {{numberFormat data.encombrementTotal decimals=1}} / {{data.attributs.encombrement.value}}</span>
|
||||
<hr>
|
||||
<span cass=item-name>Porté sur soi</span>
|
||||
<ol class="item-list">
|
||||
@ -440,11 +440,9 @@
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
<ol class="item-list">
|
||||
{{#each data.conteneurs as |conteneur id|}}
|
||||
{{buildConteneur this}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{#each data.conteneurs as |conteneur id|}}
|
||||
{{buildConteneur this}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
|
Loading…
Reference in New Issue
Block a user