From 025d7a2740618edf8570d72a83abea0b8872475a Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 31 Oct 2022 09:10:23 +0100 Subject: [PATCH] Gestion intensite --- modules/imperium5-actor-pm-sheet.js | 144 ++++++++++ modules/imperium5-actor-sheet.js | 27 -- modules/imperium5-actor.js | 6 + modules/imperium5-main.js | 2 + modules/imperium5-roll-dialog.js | 6 +- modules/imperium5-utility.js | 138 ++++----- styles/simple.css | 6 +- system.json | 4 +- template.json | 34 ++- templates/actor-pm-sheet.html | 415 ++++++++++++++++++++++++++++ templates/chat-generic-result.html | 188 +++++++------ templates/roll-dialog-generic.html | 46 +-- 12 files changed, 807 insertions(+), 209 deletions(-) create mode 100644 modules/imperium5-actor-pm-sheet.js create mode 100644 templates/actor-pm-sheet.html diff --git a/modules/imperium5-actor-pm-sheet.js b/modules/imperium5-actor-pm-sheet.js new file mode 100644 index 0000000..5e46c7c --- /dev/null +++ b/modules/imperium5-actor-pm-sheet.js @@ -0,0 +1,144 @@ +/** + * Extend the basic ActorSheet with some very simple modifications + * @extends {ActorSheet} + */ + +import { Imperium5Utility } from "./imperium5-utility.js"; +import { Imperium5RollDialog } from "./imperium5-roll-dialog.js"; + +/* -------------------------------------------- */ +export class Imperium5ActorPMSheet extends ActorSheet { + + /** @override */ + static get defaultOptions() { + + return mergeObject(super.defaultOptions, { + classes: ["fvtt-imperium5", "sheet", "actor"], + template: "systems/fvtt-imperium5/templates/actor-pm-sheet.html", + width: 720, + height: 760, + tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }], + dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }], + editScore: true + }); + } + + /* -------------------------------------------- */ + async getData() { + let actorData = duplicate(this.object.system) + + let formData = { + title: this.title, + id: this.actor.id, + type: this.actor.type, + img: this.actor.img, + name: this.actor.name, + editable: this.isEditable, + cssClass: this.isEditable ? "editable" : "locked", + system: actorData, + archetype: this.actor.getArchetype(), + specialites: this.actor.getSpecialites(), + familiarites: this.actor.getFamiliarites(), + nature: this.actor.getNatureProfonde(), + traits: this.actor.getTraits(), + symbioses: this.actor.getSymbioses(), + equipements: this.actor.getEquipements(), + capacites: this.actor.getCapacites(), + singularites: this.actor.getSingularites(), + contacts: this.actor.getContacts(), + effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)), + limited: this.object.limited, + options: this.options, + owner: this.document.isOwner, + editScore: this.options.editScore, + isGM: game.user.isGM + } + this.formData = formData; + + console.log("PM : ", formData, this.object); + return formData; + } + /* -------------------------------------------- */ + /** @override */ + activateListeners(html) { + super.activateListeners(html); + + // Everything below here is only needed if the sheet is editable + if (!this.options.editable) return; + + html.bind("keydown", function(e) { // Ignore Enter in actores sheet + if (e.keyCode === 13) return false; + }); + + // Update Inventory Item + html.find('.item-edit').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + let itemId = li.data("item-id"); + const item = this.actor.items.get( itemId ); + item.sheet.render(true); + }); + // Delete Inventory Item + html.find('.item-delete').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + Imperium5Utility.confirmDelete(this, li); + }); + + + html.find('.quantity-minus').click(event => { + const li = $(event.currentTarget).parents(".item"); + this.actor.incDecQuantity( li.data("item-id"), -1 ); + } ); + html.find('.quantity-plus').click(event => { + const li = $(event.currentTarget).parents(".item"); + this.actor.incDecQuantity( li.data("item-id"), +1 ); + } ); + + html.find('.lock-unlock-sheet').click((event) => { + this.options.editScore = !this.options.editScore; + this.render(true); + }); + html.find('.item-link a').click((event) => { + const itemId = $(event.currentTarget).data("item-id") + const item = this.actor.getOwnedItem(itemId); + item.sheet.render(true); + }); + html.find('.item-equip').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + this.actor.equipItem( li.data("item-id") ); + this.render(true); + }); + html.find('.update-field').change(ev => { + const fieldName = $(ev.currentTarget).data("field-name"); + let value = Number(ev.currentTarget.value); + this.actor.update( { [`${fieldName}`]: value } ); + }); + + } + + /* -------------------------------------------- */ + /** @override */ + setPosition(options = {}) { + const position = super.setPosition(options); + const sheetBody = this.element.find(".sheet-body"); + const bodyHeight = position.height - 192; + sheetBody.css("height", bodyHeight); + return position; + } + + /* -------------------------------------------- */ + async _onDropItemUNUSED(event, dragData) { + let item = await Imperium5Utility.searchItem( dragData) + if (item == undefined) { + item = this.actor.items.get( dragData.data._id ) + } + //this.actor.preprocessItem( event, item, true ) + super._onDropItem(event, dragData) + } + + /* -------------------------------------------- */ + /** @override */ + _updateObject(event, formData) { + // Update the Actor + return this.object.update(formData); + } +} diff --git a/modules/imperium5-actor-sheet.js b/modules/imperium5-actor-sheet.js index 5d20d75..06213e3 100644 --- a/modules/imperium5-actor-sheet.js +++ b/modules/imperium5-actor-sheet.js @@ -59,32 +59,6 @@ export class Imperium5ActorSheet extends ActorSheet { return formData; } - /* -------------------------------------------- */ - async openGenericRoll() { - let rollData = Imperium5Utility.getBasicRollData() - rollData.alias = "Dice Pool Roll", - rollData.mode = "generic" - rollData.title = `Dice Pool Roll` - rollData.img = "icons/dice/d12black.svg" - - let rollDialog = await Imperium5RollDialog.create( this.actor, rollData); - rollDialog.render( true ); - } - - /* -------------------------------------------- */ - async rollIDR( itemId, diceValue) { - let item = this.actor.items.get( itemId) ?? {name: "Unknown"} - let myRoll = new Roll(diceValue+"x").roll({ async: false }) - await Imperium5Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) - let chatData = { - user: game.user.id, - rollMode: game.settings.get("core", "rollMode"), - whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')), - content: `${this.actor.name} has roll IDR for ${item.name} : ${myRoll.total}` - } - ChatMessage.create(chatData) - } - /* -------------------------------------------- */ /** @override */ activateListeners(html) { @@ -183,7 +157,6 @@ export class Imperium5ActorSheet extends ActorSheet { /* -------------------------------------------- */ async _onDropItemUNUSED(event, dragData) { - console.log(">>>>>> DROPPED!!!!") let item = await Imperium5Utility.searchItem( dragData) if (item == undefined) { item = this.actor.items.get( dragData.data._id ) diff --git a/modules/imperium5-actor.js b/modules/imperium5-actor.js index 70c8369..b10ccf2 100644 --- a/modules/imperium5-actor.js +++ b/modules/imperium5-actor.js @@ -111,6 +111,10 @@ export class Imperium5Actor extends Actor { let item = duplicate(this.items.filter( it => it.type == "contact") || [] ) return item } + getResources() { + let item = duplicate(this.items.filter( it => it.type == "equipement" || it.type == "singularite" || it.type == "capacite" || it.type == "contact") || [] ) + return item + } getUnusedParadigmes() { let paraList = [] for(let k in this.system.paradigmes) { @@ -276,6 +280,8 @@ export class Imperium5Actor extends Actor { rollData.img = this.img rollData.capacites = this.getUnusedCapacites() rollData.paradigmes = this.getUnusedParadigmes() + rollData.ressources = this.getResources() + rollData.selectedRessources = [] rollData.selectedParadigme = "none" rollData.karma = this.system.karma.value diff --git a/modules/imperium5-main.js b/modules/imperium5-main.js index 7e46813..19e8a9a 100644 --- a/modules/imperium5-main.js +++ b/modules/imperium5-main.js @@ -11,6 +11,7 @@ import { Imperium5Actor } from "./imperium5-actor.js"; import { Imperium5ItemSheet } from "./imperium5-item-sheet.js"; import { Imperium5ActorSheet } from "./imperium5-actor-sheet.js"; +import { Imperium5ActorPMSheet } from "./imperium5-actor-pm-sheet.js"; import { Imperium5Utility } from "./imperium5-utility.js"; import { Imperium5Combat } from "./imperium5-combat.js"; import { Imperium5Item } from "./imperium5-item.js"; @@ -50,6 +51,7 @@ Hooks.once("init", async function () { // Register sheet application classes Actors.unregisterSheet("core", ActorSheet) Actors.registerSheet("fvtt-imperium5", Imperium5ActorSheet, { types: ["character"], makeDefault: true }) + Actors.registerSheet("fvtt-imperium5", Imperium5ActorPMSheet, { types: ["pm"], makeDefault: true }) Items.unregisterSheet("core", ItemSheet) Items.registerSheet("fvtt-imperium5", Imperium5ItemSheet, { makeDefault: true } ) diff --git a/modules/imperium5-roll-dialog.js b/modules/imperium5-roll-dialog.js index 6e66ccd..d8ef41b 100644 --- a/modules/imperium5-roll-dialog.js +++ b/modules/imperium5-roll-dialog.js @@ -68,14 +68,14 @@ export class Imperium5RollDialog extends Dialog { this.rollData.useArchetype = event.currentTarget.checked this.updatePCPool() }) - html.find('#select-use-aide').change(async (event) => { - this.rollData.useAide = event.currentTarget.checked + html.find('#select-aide-pj').change(async (event) => { + this.rollData.nbAide = Number(event.currentTarget.value) this.updatePCPool() }) html.find('#select-use-karma').change(async (event) => { this.rollData.useKarma = event.currentTarget.checked this.updatePCPool() - }) + }) } } \ No newline at end of file diff --git a/modules/imperium5-utility.js b/modules/imperium5-utility.js index 669cac8..4692df2 100644 --- a/modules/imperium5-utility.js +++ b/modules/imperium5-utility.js @@ -13,6 +13,7 @@ export class Imperium5Utility { /* -------------------------------------------- */ static async init() { Hooks.on('renderChatLog', (log, html, data) => Imperium5Utility.chatListeners(html)); + Hooks.on("getChatLogEntryContext", (html, options) => Imperium5Utility.chatRollMenu(html, options)) Hooks.on("getCombatTrackerEntryContext", (html, options) => { Imperium5Utility.pushInitiativeOptions(html, options); @@ -53,11 +54,11 @@ export class Imperium5Utility { for (var i = from; i < to; i += incr) accum += block.fn(i); return accum; - }) - Handlebars.registerHelper('times', function(n, block) { + }) + Handlebars.registerHelper('times', function (n, block) { var accum = ''; - for(var i = 1; i <= n; ++i) - accum += block.fn(i); + for (var i = 1; i <= n; ++i) + accum += block.fn(i); return accum; }) } @@ -72,9 +73,9 @@ export class Imperium5Utility { default: false, type: Boolean }) - game.settings.register("fvtt-imperium5", "use-singularite", { - name: "Utilisation complémentaire des Singularités", - hint: "Si coché, les Singularités peuvent permettre de réduire de 1 la valeur d'un dé", + game.settings.register("fvtt-imperium5", "use-specialite", { + name: "Utilisation complémentaire des Spécialités", + hint: "Si coché, les Spécialités peuvent permettre de réduire de 1 la valeur d'un dé", scope: "world", config: true, default: false, @@ -129,11 +130,11 @@ export class Imperium5Utility { this.applyParadigme(rollData, paraKey) }) - html.on("click", '.apply-singularite', event => { + html.on("click", '.apply-specialite', event => { let resultIndex = $(event.currentTarget).data("result-index") let rollData = this.getRollDataFromMessage(event) rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget) - this.applySingularite(rollData, resultIndex) + this.applySpecialite(rollData, resultIndex) }) html.on("change", '.transfer-success', event => { @@ -142,7 +143,24 @@ export class Imperium5Utility { rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget) this.applySuccessTransfer(rollData, nbSuccess) }) - + + html.on("change", '.select-ressource', async event => { + // Filter / remove the ressource + let rollData = this.getRollDataFromMessage(event) + let ressource = rollData.ressources.find(r => r._id == event.currentTarget.value) + rollData.selectedRessources.push(ressource) + rollData.ressources = rollData.ressources.filter(r => r._id != event.currentTarget.value) + rollData.realSuccessPC--; + this.computeIntensite(rollData) + // Update the roll data in the message + rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget) + let msg = await this.createChatWithRollMode(rollData.alias, { + content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData) + }) + msg.setFlag("world", "imperium5-roll-data", rollData) + this.removeChatMessageId(rollData.previousMessageId) + }) + } /* -------------------------------------------- */ @@ -237,24 +255,22 @@ export class Imperium5Utility { } /* -------------------------------------------- */ - static updateRollData(rollData) { - - let id = rollData.rollId; - let oldRollData = this.rollDataStore[id] || {}; - let newRollData = mergeObject(oldRollData, rollData); - this.rollDataStore[id] = newRollData; - } - /* -------------------------------------------- */ - static saveRollData(rollData) { - game.socket.emit("system.fvtt-imperium5", { - name: "msg_update_roll", data: rollData - }); // Notify all other clients of the roll - this.updateRollData(rollData); - } - - /* -------------------------------------------- */ - static getRollData(id) { - return this.rollDataStore[id]; + static chatRollMenu(html, options) { + let canApply = li => canvas.tokens.controlled.length && li.find(".imperium5-roll").length + let canApplyIntensite = function (li) { + let message = game.messages.get(li.attr("data-message-id")) + let rollData = message.getFlag("world", "imperium5-roll-data") + return (rollData.currentIntensite > 0) + } + options.push( + { + name: "Ajouer +3 (1 point de Bonne Aventure)", + icon: "", + condition: canApply && canApplyIntensite, + callback: li => Imperium5Utility.applyBonneAventureRoll(li, -1, "+3") + } + ) + return options } /* -------------------------------------------- */ @@ -330,7 +346,7 @@ export class Imperium5Utility { let capa = rollData.capacites.find(c => c._id == rollData.usedCapacite) capaDice = capa.system.aide } - let val = rollData.ame.value + capaDice + ((rollData.useKarma) ? 1 : 0) + ((rollData.useArchetype) ? 1 : 0) + ((rollData.useAide) ? 1 : 0) + rollData.ameMalus + let val = rollData.ame.value + capaDice + ((rollData.useKarma) ? 1 : 0) + ((rollData.useArchetype) ? 1 : 0) + rollData.nbAide + rollData.ameMalus return Math.max(val, 0) } @@ -350,8 +366,21 @@ export class Imperium5Utility { if (rollData.useEntropieReussite && myRoll.terms[2].results[0].result == 7) { rollData.successGM++ } - // Calcul unité de narration - rollData.nbUnitesNarration = Math.max(rollData.successPC - 1, 0) + } + + /* -------------------------------------------- */ + static computeIntensite(rollData) { + rollData.totalIntensite = 0 + let pi = 3 + let nbSuccess = rollData.realSuccessPC + while (nbSuccess) { + rollData.totalIntensite += pi + pi = 2 // 3 for the first, 2 after + nbSuccess-- + } + for(let r of rollData.selectedRessources) { + rollData.totalIntensite += r.system.ressource + } } /* -------------------------------------------- */ @@ -386,6 +415,7 @@ export class Imperium5Utility { // Calcul réussites this.computeReussites(rollData) rollData.realSuccessPC = rollData.successPC // To manage source transfer + this.computeIntensite(rollData) let msg = await this.createChatWithRollMode(rollData.alias, { content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData) @@ -412,12 +442,12 @@ export class Imperium5Utility { } /* -------------------------------------------- */ - static async applySingularite(rollData, resultIndex) { + static async applySpecialite(rollData, resultIndex) { let res = rollData.resultsPC[resultIndex] - res.result = (res.result > 1) ? res.result-1 : res.result + res.result = (res.result > 1) ? res.result - 1 : res.result this.computeReussites(rollData) - rollData.useSingularites = false - rollData.singulariteApplied = true + rollData.useSpecialite = false + rollData.specialiteApplied = true let msg = await this.createChatWithRollMode(rollData.alias, { content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData) }) @@ -428,10 +458,9 @@ export class Imperium5Utility { /* ------------------------- ------------------- */ static async applySuccessTransfer(rollData, nbSuccess) { let actor = game.actors.get(rollData.actorId) - actor.transferToSource( nbSuccess) + actor.transferToSource(nbSuccess) rollData.realSuccessPC -= nbSuccess rollData.sourceTransfer = nbSuccess - rollData.nbUnitesNarration = Math.max(rollData.realSuccessPC - 1, 0) let msg = await this.createChatWithRollMode(rollData.alias, { content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData) }) @@ -439,36 +468,6 @@ export class Imperium5Utility { this.removeChatMessageId(rollData.previousMessageId) } - /* ------------------------- ------------------- */ - static async updateRoll(rollData) { - - let diceResults = rollData.diceResults - let sortedRoll = [] - for (let i = 0; i < 10; i++) { - sortedRoll[i] = 0; - } - for (let dice of diceResults) { - sortedRoll[dice.result]++ - } - let index = 0; - let bestRoll = 0; - for (let i = 0; i < 10; i++) { - if (sortedRoll[i] > bestRoll) { - bestRoll = sortedRoll[i] - index = i - } - } - let bestScore = (bestRoll * 10) + index - rollData.bestScore = bestScore - rollData.finalScore = bestScore + rollData.negativeModifier + rollData.positiveModifier - - this.saveRollData(rollData) - - this.createChatWithRollMode(rollData.alias, { - content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-generic-result.html`, rollData) - }); - } - /* ------------------------- ------------------- */ static async rerollDice(actorId, diceIndex = -1) { let actor = game.actors.get(actorId) @@ -562,12 +561,13 @@ export class Imperium5Utility { realiteDice: 0, ameMalus: 0, useArchetype: false, - useAide: false, + nbAide: 0, useKarma: false, usedCapacite: "none", seuil: 2, + currentIntensite: -1, nbSuccessSource: 0, - useSingularites: game.settings.get("fvtt-imperium5", "use-singularite"), + useSpecialite: game.settings.get("fvtt-imperium5", "use-specialite"), useEntropieReussite: game.settings.get("fvtt-imperium5", "use-entropie-reussite") } Imperium5Utility.updateWithTarget(rollData) diff --git a/styles/simple.css b/styles/simple.css index 38ec26a..d8d2576 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -57,10 +57,10 @@ /* Fonts */ .sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item { - font-size: 1.0rem; + font-size: 0.8rem; } /* For title, sidebar character and scene */ .sheet nav.sheet-tabs { - font-size: 1.2rem; + font-size: 0.8rem; } /* For nav and title */ .window-app input, .foundryvtt-vadentis .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { font-size: 0.8rem; @@ -446,7 +446,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} } .sheet nav.sheet-tabs { - font-size: 1.0rem; + font-size: 0.8rem; font-weight: bold; height: 2.5rem; flex: 0 0 3rem; diff --git a/system.json b/system.json index abd786d..df9e4a8 100644 --- a/system.json +++ b/system.json @@ -7,7 +7,7 @@ "flags": {} } ], - "version": "10.0.6", + "version": "10.0.9", "compatibility": { "minimum": "10", "verified": "10", @@ -67,5 +67,5 @@ "background": "images/ui/imperium5_welcome_page.webp", "url": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5", "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5/raw/branch/master/system.json", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5/archive/fvtt-imperium5-v10.0.6.zip" + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5/archive/fvtt-imperium5-v10.0.7.zip" } \ No newline at end of file diff --git a/template.json b/template.json index 1a982d8..f03d2d4 100644 --- a/template.json +++ b/template.json @@ -1,7 +1,8 @@ { "Actor": { "types": [ - "character" + "character", + "pm" ], "templates": { "biodata": { @@ -21,7 +22,8 @@ "description": "", "rebuild": "", "contacts": "", - "gmnotes": "" + "gmnotes": "", + "archetype": "" } }, "core": { @@ -126,6 +128,20 @@ "seuil": 0, "reserve": 0 } + }, + "pmcore": { + "ames": { + "niveau": 0, + "intensite": 1, + "riposte": 1, + "cohesions": [ + { + "max": 1, + "value": 1 + } + ], + "rupture": 0 + } } }, "character": { @@ -133,6 +149,12 @@ "biodata", "core" ] + }, + "pm": { + "templates": [ + "biodata", + "pmcore" + ] } }, "Item": { @@ -168,7 +190,7 @@ "description": "" }, "ressource": { - "value": 0, + "ressource": 0, "description": "" }, "capacite": { @@ -178,15 +200,15 @@ "description": "" }, "singularite": { - "value": 0, + "ressource": 0, "description": "" }, "equipement": { - "value": 0, + "ressource": 0, "description": "" }, "contact": { - "value": 0, + "ressource": 0, "description": "" } } diff --git a/templates/actor-pm-sheet.html b/templates/actor-pm-sheet.html new file mode 100644 index 0000000..1d1d0d8 --- /dev/null +++ b/templates/actor-pm-sheet.html @@ -0,0 +1,415 @@ +
+ + {{!-- Sheet Header --}} +
+
+
+
+

+ {{!-- Sheet Tab Navigation --}} + +
+ +
+
+
+ + {{!-- Sheet Body --}} +
+ + {{!-- Combat Tab --}} +
+ +
+ +
+
+ + +

AMES

+
+ +
+ +

Niveau

+ +
+ + +

Intensité

+ +
+
+ +
+
+ +
+
+ + +

ARCHETYPE

+
+

+
    +
  • + + {{archetype.name}} +
     
    +
    + + +
    +
  • +
+ +

Spécialités

+
    + {{#each specialites as |spec key|}} +
  • + + {{spec.name}} +
     
    +
    + + +
    +
  • + {{/each}} +
+ +

Familiarités :

+
    + {{#each familiarites as |fami key|}} +
  • + + {{fami.name}} +
     
    +
    + + +
    +
  • + {{/each}} +
+ +
+
+
+ +
+ +
+ + + +

PARADIGMES

+
+
    + {{> systems/fvtt-imperium5/templates/actor-partial-paradigmes.html}} +
+
+ +
+ + + +

NATURE PROFONDE

+
+
    +
  • + + {{nature.name}} +
     
    +
    + + +
    +
  • +
+ +

Traits

+
    + {{#each traits as |trait key|}} +
  • + + {{trait.name}} +
     
    +
    + + +
    +
  • + {{/each}} +
+ +

Symbioses :

+
    + {{#each symbioses as |symbiose key|}} +
  • + + {{symbiose.name}} +
     
    +
    + + +
    +
  • + {{/each}} +
+
+ + +
+ +
+ + {{!-- Equipement Tab --}} +
+ +
+ +
+
    +
  • + +

    +
    + + + +
  • + {{#each equipements as |equip key|}} +
  • + + {{equip.name}} + {{equip.system.value}} + +
     
    +
    + + +
    +
  • + {{/each}} +
+
+ +
+
    +
  • + +

    +
    + + + + + + +
  • + {{#each capacites as |capa key|}} +
  • + + {{capa.name}} + {{capa.system.aide}} + {{capa.system.ressource}} + +
     
    +
    + + +
    +
  • + {{/each}} +
+
+ +
+ +
+ +
+
    +
  • + +

    +
    + + + +
  • + {{#each singularites as |singul key|}} +
  • + + {{singul.name}} + {{singul.system.value}} + +
     
    +
    + + +
    +
  • + {{/each}} +
+
+ +
+
    +
  • + +

    +
    + + + +
  • + {{#each contacts as |contact key|}} +
  • + + {{contact.name}} + {{contact.system.value}} + +
     
    +
    + + +
    +
  • + {{/each}} +
+
+ + +
+ +
+ + {{!-- Biography Tab --}} +
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
+
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
    +
    + +
    +
    +

    Apparence actuelle :

    +
    + {{editor system.biodata.appactual target="system.biodata.appactual" button=true owner=owner + editable=editable}} +
    +
    +
    +

    Autres identités :

    +
    + {{editor system.biodata.identities target="system.biodata.identities" button=true owner=owner + editable=editable}} +
    +
    +
    + +
    +
    +

    Traits particuliers :

    +
    + {{editor system.biodata.traits target="system.biodata.traits" button=true owner=owner + editable=editable}} +
    +
    +
    +

    Souvenirs quantiques :

    +
    + {{editor system.biodata.memories target="system.biodata.memories" button=true owner=owner + editable=editable}} +
    +
    +
    + +
    +
    +

    Rebuild :

    +
    + {{editor system.biodata.rebuild target="system.biodata.rebuild" button=true owner=owner + editable=editable}} +
    +
    +
    +

    Relations, contacts et acolytes :

    +
    + {{editor system.biodata.contacts target="system.biodata.contacts" button=true owner=owner + editable=editable}} +
    +
    +
    + +

    Qui suis-je :

    +
    + {{editor system.biodata.whoami target="system.biodata.whoami" button=true owner=owner + editable=editable}} +
    +
    +

    Notes :

    +
    + {{editor system.biodata.notes target="system.biodata.notes" button=true owner=owner editable=editable}} +
    +
    + +
    + +
    +
    \ No newline at end of file diff --git a/templates/chat-generic-result.html b/templates/chat-generic-result.html index fb5388b..2e4919e 100644 --- a/templates/chat-generic-result.html +++ b/templates/chat-generic-result.html @@ -5,90 +5,118 @@

    {{alias}}

    -
    - -
    -
    +
    -
    -
    + {{#if realSuccessPC}} +
  • Ressource : + +
  • + {{/if}} + + {{#if (count selectedRessources)}} +
  • Ressources utilisées :
  • + + + {{/if}} + + {{#if totalIntensite}} +
  • Intensité totale : {{totalIntensite}}
  • + {{/if}} + + {{#if sourceTransfer}} +
  • Succés transférés à la Source : {{sourceTransfer}}
  • + {{/if}} + +
  • Succés de Réalité : {{successGM}}
  • + + {{#if nbKarma}} +
  • Points de Karma utilisés : {{nbKarma}}
  • + {{/if}} + + {{#if bonPresage}} +
  • Bon Présage !
  • + {{/if}} + {{#if mauvaisPresage}} +
  • Mauvais Présage !
  • + {{/if}} + + + + + \ No newline at end of file diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html index 0dda622..5f15802 100644 --- a/templates/roll-dialog-generic.html +++ b/templates/roll-dialog-generic.html @@ -9,33 +9,41 @@
    - Malus : {{ameMalus}} + Ruptures : {{ameMalus}}
    Utiliser l'Archetype ? :
    - Aide d'un autre personnage ? : - + Aides ? : +
    {{#if karma}} -
    - Utiliser une capacité : - -
    -
    - Utiliser 1 Point de Karma ? : - -
    +
    + Utiliser une capacité : + +
    +
    + Utiliser 1 Point de Karma ? : + +
    {{/if}}
    Total : {{ame.value}}d8