Compare commits

...

1 Commits

Author SHA1 Message Date
a816380679 Foundryv14 migration
All checks were successful
Release Creation / build (release) Successful in 47s
2026-04-01 21:57:26 +02:00
22 changed files with 82 additions and 70 deletions

View File

@@ -15,8 +15,8 @@ export class MaleficesActor extends Actor {
/** /**
* Override the create() function to provide additional SoS functionality. * Override the create() function to provide additional SoS functionality.
* *
* This overrided create() function adds initial items * This overrided create() function adds initial items
* Namely: Basic skills, money, * Namely: Basic skills, money,
* *
* @param {Object} data Barebones actor data which this function adds onto. * @param {Object} data Barebones actor data which this function adds onto.
* @param {Object} options (Unused) Additional options which customize the creation workflow. * @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); return super.create(data, options);
} }
/* -------------------------------------------- */
prepareBaseData() {
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async prepareData() { async prepareData() {
@@ -92,7 +88,7 @@ export class MaleficesActor extends Actor {
return comp; return comp;
} }
getArchetype() { 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) { if (comp && comp.system) {
comp.tarot = MaleficesUtility.getTarot(comp.system.lametutelaire) comp.tarot = MaleficesUtility.getTarot(comp.system.lametutelaire)
} }
@@ -224,13 +220,13 @@ export class MaleficesActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
clearInitiative(){ clearInitiative() {
this.getFlag("world", "initiative", -1) this.getFlag("world", "initiative", -1)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getInitiativeScore(combatId, combatantId) { getInitiativeScore(combatId, combatantId) {
let init = Math.floor( (this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) let init = Math.floor((this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2)
let subvalue = new Roll("1d20").roll({async: false}) let subvalue = new Roll("1d20").roll({ async: false })
return init + (subvalue.total / 100) return init + (subvalue.total / 100)
} }
@@ -275,25 +271,25 @@ export class MaleficesActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
incDecFluide(value) { incDecFluide(value) {
let fluide = this.system.fluide + value let fluide = this.system.fluide + value
this.update( {'system.fluide': fluide} ) this.update({ 'system.fluide': fluide })
} }
incDecDestin(value) { incDecDestin(value) {
let destin = this.system.pointdestin + value let destin = this.system.pointdestin + value
this.update( {'system.pointdestin': destin} ) this.update({ 'system.pointdestin': destin })
} }
incDecMPMB(value) { incDecMPMB(value) {
let mpmb = this.system.mpmb + value let mpmb = this.system.mpmb + value
this.update( {'system.mpmb': mpmb} ) this.update({ 'system.mpmb': mpmb })
} }
incDecMPMN(value) { incDecMPMN(value) {
let mpmn = this.system.mpmn + value let mpmn = this.system.mpmn + value
this.update( {'system.mpmn': mpmn} ) this.update({ 'system.mpmn': mpmn })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
incDecAttr(attrKey, value) { incDecAttr(attrKey, value) {
let attr = foundry.utils.duplicate(this.system.attributs[attrKey]) let attr = foundry.utils.duplicate(this.system.attributs[attrKey])
attr.value += value attr.value += value
this.update( { [`system.attributs.${attrKey}`]: attr}) this.update({ [`system.attributs.${attrKey}`]: attr })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async incDecQuantity(objetId, incDec = 0) { 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` return `systems/fvtt-malefices/images/icons/${attrKey}.webp`
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
incDecDestin( value) { incDecDestin(value) {
let newValue = Math.max( this.system.pointdestin + value, 0) let newValue = Math.max(this.system.pointdestin + value, 0)
this.update( {'system.pointdestin': newValue}) this.update({ 'system.pointdestin': newValue })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getCommonRollData() { getCommonRollData() {
@@ -349,7 +345,7 @@ export class MaleficesActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getPhysiqueMalus() { getPhysiqueMalus() {
if ( this.system.attributs.constitution.value <= 8) { if (this.system.attributs.constitution.value <= 8) {
return -(9 - this.system.attributs.constitution.value) return -(9 - this.system.attributs.constitution.value)
} }
return 0 return 0
@@ -361,7 +357,7 @@ export class MaleficesActor extends Actor {
let rollData = this.getCommonRollData() let rollData = this.getCommonRollData()
rollData.attr = foundry.utils.duplicate(attr) rollData.attr = foundry.utils.duplicate(attr)
rollData.mode = "attribut" rollData.mode = "attribut"
rollData.title = attr.label rollData.title = attr.label
rollData.img = this.getAtttributImage(attrKey) rollData.img = this.getAtttributImage(attrKey)
this.startRoll(rollData) this.startRoll(rollData)
} }
@@ -373,7 +369,7 @@ export class MaleficesActor extends Actor {
arme = foundry.utils.duplicate(arme) arme = foundry.utils.duplicate(arme)
let rollData = this.getCommonRollData() let rollData = this.getCommonRollData()
if (arme.system.armetype == "mainsnues" || arme.system.armetype == "epee") { 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 { } else {
rollData.attr = foundry.utils.duplicate(this.system.attributs.habilite) 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 ") ui.notifications.warn("Impossible de trouver l'arme concernée ")
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async startRoll(rollData) { async startRoll(rollData) {
await MaleficesRollDialog.create(this, rollData) await MaleficesRollDialog.create(this, rollData)

View File

@@ -1 +1 @@
MANIFEST-000064 MANIFEST-000068

View File

@@ -1,7 +1,7 @@
2026/02/27-10:28:01.892467 7f56f8bfd6c0 Recovering log #63 2026/04/01-21:52:59.516756 7f30557ee6c0 Recovering log #66
2026/02/27-10:28:01.948160 7f56f8bfd6c0 Delete type=0 #63 2026/04/01-21:52:59.526211 7f30557ee6c0 Delete type=0 #66
2026/02/27-10:28:01.948272 7f56f8bfd6c0 Delete type=3 #62 2026/04/01-21:52:59.526277 7f30557ee6c0 Delete type=3 #64
2026/02/27-14:29:37.861283 7f54e37ef6c0 Level-0 table #67: started 2026/04/01-21:56:55.040835 7f303effd6c0 Level-0 table #71: started
2026/02/27-14:29:37.861314 7f54e37ef6c0 Level-0 table #67: 0 bytes OK 2026/04/01-21:56:55.040885 7f303effd6c0 Level-0 table #71: 0 bytes OK
2026/02/27-14:29:37.867488 7f54e37ef6c0 Delete type=0 #65 2026/04/01-21:56:55.047352 7f303effd6c0 Delete type=0 #69
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:56:55.067290 7f303effd6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end)

View File

@@ -1,3 +1,7 @@
2026/02/27-00:10:01.008967 7fbc5bfff6c0 Recovering log #60 2026/02/27-10:28:01.892467 7f56f8bfd6c0 Recovering log #63
2026/02/27-00:10:01.061613 7fbc5bfff6c0 Delete type=3 #58 2026/02/27-10:28:01.948160 7f56f8bfd6c0 Delete type=0 #63
2026/02/27-00:10:01.061695 7fbc5bfff6c0 Delete type=0 #60 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)

View File

@@ -1 +1 @@
MANIFEST-000064 MANIFEST-000068

View File

@@ -1,7 +1,7 @@
2026/02/27-10:28:01.832073 7f56f93fe6c0 Recovering log #63 2026/04/01-21:52:59.503313 7f303ffff6c0 Recovering log #66
2026/02/27-10:28:01.886020 7f56f93fe6c0 Delete type=0 #63 2026/04/01-21:52:59.513994 7f303ffff6c0 Delete type=0 #66
2026/02/27-10:28:01.886089 7f56f93fe6c0 Delete type=3 #62 2026/04/01-21:52:59.514046 7f303ffff6c0 Delete type=3 #64
2026/02/27-14:29:37.854040 7f54e37ef6c0 Level-0 table #67: started 2026/04/01-21:56:55.047475 7f303effd6c0 Level-0 table #71: started
2026/02/27-14:29:37.854089 7f54e37ef6c0 Level-0 table #67: 0 bytes OK 2026/04/01-21:56:55.047500 7f303effd6c0 Level-0 table #71: 0 bytes OK
2026/02/27-14:29:37.861166 7f54e37ef6c0 Delete type=0 #65 2026/04/01-21:56:55.053914 7f303effd6c0 Delete type=0 #69
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:56:55.067309 7f303effd6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end)

View File

@@ -1,3 +1,7 @@
2026/02/27-00:10:00.951941 7fbc5b7fe6c0 Recovering log #60 2026/02/27-10:28:01.832073 7f56f93fe6c0 Recovering log #63
2026/02/27-00:10:01.006960 7fbc5b7fe6c0 Delete type=3 #58 2026/02/27-10:28:01.886020 7f56f93fe6c0 Delete type=0 #63
2026/02/27-00:10:01.007022 7fbc5b7fe6c0 Delete type=0 #60 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)

View File

@@ -1 +1 @@
MANIFEST-000064 MANIFEST-000068

View File

@@ -1,7 +1,7 @@
2026/02/27-10:28:01.956384 7f56e3fff6c0 Recovering log #63 2026/04/01-21:52:59.529572 7f303f7fe6c0 Recovering log #66
2026/02/27-10:28:02.013265 7f56e3fff6c0 Delete type=0 #63 2026/04/01-21:52:59.539790 7f303f7fe6c0 Delete type=0 #66
2026/02/27-10:28:02.013323 7f56e3fff6c0 Delete type=3 #62 2026/04/01-21:52:59.539842 7f303f7fe6c0 Delete type=3 #64
2026/02/27-14:29:37.873932 7f54e37ef6c0 Level-0 table #67: started 2026/04/01-21:56:55.083102 7f303effd6c0 Level-0 table #71: started
2026/02/27-14:29:37.873976 7f54e37ef6c0 Level-0 table #67: 0 bytes OK 2026/04/01-21:56:55.083142 7f303effd6c0 Level-0 table #71: 0 bytes OK
2026/02/27-14:29:37.880214 7f54e37ef6c0 Delete type=0 #65 2026/04/01-21:56:55.089723 7f303effd6c0 Delete type=0 #69
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:56:55.099487 7f303effd6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end)

View File

@@ -1,3 +1,7 @@
2026/02/27-00:10:01.064062 7fbc5affd6c0 Recovering log #60 2026/02/27-10:28:01.956384 7f56e3fff6c0 Recovering log #63
2026/02/27-00:10:01.123843 7fbc5affd6c0 Delete type=3 #58 2026/02/27-10:28:02.013265 7f56e3fff6c0 Delete type=0 #63
2026/02/27-00:10:01.123915 7fbc5affd6c0 Delete type=0 #60 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)

View File

@@ -1 +1 @@
MANIFEST-000064 MANIFEST-000068

View File

@@ -1,7 +1,7 @@
2026/02/27-10:28:01.770730 7f56f9bff6c0 Recovering log #63 2026/04/01-21:52:59.490358 7f3054fed6c0 Recovering log #66
2026/02/27-10:28:01.825327 7f56f9bff6c0 Delete type=0 #63 2026/04/01-21:52:59.500678 7f3054fed6c0 Delete type=0 #66
2026/02/27-10:28:01.825401 7f56f9bff6c0 Delete type=3 #62 2026/04/01-21:52:59.500730 7f3054fed6c0 Delete type=3 #64
2026/02/27-14:29:37.867627 7f54e37ef6c0 Level-0 table #67: started 2026/04/01-21:56:55.054021 7f303effd6c0 Level-0 table #71: started
2026/02/27-14:29:37.867663 7f54e37ef6c0 Level-0 table #67: 0 bytes OK 2026/04/01-21:56:55.054050 7f303effd6c0 Level-0 table #71: 0 bytes OK
2026/02/27-14:29:37.873757 7f54e37ef6c0 Delete type=0 #65 2026/04/01-21:56:55.060482 7f303effd6c0 Delete type=0 #69
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:56:55.067323 7f303effd6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end)

View File

@@ -1,3 +1,7 @@
2026/02/27-00:10:00.890338 7fbca89ff6c0 Recovering log #60 2026/02/27-10:28:01.770730 7f56f9bff6c0 Recovering log #63
2026/02/27-00:10:00.949636 7fbca89ff6c0 Delete type=3 #58 2026/02/27-10:28:01.825327 7f56f9bff6c0 Delete type=0 #63
2026/02/27-00:10:00.949712 7fbca89ff6c0 Delete type=0 #60 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)

View File

@@ -70,8 +70,8 @@
"license": "LICENSE.txt", "license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
"compatibility": { "compatibility": {
"minimum": "11", "minimum": "13",
"verified": "13" "verified": "14"
}, },
"id": "fvtt-malefices", "id": "fvtt-malefices",
"primaryTokenAttribute": "secondary.health", "primaryTokenAttribute": "secondary.health",