From 6885ef738e4e28faafb186e0d73836677d3365a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Devouard?= Date: Tue, 30 Mar 2021 10:51:58 +0200 Subject: [PATCH] COC Version 3.9.0 --- ChroniquesOublieesContemporain/coc.html | 519 +++++++++++++++++++----- 1 file changed, 407 insertions(+), 112 deletions(-) diff --git a/ChroniquesOublieesContemporain/coc.html b/ChroniquesOublieesContemporain/coc.html index 604fe1c8d5..a0159d9a0c 100644 --- a/ChroniquesOublieesContemporain/coc.html +++ b/ChroniquesOublieesContemporain/coc.html @@ -1,8 +1,8 @@
- - + + @@ -82,13 +82,13 @@
-
-
@@ -1138,8 +1138,8 @@ CAPACITÉS DU PERSONNAGE - + Edition  @@ -1167,75 +1167,150 @@ 1 - + + + + +
- + + + + +
- + + + + +
2 - + + + + +
- + + + + +
- + + + + +
3 - + + + + +
- + + + + +
- + + + + +
4 - + + + + +
- + + + + +
- + + + + +
5 - + + + + +
- + + + + +
- + + + + +
@@ -1265,75 +1340,150 @@ 1 - + + + + +
- + + + + +
- + + + + +
2 - + + + + +
- + + + + +
- + + + + +
3 - + + + + +
- + + + + +
- + + + + +
4 - + + + + +
- + + + + +
- + + + + +
5 - + + + + +
- + + + + +
- + + + + +
@@ -1367,75 +1517,150 @@ 1 - + + + + +
- + + + + +
- + + + + +
2 - + + + + +
- + + + + +
- + + + + +
3 - + + + + +
- + + + + +
- + + + + +
4 - + + + + +
- + + + + +
- + + + + +
5 - + + + + +
- + + + + +
- + + + + +
@@ -1447,8 +1672,8 @@ CAPACITÉS DU PERSONNAGE - + Affichage  @@ -1476,75 +1701,90 @@ 1 - + +
- + +
- + +
2 - + +
- + +
- + +
3 - + +
- + +
- + +
4 - + +
- + +
- + +
5 - + +
- + +
- + +
@@ -1574,75 +1814,90 @@ 1 - + +
- + +
- + +
2 - + +
- + +
- + +
3 - + +
- + +
- + +
4 - + +
- + +
- + +
5 - + +
- + +
- + +
@@ -1676,75 +1931,90 @@ 1 - + +
- + +
- + +
2 - + +
- + +
- + +
3 - + +
- + +
- + +
4 - + +
- + +
- + +
5 - + +
- + +
- + +
@@ -4148,6 +4418,29 @@ function migrateSheet(verfdp) { setAttrs(vrFlags); }); } + // version 3.2 > 3.9 + if (verfdp.major == 3 && verfdp.minor < 9) { + const abilities = []; + for (v = 1; v < 10; v++) { + for (r = 1; r < 6; r++) { + abilities.push(`voie${v}-${r}`); + } + } + getAttrs(abilities, function (values) { + const abilityAttrs = {}; + Object.keys(values).forEach((ability) => { + if (!values[ability] || values[ability] === '') return; + const data = values[ability].split('\n'); + const title = data.shift(); + let desc = ''; + if (data.length > 0) desc = data.join('\n'); + abilityAttrs[ability] = desc; + abilityAttrs[ability.replace('-', '-t')] = title; + }); + consoleLog(abilityAttrs); + setAttrs(abilityAttrs); + }); + } } /** @@ -5264,10 +5557,12 @@ on( function (values) { const vr = `${values.repeating_jetcapas_jetcapavoieno}${values.repeating_jetcapas_jetcapavoierang}`; if (vr.length !== 4) return; - getAttrs([vr.replace('v', 'voie').replace('r', '-')], function (value) { - const rankData = value[Object.keys(value)[0]].split('\n'); - const rankName = rankData.shift(); - const rankDesc = rankData.length > 0 ? rankData.join('\n') : ''; + const rankData = []; + rankData.push(vr.replace('v', 'voie').replace('r', '-t')); + rankData.push(vr.replace('v', 'voie').replace('r', '-')); + getAttrs(rankData, function (values) { + const rankName = values[Object.keys(values)[0]]; + const rankDesc = values[Object.keys(values)[1]]; const updated = { repeating_jetcapas_jetcapanom: rankName, repeating_jetcapas_jetcapadesc: rankDesc, @@ -5712,14 +6007,14 @@ function rebuildModAtkDM(section, buffAttr) { updateMatchBuffs(modNom, modOn); } ); - getSectionIDs('repeating_armes', function (ids) { - const attrs = {}; - for (const id of ids) { - attrs[`repeating_armes_${id}_${buffAttr}`] = armebuff; - } - setAttrs(attrs, { silent: true }); - }); } + getSectionIDs('repeating_armes', function (ids) { + const attrs = {}; + for (const id of ids) { + attrs[`repeating_armes_${id}_${buffAttr}`] = armebuff; + } + setAttrs(attrs, { silent: true }); + }); }); } @@ -6718,11 +7013,11 @@ on('clicked:json_import', function () { jsonData.paths.forEach((path, ix) => { attrs[`voie${ix + 1}nom`] = path.name; path.abilities.forEach((ability, rank) => { - const abilityAttr = `voie${ix + 1}-${rank + 1}`; if (typeof ability === 'string') { - attrs[abilityAttr] = ability; + attrs[`voie${ix + 1}-t${rank + 1}`] = ability; } else { - attrs[abilityAttr] = ability.name + '\n' + ability.description; + attrs[`voie${ix + 1}-t${rank + 1}`] = ability.name; + attrs[`voie${ix + 1}-${rank + 1}`] = ability.description; } }); });