diff --git a/modules/malefices-actor.js b/modules/malefices-actor.js index 2c95972..5b410b9 100644 --- a/modules/malefices-actor.js +++ b/modules/malefices-actor.js @@ -15,8 +15,8 @@ export class MaleficesActor extends Actor { /** * Override the create() function to provide additional SoS functionality. * - * This overrided create() function adds initial items - * Namely: Basic skills, money, + * This overrided create() function adds initial items + * Namely: Basic skills, money, * * @param {Object} data Barebones actor data which this function adds onto. * @param {Object} options (Unused) Additional options which customize the creation workflow. @@ -43,10 +43,6 @@ export class MaleficesActor extends Actor { return super.create(data, options); } - /* -------------------------------------------- */ - prepareBaseData() { - } - /* -------------------------------------------- */ async prepareData() { @@ -92,7 +88,7 @@ export class MaleficesActor extends Actor { return comp; } getArchetype() { - let comp = foundry.utils.duplicate(this.items.find(item => item.type == 'archetype') || {name: "Pas d'archetype"}) + let comp = foundry.utils.duplicate(this.items.find(item => item.type == 'archetype') || { name: "Pas d'archetype" }) if (comp && comp.system) { comp.tarot = MaleficesUtility.getTarot(comp.system.lametutelaire) } @@ -224,13 +220,13 @@ export class MaleficesActor extends Actor { } /* -------------------------------------------- */ - clearInitiative(){ + clearInitiative() { this.getFlag("world", "initiative", -1) } /* -------------------------------------------- */ getInitiativeScore(combatId, combatantId) { - let init = Math.floor( (this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) - let subvalue = new Roll("1d20").roll({async: false}) + let init = Math.floor((this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) + let subvalue = new Roll("1d20").roll({ async: false }) return init + (subvalue.total / 100) } @@ -275,25 +271,25 @@ export class MaleficesActor extends Actor { /* -------------------------------------------- */ incDecFluide(value) { let fluide = this.system.fluide + value - this.update( {'system.fluide': fluide} ) + this.update({ 'system.fluide': fluide }) } incDecDestin(value) { let destin = this.system.pointdestin + value - this.update( {'system.pointdestin': destin} ) + this.update({ 'system.pointdestin': destin }) } incDecMPMB(value) { let mpmb = this.system.mpmb + value - this.update( {'system.mpmb': mpmb} ) + this.update({ 'system.mpmb': mpmb }) } incDecMPMN(value) { let mpmn = this.system.mpmn + value - this.update( {'system.mpmn': mpmn} ) + this.update({ 'system.mpmn': mpmn }) } /* -------------------------------------------- */ incDecAttr(attrKey, value) { let attr = foundry.utils.duplicate(this.system.attributs[attrKey]) attr.value += value - this.update( { [`system.attributs.${attrKey}`]: attr}) + this.update({ [`system.attributs.${attrKey}`]: attr }) } /* -------------------------------------------- */ async incDecQuantity(objetId, incDec = 0) { @@ -317,16 +313,16 @@ export class MaleficesActor extends Actor { } /* -------------------------------------------- */ - getAtttributImage( attrKey) { + getAtttributImage(attrKey) { return `systems/fvtt-malefices/images/icons/${attrKey}.webp` } /* -------------------------------------------- */ - incDecDestin( value) { - let newValue = Math.max( this.system.pointdestin + value, 0) - this.update( {'system.pointdestin': newValue}) + incDecDestin(value) { + let newValue = Math.max(this.system.pointdestin + value, 0) + this.update({ 'system.pointdestin': newValue }) } - + /* -------------------------------------------- */ getCommonRollData() { @@ -349,7 +345,7 @@ export class MaleficesActor extends Actor { } /* -------------------------------------------- */ getPhysiqueMalus() { - if ( this.system.attributs.constitution.value <= 8) { + if (this.system.attributs.constitution.value <= 8) { return -(9 - this.system.attributs.constitution.value) } return 0 @@ -361,7 +357,7 @@ export class MaleficesActor extends Actor { let rollData = this.getCommonRollData() rollData.attr = foundry.utils.duplicate(attr) rollData.mode = "attribut" - rollData.title = attr.label + rollData.title = attr.label rollData.img = this.getAtttributImage(attrKey) this.startRoll(rollData) } @@ -373,7 +369,7 @@ export class MaleficesActor extends Actor { arme = foundry.utils.duplicate(arme) let rollData = this.getCommonRollData() if (arme.system.armetype == "mainsnues" || arme.system.armetype == "epee") { - rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor( (this.getPhysiqueMalus()+this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) } + rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor((this.getPhysiqueMalus() + this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) } } else { rollData.attr = foundry.utils.duplicate(this.system.attributs.habilite) } @@ -386,7 +382,7 @@ export class MaleficesActor extends Actor { ui.notifications.warn("Impossible de trouver l'arme concernée ") } } - + /* -------------------------------------------- */ async startRoll(rollData) { await MaleficesRollDialog.create(this, rollData) diff --git a/packs/malefices-archetypes/000066.log b/packs/malefices-archetypes/000070.log similarity index 100% rename from packs/malefices-archetypes/000066.log rename to packs/malefices-archetypes/000070.log diff --git a/packs/malefices-archetypes/CURRENT b/packs/malefices-archetypes/CURRENT index 5d746f2..284d53f 100644 --- a/packs/malefices-archetypes/CURRENT +++ b/packs/malefices-archetypes/CURRENT @@ -1 +1 @@ -MANIFEST-000064 +MANIFEST-000068 diff --git a/packs/malefices-archetypes/LOG b/packs/malefices-archetypes/LOG index f0d1f2c..0c75d5e 100644 --- a/packs/malefices-archetypes/LOG +++ b/packs/malefices-archetypes/LOG @@ -1,7 +1,7 @@ -2026/02/27-10:28:01.892467 7f56f8bfd6c0 Recovering log #63 -2026/02/27-10:28:01.948160 7f56f8bfd6c0 Delete type=0 #63 -2026/02/27-10:28:01.948272 7f56f8bfd6c0 Delete type=3 #62 -2026/02/27-14:29:37.861283 7f54e37ef6c0 Level-0 table #67: started -2026/02/27-14:29:37.861314 7f54e37ef6c0 Level-0 table #67: 0 bytes OK -2026/02/27-14:29:37.867488 7f54e37ef6c0 Delete type=0 #65 -2026/02/27-14:29:37.880370 7f54e37ef6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end) +2026/04/01-21:52:59.516756 7f30557ee6c0 Recovering log #66 +2026/04/01-21:52:59.526211 7f30557ee6c0 Delete type=0 #66 +2026/04/01-21:52:59.526277 7f30557ee6c0 Delete type=3 #64 +2026/04/01-21:56:55.040835 7f303effd6c0 Level-0 table #71: started +2026/04/01-21:56:55.040885 7f303effd6c0 Level-0 table #71: 0 bytes OK +2026/04/01-21:56:55.047352 7f303effd6c0 Delete type=0 #69 +2026/04/01-21:56:55.067290 7f303effd6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-archetypes/LOG.old b/packs/malefices-archetypes/LOG.old index a5891fd..f0d1f2c 100644 --- a/packs/malefices-archetypes/LOG.old +++ b/packs/malefices-archetypes/LOG.old @@ -1,3 +1,7 @@ -2026/02/27-00:10:01.008967 7fbc5bfff6c0 Recovering log #60 -2026/02/27-00:10:01.061613 7fbc5bfff6c0 Delete type=3 #58 -2026/02/27-00:10:01.061695 7fbc5bfff6c0 Delete type=0 #60 +2026/02/27-10:28:01.892467 7f56f8bfd6c0 Recovering log #63 +2026/02/27-10:28:01.948160 7f56f8bfd6c0 Delete type=0 #63 +2026/02/27-10:28:01.948272 7f56f8bfd6c0 Delete type=3 #62 +2026/02/27-14:29:37.861283 7f54e37ef6c0 Level-0 table #67: started +2026/02/27-14:29:37.861314 7f54e37ef6c0 Level-0 table #67: 0 bytes OK +2026/02/27-14:29:37.867488 7f54e37ef6c0 Delete type=0 #65 +2026/02/27-14:29:37.880370 7f54e37ef6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-archetypes/MANIFEST-000064 b/packs/malefices-archetypes/MANIFEST-000068 similarity index 75% rename from packs/malefices-archetypes/MANIFEST-000064 rename to packs/malefices-archetypes/MANIFEST-000068 index 4484140..4c4efaf 100644 Binary files a/packs/malefices-archetypes/MANIFEST-000064 and b/packs/malefices-archetypes/MANIFEST-000068 differ diff --git a/packs/malefices-armes/000066.log b/packs/malefices-armes/000070.log similarity index 100% rename from packs/malefices-armes/000066.log rename to packs/malefices-armes/000070.log diff --git a/packs/malefices-armes/CURRENT b/packs/malefices-armes/CURRENT index 5d746f2..284d53f 100644 --- a/packs/malefices-armes/CURRENT +++ b/packs/malefices-armes/CURRENT @@ -1 +1 @@ -MANIFEST-000064 +MANIFEST-000068 diff --git a/packs/malefices-armes/LOG b/packs/malefices-armes/LOG index 056f3d4..759ec01 100644 --- a/packs/malefices-armes/LOG +++ b/packs/malefices-armes/LOG @@ -1,7 +1,7 @@ -2026/02/27-10:28:01.832073 7f56f93fe6c0 Recovering log #63 -2026/02/27-10:28:01.886020 7f56f93fe6c0 Delete type=0 #63 -2026/02/27-10:28:01.886089 7f56f93fe6c0 Delete type=3 #62 -2026/02/27-14:29:37.854040 7f54e37ef6c0 Level-0 table #67: started -2026/02/27-14:29:37.854089 7f54e37ef6c0 Level-0 table #67: 0 bytes OK -2026/02/27-14:29:37.861166 7f54e37ef6c0 Delete type=0 #65 -2026/02/27-14:29:37.880355 7f54e37ef6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end) +2026/04/01-21:52:59.503313 7f303ffff6c0 Recovering log #66 +2026/04/01-21:52:59.513994 7f303ffff6c0 Delete type=0 #66 +2026/04/01-21:52:59.514046 7f303ffff6c0 Delete type=3 #64 +2026/04/01-21:56:55.047475 7f303effd6c0 Level-0 table #71: started +2026/04/01-21:56:55.047500 7f303effd6c0 Level-0 table #71: 0 bytes OK +2026/04/01-21:56:55.053914 7f303effd6c0 Delete type=0 #69 +2026/04/01-21:56:55.067309 7f303effd6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-armes/LOG.old b/packs/malefices-armes/LOG.old index d05cd81..056f3d4 100644 --- a/packs/malefices-armes/LOG.old +++ b/packs/malefices-armes/LOG.old @@ -1,3 +1,7 @@ -2026/02/27-00:10:00.951941 7fbc5b7fe6c0 Recovering log #60 -2026/02/27-00:10:01.006960 7fbc5b7fe6c0 Delete type=3 #58 -2026/02/27-00:10:01.007022 7fbc5b7fe6c0 Delete type=0 #60 +2026/02/27-10:28:01.832073 7f56f93fe6c0 Recovering log #63 +2026/02/27-10:28:01.886020 7f56f93fe6c0 Delete type=0 #63 +2026/02/27-10:28:01.886089 7f56f93fe6c0 Delete type=3 #62 +2026/02/27-14:29:37.854040 7f54e37ef6c0 Level-0 table #67: started +2026/02/27-14:29:37.854089 7f54e37ef6c0 Level-0 table #67: 0 bytes OK +2026/02/27-14:29:37.861166 7f54e37ef6c0 Delete type=0 #65 +2026/02/27-14:29:37.880355 7f54e37ef6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-armes/MANIFEST-000064 b/packs/malefices-armes/MANIFEST-000068 similarity index 76% rename from packs/malefices-armes/MANIFEST-000064 rename to packs/malefices-armes/MANIFEST-000068 index 7fbeeeb..2f4cce4 100644 Binary files a/packs/malefices-armes/MANIFEST-000064 and b/packs/malefices-armes/MANIFEST-000068 differ diff --git a/packs/malefices-macros/000066.log b/packs/malefices-macros/000070.log similarity index 100% rename from packs/malefices-macros/000066.log rename to packs/malefices-macros/000070.log diff --git a/packs/malefices-macros/CURRENT b/packs/malefices-macros/CURRENT index 5d746f2..284d53f 100644 --- a/packs/malefices-macros/CURRENT +++ b/packs/malefices-macros/CURRENT @@ -1 +1 @@ -MANIFEST-000064 +MANIFEST-000068 diff --git a/packs/malefices-macros/LOG b/packs/malefices-macros/LOG index e32691f..75b42d4 100644 --- a/packs/malefices-macros/LOG +++ b/packs/malefices-macros/LOG @@ -1,7 +1,7 @@ -2026/02/27-10:28:01.956384 7f56e3fff6c0 Recovering log #63 -2026/02/27-10:28:02.013265 7f56e3fff6c0 Delete type=0 #63 -2026/02/27-10:28:02.013323 7f56e3fff6c0 Delete type=3 #62 -2026/02/27-14:29:37.873932 7f54e37ef6c0 Level-0 table #67: started -2026/02/27-14:29:37.873976 7f54e37ef6c0 Level-0 table #67: 0 bytes OK -2026/02/27-14:29:37.880214 7f54e37ef6c0 Delete type=0 #65 -2026/02/27-14:29:37.880389 7f54e37ef6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end) +2026/04/01-21:52:59.529572 7f303f7fe6c0 Recovering log #66 +2026/04/01-21:52:59.539790 7f303f7fe6c0 Delete type=0 #66 +2026/04/01-21:52:59.539842 7f303f7fe6c0 Delete type=3 #64 +2026/04/01-21:56:55.083102 7f303effd6c0 Level-0 table #71: started +2026/04/01-21:56:55.083142 7f303effd6c0 Level-0 table #71: 0 bytes OK +2026/04/01-21:56:55.089723 7f303effd6c0 Delete type=0 #69 +2026/04/01-21:56:55.099487 7f303effd6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-macros/LOG.old b/packs/malefices-macros/LOG.old index ed59180..e32691f 100644 --- a/packs/malefices-macros/LOG.old +++ b/packs/malefices-macros/LOG.old @@ -1,3 +1,7 @@ -2026/02/27-00:10:01.064062 7fbc5affd6c0 Recovering log #60 -2026/02/27-00:10:01.123843 7fbc5affd6c0 Delete type=3 #58 -2026/02/27-00:10:01.123915 7fbc5affd6c0 Delete type=0 #60 +2026/02/27-10:28:01.956384 7f56e3fff6c0 Recovering log #63 +2026/02/27-10:28:02.013265 7f56e3fff6c0 Delete type=0 #63 +2026/02/27-10:28:02.013323 7f56e3fff6c0 Delete type=3 #62 +2026/02/27-14:29:37.873932 7f54e37ef6c0 Level-0 table #67: started +2026/02/27-14:29:37.873976 7f54e37ef6c0 Level-0 table #67: 0 bytes OK +2026/02/27-14:29:37.880214 7f54e37ef6c0 Delete type=0 #65 +2026/02/27-14:29:37.880389 7f54e37ef6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-macros/MANIFEST-000064 b/packs/malefices-macros/MANIFEST-000068 similarity index 59% rename from packs/malefices-macros/MANIFEST-000064 rename to packs/malefices-macros/MANIFEST-000068 index 98e1c0b..6b56db6 100644 Binary files a/packs/malefices-macros/MANIFEST-000064 and b/packs/malefices-macros/MANIFEST-000068 differ diff --git a/packs/malefices-tarots/000066.log b/packs/malefices-tarots/000070.log similarity index 100% rename from packs/malefices-tarots/000066.log rename to packs/malefices-tarots/000070.log diff --git a/packs/malefices-tarots/CURRENT b/packs/malefices-tarots/CURRENT index 5d746f2..284d53f 100644 --- a/packs/malefices-tarots/CURRENT +++ b/packs/malefices-tarots/CURRENT @@ -1 +1 @@ -MANIFEST-000064 +MANIFEST-000068 diff --git a/packs/malefices-tarots/LOG b/packs/malefices-tarots/LOG index 606670c..2ca2793 100644 --- a/packs/malefices-tarots/LOG +++ b/packs/malefices-tarots/LOG @@ -1,7 +1,7 @@ -2026/02/27-10:28:01.770730 7f56f9bff6c0 Recovering log #63 -2026/02/27-10:28:01.825327 7f56f9bff6c0 Delete type=0 #63 -2026/02/27-10:28:01.825401 7f56f9bff6c0 Delete type=3 #62 -2026/02/27-14:29:37.867627 7f54e37ef6c0 Level-0 table #67: started -2026/02/27-14:29:37.867663 7f54e37ef6c0 Level-0 table #67: 0 bytes OK -2026/02/27-14:29:37.873757 7f54e37ef6c0 Delete type=0 #65 -2026/02/27-14:29:37.880380 7f54e37ef6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end) +2026/04/01-21:52:59.490358 7f3054fed6c0 Recovering log #66 +2026/04/01-21:52:59.500678 7f3054fed6c0 Delete type=0 #66 +2026/04/01-21:52:59.500730 7f3054fed6c0 Delete type=3 #64 +2026/04/01-21:56:55.054021 7f303effd6c0 Level-0 table #71: started +2026/04/01-21:56:55.054050 7f303effd6c0 Level-0 table #71: 0 bytes OK +2026/04/01-21:56:55.060482 7f303effd6c0 Delete type=0 #69 +2026/04/01-21:56:55.067323 7f303effd6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-tarots/LOG.old b/packs/malefices-tarots/LOG.old index d992f26..606670c 100644 --- a/packs/malefices-tarots/LOG.old +++ b/packs/malefices-tarots/LOG.old @@ -1,3 +1,7 @@ -2026/02/27-00:10:00.890338 7fbca89ff6c0 Recovering log #60 -2026/02/27-00:10:00.949636 7fbca89ff6c0 Delete type=3 #58 -2026/02/27-00:10:00.949712 7fbca89ff6c0 Delete type=0 #60 +2026/02/27-10:28:01.770730 7f56f9bff6c0 Recovering log #63 +2026/02/27-10:28:01.825327 7f56f9bff6c0 Delete type=0 #63 +2026/02/27-10:28:01.825401 7f56f9bff6c0 Delete type=3 #62 +2026/02/27-14:29:37.867627 7f54e37ef6c0 Level-0 table #67: started +2026/02/27-14:29:37.867663 7f54e37ef6c0 Level-0 table #67: 0 bytes OK +2026/02/27-14:29:37.873757 7f54e37ef6c0 Delete type=0 #65 +2026/02/27-14:29:37.880380 7f54e37ef6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-tarots/MANIFEST-000064 b/packs/malefices-tarots/MANIFEST-000068 similarity index 76% rename from packs/malefices-tarots/MANIFEST-000064 rename to packs/malefices-tarots/MANIFEST-000068 index 645ce48..b1d4396 100644 Binary files a/packs/malefices-tarots/MANIFEST-000064 and b/packs/malefices-tarots/MANIFEST-000068 differ diff --git a/system.json b/system.json index 9ab67e1..a596519 100644 --- a/system.json +++ b/system.json @@ -70,8 +70,8 @@ "license": "LICENSE.txt", "manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json", "compatibility": { - "minimum": "11", - "verified": "13" + "minimum": "13", + "verified": "14" }, "id": "fvtt-malefices", "primaryTokenAttribute": "secondary.health",