From 6b47cd3f40ac5a72c7ab46aab71f52d2201dd372 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Fri, 31 May 2024 09:23:01 +0200 Subject: [PATCH] =?UTF-8?q?Gestion=20de=20jets=20de=20competences=20et=20m?= =?UTF-8?q?odificateurs=20associ=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/.directory | 6 + images/icons/acrobatic.svg | 1 + images/icons/awareness.svg | 1 + images/icons/classical-knowledge.png | Bin 0 -> 5617 bytes images/icons/classical-knowledge.svg | 1 + images/icons/revolt.svg | 1 + images/icons/shaking-hands.svg | 1 + images/icons/strong.svg | 1 + modules/actors/tedeum-actor-sheet.js | 11 +- modules/actors/tedeum-actor.js | 53 ++++++++- modules/common/tedeum-config.js | 20 +++- modules/common/tedeum-utility.js | 65 ++++++++--- modules/dialogs/tedeum-roll-dialog.js | 17 ++- packs/competences/{000023.log => 000044.log} | 0 packs/competences/CURRENT | 2 +- packs/competences/LOG | 11 +- packs/competences/LOG.old | 16 +-- packs/competences/MANIFEST-000022 | Bin 123 -> 0 bytes packs/competences/MANIFEST-000042 | Bin 0 -> 139 bytes packs/equipment/{000085.log => 000106.log} | 0 packs/equipment/CURRENT | 2 +- packs/equipment/LOG | 10 +- packs/equipment/LOG.old | 14 +-- packs/equipment/MANIFEST-000084 | Bin 50 -> 0 bytes packs/equipment/MANIFEST-000104 | Bin 0 -> 65 bytes postcss/tedeum.css | 104 ++++++----------- styles/tedeum.css | 105 ++++++------------ templates/actors/actor-sheet.hbs | 103 +++++------------ templates/chat/chat-cephaly-result.hbs | 37 ------ templates/chat/chat-confrontation-pending.hbs | 72 ------------ templates/chat/chat-confrontation-result.hbs | 54 --------- templates/chat/chat-generic-result.hbs | 64 +++++------ templates/dialogs/roll-dialog-generic.hbs | 39 +++++-- 33 files changed, 326 insertions(+), 485 deletions(-) create mode 100644 images/.directory create mode 100644 images/icons/acrobatic.svg create mode 100644 images/icons/awareness.svg create mode 100644 images/icons/classical-knowledge.png create mode 100644 images/icons/classical-knowledge.svg create mode 100644 images/icons/revolt.svg create mode 100644 images/icons/shaking-hands.svg create mode 100644 images/icons/strong.svg rename packs/competences/{000023.log => 000044.log} (100%) delete mode 100644 packs/competences/MANIFEST-000022 create mode 100644 packs/competences/MANIFEST-000042 rename packs/equipment/{000085.log => 000106.log} (100%) delete mode 100644 packs/equipment/MANIFEST-000084 create mode 100644 packs/equipment/MANIFEST-000104 delete mode 100644 templates/chat/chat-cephaly-result.hbs delete mode 100644 templates/chat/chat-confrontation-pending.hbs delete mode 100644 templates/chat/chat-confrontation-result.hbs diff --git a/images/.directory b/images/.directory new file mode 100644 index 0000000..6c61fc9 --- /dev/null +++ b/images/.directory @@ -0,0 +1,6 @@ +[Dolphin] +SortOrder=1 +Timestamp=2024,5,30,18,14,56.568 +Version=4 +ViewMode=1 +VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails diff --git a/images/icons/acrobatic.svg b/images/icons/acrobatic.svg new file mode 100644 index 0000000..b8cec94 --- /dev/null +++ b/images/icons/acrobatic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/awareness.svg b/images/icons/awareness.svg new file mode 100644 index 0000000..2b72ce7 --- /dev/null +++ b/images/icons/awareness.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/classical-knowledge.png b/images/icons/classical-knowledge.png new file mode 100644 index 0000000000000000000000000000000000000000..4beec017eddcfe6ee6627996f8c1f4e5ffcfa836 GIT binary patch literal 5617 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&zE~)R&4YzZe)qcX+xuhE&A8z2?Zsz`(&| z_%i;Mg1NLo&4ywY4gm#+1_!@{oky62fh-0_rgVl1CMJ-$fQSJ@)6#AqkRS^WgFRT5 zrHP5nVMED8PLRF^#s};W0|E{(a7@!P0xIMXFktut(!n9X!6m_P@RF+v3}z^3Brvdei_ZjWlwha>+sVPg%F~eWQVHTP<^%j7I~f`mG%yP2 z#HN7Vn85G@Y}Ke^fgv{Z~!pA8(!W$<+Mb6Mw< G&;$SjXL1Pu literal 0 HcmV?d00001 diff --git a/images/icons/classical-knowledge.svg b/images/icons/classical-knowledge.svg new file mode 100644 index 0000000..6cae022 --- /dev/null +++ b/images/icons/classical-knowledge.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/revolt.svg b/images/icons/revolt.svg new file mode 100644 index 0000000..3c3de01 --- /dev/null +++ b/images/icons/revolt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/shaking-hands.svg b/images/icons/shaking-hands.svg new file mode 100644 index 0000000..875e24a --- /dev/null +++ b/images/icons/shaking-hands.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/strong.svg b/images/icons/strong.svg new file mode 100644 index 0000000..3ec04c7 --- /dev/null +++ b/images/icons/strong.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/actors/tedeum-actor-sheet.js b/modules/actors/tedeum-actor-sheet.js index 7922afe..ba1984a 100644 --- a/modules/actors/tedeum-actor-sheet.js +++ b/modules/actors/tedeum-actor-sheet.js @@ -70,15 +70,15 @@ export class TeDeumActorPJSheet extends ActorSheet { // Update Inventory Item html.find('.item-edit').click(ev => { - const li = $(ev.currentTarget).parents(".item") + const li = $(ev.currentTarget).parents(".item-id") 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") - EcrymeUtility.confirmDelete(this, li).catch("Error : No deletion confirmed") + const li = $(ev.currentTarget).parents(".item-id") + TeDeumUtility.confirmDelete(this, li).catch("Error : No deletion confirmed") }) html.find('.item-add').click(ev => { let dataType = $(ev.currentTarget).data("type") @@ -107,9 +107,8 @@ export class TeDeumActorPJSheet extends ActorSheet { } ); html.find('.roll-competence').click((event) => { - let categKey = $(event.currentTarget).data("category-key") - let skillKey = $(event.currentTarget).data("skill-key") - this.actor.rollSkill(categKey, skillKey) + let compId = $(event.currentTarget).data("comp-id") + this.actor.rollCompetence(compId) }); html.find('.roll-arme').click((event) => { const armeId = $(event.currentTarget).data("arme-id") diff --git a/modules/actors/tedeum-actor.js b/modules/actors/tedeum-actor.js index acf0870..99e257e 100644 --- a/modules/actors/tedeum-actor.js +++ b/modules/actors/tedeum-actor.js @@ -1,5 +1,6 @@ /* -------------------------------------------- */ import { TeDeumUtility } from "../common/tedeum-utility.js"; +import { TeDeumRollDialog } from "../dialogs/tedeum-roll-dialog.js"; /* -------------------------------------------- */ /* -------------------------------------------- */ @@ -98,8 +99,28 @@ export class TeDeumActor extends Actor { return comp; } + /* -------------------------------------------- */ + calculMalusBlessures() { + let modifierBlessures = 0 + let nbBlessures = 0 + // Cumul des malus de blessures + for (let locKey in this.system.localisation) { + let loc = this.system.localisation[locKey] + let bDef = game.system.tedeum.config.blessures[loc.blessures] + modifierBlessures += bDef.modifier + nbBlessures += bDef.count + } + // Si le nombre de blessures est supérieur au score d'endurance, alors malus supplémentaire + let endurance = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "endurance") + if ( nbBlessures > endurance.system.score) { + modifierBlessures += -1 + } + return modifierBlessures + } + /* -------------------------------------------- */ updateCarac(c, key) { + c.key = key c.name = game.system.tedeum.config.caracteristiques[key].label c.generalqualite = game.system.tedeum.config.descriptionValeur[c.value].qualite c.qualite = game.system.tedeum.config.descriptionValeur[c.value][key] @@ -124,6 +145,19 @@ export class TeDeumActor extends Actor { providence.dice = game.system.tedeum.config.providence[providence.value].diceValue return providence } + + /* -------------------------------------------- */ + modifyProvidence(value) { + let providence = foundry.utils.duplicate(this.system.providence) + providence.value = Math.min(Math.max(providence.value + value, 0), 6) + this.update( { "system.providence": providence } ) + } + /* -------------------------------------------- */ + modifyXP(key, value) { + let xp = this.system.caracteristiques[key].experience + xp = Math.max(xp + value, 0) + this.update( { [`system.caracteristiques.${key}.experience`]: xp } ) + } /* -------------------------------------------- */ filterCompetencesByCarac(key) { @@ -132,6 +166,8 @@ export class TeDeumActor extends Actor { if (c.system.isBase) { c.system.score = this.system.caracteristiques[c.system.caracteristique].value } + let caracDice = game.system.tedeum.config.descriptionValeur[this.system.caracteristiques[c.system.caracteristique].value].dice + c.system.formula = caracDice + "+" + c.system.score }) return foundry.utils.deepClone( comp || {} ) } @@ -275,26 +311,30 @@ export class TeDeumActor extends Actor { rollData.actorImg = this.img rollData.actorId = this.id rollData.img = this.img - rollData.isReroll = false + rollData.providence = this.prepareProvidence() + rollData.malusBlessures = this.calculMalusBlessures() return rollData } /* -------------------------------------------- */ - getCommonCompetence(skillid) { + getCommonCompetence(compId) { let rollData = this.getCommonRollData() - let competence = duplicate(this.items.find(it => it.type =="competence" && it.id == skillid)) + let competence = duplicate(this.items.find(it => it.type =="competence" && it.id == compId)) rollData.competence = competence + let c = foundry.utils.duplicate(this.system.caracteristiques[competence.system.caracteristique]) + this.updateCarac( c, competence.system.caracteristique) + rollData.carac = c rollData.img = competence.img return rollData } /* -------------------------------------------- */ - rollCompetence(skillId) { - let rollData = this.getCommonCompetence(skillId) + rollCompetence(compId) { + let rollData = this.getCommonCompetence(compId) rollData.mode = "competence" rollData.title = rollData.competence.name this.startRoll(rollData).catch("Error on startRoll") @@ -319,7 +359,8 @@ export class TeDeumActor extends Actor { /* -------------------------------------------- */ async startRoll(rollData) { - let rollDialog = await EcrymeRollDialog.create(this, rollData) + console.log("startRoll", rollData) + let rollDialog = await TeDeumRollDialog.create(this, rollData) rollDialog.render(true) } diff --git a/modules/common/tedeum-config.js b/modules/common/tedeum-config.js index 1ba1768..ace7e93 100644 --- a/modules/common/tedeum-config.js +++ b/modules/common/tedeum-config.js @@ -48,7 +48,7 @@ export const TEDEUM_CONFIG = { 11: { valeur: 11, qualite: "Excellent", dice: "d12", negativeDice: "d6", savoir: "Docte", sensibilite: "Subtil", entregent: "Galant", puissance: "Musculeux", complexion: "Sanguin", adresse: "Preste" }, 12: { valeur: 12, qualite: "Admirable", dice: "d20", negativeDice: "d4", savoir: "Humaniste", sensibilite: "Spirituel", entregent: "Sémillant", puissance: "Hercule", complexion: "Aguerri", adresse: "Alerte" }, }, - + diceValeur: [ "d4", "d6", "d8", "d10", "d12", "d20" ], degatsArmure : { sansarmure : { label: "Sans armure"}, cuir : { label: "Cuir"}, @@ -110,5 +110,21 @@ export const TEDEUM_CONFIG = { domesticite: { label: "Domesticité", id: "domesticite", value: 8 }, paysannerie: { label: "Paysannerie", id: "paysannerie", value: 9 }, gueux: { label: "Gueux", id: "gueux", value: 10 }, - } + }, + bonusMalus: [ + { value: "-2", label: "-2 niveaux" }, + { value: "-1", label: "-1 niveau" }, + { value: "0", label: "Aucun" }, + { value: "1", label: "+1 niveau" }, + { value: "2", label: "+2 niveaux" } + ], + blessures: [ + { value: 0, label: "Indemne", degatsMax: -1, count: 0, modifier: 0 }, + { value: 1, label: "Estafilade/Contusion", degatsMax: 2, count: 1, modifier: 0 }, + { value: 2, label: "Plaie", degatsMax: 4, count: 1, modifier: -1 }, + { value: 3, label: "Plaie béante", degatsMax: 6, count: 1, modifier: -2 }, + { value: 4, label: "Plaie atroce", degatsMax: 6, count: 1, horsCombat: true, modifier: -12 }, + { value: 5, label: "Tué net", degatsMax: 100, count: 1, horsCombat: true, mort: true, modifier: -12 } + ] + } \ No newline at end of file diff --git a/modules/common/tedeum-utility.js b/modules/common/tedeum-utility.js index 708b28e..dddda6e 100644 --- a/modules/common/tedeum-utility.js +++ b/modules/common/tedeum-utility.js @@ -131,14 +131,14 @@ export class TeDeumUtility { html.on("click", '.button-select-confront', event => { let messageId = TeDeumUtility.findChatMessageId(event.currentTarget) let message = game.messages.get(messageId) - let rollData = message.getFlag("world", "ecryme-rolldata") + let rollData = message.getFlag("world", "te-deum-rolldata") ui.notifications.info( game.i18n.localize("ECRY.chat.confrontselect")) TeDeumUtility.manageConfrontation(rollData) }) html.on("click", '.button-apply-cephaly-difficulty', event => { let messageId = TeDeumUtility.findChatMessageId(event.currentTarget) let message = game.messages.get(messageId) - let rollData = message.getFlag("world", "ecryme-rolldata") + let rollData = message.getFlag("world", "te-deum-rolldata") let difficulty = $("#" + rollData.rollId + "-cephaly-difficulty").val() TeDeumUtility.manageCephalyDifficulty(rollData, difficulty) }) @@ -317,22 +317,47 @@ export class TeDeumUtility { } /* -------------------------------------------- */ - static computeResults(rollData) { + static async computeResults(rollData) { rollData.isSuccess = false + rollData.isReussiteCritique = false + rollData.isEchecCritique = false if (!rollData.difficulty || rollData.difficulty == "-") { return } rollData.margin = rollData.total - rollData.difficulty - if (rollData.total > rollData.difficulty) { + if (rollData.total >= rollData.difficulty) { rollData.isSuccess = true - let maxMargin = rollData.skill.value + ((rollData.spec) ? 2 : 0) - rollData.margin = Math.min(rollData.margin, maxMargin) + if (rollData.total >= 2 * rollData.difficulty) { + rollData.isReussiteCritique = true + } + } + if (rollData.diceSum == 1) { + let critiqueRoll = await new Roll(rollData.carac.negativeDice).roll() + await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) + rollData.critiqueRoll = foundry.utils.duplicate(critiqueRoll) + if (critiqueRoll.total > rollData.competence.score) { + rollData.isEchecCritique = true + } } } + /* -------------------------------------------- */ + static modifyDice(dice, bonusMalus) { + let newIndex = game.system.tedeum.config.diceValeur.indexOf(dice) + Number(bonusMalus) + newIndex = Math.min(Math.max(newIndex, 0), game.system.tedeum.config.diceValeur.length - 1) + return game.system.tedeum.config.diceValeur[newIndex] + } + /* -------------------------------------------- */ static computeRollFormula(rollData, actor, isConfrontation = false) { - rollData.diceFormula = "" + let diceFormula = "" + if (rollData.competence) { + let diceBase = this.modifyDice(rollData.carac.dice, rollData.bonusMalus+rollData.malusBlessures) + diceFormula = diceBase + "x + " + rollData.competence.system.score + } + if (rollData.enableProvidence) { + diceFormula += " + " + rollData.providence.dice + } return diceFormula } @@ -342,26 +367,36 @@ export class TeDeumUtility { let actor = game.actors.get(rollData.actorId) // Fix difficulty if (!rollData.difficulty || rollData.difficulty == "-") { - rollData.difficulty = 0 + rollData.difficulty = 7 } - rollData.difficulty = Number(rollData.difficulty) + rollData.difficulty = game.system.tedeum.config.difficulte[rollData.difficulty].value let diceFormula = this.computeRollFormula(rollData, actor) // Performs roll - let myRoll = new Roll(diceFormula).roll({ async: false }) + let myRoll = await new Roll(diceFormula).roll() await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) - rollData.roll = duplicate(myRoll) + rollData.roll = foundry.utils.duplicate(myRoll) rollData.total = myRoll.total rollData.diceSum = myRoll.terms[0].total + rollData.diceFormula = diceFormula - this.computeResults(rollData) + await this.computeResults(rollData) let msg = await this.createChatWithRollMode(rollData.alias, { content: await renderTemplate(`systems/fvtt-te-deum/templates/chat/chat-generic-result.hbs`, rollData) }) - await msg.setFlag("world", "ecryme-rolldata", rollData) + await msg.setFlag("world", "te-deum-rolldata", rollData) console.log("Rolldata result", rollData) + + // Decrement providence if needed + if (rollData.enableProvidence) { + actor.modifyProvidence(-1) + } + // Manage XP + if (rollData.isReussiteCritique || rollData.isEchecCritique) { + actor.modifyXP(rollData.carac.key, 1) + } } /* -------------------------------------------- */ @@ -454,6 +489,10 @@ export class TeDeumUtility { type: "roll-data", rollMode: game.settings.get("core", "rollMode"), difficulty: "pardefaut", + bonusMalus : "0", + isReroll : false, + enableProvidence : false, + malusBlessures: 0, config: duplicate(game.system.tedeum.config) } TeDeumUtility.updateWithTarget(rollData) diff --git a/modules/dialogs/tedeum-roll-dialog.js b/modules/dialogs/tedeum-roll-dialog.js index f000c8d..2f02d9c 100644 --- a/modules/dialogs/tedeum-roll-dialog.js +++ b/modules/dialogs/tedeum-roll-dialog.js @@ -6,7 +6,7 @@ export class TeDeumRollDialog extends Dialog { static async create(actor, rollData) { let options = { classes: ["tedeum-roll-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 } - let html = await renderTemplate('systems/fvtt-tedeum/templates/dialogs/roll-dialog-generic.hbs', rollData); + let html = await renderTemplate('systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs', rollData); return new TeDeumRollDialog(actor, rollData, html, options); } @@ -38,12 +38,12 @@ export class TeDeumRollDialog extends Dialog { /* -------------------------------------------- */ roll() { - EcrymeUtility.rollEcryme(this.rollData) + TeDeumUtility.rollTeDeum(this.rollData) } /* -------------------------------------------- */ async refreshDialog() { - const content = await renderTemplate("systems/fvtt-tedeum/templates/dialogs/roll-dialog-generic.hbs", this.rollData) + const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs", this.rollData) this.data.content = content this.render(true) } @@ -61,8 +61,15 @@ export class TeDeumRollDialog extends Dialog { this.rollData.bonusMalusPerso = Number(event.currentTarget.value) }) html.find('#roll-difficulty').change((event) => { - this.rollData.difficulty = Number(event.currentTarget.value) || 0 + this.rollData.difficulty = String(event.currentTarget.value) || "pardefaut" }) - + html.find('#roll-bonus-malus').change((event) => { + this.rollData.bonusMalus = event.currentTarget.value || "0" + }) + html.find('#roll-enable-providence').change((event) => { + this.rollData.enableProvidence = event.currentTarget.checked + }) + + } } \ No newline at end of file diff --git a/packs/competences/000023.log b/packs/competences/000044.log similarity index 100% rename from packs/competences/000023.log rename to packs/competences/000044.log diff --git a/packs/competences/CURRENT b/packs/competences/CURRENT index 5af92b2..8e0a062 100644 --- a/packs/competences/CURRENT +++ b/packs/competences/CURRENT @@ -1 +1 @@ -MANIFEST-000022 +MANIFEST-000042 diff --git a/packs/competences/LOG b/packs/competences/LOG index 4bd0d55..cd95a34 100644 --- a/packs/competences/LOG +++ b/packs/competences/LOG @@ -1,3 +1,8 @@ -2024/05/06-06:55:13.182706 7f87a4a006c0 Recovering log #20 -2024/05/06-06:55:13.193417 7f87a4a006c0 Delete type=3 #18 -2024/05/06-06:55:13.193524 7f87a4a006c0 Delete type=0 #20 +2024/05/30-18:20:39.192517 7f19c60006c0 Recovering log #40 +2024/05/30-18:20:39.203008 7f19c60006c0 Delete type=3 #38 +2024/05/30-18:20:39.203069 7f19c60006c0 Delete type=0 #40 +2024/05/31-09:06:57.898180 7f19c56006c0 Level-0 table #45: started +2024/05/31-09:06:57.898214 7f19c56006c0 Level-0 table #45: 0 bytes OK +2024/05/31-09:06:57.905181 7f19c56006c0 Delete type=0 #43 +2024/05/31-09:06:57.905376 7f19c56006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end) +2024/05/31-09:06:57.905426 7f19c56006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end) diff --git a/packs/competences/LOG.old b/packs/competences/LOG.old index 4cd5e4c..705a461 100644 --- a/packs/competences/LOG.old +++ b/packs/competences/LOG.old @@ -1,8 +1,8 @@ -2024/05/05-20:14:18.376388 7f87a54006c0 Recovering log #16 -2024/05/05-20:14:18.386554 7f87a54006c0 Delete type=3 #14 -2024/05/05-20:14:18.386658 7f87a54006c0 Delete type=0 #16 -2024/05/05-22:07:39.129357 7f879e4006c0 Level-0 table #21: started -2024/05/05-22:07:39.129390 7f879e4006c0 Level-0 table #21: 0 bytes OK -2024/05/05-22:07:39.175466 7f879e4006c0 Delete type=0 #19 -2024/05/05-22:07:39.175815 7f879e4006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end) -2024/05/05-22:07:39.175892 7f879e4006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end) +2024/05/29-14:03:31.123056 7f1708c006c0 Recovering log #36 +2024/05/29-14:03:31.132934 7f1708c006c0 Delete type=3 #34 +2024/05/29-14:03:31.132990 7f1708c006c0 Delete type=0 #36 +2024/05/29-14:17:02.858350 7f17072006c0 Level-0 table #41: started +2024/05/29-14:17:02.858400 7f17072006c0 Level-0 table #41: 0 bytes OK +2024/05/29-14:17:02.865141 7f17072006c0 Delete type=0 #39 +2024/05/29-14:17:02.865366 7f17072006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end) +2024/05/29-14:17:02.865414 7f17072006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end) diff --git a/packs/competences/MANIFEST-000022 b/packs/competences/MANIFEST-000022 deleted file mode 100644 index cc74f91ea74b8d455ccd377e2d0db18099d81cae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 123 zcmaERyytof10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei1tp>w#~Kii&CZIVq_{ z#fm2W0U4R;RmlNmCT4|6;o*#$j0_+kub5eqnp><`RqkxyVQiULWEzlTm}6=ipBar|A diff --git a/packs/competences/MANIFEST-000042 b/packs/competences/MANIFEST-000042 new file mode 100644 index 0000000000000000000000000000000000000000..fd47cb824571474bffbf574d172229f5c6911fcf GIT binary patch literal 139 zcmaERyytof10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei1tp>w#~Kii&CZIVq_{ z#fm2W0U4R;RmlNmCT4|6;o*#$j0_+kub5eqnp><`RqkxyVQiULWEzlTm}68=Q?W_bSrA_b$kzk%0c*J?;Q#;t literal 0 HcmV?d00001 diff --git a/packs/equipment/000085.log b/packs/equipment/000106.log similarity index 100% rename from packs/equipment/000085.log rename to packs/equipment/000106.log diff --git a/packs/equipment/CURRENT b/packs/equipment/CURRENT index bdbe58e..c8e9be6 100644 --- a/packs/equipment/CURRENT +++ b/packs/equipment/CURRENT @@ -1 +1 @@ -MANIFEST-000084 +MANIFEST-000104 diff --git a/packs/equipment/LOG b/packs/equipment/LOG index b565d0d..da16672 100644 --- a/packs/equipment/LOG +++ b/packs/equipment/LOG @@ -1,3 +1,7 @@ -2024/05/06-06:55:13.169191 7f879fe006c0 Recovering log #82 -2024/05/06-06:55:13.180412 7f879fe006c0 Delete type=3 #80 -2024/05/06-06:55:13.180524 7f879fe006c0 Delete type=0 #82 +2024/05/30-18:20:39.177986 7f19c74006c0 Recovering log #102 +2024/05/30-18:20:39.190129 7f19c74006c0 Delete type=3 #100 +2024/05/30-18:20:39.190232 7f19c74006c0 Delete type=0 #102 +2024/05/31-09:06:57.885512 7f19c56006c0 Level-0 table #107: started +2024/05/31-09:06:57.885543 7f19c56006c0 Level-0 table #107: 0 bytes OK +2024/05/31-09:06:57.891829 7f19c56006c0 Delete type=0 #105 +2024/05/31-09:06:57.905315 7f19c56006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs/equipment/LOG.old b/packs/equipment/LOG.old index 8f421f8..30f1a67 100644 --- a/packs/equipment/LOG.old +++ b/packs/equipment/LOG.old @@ -1,7 +1,7 @@ -2024/05/05-20:14:18.363805 7f879f4006c0 Recovering log #78 -2024/05/05-20:14:18.374315 7f879f4006c0 Delete type=3 #76 -2024/05/05-20:14:18.374420 7f879f4006c0 Delete type=0 #78 -2024/05/05-22:07:39.092489 7f879e4006c0 Level-0 table #83: started -2024/05/05-22:07:39.092519 7f879e4006c0 Level-0 table #83: 0 bytes OK -2024/05/05-22:07:39.129220 7f879e4006c0 Delete type=0 #81 -2024/05/05-22:07:39.175791 7f879e4006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) +2024/05/29-14:03:31.108608 7f17096006c0 Recovering log #98 +2024/05/29-14:03:31.119647 7f17096006c0 Delete type=3 #96 +2024/05/29-14:03:31.119700 7f17096006c0 Delete type=0 #98 +2024/05/29-14:17:02.850741 7f17072006c0 Level-0 table #103: started +2024/05/29-14:17:02.850779 7f17072006c0 Level-0 table #103: 0 bytes OK +2024/05/29-14:17:02.858192 7f17072006c0 Delete type=0 #101 +2024/05/29-14:17:02.865350 7f17072006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs/equipment/MANIFEST-000084 b/packs/equipment/MANIFEST-000084 deleted file mode 100644 index 6044d193aa54283ce976d612f17bb33ac37a8b60..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAeo7@0CT8JM$J R7#b{
-
    + +
      {{#each caracList as |char key|}} -
    • - +
    • + - - - + +
    • {{/each}}
    -
      -
    • - +
        +
      • + - - + +
      • -
      • - +
      • + - - + +
      @@ -79,76 +79,27 @@ {{#each arbreCompetences as |carac key|}}
      • -

        {{carac.name}}

        - - - - +

        {{carac.name}} : {{carac.qualite}}

        + +
      • -
      {{/each}}
- {{#if hasCephaly}} - {{!-- Cephaly Tab --}} -
- -
- -
- -

{{localize "ECRY.ui.cephaly"}}

-
    - {{#each cephalySkills as |skill skillkey|}} -
  • - - - - {{localize skill.name}} - - -
  • - {{/each}} -
- -
- -
- {{#if annency}} -

{{localize "ECRY.ui.annency"}} : {{annency.name}}

-
    -
  • - - {{annency.system.base.description}} - -
  • -
- {{/if}} - -
- -
- -
- {{/if}} -
    diff --git a/templates/chat/chat-cephaly-result.hbs b/templates/chat/chat-cephaly-result.hbs deleted file mode 100644 index 3d9d9f6..0000000 --- a/templates/chat/chat-cephaly-result.hbs +++ /dev/null @@ -1,37 +0,0 @@ -
    - {{#if actorImg}} - {{alias}} - {{/if}} -

    {{alias}}

    -
    - -
    - -{{#if img}} -
    - {{alias}} -
    -{{/if}} - -
    -
      -
    • {{localize "ECRY.ui.cephaly"}} : {{localize skill.name}}
    • - - {{#if annency}} -
    • {{localize "ECRY.ui.annencybonus"}} {{annency.name}}: {{annencyBonus}}
    • - {{/if}} - - {{#if (gt marginExecution 0)}} -
    • {{localize "ECRY.ui.execution"}} {{executionTotal}} vs {{difficulty}} : {{marginExecution}}
    • -
    • {{localize cephalySuccess}}
    • - {{/if}} - - {{#if (gt marginPreservation 0)}} -
    • {{localize "ECRY.ui.preservation"}} {{preservationTotal}} vs {{difficulty}} : {{marginPreservation}}
    • -
    • {{localize cephalyFailure}}
    • - {{/if}} - -
    -
    - -
\ No newline at end of file diff --git a/templates/chat/chat-confrontation-pending.hbs b/templates/chat/chat-confrontation-pending.hbs deleted file mode 100644 index 76530b3..0000000 --- a/templates/chat/chat-confrontation-pending.hbs +++ /dev/null @@ -1,72 +0,0 @@ -
- {{#if actorImg}} - {{alias}} - {{/if}} -

{{alias}}

-
- -
- -{{#if img}} -
- {{alias}} -
-{{/if}} - -
-
    - {{#if (eq mode "cephaly")}} -
  • {{localize "ECRY.ui.cephaly"}} : {{localize skill.name}}
  • - {{else}} -
  • Confrontation : {{alias}}
  • - {{/if}} - -
  • {{localize skill.name}}: {{skill.value}}
  • - {{#if spec}} -
  • {{localize "ECRY.chat.specialization"}} {{spec.name}} (+{{spec.system.bonus}})
  • - {{/if}} - - {{#each traitsBonus as |trait idx|}} - {{#if trait.activated}} -
  • {{localize "ECRY.chat.traitbonus"}}: {{trait.name}} ({{trait.system.level}})
  • - {{/if}} - {{/each}} - {{#each traitsMalus as |trait idx|}} - {{#if trait.activated}} -
  • {{localize "ECRY.chat.traitmalus"}}: {{trait.name}} ({{trait.system.level}})
  • - {{/if}} - {{/each}} - {{#if bonusMalusTraits}} -
  • {{localize "ECRY.chat.bonusmalustraits"}}: {{bonusMalusTraits}}
  • - {{/if}} - - {{#if (isGM)}} - {{else}} -
  • {{localize "ECRY.ui.execution"}} : {{executionTotal}}
  • -
  • {{localize "ECRY.ui.preservation"}} : {{preservationTotal}}
  • - {{/if}} - -
- - {{#if (isGM)}} - {{#if (eq mode "cephaly")}} -
- {{localize "ECRY.chat.difficulty"}} - -
- - {{else}} - - {{/if}} - {{else}} -
- {{localize "ECRY.chat.sentogm"}} -
- {{/if}} -
- - \ No newline at end of file diff --git a/templates/chat/chat-confrontation-result.hbs b/templates/chat/chat-confrontation-result.hbs deleted file mode 100644 index 144d6ef..0000000 --- a/templates/chat/chat-confrontation-result.hbs +++ /dev/null @@ -1,54 +0,0 @@ -
- {{#if actorImg}} - {{alias}} - {{/if}} -

{{alias}}

-
- -
- -{{#if img}} -
- {{alias}} -
-{{/if}} - -
-
    -
  • Confrontation : {{rollData1.alias}} vs {{rollData2.alias}}
  • -
  • {{localize rollData1.skill.name}} ({{rollData1.skill.value}}) vs {{localize rollData2.skill.name}} ({{rollData2.skill.value}})
  • -
  • {{rollData1.executionTotal}} vs {{rollData2.preservationTotal}} : {{marginExecution}}
  • -
  • {{rollData1.preservationTotal}} vs {{rollData2.executionTotal}} : {{marginPreservation}}
  • - - {{#if rollData1.weapon}} -
  • {{rollData1.alias}} {{rollData1.weapon.name}} ({{rollData1.weapon.system.effect}}) -
  • - {{/if}} - - {{#if rollData2.weapon}} -
  • {{rollData2.alias}} {{rollData2.weapon.name}} ({{rollData2.weapon.system.effect}})
  • - {{/if}} - -
  • {{localize "ECRY.ui.effect"}} {{localize "ECRY.ui.execution"}} : {{effectExecution}}
  • - {{#if impactExecution}} -
  • Impact {{rollData2.alias}} : 1 {{localize (concat "ECRY.ui." impactExecution)}}
  • - - {{/if}} - {{#if bonus2}} -
  • Bonus {{rollData2.alias}} : {{bonus2}}
  • - - {{/if}} - -
  • {{localize "ECRY.ui.effect"}} {{localize "ECRY.ui.preservation"}} : {{effectPreservation}}
  • - {{#if impactPreservation}} -
  • Impact {{rollData1.alias}} : 1 {{localize (concat "ECRY.ui." impactPreservation)}}
  • - - {{/if}} - {{#if bonus1}} -
  • Bonus {{rollData1.alias}} : {{bonus1}}
  • - - {{/if}} -
-
- - \ No newline at end of file diff --git a/templates/chat/chat-generic-result.hbs b/templates/chat/chat-generic-result.hbs index 41d2a08..f0c1b38 100644 --- a/templates/chat/chat-generic-result.hbs +++ b/templates/chat/chat-generic-result.hbs @@ -18,47 +18,33 @@
    - {{#if skill}} -
  • {{localize skill.name}}: {{skill.value}}
  • - {{#if spec}} -
  • {{localize "ECRY.chat.specialization"}} {{spec.name}} (+{{spec.system.bonus}})
  • - {{/if}} - {{/if}} - - {{#if impactMalus}} -
  • {{localize "ECRY.ui.impactmalus"}}: {{impactMalus}}
  • - {{/if}} - - {{#if skillTranscendence}} -
  • {{localize "ECRY.ui.skilltranscendence"}}: {{skillTranscendence}}
  • - {{/if}} - - {{#if traitsBonusList}} - {{#each traitsBonusList as |trait idx|}} -
  • {{localize "ECRY.chat.traitbonus"}}: {{trait.name}} ({{trait.system.level}})
  • - {{/each}} - {{/if}} - {{#if traitsMalusList}} - {{#each traitsMalusList as |trait idx|}} -
  • {{localize "ECRY.chat.traitmalus"}}: {{trait.name}} ({{trait.system.level}})
  • - {{/each}} - {{/if}} - {{#if bonusMalusTraits}} -
  • {{localize "ECRY.chat.bonusmalustraits"}}: {{bonusMalusTraits}}
  • - {{/if}} - -
  • {{localize "ECRY.chat.formula"}}: {{diceFormula}}
  • -
  • {{localize "ECRY.chat.dicesum"}}: {{diceSum}}
  • -
  • {{localize "ECRY.chat.result"}}: {{total}}
  • - {{#if difficulty}} -
  • {{localize "ECRY.chat.difficulty"}}: {{difficulty}} - {{localize "ECRY.chat.margin"}}: {{margin}}
  • - {{#if isSuccess}} -
  • - {{else}} -
  • - {{/if}} + {{#if carac}} +
  • {{carac.name}}: {{carac.qualite}} ({{carac.dice}})
  • + {{/if}} + {{#if competence}} +
  • {{competence.name}}: {{competence.system.score}}
  • + {{/if}} + {{#if bonusMalus}} +
  • Bonus/Malus: {{bonusMalus}}
  • + {{/if}} + {{#if enableProvidence}} +
  • Un niveau de Providence a été utilisé !
  • {{/if}} +
  • Dés: {{diceFormula}}
  • +
  • Difficulté: {{difficulty}}
  • +
  • Résultat: {{total}}
  • + {{#if isSuccess}} +
  • Succès !
  • + {{#if isReussiteCritique}} +
  • Réussite critique ! 1 XP gagné en {{carac.name}}.
  • + {{/if}} + {{else}} +
  • Echec !
  • + {{#if isEchecCritique}} +
  • Echec critique ! 1 XP gagné en {{carac.name}}.
  • + {{/if}} + {{/if}}
diff --git a/templates/dialogs/roll-dialog-generic.hbs b/templates/dialogs/roll-dialog-generic.hbs index 4359a22..d0455d5 100644 --- a/templates/dialogs/roll-dialog-generic.hbs +++ b/templates/dialogs/roll-dialog-generic.hbs @@ -7,18 +7,43 @@
+
+ Caracteristique + {{carac.name}} : {{carac.qualite}} ({{carac.dice}}) +
- {{> systems/fvtt-ecryme/templates/dialogs/partial-common-roll-dialog.hbs}} + {{#if competence}} +
+ Compétence + {{competence.name}} ({{competence.system.score}}) +
+ {{/if}} + + {{#if malusBlessures}} +
+ Malus Blessures + {{malusBlessures}} niveaux +
+ {{/if}} + +
+ Bonus/Malus : + +
+ + {{#if providence.value}} +
+ Utiliser la Providence ({{providence.dice}}) + +
+ {{/if}}
Difficulté :