simulateur
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| simulateur [2026/10/05 16:29] – nanaki | simulateur [2026/10/16 18:08] (Version actuelle) – nanaki | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| Bonjour, | Bonjour, | ||
| - | Voici le simulateur pour la saison 3. | + | Voici le simulateur pour la saison 3. \\ |
| - | N' | + | N' |
| + | Le bouton import et export ne fonctionnent plus très bien, utiliser le bouton lien pour le moment. | ||
| < | < | ||
| Ligne 55: | Ligne 56: | ||
| } | } | ||
| - | .equipStats { margin-left: | + | .equipStats { |
| + | | ||
| + | } | ||
| - | .bonus, | + | .bonus, |
| - | .malus { color:# | + | |
| + | } | ||
| + | |||
| + | .malus { | ||
| + | | ||
| + | } | ||
| + | |||
| + | /* Magie interdite : rouge uniquement dans les bonus/malus */ | ||
| + | .forbiddenMagic { | ||
| + | color:# | ||
| + | font-weight: | ||
| + | } | ||
| button { | button { | ||
| Ligne 255: | Ligne 269: | ||
| e: | e: | ||
| agi: | agi: | ||
| - | pui:[110,55,35], | + | pui:[120,55,30], |
| - | res:[110,55,35], | + | res:[120,55,30], |
| fm: | fm: | ||
| p: | p: | ||
| Ligne 277: | Ligne 291: | ||
| {name:" | {name:" | ||
| {name:" | {name:" | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| - | {name:" | + | { |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| /* OLYMPIENS */ | /* OLYMPIENS */ | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| /* ELFES */ | /* ELFES */ | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| /* NAINS */ | /* NAINS */ | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| /* GEANTS */ | /* GEANTS */ | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| /* HS */ | /* HS */ | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| /* LUTINS : ANNEAUX */ | /* LUTINS : ANNEAUX */ | ||
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | }, |
| - | {name:" | + | { |
| - | {name:" | + | |
| - | {name:" | + | |
| - | {name:" | + | |
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| + | { | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | }, | ||
| - | {name:" | + | { |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | } | ||
| ]; | ]; | ||
| + | |||
| + | /* ========================================================= | ||
| + | MAGIE INTERDITE | ||
| + | | ||
| + | ========================================================= */ | ||
| + | |||
| + | const magieInterdite = new Set([ | ||
| + | "Lance barbelée", | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | "Cape de dueliste", | ||
| + | "Targe renforcée", | ||
| + | " | ||
| + | "Cape dorée", | ||
| + | "Masse d' | ||
| + | " | ||
| + | " | ||
| + | ]); | ||
| /* ========================================================= | /* ========================================================= | ||
| Ligne 423: | Ligne 946: | ||
| { | { | ||
| name:" | name:" | ||
| - | desc:" | + | desc:" |
| }, | }, | ||
| { | { | ||
| Ligne 609: | Ligne 1132: | ||
| option.value=String(equipments.indexOf(item)); | option.value=String(equipments.indexOf(item)); | ||
| - | | + | |
| + | /* Le titre reste uniquement le nom de l' | ||
| + | | ||
| + | | ||
| + | | ||
| select.appendChild(option); | select.appendChild(option); | ||
| Ligne 633: | Ligne 1160: | ||
| cc:" | cc:" | ||
| pv:" | pv:" | ||
| - | rm:" | + | rm:" |
| esquive:" | esquive:" | ||
| demolition:" | demolition:" | ||
| Ligne 659: | Ligne 1186: | ||
| let html=""; | let html=""; | ||
| + | |||
| + | /* Bonus et malus */ | ||
| for(const [stat, | for(const [stat, | ||
| Ligne 678: | Ligne 1207: | ||
| html+=`< | html+=`< | ||
| } | } | ||
| + | } | ||
| + | |||
| + | /* Magie interdite : toujours après les bonus/malus */ | ||
| + | if(magieInterdite.has(item.name)){ | ||
| + | html += `<span class=" | ||
| } | } | ||
| Ligne 770: | Ligne 1304: | ||
| if(!input) continue; | if(!input) continue; | ||
| - | const level=Math.max(0, | + | const level=Math.max( |
| + | | ||
| + | | ||
| + | | ||
| if(!level) continue; | if(!level) continue; | ||
| Ligne 813: | Ligne 1350: | ||
| return cb? | return cb? | ||
| } | } | ||
| + | |||
| + | /* ========================================================= | ||
| + | | ||
| + | ========================================================= */ | ||
| + | |||
| + | |||
| /* ========================================================= | /* ========================================================= | ||
| Ligne 820: | Ligne 1363: | ||
| function calculate(){ | function calculate(){ | ||
| - | const race=races[raceSelect.value]; | + | const raceName |
| + | const race = races[raceName]; | ||
| if(!race) return; | if(!race) return; | ||
| Ligne 827: | Ligne 1371: | ||
| displayBase(); | displayBase(); | ||
| - | const char={...race}; | + | const char = {...race}; |
| /* Améliorations */ | /* Améliorations */ | ||
| Ligne 833: | Ligne 1377: | ||
| for(const stat in costTable){ | for(const stat in costTable){ | ||
| - | const input=document.getElementById(" | + | const input = document.getElementById(" |
| if(input){ | if(input){ | ||
| - | char[stat]= | + | char[stat] = |
| - | (char[stat]||0)+ | + | (char[stat] || 0) + |
| - | (parseInt(input.value, | + | (parseInt(input.value, |
| } | } | ||
| } | } | ||
| /* Equipements */ | /* Equipements */ | ||
| + | |||
| + | let forcePui = false; | ||
| for(const key in slots){ | for(const key in slots){ | ||
| - | const value=slots[key].value; | + | const value = slots[key].value; |
| - | if(value==="" | + | if(value === "" |
| - | const item=equipments[Number(value)]; | + | const item = equipments[Number(value)]; |
| if(!item) continue; | if(!item) continue; | ||
| - | for(const [stat, | + | for(const [stat, |
| - | if(typeof bonus==="number"){ | + | if(stat === "fPui" |
| + | forcePui = true; | ||
| + | continue; | ||
| + | } | ||
| - | | + | if(typeof bonus === " |
| + | | ||
| } | } | ||
| } | } | ||
| + | } | ||
| + | |||
| + | /* F=Pui : certains équipements remplacent la Force par la Puissance */ | ||
| + | |||
| + | if(forcePui){ | ||
| + | char.f = char.pui; | ||
| } | } | ||
| /* Passifs */ | /* Passifs */ | ||
| - | const fulgurance=isChecked(0); | + | const fulgurance = isChecked(0); |
| - | const couverture=isChecked(1); | + | const couverture = isChecked(1); |
| - | const reflexes=isChecked(2); | + | const reflexes = isChecked(2); |
| - | const griffes=isChecked(4); | + | const griffes = isChecked(4); |
| - | /* Griffes : mains nues ou Ceste */ | + | /* ===================================================== |
| + | | ||
| - | | + | On conserve les caractéristiques sans leur ajouter |
| + | le bonus de dégâts de Griffes. | ||
| + | |||
| + | Le bonus de Griffes sera ajouté uniquement dans | ||
| + | la Puissance totale Force. | ||
| + | ===================================================== */ | ||
| + | |||
| + | | ||
| ? null | ? null | ||
| - | : equipments[Number(rightHand.value)]; | + | : equipments[Number(slots.rightHand.value)]; |
| - | const griffesActives= | + | |
| - | griffes&& | + | ou avec des Mains de mana. */ |
| + | |||
| + | | ||
| + | griffes && | ||
| + | | ||
| + | | ||
| + | | ||
| + | mainDroite.name === "Mains de mana" | ||
| + | | ||
| + | |||
| + | /* Force après améliorations et équipements, | ||
| + | avant le bonus de dégâts de Griffes. */ | ||
| + | |||
| + | const forceBase = char.f; | ||
| + | |||
| + | /* Puissance totale Force : | ||
| + | - Force calculée avec les équipements | ||
| + | - règle F=Pui si applicable | ||
| + | - bonus de dégâts de Griffes si actif */ | ||
| + | |||
| + | let puissanceTotaleForce = forceBase; | ||
| if(griffesActives){ | if(griffesActives){ | ||
| - | | + | |
| + | if( | ||
| + | raceName === " | ||
| + | mainDroite && | ||
| + | mainDroite.name === "Mains de mana" | ||
| + | ){ | ||
| + | puissanceTotaleForce = char.pui + 3; | ||
| + | }else{ | ||
| + | puissanceTotaleForce | ||
| + | } | ||
| } | } | ||
| + | |||
| + | /* Puissance totale Puissance : | ||
| + | | ||
| + | |||
| + | const puissanceTotalePuissance = char.pui; | ||
| /* Sorts : bonus de plus grande valeur absolue */ | /* Sorts : bonus de plus grande valeur absolue */ | ||
| - | let bestDex=0; | + | let bestDex = 0; |
| - | let bestProt=0; | + | let bestProt = 0; |
| - | const spellDetails=[]; | + | const spellDetails = []; |
| spells.forEach((spell, | spells.forEach((spell, | ||
| - | const cb=document.getElementById(" | + | const cb = document.getElementById(" |
| - | if(!cb||!cb.checked) return; | + | if(!cb || !cb.checked) return; |
| - | if(Math.abs(spell.dex)> | + | if(Math.abs(spell.dex) > Math.abs(bestDex)){ |
| - | bestDex=spell.dex; | + | bestDex = spell.dex; |
| } | } | ||
| - | if(Math.abs(spell.prot)> | + | if(Math.abs(spell.prot) > Math.abs(bestProt)){ |
| - | bestProt=spell.prot; | + | bestProt = spell.prot; |
| } | } | ||
| Ligne 908: | Ligne 1506: | ||
| }); | }); | ||
| - | document.getElementById(" | + | document.getElementById(" |
| spellDetails.length | spellDetails.length | ||
| - | ? "Sorts actifs : " | + | ? "Sorts actifs : " + spellDetails.join(", |
| - | " | Bonus Dex : " | + | " | Bonus Dex : " + bestDex + |
| - | " | Protection : " | + | " | Protection : " + bestProt |
| : ""; | : ""; | ||
| /* Dés */ | /* Dés */ | ||
| - | const ccDice=char.cc*2; | + | const ccDice = char.cc * 2; |
| - | const ctDice=char.ct*2; | + | const ctDice = char.ct * 2; |
| - | const fmDice=char.fm*2; | + | const fmDice = char.fm * 2; |
| - | const agiDice=char.agi*2; | + | const agiDice = char.agi * 2; |
| - | /* Fiche personnage | + | /* ===================================================== |
| + | FICHE PERSONNAGE | ||
| + | ===================================================== | ||
| - | let result=" | + | let result = "=== PERSONNAGE ===\n\n"; |
| statOrder.forEach(stat=> | statOrder.forEach(stat=> | ||
| - | if(char[stat]!==undefined){ | + | if(char[stat] !== undefined){ |
| - | result+= | + | result += |
| - | (statLabels[stat]||stat)+ | + | (statLabels[stat] || stat) + |
| - | ": " | + | ": " + char[stat] + " |
| } | } | ||
| }); | }); | ||
| Ligne 938: | Ligne 1538: | ||
| if(griffes){ | if(griffes){ | ||
| - | result+=griffesActives | + | result += griffesActives |
| - | ? " | + | ? " |
| - | : " | + | : " |
| } | } | ||
| - | result+=" | + | result += " |
| /* Touchers */ | /* Touchers */ | ||
| - | const finalCC= | + | const finalCC = |
| - | ccDice+bestDex+(fulgurance? | + | ccDice + bestDex + (fulgurance ? 1 : 0); |
| - | const finalCT= | + | const finalCT = |
| - | ctDice+bestDex; | + | ctDice + bestDex; |
| - | const finalFM= | + | const finalFM = |
| - | fmDice+bestDex; | + | fmDice + bestDex; |
| - | result+=" | + | result += " |
| - | result+=" | + | result += " |
| - | result+=" | + | result += "FM : " + finalFM + " |
| /* Tir par distance */ | /* Tir par distance */ | ||
| - | result+=" | + | result += "\n=== TIR ===\n\n"; |
| - | for(let cases=1; | + | for(let cases = 1; cases <= 4; cases++){ |
| - | let ctDistance=finalCT; | + | let ctDistance = finalCT; |
| - | if(cases> | + | if(cases > 2){ |
| - | ctDistance-=(cases-2)*3; | + | ctDistance -= (cases - 2) * 3; |
| } | } | ||
| - | result+=cases+" | + | result += |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| } | } | ||
| /* Esquive CAC */ | /* Esquive CAC */ | ||
| - | const meleeDodge= | + | const meleeDodge = |
| - | Math.max(ccDice, | + | Math.max(ccDice, |
| - | result+=" | + | result += "\n=== ESQUIVE CAC ===\n\n"; |
| - | result+=" | + | result += " |
| /* Esquive tir */ | /* Esquive tir */ | ||
| Ligne 989: | Ligne 1593: | ||
| if(couverture){ | if(couverture){ | ||
| - | evadeStat=Math.floor( | + | evadeStat = Math.floor( |
| - | char.cc*0.85+char.agi*0.15 | + | char.cc * 0.85 + char.agi * 0.15 |
| ); | ); | ||
| }else if(reflexes){ | }else if(reflexes){ | ||
| - | evadeStat=Math.floor( | + | evadeStat = Math.floor( |
| - | char.agi*0.85+char.cc*0.15 | + | char.agi * 0.85 + char.cc * 0.15 |
| ); | ); | ||
| }else{ | }else{ | ||
| - | evadeStat=Math.max( | + | evadeStat = Math.max( |
| - | Math.floor(char.cc*0.75+char.agi*0.25), | + | Math.floor( |
| - | Math.floor(char.agi*0.75+char.cc*0.25) | + | |
| + | | ||
| + | | ||
| + | Math.floor( | ||
| + | | ||
| + | | ||
| + | | ||
| ); | ); | ||
| } | } | ||
| - | const fulguranceDodge= | + | const fulguranceDodge = |
| - | fulgurance? | + | fulgurance |
| + | | ||
| + | | ||
| - | const rangedDodge= | + | const rangedDodge = |
| - | evadeStat*2+bestProt+fulguranceDodge; | + | evadeStat * 2 + |
| + | | ||
| + | | ||
| - | result+=" | + | result += "\n=== ESQUIVE TIR ===\n\n"; |
| - | result+=" | + | result += " |
| /* Esquive FM */ | /* Esquive FM */ | ||
| - | const fmDodge=fmDice+bestProt; | + | const fmDodge = |
| + | | ||
| - | result+=" | + | result += "\n=== ESQUIVE FM ===\n\n"; |
| - | result+=" | + | result += " |
| /* Magie */ | /* Magie */ | ||
| - | result+=" | + | result += "\n=== MAGIE ===\n\n"; |
| - | result+=" | + | result += "Jet FM : " + finalFM + " |
| - | for(let lvl=1; | + | for(let lvl = 1; lvl <= 5; lvl++){ |
| - | const threshold=6+6*lvl; | + | const threshold = 6 + 6 * lvl; |
| - | result+= | + | result += |
| - | "Sort niveau " | + | "Sort niveau " + |
| - | " (seuil " | + | |
| - | (finalFM> | + | " (seuil " + |
| + | | ||
| + | | ||
| + | ( | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| " | " | ||
| } | } | ||
| - | document.getElementById(" | + | |
| + | | ||
| + | ===================================================== */ | ||
| + | |||
| + | result += "\n=== PUISSANCES TOTALES ===\n\n"; | ||
| + | |||
| + | result += | ||
| + | " | ||
| + | puissanceTotaleForce + | ||
| + | " | ||
| + | |||
| + | result += | ||
| + | " | ||
| + | puissanceTotalePuissance + | ||
| + | " | ||
| + | |||
| + | | ||
| } | } | ||
| + | |||
| + | |||
| /* ========================================================= | /* ========================================================= | ||
| Ligne 1050: | Ligne 1690: | ||
| const F=parseInt( | const F=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| const E=parseInt( | const E=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| const Agi=parseInt( | const Agi=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| const PV=parseInt( | const PV=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| const buff=parseInt( | const buff=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| const debuff=parseInt( | const debuff=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| const stab=parseInt( | const stab=parseInt( | ||
| - | document.getElementById(" | + | document.getElementById(" |
| + | | ||
| )||0; | )||0; | ||
| - | const finalF=F+buff+debuff+stab; | + | const finalF= |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| - | const score=finalF+E+Agi; | + | const score= |
| + | | ||
| + | | ||
| + | | ||
| document.getElementById(" | document.getElementById(" | ||
| Ligne 1176: | Ligne 1830: | ||
| if(input){ | if(input){ | ||
| - | data.upgrades[stat]=parseInt(input.value, | + | data.upgrades[stat]= |
| + | | ||
| } | } | ||
| }); | }); | ||
| Ligne 1217: | Ligne 1872: | ||
| const input=document.getElementById(" | const input=document.getElementById(" | ||
| - | if(input&& | + | if( |
| + | | ||
| + | | ||
| + | | ||
| input.value=data.upgrades[stat]; | input.value=data.upgrades[stat]; | ||
| } | } | ||
| Ligne 1231: | Ligne 1889: | ||
| if(data.equipment[key]!==undefined){ | if(data.equipment[key]!==undefined){ | ||
| - | const wanted=String(data.equipment[key]); | + | const wanted= |
| + | | ||
| - | const exists=[...slots[key].options] | + | const exists= |
| - | .some(option=> | + | |
| + | .some( | ||
| + | | ||
| + | | ||
| + | | ||
| if(exists){ | if(exists){ | ||
| Ligne 1270: | Ligne 1933: | ||
| for(const key of [ | for(const key of [ | ||
| - | " | + | " |
| - | " | + | |
| + | | ||
| + | " | ||
| + | | ||
| + | | ||
| ]){ | ]){ | ||
| Ligne 1292: | Ligne 1959: | ||
| const encoded=btoa( | const encoded=btoa( | ||
| - | encodeURIComponent(JSON.stringify(getBuildData())) | + | encodeURIComponent( |
| + | | ||
| + | | ||
| ); | ); | ||
| - | prompt(" | + | prompt( |
| + | | ||
| + | | ||
| + | | ||
| } | } | ||
| function importBuild(){ | function importBuild(){ | ||
| - | const text=prompt(" | + | const text= |
| + | | ||
| + | | ||
| + | | ||
| if(!text) return; | if(!text) return; | ||
| Ligne 1307: | Ligne 1982: | ||
| const data=JSON.parse( | const data=JSON.parse( | ||
| - | decodeURIComponent(atob(text.trim())) | + | decodeURIComponent( |
| + | | ||
| + | | ||
| ); | ); | ||
| Ligne 1322: | Ligne 1999: | ||
| const encoded=btoa( | const encoded=btoa( | ||
| - | encodeURIComponent(JSON.stringify(getBuildData())) | + | encodeURIComponent( |
| + | | ||
| + | | ||
| ); | ); | ||
| Ligne 1328: | Ligne 2007: | ||
| location.origin+ | location.origin+ | ||
| location.pathname+ | location.pathname+ | ||
| - | "? | + | "? |
| + | | ||
| - | if(navigator.clipboard&& | + | if( |
| + | | ||
| + | | ||
| + | | ||
| navigator.clipboard.writeText(url) | navigator.clipboard.writeText(url) | ||
| - | .then(()=> | + | .then( |
| - | .catch(()=> | + | |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | .catch( | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| }else{ | }else{ | ||
| - | prompt(" | + | prompt( |
| + | | ||
| + | | ||
| + | | ||
| } | } | ||
| } | } | ||
| - | |||
| function loadFromURL(){ | function loadFromURL(){ | ||
| - | const params=new URLSearchParams(location.search); | + | const params= |
| + | | ||
| - | const encoded=params.get(" | + | const encoded= |
| + | | ||
| if(!encoded) return; | if(!encoded) return; | ||
| Ligne 1354: | Ligne 2052: | ||
| const data=JSON.parse( | const data=JSON.parse( | ||
| - | decodeURIComponent(atob(encoded)) | + | decodeURIComponent( |
| + | | ||
| + | | ||
| ); | ); | ||
| Ligne 1361: | Ligne 2061: | ||
| }catch(e){ | }catch(e){ | ||
| - | console.error(" | + | console.error( |
| - | | + | |
| + | | ||
| + | ); | ||
| + | alert( | ||
| + | " | ||
| + | ); | ||
| } | } | ||
| } | } | ||
simulateur.1791210575.txt.gz · Dernière modification : 2026/10/05 16:29 de nanaki
