13.0.7 - Sous le signe d'Illysis #768

Merged
uberwald merged 6 commits from VincentVk/foundryvtt-reve-de-dragon:v13 into v13 2025-09-12 20:56:25 +02:00
3 changed files with 25 additions and 8 deletions
Showing only changes of commit afd8c2ac80 - Show all commits

View File

@@ -6,6 +6,7 @@
- en cas d'appel au moral lorsqu'une double significative est requise,
le moral est perdu si la réussite est insuffisante
- transformation du niveau des musiques/danses/chants/recettes de cuisine en valeur numérique
## 13.0.6 - Le bandage d'Illysis

View File

@@ -632,7 +632,7 @@ class _12_0_38_TachesEcriture extends Migration {
async migrate() {
await this.applyItemsUpdates(items => items
.filter(it => [ITEM_TYPES.tache, ITEM_TYPES.livre, ITEM_TYPES.oeuvre, ITEM_TYPES.meditation].includes(it.type) )
.filter(it => [ITEM_TYPES.tache, ITEM_TYPES.livre, ITEM_TYPES.oeuvre, ITEM_TYPES.meditation].includes(it.type))
.filter(it => Grammar.equalsInsensitive(it.system.competence, 'ecriture'))
.map(it => { return { _id: it.id, 'system.competence': 'Écriture' } })
)
@@ -640,11 +640,26 @@ class _12_0_38_TachesEcriture extends Migration {
}
class _13_0_4_FixReveActuel extends Migration {
get code() { return "fix-revvve-actuel" }
get code() { return "fix-reve-actuel" }
get version() { return "13.0.4" }
async migrate() {
game.actors.forEach(it => it.update({'system.carac.-=reve-actuel': null}))
game.actors.forEach(it => it.update({ 'system.carac.-=reve-actuel': null }))
}
}
class _13_0_7_FixNiveauOeuvres extends Migration {
get code() { return "fix-niveau-oeuvres" }
get version() { return "13.0.7" }
async migrate() {
await this.applyItemsUpdates(items => items
.filter(it => [ITEM_TYPES.musique, ITEM_TYPES.chant, ITEM_TYPES.danse, ITEM_TYPES.recettecuisine].includes(it.type))
.map(it => {
const niveau = isNaN(it.system.niveau) ? 0 : parseInt(it.system.niveau)
return { _id: it.id, 'system.niveau': niveau }
})
)
}
}
@@ -671,7 +686,8 @@ export class Migrations {
new _12_0_32_MigrationRaces(),
new _12_0_37_MigrationAlchimieEtat(),
new _12_0_38_TachesEcriture(),
new _13_0_4_FixReveActuel()
new _13_0_4_FixReveActuel(),
new _13_0_7_FixNiveauOeuvres(),
];
}

View File

@@ -811,7 +811,7 @@
},
"musique": {
"templates": ["description"],
"niveau": "",
"niveau": 0,
"reference": ""
},
"danse": {
@@ -819,12 +819,12 @@
"type": "",
"agilite": false,
"apparence": false,
"niveau": "",
"niveau": 0,
"reference": ""
},
"chant": {
"templates": ["description"],
"niveau": "",
"niveau": 0,
"reference": ""
},
"jeu": {
@@ -836,7 +836,7 @@
},
"recettecuisine": {
"templates": ["description"],
"niveau": "",
"niveau": 0,
"ingredients": "",
"duree": "",
"sust": 0,