Jets de vie/endurance/rêve actuel
This commit is contained in:
parent
ad80802af6
commit
f8f889e9f9
@ -218,7 +218,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Points de reve actuel
|
// Points de reve actuel
|
||||||
this.html.find('.ptreve-actuel a').click(async event => this.actor.rollCarac('reve-actuel', true))
|
this.html.find('.roll-reve-actuel').click(async event => this.actor.rollCarac('reve-actuel', true))
|
||||||
this.html.find('.empoignade-label a').click(async event => RdDEmpoignade.onAttaqueEmpoignadeFromItem(RdDSheetUtility.getItem(event, this.actor)))
|
this.html.find('.empoignade-label a').click(async event => RdDEmpoignade.onAttaqueEmpoignadeFromItem(RdDSheetUtility.getItem(event, this.actor)))
|
||||||
this.html.find('.arme-label a').click(async event => this.actor.rollArme(foundry.utils.duplicate(this._getEventArmeCombat(event))))
|
this.html.find('.arme-label a').click(async event => this.actor.rollArme(foundry.utils.duplicate(this._getEventArmeCombat(event))))
|
||||||
|
|
||||||
|
@ -10,7 +10,9 @@ export class RdDActorExportSheet extends RdDActorSheet {
|
|||||||
await loadTemplates([
|
await loadTemplates([
|
||||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs",
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs",
|
||||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs",
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs",
|
||||||
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-compteur.hbs",
|
||||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs",
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs",
|
||||||
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee-compteur.hbs",
|
||||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/competences.hbs",
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/competences.hbs",
|
||||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs",
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs",
|
||||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs",
|
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs",
|
||||||
@ -46,6 +48,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
|
|||||||
return Object.fromEntries(Mapping.getMapping().map(it => [it.column, {
|
return Object.fromEntries(Mapping.getMapping().map(it => [it.column, {
|
||||||
colName: it.colName ?? it.column,
|
colName: it.colName ?? it.column,
|
||||||
column: it.column,
|
column: it.column,
|
||||||
|
rollClass: it.rollClass,
|
||||||
value: it.getter(this.actor, context)
|
value: it.getter(this.actor, context)
|
||||||
}]))
|
}]))
|
||||||
}
|
}
|
||||||
|
@ -57,31 +57,34 @@ const MAPPING_BASE = [
|
|||||||
{ column: "metier", colName: 'Métier', getter: (actor, context) => actor.system.metier },
|
{ column: "metier", colName: 'Métier', getter: (actor, context) => actor.system.metier },
|
||||||
{ column: "biographie", colName: 'Biographie', getter: (actor, context) => actor.system.biographie },
|
{ column: "biographie", colName: 'Biographie', getter: (actor, context) => actor.system.biographie },
|
||||||
{ column: "taille", getter: (actor, context) => actor.system.carac.taille.value },
|
{ column: "taille", getter: (actor, context) => actor.system.carac.taille.value },
|
||||||
{ column: "apparence", getter: (actor, context) => actor.system.carac.apparence.value },
|
{ column: "apparence", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.apparence.value },
|
||||||
{ column: "constitution", getter: (actor, context) => actor.system.carac.constitution.value },
|
{ column: "constitution", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.constitution.value },
|
||||||
{ column: "force", getter: (actor, context) => actor.system.carac.force.value },
|
{ column: "force", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.force.value },
|
||||||
{ column: "agilite", colName: 'Agilité', getter: (actor, context) => actor.system.carac.agilite.value },
|
{ column: "agilite", rollClass: 'roll-carac', colName: 'Agilité', getter: (actor, context) => actor.system.carac.agilite.value },
|
||||||
{ column: "dexterite", colName: 'Dextérité', getter: (actor, context) => actor.system.carac.dexterite.value },
|
{ column: "dexterite", rollClass: 'roll-carac', colName: 'Dextérité', getter: (actor, context) => actor.system.carac.dexterite.value },
|
||||||
{ column: "vue", getter: (actor, context) => actor.system.carac.vue.value },
|
{ column: "vue", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.vue.value },
|
||||||
{ column: "ouie", colName: 'Ouïe', getter: (actor, context) => actor.system.carac.ouie.value },
|
{ column: "ouie", rollClass: 'roll-carac', colName: 'Ouïe', getter: (actor, context) => actor.system.carac.ouie.value },
|
||||||
{ column: "odoratgout", colName: 'Odo-goût', getter: (actor, context) => actor.system.carac.odoratgout.value },
|
{ column: "odoratgout", rollClass: 'roll-carac', colName: 'Odo-goût', getter: (actor, context) => actor.system.carac.odoratgout.value },
|
||||||
{ column: "volonte", colName: 'Volonté', getter: (actor, context) => actor.system.carac.volonte.value },
|
{ column: "volonte", rollClass: 'roll-carac', colName: 'Volonté', getter: (actor, context) => actor.system.carac.volonte.value },
|
||||||
{ column: "intellect", getter: (actor, context) => actor.system.carac.intellect.value },
|
{ column: "intellect", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.intellect.value },
|
||||||
{ column: "empathie", getter: (actor, context) => actor.system.carac.empathie.value },
|
{ column: "empathie", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.empathie.value },
|
||||||
{ column: "reve", colName: 'Rêve', getter: (actor, context) => actor.system.carac.reve.value },
|
{ column: "reve", rollClass: 'roll-carac', colName: 'Rêve', getter: (actor, context) => actor.system.carac.reve.value },
|
||||||
{ column: "chance", getter: (actor, context) => actor.system.carac.chance.value },
|
{ column: "chance", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.chance.value },
|
||||||
{ column: "melee", colName: 'Mêlée', getter: (actor, context) => actor.system.carac.melee.value },
|
{ column: "melee", rollClass: 'roll-carac', colName: 'Mêlée', getter: (actor, context) => actor.system.carac.melee.value },
|
||||||
{ column: "tir", getter: (actor, context) => actor.system.carac.tir.value },
|
{ column: "tir", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.tir.value },
|
||||||
{ column: "lancer", getter: (actor, context) => actor.system.carac.lancer.value },
|
{ column: "lancer", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.lancer.value },
|
||||||
{ column: "derobee", colName: 'Dérobée', getter: (actor, context) => actor.system.carac.derobee.value },
|
{ column: "derobee", rollClass: 'roll-carac', colName: 'Dérobée', getter: (actor, context) => actor.system.carac.derobee.value },
|
||||||
{ column: "vie", getter: (actor, context) => actor.system.sante.vie.max },
|
{ column: "vie", getter: (actor, context) => actor.system.sante.vie.max },
|
||||||
|
{ column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max },
|
||||||
{ column: "plusdom", colName: '+dom', getter: (actor, context) => actor.system.attributs.plusdom.value },
|
{ column: "plusdom", colName: '+dom', getter: (actor, context) => actor.system.attributs.plusdom.value },
|
||||||
{ column: "protectionnaturelle", colName: 'Protection naturelle', getter: (actor, context) => actor.system.attributs.protection.value > 0 ? actor.system.attributs.protection.value : '' },
|
{ column: "protectionnaturelle", colName: 'Protection naturelle', getter: (actor, context) => actor.system.attributs.protection.value > 0 ? actor.system.attributs.protection.value : '' },
|
||||||
{ column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max },
|
|
||||||
{ column: "description", getter: (actor, context) => Mapping.getDescription(actor) },
|
{ column: "description", getter: (actor, context) => Mapping.getDescription(actor) },
|
||||||
{ column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) },
|
{ column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) },
|
||||||
{ column: "protectionarmure", colName: 'Protection', getter: (actor, context) => Mapping.getProtectionArmure(actor, context) },
|
{ column: "protectionarmure", colName: 'Protection', getter: (actor, context) => Mapping.getProtectionArmure(actor, context) },
|
||||||
{ column: "malus_armure", getter: (actor, context) => Mapping.getMalusArmure(actor, context) },
|
{ column: "malus_armure", getter: (actor, context) => Mapping.getMalusArmure(actor, context) },
|
||||||
|
{ column: "reve_actuel", rollClass: 'roll-reve-actuel', colName: 'Rêve actuel', getter: (actor, context) => actor.system.reve.reve.value },
|
||||||
|
{ column: "vie_actuel", rollClass: 'jet-vie', getter: (actor, context) => actor.system.sante.vie.value },
|
||||||
|
{ column: "endurance_actuel", rollClass: 'jet-vie', getter: (actor, context) => actor.system.sante.endurance.value },
|
||||||
{ column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) },
|
{ column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) },
|
||||||
{ column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) },
|
{ column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) },
|
||||||
{ column: "competences", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_COMPETENCES) },
|
{ column: "competences", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_COMPETENCES) },
|
||||||
@ -263,7 +266,7 @@ export class Mapping {
|
|||||||
const poids = actor.system.poids
|
const poids = actor.system.poids
|
||||||
const cheveux = actor.system.cheveux ? `cheveux ${actor.system.cheveux}` : undefined
|
const cheveux = actor.system.cheveux ? `cheveux ${actor.system.cheveux}` : undefined
|
||||||
const yeux = actor.system.yeux ? `yeux ${actor.system.yeux}` : undefined
|
const yeux = actor.system.yeux ? `yeux ${actor.system.yeux}` : undefined
|
||||||
const beaute = actor.system.beaute ? `Beauté ${actor.system.beaute}` : undefined
|
const beaute = actor.system.beaute ? `beauté ${actor.system.beaute}` : undefined
|
||||||
const list = [race, hn, age, taille, poids, cheveux, yeux, beaute]
|
const list = [race, hn, age, taille, poids, cheveux, yeux, beaute]
|
||||||
return Misc.join(list.filter(it => it), ', ')
|
return Misc.join(list.filter(it => it), ', ')
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.volonte}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.volonte}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.empathie}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.empathie}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.intellect}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.intellect}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.reve}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-compteur.hbs" carac=export.reve actuel=export.reve_actuel}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.chance}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.chance}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol flex-group-top">
|
<div class="flexcol flex-group-top">
|
||||||
@ -34,8 +34,8 @@
|
|||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.tir}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.tir}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.lancer}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.lancer}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.derobee}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.derobee}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.vie}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee-compteur.hbs" carac=export.vie actuel=export.vie_actuel}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.endurance}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee-compteur.hbs" carac=export.endurance actuel=export.vie_actuel}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.plusdom}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=export.plusdom}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs" export}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs" export}}
|
||||||
</div>
|
</div>
|
||||||
|
19
templates/actor/export-scriptarium/carac-compteur.hbs
Normal file
19
templates/actor/export-scriptarium/carac-compteur.hbs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<div class="flexrow">
|
||||||
|
<div>
|
||||||
|
{{#if carac.rollClass}}
|
||||||
|
<a class="{{carac.rollClass}}" name="{{carac.column}}">
|
||||||
|
{{upper carac.colName}}
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
{{upper carac.colName}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="flex-group-right {{actuel.rollClass}}">
|
||||||
|
<a>
|
||||||
|
{{#unless (eq carac.value actuel.value)}}
|
||||||
|
{{actuel.value}} /
|
||||||
|
{{/unless}}
|
||||||
|
{{carac.value}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,19 @@
|
|||||||
|
<div class="flexrow">
|
||||||
|
<div>
|
||||||
|
{{#if carac.rollClass}}
|
||||||
|
<a class="{{carac.rollClass}}" name="{{carac.column}}">
|
||||||
|
{{upperFirst carac.colName}}
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
{{upperFirst carac.colName}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="flex-group-right {{actuel.rollClass}}">
|
||||||
|
<a>
|
||||||
|
{{#unless (eq carac.value actuel.value)}}
|
||||||
|
{{actuel.value}} /
|
||||||
|
{{/unless}}
|
||||||
|
{{carac.value}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,4 +1,12 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div>{{upperFirst carac.colName}}</div>
|
<div>
|
||||||
|
{{#if carac.rollClass}}
|
||||||
|
<a class="{{carac.rollClass}}" name="{{carac.column}}">
|
||||||
|
{{upperFirst carac.colName}}
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
{{upperFirst carac.colName}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
<div class="flex-group-right">{{carac.value}}</div>
|
<div class="flex-group-right">{{carac.value}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div><a class="roll-carac" name="{{carac.column}}">{{upper carac.colName}}</a></div>
|
<div>
|
||||||
|
{{#if carac.rollClass}}
|
||||||
|
<a class="{{carac.rollClass}}" name="{{carac.column}}">{{upper carac.colName}}</a>
|
||||||
|
{{else}}
|
||||||
|
{{upper carac.colName}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
<div class="flex-group-right">{{carac.value}}</div>
|
<div class="flex-group-right">{{carac.value}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="compteur">
|
<label class="compteur">
|
||||||
<span class="ptreve-actuel" data-tooltip="Faire un jet de Rêve actuel (ou jet de résistance)"><a>Rêve</a></span>
|
<span class="roll-reve-actuel" data-tooltip="Faire un jet de Rêve actuel (ou jet de résistance)"><a>Rêve</a></span>
|
||||||
<a class="ptreve-actuel-moins"><i class="fa-solid fa-square-minus"></i></a>
|
<a class="ptreve-actuel-moins"><i class="fa-solid fa-square-minus"></i></a>
|
||||||
<input class="resource-content" class="pointsreve-value" type="text" name="system.reve.reve.value" value="{{system.reve.reve.value}}" data-dtype="Number" />
|
<input class="resource-content" class="pointsreve-value" type="text" name="system.reve.reve.value" value="{{system.reve.reve.value}}" data-dtype="Number" />
|
||||||
<span>/ {{system.reve.seuil.value}}</span>
|
<span>/ {{system.reve.seuil.value}}</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user