From 3ca8ca52548b37c5a6fbc8bd2d3e10bb4eaf74fa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Ghibaudo Date: Sun, 28 Apr 2024 16:47:46 +0200 Subject: [PATCH] Bug fixing and Summary rolls improved --- Agone-(french)/agone-sheet.css | 30 ++-- Agone-(french)/agone-sheet.html | 293 +++++++++++++++++++------------- Agone-(french)/sheet.json | 2 +- Agone-(french)/translation.json | 13 +- 4 files changed, 201 insertions(+), 137 deletions(-) diff --git a/Agone-(french)/agone-sheet.css b/Agone-(french)/agone-sheet.css index 0f82b9b1b7c1..d549e38d1e06 100644 --- a/Agone-(french)/agone-sheet.css +++ b/Agone-(french)/agone-sheet.css @@ -1,11 +1,5 @@ /* General */ @import url('https://fonts.googleapis.com/css?family=Merienda+One&display=swap'); -.sheetform { width: 870px; } -.sheet-darkmode .sheetform { background: none; } -.charsheet, .charsheet p { - font-family: 'Merienda One', cursive; - margin-left: -10px; -} :root { --background-img: url('https://imgsrv.roll20.net/?src=http%3A//legdf.free.fr/src/img/roll20-2/background.png'); @@ -21,6 +15,14 @@ --wood-shadow: 0 0 4px 0 black; } +.sheetform { width: 870px; } +.sheet-darkmode .sheetform { background: none; } +.charsheet, .charsheet p { + font-family: 'Merienda One', cursive; + margin-left: -10px; + overflow: hidden; +} + .grid { display: grid; grid-auto-rows: minmax(30px, auto); @@ -297,12 +299,20 @@ input[type="checkbox"].switch { position: absolute; left: 761px; } +.summary-weapon { + opacity: 0; + z-index: -1000; +} +.summary-weapon.active { + opacity: 1; + z-index: 1; +} .help-menu { position: absolute; left: 832px; } -.lang-en .summary-menu { left: 756px; } -.lang-en .help-menu { left: 841px; } +.lang-en .summary-menu { left: 743px; } +.lang-en .help-menu { left: 829px; } button.pc-sub-menu { cursor: pointer; @@ -370,14 +380,12 @@ button.pc-sub-menu.active { box-shadow: inset 1px 1px 2px 2px rgba(0, 0, 0, 0.65 } .pc-summary { justify-items: center; - grid-template-columns: 4fr repeat(4, 0.5fr) 4fr repeat(4, 0.5fr); + grid-template-columns: 2fr repeat(4, 0.5fr) repeat(3, 1.6fr 0.4fr); } .pc-summary-state-lbl { grid-column: 1/6; } .pc-summary-rolls-lbl { grid-column: 6/-1; } .pc-summary-state-first-full { grid-column: 2/4; } .pc-summary-state-second-full { grid-column: 4/6; } -.pc-summary-rolls-first-full { grid-column: 7/9; } -.pc-summary-rolls-second-full { grid-column: 9/-1; } .pc-summary-weapons { justify-items: center; grid-template-columns: repeat(5, 1fr); diff --git a/Agone-(french)/agone-sheet.html b/Agone-(french)/agone-sheet.html index ed103acf940f..afdf5a5fa006 100644 --- a/Agone-(french)/agone-sheet.html +++ b/Agone-(french)/agone-sheet.html @@ -1,6 +1,6 @@ - + @@ -21,60 +21,73 @@ Points de Vie - Jet générique (ouvert/fermé) - - + Ouvert + + Fermé + + + Points d'Héroïsme - Caractéristiques / Fumble - - + Caractéristiques + + + + + Équipement - Compétences / Conjuration - - + Compétences + + + + + Armure - Initiative / Esquive / Défense Naturelle - - - + Initiative + + Esquive + + Défense Naturelle + Blessure(s) Grave(s) - Initiative / Emprise / Arts Magiques - - - + Initiative (Sorts) + + Emprise + + +
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
@@ -1928,6 +1941,20 @@

Aide à l'utilisation de } }); } + if (tab === 'summary') { + getAttrs(['pcWeapon1', 'pcWeapon2', 'pcWeapon3', 'pcWeapon4', 'pcWeapon5', 'pcWeapon6', 'pcWeapon7', 'pcWeapon8', 'pcWeapon9', 'pcWeapon10'], function(v) { + let regex = new RegExp('^'+getTranslationByKey('weapons-option').split(' ')[0]+'.*$', ''); + for (var i = 1; i < 11; i++) { + if (!regex.test(parseV(v, 'pcWeapon'+i, 'str'))) { + $20(`span[data-summary=pcWeapon${i}]`).addClass('active'); + $20(`button[data-summary=pcWeapon${i}]`).addClass('active'); + } else { + $20(`span[data-summary=pcWeapon${i}]`).removeClass('active'); + $20(`button[data-summary=pcWeapon${i}]`).removeClass('active'); + } + } + }); + } }); $20('.pc-sub-menu').on('click', (e) => { let tab = e.htmlAttributes['data-tab']; @@ -1944,7 +1971,7 @@

Aide à l'utilisation de // Global on('sheet:opened', function() { // PC - let weaponsOptions = []; + let pcWeaponsOptions = []; let z = 1; let regex = new RegExp('^'+getTranslationByKey('weapons-option').split(' ')[0]+'.*$', ''); getSectionIDs('repeating_pc-skills', function(r) { @@ -1952,25 +1979,33 @@

Aide à l'utilisation de _.each(r, function(id, i) { getAttrs(['repeating_pc-skills_'+id+'_pcSkillName', 'repeating_pc-skills_'+id+'_pcSkillBranch'], function(v) { if (regex.test(v['repeating_pc-skills_'+id+'_pcSkillName'])) { - weaponsOptions.push({label: v['repeating_pc-skills_'+id+'_pcSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{pcWeaponSkill-'+z+'}'}); + pcWeaponsOptions.push({label: v['repeating_pc-skills_'+id+'_pcSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{pcWeaponSkill-'+z+'}'}); z += 1; } if (i == r.length - 1) { + pcWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{pcWeaponSkill-'+z+'}'}); populateListOptions({ elemSelector: '.pcWeaponSkill', - optionsArray: weaponsOptions + optionsArray: pcWeaponsOptions }); } }); }); + } else { + setAttrs({'pcWeaponSkill-1': -3}); + pcWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{pcWeaponSkill-1}'}); + populateListOptions({ + elemSelector: '.pcWeaponSkill', + optionsArray: pcWeaponsOptions + }); } }); - dancersOptions = []; + dancersOptions = [{label: 'N/A', value: 'Dancer-0'}]; getSectionIDs('repeating_pc-ascendancies', function(r) { if (r.length > 0) { _.each(r, function(id, i) { getAttrs(['repeating_pc-ascendancies_'+id+'_pcDancer'], function(v) { - dancersOptions.push({label: v['repeating_pc-ascendancies_'+id+'_pcDancer'], value: v['repeating_pc-ascendancies_'+id+'_pcDancer']}); + dancersOptions.push({label: v['repeating_pc-ascendancies_'+id+'_pcDancer'], value: 'Dancer-'+parseInt(i+1)}); if (i == r.length -1) { populateListOptions({ elemSelector: '.pcSpellDancer', @@ -1983,68 +2018,92 @@

Aide à l'utilisation de }); // Companion - weaponsOptions = []; + companionWeaponsOptions = []; z = 1; getSectionIDs('repeating_companion-skills', function(r) { if (r.length > 0) { _.each(r, function(id, i) { getAttrs(['repeating_companion-skills_'+id+'_companionSkillName', 'repeating_companion-skills_'+id+'_companionSkillBranch'], function(v) { if (regex.test(v['repeating_companion-skills_'+id+'_companionSkillName'])) { - weaponsOptions.push({label: v['repeating_companion-skills_'+id+'_companionSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{companionWeaponSkill-'+z+'}'}); + companionWeaponsOptions.push({label: v['repeating_companion-skills_'+id+'_companionSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{companionWeaponSkill-'+z+'}'}); z += 1; } if (i == r.length - 1) { + companionWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{companionWeaponSkill-'+z+'}'}); populateListOptions({ elemSelector: '.companionWeaponSkill', - optionsArray: weaponsOptions + optionsArray: companionWeaponsOptions }); } }); }); + } else { + setAttrs({'companionWeaponSkill-1': -3}); + companionWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{companionWeaponSkill-1}'}); + populateListOptions({ + elemSelector: '.companionWeaponSkill', + optionsArray: companionWeaponsOptions + }); } }); // Demon - weaponsOptions = []; + demonWeaponsOptions = []; z = 1; getSectionIDs('repeating_demon-skills', function(r) { if (r.length > 0) { _.each(r, function(id, i) { getAttrs(['repeating_demon-skills_'+id+'_demonSkillName', 'repeating_demon-skills_'+id+'_demonSkillBranch'], function(v) { if (regex.test(v['repeating_demon-skills_'+id+'_demonSkillName'])) { - weaponsOptions.push({label: v['repeating_demon-skills_'+id+'_demonSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{demonWeaponSkill-'+z+'}'}); + demonWeaponsOptions.push({label: v['repeating_demon-skills_'+id+'_demonSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{demonWeaponSkill-'+z+'}'}); z += 1; } if (i == r.length - 1) { + demonWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{demonWeaponSkill-'+z+'}'}); populateListOptions({ elemSelector: '.demonWeaponSkill', - optionsArray: weaponsOptions + optionsArray: demonWeaponsOptions }); } }); }); + } else { + setAttrs({'demonWeaponSkill-1': -3}); + demonWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{demonWeaponSkill-1}'}); + populateListOptions({ + elemSelector: '.demonWeaponSkill', + optionsArray: demonWeaponsOptions + }); } }); // NPC - weaponsOptions = []; + npcWeaponsOptions = []; z = 1; getSectionIDs('repeating_npc-skills', function(r) { if (r.length > 0) { _.each(r, function(id, i) { getAttrs(['repeating_npc-skills_'+id+'_npcSkillName', 'repeating_npc-skills_'+id+'_npcSkillBranch'], function(v) { if (regex.test(v['repeating_npc-skills_'+id+'_npcSkillName'])) { - weaponsOptions.push({label: v['repeating_npc-skills_'+id+'_npcSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{npcWeaponSkill-'+z+'}'}); + npcWeaponsOptions.push({label: v['repeating_npc-skills_'+id+'_npcSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{npcWeaponSkill-'+z+'}'}); z += 1; } if (i == r.length - 1) { + npcWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{npcWeaponSkill-'+z+'}'}); populateListOptions({ elemSelector: '.npcWeaponSkill', - optionsArray: weaponsOptions + optionsArray: npcWeaponsOptions }); } }); }); + } else { + setAttrs({'npcWeaponSkill-1': -3}); + npcWeaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{npcWeaponSkill-1}'}); + populateListOptions({ + elemSelector: '.npcWeaponSkill', + optionsArray: npcWeaponsOptions + }); } }); @@ -2064,6 +2123,20 @@

Aide à l'utilisation de let tab = parseV(v, 'Menu', 'str'); $20('div[data-tab]').removeClass('active'); $20(`div[data-tab=${tab}]`).addClass('active'); + if (tab === 'summary') { + getAttrs(['pcWeapon1', 'pcWeapon2', 'pcWeapon3', 'pcWeapon4', 'pcWeapon5', 'pcWeapon6', 'pcWeapon7', 'pcWeapon8', 'pcWeapon9', 'pcWeapon10'], function(v) { + let regex = new RegExp('^'+getTranslationByKey('weapons-option').split(' ')[0]+'.*$', ''); + for (var i = 1; i < 11; i++) { + if (!regex.test(parseV(v, 'pcWeapon'+i, 'str'))) { + $20(`span[data-summary=pcWeapon${i}]`).addClass('active'); + $20(`button[data-summary=pcWeapon${i}]`).addClass('active'); + } else { + $20(`span[data-summary=pcWeapon${i}]`).removeClass('active'); + $20(`button[data-summary=pcWeapon${i}]`).removeClass('active'); + } + } + }); + } }); getAttrs(['pcAttributesCheck', 'pcSecondaryAttributesCheck', 'pcSkillsCheck', 'pcAssetsFaultsCheck', 'pcDarknessPerfidyCheck', 'pcFlameSeasonCurrencyCheck', 'pcStuffCheck', 'pcCombatCheck', 'pcWeaponsCheck', 'pcAscendancyCheck', 'pcArtCheck', 'pcSpellsCheck', 'pcInvokingCheck', 'pcNotesCheck'], function(v) { @@ -2246,8 +2319,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_pc-weapons_'+id+'_pcWeaponInit', 'repeating_pc-weapons_'+id+'_pcAimOrNot', 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'repeating_pc-weapons_'+id+'_pcWeaponAttack', 'repeating_pc-weapons_'+id+'_pcWeaponDefense', 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'pcAgility', 'pcPerception', 'pcBodyBonus', 'pcMelee', 'pcAim', 'pcWeaponSkill-1', 'pcWeaponSkill-2', 'pcWeaponSkill-3', 'pcWeaponSkill-4', 'pcWeaponSkill-5', 'pcWeaponSkill-6', 'pcWeaponSkill-7', 'pcWeaponSkill-8', 'pcWeaponSkill-9', 'pcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'pcWeaponSkill-'+s); setAttrs({['repeating_pc-weapons_'+id+'_pcWeaponInitTotal']: weaponInit(parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponInit'), parseV(v, 'pcAgility'), parseV(v, 'pcPerception'), parseV(v, 'pcBodyBonus'))}); setAttrs({['repeating_pc-weapons_'+id+'_pcWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'str'), parseV(v, 'repeating_pc-weapons_'+id+'_pcAimOrNot'), parseV(v, 'pcMelee'), parseV(v, 'pcAim'), parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponAttack'), parseV(v, 'pcBodyBonus'))}); @@ -2262,8 +2334,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_pc-weapons_'+id+'_pcWeaponSkill', 'repeating_pc-weapons_'+id+'_pcAimOrNot', 'repeating_pc-weapons_'+id+'_pcWeaponAttack', 'repeating_pc-weapons_'+id+'_pcWeaponDefense', 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'pcBodyBonus', 'pcMelee', 'pcWeaponSkill-1', 'pcWeaponSkill-2', 'pcWeaponSkill-3', 'pcWeaponSkill-4', 'pcWeaponSkill-5', 'pcWeaponSkill-6', 'pcWeaponSkill-7', 'pcWeaponSkill-8', 'pcWeaponSkill-9', 'pcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'pcWeaponSkill-'+s); if (parseV(v, 'repeating_pc-weapons_'+id+'_pcAimOrNot') >= 0) { setAttrs({['repeating_pc-weapons_'+id+'_pcWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'str'), 0, parseV(v, 'pcMelee'), 0, parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponAttack'), parseV(v, 'pcBodyBonus'))}); @@ -2279,8 +2350,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_pc-weapons_'+id+'_pcWeaponSkill', 'repeating_pc-weapons_'+id+'_pcAimOrNot', 'repeating_pc-weapons_'+id+'_pcWeaponAttack', 'pcBodyBonus', 'pcAim', 'pcWeaponSkill-1', 'pcWeaponSkill-2', 'pcWeaponSkill-3', 'pcWeaponSkill-4', 'pcWeaponSkill-5', 'pcWeaponSkill-6', 'pcWeaponSkill-7', 'pcWeaponSkill-8', 'pcWeaponSkill-9', 'pcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'pcWeaponSkill-'+s); if (parseV(v, 'repeating_pc-weapons_'+id+'_pcAimOrNot') < 0) setAttrs({['repeating_pc-weapons_'+id+'_pcWeaponAttackTotal']: weaponScore(ws, 'missile', -1, 0, parseV(v, 'pcAim'), parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponAttack'), parseV(v, 'pcBodyBonus'))}); }); @@ -2309,8 +2379,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_pc-weapons_'+id+'_pcWeaponSkill', 'repeating_pc-weapons_'+id+'_pcAimOrNot', 'repeating_pc-weapons_'+id+'_pcWeaponAttack', 'repeating_pc-weapons_'+id+'_pcWeaponDefense', 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'pcMelee', 'pcAim', 'pcBodyBonus', 'pcWeaponSkill-1', 'pcWeaponSkill-2', 'pcWeaponSkill-3', 'pcWeaponSkill-4', 'pcWeaponSkill-5', 'pcWeaponSkill-6', 'pcWeaponSkill-7', 'pcWeaponSkill-8', 'pcWeaponSkill-9', 'pcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'pcWeaponSkill-'+s); setAttrs({['repeating_pc-weapons_'+id+'_pcWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'str'), parseV(v, 'repeating_pc-weapons_'+id+'_pcAimOrNot'), parseV(v, 'pcMelee'), parseV(v, 'pcAim'), parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponAttack'), parseV(v, 'pcBodyBonus'))}); setAttrs({['repeating_pc-weapons_'+id+'_pcWeaponDefenseTotal']: weaponScore(ws, parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponStyle', 'str'), 0, parseV(v, 'pcMelee'), 0, parseV(v, 'repeating_pc-weapons_'+id+'_pcWeaponDefense'), parseV(v, 'pcBodyBonus'))}); @@ -2321,16 +2390,14 @@

