Merge pull request 'v11' (#714) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11

Reviewed-on: #714
This commit is contained in:
uberwald 2024-10-11 17:42:24 +02:00
commit 174ef4256a
23 changed files with 224 additions and 101 deletions

View File

@ -1,4 +1,15 @@
# 12.0 # 12.0
## 12.0.14 - Les légions d'Astrobazzarh
- Feuille de PNJ:
- boutons standard (encaissement, ...)
- boutons pour ajuster les compteurs
- visualisation des blessures
- click sur blessure pour ajouter/enlever
- gestion des armes
## 12.0.13 - La Chance d'Astrobazzarh
- Fix: jets de caractéristiques
## 12.0.12 - L'étalage d'Astrobazzarh ## 12.0.12 - L'étalage d'Astrobazzarh
- Fix: On peut de nouveau vendre des items sans propriétaire, depuis les compendiums ou depuis l'onglet des Objets - Fix: On peut de nouveau vendre des items sans propriétaire, depuis les compendiums ou depuis l'onglet des Objets
- Début de Feuille PNJ au format des encarts Scriptarium - Début de Feuille PNJ au format des encarts Scriptarium

View File

@ -128,7 +128,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
this.render(true); this.render(true);
}); });
this.html.find('.visu-tmr').click(async event => this.actor.displayTMR("visu")) this.html.find('.button-tmr-visu').click(async event => this.actor.displayTMR("visu"))
// Everything below here is only needed if the sheet is editable // Everything below here is only needed if the sheet is editable
if (!this.options.editable) return; if (!this.options.editable) return;
@ -186,7 +186,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
this.html.find('.item-equip').click(async event => this.actor.equiperObjet(RdDSheetUtility.getItemId(event))) this.html.find('.item-equip').click(async event => this.actor.equiperObjet(RdDSheetUtility.getItemId(event)))
this.html.find('.chance-actuelle').click(async event => this.actor.rollCarac('chance-actuelle')) this.html.find('.chance-actuelle').click(async event => this.actor.rollCarac('chance-actuelle'))
this.html.find('.chance-appel').click(async event => this.actor.rollAppelChance()) this.html.find('.button-appel-chance').click(async event => this.actor.rollAppelChance())
this.html.find('[name="jet-astrologie"]').click(async event => this.actor.astrologieNombresAstraux()) this.html.find('[name="jet-astrologie"]').click(async event => this.actor.astrologieNombresAstraux())
this.html.find('.tache-label a').click(async event => this.actor.rollTache(RdDSheetUtility.getItemId(event))) this.html.find('.tache-label a').click(async event => this.actor.rollTache(RdDSheetUtility.getItemId(event)))
@ -220,7 +220,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
// Points de reve actuel // Points de reve actuel
this.html.find('.roll-reve-actuel').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('.roll-arme').click(async event => this.actor.rollArme(foundry.utils.duplicate(this._getEventArmeCombat(event))))
// Initiative pour l'arme // Initiative pour l'arme
this.html.find('.arme-initiative a').click(async event => { this.html.find('.arme-initiative a').click(async event => {
@ -234,10 +234,10 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
}); });
// Display TMR // Display TMR
this.html.find('.monte-tmr').click(async event => this.actor.displayTMR("normal")) this.html.find('.button-tmr').click(async event => this.actor.displayTMR("normal"))
this.html.find('.monte-tmr-rapide').click(async event => this.actor.displayTMR("rapide")) this.html.find('.button-tmr-rapide').click(async event => this.actor.displayTMR("rapide"))
this.html.find('.repos').click(async event => await this.actor.repos()) this.html.find('.button-repos').click(async event => await this.actor.repos())
this.html.find('.carac-xp-augmenter').click(async event => this.actor.updateCaracXPAuto(event.currentTarget.name.replace("augmenter.", ""))) this.html.find('.carac-xp-augmenter').click(async event => this.actor.updateCaracXPAuto(event.currentTarget.name.replace("augmenter.", "")))
this.html.find('.competence-xp-augmenter').click(async event => this.actor.updateCompetenceXPAuto(RdDSheetUtility.getItemId(event))) this.html.find('.competence-xp-augmenter').click(async event => this.actor.updateCompetenceXPAuto(RdDSheetUtility.getItemId(event)))
@ -279,7 +279,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
this.html.find('.moral-malheureux').click(async event => this.actor.jetDeMoral('malheureuse')) this.html.find('.moral-malheureux').click(async event => this.actor.jetDeMoral('malheureuse'))
this.html.find('.moral-neutre').click(async event => this.actor.jetDeMoral('neutre')) this.html.find('.moral-neutre').click(async event => this.actor.jetDeMoral('neutre'))
this.html.find('.moral-heureux').click(async event => this.actor.jetDeMoral('heureuse')) this.html.find('.moral-heureux').click(async event => this.actor.jetDeMoral('heureuse'))
this.html.find('.ethylisme-test').click(async event => this.actor.jetEthylisme()) this.html.find('.button-ethylisme').click(async event => this.actor.jetEthylisme())
this.html.find('.ptreve-actuel-plus').click(async event => this.actor.reveActuelIncDec(1)) this.html.find('.ptreve-actuel-plus').click(async event => this.actor.reveActuelIncDec(1))
this.html.find('.ptreve-actuel-moins').click(async event => this.actor.reveActuelIncDec(-1)) this.html.find('.ptreve-actuel-moins').click(async event => this.actor.reveActuelIncDec(-1))

