From 91ad26730a865f06d09f0631bdc0b5ff816c49c7 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Fri, 22 Dec 2023 09:30:26 +0100 Subject: [PATCH] Automatisations de combats, WIP --- modules/mournblade-actor-sheet.js | 1 + modules/mournblade-actor.js | 13 +++ modules/mournblade-config.js | 15 +++ modules/mournblade-item-sheet.js | 1 + modules/mournblade-main.js | 5 +- modules/mournblade-roll-dialog.js | 17 ++- modules/mournblade-utility.js | 105 +++++++++++++++-- packs/armes/{000040.log => 000048.log} | 0 packs/armes/CURRENT | 2 +- packs/armes/LOG | 16 +-- packs/armes/LOG.old | 16 +-- packs/armes/MANIFEST-000038 | Bin 134 -> 0 bytes packs/armes/MANIFEST-000046 | Bin 0 -> 134 bytes packs/dons/{000040.log => 000048.log} | 0 packs/dons/CURRENT | 2 +- packs/dons/LOG | 16 +-- packs/dons/LOG.old | 16 +-- packs/dons/MANIFEST-000038 | Bin 134 -> 0 bytes packs/dons/MANIFEST-000046 | Bin 0 -> 134 bytes packs/equipement/{000040.log => 000048.log} | 0 packs/equipement/CURRENT | 2 +- packs/equipement/LOG | 16 +-- packs/equipement/LOG.old | 16 +-- packs/equipement/MANIFEST-000038 | Bin 134 -> 0 bytes packs/equipement/MANIFEST-000046 | Bin 0 -> 134 bytes packs/heritages/{000040.log => 000048.log} | 0 packs/heritages/CURRENT | 2 +- packs/heritages/LOG | 16 +-- packs/heritages/LOG.old | 16 +-- .../{MANIFEST-000038 => MANIFEST-000046} | Bin 134 -> 134 bytes packs/metiers/{000040.log => 000048.log} | 0 packs/metiers/CURRENT | 2 +- packs/metiers/LOG | 16 +-- packs/metiers/LOG.old | 16 +-- packs/metiers/MANIFEST-000038 | Bin 134 -> 0 bytes packs/metiers/MANIFEST-000046 | Bin 0 -> 134 bytes packs/origines/{000040.log => 000048.log} | 0 packs/origines/CURRENT | 2 +- packs/origines/LOG | 16 +-- packs/origines/LOG.old | 16 +-- packs/origines/MANIFEST-000038 | Bin 134 -> 0 bytes packs/origines/MANIFEST-000046 | Bin 0 -> 134 bytes packs/protection/{000040.log => 000048.log} | 0 packs/protection/CURRENT | 2 +- packs/protection/LOG | 16 +-- packs/protection/LOG.old | 16 +-- packs/protection/MANIFEST-000038 | Bin 134 -> 0 bytes packs/protection/MANIFEST-000046 | Bin 0 -> 134 bytes packs/runes/{000040.log => 000048.log} | 0 packs/runes/CURRENT | 2 +- packs/runes/LOG | 16 +-- packs/runes/LOG.old | 16 +-- packs/runes/MANIFEST-000038 | Bin 135 -> 0 bytes packs/runes/MANIFEST-000046 | Bin 0 -> 135 bytes packs/skills/{000040.log => 000048.log} | 0 packs/skills/CURRENT | 2 +- packs/skills/LOG | 16 +-- packs/skills/LOG.old | 16 +-- packs/skills/MANIFEST-000038 | Bin 134 -> 0 bytes packs/skills/MANIFEST-000046 | Bin 0 -> 134 bytes packs/tables/{000040.log => 000048.log} | 0 packs/tables/CURRENT | 2 +- packs/tables/LOG | 16 +-- packs/tables/LOG.old | 16 +-- .../{MANIFEST-000038 => MANIFEST-000046} | Bin 161 -> 161 bytes packs/tendances/{000040.log => 000048.log} | 0 packs/tendances/CURRENT | 2 +- packs/tendances/LOG | 16 +-- packs/tendances/LOG.old | 16 +-- packs/tendances/MANIFEST-000038 | Bin 135 -> 0 bytes packs/tendances/MANIFEST-000046 | Bin 0 -> 135 bytes .../{000040.log => 000048.log} | 0 packs/traits-chaotiques/CURRENT | 2 +- packs/traits-chaotiques/LOG | 16 +-- packs/traits-chaotiques/LOG.old | 16 +-- packs/traits-chaotiques/MANIFEST-000038 | Bin 134 -> 0 bytes packs/traits-chaotiques/MANIFEST-000046 | Bin 0 -> 134 bytes styles/simple.css | 5 + templates/chat-degats-result.html | 11 +- templates/chat-generic-result.html | 27 ++++- templates/roll-dialog-generic.html | 107 ++++++++++++++---- 81 files changed, 475 insertions(+), 240 deletions(-) create mode 100644 modules/mournblade-config.js rename packs/armes/{000040.log => 000048.log} (100%) delete mode 100644 packs/armes/MANIFEST-000038 create mode 100644 packs/armes/MANIFEST-000046 rename packs/dons/{000040.log => 000048.log} (100%) delete mode 100644 packs/dons/MANIFEST-000038 create mode 100644 packs/dons/MANIFEST-000046 rename packs/equipement/{000040.log => 000048.log} (100%) delete mode 100644 packs/equipement/MANIFEST-000038 create mode 100644 packs/equipement/MANIFEST-000046 rename packs/heritages/{000040.log => 000048.log} (100%) rename packs/heritages/{MANIFEST-000038 => MANIFEST-000046} (73%) rename packs/metiers/{000040.log => 000048.log} (100%) delete mode 100644 packs/metiers/MANIFEST-000038 create mode 100644 packs/metiers/MANIFEST-000046 rename packs/origines/{000040.log => 000048.log} (100%) delete mode 100644 packs/origines/MANIFEST-000038 create mode 100644 packs/origines/MANIFEST-000046 rename packs/protection/{000040.log => 000048.log} (100%) delete mode 100644 packs/protection/MANIFEST-000038 create mode 100644 packs/protection/MANIFEST-000046 rename packs/runes/{000040.log => 000048.log} (100%) delete mode 100644 packs/runes/MANIFEST-000038 create mode 100644 packs/runes/MANIFEST-000046 rename packs/skills/{000040.log => 000048.log} (100%) delete mode 100644 packs/skills/MANIFEST-000038 create mode 100644 packs/skills/MANIFEST-000046 rename packs/tables/{000040.log => 000048.log} (100%) rename packs/tables/{MANIFEST-000038 => MANIFEST-000046} (79%) rename packs/tendances/{000040.log => 000048.log} (100%) delete mode 100644 packs/tendances/MANIFEST-000038 create mode 100644 packs/tendances/MANIFEST-000046 rename packs/traits-chaotiques/{000040.log => 000048.log} (100%) delete mode 100644 packs/traits-chaotiques/MANIFEST-000038 create mode 100644 packs/traits-chaotiques/MANIFEST-000046 diff --git a/modules/mournblade-actor-sheet.js b/modules/mournblade-actor-sheet.js index 5a0c9ad..a9d5418 100644 --- a/modules/mournblade-actor-sheet.js +++ b/modules/mournblade-actor-sheet.js @@ -56,6 +56,7 @@ export class MournbladeActorSheet extends ActorSheet { equipements: duplicate(this.actor.getEquipments()), monnaies: duplicate(this.actor.getMonnaies()), runeEffects: duplicate(this.actor.getRuneEffects()), + config: game.system.mournblade.config, description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}), options: this.options, owner: this.document.isOwner, diff --git a/modules/mournblade-actor.js b/modules/mournblade-actor.js index c1d94f9..0ac7a66 100644 --- a/modules/mournblade-actor.js +++ b/modules/mournblade-actor.js @@ -52,6 +52,7 @@ export class MournbladeActor extends Actor { arme = duplicate(arme) let combat = this.getCombatValues() if (arme.system.typearme == "contact" || arme.system.typearme == "contactjet") { + arme.system.isMelee = true arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "mêlée")) arme.system.attrKey = "pui" arme.system.totalDegats = arme.system.degats + "+" + combat.bonusDegatsTotal @@ -61,6 +62,7 @@ export class MournbladeActor extends Actor { } } if (arme.system.typearme == "jet" || arme.system.typearme == "tir") { + arme.system.isDistance = true arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance")) arme.system.attrKey = "adr" arme.system.totalOffensif = this.system.attributs.adr.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff @@ -414,6 +416,7 @@ export class MournbladeActor extends Actor { rollData.canEclatDoubleD20 = this.canEclatDoubleD20() rollData.doubleD20 = false rollData.attributs = MournbladeUtility.getAttributs() + rollData.selectDifficulte = true if (attrKey) { rollData.attrKey = attrKey @@ -476,6 +479,15 @@ export class MournbladeActor extends Actor { } let rollData = this.getCommonRollData(arme.system.attrKey, arme.system.competence._id) rollData.arme = arme + rollData.typeAttaque = "assaut" + rollData.typeCouvert = "aucun" + rollData.visee = false + rollData.ciblecourt = false + rollData.cibleconsciente = false + // Do not display difficulte if defense weapon or distance + if (rollData.armeDefense || rollData.arme.system.isDistance) { + rollData.selectDifficulte = false + } console.log("ARME!", rollData) let rollDialog = await MournbladeRollDialog.create(this, rollData) rollDialog.render(true) @@ -490,6 +502,7 @@ export class MournbladeActor extends Actor { if (arme.type == "bouclier") { arme = this.prepareBouclier(arme) } + rollData.degatsFormula = arme.system.totalDegats let roll = new Roll(arme.system.totalDegats).roll({ async: false }) await MournbladeUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode")); let rollData = { diff --git a/modules/mournblade-config.js b/modules/mournblade-config.js new file mode 100644 index 0000000..9234347 --- /dev/null +++ b/modules/mournblade-config.js @@ -0,0 +1,15 @@ +export const MOURNBLADE_CONFIG = { + + attaques:{ + assaut: "Assaut", + precise: "Attaque Précise", + feinte: "Feinte", + coupbas: "Coup Bas", + }, + couverts:{ + aucun: {name: "Aucun", value: 0}, + rondache: {name: "Rondache ou léger (-2)", value: -2}, + pavois: { name: "Pavois ou à moitié (-5)", value: -5}, + complet: {name:"Quasi complet (-10)", value: -10}, + } +}; \ No newline at end of file diff --git a/modules/mournblade-item-sheet.js b/modules/mournblade-item-sheet.js index 617d21b..53f553b 100644 --- a/modules/mournblade-item-sheet.js +++ b/modules/mournblade-item-sheet.js @@ -64,6 +64,7 @@ export class MournbladeItemSheet extends ItemSheet { options: this.options, owner: this.document.isOwner, description: await TextEditor.enrichHTML(this.object.system.description, {async: true}), + config: game.system.mournblade.config, mr: (this.object.type == 'specialisation'), isGM: game.user.isGM } diff --git a/modules/mournblade-main.js b/modules/mournblade-main.js index 59213a5..612cc25 100644 --- a/modules/mournblade-main.js +++ b/modules/mournblade-main.js @@ -15,6 +15,7 @@ import { MournbladeActorSheet } from "./mournblade-actor-sheet.js"; import { MournbladeUtility } from "./mournblade-utility.js"; import { MournbladeCombat } from "./mournblade-combat.js"; import { MournbladeItem } from "./mournblade-item.js"; +import { MOURNBLADE_CONFIG } from "./mournblade-config.js"; /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -45,7 +46,9 @@ Hooks.once("init", async function () { CONFIG.Combat.documentClass = MournbladeCombat CONFIG.Actor.documentClass = MournbladeActor CONFIG.Item.documentClass = MournbladeItem - game.system.mournblade = { } + game.system.mournblade = { + config : MOURNBLADE_CONFIG, + } /* -------------------------------------------- */ // Register sheet application classes diff --git a/modules/mournblade-roll-dialog.js b/modules/mournblade-roll-dialog.js index 50790dc..d76804a 100644 --- a/modules/mournblade-roll-dialog.js +++ b/modules/mournblade-roll-dialog.js @@ -52,7 +52,6 @@ export class MournbladeRollDialog extends Dialog { activateListeners(html) { super.activateListeners(html); - var dialog = this; function onLoad() { } $(function () { onLoad(); }); @@ -60,6 +59,9 @@ export class MournbladeRollDialog extends Dialog { html.find('#modificateur').change(async (event) => { this.rollData.modificateur = Number(event.currentTarget.value) }) + html.find('#typeAttaque').change(async (event) => { + this.rollData.typeAttaque = String(event.currentTarget.value) + }) html.find('#difficulte').change(async (event) => { this.rollData.difficulte = Number(event.currentTarget.value) }) @@ -75,5 +77,18 @@ export class MournbladeRollDialog extends Dialog { html.find('#doubleD20').change(async (event) => { this.rollData.doubleD20 = event.currentTarget.checked }) + html.find('#visee').change(async (event) => { + this.rollData.visee = event.currentTarget.checked + }) + html.find('#cibleconsciente').change(async (event) => { + this.rollData.cibleconsciente = event.currentTarget.checked + }) + html.find('#ciblecourt').change(async (event) => { + this.rollData.ciblecourt = event.currentTarget.checked + }) + html.find('#typeCouvert').change(async (event) => { + this.rollData.typeCouvert = String(event.currentTarget.value) + }) + } } \ No newline at end of file diff --git a/modules/mournblade-utility.js b/modules/mournblade-utility.js index 49091af..326c941 100644 --- a/modules/mournblade-utility.js +++ b/modules/mournblade-utility.js @@ -119,12 +119,12 @@ export class MournbladeUtility { return this.optionsStatusList; } - /* -------------------------------------------- */ + /* -------------------------------------------- */ static getPredilection(comp, predIdx) { let pred = duplicate(comp.system.predilections) - return duplicate(pred[predIdx] || {name: "Error!"} ) + return duplicate(pred[predIdx] || { name: "Error!" }) } - + /* -------------------------------------------- */ static async chatListeners(html) { @@ -139,6 +139,13 @@ export class MournbladeUtility { rollData.predilectionUsed = MournbladeUtility.getPredilection(rollData.competence, predIdx) await MournbladeUtility.rollMournblade(rollData) }) + + html.on("click", '.arme-roll-degats', async event => { + let messageId = MournbladeUtility.findChatMessageId(event.currentTarget) + let message = game.messages.get(messageId) + let rollData = message.getFlag("world", "mournblade-roll") + MournbladeUtility.rollDegatsFromAttaque(rollData) + }) } /* -------------------------------------------- */ @@ -337,10 +344,30 @@ export class MournbladeUtility { rollData.diceFormula += `+${rollData.attr.value}*2+${rollData.modificateur}` } - if (rollData.arme && rollData.arme.type == "arme") { + if (rollData.arme?.type == "arme") { rollData.diceFormula += `+${rollData.arme.system.bonusmaniementoff}` } + // Specific modifier for distance + if (rollData.arme?.system?.isDistance) { + if (rollData.visee) { + rollData.diceFormula += "+5" + } + if (rollData.cibleconsciente) { + rollData.diceFormula += `-${rollData.defender.system.attributs.adr.value}` + } + if (rollData.ciblecourt) { + if (rollData.difficulte <= 15) { // Portée courte ou moins + rollData.diceFormula += `-5` + } else { + rollData.diceFormula += `-10` + } + } + if (rollData.typeCouvert != "aucun") { + rollData.diceFormula += `-${rollData.config.couverts[rollData.typeCouvert].value}` + } + } + if (rollData.rune) { rollData.runeduree = Math.ceil((rollData.runeame + 3) / 3) if (rollData.runemode == "inscrire") { @@ -374,6 +401,66 @@ export class MournbladeUtility { } + /* -------------------------------------------- */ + static async rollDegatsFromAttaque(rollData) { + let maximize = false + let degatsMessage = "Degats normaux" + + if (rollData.arme?.system?.isMelee) { + if (rollData.typeAttaque == "assaut") { + rollData.degatsFormula = rollData.arme.system.totalDegats + if (rollData.isHeroique) { // Deux fois les dés de dégats + rollData.degatsFormula += " + " + rollData.arme.system.totalDegats + degatsMessage = "Dégats doublés" + } + } + if (rollData.typeAttaque == "precise") { + let degatsMessage = "Degats normaux" + if (rollData.isHeroique) { // Degats max + maximize = true + degatsMessage = "Dégats maximaux, ignore l'armure du défenseur" + rollData.ignoreDefenseArmor = true + } + } + if (rollData.typeAttaque == "feinte") { + degatsMessage = "Pas de dégats, mais bonus pour prochaine attaque" + rollData.degatsFormula = false + rollData.nextBonus = 5 + if (rollData.isHeroique) { // Bonus pour prochaine action + rollData.nextBonus = 10 + rollData.nextBonusDegats = 10 + } + } + if (rollData.typeAttaque == "coupbas") { + degatsMessage = "Pas de dégats, mais malus pour prochaine action complexe du défenseur" + rollData.degatsFormula = false + rollData.nextMalus = -5 + if (rollData.isHeroique) { // Malus pour prochaine action + rollData.nextMalus = -15 + } + } + } else { // Armes à distance + rollData.degatsFormula = rollData.arme.system.totalDegats + if (rollData.isHeroique) { // Deux fois les dés de dégats + rollData.degatsFormula += " + " + rollData.arme.system.totalDegats + } + } + // Perform the roll, show the dice + rollData.finalResult = 0 + rollData.degatsMessage = degatsMessage + if (rollData.degatsFormula) { + let degatsRoll = new Roll(rollData.degatsFormula).roll({ async: false, maximize: maximize }) + await this.showDiceSoNice(degatsRoll, game.settings.get("core", "rollMode")) + rollData.degatsRoll = duplicate(degatsRoll) + rollData.finalResult = degatsRoll.total + } + + this.createChatWithRollMode(rollData.alias, { + content: await renderTemplate(`systems/fvtt-mournblade/templates/chat-degats-result.html`, rollData) + }, rollData) + + } + /* -------------------------------------------- */ static async bonusRollMournblade(rollData) { rollData.bonusFormula = rollData.addedBonus @@ -482,6 +569,7 @@ export class MournbladeUtility { pointAmeOptions: this.getPointAmeOptions(), difficulte: 0, modificateur: 0, + config: game.system.mournblade.config, } MournbladeUtility.updateWithTarget(rollData) return rollData @@ -493,6 +581,7 @@ export class MournbladeUtility { if (target) { rollData.defenderTokenId = target.id let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor + rollData.defender = defender.toObject() // Simpler rollData.armeDefense = defender.getBestDefenseValue() if (rollData.armeDefense) { rollData.difficulte = rollData.armeDefense.system.totalDefensif @@ -655,11 +744,11 @@ export class MournbladeUtility { /* -------------------------------------------- */ static async confirmDelete(actorSheet, li) { let itemId = li.data("item-id"); - let msgTxt = "

Are you sure to remove this Item ?"; + let msgTxt = "

Voulez vous supprimer cet item ?"; let buttons = { delete: { icon: '', - label: "Yes, remove it", + label: "Oui !", callback: () => { actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]); li.slideUp(200, () => actorSheet.render(false)); @@ -667,12 +756,12 @@ export class MournbladeUtility { }, cancel: { icon: '', - label: "Cancel" + label: "Non !" } } msgTxt += "

"; let d = new Dialog({ - title: "Confirm removal", + title: "Confirmer la suppression", content: msgTxt, buttons: buttons, default: "cancel" diff --git a/packs/armes/000040.log b/packs/armes/000048.log similarity index 100% rename from packs/armes/000040.log rename to packs/armes/000048.log diff --git a/packs/armes/CURRENT b/packs/armes/CURRENT index 59611b0..a6d5883 100644 --- a/packs/armes/CURRENT +++ b/packs/armes/CURRENT @@ -1 +1 @@ -MANIFEST-000038 +MANIFEST-000046 diff --git a/packs/armes/LOG b/packs/armes/LOG index 02e8325..a13213d 100644 --- a/packs/armes/LOG +++ b/packs/armes/LOG @@ -1,8 +1,8 @@ -2023/12/21-19:17:33.593727 7f3322ffd6c0 Recovering log #36 -2023/12/21-19:17:33.639350 7f3322ffd6c0 Delete type=3 #34 -2023/12/21-19:17:33.639464 7f3322ffd6c0 Delete type=0 #36 -2023/12/21-19:20:44.881496 7f33223ff6c0 Level-0 table #41: started -2023/12/21-19:20:44.881541 7f33223ff6c0 Level-0 table #41: 0 bytes OK -2023/12/21-19:20:44.888812 7f33223ff6c0 Delete type=0 #39 -2023/12/21-19:20:44.900167 7f33223ff6c0 Manual compaction at level-0 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) -2023/12/21-19:20:44.900223 7f33223ff6c0 Manual compaction at level-1 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) +2023/12/22-07:52:34.496801 7f3322ffd6c0 Recovering log #44 +2023/12/22-07:52:34.507416 7f3322ffd6c0 Delete type=3 #42 +2023/12/22-07:52:34.507504 7f3322ffd6c0 Delete type=0 #44 +2023/12/22-09:30:01.987558 7f33223ff6c0 Level-0 table #49: started +2023/12/22-09:30:01.987624 7f33223ff6c0 Level-0 table #49: 0 bytes OK +2023/12/22-09:30:01.997520 7f33223ff6c0 Delete type=0 #47 +2023/12/22-09:30:02.010634 7f33223ff6c0 Manual compaction at level-0 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) +2023/12/22-09:30:02.017412 7f33223ff6c0 Manual compaction at level-1 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) diff --git a/packs/armes/LOG.old b/packs/armes/LOG.old index 1a29936..264cce0 100644 --- a/packs/armes/LOG.old +++ b/packs/armes/LOG.old @@ -1,8 +1,8 @@ -2023/12/21-15:38:38.681898 7f35b8bfa6c0 Recovering log #32 -2023/12/21-15:38:38.691893 7f35b8bfa6c0 Delete type=3 #30 -2023/12/21-15:38:38.692031 7f35b8bfa6c0 Delete type=0 #32 -2023/12/21-15:39:48.799860 7f33223ff6c0 Level-0 table #37: started -2023/12/21-15:39:48.799891 7f33223ff6c0 Level-0 table #37: 0 bytes OK -2023/12/21-15:39:48.806560 7f33223ff6c0 Delete type=0 #35 -2023/12/21-15:39:48.820290 7f33223ff6c0 Manual compaction at level-0 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) -2023/12/21-15:39:48.828125 7f33223ff6c0 Manual compaction at level-1 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) +2023/12/21-20:53:10.652760 7f3322ffd6c0 Recovering log #40 +2023/12/21-20:53:10.664177 7f3322ffd6c0 Delete type=3 #38 +2023/12/21-20:53:10.664308 7f3322ffd6c0 Delete type=0 #40 +2023/12/21-20:54:12.924325 7f33223ff6c0 Level-0 table #45: started +2023/12/21-20:54:12.924370 7f33223ff6c0 Level-0 table #45: 0 bytes OK +2023/12/21-20:54:12.931190 7f33223ff6c0 Delete type=0 #43 +2023/12/21-20:54:12.938479 7f33223ff6c0 Manual compaction at level-0 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) +2023/12/21-20:54:12.945078 7f33223ff6c0 Manual compaction at level-1 from '!items!0swiE8k5zfUIqmXu' @ 72057594037927935 : 1 .. '!items!wv5EiePmPTpqFutt' @ 0 : 0; will stop at (end) diff --git a/packs/armes/MANIFEST-000038 b/packs/armes/MANIFEST-000038 deleted file mode 100644 index 139c3fe3888d17cf37194ad2a1793f56b3b7dd3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmXT)Tzf5%fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb!)P`VrEHdZn2_4 zae1bzMYd^GTBv7XZbT^~BLf(~`pgoS$2eSd>_jU&PMDdaF!cF|#B!w^-3M z#XZ6=)5kd6&m`F~+dP7ikpT=~@>Nw;mR?0A;aRReDfy0R-i&e(d5fe-Hx33yCUs5* UW(^iOHp}03Ag%_GtHmM*0D-n4tN;K2 diff --git a/packs/dons/MANIFEST-000046 b/packs/dons/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..ca8d9c195359d7492cf0c4f11a4c38d577c1b6de GIT binary patch literal 134 zcmdPi<64%;z{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PMDdaF!cF|#B!w^-3M z#XZ6=)5kd6&m`F~+dP7ikpT=~@>Nw;mR?0A;aRReDfy0R-i&e(`K_siO&ko2O!}M* U%myrSe^MuG2XPI6Tq71a0IWtM&;S4c literal 0 HcmV?d00001 diff --git a/packs/equipement/000040.log b/packs/equipement/000048.log similarity index 100% rename from packs/equipement/000040.log rename to packs/equipement/000048.log diff --git a/packs/equipement/CURRENT b/packs/equipement/CURRENT index 59611b0..a6d5883 100644 --- a/packs/equipement/CURRENT +++ b/packs/equipement/CURRENT @@ -1 +1 @@ -MANIFEST-000038 +MANIFEST-000046 diff --git a/packs/equipement/LOG b/packs/equipement/LOG index 2a98123..b78fd2f 100644 --- a/packs/equipement/LOG +++ b/packs/equipement/LOG @@ -1,8 +1,8 @@ -2023/12/21-19:17:33.696684 7f33237fe6c0 Recovering log #36 -2023/12/21-19:17:33.731835 7f33237fe6c0 Delete type=3 #34 -2023/12/21-19:17:33.731930 7f33237fe6c0 Delete type=0 #36 -2023/12/21-19:20:44.900432 7f33223ff6c0 Level-0 table #41: started -2023/12/21-19:20:44.900494 7f33223ff6c0 Level-0 table #41: 0 bytes OK -2023/12/21-19:20:44.907220 7f33223ff6c0 Delete type=0 #39 -2023/12/21-19:20:44.929964 7f33223ff6c0 Manual compaction at level-0 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) -2023/12/21-19:20:44.930062 7f33223ff6c0 Manual compaction at level-1 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) +2023/12/22-07:52:34.522086 7f35b8bfa6c0 Recovering log #44 +2023/12/22-07:52:34.531643 7f35b8bfa6c0 Delete type=3 #42 +2023/12/22-07:52:34.531726 7f35b8bfa6c0 Delete type=0 #44 +2023/12/22-09:30:02.004438 7f33223ff6c0 Level-0 table #49: started +2023/12/22-09:30:02.004459 7f33223ff6c0 Level-0 table #49: 0 bytes OK +2023/12/22-09:30:02.010548 7f33223ff6c0 Delete type=0 #47 +2023/12/22-09:30:02.017441 7f33223ff6c0 Manual compaction at level-0 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) +2023/12/22-09:30:02.017488 7f33223ff6c0 Manual compaction at level-1 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) diff --git a/packs/equipement/LOG.old b/packs/equipement/LOG.old index 226ce6e..de6163e 100644 --- a/packs/equipement/LOG.old +++ b/packs/equipement/LOG.old @@ -1,8 +1,8 @@ -2023/12/21-15:38:38.708703 7f33237fe6c0 Recovering log #32 -2023/12/21-15:38:38.718410 7f33237fe6c0 Delete type=3 #30 -2023/12/21-15:38:38.718471 7f33237fe6c0 Delete type=0 #32 -2023/12/21-15:39:48.806833 7f33223ff6c0 Level-0 table #37: started -2023/12/21-15:39:48.806886 7f33223ff6c0 Level-0 table #37: 0 bytes OK -2023/12/21-15:39:48.813500 7f33223ff6c0 Delete type=0 #35 -2023/12/21-15:39:48.828075 7f33223ff6c0 Manual compaction at level-0 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) -2023/12/21-15:39:48.828188 7f33223ff6c0 Manual compaction at level-1 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) +2023/12/21-20:53:10.682453 7f35b8bfa6c0 Recovering log #40 +2023/12/21-20:53:10.693155 7f35b8bfa6c0 Delete type=3 #38 +2023/12/21-20:53:10.693241 7f35b8bfa6c0 Delete type=0 #40 +2023/12/21-20:54:12.938497 7f33223ff6c0 Level-0 table #45: started +2023/12/21-20:54:12.938538 7f33223ff6c0 Level-0 table #45: 0 bytes OK +2023/12/21-20:54:12.944856 7f33223ff6c0 Delete type=0 #43 +2023/12/21-20:54:12.945098 7f33223ff6c0 Manual compaction at level-0 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) +2023/12/21-20:54:12.945131 7f33223ff6c0 Manual compaction at level-1 from '!items!1cZd2hlTV9tykDED' @ 72057594037927935 : 1 .. '!items!y47dBO3Mf5Pn7tOd' @ 0 : 0; will stop at (end) diff --git a/packs/equipement/MANIFEST-000038 b/packs/equipement/MANIFEST-000038 deleted file mode 100644 index bc602469b18204a476f838f87c2b66b399e847c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmbQbcmB6T21Z7yoYb<^oRlOzr^=Gl^338?=ltA)#G=HK{33QH*3Gu^ikT&;xy6cx z$x$gr895oY$kk#o2LLXzB$)sJ diff --git a/packs/equipement/MANIFEST-000046 b/packs/equipement/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..ed2268ee4398dde92076f07d4e150bbe450aa9dd GIT binary patch literal 134 zcmbQbcmB6T21Z7yoYb<^oRlOzr^=Gl^338?=ltA)#G=HK{33QH*3Gu^ikT&;xy6cx z$x$gr895LuB99dj7;jB49prVTy`pgoS$2eSd>_jU&PMD`Y%UbF|#B!w^-4@ zve?+T*sV0H)S@aYpwN?%kpT=~@)bFiZq9+uIZjcAe#ZWWPK<&OdAV(hbsP+gOzNBr U%o;3$5AJMk193HgTrCzs0GjI}-T(jq diff --git a/packs/metiers/MANIFEST-000046 b/packs/metiers/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..b1764087cc34659892b9c0c1657cbeb7c46cc5e6 GIT binary patch literal 134 zcmaz%D;l22z{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PMD`Y%UbF|#B!w^-4@ zve?+T*sV0H)S@aYpwN?%kpT=~@)bFiZq9+uIZjcAe#ZWWPK<&O`O6zMy*L;cne;gs UmmJ9fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb-9zgVrEHdZn2_K ziJ^C{Q)-}JskgUjVU8aoBLf(~(>NFynbbKM Um^D~L4z+aWfw&q#t`>_30JISzlmGw# diff --git a/packs/origines/MANIFEST-000046 b/packs/origines/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..76d7a6a439144d09882cf654a3cd55219acbd32b GIT binary patch literal 134 zcmaFnw>mJ9fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb-9zgVrEHdZn2_K ziJ^C{Q)-}JskgUjVU8aoBLf(~m`{a*bF-0Jvl#!2kdN literal 0 HcmV?d00001 diff --git a/packs/protection/000040.log b/packs/protection/000048.log similarity index 100% rename from packs/protection/000040.log rename to packs/protection/000048.log diff --git a/packs/protection/CURRENT b/packs/protection/CURRENT index 59611b0..a6d5883 100644 --- a/packs/protection/CURRENT +++ b/packs/protection/CURRENT @@ -1 +1 @@ -MANIFEST-000038 +MANIFEST-000046 diff --git a/packs/protection/LOG b/packs/protection/LOG index 98f0abc..b67867a 100644 --- a/packs/protection/LOG +++ b/packs/protection/LOG @@ -1,8 +1,8 @@ -2023/12/21-19:17:33.643159 7f35b8bfa6c0 Recovering log #36 -2023/12/21-19:17:33.693846 7f35b8bfa6c0 Delete type=3 #34 -2023/12/21-19:17:33.693987 7f35b8bfa6c0 Delete type=0 #36 -2023/12/21-19:20:44.907492 7f33223ff6c0 Level-0 table #41: started -2023/12/21-19:20:44.907557 7f33223ff6c0 Level-0 table #41: 0 bytes OK -2023/12/21-19:20:44.915742 7f33223ff6c0 Delete type=0 #39 -2023/12/21-19:20:44.929991 7f33223ff6c0 Manual compaction at level-0 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) -2023/12/21-19:20:44.930084 7f33223ff6c0 Manual compaction at level-1 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) +2023/12/22-07:52:34.509314 7f3323fff6c0 Recovering log #44 +2023/12/22-07:52:34.520050 7f3323fff6c0 Delete type=3 #42 +2023/12/22-07:52:34.520474 7f3323fff6c0 Delete type=0 #44 +2023/12/22-09:30:01.997688 7f33223ff6c0 Level-0 table #49: started +2023/12/22-09:30:01.997733 7f33223ff6c0 Level-0 table #49: 0 bytes OK +2023/12/22-09:30:02.004334 7f33223ff6c0 Delete type=0 #47 +2023/12/22-09:30:02.010645 7f33223ff6c0 Manual compaction at level-0 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) +2023/12/22-09:30:02.017426 7f33223ff6c0 Manual compaction at level-1 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) diff --git a/packs/protection/LOG.old b/packs/protection/LOG.old index ce99b64..ae9e33e 100644 --- a/packs/protection/LOG.old +++ b/packs/protection/LOG.old @@ -1,8 +1,8 @@ -2023/12/21-15:38:38.695816 7f3322ffd6c0 Recovering log #32 -2023/12/21-15:38:38.705849 7f3322ffd6c0 Delete type=3 #30 -2023/12/21-15:38:38.705914 7f3322ffd6c0 Delete type=0 #32 -2023/12/21-15:39:48.813588 7f33223ff6c0 Level-0 table #37: started -2023/12/21-15:39:48.813615 7f33223ff6c0 Level-0 table #37: 0 bytes OK -2023/12/21-15:39:48.820057 7f33223ff6c0 Delete type=0 #35 -2023/12/21-15:39:48.828104 7f33223ff6c0 Manual compaction at level-0 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) -2023/12/21-15:39:48.828169 7f33223ff6c0 Manual compaction at level-1 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) +2023/12/21-20:53:10.667188 7f33237fe6c0 Recovering log #40 +2023/12/21-20:53:10.678311 7f33237fe6c0 Delete type=3 #38 +2023/12/21-20:53:10.678430 7f33237fe6c0 Delete type=0 #40 +2023/12/21-20:54:12.931369 7f33223ff6c0 Level-0 table #45: started +2023/12/21-20:54:12.931404 7f33223ff6c0 Level-0 table #45: 0 bytes OK +2023/12/21-20:54:12.938215 7f33223ff6c0 Delete type=0 #43 +2023/12/21-20:54:12.945036 7f33223ff6c0 Manual compaction at level-0 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) +2023/12/21-20:54:12.945115 7f33223ff6c0 Manual compaction at level-1 from '!items!2hD1DQVeCIQIXFU7' @ 72057594037927935 : 1 .. '!items!veoS6Gtzj6Dq087V' @ 0 : 0; will stop at (end) diff --git a/packs/protection/MANIFEST-000038 b/packs/protection/MANIFEST-000038 deleted file mode 100644 index 7d108c79160bdd0edf1cd7cb47f092d79b1ba441..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmdPCG+Qc>fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb%KbzVrEHdZn2_K zhKr#~U|6cNXP{?fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQb%KbzVrEHdZn2_K zhKr#~U|6cNXP{?`pgoS$2eSd>_jU&PMD+WMJMUNN&IHMdyN z(5o;!$u-*}G~YWSsW?54k&yumVDc4t&S^#!o&i-U#i995A(f1}5c&I3_bWLV7@5>L V8JIO#bQQmpbc47WK&}>xE&vYFB%J^N diff --git a/packs/runes/MANIFEST-000046 b/packs/runes/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..3f2fae368baf3c08cf26a49df55bfd2b31352f7d GIT binary patch literal 135 zcmYedazCHMz{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PMD+WMJMUNN&IHMdyN z(5o;!$u-*}G~YWSsW?54k&yumVDc4t&S^#!o&i-U#i995A(f1}5cx?O&wV)<7@71r V8JG=Nbfwj~SU_9@AlHaR7Xa`pgoS$2eSd>_jU&PMD`pZ&YF|#B!w^-4@ zC#TA#(z&$AD>bDswbGrDkpT=~@+F04xvuFE`RV2vCSjG~*^K-U`A2gno#kL)WK!p3 UVAf#amnl`*4&rJ6xmqmz0N4#9z5oCK diff --git a/packs/skills/MANIFEST-000046 b/packs/skills/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..9942f3a11e55c6fb906de49d118b1e3c9c1698ca GIT binary patch literal 134 zcmb=?Qs11&z{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PMD`pZ&YF|#B!w^-4@ zC#TA#(z&$AD>bDswbGrDkpT=~@+F04xvuFE`RV2vCSjG~*^K-U`Tmu=esVA{GU;`pgoS$2eSd>_jU&PMDI)5vpykcfaYHqQj zfpcVlp;tjvsby|)iD`*9BO?PCz~rkk0s@M2LrQ$g%#$nqJiHjqA@X6HO4o2OFfyrg VGB9hfm~*_me*?tT0CKfh%mD$TB*Fjy diff --git a/packs/tendances/MANIFEST-000046 b/packs/tendances/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..a28700990746c449931bb963bc400610ac394ce8 GIT binary patch literal 135 zcmaE7@0pjxz{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PMDI)5vpykcfaYHqQj zfpcVlp;tjvsby|)iD`*9BO?PCz~rkk0s@M2LrQ$g%#$nqJiHjqA@Z}g`buyxFf!?L VGB6vkm(>NFynbbKM Um^D~L4z+aWfw&q#t`>_30D3?on*aa+ diff --git a/packs/traits-chaotiques/MANIFEST-000046 b/packs/traits-chaotiques/MANIFEST-000046 new file mode 100644 index 0000000000000000000000000000000000000000..07be60e97fd8f2a7a79770186733d83ff045c777 GIT binary patch literal 134 zcmbQgmc=TOfss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQ^`f7=VrEHdZn2`V zmw|_OR&rR0Q;4ypQ)Un&BLf(~m`{a*bF-0DhAq$N&HU literal 0 HcmV?d00001 diff --git a/styles/simple.css b/styles/simple.css index 8a8ac1a..b59bd39 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1130,6 +1130,11 @@ ul, li { margin:2px; } +.chat-card-button-degats { + background: linear-gradient(to bottom, #e2c256fc 5%, #b85b04ab 100%); + background-color: #7d5d3b00; +} + .chat-card-button:hover { background: linear-gradient(to bottom, #800000 5%, #3e0101 100%); background-color: red; diff --git a/templates/chat-degats-result.html b/templates/chat-degats-result.html index 9564ebc..355d2bd 100644 --- a/templates/chat-degats-result.html +++ b/templates/chat-degats-result.html @@ -18,8 +18,15 @@
    -
  • Arme : {{arme.name}} (+{{arme.system.totalDegats}})
  • -
  • Dégats : {{finalResult}} {{#if arme.system.nonletaux}}(Non létaux){{else}}(Létaux){{/if}}
  • +
  • Arme : {{arme.name}} (+{{degatsFormula}})
  • +
  • Information : {{degatsMessage}}
  • +
  • Dégats : {{finalResult}} {{#if arme.system.nonletaux}}(Non létaux){{else}}(Létaux){{/if}}
  • + {{#if nextBonus}} +
  • Bonus pour prochaine attaque : {{nextBonus}}
  • + {{/if}} + {{#if nextMalus}} +
  • Malus au défenseur pour prochaine action : {{nextMalus}}
  • + {{/if}}
diff --git a/templates/chat-generic-result.html b/templates/chat-generic-result.html index 3c94b48..8f3c1fd 100644 --- a/templates/chat-generic-result.html +++ b/templates/chat-generic-result.html @@ -20,6 +20,16 @@
  • Attribut : {{attr.label}}
  • + {{#if arme}} +
  • Arme : {{arme.name}} (+{{arme.system.bonusmaniementoff}})
  • + {{#if defender}} +
  • Cible : {{defender.name}}
  • + {{/if}} + {{#if typeAttaque}} +
  • Attaque : {{lookup config.attaques typeAttaque}}
  • + {{/if}} + {{/if}} + {{#if competence}}
  • Compétence : {{competence.name}}
  • {{/if}} @@ -39,15 +49,15 @@
  • {{textBonus}} : {{bonusRoll.total}}
  • {{/if}} - {{#if arme}} -
  • Arme : {{arme.name}} (+{{arme.system.bonusmaniementoff}})
  • - {{/if}} -
  • Formule : {{diceFormula}}
  • Dé : {{diceResult}}
  • {{#if difficulte}} -
  • Difficulté : {{difficulte}}
  • +
  • Difficulté : {{difficulte}} + {{#if (and arm.system.isMelee armeDefense)}} + ({{armeDefense.name}}) + {{/if}} +
  • {{/if}}
  • @@ -76,6 +86,13 @@ {{/if}} {{/each}} + + {{#if (and arme isSuccess)}} +
  • + +
  • + {{/if}} +
diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html index 7a7280f..453a365 100644 --- a/templates/roll-dialog-generic.html +++ b/templates/roll-dialog-generic.html @@ -10,17 +10,18 @@
{{#if (eq attrKey "tochoose")}} - Attribut - + Attribut + {{else}} - {{attr.label}} - {{attr.value}} + {{attr.label}} + {{attr.value}} {{/if}}
@@ -48,14 +49,87 @@
Points d'Ame - {{#select runeame}} {{{pointAmeOptions}}} {{/select}}
+ {{/if}} + {{#if arme}} +
+ Arme : + {{arme.name}} (+{{arme.system.bonusmaniementoff}}) +
+ {{#if arme.system.isMelee}} +
+ Attaque : + +
+ {{/if}} + {{/if}} + + + {{#if arme}} + {{#if arme.system.isMelee}} + {{#if armeDefense}} +
+ Défense adversaire : + {{difficulte}} +
+ {{/if}} + {{/if}} + {{#if arme.system.isDistance}} +
+ Bonus de visée (+5) ? : + +
+ {{#if defender}} +
+ La cible est consciente du tir (-{{defender.system.attributs.adr.value}})? : + +
+ {{else}} +
+ Pas de cible désignée ! +
+ {{/if}} +
+ La cible court (-5/-10)? : + +
+
+ Couvert ? : + +
+
+ Portée : + +
+ {{/if}} {{/if}}
@@ -68,12 +142,7 @@
- {{#if armeDefense}} -
- Défense adversaire : - {{difficulte}} -
- {{else}} + {{#if selectDifficulte}}
Difficulté : +
{{/if}}