Aide à l'utilisation de }); on('change:repeating_pc-weapons:pcWeaponAttack change:repeating_pc-weapons:pcWeaponSkill change:repeating_pc-weapons:pcAimOrNot', function() { getAttrs(['repeating_pc-weapons_pcWeaponSkill', 'repeating_pc-weapons_pcAimOrNot', 'repeating_pc-weapons_pcWeaponAttack', 'repeating_pc-weapons_pcWeaponStyle', 'pcMelee', 'pcAim', 'pcBodyBonus', 'pcWeaponSkill-1', 'pcWeaponSkill-2', 'pcWeaponSkill-3', 'pcWeaponSkill-4', 'pcWeaponSkill-5', 'pcWeaponSkill-6', 'pcWeaponSkill-7', 'pcWeaponSkill-8', 'pcWeaponSkill-9', 'pcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_pc-weapons_pcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_pc-weapons_pcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'pcWeaponSkill-'+s); setAttrs({'repeating_pc-weapons_pcWeaponAttackTotal': weaponScore(ws, parseV(v, 'repeating_pc-weapons_pcWeaponStyle', 'str'), parseV(v, 'repeating_pc-weapons_pcAimOrNot'), parseV(v, 'pcMelee'), parseV(v, 'pcAim'), parseV(v, 'repeating_pc-weapons_pcWeaponAttack'), parseV(v, 'pcBodyBonus'))}); }); }); on('change:repeating_pc-weapons:pcWeaponDefense change:repeating_pc-weapons:pcWeaponSkill', function() { getAttrs(['repeating_pc-weapons_pcWeaponDefense', 'repeating_pc-weapons_pcWeaponSkill', 'repeating_pc-weapons_pcWeaponStyle', 'pcMelee', 'pcBodyBonus', 'pcWeaponSkill-1', 'pcWeaponSkill-2', 'pcWeaponSkill-3', 'pcWeaponSkill-4', 'pcWeaponSkill-5', 'pcWeaponSkill-6', 'pcWeaponSkill-7', 'pcWeaponSkill-8', 'pcWeaponSkill-9', 'pcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_pc-weapons_pcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_pc-weapons_pcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'pcWeaponSkill-'+s); setAttrs({'repeating_pc-weapons_pcWeaponDefenseTotal': weaponScore(ws, parseV(v, 'repeating_pc-weapons_pcWeaponStyle', 'str'), 0, parseV(v, 'pcMelee'), 0, parseV(v, 'repeating_pc-weapons_pcWeaponDefense'), parseV(v, 'pcBodyBonus'))}); }); @@ -2451,7 +2518,7 @@

Aide à l'utilisation de '@{aimRoll},[[@{pcAim}]]+[[@{pcBodyBonus}]]+[[?{@{bonusPenaltyRoll}&#124;@{pcLoadPenalty}&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: $[[3]]}} {{BonPen=@{bonusPenaltyRoll}: $[[4]]}}|'; if (weaponsRegExp.test(name)) { - weaponsOptions.push({label: v['repeating_pc-skills_'+id+'_pcSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{pcWeaponSkill-'+z+'}'}); + weaponsOptions.push({label: branch || getTranslationByKey('weapons'+z+'-option'), value: '@{pcWeaponSkill-'+z+'}'}); let a = 'pcWeaponSkill-'+z; let j = {}; j[a] = skill; @@ -2473,11 +2540,12 @@

Aide à l'utilisation de '@{aimRoll},[[@{pcAim}]]+[[@{pcBodyBonus}]]+[[?{@{bonusPenaltyRoll}&#124;@{pcLoadPenalty}&#125;]]}]]}} '+ '{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: $[[3]]}} {{BonPen=@{bonusPenaltyRoll}: $[[4]]}}}'; setAttrs({'pcSkillsSelection': s}); + weaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{pcWeaponSkill-'+z+'}'}); + populateListOptions({ + elemSelector: '.pcWeaponSkill', + optionsArray: weaponsOptions + }); for (z ; z < 11 ; z++) { - populateListOptions({ - elemSelector: '.pcWeaponSkill', - optionsArray: weaponsOptions - }); let a = 'pcWeaponSkill-'+z; let j = {}; j[a] = -3; @@ -2543,7 +2611,7 @@

Aide à l'utilisation de on('change:repeating_pc-ascendancies remove:repeating_pc-ascendancies', function() { getSectionIDs('repeating_pc-ascendancies', function(r) { let s = '?{@{dancerRoll}|'; - let dancersOptions = []; + let dancersOptions = [{label: 'N/A', value: 'Dancer-0'}]; if (r.length > 0) { _.each(r, function(id, i) { getAttrs(['repeating_pc-ascendancies_'+id+'_pcDancer', 'repeating_pc-ascendancies_'+id+'_pcAscendancyAptitude', 'repeating_pc-ascendancies_'+id+'_pcASCImproAptitude'], function(v) { @@ -2552,7 +2620,7 @@

Aide à l'utilisation de let imp = parseV(v, 'repeating_pc-ascendancies_'+id+'_pcASCImproAptitude'); s += dan+', '+'&{template:agone-ascendancy} {{name=@{character_name}}} {{dancer='+dan+'}} {{Ascendancy=@{ascendancyRoll} : [[[[1d10!]]+[['+apt+']]+[[?{@{bonusPenaltyRoll}|0}]]]]}} {{Dice=@{rollRoll}: $[[0]]}} {{Base=@{baseRoll}: $[[1]]}} {{BonPen=@{bonusPenaltyRoll}: $[[2]]}}|'; s += dan+' @{intuitiveRoll}, '+'&{template:agone-ascendancy-intuitive} {{name=@{character_name}}} {{dancer='+dan+'}} {{Ascendancy (intuitive)=@{intuitiveAscendancyRoll} : [[[[1d10!]]+[['+imp+']]+[[?{@{bonusPenaltyRoll}|0}]]]]}} {{Dice=@{rollRoll}: $[[0]]}} {{Base=@{baseRoll}: $[[1]]}} {{BonPen=@{bonusPenaltyRoll}: $[[2]]}}|'; - dancersOptions.push({label: v['repeating_pc-ascendancies_'+id+'_pcDancer'], value: v['repeating_pc-ascendancies_'+id+'_pcDancer']}); + dancersOptions.push({label: v['repeating_pc-ascendancies_'+id+'_pcDancer'], value: 'Dancer-'+parseInt(i+1)}); if (i == r.length - 1) { s = s.slice(0, -1); s += '}'; @@ -2646,8 +2714,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_companion-weapons_'+id+'_companionWeaponSkill', 'repeating_companion-weapons_'+id+'_companionAimOrNot', 'repeating_companion-weapons_'+id+'_companionWeaponAttack', 'repeating_companion-weapons_'+id+'_companionWeaponDefense', 'repeating_companion-weapons_'+id+'_companionWeaponStyle', 'companionMelee', 'companionAim', 'companionWeaponSkill-1', 'companionWeaponSkill-2', 'companionWeaponSkill-3', 'companionWeaponSkill-4', 'companionWeaponSkill-5', 'companionWeaponSkill-6', 'companionWeaponSkill-7', 'companionWeaponSkill-8', 'companionWeaponSkill-9', 'companionWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'companionWeaponSkill-'+s); setAttrs({['repeating_companion-weapons_'+id+'_companionWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponStyle', 'str'), parseV(v, 'repeating_companion-weapons_'+id+'_companionAimOrNot'), parseV(v, 'companionMelee'), parseV(v, 'companionAim'), parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponAttack'), 0)}); setAttrs({['repeating_companion-weapons_'+id+'_companionWeaponDefenseTotal']: weaponScore(ws, parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponStyle', 'str'), 0, parseV(v, 'companionMelee'), 0, parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponDefense'), 0)}); @@ -2658,16 +2725,14 @@

Aide à l'utilisation de }); on('change:repeating_companion-weapons:companionWeaponAttack change:repeating_companion-weapons:companionWeaponSkill change:repeating_companion-weapons:companionAimOrNot', function() { getAttrs(['repeating_companion-weapons_companionWeaponSkill', 'repeating_companion-weapons_companionAimOrNot', 'repeating_companion-weapons_companionWeaponAttack', 'companionWeaponStyle', 'companionMelee', 'companionAim', 'companionWeaponSkill-1', 'companionWeaponSkill-2', 'companionWeaponSkill-3', 'companionWeaponSkill-4', 'companionWeaponSkill-5', 'companionWeaponSkill-6', 'companionWeaponSkill-7', 'companionWeaponSkill-8', 'companionWeaponSkill-9', 'companionWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_companion-weapons_companionWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_companion-weapons_companionWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'companionWeaponSkill-'+s); setAttrs({'repeating_companion-weapons_companionWeaponAttackTotal': weaponScore(ws, parseV(v, 'repeating_companion-weapons_companionWeaponStyle', 'str'), parseV(v, 'repeating_companion-weapons_companionAimOrNot'), parseV(v, 'companionMelee'), parseV(v, 'companionAim'), parseV(v, 'repeating_companion-weapons_companionWeaponAttack'), 0)}); }); }); on('change:repeating_companion-weapons:companionWeaponDefense change:repeating_companion-weapons:companionWeaponSkill', function() { getAttrs(['repeating_companion-weapons_companionWeaponDefense', 'repeating_companion-weapons_companionWeaponSkill', 'repeating_companion-weapons_companionWeaponStyle', 'companionMelee', 'companionWeaponSkill-1', 'companionWeaponSkill-2', 'companionWeaponSkill-3', 'companionWeaponSkill-4', 'companionWeaponSkill-5', 'companionWeaponSkill-6', 'companionWeaponSkill-7', 'companionWeaponSkill-8', 'companionWeaponSkill-9', 'companionWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_companion-weapons_companionWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_companion-weapons_companionWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'companionWeaponSkill-'+s); setAttrs({'repeating_companion-weapons_companionWeaponDefenseTotal': weaponScore(ws, parseV(v, 'repeating_companion-weapons_companionWeaponStyle', 'str'), 0, parseV(v, 'companionMelee'), 0, parseV(v, 'repeating_companion-weapons_companionWeaponDefense'), 0)}); }); @@ -2677,8 +2742,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_companion-weapons_'+id+'_companionWeaponSkill', 'repeating_companion-weapons_'+id+'_companionAimOrNot', 'repeating_companion-weapons_'+id+'_companionWeaponAttack', 'repeating_companion-weapons_'+id+'_companionWeaponDefense', 'repeating_companion-weapons_'+id+'_companionWeaponStyle', 'companionMelee', 'companionWeaponSkill-1', 'companionWeaponSkill-2', 'companionWeaponSkill-3', 'companionWeaponSkill-4', 'companionWeaponSkill-5', 'companionWeaponSkill-6', 'companionWeaponSkill-7', 'companionWeaponSkill-8', 'companionWeaponSkill-9', 'companionWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'companionWeaponSkill-'+s); if (parseV(v, 'repeating_companion-weapons_'+id+'_companionAimOrNot') >= 0) { setAttrs({['repeating_companion-weapons_'+id+'_companionWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponStyle', 'str'), 0, parseV(v, 'companionMelee'), 0, parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponAttack'), 0)}); @@ -2694,8 +2758,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_companion-weapons_'+id+'_companionWeaponSkill', 'repeating_companion-weapons_'+id+'_companionAimOrNot', 'repeating_companion-weapons_'+id+'_companionWeaponAttack', 'companionAim', 'companionWeaponSkill-1', 'companionWeaponSkill-2', 'companionWeaponSkill-3', 'companionWeaponSkill-4', 'companionWeaponSkill-5', 'companionWeaponSkill-6', 'companionWeaponSkill-7', 'companionWeaponSkill-8', 'companionWeaponSkill-9', 'companionWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'companionWeaponSkill-'+s); if (parseV(v, 'repeating_companion-weapons_'+id+'_companionAimOrNot') < 0) setAttrs({['repeating_companion-weapons_'+id+'_companionWeaponAttackTotal']: weaponScore(ws, 'missile', -1, 0, parseV(v, 'companionAim'), parseV(v, 'repeating_companion-weapons_'+id+'_companionWeaponAttack'), 0)}); }); @@ -2777,7 +2840,7 @@