View File

@ -24,14 +24,15 @@ export class RdDBaseActorReveSheet extends RdDBaseActorSheet {
// Everything below here is only needed if the sheet is editable // Everything below here is only needed if the sheet is editable
if (!this.options.editable) return; if (!this.options.editable) return;
this.html.find('.encaisser-direct').click(async event => this.actor.encaisser()) this.html.find('.button-encaissement').click(async event => this.actor.encaisser())
this.html.find('.roll-carac a').click(async event => this.actor.rollCarac(Grammar.toLowerCaseNoAccent(event.currentTarget.attributes.name.value))); this.html.find('.roll-carac').click(async event => {
this.actor.rollCarac(Grammar.toLowerCaseNoAccent(event.currentTarget.attributes['data-carac-name'].value))});
this.html.find('.roll-competence').click(async event => this.actor.rollCompetence(RdDSheetUtility.getItemId(event))); this.html.find('.roll-competence').click(async event => this.actor.rollCompetence(RdDSheetUtility.getItemId(event)));
this.html.find('.endurance-plus').click(async event => this.actor.santeIncDec("endurance", 1)); this.html.find('.endurance-plus').click(async event => this.actor.santeIncDec("endurance", 1));
this.html.find('.endurance-moins').click(async event => this.actor.santeIncDec("endurance", -1)); this.html.find('.endurance-moins').click(async event => this.actor.santeIncDec("endurance", -1));
if (game.user.isGM) { if (game.user.isGM) {
this.html.find('.remise-a-neuf').click(async event => this.actor.remiseANeuf()) this.html.find('.button-remise-a-neuf').click(async event => this.actor.remiseANeuf())
this.html.find('.delete-active-effect').click(async event => this.actor.removeEffect(this.html.find(event.currentTarget).parents(".active-effect").data('effect'))); this.html.find('.delete-active-effect').click(async event => this.actor.removeEffect(this.html.find(event.currentTarget).parents(".active-effect").data('effect')));
this.html.find('.enlever-tous-effets').click(async event => await this.actor.removeEffects()); this.html.find('.enlever-tous-effets').click(async event => await this.actor.removeEffects());
} }

View File

@ -180,7 +180,7 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
} }
} }
const endActuelle = this.getEnduranceActuelle(); const endActuelle = this.getEnduranceActuelle();
const blessure = await RdDItemBlessure.createBlessure(this, encaissement.gravite, encaissement.dmg.loc.label, attacker); const blessure = await RdDItemBlessure.createBlessure(this, encaissement.gravite, encaissement.dmg?.loc.label ??'', attacker);
if (blessure.isCritique()) { if (blessure.isCritique()) {
encaissement.endurance = endActuelle; encaissement.endurance = endActuelle;
} }
@ -196,6 +196,13 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
return blessure; return blessure;
} }
async supprimerBlessure({gravite}) {
const toDelete = this.itemTypes[ITEM_TYPES.blessure].find(it => it.system.gravite == gravite)?.id
if (toDelete){
await this.deleteEmbeddedDocuments('Item', [toDelete]);
}
}
async supprimerBlessures(filterToDelete) { async supprimerBlessures(filterToDelete) {
const toDelete = this.filterItems(filterToDelete, ITEM_TYPES.blessure) const toDelete = this.filterItems(filterToDelete, ITEM_TYPES.blessure)
.map(it => it.id); .map(it => it.id);
@ -203,7 +210,7 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
} }
countBlessures(filter = it => !it.isContusion()) { countBlessures(filter = it => !it.isContusion()) {
return this.filterItems(filter, 'blessure').length return this.filterItems(filter, ITEM_TYPES.blessure).length
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -9,16 +9,19 @@ export class RdDActorExportSheet extends RdDActorSheet {
static async init() { static async init() {
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/blessure.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessures.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-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/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/fatigue.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/sort.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/sort.hbs",
]) ])
Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille d'encart" }) Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
} }
static get defaultOptions() { static get defaultOptions() {
return foundry.utils.mergeObject(RdDActorSheet.defaultOptions, { return foundry.utils.mergeObject(RdDActorSheet.defaultOptions, {
@ -36,23 +39,36 @@ export class RdDActorExportSheet extends RdDActorSheet {
async getData() { async getData() {
const formData = await super.getData() const formData = await super.getData()
// Add any structured, precomputed list of data // Add any structured, precomputed list of data
formData.export = this.getMappingValues(); formData.context = Mapping.prepareContext(this.actor)
formData.export = this.getMappingValues(formData.context, this.actor)
formData.competences = this.getCompetences(CATEGORIES_COMPETENCES) formData.competences = this.getCompetences(CATEGORIES_COMPETENCES)
formData.draconic = this.getCompetences(CATEGORIES_DRACONIC) formData.draconic = this.getCompetences(CATEGORIES_DRACONIC)
const legeres = this.actor.nbBlessuresLegeres()
const graves = this.actor.nbBlessuresGraves()
const critiques = this.actor.nbBlessuresCritiques()
formData.etat = {
surenc: this.actor.computeMalusSurEncombrement(),
fatigue: {
value: this.actor.getFatigueActuelle(),
max: this.actor.getFatigueMax(),
malus: this.actor.malusFatigue()
},
blessures: legeres + graves + critiques,
blessure: [legeres > 0, legeres > 1, legeres > 2, legeres > 3, legeres > 4, graves > 0, graves > 1, critiques > 0],
}
formData.options.exportScriptarium = OptionsAvancees.isUsing(EXPORT_CSV_SCRIPTARIUM) formData.options.exportScriptarium = OptionsAvancees.isUsing(EXPORT_CSV_SCRIPTARIUM)
return formData return formData
} }
getMappingValues() { getMappingValues(context, actor) {
const context = Mapping.prepareContext(this.actor)
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, rollClass: it.rollClass,
value: it.getter(this.actor, context) value: String(it.getter(actor, context))
}])) }]))
} }
getCompetences(categories) { getCompetences(categories) {
const competences = Mapping.getCompetencesCategorie(this.actor, categories) const competences = Mapping.getCompetencesCategorie(this.actor, categories)
if (competences.length == 0) { if (competences.length == 0) {
@ -68,7 +84,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
} }
const listCategorieByNiveau = niveaux.map(niveau => { const listCategorieByNiveau = niveaux.map(niveau => {
const list = byNiveau[niveau].sort(Misc.ascending(it => it.name)) const list = byNiveau[niveau].sort(Misc.ascending(it => it.name))
return {niveau, list} return { niveau, list }
}) })
return Misc.concat(listCategorieByNiveau) return Misc.concat(listCategorieByNiveau)
}).filter(it => it != undefined) }).filter(it => it != undefined)
@ -78,9 +94,20 @@ export class RdDActorExportSheet extends RdDActorSheet {
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
this.html.find('.click-blessure-remove').click(async event =>
await this.actor.supprimerBlessure({
gravite: this.html.find(event.currentTarget).data('gravite')
})
)
this.html.find('.click-blessure-add').click(async event =>
await this.actor.ajouterBlessure({
gravite: this.html.find(event.currentTarget).data('gravite')
// event.currentTarget.attributes['data-gravite'].value
})
)
this.html.find('.button-export').click(async event => { this.html.find('.button-export').click(async event => {
ExportScriptarium.INSTANCE.exportActors([this.actor],
ExportScriptarium.INSTANCE.exportActors([this.actor],
`${this.actor.uuid}-${this.actor.name}` `${this.actor.uuid}-${this.actor.name}`
) )
}) })

View File

@ -142,11 +142,11 @@ export class Mapping {
const armes = actor.items.filter(it => it.type == ITEM_TYPES.arme) const armes = actor.items.filter(it => it.type == ITEM_TYPES.arme)
return armes.map(arme => return armes.map(arme =>
[ [
arme.system.tir != "" ? Mapping.prepareArme(actor, arme, 'tir') : undefined,
arme.system.lancer = "" ? Mapping.prepareArme(actor, arme, 'lancer') : undefined,
arme.system.unemain ? Mapping.prepareArme(actor, arme, 'unemain') : undefined, arme.system.unemain ? Mapping.prepareArme(actor, arme, 'unemain') : undefined,
arme.system.deuxmains ? Mapping.prepareArme(actor, arme, 'deuxmains') : undefined, arme.system.deuxmains ? Mapping.prepareArme(actor, arme, 'deuxmains') : undefined,
!(arme.system.unemain || arme.system.deuxmains) ? Mapping.prepareArme(actor, arme, 'competence') : undefined !(arme.system.unemain || arme.system.deuxmains) ? Mapping.prepareArme(actor, arme, 'competence') : undefined,
arme.system.lancer != "" ? Mapping.prepareArme(actor, arme, 'lancer') : undefined,
arme.system.tir != "" ? Mapping.prepareArme(actor, arme, 'tir') : undefined
] ]
.filter(it => it != undefined) .filter(it => it != undefined)
).reduce((a, b) => a.concat(b), []) ).reduce((a, b) => a.concat(b), [])
@ -160,14 +160,27 @@ export class Mapping {
} }
const dmgArme = RdDItemArme.dommagesReels(arme, maniement) const dmgArme = RdDItemArme.dommagesReels(arme, maniement)
const dommages = dmgArme + RdDBonus.bonusDmg(actor, maniement, dmgArme) const dommages = dmgArme + RdDBonus.bonusDmg(actor, maniement, dmgArme)
const categorie = Mapping.complementCategorie(arme, maniement)
return { return {
name: arme.name, name: arme.name + categorie,
niveau: Misc.toSignedString(competence.system.niveau), niveau: Misc.toSignedString(competence.system.niveau),
init: Mapping.calculBaseInit(actor, competence.system.categorie) + competence.system.niveau, init: Mapping.calculBaseInit(actor, competence.system.categorie) + competence.system.niveau,
dommages: Misc.toSignedString(dommages) dommages: Misc.toSignedString(dommages),
competence: competence,
arme: arme
} }
} }
static complementCategorie(arme, maniement) {
switch (maniement) {
case 'unemain': return (arme.system.deuxmains) ? ' 1 main' : (arme.system.lancer||arme.system.tir) ? ' mêlée': ''
case 'deuxmains': return (arme.system.unemain) ? ' 2 mains' : (arme.system.lancer||arme.system.tir) ? ' mêlée': ''
case 'lancer': return (arme.system.unemain || arme.system.deuxmains || arme.system.tir) ? ' jet' : ''
case 'tir': return (arme.system.unemain || arme.system.deuxmains || arme.system.lancer) ? ' tir' : ''
}
return ''
}
static calculBaseInit(actor, categorie) { static calculBaseInit(actor, categorie) {
const mapping = MAPPING_BASE.find(it => it.column == categorie) const mapping = MAPPING_BASE.find(it => it.column == categorie)
if (mapping) { if (mapping) {
@ -208,7 +221,8 @@ export class Mapping {
const esquive = esquives[0] const esquive = esquives[0]
return { return {
name: esquive.name, name: esquive.name,
niveau: esquive.system.niveau niveau: esquive.system.niveau,
competence: esquive
} }
} }
return undefined return undefined

View File

@ -1,8 +1,8 @@
{ {
"id": "foundryvtt-reve-de-dragon", "id": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"version": "12.0.13", "version": "12.0.14",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-12.0.13.zip", "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-12.0.14.zip",
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json", "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md", "changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
"compatibility": { "compatibility": {

View File

@ -9,9 +9,9 @@
<div class="flexrow"> <div class="flexrow">
<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="header-buttons"> <div class="header-buttons">
<span class="encaisser-direct"><a><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a></span> <span><a class="button-encaissement"><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a></span>
{{#if @root.options.isGM}} {{#if @root.options.isGM}}
<span class="remise-a-neuf"><a><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a></span> <span><a class="button-remise-a-neuf"><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a></span>
{{/if}} {{/if}}
</div> </div>
</div> </div>

View File

@ -9,9 +9,9 @@
<div class="flexrow"> <div class="flexrow">
<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="header-buttons"> <div class="header-buttons">
<span class="encaisser-direct"><a><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a></span> <span><a class="button-encaissement"><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a></span>
{{#if @root.options.isGM}} {{#if @root.options.isGM}}
<span class="remise-a-neuf"><a><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a></span> <span><a class="button-remise-a-neuf"><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a></span>
{{/if}} {{/if}}
</div> </div>
</div> </div>

View File

@ -7,7 +7,7 @@
<label class="carac-xp"/> <label class="carac-xp"/>
{{else}} {{else}}
{{#if carac.derivee}} {{#if carac.derivee}}
<span class="carac-label roll-carac" name="system.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> <span class="carac-label" name="system.carac.{{key}}.label"><a class="roll-carac" data-carac-name={{key}}>{{carac.label}}</a></span>
<label class="competence-value">{{carac.value}}</label> <label class="competence-value">{{carac.value}}</label>
<label class="carac-xp"/> <label class="carac-xp"/>
{{else}} {{else}}
@ -22,7 +22,7 @@
</a> </a>
</span> </span>
{{else}} {{else}}
<span class="carac-label roll-carac tooltip" name="system.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> <span class="carac-label tooltip" name="system.carac.{{key}}.label"><a class="roll-carac" data-carac-name={{key}}>{{carac.label}}</a></span>
{{/if}} {{/if}}
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} /> <input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
<span class="carac-xp tooltip"> <span class="carac-xp tooltip">

View File

@ -13,7 +13,7 @@
data-competence-name="{{arme.system.competence}}" data-competence-name="{{arme.system.competence}}"
data-tooltip="{{arme.name}}: niveau {{plusMoins arme.system.niveau}}"> data-tooltip="{{arme.name}}: niveau {{plusMoins arme.system.niveau}}">
<span class="arme-label"> <span class="arme-label">
<a> <a class="roll-arme">
{{#if arme.img}} {{#if arme.img}}
<img class="sheet-competence-img" src="{{arme.img}}" data-tooltip="{{arme.name}}"/> <img class="sheet-competence-img" src="{{arme.img}}" data-tooltip="{{arme.name}}"/>
{{/if}} {{/if}}

View File

@ -1,10 +1,35 @@
<form class="{{cssClass}}" autocomplete="off" > <form class="{{cssClass}}" autocomplete="off" >
<section class="sheet-header"> <section class="sheet-header">
<div class="flexrow"> <div class="flexrow">
<h1 class="flex-grow charname">{{name}}</h1> <div class="flex-group-left flex-grow-0-5">
{{#if options.exportScriptarium}} <h1 class="charname">{{name}}
<span class="flex-group-right flex-shrink chat-card-button-area"><a class="button-export chat-card-button">Export </a></span> </h1>
{{/if}} </div>
<div class="flex-group-right flex-grow-3">
{{#if system.attributs.hautrevant.value}}
<a class="button-tmr" data-tooltip="Montée dans les Terres M&eacute;dianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}>
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg"/>
</a>
<a class="button-tmr-rapide" data-tooltip="Montée accélérée dans les Terres M&eacute;dianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}>
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg"/>
</a>
<a class="button-tmr-visu" data-tooltip="Regarder les Terres M&eacute;dianes">
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg"/>
</a>
{{/if}}
<a class="button-appel-chance"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/appel-chance.svg" data-tooltip="Appel à la chance"/></a>
<a class="button-encaissement"><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a>
<a class="button-ethylisme"><img class="button-img" src="icons/svg/tankard.svg" data-tooltip="Boire"/></a>
<a class="button-repos"><img class="button-img" src="icons/svg/sleep.svg" data-tooltip="Se reposer"/></a>
{{#if @root.options.isGM}}
<a class="button-remise-a-neuf"><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a>
{{/if}}
{{#if options.exportScriptarium}}
<a class="button-export">
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/scriptarium.svg" data-tooltip="Export format Scriptarium"/>
</a>
{{/if}}
</div>
</div> </div>
</section> </section>
<section class="sheet-body" style=:"margin-bottom: 3rem;"> <section class="sheet-body" style=:"margin-bottom: 3rem;">
@ -26,7 +51,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-compteur.hbs" carac=export.reve actuel=export.reve_actuel}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-compteur.hbs" carac=export.reve actuel=export.reve_actuel button-name='ptreve-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">
@ -35,27 +60,27 @@
{{>"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-compteur.hbs" carac=export.vie actuel=export.vie_actuel}} {{>"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-compteur.hbs" carac=export.endurance actuel=export.vie_actuel}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee-compteur.hbs" carac=export.endurance actuel=export.endurance_actuel}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/fatigue.hbs" }}
{{>"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 class="flexrow">&nbsp;</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessures.hbs" }}
</div> </div>
</div> </div>
<hr> <hr>
<div> <div>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=' ' niveau='Niv' init='Init' dommages='+dom'}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name='' niveau='Niv' init='Init' dommages='+dom'}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_0.value niveau=export.arme_niveau_0.value init=export.arme_init_0.value dommages=export.arme_dommages_0.value}} {{#each context.armes as |arme|}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_1.value niveau=export.arme_niveau_1.value init=export.arme_init_1.value dommages=export.arme_dommages_1.value}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs"
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_2.value niveau=export.arme_niveau_2.value init=export.arme_init_2.value dommages=export.arme_dommages_2.value}} name=arme.name niveau=arme.niveau init=arme.init dommages=arme.dommages
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_3.value niveau=export.arme_niveau_3.value init=export.arme_init_3.value dommages=export.arme_dommages_3.value}} arme=arme.arme competence=arme.competence
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_4.value niveau=export.arme_niveau_4.value init=export.arme_init_4.value dommages=export.arme_dommages_4.value}} }}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_5.value niveau=export.arme_niveau_5.value init=export.arme_init_5.value dommages=export.arme_dommages_5.value}} {{/each}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_6.value niveau=export.arme_niveau_6.value init=export.arme_init_6.value dommages=export.arme_dommages_6.value}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs" name='Esquive' niveau=context.esquive.value competence=context.esquive.competence}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_7.value niveau=export.arme_niveau_7.value init=export.arme_init_7.value dommages=export.arme_dommages_7.value}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_8.value niveau=export.arme_niveau_8.value init=export.arme_init_8.value dommages=export.arme_dommages_8.value}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs" name=export.arme_name_9.value niveau=export.arme_niveau_9.value init=export.arme_init_9.value dommages=export.arme_dommages_9.value}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs" name='Esquive' niveau=export.esquive.value}}
{{#if (gt export.malue_armure.value 0)}} {{#if (gt export.malue_armure.value 0)}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs" name='Esquive (avec armure)' niveau=export.esquive_armure.value}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs" name='Esquive (avec armure)' niveau=export.esquive_armure.value
competence=context.esquive.competence}}
{{/if}} {{/if}}
</div> </div>
<hr> <hr>

View File

@ -1,6 +1,12 @@
{{#if name}} <div class="flexrow item"
<div class="flexrow"> data-item-id="{{arme._id}}"
<div>{{upperFirst name}}</div> data-arme-name="{{arme.name}}"
data-competence-name="{{competence.name}}">
{{#if name}}
<a class="roll-arme">{{upperFirst name}}</a>
{{else}}
<div></div>
{{/if}}
<div class="flexrow"> <div class="flexrow">
<div>{{niveau}}</div> <div>{{niveau}}</div>
{{#if init}} {{#if init}}
@ -12,4 +18,3 @@
{{/if}} {{/if}}
</div> </div>
</div> </div>
{{/if}}

View File

@ -0,0 +1,5 @@
{{#if blessure}}
<a class="click-blessure-remove" data-gravite="{{gravite}}"><i class="fa-regular fa-face-head-bandage blessure-active-{{gravite}}"></i></a>
{{else}}
<a class="click-blessure-add" data-gravite="{{gravite}}"><i class="fa-regular fa-circle"></i></a>
{{/if}}

View File

@ -0,0 +1,26 @@
<div class="flexcol">
<div class="flexrow">
<div>Légères</div>
<div class="flex-group-right">
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[0] gravite=2}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[1] gravite=2}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[2] gravite=2}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[3] gravite=2}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[4] gravite=2}}
</div>
</div>
<div class="flexrow">
<div>Graves</div>
<div class="flex-group-right">
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[5] gravite=4}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[6] gravite=4}}
</div>
</div>
<div class="flexrow">
<div>Critiques</div>
<div class="flex-group-right">
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs" blessure=etat.blessure.[7] gravite=6}}
</div>
</div>
</div>

View File

@ -1,19 +1,18 @@
<div class="flexrow"> <div class="flexrow">
<div> <div>
{{#if carac.rollClass}} {{#if carac.rollClass}}
<a class="{{carac.rollClass}}" name="{{carac.column}}"> <a class="{{carac.rollClass}}" data-carac-name="{{carac.column}}">
{{upper carac.colName}} {{upper carac.colName}}
</a> </a>
{{else}} {{else}}
{{upper carac.colName}} {{upper carac.colName}}
{{/if}} {{/if}}
<a class="{{button-name}}-moins"><i class="fa-regular fa-square-minus"></i></a>
<a class="{{button-name}}-plus"><i class="fa-regular fa-square-plus"></i></a>
</div> </div>
<div class="flex-group-right {{actuel.rollClass}}"> <div class="flex-group-right">
<a> {{log carac.colName carac.value (eq carac.value actuel.value) actuel.value}}
{{#unless (eq carac.value actuel.value)}} {{log carac.colName carac.value (eq 1 1) actuel.value}}
{{actuel.value}} / <a class="{{actuel.rollClass}}" data-carac-name="{{actuel.column}}">{{carac.value}} {{#unless (eq carac.value actuel.value)}}(Actuel : {{actuel.value}}){{/unless}}</a>
{{/unless}}
{{carac.value}}
</a>
</div> </div>
</div> </div>

View File

@ -1,19 +1,10 @@
<div class="flexrow"> <div class="flexrow">
<div> <div>
{{#if carac.rollClass}}
<a class="{{carac.rollClass}}" name="{{carac.column}}">
{{upperFirst carac.colName}}
</a>
{{else}}
{{upperFirst carac.colName}} {{upperFirst carac.colName}}
{{/if}} <a class="{{carac.column}}-moins"><i class="fa-regular fa-square-minus"></i></a>
<a class="{{carac.column}}-plus"><i class="fa-regular fa-square-plus"></i></a>
</div>
<div class="flex-group-right">
<a class="{{actuel.rollClass}}" data-carac-name="{{actuel.column}}">{{carac.value}} {{#unless (eq carac.value actuel.value)}}(Actuel : {{actuel.value}}){{/unless}}</a>
</div> </div>
<div class="flex-group-right {{actuel.rollClass}}">
<a>
{{#unless (eq carac.value actuel.value)}}
{{actuel.value}} /
{{/unless}}
{{carac.value}}
</a>
</div>
</div> </div>

View File

@ -1,7 +1,7 @@
<div class="flexrow"> <div class="flexrow">
<div> <div>
{{#if carac.rollClass}} {{#if carac.rollClass}}
<a class="{{carac.rollClass}}" name="{{carac.column}}"> <a class="{{carac.rollClass}}" data-carac-name="{{carac.column}}">
{{upperFirst carac.colName}} {{upperFirst carac.colName}}
</a> </a>
{{else}} {{else}}

View File

@ -1,7 +1,7 @@
<div class="flexrow"> <div class="flexrow">
<div> <div>
{{#if carac.rollClass}} {{#if carac.rollClass}}
<a class="{{carac.rollClass}}" name="{{carac.column}}">{{upper carac.colName}}</a> <a class="{{carac.rollClass}}" data-carac-name="{{carac.column}}">{{upper carac.colName}}</a>
{{else}} {{else}}
{{upper carac.colName}} {{upper carac.colName}}
{{/if}} {{/if}}

View File

@ -1,6 +1,6 @@
{{#if name}} {{#if name}}
<div class="flexrow"> <div class="flexrow item" data-item-id="{{competence._id}}">
<div>{{upperFirst name}}</div> <a class="roll-competence" name="Esquive">{{upperFirst name}}</a>
<div class="flexrow"> <div class="flexrow">
<div>{{niveau}}</div> <div>{{niveau}}</div>
<div></div> <div></div>

View File

@ -0,0 +1,12 @@
<div class="flexrow">
<div>Fatigue
{{#if etat.fatigue.malus}}
({{etat.fatigue.malus}})
{{/if}}
<a class="fatigue-moins"><i class="fa-regular fa-square-minus"></i></a>
<a class="fatigue-plus"><i class="fa-regular fa-square-plus"></i></a>
</div>
<div class="flex-group-right">
{{etat.fatigue.value}}{{#if etat.fatigue.value}} / {{etat.fatigue.max}}{{/if}}
</div>
</div>

View File

@ -1,19 +1,19 @@
<div class="header-buttons"> <div class="header-buttons">
<span class="chance-appel"> <span>
<a><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/appel-chance.svg" data-tooltip="Appel à la chance"/></a> <a class="button-appel-chance"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/appel-chance.svg" data-tooltip="Appel à la chance"/></a>
</span> </span>
<span class="encaisser-direct"> <span>
<a><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a> <a class="button-encaissement"><img class="button-img" src="icons/svg/bones.svg" data-tooltip="Encaisser des dommages"/></a>
</span> </span>
<span class="ethylisme-test"> <span>
<a><img class="button-img" src="icons/svg/tankard.svg" data-tooltip="Boire"/></a> <a class="button-ethylisme"><img class="button-img" src="icons/svg/tankard.svg" data-tooltip="Boire"/></a>
</span> </span>
<span class="repos"> <span>
<a><img class="button-img" src="icons/svg/sleep.svg" data-tooltip="Se reposer"/></a> <a class="button-repos"><img class="button-img" src="icons/svg/sleep.svg" data-tooltip="Se reposer"/></a>
</span> </span>
{{#if @root.options.isGM}} {{#if @root.options.isGM}}
<span class="remise-a-neuf"> <span>
<a><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a> <a class="button-remise-a-neuf"><img class="button-img" src="icons/svg/regen.svg" data-tooltip="Remise à neuf"/></a>
</span> </span>
{{/if}} {{/if}}
</div> </div>

View File

@ -1,17 +1,17 @@
{{#if system.attributs.hautrevant.value}} {{#if system.attributs.hautrevant.value}}
<div class="tmr-buttons"> <div class="tmr-buttons">
<span class="monte-tmr"> <span>
<a data-tooltip="Montée dans les Terres M&eacute;dianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}> <a class="button-tmr" data-tooltip="Montée dans les Terres M&eacute;dianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}>
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg"/> <img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg"/>
</a> </a>
</span> </span>
<span class="monte-tmr-rapide"> <span>
<a data-tooltip="Montée accélérée dans les Terres M&eacute;dianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}> <a class="button-tmr-rapide" data-tooltip="Montée accélérée dans les Terres M&eacute;dianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}>
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg"/> <img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg"/>
</a> </a>
</span> </span>
<span class="visu-tmr"> <span>
<a data-tooltip="Regarder les Terres M&eacute;dianes"> <a class="button-tmr-visu" data-tooltip="Regarder les Terres M&eacute;dianes">
<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg"/> <img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg"/>
</a> </a>
</span> </span>