Aide à l'utilisation de '@{aimRoll},[[@{companionAim}]]+[[?{@{bonusPenaltyRoll}&#124;0&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: N/A}} {{BonPen=@{bonusPenaltyRoll}: $[[3]]}}|'; if (weaponsRegExp.test(name)) { - weaponsOptions.push({label: v['repeating_companion-skills_'+id+'_companionSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{companionWeaponSkill-'+z+'}'}); + weaponsOptions.push({label: branch || getTranslationByKey('weapons'+z+'-option'), value: '@{companionWeaponSkill-'+z+'}'}); let a = 'companionWeaponSkill-'+z; let j = {}; j[a] = skill; @@ -2799,11 +2862,12 @@

Aide à l'utilisation de '@{aimRoll},[[@{companionAim}]]+[[?{@{bonusPenaltyRoll}&#124;0&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: N/A}} {{BonPen=@{bonusPenaltyRoll}: $[[3]]}}}'; setAttrs({'companionSkillsSelection': s}); + weaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{companionWeaponSkill-'+z+'}'}); + populateListOptions({ + elemSelector: '.companionWeaponSkill', + optionsArray: weaponsOptions + }); for (z ; z < 11 ; z++) { - populateListOptions({ - elemSelector: '.companionWeaponSkill', - optionsArray: weaponsOptions - }); let a = 'companionWeaponSkill-'+z; let j = {}; j[a] = -3; @@ -2900,8 +2964,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_demon-weapons_'+id+'_demonWeaponSkill', 'repeating_demon-weapons_'+id+'_demonAimOrNot', 'repeating_demon-weapons_'+id+'_demonWeaponAttack', 'repeating_demon-weapons_'+id+'_demonWeaponDefense', 'repeating_demon-weapons_'+id+'_demonWeaponStyle', 'demonMelee', 'demonAim', 'demonWeaponSkill-1', 'demonWeaponSkill-2', 'demonWeaponSkill-3', 'demonWeaponSkill-4', 'demonWeaponSkill-5', 'demonWeaponSkill-6', 'demonWeaponSkill-7', 'demonWeaponSkill-8', 'demonWeaponSkill-9', 'demonWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'demonWeaponSkill-'+s); setAttrs({['repeating_demon-weapons_'+id+'_demonWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponStyle', 'str'), parseV(v, 'repeating_demon-weapons_'+id+'_demonAimOrNot'), parseV(v, 'demonMelee'), parseV(v, 'demonAim'), parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponAttack'), 0)}); setAttrs({['repeating_demon-weapons_'+id+'_demonWeaponDefenseTotal']: weaponScore(ws, parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponStyle', 'str'), 0, parseV(v, 'demonMelee'), 0, parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponDefense'), 0)}); @@ -2912,16 +2975,14 @@

Aide à l'utilisation de }); on('change:repeating_demon-weapons:demonWeaponAttack change:repeating_demon-weapons:demonWeaponSkill change:repeating_demon-weapons:demonAimOrNot', function() { getAttrs(['repeating_demon-weapons_demonWeaponSkill', 'repeating_demon-weapons_demonAimOrNot', 'repeating_demon-weapons_demonWeaponAttack', 'demonWeaponStyle', 'demonMelee', 'demonAim', 'demonWeaponSkill-1', 'demonWeaponSkill-2', 'demonWeaponSkill-3', 'demonWeaponSkill-4', 'demonWeaponSkill-5', 'demonWeaponSkill-6', 'demonWeaponSkill-7', 'demonWeaponSkill-8', 'demonWeaponSkill-9', 'demonWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_demon-weapons_demonWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_demon-weapons_demonWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'demonWeaponSkill-'+s); setAttrs({'repeating_demon-weapons_demonWeaponAttackTotal': weaponScore(ws, parseV(v, 'repeating_demon-weapons_demonWeaponStyle', 'str'), parseV(v, 'repeating_demon-weapons_demonAimOrNot'), parseV(v, 'demonMelee'), parseV(v, 'demonAim'), parseV(v, 'repeating_demon-weapons_demonWeaponAttack'), 0)}); }); }); on('change:repeating_demon-weapons:demonWeaponDefense change:repeating_demon-weapons:demonWeaponSkill', function() { getAttrs(['repeating_demon-weapons_demonWeaponDefense', 'repeating_demon-weapons_demonWeaponSkill', 'repeating_demon-weapons_demonWeaponStyle', 'demonMelee', 'demonWeaponSkill-1', 'demonWeaponSkill-2', 'demonWeaponSkill-3', 'demonWeaponSkill-4', 'demonWeaponSkill-5', 'demonWeaponSkill-6', 'demonWeaponSkill-7', 'demonWeaponSkill-8', 'demonWeaponSkill-9', 'demonWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_demon-weapons_demonWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_demon-weapons_demonWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'demonWeaponSkill-'+s); setAttrs({'repeating_demon-weapons_demonWeaponDefenseTotal': weaponScore(ws, parseV(v, 'repeating_demon-weapons_demonWeaponStyle', 'str'), 0, parseV(v, 'demonMelee'), 0, parseV(v, 'repeating_demon-weapons_demonWeaponDefense'), 0)}); }); @@ -2931,8 +2992,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_demon-weapons_'+id+'_demonWeaponSkill', 'repeating_demon-weapons_'+id+'_demonAimOrNot', 'repeating_demon-weapons_'+id+'_demonWeaponAttack', 'repeating_demon-weapons_'+id+'_demonWeaponDefense', 'repeating_demon-weapons_'+id+'_demonWeaponStyle', 'demonMelee', 'demonWeaponSkill-1', 'demonWeaponSkill-2', 'demonWeaponSkill-3', 'demonWeaponSkill-4', 'demonWeaponSkill-5', 'demonWeaponSkill-6', 'demonWeaponSkill-7', 'demonWeaponSkill-8', 'demonWeaponSkill-9', 'demonWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'demonWeaponSkill-'+s); if (parseV(v, 'repeating_demon-weapons_'+id+'_demonAimOrNot') >= 0) { setAttrs({['repeating_demon-weapons_'+id+'_demonWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponStyle', 'str'), 0, parseV(v, 'demonMelee'), 0, parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponAttack'), 0)}); @@ -2948,8 +3008,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_demon-weapons_'+id+'_demonWeaponSkill', 'repeating_demon-weapons_'+id+'_demonAimOrNot', 'repeating_demon-weapons_'+id+'_demonWeaponAttack', 'demonAim', 'demonWeaponSkill-1', 'demonWeaponSkill-2', 'demonWeaponSkill-3', 'demonWeaponSkill-4', 'demonWeaponSkill-5', 'demonWeaponSkill-6', 'demonWeaponSkill-7', 'demonWeaponSkill-8', 'demonWeaponSkill-9', 'demonWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'demonWeaponSkill-'+s); if (parseV(v, 'repeating_demon-weapons_'+id+'_demonAimOrNot') < 0) setAttrs({['repeating_demon-weapons_'+id+'_demonWeaponAttackTotal']: weaponScore(ws, 'missile', -1, 0, parseV(v, 'demonAim'), parseV(v, 'repeating_demon-weapons_'+id+'_demonWeaponAttack'), 0)}); }); @@ -3032,7 +3091,7 @@

Aide à l'utilisation de '@{aimRoll},[[@{demonAim}]]+[[?{@{bonusPenaltyRoll}&#124;0&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: N/A}} {{BonPen=@{bonusPenaltyRoll}: $[[3]]}}|'; if (weaponsRegExp.test(name)) { - weaponsOptions.push({label: v['repeating_demon-skills_'+id+'_demonSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{demonWeaponSkill-'+z+'}'}); + weaponsOptions.push({label: branch || getTranslationByKey('weapons'+z+'-option'), value: '@{demonWeaponSkill-'+z+'}'}); let a = 'demonWeaponSkill-'+z; let j = {}; j[a] = skill; @@ -3054,11 +3113,12 @@

Aide à l'utilisation de '@{aimRoll},[[@{demonAim}]]+[[?{@{bonusPenaltyRoll}&#124;0&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: N/A}} {{BonPen=@{bonusPenaltyRoll}: $[[3]]}}}'; setAttrs({'demonSkillsSelection': s}); + weaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{demonWeaponSkill-'+z+'}'}); + populateListOptions({ + elemSelector: '.demonWeaponSkill', + optionsArray: weaponsOptions + }); for (z ; z < 11 ; z++) { - populateListOptions({ - elemSelector: '.demonWeaponSkill', - optionsArray: weaponsOptions - }); let a = 'demonWeaponSkill-'+z; let j = {}; j[a] = -3; @@ -3214,8 +3274,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_npc-weapons_'+id+'_npcWeaponInit', 'repeating_npc-weapons_'+id+'_npcAimOrNot', 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'repeating_npc-weapons_'+id+'_npcWeaponAttack', 'repeating_npc-weapons_'+id+'_npcWeaponDefense', 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'npcAgility', 'npcPerception', 'npcBodyBonus', 'npcMelee', 'npcAim', 'npcWeaponSkill-1', 'npcWeaponSkill-2', 'npcWeaponSkill-3', 'npcWeaponSkill-4', 'npcWeaponSkill-5', 'npcWeaponSkill-6', 'npcWeaponSkill-7', 'npcWeaponSkill-8', 'npcWeaponSkill-9', 'npcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'npcWeaponSkill-'+s); setAttrs({['repeating_npc-weapons_'+id+'_npcWeaponInitTotal']: weaponInit(parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponInit'), parseV(v, 'npcAgility'), parseV(v, 'npcPerception'), parseV(v, 'npcBodyBonus'))}); setAttrs({['repeating_npc-weapons_'+id+'_npcWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'str'), parseV(v, 'repeating_npc-weapons_'+id+'_npcAimOrNot'), parseV(v, 'npcMelee'), parseV(v, 'npcAim'), parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponAttack'), parseV(v, 'npcBodyBonus'))}); @@ -3230,8 +3289,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_npc-weapons_'+id+'_npcWeaponSkill', 'repeating_npc-weapons_'+id+'_npcAimOrNot', 'repeating_npc-weapons_'+id+'_npcWeaponAttack', 'repeating_npc-weapons_'+id+'_npcWeaponDefense', 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'npcBodyBonus', 'npcMelee', 'npcWeaponSkill-1', 'npcWeaponSkill-2', 'npcWeaponSkill-3', 'npcWeaponSkill-4', 'npcWeaponSkill-5', 'npcWeaponSkill-6', 'npcWeaponSkill-7', 'npcWeaponSkill-8', 'npcWeaponSkill-9', 'npcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'npcWeaponSkill-'+s); if (parseV(v, 'repeating_npc-weapons_'+id+'_npcAimOrNot') >= 0) { setAttrs({['repeating_npc-weapons_'+id+'_npcWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'str'), 0, parseV(v, 'npcMelee'), 0, parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponAttack'), parseV(v, 'npcBodyBonus'))}); @@ -3247,8 +3305,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_npc-weapons_'+id+'_npcWeaponSkill', 'repeating_npc-weapons_'+id+'_npcAimOrNot', 'repeating_npc-weapons_'+id+'_npcWeaponAttack', 'npcBodyBonus', 'npcAim', 'npcWeaponSkill-1', 'npcWeaponSkill-2', 'npcWeaponSkill-3', 'npcWeaponSkill-4', 'npcWeaponSkill-5', 'npcWeaponSkill-6', 'npcWeaponSkill-7', 'npcWeaponSkill-8', 'npcWeaponSkill-9', 'npcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'npcWeaponSkill-'+s); if (parseV(v, 'repeating_npc-weapons_'+id+'_npcAimOrNot') < 0) setAttrs({['repeating_npc-weapons_'+id+'_npcWeaponAttackTotal']: weaponScore(ws, 'missile', -1, 0, parseV(v, 'npcAim'), parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponAttack'), parseV(v, 'npcBodyBonus'))}); }); @@ -3277,8 +3334,7 @@

Aide à l'utilisation de if (r.length > 0) { _.each(r, function(id) { getAttrs(['repeating_npc-weapons_'+id+'_npcWeaponSkill', 'repeating_npc-weapons_'+id+'_npcAimOrNot', 'repeating_npc-weapons_'+id+'_npcWeaponAttack', 'repeating_npc-weapons_'+id+'_npcWeaponDefense', 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'npcMelee', 'npcAim', 'npcBodyBonus', 'npcWeaponSkill-1', 'npcWeaponSkill-2', 'npcWeaponSkill-3', 'npcWeaponSkill-4', 'npcWeaponSkill-5', 'npcWeaponSkill-6', 'npcWeaponSkill-7', 'npcWeaponSkill-8', 'npcWeaponSkill-9', 'npcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'npcWeaponSkill-'+s); setAttrs({['repeating_npc-weapons_'+id+'_npcWeaponAttackTotal']: weaponScore(ws, parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'str'), parseV(v, 'repeating_npc-weapons_'+id+'_npcAimOrNot'), parseV(v, 'npcMelee'), parseV(v, 'npcAim'), parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponAttack'), parseV(v, 'npcBodyBonus'))}); setAttrs({['repeating_npc-weapons_'+id+'_npcWeaponDefenseTotal']: weaponScore(ws, parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponStyle', 'str'), 0, parseV(v, 'npcMelee'), 0, parseV(v, 'repeating_npc-weapons_'+id+'_npcWeaponDefense'), parseV(v, 'npcBodyBonus'))}); @@ -3289,16 +3345,14 @@

Aide à l'utilisation de }); on('change:repeating_npc-weapons:npcWeaponAttack change:repeating_npc-weapons:npcWeaponSkill change:repeating_npc-weapons:npcAimOrNot', function() { getAttrs(['repeating_npc-weapons_npcWeaponSkill', 'repeating_npc-weapons_npcAimOrNot', 'repeating_npc-weapons_npcWeaponAttack', 'repeating_npc-weapons_npcWeaponStyle', 'npcMelee', 'npcAim', 'npcBodyBonus', 'npcWeaponSkill-1', 'npcWeaponSkill-2', 'npcWeaponSkill-3', 'npcWeaponSkill-4', 'npcWeaponSkill-5', 'npcWeaponSkill-6', 'npcWeaponSkill-7', 'npcWeaponSkill-8', 'npcWeaponSkill-9', 'npcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_npc-weapons_npcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_npc-weapons_npcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'npcWeaponSkill-'+s); setAttrs({'repeating_npc-weapons_npcWeaponAttackTotal': weaponScore(ws, parseV(v, 'repeating_npc-weapons_npcWeaponStyle', 'str'), parseV(v, 'repeating_npc-weapons_npcAimOrNot'), parseV(v, 'npcMelee'), parseV(v, 'npcAim'), parseV(v, 'repeating_npc-weapons_npcWeaponAttack'), parseV(v, 'npcBodyBonus'))}); }); }); on('change:repeating_npc-weapons:npcWeaponDefense change:repeating_npc-weapons:npcWeaponSkill', function() { getAttrs(['repeating_npc-weapons_npcWeaponDefense', 'repeating_npc-weapons_npcWeaponSkill', 'repeating_npc-weapons_npcWeaponStyle', 'npcMelee', 'npcBodyBonus', 'npcWeaponSkill-1', 'npcWeaponSkill-2', 'npcWeaponSkill-3', 'npcWeaponSkill-4', 'npcWeaponSkill-5', 'npcWeaponSkill-6', 'npcWeaponSkill-7', 'npcWeaponSkill-8', 'npcWeaponSkill-9', 'npcWeaponSkill-10'], function(v) { - let s = parseV(v, 'repeating_npc-weapons_npcWeaponSkill', 'str').replace('@', '').replace('{', '').replace('}', '').split('-'); - s = s[1]; + let s = parseV(v, 'repeating_npc-weapons_npcWeaponSkill', 'str').replace(/^@{(.*)}$/, "$1").split('-')[1]; let ws = parseV(v, 'npcWeaponSkill-'+s); setAttrs({'repeating_npc-weapons_npcWeaponDefenseTotal': weaponScore(ws, parseV(v, 'repeating_npc-weapons_npcWeaponStyle', 'str'), 0, parseV(v, 'npcMelee'), 0, parseV(v, 'repeating_npc-weapons_npcWeaponDefense'), parseV(v, 'npcBodyBonus'))}); }); @@ -3367,7 +3421,7 @@

Aide à l'utilisation de '@{aimRoll},[[@{npcAim}]]+[[@{npcBodyBonus}]]+[[?{@{bonusPenaltyRoll}&#124;0&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: $[[3]]}} {{BonPen=@{bonusPenaltyRoll}: $[[4]]}}|'; if (weaponsRegExp.test(name)) { - weaponsOptions.push({label: v['repeating_npc-skills_'+id+'_npcSkillBranch'] || getTranslationByKey('weapons'+z+'-option'), value: '@{npcWeaponSkill-'+z+'}'}); + weaponsOptions.push({label: branch || getTranslationByKey('weapons'+z+'-option'), value: '@{npcWeaponSkill-'+z+'}'}); let a = 'npcWeaponSkill-'+z; let j = {}; j[a] = skill; @@ -3389,11 +3443,12 @@

Aide à l'utilisation de '@{aimRoll},[[@{npcAim}]]+[[@{npcBodyBonus}]]+[[?{@{bonusPenaltyRoll}&#124;0&#125;]]}]]}} '+ '{{Dice=@{rollRoll}: $[[0]]}} {{Sk=@{skillRoll}: $[[1]]}} {{Attr=@{attributeRoll} : $[[2]]}} {{AspBonus=@{aspectBonusRoll}: $[[3]]}} {{BonPen=@{bonusPenaltyRoll}: $[[4]]}}}'; setAttrs({'npcSkillsSelection': s}); + weaponsOptions.push({label: getTranslationByKey('unknown-roll'), value: '@{npcWeaponSkill-'+z+'}'}); + populateListOptions({ + elemSelector: '.npcWeaponSkill', + optionsArray: weaponsOptions + }); for (z ; z < 11 ; z++) { - populateListOptions({ - elemSelector: '.npcWeaponSkill', - optionsArray: weaponsOptions - }); let a = 'npcWeaponSkill-'+z; let j = {}; j[a] = -3; @@ -3421,4 +3476,4 @@

Aide à l'utilisation de } }); }); - \ No newline at end of file + diff --git a/Agone-(french)/sheet.json b/Agone-(french)/sheet.json index 548c1906d201..93ca25459def 100644 --- a/Agone-(french)/sheet.json +++ b/Agone-(french)/sheet.json @@ -4,5 +4,5 @@ "authors": "Le GDF (Logo : Maud Chalmel)", "preview": "agone-sheet.png", "roll20userid": "1686183", - "instructions": "New version v1. Use AgoneDice v0.4 with it." + "instructions": "New version v1.1. Use AgoneDice v0.4 with it." } diff --git a/Agone-(french)/translation.json b/Agone-(french)/translation.json index 8f3cf0a31540..944407cb5ae9 100644 --- a/Agone-(french)/translation.json +++ b/Agone-(french)/translation.json @@ -35,6 +35,7 @@ "ASCendancy-apt-header": "Pot. d'EMPrise", "ascendancy-bonus-title": "Bonus d'Emprise du Danseur", "ASCENDANCY-header": "EMPRISE", + "ascendancy-header": "Emprise", "ASCendancy-header": "EMPrise", "ascendancy-magical-arts-header": "Emprise & Arts Magiques", "ascendancy-magical-arts-item1-line": "Le bouton dans la barre de titre regroupe tous les jets de magie en un.", @@ -51,9 +52,9 @@ "attack-roll": "Attaque", "attack-roll-title": "Jet d'attaque", "attribute-roll-title": "Jet de Caractéristique", - "attributes-fumble-header": "Caractéristiques / Fumble", "attributes-header": "Caractéristiques primaires", "ATTRIBUTES-header": "CARACTÉRISTIQUES PRIMAIRES", + "attributes-summary-header": "Caractéristiques", "attributes-item1-line": "Le bouton dans la barre de titre regroupe tous les jets de caractéristique en un.", "attributes-item2-line": "Pour les doubles cases, celle de gauche correspond à la caractéristique ou l'aspect, celle de droite à l'expérience dépenséee.", "attribute-roll": "Caractéristique ", @@ -211,7 +212,8 @@ "general-use-item8-line": "Tous les jets demanderont le cumul d'éventuels bonus et malus via l'interface du jeu, comme les malus dus aux blessures graves par exemple.", "general-use-item9-line": "Le bouton à droite de Fumble permet de relancer un 1 sur 1d10 et soustraire le résultat.", "generic-roll": "Générique", - "generic-roll-header": "Jet générique (ouvert/fermé)", + "open-roll-header": "Ouvert", + "closed-roll-header": "Fermé", "geography-option": "Géographie (Savoir)", "giant-option": "Géant", "gift-placeholder": "Bienfait", @@ -234,8 +236,6 @@ "I-option": "P", "impaling-option": "Perforant", "impaling-slashing-option": "Perforant/Tranchant", - "initiative-ascendancy-magical-arts-header": "Initiative / Emprise / Arts Magiques", - "initiative-dodge-natural-defense-header": "Initiative / Esquive / Défense Naturelle", "initiative-header": "Initiative", "initiative-roll": "Initiative : ", "initiative-roll-title": "Jet d'Initiative", @@ -255,6 +255,7 @@ "intuitive-roll": "(impro)", "invoking-aptitude-header": "Pot. de conjuration", "invoking-aptitude-title": "Potentiel de conjuration (Noirceur+Démonologie+Bonus d'Âme)", + "invoking-header": "Conjuration", "invoking-DIF-title": "DIFficulté de conjuration du Démon", "invoking-roll": "Conjuration", "invoking-roll-title": "Jet de Conjuration", @@ -397,9 +398,8 @@ "skill-roll-title": "Jet de Compétence", "skill-roll": "Compétence ", "skill-title": "Score de la compétence", - "skills-header": "Compétence", + "skills-header": "Compétences", "SKILLS-header": "COMPÉTENCES", - "skills-invoking-header": "Compétence / Conjuration", "skills-item1-line": "Le bouton dans la barre de titre regroupe tous les jets de compétence en un.", "skills-item2-line": "Pour les doubles cases, celle de gauche correspond à la compétence, celle de droite à l'expérience dépensée.", "skills-item3-line": "Seules 10 compétences d'armes seront prises en compte dynamiquement pour les jets globaux.", @@ -421,6 +421,7 @@ "specialty-placeholder": "spécialité", "specialty-title": "Spécialité de la compétence", "SPELLS-OPUS-MISCELLANEOUS-MAGICS-header": "SORTS, ŒUVRES & MAGIES DIVERSES", + "spells-initiative-header": "Initiative (Sorts)", "spirit-bonus-header": "Bonus d'Esprit", "spirit-bonus-roll": "Bonus d'Esprit", "spirit-bonus-title": "Différence entre Esprit et Esprit Noir",