mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 19:52:29 +00:00
8359 lines
359 KiB
HTML
8359 lines
359 KiB
HTML
<div class="mainBg"> <!-- FDP -->
|
||
<input type="hidden" name="attr_version" value="5.04"/>
|
||
<!-- INPUT HIDDEN TYPE DE JETS -->
|
||
<input type="hidden" name="attr_jetnormal" value="1d@{ETATDE}" />
|
||
<input type="hidden" name="attr_jetsup" value="2d@{ETATDE}kh1" />
|
||
<input type="hidden" name="attr_jetsuphero" value="{2d@{ETATDE}kh1, 0d20+10}kh1" />
|
||
<!-- FIN Type de jets -->
|
||
<input type="hidden" name="attr_pnj_default_jets_caches" value="false" />
|
||
<input type="hidden" name="attr_max_attack_label" value=0 />
|
||
<input type="hidden" name="attr_maxrangaction" value=0 />
|
||
<input type="hidden" name="attr_maxrangaction1" value=0 />
|
||
<input type="hidden" name="attr_maxrangaction2" value=0 />
|
||
<input type="hidden" name="attr_maxrangaction3" value=0 />
|
||
<input type="hidden" name="attr_maxrangaction4" value=0 />
|
||
<input type="hidden" name="attr_max_munition_label" value=0 />
|
||
<input type="hidden" name="attr_max_armure_label" value=0 />
|
||
<input type="hidden" name="attr_titrevoie4" value="Voie 4" />
|
||
<input type="hidden" name="attr_titrevoie5" value="Voie 5" />
|
||
<input type="hidden" name="attr_titrecapaciteraciale" value="Capacité raciale" />
|
||
<input type="hidden" name="attr_FOR" value="0" />
|
||
<input type="hidden" name="attr_DEX" value="0" />
|
||
<input type="hidden" name="attr_CON" value="0" />
|
||
<input type="hidden" name="attr_INT" value="0" />
|
||
<input type="hidden" name="attr_SAG" value="0" />
|
||
<input type="hidden" name="attr_CHA" value="0" />
|
||
<div><!-- Identité -->
|
||
<input type="radio" name="attr_option_setting" class="hidden-tab setting-generic" value="generique" checked="checked"><span title="Chroniques Oubliées"></span>
|
||
<input type="radio" name="attr_option_setting" class="hidden-tab setting-arran" value="arran"><span title="Terres d'Arran"></span>
|
||
<div class="tab-content setting-generic">
|
||
<div class = "container" >
|
||
<div style="vertical-align: middle;text-align: center;">
|
||
<img style="width:70%;"
|
||
title="Version 5.04 - 10/05/2024
|
||
Cette feuille de personnage utilise des marques déposées et des droits d’auteurs qui sont la propriété de Black Book Editions comme l’y autorisent les conditions d’utilisation de Black Book Editions. Cette feuille de personnage n’est pas publiée par Black Book Editions et n’a pas reçu son aval ni une quelconque approbation de sa part. Pour de plus amples informations sur Black Book Editions, consultez ww.black-book-editions.fr."
|
||
src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/CO_Logo3.png"/>
|
||
<span style="display:inline-block; width:20px"></span>
|
||
<img width="70px" height="70px" name="attr_character_token" />
|
||
</div>
|
||
<div style="width:250px;">
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft">
|
||
<input class="block-switch-arrow" name="attr_aliasoptflag" type="checkbox" title="Montrer/cacher l'alias" style="left:-6px;">
|
||
<span style="margin-left:-15px;">
|
||
<span style="margin-left:9px;">Nom</span>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span style="display:inline-block; padding-top:4px;">Alias</span>
|
||
</div>
|
||
</td>
|
||
<td colspan="3">
|
||
<input class="nobox" name="attr_character_name" type="text" />
|
||
<input class="optional-block-switch" name="attr_aliasoptflag" type="checkbox" />
|
||
<div class="optional-block">
|
||
<input class="nobox" name="attr_alias" type="text" />
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="textfatleft">Race</td><td colspan="3"><input class="nobox" name="attr_race" type="text" /></td></tr>
|
||
<tr>
|
||
<td class="textfatleft">Profil</td><td colspan="3"><input class="nobox" name="attr_profil" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Niveau</td>
|
||
<td style="text-align:left;"><input class="nobox" name="attr_niveau" type="number" value="1" min="0" /></td>
|
||
<td class="textfatleft">Type</td>
|
||
<td class="boxinput">
|
||
<select class="carac" name="attr_type_personnage" size="1" title="@{type_personnage}">
|
||
<option value="PJ" selected>PJ</option>
|
||
<option value="PNJ">PNJ</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div style="width:130px;">
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft">
|
||
<input class="optional-block-switch" name="attr_aliasoptflag" type="checkbox" />
|
||
<div class="optional-block">
|
||
<span style="display:inline-block; padding-top:2px; padding-bottom:2px;">Connu</span>
|
||
</div>
|
||
Sexe
|
||
</td>
|
||
<td>
|
||
<input class="optional-block-switch" name="attr_aliasoptflag" type="checkbox" />
|
||
<div class="optional-block">
|
||
<select style="width:70px;" name="attr_displayname" title="@{displayname}">
|
||
<option value="@{character_name}" selected>de nom</option>
|
||
<option value="@{alias}">alias</option>
|
||
</select>
|
||
</div>
|
||
<input class="nobox" name="attr_sexe" type="text" />
|
||
</td>
|
||
</tr>
|
||
<tr><td class="textfatleft">Âge</td><td><input class="nobox" name="attr_age" type="text" /></td></tr>
|
||
<tr><td class="textfatleft">Taille</td><td><input class="nobox" name="attr_taille" type="text" /></td></tr>
|
||
<tr><td class="textfatleft">Poids</td><td><input class="nobox" name="attr_poids" type="text" /></td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-content setting-arran"><!-- version pour terres d'Arran -->
|
||
<input type="hidden" name="attr_famille_par_defaut" value=1 />
|
||
<div class = "container" style="width:810px;">
|
||
<div style="width:300px;">
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft">Nom</td>
|
||
<td colspan="3"><input class="nobox" name="attr_character_name" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Profil</td>
|
||
<td colspan="3"><input class="nobox" name="attr_profil" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Peuple</td>
|
||
<td colspan="3"><input class="nobox" name="attr_race" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Culture</td>
|
||
<td colspan="3"><input class="nobox" name="attr_culture" type="text" /></td>
|
||
</tr>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Famille</td>
|
||
<td><select style="width:92px;" name="attr_famille">
|
||
<option value="aventurier" selected>Aventurier</option>
|
||
<option value="combattant" >Combattant</option>
|
||
<option value="mystique" >Mystique</option>
|
||
</select>
|
||
</td>
|
||
<td class="textfatleft">Niveau</td>
|
||
<td style="text-align:left;"><input class="nobox" name="attr_niveau" type="number" value="1" min="0" /></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div style="vertical-align: middle;text-align: center;">
|
||
<!--
|
||
<img style="width:135px;" title="Version 5.04 - 10/05/2024" src="https://www.black-book-editions.fr/contenu/image/Images_divers/JDR_Terres%20dArran/Tampon_TerredArran_v1.jpg"/><br>
|
||
-->
|
||
<img title="Logo supprimé à la demande de BBE" src="https://via.placeholder.com/250x100.png?text=Logo+supprime+a+la+demande+de+BBE" alt="Logo des Terres d'Arran supprimé à la demande de Black Book Edition"/><br>
|
||
</div>
|
||
<div style="width:220px;">
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft">Alias</td>
|
||
<td colspan="3"><input class="nobox" name="attr_alias" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td> Connu </td>
|
||
<td colspan="3">
|
||
<select style="width:110px;" name="attr_displayname" title="@{displayname}">
|
||
<option value="@{character_name}" selected>de nom</option>
|
||
<option value="@{alias}">par son alias</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Genre</td>
|
||
<td><input class="nobox" name="attr_sexe" type="text" /></td>
|
||
<td class="textfatleft">Âge</td>
|
||
<td><input class="nobox" name="attr_age" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Taille</td>
|
||
<td><input class="nobox" name="attr_taille" type="text" /></td>
|
||
<td class="textfatleft">Poids</td>
|
||
<td><input class="nobox" name="attr_poids" type="text" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfatleft">Type</td>
|
||
<td class="boxinput">
|
||
<select class="carac" name="attr_type_personnage" size="1" title="@{type_personnage}">
|
||
<option value="PJ" selected>PJ</option>
|
||
<option value="PNJ">PNJ</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> <!-- FIN Identité -->
|
||
<input type="radio" name="attr_type_personnage" class="hidden-tab fp1" value="PJ" checked="checked"><span title="Personnage"></span>
|
||
<input type="radio" name="attr_type_personnage" class="hidden-tab fp2" value="PNJ"><span title="PNJ"></span>
|
||
<div class="tab-content fp1"><!-- La fiche PJ -->
|
||
<input type="radio" name="attr_tab" class="tab tab1" value="caracteristiques" checked="checked"><span title="Caractéristiques"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab2" value="Capacites"><span title="Capacités"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab3" value="Equipement"><span title="Équipement"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab4" value="Options"><span title="Configuration"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab5" value="Script"><span title="Script"></span>
|
||
<img class="imghr-up" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
|
||
<div class="tab-content tab1">
|
||
<div class="containerl"> <!-- Caracs + combat + PV + défense -->
|
||
<div> <!-- Caracs -->
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfat-car">CARAC.</td>
|
||
<td></td>
|
||
<td class="textbase-car">Valeur</td>
|
||
<td class="textfat-car">Mod.</td>
|
||
<td class="textbase-car">Bonus</td>
|
||
<td class="textfat-car">Test</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_FOR" title="Jet de Force" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Force}} {{subtags=Caractéristique}} {{carac=[[ @{for_sup}[Dé] + [[@{for_test}]][Bonus] ]] }}"> FOR</button>
|
||
</td>
|
||
<td class="boxinputlight-car">
|
||
<select class="selectmin-car" name="attr_for_sup" title="Caractéristique Normale ou Supérieure (Règle optionnelle page 138)">
|
||
<option value="@{jetnormal}" selected>N Normale</option>
|
||
<option value="@{jetsup}">S Supérieure OU Héroïque</option>
|
||
<option value="@{jetsuphero}">H Supérieure ET Héroïque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_force" title="Force" value="10" min="0"/>
|
||
</td>
|
||
<td class="boxinputlight-car"><span class="car" name="attr_FOR"/></td>
|
||
<td class="boxinput-car"><input type="number" class="car" name="attr_for_bonus" value="0" title="Bonus au Test" /></td>
|
||
<td class="boxinputlight-car"><input type="number" class="car" name="attr_for_test" value="@{FOR}+@{for_bonus}" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_DEX" title="Jet de Dextérité" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Dextérité}} {{subtags=Caractéristique}} {{carac=[[ @{dex_sup}[Dé] + [[@{dex_test}]][Bonus] ]]}}"> DEX</button>
|
||
</td>
|
||
<td class="boxinputlight-car">
|
||
<select class="selectmin-car" name="attr_dex_sup" title="Caractéristique Normale ou Supérieure (Règle optionnelle page 138)">
|
||
<option value="@{jetnormal}" selected>N Normale</option>
|
||
<option value="@{jetsup}">S Supérieure OU Héroïque</option>
|
||
<option value="@{jetsuphero}">H Supérieure ET Héroïque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_dexterite" title="Dextérité" value="10" min="0" />
|
||
</td>
|
||
<td class="boxinputlight-car"><span class="car" name="attr_DEX"/></td>
|
||
<td class="boxinput-car"><input type="number" class="car" name="attr_dex_bonus" value="0" title="Bonus au Test" /></td>
|
||
<td class="boxinputlight-car"><input type="number" class="car" name="attr_dex_test" value="@{DEX}+@{dex_bonus}-((@{defarmureon}*@{defarmuremalus})+(@{defbouclieron}*@{defboucliermalus}))" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_CON" title="Jet de Constitution" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Constitution}} {{subtags=Caractéristique}} {{carac=[[ @{con_sup}[Dé] + [[@{con_test}]][Bonus] ]]}}"> CON</button>
|
||
</td>
|
||
<td class="boxinputlight-car">
|
||
<select class="selectmin-car" name="attr_con_sup" title="Caractéristique Normale ou Supérieure (Règle optionnelle page 138)">
|
||
<option value="@{jetnormal}" selected>N Normale</option>
|
||
<option value="@{jetsup}">S Supérieure OU Héroïque</option>
|
||
<option value="@{jetsuphero}">H Supérieure ET Héroïque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_constitution" title="Constitution" value="10" min="0" />
|
||
</td>
|
||
<td class="boxinputlight-car"><span class="car" name="attr_CON"/></td>
|
||
<td class="boxinput-car"><input type="number" class="car" name="attr_con_bonus" value="0" title="Bonus au Test" /></td>
|
||
<td class="boxinputlight-car"><input type="number" class="car" name="attr_con_test" value="@{CON}+@{con_bonus}" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_INT" title="Jet d'Intelligence" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Intelligence}} {{subtags=Caractéristique}} {{carac=[[ @{int_sup}[Dé] + [[@{int_test}]][Bonus] ]]}}"> INT</button>
|
||
</td>
|
||
<td class="boxinputlight-car">
|
||
<select class="selectmin-car" name="attr_int_sup" title="Caractéristique Normale ou Supérieure (Règle optionnelle page 138)">
|
||
<option value="@{jetnormal}" selected>N Normale</option>
|
||
<option value="@{jetsup}">S Supérieure OU Héroïque</option>
|
||
<option value="@{jetsuphero}">H Supérieure ET Héroïque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_intelligence" title="Intelligence" value="10" min="0" />
|
||
</td>
|
||
<td class="boxinputlight-car"><span class="car" name="attr_INT"/></td>
|
||
<td class="boxinput-car"><input type="number" class="car" name="attr_int_bonus" value="0" title="Bonus au Test" /></td>
|
||
<td class="boxinputlight-car">
|
||
<input type="number" class="car" name="attr_int_test" value="@{INT}+@{int_bonus}" disabled />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_SAG" title="Jet de Sagesse" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Sagesse}} {{subtags=Caractéristique}} {{carac=[[ @{sag_sup}[Dé] + [[@{sag_test}]][Bonus] ]]}}"> SAG</button>
|
||
</td>
|
||
<td class="boxinputlight-car">
|
||
<select class="selectmin-car" name="attr_sag_sup" title="Caractéristique Normale ou Supérieure (Règle optionnelle page 138)">
|
||
<option value="@{jetnormal}" selected>N Normale</option>
|
||
<option value="@{jetsup}">S Supérieure OU Héroïque</option>
|
||
<option value="@{jetsuphero}">H Supérieure ET Héroïque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_sagesse" title="Sagesse" value="10" min="0" />
|
||
</td>
|
||
<td class="boxinputlight-car"><span class="car" name="attr_SAG"/></td>
|
||
<td class="boxinput-car"><input type="number" class="car" name="attr_sag_bonus" value="0" title="Bonus au Test" /></td>
|
||
<td class="boxinputlight-car">
|
||
<input type="number" class="car" name="attr_sag_test" value="@{SAG}+@{sag_bonus}" disabled />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_CHA" title="Jet de Charisme" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Charisme}} {{subtags=Caractéristique}} {{carac=[[ @{cha_sup}[Dé] + [[@{cha_test}]][Bonus] ]]}}"> CHA</button>
|
||
</td>
|
||
<td class="boxinputlight-car">
|
||
<select class="selectmin-car" name="attr_cha_sup" title="Caractéristique Normale ou Supérieure (Règle optionnelle page 138)">
|
||
<option value="@{jetnormal}" selected>N Normale</option>
|
||
<option value="@{jetsup}">S Supérieure OU Héroïque</option>
|
||
<option value="@{jetsuphero}">H Supérieure ET Héroïque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_charisme" title="Charisme" value="10" min="0" />
|
||
</td>
|
||
<td class="boxinputlight-car"><span class="car" name="attr_CHA"/></td>
|
||
<td class="boxinput-car"><input type="number" class="car" name="attr_cha_bonus" value="0" title="Bonus au Test" /></td>
|
||
<td class="boxinputlight-car">
|
||
<input type="number" class="car" name="attr_cha_test" value="@{CHA}+@{cha_bonus}" disabled />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfat">ÉTAT</td>
|
||
<td class="boxinputlight" colspan="5">
|
||
<input type="radio" name="attr_ETATDE" value="20" checked/>Normal (d20)
|
||
<input type="radio" name="attr_ETATDE" value="12"/>Affaibli (d12)
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div> <!-- FIN Caracs -->
|
||
<div> <!-- Combat + PV + défense -->
|
||
<table>
|
||
<tr>
|
||
<td> <!-- Combat -->
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfat-atk">COMBAT</td>
|
||
<td class="textbase-atk">Base</td>
|
||
<td class="textbase-atk">Mod.</td>
|
||
<td class="textbase-atk">Bonus</td>
|
||
<td class="textfat-atk">Total</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-atk"><button class="boxtitre-atk" type="roll" name="roll_CAC" title="Jet d'attaque au contact" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Au Contact}} {{subtags=Attaque}} {{attaque=[[1d@{ETATDE}[Dé] + [[@{ATKCAC}]][Bonus] ]]}}"> AU CONTACT</button></td>
|
||
<td class="boxinputlight-atk"><input type="number" name="attr_atkcac_base" value="1" title="@{atkcac_base}" class="atk"/></td>
|
||
<td class="boxinput-atk">
|
||
<input type="radio" name="attr_option_setting_cac" class="hidden-tab setting-generic" value="generique" checked="checked"><span title="Chroniques Oubliées"></span>
|
||
<input type="radio" name="attr_option_setting_cac" class="hidden-tab setting-arran" value="arran"><span title="Terres d'Arran"></span>
|
||
<div class="tab-content setting-generic">
|
||
<select class="carac-atk" name="attr_ATKCAC_CARAC" size="1">
|
||
<option value="@{FOR}" selected>FOR</option>
|
||
<option value="@{DEX}">DEX</option>
|
||
<option value="@{CON}">CON</option>
|
||
<option value="@{INT}">INT</option>
|
||
<option value="@{SAG}">SAG</option>
|
||
<option value="@{CHA}">CHA</option>
|
||
</select>
|
||
</div>
|
||
<div class="tab-content setting-arran">
|
||
<input type="hidden" name="attr_mod_atkcac" value="0" />
|
||
<span name="attr_mod_atkcac"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinput-atk"><input type="number" name="attr_ATKCAC_DIV" title="Bonus divers" value="0" class="atk" /></td>
|
||
<td class="boxinputlight-atk"><input type="number" class="atk" name="attr_ATKCAC" value="@{atkcac_base}+@{ATKCAC_CARAC}+@{mod_atkcac}+@{ATKCAC_DIV}" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-atk"><button class="boxtitre-atk" type="roll" name="roll_TIR" title="Jet d'attaque à distance" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=À Distance}} {{subtags=Attaque}} {{attaque=[[ 1d@{ETATDE}[Dé] + [[@{ATKTIR}]][Bonus] ]]}}"> À DISTANCE</button></td>
|
||
<td class="boxinputlight-atk"><input type="number" class="atk" name="attr_atktir_base" value="1" title="@{atktir_base"/></td>
|
||
<td class="boxinput-atk">
|
||
<input type="radio" name="attr_option_setting_tir" class="hidden-tab setting-generic" value="generique" checked="checked"><span title="Chroniques Oubliées"></span>
|
||
<input type="radio" name="attr_option_setting_tir" class="hidden-tab setting-arran" value="arran"><span title="Terres d'Arran"></span>
|
||
<div class="tab-content setting-generic">
|
||
<select class="carac-atk" name="attr_ATKTIR_CARAC" size="1">
|
||
<option value="@{FOR}">FOR</option>
|
||
<option value="@{DEX}" selected>DEX</option>
|
||
<option value="@{CON}">CON</option>
|
||
<option value="@{INT}">INT</option>
|
||
<option value="@{SAG}">SAG</option>
|
||
<option value="@{CHA}">CHA</option>
|
||
</select>
|
||
</div>
|
||
<div class="tab-content setting-arran">
|
||
<input type="hidden" name="attr_mod_atktir" value="0" />
|
||
<span name="attr_mod_atktir"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinput-atk"><input type="number" class="atk" name="attr_ATKTIR_DIV" title="Bonus divers" value="0" /></td>
|
||
<td class="boxinputlight-atk"><input type="number" class="atk" name="attr_ATKTIR" value="@{atktir_base}+@{ATKTIR_CARAC}+@{mod_atktir}+@{ATKTIR_DIV}" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-atk"><button class="boxtitre-atk" type="roll" name="roll_MAG" title="Jet d'attaque magique" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Magique}} {{subtags=Attaque}} {{attaque=[[ 1d@{ETATDE}[Dé] + [[@{ATKMAG}]][Bonus] ]]}}"> MAGIQUE</button></td>
|
||
<td class="boxinputlight-atk"><input type="number" class="atk" name="attr_atkmag_base" value="1" title="@{atkmag_base}" /></td>
|
||
<td class="boxinput-atk">
|
||
<input type="radio" name="attr_option_setting_mag" class="hidden-tab setting-generic" value="generique" checked="checked"><span title="Chroniques Oubliées"></span>
|
||
<input type="radio" name="attr_option_setting_mag" class="hidden-tab setting-arran" value="arran"><span title="Terres d'Arran"></span>
|
||
<div class="tab-content setting-generic">
|
||
<select class="carac-atk" name="attr_ATKMAG_CARAC" size="1">
|
||
<option value="@{FOR}">FOR</option>
|
||
<option value="@{DEX}">DEX</option>
|
||
<option value="@{CON}">CON</option>
|
||
<option value="@{INT}" selected>INT</option>
|
||
<option value="@{SAG}">SAG</option>
|
||
<option value="@{CHA}">CHA</option>
|
||
</select>
|
||
</div>
|
||
<div class="tab-content setting-arran">
|
||
<input type="hidden" name="attr_mod_atkmag" value="0" />
|
||
<span name="attr_mod_atkmag"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinput-atk"><input type="number" class="atk" name="attr_ATKMAG_DIV" title="Bonus divers" value="0" /></td>
|
||
<td class="boxinputlight-atk"><input type="number" class="atk" name="attr_ATKMAG" value="@{atkmag_base}+@{ATKMAG_CARAC}+@{mod_atkmag}+@{ATKMAG_DIV}" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-init"><button class="boxtitre-init" type="roll" name="roll_INIT" title="Initiative" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Initiative}} {{subtags=Combat}} {{carac=[[@{INIT} &{tracker}]]}}"> INITIATIVE</button></td>
|
||
<td class="boxinputlight-init"><input type="number" class="init" name="attr_INIT_CARAC" value="@{dexterite}" title="Dextérité" disabled /></td>
|
||
<td style="text-align:center;">
|
||
<input type="radio" name="attr_option_setting_init" class="hidden-tab setting-generic" value="generique" checked="checked"><span title="Chroniques Oubliées"></span>
|
||
<input type="radio" name="attr_option_setting_init" class="hidden-tab setting-arran" value="arran"><span title="Terres d'Arran"></span>
|
||
<div class="tab-content setting-generic">
|
||
|
||
</div>
|
||
<div class="tab-content setting-arran">
|
||
<input type="hidden" name="attr_mod_initiative" value="0" />
|
||
<span class="init" name="attr_mod_initiative"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinput-init"><input type="number" class="init" name="attr_INIT_DIV" title="Bonus divers" value="0" /></td>
|
||
<td class="boxinputlight-init"><input type="number" class="init" name="attr_INIT" value="@{INIT_CARAC}+@{mod_initiative}+@{INIT_DIV}" disabled /></td>
|
||
</tr>
|
||
</table>
|
||
</td> <!-- FIN Combat -->
|
||
<td> <!-- PV -->
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfat-pv">VITALITÉ</td>
|
||
<td class="textfat-pv"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-pv"><button class="boxtitre-pv" type="roll" name="roll_DV" title="Jet de Dé de Vie" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Dé de Vie}} {{subtags=Vitalité}} {{DV=[[ 1d@{DV}[Dé] + [[@{CON}]][CON] ]]}}"> DV</button></td>
|
||
<td class="boxinput-pv">
|
||
<select class="carac-pv" name="attr_DV" size="1" title="Dé de Vie">
|
||
<option value="0" selected >-</option>
|
||
<option value="4">d4</option>
|
||
<option value="6">d6</option>
|
||
<option value="8">d8</option>
|
||
<option value="10">d10</option>
|
||
<option value="12">d12</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-pv">PV</td>
|
||
<td class="boxinput-pv"><input type="number" class="pv" name="attr_PV_max" title="Points de Vie maximum" value="0" /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxinput-pv" colspan="2">
|
||
<span class="textbase-pv">PV restants</span>
|
||
<input type="number" class="pv" name="attr_PV" title="Points de Vie restants" value="0" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxinput-pv" colspan="2">
|
||
<span class="textbase-pv">DM temp.</span>
|
||
<input type="number" class="pv" name="attr_DMTEMP" title="Dommages Temporaires" value="0" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_pr" value="1" checked><span></span>
|
||
<div class="optional-block">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-pv"><button class="boxtitre-pv" type="roll" title="Jet de Récupération (1DV+CON+NIVEAU)" name="roll_RECUP" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Récupération}} {{subtags=Vitalité}} {{DV=[[1d@{DV}+[[@{CON}]]+@{niveau}]]}}"> PR</button></td>
|
||
<td class="boxinput-pv">
|
||
<input type="number" class="pv" name="attr_pr" min="0" title="Points de récupération (page 80)" value="5" /> <span class="input">/</span> <input type="number" class="pv" name="attr_pr_max" min="0" value="5" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</td> <!-- FIN PV -->
|
||
</tr>
|
||
<tr>
|
||
<td> <!-- Défense -->
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfat-def">DÉFENSE</td>
|
||
<td class="textbase-def">
|
||
Armure
|
||
<input type="checkbox" class="def" name="attr_defarmureon" value="1" title="Armure portée" />
|
||
</td>
|
||
<td class="textbase-def">
|
||
Bouclier
|
||
<input type="checkbox" class="def" name="attr_defbouclieron" value="1" title="Bouclier équipé" />
|
||
</td>
|
||
<td class="textbase-def">DEX</td>
|
||
<td class="textbase-def">Div.</td>
|
||
<td class="textfat-def">Total</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-def">DEF</td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_defarmure" title="Armure" value="0" min="0" /></td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_defbouclier" title="Bouclier" value="0" min="0" /></td>
|
||
<td class="boxinputlight-def"><input type="number" class="def" name="attr_DEFCAR" value="@{DEX}" title="Modificateur de Dextérité" disabled /></td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_DEFDIV" title="Bonus divers" value="0" /></td>
|
||
<td class="boxinputlight-def"><input type="number" class="def" name="attr_DEF" value="10+(@{defarmure}*@{defarmureon})+(@{defbouclier}*@{defbouclieron})+@{DEFCAR}+@{DEFDIV}-4*@{attaque_risquee_check}" title="Défense" disabled /></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textfat-def" style="text-align: right;">Malus</td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_defarmuremalus" title="Malus aux Tests de DEX quand l'Armure est portée." value="0" min="0"/></td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_defboucliermalus" title="Malus aux Tests de DEX quand le Bouclier est équipé" value="0" min="0"/></td>
|
||
<td class="textbase-def" colspan="2">
|
||
Casque
|
||
<input type="checkbox" class="def" name="attr_casque_on" value="1" title="Casque équipé" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-def" title="Réduction(s) des DM">RD</td>
|
||
<td class="boxinput-def" colspan="2"><textarea class="def ligne" name="attr_RDS" title="Réduction(s) des DM" spellcheck="false" placeholder="Réduction(s) des DM"></textarea></td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_casque_rd" title="RD du casque" value="0" /></td>
|
||
<td class="boxinput-def"><input type="number" class="def" name="attr_casque_malus" title="Malus perception du casque" value="0" /></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
<td>
|
||
<div><!-- option points de chance -->
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_pc" value="1" checked><span></span>
|
||
<div class="optional-block">
|
||
<span class="textfat-chance"> CHANCE</span>
|
||
<input class="options-flag" name="attr_pcoptflag" type="checkbox" title="Montrer/cacher les options" /><span>y</span>
|
||
<div>
|
||
<input type="hidden" name="attr_pc_base" value="3" />
|
||
<input type="hidden" name="attr_pc_max" value="3" />
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-chance">PC</td>
|
||
<td class="boxinput-chance">
|
||
<input type="number" class="chance" style="width:40px;" name="attr_pc" value="3" min="0" /> <span class="input">/</span> <span class="input" style="width:40px;" name="attr_pc_max" > </span>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="options">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textbase-chance">Base</td>
|
||
<td class="textbase-chance"><span class="input" class="chance" name="attr_pc_base"></span>,</td>
|
||
<td class="textbase-chance">Bonus</td>
|
||
<td class="boxinputlight-chance"><input type="number" class="chance" style="width:30px;" name="attr_pc_bonus" value="0" /></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div><!-- fin des points de chance -->
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_mana_totale" value="1"><span></span>
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_pm" value="1" checked><span></span>
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_epuisement" value="1" ><span></span>
|
||
<div class="optional-block">
|
||
<input type="checkbox" class="block-switch" name="attr_magie" value="1" checked><span></span>
|
||
<div class=block-hidden><span class=textbasesmall>Pas de magie</span> </div>
|
||
<div class=block-show>
|
||
<span class="textfat-chance"> MAGIE</span>
|
||
<div>
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_mana_totale" value="1"><span></span>
|
||
<div class="optional-block">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-chance">
|
||
<button class="boxtitre-pv" type="roll" name="roll_DM" title="Jet de Dé de Mana" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Dé de Mana}} {{subtags=Magie}} {{DM=[[ 1d@{de_mana}[Dé] + [[@{carac_mana}]][caractéristique] ]]}}"> DM</button>
|
||
</td>
|
||
<td class="boxinput-chance">
|
||
<select class="carac-chance" name="attr_de_mana" size="1" title="Dé de Mana">
|
||
<option value="0" selected >-</option>
|
||
<option value="4">d4</option>
|
||
<option value="6">d6</option>
|
||
<option value="8">d8</option>
|
||
<option value="10">d10</option>
|
||
<option value="12">d12</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinput-chance">
|
||
<select class="carac-chance" name="attr_carac_mana" size="1" title="Caractéritique associée à la mana">
|
||
<option value="@{INT}" selected>INT</option>
|
||
<option value="@{SAG}">SAG</option>
|
||
<option value="@{CHA}">CHA</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_pm" value="1" checked><span></span>
|
||
<div class="optional-block">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-chance">PM</td>
|
||
<td class="boxinput-chance"><input type="number" class="chance" name="attr_pm" min="0"/> <span class="input">/</span> <input type="number" class="chance" name="attr_pm_max" min="0"/></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<input type="checkbox" class="optional-block-switch" name="attr_option_epuisement" value="1" ><span></span>
|
||
<div class="optional-block">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-chance">Épuisement</td>
|
||
<td class="boxinput-chance">
|
||
<input type="number" class="chance" name="attr_epuisement" value="0" title="Épuisement magique (page 180)" />
|
||
<button type="roll" class="chance" title="@roll{roll_epmag} Jet d'épuisement magique" class="neutre" name="roll_epmag" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Épuisement}} {subtags=Magie} {{carac=[[(1d@{ETATDE}[Dé] + [[@{ATKMAG}]][Bonus])]] > [[@{epuisement}]]}}"/>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div><!-- fin de la magie -->
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div> <!-- FIN Combat + PV + défense + options -->
|
||
</div> <!-- FIN Caracs + combat + PV + défense -->
|
||
<input type="radio" name="attr_attaquetabpj" class="attacktab attacktab1" value="Attaques" checked="checked" /><span title="Attaques"></span>
|
||
<input type="radio" name="attr_attaquetabpj" class="attacktab attacktab2" value="Équipé" /><span title="Équipé"></span>
|
||
<input type="radio" name="attr_attaquetabpj" class="attacktab attacktab3" value="Options" /><span title="Options"></span>
|
||
<img class="imghr-up" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<div class="tab-content attacktab1"> <!-- Armes -->
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfatleft-atk" style="width:153px;">ARMES / ATTAQUES</td>
|
||
<td class="textbase-atk" style="width:130px;">ATTAQUE</td>
|
||
<td class="textbase-atk" style="width:20px;">CRIT.</td>
|
||
<td class="textbase-atk" style="width:190px;">DM</td>
|
||
<td class="textbase-atk" style="width:50px;">PORTÉE</td>
|
||
<td class="textbase-atk">SPÉCIAL</td>
|
||
</tr>
|
||
</table>
|
||
<fieldset class="repeating_armes">
|
||
<div class="attack">
|
||
<input class="options-flag" name="attr_armeoptflag" type="checkbox" title="Montrer/cacher les options" /><span>y</span>
|
||
<div>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<input type='hidden' name='attr_armebonusoption' value='0' />
|
||
<input type='hidden' name='attr_armedmtemp' value='' />
|
||
<input type='hidden' name='attr_armedegats' value='{{degats=[[(@{armedmnbde}d@{armedmde}@{armedmrollmod}+[[@{armedmcar}]]+@{armedmdiv})@{division_attaque_assuree}]]}}' />
|
||
<input type='hidden' name='attr_armepoudre' value='{{poudre=}}' />
|
||
<input type='hidden' name='attr_armereussiteauto' value='{{attaqueautomatique=}}' />
|
||
<input type='hidden' name='attr_armedmrollmod' value='' />
|
||
<input type='hidden' name='attr_armeattrollmod' value='' />
|
||
<input type='hidden' name='attr_armeattnbde' value='1' />
|
||
<input type='hidden' name='attr_armeattde' value='@{ETATDE}' />
|
||
<td>
|
||
<button type="roll" class="atk" name="roll_Arme" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=@{armenom}}} {{subtags=Attaque}} {{attaque=[[ @{armeattnbde}d@{armeattde}@{armeattrollmod}cs>@{armecrit}cf1 + [[@{armeatk}]] + @{armeatkdiv} +@{bonus_attaque_option} +@{armebonusoption}]]}} @{armereussiteauto} @{armepoudre} @{armedegats} {{special=@{armespec}}} {{degats2=@{bonus_dm_option}}} {{dmtemp=@{armedmtemp}}}" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="min-width:150px;">
|
||
<input type="text" class="atk" style="width:16px; text-align:center; font-size:10px;" name="attr_armelabel" value=0>
|
||
<input type="text" class="atk" name="attr_armenom" style="font-weight: bold;width:90%;margin-left:-6px;" placeholder="Arme/attaque"/>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 72px;" name="attr_armeatk" size="1">
|
||
<option value="@{ATKCAC}" selected>Contact</option>
|
||
<option value="@{ATKTIR}">Distance</option>
|
||
<option value="@{ATKMAG}">Magie</option>
|
||
</select>+<input type="number" class="atk" style="width:32px;" name="attr_armeatkdiv" value="0" title="Bonus d'attaque divers" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="text-align: right;">
|
||
<input type="number" class="atk" name="attr_armecrit" style="width:32px;" min="2" max="20" value="20" title="Seuil de Critique (par défaut 20)" />
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<input type="number" class="atk" style="width:30px;" name="attr_armedmnbde" value="1" title="Nombre de dés de dommage" />
|
||
<select class="carac-atk" style="width:45px;" name="attr_armedmde" size="1" title="Dé de dommage">
|
||
<option value="3">d3</option>
|
||
<option value="4" selected>d4</option>
|
||
<option value="6">d6</option>
|
||
<option value="8">d8</option>
|
||
<option value="10">d10</option>
|
||
<option value="12">d12</option>
|
||
</select>+<select class="carac-atk" style="width:50px;" name="attr_armedmcar" size="1" title="Modificateur aux dommages">
|
||
<option value="0">-</option>
|
||
<option value="@{FOR}" selected>FOR</option>
|
||
<option value="@{DEX}">DEX</option>
|
||
<option value="@{CON}">CON</option>
|
||
<option value="@{INT}">INT</option>
|
||
<option value="@{SAG}">SAG</option>
|
||
<option value="@{CHA}">CHA</option>
|
||
</select>+<input type="number" class="atk" style="width:32px;" name="attr_armedmdiv" value="0" title="Bonus de dommage divers" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="min-width:50px;">
|
||
<input type="text" class="atk" name="attr_armeportee" placeholder="Portée" title="Portée" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_armespec" class="atk ligne" placeholder="Notes, capacités spéciales, effet ..." spellcheck="false" title="Notes, capacités spéciales, effet ..."></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="options" style="margin-bottm:6px; margin-top:-2px;">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td style="width:18px; text-align:center;">
|
||
<input type="checkbox" name="attr_armeactionvisible" title="Attaque visible dans les actions" value="1" checked>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 118px;" name="attr_armetypeattaque" title="Type d'attaque">
|
||
<option>Naturel</option>
|
||
<option>Arme 1 main</option>
|
||
<option>Arme 2 mains</option>
|
||
<option>Sortilege</option>
|
||
<option>Arme gauche</option>
|
||
<option>Arme de jet</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft-atk" style="min-width: 189px;">
|
||
<textarea name="attr_armemodificateurs" class="atk ligne" placeholder="Liste de modificateurs" spellcheck="false" title="Modificateurs d'attaque, séparés par des virgules avantage: garde le meilleur de 2 dés avecd12: utilise le d12 en attaque auto: réussite automatique choc: peut faire des attaques non léthales sans malus désavantage: garde le moins bon de 2 dés explodeMax: dés de dégâts explosifs pasDeDmg: l'attaque ne fait pas de dégât poudre: arme à poudre reroll1: relance les 1 des dé de DM tempDmg: fait toujours des attaques non léthales"></textarea>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 87px;" name="attr_armetypedegats" title="Type des dégâts">
|
||
<option>tranchant</option>
|
||
<option>contondant</option>
|
||
<option>percant</option>
|
||
<option>mental</option>
|
||
<option>feu</option>
|
||
<option>acide</option>
|
||
<option value="electrique">électrique</option>
|
||
<option>froid</option>
|
||
<option>sonique</option>
|
||
<option>poison</option>
|
||
<option>maladie</option>
|
||
<option>drain</option>
|
||
<option>magique</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_armeoptions" class="atk ligne" placeholder="Options d'attaque avec argument" spellcheck="false" title="Options d'attaque"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<div>
|
||
<input type="checkbox" class="block-switch hidden-tab" name="attr_armejet"><span></span>
|
||
<div class="block-show" style="margin-top:-2px">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td style="min-width:30px; text-align:center;"></td>
|
||
<td class="boxinputleft-atk">
|
||
Disponibles : <input name="attr_armejetqte" type="number" min="0" value="1">
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
Possédés : <input name="attr_armejetqte_max" type="number" min="0" value="1">
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
Taux de pertes : <input name="attr_armejettaux" type="number" min="0" max="100" value="0">%
|
||
</td>
|
||
<td style="width:100%; text-align:center;"></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<input type="checkbox" class="block-switch hidden-tab" name="attr_armeportable"><span></span>
|
||
<div class="block-show" style="margin-top:-2px">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td style="min-width:30px; text-align:center;"></td>
|
||
<td class="boxinputleft-atk"; style="width:100%">
|
||
<textarea name="attr_armepredicats" class="atk ligne" spellcheck="false" placeholder="Prédicats si porté" title="Prédicats actifs quand l'arme est portée"></textarea>
|
||
</td>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
<div class="tab-content attacktab2"> <!-- Objets équipés -->
|
||
<table class ="tabsep" style="width:400px">
|
||
<tr>
|
||
<td> </td>
|
||
<td class="boxtitre-def" style="text-align:left;"> Torse </td>
|
||
<td>
|
||
<select class="def listeArmuresTorse" name="attr_torseequipe" value="0" title="Armure portée">
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td class="boxtitre-def" style="text-align:left;"> Tête </td>
|
||
<td>
|
||
<select class="def listeArmuresCasque" name="attr_teteequipe" title="Casque porté">
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<input type="checkbox" class="hidden-tab attaque-droite" value="1" name = "attr_montrerattaquedroite" />
|
||
<div class="tab-content attaque-droite">
|
||
<button type="action" class="d20-dice atk" name="act_maindroite"/>
|
||
</div>
|
||
</td>
|
||
<td class="boxtitre-atk" style="text-align:left;">Main principale</td>
|
||
<td>
|
||
<select class="atk listeMainDroite" name="attr_maindroite" value="0" title="Objet porté en main principale">
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<input type="checkbox" class="hidden-tab attaque-gauche" value="1" name = "attr_montrerattaquegauche" />
|
||
<div class="tab-content attaque-gauche">
|
||
<button type="action" class="d20-dice atk" name="act_maingauche"/>
|
||
</div>
|
||
</td>
|
||
<td class="boxtitre" style="text-align:left;">Autre main</td>
|
||
<td>
|
||
<select class="listeMainGauche" name="attr_maingauche" value="0" title="Objet porté dans l'autre main" style="color: #5C2E05;">
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<div>
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft" style="width:175px;">Autres emplacements</td>
|
||
<td class="textbase" style="width:20px;">Max</td>
|
||
<td> </td>
|
||
</tr>
|
||
</table>
|
||
<fieldset class="repeating_emplacements">
|
||
<input type="hidden" name="attr_objets" value="">
|
||
<table class="tabsep" style="width:600px">
|
||
<tr>
|
||
<td class="boxtitre" style="text-align:left;width:161px"><input type="text" name="attr_nom"></td>
|
||
<td><input type="number" min="1" value="1" name="attr_maxslots"></td>
|
||
<td class="textleft"><span name="attr_objets"></span></td>
|
||
</tr>
|
||
</table>
|
||
</fieldset>
|
||
</div>
|
||
</div>
|
||
<div class="tab-content attacktab3"> <!-- Options d'attaque -->
|
||
<input type='hidden' name='attr_bonus_attaque_option' value='0' />
|
||
<input type='hidden' name='attr_bonus_dm_option' value='' />
|
||
<table>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_en_puissance_check" title="Attaque en puissance utilisée" value="1" unchecked>
|
||
</td>
|
||
<td>
|
||
Attaque en puissance
|
||
</td>
|
||
<td>
|
||
<input type='hidden' name='attr_malus_attaque_en_puissance' value='-5' />
|
||
<span name="attr_malus_attaque_en_puissance"></span> en attaque et +
|
||
<input type="number" class="atk" style="width:32px;" name="attr_attaque_en_puissance" value="1" min="1" title="Nombre de dés de dommage ajoutés" />
|
||
|
||
d6 DM
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_assuree_check" title="Attaque assurée" value="1" unchecked>
|
||
<input type='hidden' name='attr_division_attaque_assuree' value='' />
|
||
</td>
|
||
<td>
|
||
Attaque assurée
|
||
</td>
|
||
<td>
|
||
+5 en attaque et DM divisés par 2
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_risquee_check" title="Attaque risquée" value="1" unchecked>
|
||
</td>
|
||
<td>
|
||
Attaque risquée
|
||
</td>
|
||
<td>
|
||
+2 en attaque au contact et -4 en DEF
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_dm_temp_check" title="Assomer" value="1" unchecked>
|
||
</td>
|
||
<td>
|
||
Attaque non léthale
|
||
</td>
|
||
<td>
|
||
-2 en attaque si arme non adaptée
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div><!-- fin des options d'attaque -->
|
||
</div><!-- fin tab-contant tab1-->
|
||
<div class="tab-content tab2"> <!-- Capacités -->
|
||
<div class="containera"><!-- Capa hors voies -->
|
||
<input type="checkbox" class="optional-block-switch" name="attr_talent_magique_present" value="1" /><span></span>
|
||
<div class="optional-block boxinputleft title">
|
||
<span class="textbasesmall">Talent magique</span><br/>
|
||
<textarea name="attr_talent_magique" spellcheck="false" style="height:3em;"></textarea>
|
||
</div>
|
||
<div class="boxinputleft title">
|
||
<span class="textbasesmall" name="attr_titrecapaciteraciale"></span><br/>
|
||
<textarea name="attr_CAPA_RACE" spellcheck="false" style="height:3em;"></textarea>
|
||
</div>
|
||
<div class="boxinputleft title">
|
||
<span class="textbasesmall">Langues Connues</span><br/>
|
||
<textarea name="attr_LANGUES" spellcheck="false" style="height:3em;"></textarea>
|
||
</div>
|
||
<div class="boxinputleft title">
|
||
<span class="textbasesmall">Autres capacités</span><br/>
|
||
<textarea name="attr_DIVERS" spellcheck="false" style="height:3em;"></textarea>
|
||
</div>
|
||
</div><!-- FIN hors voies -->
|
||
<input class="block-switch-b" name="attr_setup_abilities" type="checkbox"/>
|
||
<div class="block-hidden-b"><!-- capacité non éditables -->
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft" colspan="3">
|
||
CAPACITÉS DU PERSONNAGE
|
||
</td>
|
||
<td style="text-align: right; font-weight: lighter;">
|
||
Éditer
|
||
<input type="checkbox" class="setup-abilities" name="attr_setup_abilities" title="Éditer les capacités">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall" style="width: 20px;"> </td>
|
||
<td class="boxtitresmall">Voie 1</td>
|
||
<td class="boxtitresmall">Voie 2</td>
|
||
<td class="boxtitresmall">Voie 3</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">R</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie1showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie1nom" title = "@{voie1nom}" placeholder="Nom de la Voie n°1" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie1expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie1showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie2nom" title="@{voie2nom}" placeholder="Nom de la Voie n°2" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie2expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie1showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie3nom" title="@{voie3nom}" placeholder="Nom de la Voie n°3" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie3expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">1</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v1r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v1r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v1r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v1r1titre} }} {{desc=**@{voie1nom}, rang [[1]]** }} {{text=@{voie1-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie1-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v2r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v2r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v2r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v2r1titre} }} {{desc=**@{voie2nom}, rang [[1]]** }} {{text=@{voie2-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie2-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v3r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v3r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v3r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v3r1titre} }} {{desc=**@{voie3nom}, rang [[1]]** }} {{text=@{voie3-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie3-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">2</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v1r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v1r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v1r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v1r2titre} }} {{desc=**@{voie1nom}, rang [[2]]** }} {{text=@{voie1-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie1-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v2r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v2r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v2r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v2r2titre} }} {{desc=**@{voie2nom}, rang [[2]]** }} {{text=@{voie2-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie2-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v3r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v3r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v3r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v3r2titre} }} {{desc=**@{voie3nom}, rang [[2]]** }} {{text=@{voie3-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie3-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">3</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v1r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v1r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v1r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v1r3titre} }} {{desc=**@{voie1nom}, rang [[3]]** }} {{text=@{voie1-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie1-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v2r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v2r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v2r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v2r3titre} }} {{desc=**@{voie2nom}, rang [[3]]** }} {{text=@{voie2-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie2-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v3r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v3r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v3r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v3r3titre} }} {{desc=**@{voie3nom}, rang [[3]]** }} {{text=@{voie3-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie3-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">4</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v1r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v1r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v1r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v1r4titre} }} {{desc=**@{voie1nom}, rang [[4]]** }} {{text=@{voie1-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie1-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v2r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v2r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v2r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v2r4titre} }} {{desc=**@{voie2nom}, rang [[4]]** }} {{text=@{voie2-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie2-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v3r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v3r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v3r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v3r4titre} }} {{desc=**@{voie3nom}, rang [[4]]** }} {{text=@{voie3-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie3-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">5</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v1r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v1r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v1r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v1r5titre} }} {{desc=**@{voie1nom}, rang [[5]]** }} {{text=@{voie1-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie1-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v2r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v2r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v2r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v2r5titre} }} {{desc=**@{voie2nom}, rang [[5]]** }} {{text=@{voie2-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie2-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v3r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v1r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v3r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v3r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v3r5titre} }} {{desc=**@{voie3nom}, rang [[5]]** }} {{text=@{voie3-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie3-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table>
|
||
<tr>
|
||
<td class="boxtitresmall" style="width: 20px;"> </td>
|
||
<td class="boxtitresmall"><span name="attr_titrevoie4"></span></td>
|
||
<td class="boxtitresmall"><span name="attr_titrevoie5"></span></td>
|
||
<td class="boxtitresmall">Voie de prestige</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">R</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie2showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie4nom" title="@{voie4nom}" placeholder="Nom de la Voie" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie4expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie2showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie5nom" title="@{voie5nom}" placeholder="Nom de la Voie" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie5expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie2showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie6nom" title="@{voie6nom}" placeholder="Nom de la Voie de Prestige" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie6expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">1</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v4r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v4r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v4r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v4r1titre} }} {{desc=**@{voie4nom}, rang [[1]]** }} {{text=@{voie4-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie4-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v5r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v5r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v5r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v5r1titre} }} {{desc=**@{voie5nom}, rang [[1]]** }} {{text=@{voie5-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie5-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v6r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v6r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v6r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v6r1titre} }} {{desc=**@{voie6nom}, rang [[1]]** }} {{text=@{voie6-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie6-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">2</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v4r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v4r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v4r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v4r2titre} }} {{desc=**@{voie4nom}, rang [[2]]** }} {{text=@{voie4-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie4-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v5r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v5r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v5r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v5r2titre} }} {{desc=**@{voie5nom}, rang [[2]]** }} {{text=@{voie5-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie5-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v6r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v6r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v6r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v6r2titre} }} {{desc=**@{voie6nom}, rang [[2]]** }} {{text=@{voie6-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie6-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">3</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v4r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v4r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v4r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v4r3titre} }} {{desc=**@{voie4nom}, rang [[3]]** }} {{text=@{voie4-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie4-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v5r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v5r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v5r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v5r3titre} }} {{desc=**@{voie5nom}, rang [[3]]** }} {{text=@{voie5-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie5-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v6r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v6r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v6r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v6r3titre} }} {{desc=**@{voie6nom}, rang [[3]]** }} {{text=@{voie6-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie6-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">4</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v4r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v4r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v4r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v4r4titre} }} {{desc=**@{voie4nom}, rang [[4]]** }} {{text=@{voie4-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie4-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v5r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v5r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v5r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v5r4titre} }} {{desc=**@{voie5nom}, rang [[4]]** }} {{text=@{voie5-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie5-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v6r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v6r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v6r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v6r4titre} }} {{desc=**@{voie6nom}, rang [[4]]** }} {{text=@{voie6-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie6-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">5</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v4r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v4r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v4r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v4r5titre} }} {{desc=**@{voie4nom}, rang [[5]]** }} {{text=@{voie4-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie4-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v5r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v5r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v5r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v5r5titre} }} {{desc=**@{voie5nom}, rang [[5]]** }} {{text=@{voie5-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie5-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v6r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v4r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v6r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v6r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v6r5titre} }} {{desc=**@{voie6nom}, rang [[5]]** }} {{text=@{voie6-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie6-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<div> <!-- début plus de voies -->
|
||
<input type="checkbox" class="block-switch" name="attr_plus_de_voies"><span></span>
|
||
<div class="block-hidden">Plus de voies</div>
|
||
<div class="block-show">
|
||
<table>
|
||
<tr>
|
||
<td class="boxtitresmall" style="width: 20px;"> </td>
|
||
<td class="boxtitresmall">Voie 7</td>
|
||
<td class="boxtitresmall">Voie 8</td>
|
||
<td class="boxtitresmall">Voie 9</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">R</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie3showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie7nom" title="@{voie7nom}" placeholder="Nom de la Voie n°7" />
|
||
</td>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie7expl" class="boxability"></span>
|
||
</div>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie3showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie8nom" title="@{voie8nom}" placeholder="Nom de la Voie n°8" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie8expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<input class="block-switch-arrow" name="attr_voie3showexpl" type="checkbox"><span>
|
||
<input type="text" class="nomvoie" name="attr_voie9nom" title="@{voie9nom}" placeholder="Nom de la Voie n°9" />
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie9expl" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">1</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v7r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v7r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v7r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v7r1titre} }} {{desc=**@{voie7nom}, rang [[1]]** }} {{text=@{voie7-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie7-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v8r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v8r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v8r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v8r1titre} }} {{desc=**@{voie8nom}, rang [[1]]** }} {{text=@{voie8-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie8-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v9r1" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r1showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v9r1titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v9r1" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v9r1titre} }} {{desc=**@{voie9nom}, rang [[1]]** }} {{text=@{voie9-1} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie9-1" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">2</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v7r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v7r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v7r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v7r2titre} }} {{desc=**@{voie7nom}, rang [[2]]** }} {{text=@{voie7-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie7-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v8r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v8r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v8r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v8r2titre} }} {{desc=**@{voie8nom}, rang [[2]]** }} {{text=@{voie8-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie8-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v9r2" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r2showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v9r2titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v9r2" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v9r2titre} }} {{desc=**@{voie9nom}, rang [[2]]** }} {{text=@{voie9-2} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie9-2" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">3</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v7r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v7r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v7r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v7r3titre} }} {{desc=**@{voie7nom}, rang [[3]]** }} {{text=@{voie7-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie7-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v8r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v8r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v8r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v8r3titre} }} {{desc=**@{voie8nom}, rang [[3]]** }} {{text=@{voie8-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie8-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v9r3" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r3showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v9r3titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v9r3" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v9r3titre} }} {{desc=**@{voie9nom}, rang [[3]]** }} {{text=@{voie9-3} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie9-3" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">4</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v7r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v7r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v7r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v7r4titre} }} {{desc=**@{voie7nom}, rang [[4]]** }} {{text=@{voie7-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie7-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v8r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v8r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v8r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v8r4titre} }} {{desc=**@{voie8nom}, rang [[4]]** }} {{text=@{voie8-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie8-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v9r4" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r4showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v9r4titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v9r4" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v9r4titre} }} {{desc=**@{voie9nom}, rang [[4]]** }} {{text=@{voie9-4} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie9-4" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">5</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v7r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v7r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v7r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v7r5titre} }} {{desc=**@{voie7nom}, rang [[5]]** }} {{text=@{voie7-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie7-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v8r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v8r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v8r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v8r5titre} }} {{desc=**@{voie8nom}, rang [[5]]** }} {{text=@{voie8-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie8-5" class="boxability"></span>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie boxtext">
|
||
<input type="checkbox" name="attr_v9r5" value="1" />
|
||
<input class="block-switch-arrow" name="attr_v7r5showexpl" type="checkbox"><span>
|
||
<input type="text" name="attr_v9r5titre" class="titreability"/>
|
||
</span>
|
||
<span style="float: right;">
|
||
<button type="roll" class="flatbtn iconbtn" name="roll_v9r5" title=""
|
||
value="&{template:co1} {{perso=@{displayname} }} {{subtags=Capacité }} {{name=@{v9r5titre} }} {{desc=**@{voie9nom}, rang [[5]]** }} {{text=@{voie9-5} }}">w</button>
|
||
</span>
|
||
<div class="block-show-arrow">
|
||
<span name="attr_voie9-5" class="boxability" ></span>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div> <!-- fin plus de voies -->
|
||
</div>
|
||
<div class="block-show-b">
|
||
<table>
|
||
<tr>
|
||
<td class="textfatleft" colspan="3">
|
||
CAPACITÉS DU PERSONNAGE
|
||
</td>
|
||
<td style="text-align: right; font-weight: lighter;">
|
||
Éditer
|
||
<input type="checkbox" class="setup-abilities" name="attr_setup_abilities" title="Éditer les capacités">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall" style="width: 20px;"> </td>
|
||
<td class="boxtitresmall">Voie 1</td>
|
||
<td class="boxtitresmall">Voie 2</td>
|
||
<td class="boxtitresmall">Voie 3</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">R</td>
|
||
<td class="boxinputleft">
|
||
<input type="text" class="nomvoie" name="attr_voie1nom" title = "@{voie1nom}" placeholder="Nom de la Voie n°1" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie1expl" title="Explications voie 1"></textarea>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="text" class="nomvoie" name="attr_voie2nom" title="@{voie1nom}" placeholder="Nom de la Voie n°2" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie2expl" title="Explications voie 2"></textarea>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="text" class="nomvoie" name="attr_voie3nom" title="@{voie3nom}" placeholder="Nom de la Voie n°3" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie3expl" title="Explications voie 3"></textarea>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">1</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v1r1" value="1" />
|
||
<input type="text" name="attr_v1r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie1-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v2r1" value="1" />
|
||
<input type="text" name="attr_v2r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie2-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v3r1" value="1" />
|
||
<input type="text" name="attr_v3r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellCheck="false" name="attr_voie3-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">2</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v1r2" value="1" />
|
||
<input type="text" name="attr_v1r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie1-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v2r2" value="1" />
|
||
<input type="text" name="attr_v2r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie2-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v3r2" value="1" />
|
||
<input type="text" name="attr_v3r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie3-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">3</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v1r3" value="1" />
|
||
<input type="text" name="attr_v1r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie1-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v2r3" value="1" />
|
||
<input type="text" name="attr_v2r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie2-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v3r3" value="1" />
|
||
<input type="text" name="attr_v3r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie3-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">4</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v1r4" value="1" />
|
||
<input type="text" name="attr_v1r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie1-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v2r4" value="1" />
|
||
<input type="text" name="attr_v2r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie2-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v3r4" value="1" />
|
||
<input type="text" name="attr_v3r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie3-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">5</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v1r5" value="1" />
|
||
<input type="text" name="attr_v1r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie1-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v2r5" value="1" />
|
||
<input type="text" name="attr_v2r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie2-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v3r5" value="1" />
|
||
<input type="text" name="attr_v3r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie3-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table>
|
||
<tr>
|
||
<td class="boxtitresmall" style="width: 20px;"> </td>
|
||
<td class="boxtitresmall"><span name="attr_titrevoie4"></span></td>
|
||
<td class="boxtitresmall"><span name="attr_titrevoie5"></span></td>
|
||
<td class="boxtitresmall">Voie de prestige</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">R</td>
|
||
<td class="boxinputleft">
|
||
<input type="text" class="nomvoie" name="attr_voie4nom" title="@{voie4nom}" placeholder="Nom de la Voie n°4" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie4expl" title="Explications voie 4"></textarea>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="text" class="nomvoie" name="attr_voie5nom" title="@{voie5nom}" placeholder="Nom de la Voie n°5" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie5expl" title="Explications voie 4"></textarea>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="text" class="nomvoie" name="attr_voie6nom" title="@{voie6nom}" placeholder="Nom de la Voie de Prestige" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie6expl" title="Explications voie de prestige"></textarea>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">1</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v4r1" value="1" />
|
||
<input type="text" name="attr_v4r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie4-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v5r1" value="1" />
|
||
<input type="text" name="attr_v5r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie5-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v6r1" value="1" />
|
||
<input type="text" name="attr_v6r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie6-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">2</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v4r2" value="1" />
|
||
<input type="text" name="attr_v4r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie4-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v5r2" value="1" />
|
||
<input type="text" name="attr_v5r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie5-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v6r2" value="1" />
|
||
<input type="text" name="attr_v6r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie6-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">3</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v4r3" value="1" />
|
||
<input type="text" name="attr_v4r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie4-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v5r3" value="1" />
|
||
<input type="text" name="attr_v5r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie5-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v6r3" value="1" />
|
||
<input type="text" name="attr_v6r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie6-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">4</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v4r4" value="1" />
|
||
<input type="text" name="attr_v4r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie4-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v5r4" value="1" />
|
||
<input type="text" name="attr_v5r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie5-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v6r4" value="1" />
|
||
<input type="text" name="attr_v6r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie6-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">5</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v4r5" value="1" />
|
||
<input type="text" name="attr_v4r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie4-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v5r5" value="1" />
|
||
<input type="text" name="attr_v5r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie5-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v6r5" value="1" />
|
||
<input type="text" name="attr_v6r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie6-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<div>
|
||
<input type="checkbox" class="block-switch" name="attr_plus_de_voies"><span></span>
|
||
<div class="block-hidden">Plus de voies</div>
|
||
<div class="block-show">
|
||
<table>
|
||
<tr>
|
||
<td class="boxtitresmall" style="width: 20px;"> </td>
|
||
<td class="boxtitresmall">Voie 7</td>
|
||
<td class="boxtitresmall">Voie 8</td>
|
||
<td class="boxtitresmall">Voie 9</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">R</td>
|
||
<td class="boxinputleft">
|
||
<input type="text" class="nomvoie" name="attr_voie7nom" title="@{voie7nom}" placeholder="Nom de la Voie n°7" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie7expl" title="Explications voie 7"></textarea>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="text" class="nomvoie" name="attr_voie8nom" title="@{voie8nom}" placeholder="Nom de la Voie n°8" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie8expl" title="Explications voie 8"></textarea>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="text" class="nomvoie" name="attr_voie9nom" title="@{voie9nom}" placeholder="Nom de la Voie n°9" />
|
||
<br>
|
||
<textarea spellcheck="false" name="attr_voie9expl" title="Explications voie 9"></textarea>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">1</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v7r1" value="1" />
|
||
<input type="text" name="attr_v7r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie7-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v8r1" value="1" />
|
||
<input type="text" name="attr_v8r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie8-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v9r1" value="1" />
|
||
<input type="text" name="attr_v9r1titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie9-1" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">2</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v7r2" value="1" />
|
||
<input type="text" name="attr_v7r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie7-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v8r2" value="1" />
|
||
<input type="text" name="attr_v8r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie8-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v9r2" value="1" />
|
||
<input type="text" name="attr_v9r2titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie9-2" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">3</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v7r3" value="1" />
|
||
<input type="text" name="attr_v7r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie7-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v8r3" value="1" />
|
||
<input type="text" name="attr_v8r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie8-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v9r3" value="1" />
|
||
<input type="text" name="attr_v9r3titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie9-3" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">4</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v7r4" value="1" />
|
||
<input type="text" name="attr_v7r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie7-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v8r4" value="1" />
|
||
<input type="text" name="attr_v8r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie8-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v9r4" value="1" />
|
||
<input type="text" name="attr_v9r4titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie9-4" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitresmall">5</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v7r5" value="1" />
|
||
<input type="text" name="attr_v7r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie7-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v8r5" value="1" />
|
||
<input type="text" name="attr_v8r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie8-5" class="boxability"></textarea>
|
||
</div>
|
||
</td>
|
||
<td class="boxvoie">
|
||
<input type="checkbox" name="attr_v9r5" value="1" />
|
||
<input type="text" name="attr_v9r5titre" class="titreability2" />
|
||
<div>
|
||
<textarea spellcheck="false" name="attr_voie9-5" class="boxability" ></textarea>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- les Formations martiales pour les terres d'arran -->
|
||
<input type="checkbox" class="optional-block-switch" name="attr_formations_martiales_check" value="1"><span></span>
|
||
<div class="optional-block">
|
||
<img class="imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<table style="width:600px;">
|
||
<tr>
|
||
<td class="textfatleft" colspan="3">
|
||
FOMATIONS MARTIALES
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armures_legeres" value="1" />
|
||
Armures légères
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_paysan" value="1" checked />
|
||
Armes de paysan
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation1" value="1" />
|
||
<input class="nobox" name="attr_nomformation1" type="text" style="width:160px;"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armures_lourdes" value="1" />
|
||
Armures lourdes
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_guerre" value="1"/>
|
||
Armes de guerre
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation2" value="1" />
|
||
<input class="nobox" name="attr_nomformation2" type="text" style="width:160px;"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_jet" value="1" />
|
||
Armes de jet
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_guerre_lourdes" value="1"/>
|
||
Armes de guerre lourdes
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation3" value="1" />
|
||
<input class="nobox" name="attr_nomformation3" type="text" style="width:160px;"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_trait" value="1" />
|
||
Armes de trait
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_duel" value="1"/>
|
||
Armes de duel
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation4" value="1" />
|
||
<input class="nobox" name="attr_nomformation4" type="text" style="width:160px;"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_de_tir" value="1" />
|
||
Armes de tir
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation_armes_d_hast" value="1"/>
|
||
Armes d'hast
|
||
</td>
|
||
<td class="textleft">
|
||
<input type="checkbox" name="attr_formation5" value="1" />
|
||
<input class="nobox" name="attr_nomformation5" type="text" style="width:160px;"/>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<img class="imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfatleft" style="width:300px;">Compétences</td>
|
||
<td class="textbase" style="width:66px;">Malus</td>
|
||
<td class="textbase" style="width:54px;">Carac.</td>
|
||
<td class="textbase" style="width:60px;">Bonus</td>
|
||
<td class="textbase">Description</td>
|
||
</tr>
|
||
</table>
|
||
<fieldset class="repeating_competences">
|
||
<input type='hidden' name='attr_comp_jet' value='@{for_sup} + @{for_test}' />
|
||
<input type='hidden' name='attr_comp_nomCapa' value='' />
|
||
<input type='hidden' name='attr_comp_bonusCapa' value=0 />
|
||
<input type='hidden' name='attr_comp_bonusCapaText' value='' />
|
||
<input type='hidden' name='attr_comp_caracs' value='' />
|
||
<input type='hidden' name='attr_comp_bonusTotal' value=0 />
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td>
|
||
<button type="roll" class="neutre" name="roll_competence" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=@{comp_nom}}} {{subtags=@{comp_carac}:}} {{carac=[[@{comp_jet} + @{comp_bonusTotal}]]}} {{desc=@{comp_description}}}" />
|
||
</td>
|
||
<td class="boxinputleft" style="min-width:280px;">
|
||
<input type="text" name="attr_comp_nom" style="font-weight: bold;"/>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<select style="width:62px;" name="attr_comp_malus" size="1" title="Malus applicable">
|
||
<option value="" selected>-</option>
|
||
<option value="armure">Armure</option>
|
||
<option value="casque">Casque</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<select class="carac" name="attr_comp_carac" size="1" title="Caractéristique utilisée pour le jet">
|
||
<option selected>FOR</option>
|
||
<option>DEX</option>
|
||
<option>CON</option>
|
||
<option>INT</option>
|
||
<option>SAG</option>
|
||
<option>CHA</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<span name="attr_comp_bonusCapaText"></span>
|
||
+<input type="number" style="width:32px;" name="attr_comp_bonus" value="0" title="Bonus divers" />
|
||
</td>
|
||
<td class="boxinputleft" style="width:100%;">
|
||
<span name="attr_comp_caracs"></span>
|
||
<textarea class="ligne" name="attr_comp_description" title="Description"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</fieldset>
|
||
<span class="textfatleft">Jets de Capacité</span>
|
||
<fieldset class="repeating_jetcapas">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td>
|
||
<button type="roll" class="neutre" name="roll_CAPA" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=@{jetcapanom}}} {{subtags=Capacité}} {{carac=[[@{jetcapanbde}d@{jetcapade}@{jetcapatypjet}+[[@{jetcapacarac}]]+@{jetcapadiv}]]}} {{desc=@{jetcapadesc}}}" />
|
||
</td>
|
||
<td class="boxinputleft" style="min-width:200px;">
|
||
<input type="text" name="attr_jetcapanom" style="font-weight: bold;" placeholder="Nom du Jet de capacité" />
|
||
</td>
|
||
<td class="textbase" style="text-align: right;">
|
||
Jet
|
||
</td>
|
||
<td class="boxinputleft">
|
||
<input type="number" style="width:32px;" name="attr_jetcapanbde" value="1" title="Nombre de dés" />
|
||
<select class="carac" style="width:50px;" name="attr_jetcapade" size="1" title="Dé">
|
||
<option value="4">d4</option>
|
||
<option value="6">d6</option>
|
||
<option value="8">d8</option>
|
||
<option value="10">d10</option>
|
||
<option value="12">d12</option>
|
||
<option value="@{ETATDE}" selected>d20 (ou d12 si Affaibli)</option>
|
||
</select>
|
||
(<select class="carac" style="width:30px;" name="attr_jetcapatypjet" size="1" title="Option du jet : normal, garder le plus bas, garder le plus haut">
|
||
<option value="">N - Normal / additionner tous les dés</option>
|
||
<option value="kh1">S - garder le dé Supérieur / le plus haut score</option>
|
||
<option value="kl1">I - garder le dé Inférieur / le plus bas score</option>
|
||
</select>)
|
||
+<select class="carac" style="width:50px;" name="attr_jetcapacarac" size="1" title="Modificateur du jet">
|
||
<option value="0">-</option>
|
||
<optgroup label="Mod. de base">
|
||
<option value="@{FOR}" selected>FOR</option>
|
||
<option value="@{DEX}">DEX</option>
|
||
<option value="@{CON}">CON</option>
|
||
<option value="@{INT}">INT</option>
|
||
<option value="@{SAG}">SAG</option>
|
||
<option value="@{CHA}">CHA</option>
|
||
</optgroup>
|
||
<optgroup label="Mod. de test">
|
||
<option value="@{for_test}">FOR</option>
|
||
<option value="@{dex_test}">DEX</option>
|
||
<option value="@{con_test}">CON</option>
|
||
<option value="@{int_test}">INT</option>
|
||
<option value="@{sag_text}">SAG</option>
|
||
<option value="@{cha_test}">CHA</option>
|
||
</optgroup>
|
||
</select>+<input type="number" style="width:32px;" name="attr_jetcapadiv" value="0" title="Bonus divers" />
|
||
</td>
|
||
<td class="textbase" style="text-align: right;">
|
||
Desc.
|
||
</td>
|
||
<td class="boxinputleft" style="width:100%;">
|
||
<textarea class="ligne" name="attr_jetcapadesc" placeholder="Description" title="Description"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</fieldset>
|
||
</div> <!-- FIN Voies -->
|
||
<div class="tab-content tab3"> <!-- Equipement -->
|
||
<div class="sheet-2colrow">
|
||
<div class="sheet-col">
|
||
<div class="boxtitre">ÉQUIPEMENT : Consommables</div>
|
||
<div class="boxinputleft">
|
||
<span class="textbase">Bourse :</span>
|
||
<input type="number" class="nombre" name="attr_bourse_pp" min="0" value="0" title="pièces de platine" /> PP,
|
||
<input type="number" class="nombre" name="attr_bourse_po" min="0" value="0" title="pièces d'or" /> PO,
|
||
<input type="number" class="nombre" name="attr_bourse_pa" min="0" value="0" title="pièces d'argent" /> PA,
|
||
<input type="number" class="nombre" name="attr_bourse_pc" min="0" value="0" title="pièces de cuivre" /> PC
|
||
<br>
|
||
<textarea name="attr_BOURSE" class="ligne" placeholder="Gemmes et autres monnaies" spellcheck:"false"></textarea>
|
||
</div>
|
||
<fieldset class="repeating_equipement">
|
||
<input class="options-flag" style="right:-10px;" name="attr_equipoptflag" type="checkbox" title="Montrer/cacher les options" /><span style="right:-10px;">y</span>
|
||
<div class="boxvoie">
|
||
<input type="text" style="width:310px;" name="attr_equip_nom" title="Équipement" />
|
||
<span class="textbase">Qté</span>
|
||
<input type="number" name="attr_equip_qte" value="1" title="Quantité" />
|
||
</div>
|
||
<div class="options boxvoie">
|
||
<span class="textbase">Effet :</span><textarea class="ligne" style="width:346px;" name="attr_equip_effet" title="Commande API" spellcheck="false" ></textarea>
|
||
</div>
|
||
</fieldset>
|
||
<table>
|
||
<tr><td class="boxtitre">ÉQUIPEMENT : Divers</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_equip_div" spellcheck="false" style="height:7em;" title="ÉQUIPEMENT DIVERS"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
<div class="sheet-col">
|
||
<table>
|
||
<tr><td class="boxtitre">Notes</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_notes" style="height:14em;" title="Notes"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<img class="imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfatleft" style="width:264px;">Objets équipables</td>
|
||
<td class="textbase" style="width:68px;">Type</td>
|
||
<td class="textbase" style="width:40px;">Bonus</td>
|
||
<td class="textbase" style="width:40px;">Malus</td>
|
||
<td class="textbase">Effets</td>
|
||
</tr>
|
||
</table>
|
||
<datalist class="listeEmplacements" id="emplacements"></datalist>
|
||
<fieldset class="repeating_armures">
|
||
<div>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td>
|
||
<input type="checkbox" name="attr_equipearmure" title="Équipé ?" value="1">
|
||
</td>
|
||
<td class="boxinputleft-def" style="min-width:240px;">
|
||
<input type="text" class="def" style="width:16px; text-align:center; font-size:10px;" name="attr_labelarmure" value=0 />
|
||
<input type="text" class="def" name="attr_nomarmure" style="font-weight: bold;width:90%;margin-left:-6px;" placeholder="Nom"/>
|
||
</td>
|
||
<td class="boxinputleft-def">
|
||
<!-- <select class="carac-def listeEmplacements" style="width: 70px;" name="attr_typearmure" title="Type d'armure">
|
||
</select>
|
||
-->
|
||
<input list="emplacements" type="text" class="carac-def" style="width:70px;" name="attr_typearmure" title="Type d'armure" value="Torse">
|
||
</td>
|
||
<td class="boxinputleft-def">
|
||
<input name="attr_bonusarmure" style="width:20" type="number" min="0" value="1" />
|
||
</td>
|
||
<td class="boxinputleft-def">
|
||
<input name="attr_malusarmure" style="width:20" type="number" min="0" value="1" />
|
||
</td>
|
||
<td class="boxinputleft-def" style="width:100%;">
|
||
<textarea name="attr_effetarmure" class="def ligne" placeholder="Effets (liste de mots-clé)" spellcheck="false" title="Effets"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</fieldset>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfatleft" style="width:240px;">Munitions</td>
|
||
<td class="textbase" style="width:67px;">Type</td>
|
||
<td class="textbase" style="width:85px;">Nombre</td>
|
||
<td class="textbase" style="width:90px;">Taux pertes</td>
|
||
<td class="textbase">Effet</td>
|
||
</tr>
|
||
</table>
|
||
<fieldset class="repeating_munitions">
|
||
<div class="attack">
|
||
<input class="options-flag" name="attr_munoptflag" type="checkbox" title="Montrer/cacher les options" /><span>y</span>
|
||
<div>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxinputleft-atk" style="min-width:240px;">
|
||
<input type="text" class="atk" style="width:16px; text-align:center; font-size:10px;" name="attr_labelmunition" value=0 />
|
||
<input type="text" class="atk" name="attr_nommunition" style="font-weight: bold;width:90%;margin-left:-6px;" placeholder="Nom"/>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 70px;" name="attr_typemunition" title="Type de munition">
|
||
<option>Flèche</option>
|
||
<option>Carreau</option>
|
||
<option>Balle</option>
|
||
<option>Autre</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<input name="attr_qtemunition" style="width:32" type="number" min="0" value="1" /> /
|
||
<input name="attr_qtemunition_max" style="width:32" type="number" min="0" value="1" />
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<input name="attr_tauxmunition" class="nombre" style="width:25px" type="number" min="0" max="100" value="100">%
|
||
</td>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_effetmunition" class="atk ligne" placeholder="Effets (liste de mots-clé)" spellcheck="false" title="Effets"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="options" style="margin-bottm:6px; margin-top:-2px;">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_optionsmunition" class="atk ligne" placeholder="Effets plus complexes, utilisant la syntaxe des options d'attaque" spellcheck="false" title="Effets plus complexes"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div> <!-- FIN Equipement -->
|
||
<div class="tab-content tab4">
|
||
<div> <!-- Configuration -->
|
||
<ul>
|
||
<li>Setting :
|
||
<select name="attr_option_setting" title="@{option_setting}">
|
||
<option value="generique" selected>Générique</option>
|
||
<option value="arran">Terres d'Arran</option>
|
||
</select>
|
||
</li>
|
||
<li>Points de chance :
|
||
<input type="checkbox" name="attr_option_pc" value="1" title="@{option_pc}" checked />
|
||
</li>
|
||
<li>Points de récupération :
|
||
<input type="checkbox" name="attr_option_pr" value="1" title="@{option_pr}" checked />
|
||
</li>
|
||
<li>Magie :
|
||
<ul>
|
||
<li>Points de mana :
|
||
<input type="checkbox" name="attr_option_pm" value="1" title="@{option_pm}" checked /> (avec dé de mana <input type="checkbox" name="attr_option_mana_totale" value="1" title="@{option_mana_totale}">)
|
||
</li>
|
||
<li> Épuisement magique :
|
||
<input type="checkbox" name="attr_option_epuisement" value="1" title="@{option_pr}" />
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li> Bonus d'attaque de base égal au niveau :
|
||
<input type="checkbox" name="attr_option_ba_niveau" value="1" title="@{option_ba_niveau}" checked />
|
||
</li>
|
||
</ul>
|
||
</div> <!-- FIN Configuration -->
|
||
<div>
|
||
<span class="textbase">Jets</span>
|
||
<select class="carac" style="width: 75px;" name="attr_jets_caches" title="@{jets_caches}" size="1">
|
||
<option value="" selected>Normaux</option>
|
||
<option value="/w gm ">Cachés</option>
|
||
</select>
|
||
</div>
|
||
<img class="imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<div class="sheet-row">
|
||
<input type="checkbox" class="block-switch-arrow" />
|
||
<span class="textbase"> Importer profil & équipement</span>
|
||
<div class="block-show-arrow">
|
||
<div class="sheet-2colrow">
|
||
<div class="sheet-col">
|
||
<textarea
|
||
class="boxinputleft statblock"
|
||
wrap="hard"
|
||
name="attr_json_profile"
|
||
></textarea>
|
||
</div>
|
||
<div class="sheet-col">
|
||
<button
|
||
type="roll"
|
||
name="roll_exportcomob"
|
||
class="flatbtn"
|
||
title="Exporter le profil"
|
||
value="[Export Chroniques Mobiles](https://comob-data.rpgapps.net)">
|
||
<span class="iconbtn">c</span> Export Chroniques Mobiles
|
||
</button>
|
||
<br>
|
||
Composez votre profil avec l'application Export Chroniques Mobiles et insérez le code JSON dans le champ ci-contre
|
||
<br>
|
||
<button
|
||
type="action"
|
||
name="act_importprofile"
|
||
class="flatbtn"
|
||
title="Importer le profil"
|
||
>
|
||
<span class="iconbtn">W</span> Importer
|
||
</button>
|
||
<input type="checkbox" name="attr_reset_gears" value="1">
|
||
<span>Réinitialiser les attaques & équipement</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> <!-- FIN de la partie import -->
|
||
</div> <!-- FIN tab4 de fiche type PJ -->
|
||
<div class="tab-content tab5"> <!-- Données pour le script -->
|
||
<input type="checkbox" class="block-switch hidden-tab" name="attr_show_script" value="1"><span></span>
|
||
<div class="block-hidden"><span class=textbasesmall>Le script COFantasy n'est pas installé. </span> </div>
|
||
<div class="block-show">
|
||
<input type="hidden" name="attr_message_version" value="Pas encore utilisable par le script" />
|
||
<div style="text-align:center;">
|
||
<span name="attr_message_version"></span>
|
||
</div>
|
||
<div class="sheet-2colrow">
|
||
<div class="sheet-col">
|
||
<div class="boxtitre">Actions du tour</div>
|
||
<input type="checkbox" name="attr_montrerattaques" value="1" checked/>
|
||
Montrer toutes les attaques cochées <br/>
|
||
<input type="checkbox" name="attr_montrerarmeenmain" value="1" checked/>
|
||
Montrer l'arme en main et dégainer
|
||
<fieldset class="repeating_actions">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0 />
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div class="boxtitre">Autres listes d'action</div>
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action1optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction1" value="Liste 1" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions1" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions1">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action2optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction2" value="Liste 2" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions2" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions2">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action3optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction3" value="Liste 3" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions3" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions3">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action4optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction4" value="Liste 4" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions4" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions4">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
<div class="sheet-col">
|
||
<table>
|
||
<tr><td class="boxtitre">Prédicats</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_predicats_script" style="height:25em;" spellcheck="false" title="Predicats"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> <!-- FIN des données pour le script -->
|
||
</div> <!-- FIN fiche type PJ -->
|
||
<div class="tab-content fp2"> <!-- fiche type PNJ -->
|
||
<input type="radio" name="attr_tab" class="tab tab1" value="carac. pnj"><span title="Caractéristiques"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab2" value="equip. pnj"><span title="Équipement"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab3" value="statblock"><span title="Statblock"></span>
|
||
<input type="radio" name="attr_tab" class="tab tab4" value="script pnj"><span title="Script"></span>
|
||
<img class="imghr-up" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<div class="tab-content tab1">
|
||
<div class="containerl">
|
||
<div style="width:375px;">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_pnj_FOR" title="Jet de Force" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Force}} {{subtags=Caractéristique}} {{carac=[[ @{for_sup}[Dé] + [[@{pnj_for}]][Bonus] ]] }}">FOR</button>
|
||
<input type="checkbox" class="car" name="attr_pnj_for_sup" title="@{pnj_for_sup}"><span></span>
|
||
</td>
|
||
<td class="boxinput">
|
||
<input type="number" class="car" name="attr_pnj_for" title="Force" value="0" />
|
||
</td>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_pnj_DEX" title="Jet de Dextérité" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Dextérité}} {{subtags=Caractéristique}} {{carac=[[ @{dex_sup}[Dé] + [[@{pnj_dex}]][Bonus] ]] }}">DEX</button>
|
||
<input type="checkbox" class="car" name="attr_pnj_dex_sup" title="@{pnj_dex_sup}"><span></span>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_pnj_dex" title="Dextérité" value="0" />
|
||
</td>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_pnj_CON" title="Jet de Constitution" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Constitution}} {{subtags=Caractéristique}} {{carac=[[ @{con_sup}[Dé] + [[@{pnj_con}]][Bonus] ]] }}">CON</button>
|
||
<input type="checkbox" class="car" name="attr_pnj_con_sup" title="@{pnj_con_sup}"><span></span>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_pnj_con" title="Constitution" value="0" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_pnj_INT" title="Jet d'Intelligence" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Intelligence}} {{subtags=Caractéristique}} {{carac=[[ @{int_sup}[Dé] + [[@{pnj_int}]][Bonus] ]] }}">INT</button>
|
||
<input type="checkbox" class="car" name="attr_pnj_int_sup" title="@{pnj_int_sup}"><span></span>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_pnj_int" title="Intelligence" value="0" />
|
||
</td>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_pnj_SAG" title="Jet de Sagesse" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Sagesse}} {{subtags=Caractéristique}} {{carac=[[ @{sag_sup}[Dé] + [[@{pnj_sag}]][Bonus] ]] }}">SAG</button>
|
||
<input type="checkbox" class="car" name="attr_pnj_sag_sup" title="@{pnj_sag_sup}"><span></span>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_pnj_sag" title="Sagesse" value="0" />
|
||
</td>
|
||
<td class="boxtitre-car">
|
||
<button class="boxtitre-car" type="roll" name="roll_pnj_CHA" title="Jet de Charisme" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Charisme}} {{subtags=Caractéristique}} {{carac=[[ @{cha_sup}[Dé] + [[@{pnj_cha}]][Bonus] ]] }}">CHA</button>
|
||
<input type="checkbox" class="car" name="attr_pnj_cha_sup" title="@{pnj_cha_sup}"><span></span>
|
||
</td>
|
||
<td class="boxinput-car">
|
||
<input type="number" class="car" name="attr_pnj_cha" title="Charisme" value="0" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxtitre-def" style="width:21%">DEF</td>
|
||
<td class="boxinput-def">
|
||
<input type="number" class="def" name="attr_pnj_def" title="Défense" value="10" min="0"/>
|
||
</td>
|
||
<td class="boxtitre-pv" style="width:21%">PV</td>
|
||
<td class="boxinput-pv">
|
||
<input type="number" class="pv" name="attr_PV_max" title="PVs max" value="0" min="0"/>
|
||
</td>
|
||
<td class="boxtitre-init">
|
||
<button class="boxtitre-init" type="roll" name="roll_pnj__INIT" title="Initiative" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=Initiative}} {{subtags=Combat}} {{carac=[[@{pnj_init} &{tracker}]]}}"> INIT</button>
|
||
</td>
|
||
<td class="boxinput-init">
|
||
<input type="number" class="init" name="attr_pnj_init" title="Initiative" value="10" min="1"/>
|
||
</tr>
|
||
</table>
|
||
<div class="containerl">
|
||
<table class="tabsep" style="width:20%;">
|
||
<tr><td class="boxtitre-def">RD</td></tr>
|
||
<tr><td class="boxinputleft-def">
|
||
<textarea class="def ligne" name="attr_RDS" spellcheck="false" title="@{RDS}"></textarea></td></tr>
|
||
</table>
|
||
<table style="width:51px">
|
||
<tr><td>
|
||
<input type="checkbox" name="attr_defarmureon" value="1" title="@{defarmureon}" style="width:9px"><span class="def" style="font-size:9px">Armure</span>
|
||
</td></tr>
|
||
<tr><td>
|
||
<input type="checkbox" name="attr_defbouclieron" value="1" title="@{defbouclieron}" style="width:9px"><span class="def" style="font-size:9px">Bouclier</span>
|
||
</td></tr>
|
||
</table>
|
||
<table class="tabsep" style="width:18%;">
|
||
<tr>
|
||
<td class="boxinput-pv">
|
||
<span class="textbase-pv">PV restants</span>
|
||
<input type="number" class="pv" name="attr_PV" title="Points de Vie restants" value="0" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="boxinput-pv">
|
||
<span class="textbase-pv">DM temp.</span>
|
||
<input type="number" class="pv" name="attr_DMTEMP" title="Dommages Temporaires" value="0" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<span class="textbase">Jets</span>
|
||
<select class="carac" style="width: 75px;" name="attr_pnj_jets_caches" title="@{jets_caches}" size="1">
|
||
<option value="" selected>Normaux</option>
|
||
<option value="/w gm ">Cachés</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div style="width:100%;">
|
||
<table>
|
||
<tr><td class="boxtitre">Capacités</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_capacites_pnj" style="border:none; margin:0px; resize:vertical; height:9em;" spellcheck="false" title="@{capacites_pnj}"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<input type="radio" name="attr_attaquetab" class="attacktab attacktab1" value="Attaques" checked="checked"><span title="Attaques"></span>
|
||
<input type="radio" name="attr_attaquetab" class="attacktab attacktab2" value="Options"><span title="Options"></span>
|
||
<img class="imghr-up" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<div class="tab-content attacktab1"> <!-- Attaques -->
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfatleft-atk" style="width:156px;">Attaques</td>
|
||
<td class="textbase-atk" style="width:50px;">Toucher</td>
|
||
<td class="textbase-atk" style="width:32px;">Crit.</td>
|
||
<td class="textbase-atk" style="width:125px;">DM</td>
|
||
<td class="textbase-atk" style="width:50px;">Portée</td>
|
||
<td class="textbase-atk">Spécial</td>
|
||
</tr>
|
||
</table>
|
||
<fieldset class="repeating_pnjatk">
|
||
<div class="attack">
|
||
<input class="options-flag" name="attr_armeoptflag" type="checkbox" title="Montrer/cacher les options" /><span>y</span>
|
||
<div>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<input type='hidden' name='attr_armebonusoption' value='0' />
|
||
<input type='hidden' name='attr_armedmtemp' value='' />
|
||
<input type='hidden' name='attr_armedegats' value='{{degats=[[(@{armedmnbde}d@{armedmde}@{armedmrollmod}+@{armedm})@{division_attaque_assuree}]]}}' />
|
||
<input type='hidden' name='attr_armepoudre' value='{{poudre=}}' />
|
||
<input type='hidden' name='attr_armereussiteauto' value='{{attaqueautomatique=}}' />
|
||
<input type='hidden' name='attr_armedmrollmod' value='' />
|
||
<input type='hidden' name='attr_armeattrollmod' value='' />
|
||
<input type='hidden' name='attr_armeattnbde' value='1' />
|
||
<input type='hidden' name='attr_armeattde' value='@{ETATDE}' />
|
||
<td>
|
||
<button type="roll" class="atk" name="roll_pnj_Arme" value="@{jets_caches}&{template:co1} {{perso=@{displayname}}} {{name=@{armenom}}} {{subtags=Attaque}} {{attaque=[[ @{armeattnbde}d@{armeattde}@{armeattrollmod}cs>@{armecrit}cf1 + @{armeatk} +@{bonus_attaque_option} +@{armebonusoption}]]}} @{armereussiteauto} @{armedegats} @{armepoudre} {{special=@{armespec}}} {{degats2=@{bonus_dm_option}}} {{dmtemp=@{armedmtemp}}}" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="min-width:138px;">
|
||
<input type="text" class="atk" style="width:13px; text-align:center; font-size:10px;" name="attr_armelabel" value=0>
|
||
<input type="text" class="atk" name="attr_armenom" style="font-weight: bold;width:92%;margin-left:-6px" placeholder="Arme/attaque"/>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
+<input type="number" class="atk" style="width:32px;" name="attr_armeatk" value="0" title="Bonus d'attaque" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="text-align: right;">
|
||
<input type="number" class="atk" name="attr_armecrit" style="width:32px;" min="2" max="20" value="20" title="Seuil de Critique (par défaut 20)" />
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<input type="number" class="atk" style="width:32px;" name="attr_armedmnbde" value="1" title="Nombre de dés de dommage" />
|
||
<select class="carac-atk" style="width:47px;" name="attr_armedmde" size="1" title="Dé de dommage">
|
||
<option value="3">d3</option>
|
||
<option value="4" selected>d4</option>
|
||
<option value="6">d6</option>
|
||
<option value="8">d8</option>
|
||
<option value="10">d10</option>
|
||
<option value="12">d12</option>
|
||
</select>
|
||
+<input type="number" class="atk" style="width:32px;" name="attr_armedm" value="0" title="Bonus de dommage" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="min-width:50px;">
|
||
<input type="text" class="atk" name="attr_armeportee" placeholder="Portée" title="Portée" />
|
||
</td>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea class="atk ligne" name="attr_armespec" spellcheck="false" placeholder="Notes, capacités spéciales, effet ..." title="Notes, capacités spéciales, effet ..."></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="options" style="margin-bottm:6px; margin-top:-2px;">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td style="width:18px; text-align:center;">
|
||
<input type="checkbox" name="attr_armeactionvisible" title="Attaque visible dans les actions" value="1" checked>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 124px;" name="attr_armetypeattaque" title="Type d'attaque">
|
||
<option>Naturel</option>
|
||
<option>Arme 1 main</option>
|
||
<option>Arme 2 mains</option>
|
||
<option>Sortilege</option>
|
||
<option>Arme gauche</option>
|
||
<option>Arme de jet</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft-atk" style="min-width: 193px;">
|
||
<textarea name="attr_armemodificateurs" class="atk ligne" placeholder="Liste de modificateurs" spellcheck="false" title="Modificateurs d'attaque, séparés par des virgules avantage: garde le meilleur de 2 dés avecd12: utilise le d12 en attaque auto: réussite automatique choc: peut faire des attaques non léthales sans malus désavantage: garde le moins bon de 2 dés explodeMax: dé de dégâts explosifs pasDeDmg: l'attaque ne fait pas de dégâts poudre: arme à poudre reroll1: relance les 1 des dés de DM tempDmg: fait toujours des attaques non léthales"></textarea>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 87px;" name="attr_armetypedegats" title="Type des dégâts">
|
||
<option>tranchant</option>
|
||
<option>contondant</option>
|
||
<option>percant</option>
|
||
<option>mental</option>
|
||
<option>feu</option>
|
||
<option>acide</option>
|
||
<option value="electrique">électrique</option>
|
||
<option>froid</option>
|
||
<option>sonique</option>
|
||
<option>poison</option>
|
||
<option>maladie</option>
|
||
<option>drain</option>
|
||
<option>magique</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_armeoptions" class="atk ligne" placeholder="Options d'attaque avec argument" spellcheck="false" title="Options d'attaque"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<div>
|
||
<input type="checkbox" class="block-switch hidden-tab" name="attr_armejet"><span></span>
|
||
<div class="block-show" style="margin-top:-2px">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td style="min-width:30px; text-align:center;"></td>
|
||
<td class="boxinputleft-atk">
|
||
Disponibles : <input name="attr_armejetqte" type="number" min="0" value="1">
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
Possédés : <input name="attr_armejetqte_max" type="number" min="0" value="1">
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
Taux de pertes : <input name="attr_armejettaux" type="number" min="0" max="100" value="0">%
|
||
</td>
|
||
<td style="width:100%; text-align:center;"></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<input type="checkbox" class="block-switch hidden-tab" name="attr_armeportable"><span></span>
|
||
<div class="block-show" style="margin-top:-2px">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td style="min-width:30px; text-align:center;"></td>
|
||
<td class="boxinputleft-atk"; style="width:100%">
|
||
<textarea name="attr_armepredicats" class="atk ligne" spellcheck="false" placeholder="Prédicats si porté" title="Prédicats actifs quand l'arme est portée"></textarea>
|
||
</td>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div> <!-- fin attaques (pnj) -->
|
||
<div class="tab-content attacktab2"> <!-- Options d'attaque -->
|
||
<table>
|
||
<tr>
|
||
<td colspan='2'>
|
||
Attaque de groupe :
|
||
</td>
|
||
<td>
|
||
<input type='hidden' name='attr_message_attaque_de_groupe' value="attaquant par jet" />
|
||
<input type='number' class='atk' style="width:24px;" name="attr_attaque_de_groupe" value="1" min="1" title="Nombre d'attaques de pnj résolues en un jet" /> <span name='attr_message_attaque_de_groupe'></span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_en_puissance_check" title="Attaque en puissance utilisée" value="1" unchecked>
|
||
</td>
|
||
<td>
|
||
Attaque en puissance
|
||
</td>
|
||
<td>
|
||
<span name="attr_malus_attaque_en_puissance"></span> en attaque et +
|
||
<input type="number" class="atk" style="width:24px;" name="attr_attaque_en_puissance" value="1" min="1" title="Nombre de dés de dommage ajoutés" />
|
||
|
||
d6 DM
|
||
</td
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_assuree_check" title="Attaque assurée" value="1" unchecked>
|
||
</td>
|
||
<td>
|
||
Attaque assurée
|
||
</td>
|
||
<td>
|
||
+5 en attaque et DM divisés par 2
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type='hidden' name='attr_defense_si_attaque_risquee' value='6'/>
|
||
<input type="checkbox" name="attr_attaque_risquee_check" title="Attaque risquée" value="1" unchecked />
|
||
</td>
|
||
<td>
|
||
Attaque risquée
|
||
</td>
|
||
<td>
|
||
+2 en attaque au contact mais la DEF passe de <span name='attr_pnj_def'></span> à <span name='attr_defense_si_attaque_risquee'></span> pour 1 tour
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<input type="checkbox" name="attr_attaque_dm_temp_check" title="Assomer" value="1" unchecked>
|
||
</td>
|
||
<td>
|
||
Attaque non léthale
|
||
</td>
|
||
<td>
|
||
-2 en attaque si arme non adaptée
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div><!-- fin des options d'attaque de PNJ -->
|
||
</div><!-- fin des caracs de PNJs -->
|
||
<div class="tab-content tab2"> <!-- Equipement PNJ-->
|
||
<div class="sheet-2colrow">
|
||
<div class="sheet-col">
|
||
<div class="boxtitre">ÉQUIPEMENT : Consommables</div>
|
||
<div class="boxinputleft">
|
||
<span class="textbase">Bourse :</span>
|
||
<input type="number" class="nombre" name="attr_bourse_pp" min="0" value="0" title="pièces de platine" /> PP,
|
||
<input type="number" class="nombre" name="attr_bourse_po" min="0" value="0" title="pièces d'or" /> PO,
|
||
<input type="number" class="nombre" name="attr_bourse_pa" min="0" value="0" title="pièces d'argent" /> PA,
|
||
<input type="number" class="nombre" name="attr_bourse_pc" min="0" value="0" title="pièces de cuivre" /> PC
|
||
<br>
|
||
<textarea class="ligne" name="attr_BOURSE" placeholder="Gemmes et autres monnaies" spellcheck:"false"></textarea>
|
||
</div>
|
||
<fieldset class="repeating_equipement">
|
||
<input class="options-flag" style="right:-10px;" name="attr_equipoptflag" type="checkbox" title="Montrer/cacher les options" /><span style="right:-10px;">y</span>
|
||
<div class="boxvoie">
|
||
<input type="text" style="width:310px;" name="attr_equip_nom" title="Équipement" />
|
||
<span class="textbase">Qté</span>
|
||
<input type="number" name="attr_equip_qte" value="1" title="Quantité" />
|
||
</div>
|
||
<div class="options boxvoie">
|
||
<span class="textbase">Effet :</span><textarea class="ligne" style="width:340px;" name="attr_equip_effet" title="Commande API" spellcheck="false" ></textarea>
|
||
</div>
|
||
</fieldset>
|
||
<table>
|
||
<tr><td class="boxtitre">ÉQUIPEMENT : Divers</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_equip_div" spellcheck="false" style="height:7em;" title="ÉQUIPEMENT DIVERS"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
<div class="sheet-col">
|
||
<table>
|
||
<tr><td class="boxtitre">Notes</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_notes" style="height:14em;" title="Notes"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<img class="imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="textfatleft" style="width:240px;">Munitions</td>
|
||
<td class="textbase" style="width:67px;">Type</td>
|
||
<td class="textbase" style="width:85px;">Nombre</td>
|
||
<td class="textbase" style="width:90px;">Taux pertes</td>
|
||
<td class="textbase">Effet</td>
|
||
</tr>
|
||
</table>
|
||
<fieldset class="repeating_munitions">
|
||
<div class="attack">
|
||
<input class="options-flag" name="attr_munoptflag" type="checkbox" title="Montrer/cacher les options" /><span>y</span>
|
||
<div>
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxinputleft-atk" style="min-width:240px;">
|
||
<input type="text" class="atk" style="width:16px; text-align:center; font-size:10px;" name="attr_labelmunition" value=0 />
|
||
<input type="text" class="atk" name="attr_nommunition" style="font-weight: bold;width:90%;margin-left:-6px;" placeholder="Nom"/>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<select class="carac-atk" style="width: 70px;" name="attr_typemunition" title="Type de munition">
|
||
<option>Flèche</option>
|
||
<option>Carreau</option>
|
||
<option>Balle</option>
|
||
<option>Autre</option>
|
||
</select>
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<input name="attr_qtemunition" style="width:32" type="number" min="0" value="1" /> /
|
||
<input name="attr_qtemunition_max" style="width:32" type="number" min="0" value="1" />
|
||
</td>
|
||
<td class="boxinputleft-atk">
|
||
<input name="attr_tauxmunition" class="nombre" style="width:25px" type="number" min="0" max="100" value="100">%
|
||
</td>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_effetmunition" class="atk ligne" placeholder="Effets (liste de mots-clé)" spellcheck="false" title="Effets"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="options" style="margin-bottm:6px; margin-top:-2px;">
|
||
<table class="tabsep">
|
||
<tr>
|
||
<td class="boxinputleft-atk" style="width:100%;">
|
||
<textarea name="attr_optionsmunition" class="atk ligne" placeholder="Effets plus complexes, utilisant la syntaxe des options d'attaque" spellcheck="false" title="Effets plus complexes"></textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div> <!-- FIN Equipement PNJ-->
|
||
<div class="tab-content tab3">
|
||
<table>
|
||
<tr><td class="boxtitre">Importer un block de statistiques</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_statblock" style="height:20em;" spellcheck="false" placeholder="Coller ici un statblock copié depuis le PDF" ></textarea></td></tr>
|
||
</table>
|
||
</div><!-- fin import statblocks -->
|
||
<div class="tab-content tab4"> <!-- Données pour le script -->
|
||
<input type="checkbox" class="block-switch hidden-tab" name="attr_show_script" value="1"><span></span>
|
||
<div class=block-hidden><span class=textbasesmall>Le script COFantasy n'est pas installé. </span> </div>
|
||
<div class="block-show">
|
||
<input type="hidden" name="attr_message_version" value="Pas encore utilisable par le script" />
|
||
<div style="text-align:center;">
|
||
<span name="attr_message_version"></span>
|
||
</div>
|
||
<div class="sheet-2colrow">
|
||
<div class="sheet-col">
|
||
<div class="boxtitre">Actions du tour</div>
|
||
<input type="checkbox" name="attr_montrerattaques" value="1" checked/>
|
||
Montrer toutes les attaques cochées <br/>
|
||
<input type="checkbox" name="attr_montrerarmeenmain" value="1" checked/>
|
||
Montrer l'arme en main et dégainer
|
||
<fieldset class="repeating_actions">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0 />
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div class="boxtitre">Autres listes d'action</div>
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action1optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction1" value="Liste 1" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions1" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions1">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action2optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction2" value="Liste 2" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions2" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions2">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action3optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction3" value="Liste 3" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions3" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions3">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<br />
|
||
<div style="position:relative">
|
||
<input class="options-flag" name="attr_action4optflag" type="checkbox" title="Montrer/cacher les options d'attaque" /><span>y</span>
|
||
<input type="text" name="attr_nomlisteaction4" value="Liste 4" style="font-weight:bold;text-align:center;"/>
|
||
<div class="options">
|
||
Options : <input type="text" name="attr_optionslisteactions4" style="width:83%" placeholder="Options des attaques" spellcheck="false">
|
||
</div>
|
||
</div>
|
||
<fieldset class="repeating_actions4">
|
||
<div>
|
||
<input class="options-flag" name="attr_actionoptflag" type="checkbox" title="Montrer/cacher le code de l'action" checked /><span>y</span>
|
||
<div>
|
||
<hr class="actionhr">
|
||
<input type="checkbox" name="attr_actionmontree" value="1" checked/>
|
||
<input type="text" style="width:20px; text-align:right; padding-left:-2px;" name="attr_actionrang" value=0>
|
||
<input type="text" name="attr_actiontitre" style="width:280px; font-weight: bold;" placeholder="Nom"/>
|
||
<select style="width:60px;" name="attr_actiontype" size="1" title="Type d'action">
|
||
<option value="action" selected>Action</option>
|
||
<option value="liste">Liste d'actions</option>
|
||
</select>
|
||
</div>
|
||
<div class="options">
|
||
<span style="font-weight: normal">Conditions :</span><input type="text" style="width:81%" name="attr_actionconditions" spellcheck="false" title="Conditions pour que l'action soit montrée" placeholder="toujours montré" />
|
||
<textarea class="ligne" name="attr_actioncode" spellcheck="false" placeholder="Code de l'action ou nom de macro ou ability si différent du titre" title="Code de l'action"></textarea>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
<div class="sheet-col">
|
||
<table>
|
||
<tr><td class="boxtitre">Prédicats</td></tr>
|
||
<tr><td class="boxinputleft"><textarea name="attr_predicats_script" style="height:25em;" spellcheck="false" title="Predicats"></textarea></td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> <!-- FIN des données pour le script -->
|
||
</div> <!-- FIN fiche type PNJ -->
|
||
</div> <!-- FIN FDP -->
|
||
<!-- TEMPLATES -->
|
||
<rolltemplate class="sheet-rolltemplate-co1">
|
||
<table>
|
||
<tr>
|
||
<th colspan="2" style="text-align: center;">{{perso}}</th>
|
||
</tr>
|
||
<tr>
|
||
<td class="sheet-rolltemplate-subheader">{{subtags}}</td>
|
||
<th>{{name}}</th>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2">
|
||
<img class="sheet-rolltemplate-imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
</td>
|
||
</tr>
|
||
{{#DV}}
|
||
<tr>
|
||
<td class="sheet-rolltemplate-tcat">PV gagnés</td>
|
||
<td>{{DV}}</td>
|
||
</tr>
|
||
{{/DV}}
|
||
{{#DM}}
|
||
<tr>
|
||
<td class="sheet-rolltemplate-tcat">PM gagnés</td>
|
||
<td>{{DM}}</td>
|
||
</tr>
|
||
{{/DM}}
|
||
{{#carac}}
|
||
<tr>
|
||
<td class="sheet-rolltemplate-tcat">Jet </td>
|
||
<td>{{carac}}</td>
|
||
</tr>
|
||
{{/carac}}
|
||
{{#desc}}
|
||
<tr>
|
||
<td colspan="2" style="white-space:normal;">
|
||
<div class="sheet-rolltemplate-desc">{{desc}}</div>
|
||
</td>
|
||
</tr>
|
||
{{/desc}}
|
||
{{#attaque}}
|
||
{{^attaqueautomatique}}
|
||
{{#rollWasCrit() attaque}}
|
||
<tr><td colspan="2" style="color:green;"><b>Critique !</b></td></tr>
|
||
{{/rollWasCrit() attaque}}
|
||
{{#rollWasFumble() attaque}}
|
||
<tr>
|
||
<td colspan="2" style="color:red;"><b>Fumble !</b></td>
|
||
</tr>
|
||
{{/rollWasFumble() attaque}}
|
||
<tr>
|
||
<td class="sheet-rolltemplate-tcat">Jet </td>
|
||
<td>{{attaque}} contre DEF</td>
|
||
</tr>
|
||
{{#poudre}}
|
||
<tr>
|
||
<td>
|
||
Dé de poudre
|
||
</td>
|
||
<td>
|
||
{{poudre}}
|
||
</td>
|
||
</tr>
|
||
{{/poudre}}
|
||
{{/attaqueautomatique}}
|
||
{{#attaqueautomatique}}
|
||
<tr><td colspan="2" style="color:green; text-align: center;">Réussite automatique</td></tr>
|
||
{{/attaqueautomatique}}
|
||
{{#degats}}
|
||
<tr>
|
||
<td class="sheet-rolltemplate-tcat">Dégâts {{#dmtemp}}temp.{{/dmtemp}}</td>
|
||
<td>
|
||
{{degats}}
|
||
{{#rollWasCrit() attaque}}
|
||
<span style="color:green;font-weight:bold;"> + {{degats}}</span>
|
||
{{/rollWasCrit() attaque}}
|
||
{{#degats2}}
|
||
+ {{degats2}}
|
||
{{/degats2}}
|
||
</td>
|
||
</tr>
|
||
{{/degats}}
|
||
{{/attaque}}
|
||
{{#special}}
|
||
<tr>
|
||
<td colspan="2" class="sheet-rolltemplate-subheader" style="text-align:left;">Spécial</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" style="white-space:normal;">
|
||
<div class="sheet-rolltemplate-desc">{{special}}</div>
|
||
</td>
|
||
</tr>
|
||
{{/special}}
|
||
{{#text}}
|
||
<tr>
|
||
<td colspan="2" style="white-space:normal; margin: 1px;">
|
||
<div class="sheet-rolltemplate-text">{{text}}</div>
|
||
</td>
|
||
</tr>
|
||
{{/text}}
|
||
<tr>
|
||
<td colspan="2">
|
||
<img class="sheet-rolltemplate-imghr" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ChroniquesOubliees/co_hr.png" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</rolltemplate>
|
||
<!-- FIN TEMPLATES -->
|
||
<!-- **** SCRIPTS / SHEET WORKERS -->
|
||
<script type="text/worker">
|
||
let silent = {
|
||
silent: true
|
||
};
|
||
|
||
on('sheet:opened', function() {
|
||
// **** Gestion transition de version
|
||
getAttrs(['version', 'option_setting'], function(v) {
|
||
let verfdp = parseFloat(v.version) || 0;
|
||
if (verfdp < 5.04) {
|
||
if (verfdp === 0) {
|
||
// Version 1.6 vers 1.7
|
||
getAttrs(["FOR_SUP", "DEX_SUP", "CON_SUP", "INT_SUP", "SAG_SUP", "CHA_SUP"], function(jets) {
|
||
var sfor, sdex, scon, sint, ssag, scha = "";
|
||
if (jets.FOR_SUP == "2") {
|
||
sfor = "@{JETSUP}";
|
||
} else {
|
||
sfor = "@{JETNORMAL}";
|
||
}
|
||
if (jets.DEX_SUP == "2") {
|
||
sdex = "@{JETSUP}";
|
||
} else {
|
||
sdex = "@{JETNORMAL}";
|
||
}
|
||
if (jets.CON_SUP == "2") {
|
||
scon = "@{JETSUP}";
|
||
} else {
|
||
scon = "@{JETNORMAL}";
|
||
}
|
||
if (jets.INT_SUP == "2") {
|
||
sint = "@{JETSUP}";
|
||
} else {
|
||
sint = "@{JETNORMAL}";
|
||
}
|
||
if (jets.SAG_SUP == "2") {
|
||
ssag = "@{JETSUP}";
|
||
} else {
|
||
ssag = "@{JETNORMAL}";
|
||
}
|
||
if (jets.CHA_SUP == "2") {
|
||
scha = "@{JETSUP}";
|
||
} else {
|
||
scha = "@{JETNORMAL}";
|
||
}
|
||
setAttrs({
|
||
for_sup: sfor,
|
||
dex_sup: sdex,
|
||
con_sup: scon,
|
||
int_sup: sint,
|
||
sag_sup: ssag,
|
||
cha_sup: scha,
|
||
}, silent);
|
||
});
|
||
}
|
||
if (verfdp < 3) {
|
||
setAttrs({
|
||
type_personnage: 'PJ'
|
||
}, silent);
|
||
getAttrs(["charisme", "option_pc", "pc", "pc_max"], function(values) {
|
||
let option_pc = values.option_pc;
|
||
if (option_pc == 1 || option_pc == 'on') {
|
||
let charisme = toInt(values.charisme, 10, 1);
|
||
let pc_base = 3 + Math.floor((charisme - 10) / 2);
|
||
let toSet = {
|
||
pc_base: pc_base
|
||
};
|
||
let pc_max = parseInt(values.pc_max);
|
||
if (!isNaN(pc_max) && pc_max != pc_base) {
|
||
toSet.pc_bonus = pc_max - pc_base;
|
||
} else {
|
||
if (pc_base < 0) pc_base = 0;
|
||
toSet.pc_max = pc_base;
|
||
}
|
||
setAttrs(toSet, silent);
|
||
}
|
||
});
|
||
getAttrs(["for_sup", "dex_sup", "con_sup", "int_sup", "sag_sup", "cha_sup"], function(jets) {
|
||
var sfor, sdex, scon, sint, ssag, scha = "";
|
||
if (jets.for_sup) sfor = jets.for_sup.toLowerCase();
|
||
if (jets.dex_sup) sdex = jets.dex_sup.toLowerCase();
|
||
if (jets.con_sup) scon = jets.con_sup.toLowerCase();
|
||
if (jets.int_sup) sint = jets.int_sup.toLowerCase();
|
||
if (jets.sag_sup) ssag = jets.sag_sup.toLowerCase();
|
||
if (jets.cha_sup) scha = jets.cha_sup.toLowerCase();
|
||
setAttrs({
|
||
for_sup: sfor,
|
||
dex_sup: sdex,
|
||
con_sup: scon,
|
||
int_sup: sint,
|
||
sag_sup: ssag,
|
||
cha_sup: scha,
|
||
}, silent);
|
||
});
|
||
}
|
||
if (verfdp < 3.2) {
|
||
getAttrs(["DEFARMURE"], function(values) {
|
||
let def = toInt(values.DEFARMURE, 0);
|
||
if (def === 0) setAttrs({
|
||
DEFARMUREON: 0
|
||
}, silent);
|
||
else if (def > 0) setAttrs({
|
||
DEFARMUREON: 1
|
||
}, silent);
|
||
});
|
||
getAttrs(["DEFBOUCLIER"], function(values) {
|
||
let def = toInt(values.DEFBOUCLIER, 0);
|
||
if (def === 0) setAttrs({
|
||
DEFBOUCLIERON: 0
|
||
}, silent);
|
||
else if (def > 0) setAttrs({
|
||
DEFBOUCLIERON: 1
|
||
}, silent);
|
||
});
|
||
//Remplis le casque si on a un attribut RD_critique
|
||
getAttrs(['RD_critique'], function(values) {
|
||
var rd = values.RD_critique;
|
||
if (rd) {
|
||
rd = parseInt(rd);
|
||
if (!isNaN(rd) && rd > 0) {
|
||
setAttrs({
|
||
casque_rd: rd,
|
||
casque_malus: rd,
|
||
casque_on: 1,
|
||
RD_critique: ''
|
||
}, silent);
|
||
}
|
||
}
|
||
});
|
||
//Ajout des labels aux armes.
|
||
ajouteLabels('repeating_armes');
|
||
ajouteLabels('repeating_pnjatk');
|
||
}
|
||
if (verfdp < 3.3) {
|
||
//Par défaut, les attaques n'étaient pas visibles
|
||
enleveAttaqueVisible('repeating_armes');
|
||
enleveAttaqueVisible('repeating_pnjatk');
|
||
}
|
||
if (verfdp < 3.4) {
|
||
appliqueModificateurs34('armes');
|
||
appliqueModificateurs34('pnjatk');
|
||
getAttrs(['pnj_def'], function(values) {
|
||
var def = parseInt(values.pnj_def);
|
||
if (isNaN(def) || def == 10) return;
|
||
setAttrs({
|
||
defense_si_attaque_risquee: def - 4
|
||
}, silent);
|
||
});
|
||
}
|
||
if (verfdp < 3.5) {
|
||
getAttrs(['type_personnage'], function(values) {
|
||
if (values.type_personnage == 'PNJ') {
|
||
setAttrs({
|
||
tab: "carac. pnj"
|
||
}, silent);
|
||
}
|
||
});
|
||
}
|
||
if (verfdp < 3.6) { //passage à un seul attribut pour les PRs
|
||
getAttrs(['PR1', 'PR2', 'PR3', 'PR4', 'PR5'], function(values) {
|
||
var pr = 5;
|
||
if (parseInt(values.PR1)) pr--;
|
||
if (parseInt(values.PR2)) pr--;
|
||
if (parseInt(values.PR3)) pr--;
|
||
if (parseInt(values.PR4)) pr--;
|
||
if (parseInt(values.PR5)) pr--;
|
||
setAttrs({
|
||
pr: pr,
|
||
pr_max: 5
|
||
}, silent);
|
||
});
|
||
}
|
||
if (verfdp < 3.7) { //unification des attributs pv, dmtemp et rd
|
||
getAttrs(['type_personnage', 'pnj_pv', 'pnj_pv_max', 'pnj_dmtemp', 'pnj_rd'], function(values) {
|
||
if (values.type_personnage != 'PNJ') return;
|
||
var sa = {
|
||
RDS: values.pnj_rd
|
||
};
|
||
var pvMax = parseInt(values.pnj_pv_max);
|
||
if (!isNaN(pvMax) && pvMax > 0) sa.PV_max = pvMax;
|
||
var pv = parseInt(values.pnj_pv);
|
||
if (!isNaN(pv) && pv >= 0 && pv <= pvMax) sa.PV = pv;
|
||
var dmtemp = parseInt(values.pnj_dmtemp);
|
||
if (!isNaN(dmtemp) && dmtemp >= 0 && dmtemp <= pvMax)
|
||
sa.DMTEMP = dmtemp;
|
||
setAttrs(sa);
|
||
});
|
||
}
|
||
if (verfdp < 4.01) { //changement de nom des attributs de consommables
|
||
getSectionIDs('repeating_equipement', function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_equipement_' + id + '_';
|
||
getAttrs([prefix + 'equip-nom', prefix + 'equip-qte', prefix + 'equip-effet'], function(values) {
|
||
let sa = {};
|
||
sa[prefix + 'equip_nom'] = values[prefix + 'equip-nom'];
|
||
sa[prefix + 'equip_qte'] = values[prefix + 'equip-qte'];
|
||
sa[prefix + 'equip_effet'] = values[prefix + 'equip-effet'];
|
||
sa[prefix + 'equip-nom'] = '';
|
||
sa[prefix + 'equip-qte'] = '';
|
||
sa[prefix + 'equip-effet'] = '';
|
||
setAttrs(sa);
|
||
});
|
||
});
|
||
});
|
||
getAttrs(['equip-div'], function(values) {
|
||
if (values['equip-div'] !== undefined)
|
||
setAttrs({
|
||
equip_div: values['equip-div'],
|
||
});
|
||
});
|
||
}
|
||
if (verfdp < 4.02) { //rattrapage équipement divers, parsing de bourse
|
||
getAttrs(['equip-div', 'equip_div', 'BOURSE', 'option_setting'], function(values) {
|
||
if (values['equip-div'] !== undefined && values['equip-div'] !== '' && values.equip_div === '') {
|
||
setAttrs({
|
||
equip_div: values['equip-div'],
|
||
});
|
||
}
|
||
if (values.BOURSE) {
|
||
let sa = {};
|
||
let bourse = values.BOURSE.toLowerCase().split(/[ ,]/);
|
||
let lastNumber = 0;
|
||
let reste = '';
|
||
bourse.forEach(function(t) {
|
||
switch (t.trim()) {
|
||
case '':
|
||
case ' ':
|
||
case ',':
|
||
case 'et':
|
||
return;
|
||
case 'pp':
|
||
case 'platine':
|
||
if (lastNumber) sa.bourse_pp = lastNumber;
|
||
else reste += ' ' + t;
|
||
lastNumber = 0;
|
||
return;
|
||
case 'po':
|
||
case 'or':
|
||
if (lastNumber) sa.bourse_po = lastNumber;
|
||
else reste += ' ' + t;
|
||
lastNumber = 0;
|
||
return;
|
||
case 'pa':
|
||
case 'argent':
|
||
case "d'argent":
|
||
if (lastNumber) sa.bourse_pa = lastNumber;
|
||
else reste += ' ' + t;
|
||
lastNumber = 0;
|
||
return;
|
||
case 'pc':
|
||
case 'cuivre':
|
||
if (lastNumber) sa.bourse_pc = lastNumber;
|
||
else reste += ' ' + t;
|
||
lastNumber = 0;
|
||
return;
|
||
default:
|
||
{
|
||
let n = parseInt(t);
|
||
if (isNaN(n) | n < 1) {
|
||
reste += ' ' + t;
|
||
return;
|
||
}
|
||
if (lastNumber) reste += ' ' + lastNumber;
|
||
lastNumber = n;
|
||
if (t.endsWith('pp')) {
|
||
sa.bourse_pp = lastNumber;
|
||
lastNumber = 0;
|
||
} else if (t.endsWith('po')) {
|
||
sa.bourse_po = lastNumber;
|
||
lastNumber = 0;
|
||
} else if (t.endsWith('pa')) {
|
||
sa.bourse_pa = lastNumber;
|
||
lastNumber = 0;
|
||
} else if (t.endsWith('pc')) {
|
||
sa.bourse_pc = lastNumber;
|
||
lastNumber = 0;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
if (sa.bourse_pp || sa.bourse_po || sa.bourse_pa || sa.bourse_pc) {
|
||
sa.BOURSE = reste;
|
||
setAttrs(sa);
|
||
}
|
||
}
|
||
if (values.option_settings != 'arran') {
|
||
setAttrs({
|
||
mod_atktir: '',
|
||
mod_atkmag: '',
|
||
mod_initiative: '',
|
||
});
|
||
}
|
||
});
|
||
}
|
||
if (verfdp < 4.03) { //bonus d'attaque différenciés
|
||
setBaseAttacks();
|
||
}
|
||
if (verfdp < 4.04) { //titres de capacités
|
||
var a = [];
|
||
var voie;
|
||
var rang;
|
||
for (voie = 1; voie < 10; voie++) {
|
||
for (rang = 1; rang < 6; rang++) {
|
||
a.push('voie' + voie + '-' + rang);
|
||
a.push('v' + voie + 'r' + rang + 'titre');
|
||
}
|
||
}
|
||
getAttrs(a, function(values) {
|
||
let s = {};
|
||
for (voie = 1; voie < 10; voie++) {
|
||
for (rang = 1; rang < 6; rang++) {
|
||
let titre = 'v' + voie + 'r' + rang + 'titre';
|
||
if (values[titre] !== '') continue;
|
||
var capa = 'voie' + voie + '-' + rang;
|
||
let r = extraireTitreCapacite(values[capa]);
|
||
if (r.titre === '') continue;
|
||
s[titre] = r.titre;
|
||
s[capa] = r.texte;
|
||
}
|
||
}
|
||
setAttrs(s);
|
||
});
|
||
}
|
||
if (verfdp < 5.00) {
|
||
getAttrs(['montrerarmeenmain'], function(v) {
|
||
let montrer = v.montrerarmeenmain === '1';
|
||
updateAttaques45('armes', montrer);
|
||
updateAttaques45('pnjatk', montrer);
|
||
});
|
||
}
|
||
if (verfdp < 5.01) {
|
||
getAttrs(['type_personnage', 'pnj_bouclier', 'pnj_armure'], function(values) {
|
||
if (values.type_personnage == 'PNJ') {
|
||
let attrs = {};
|
||
let mod;
|
||
if (values.pnj_bouclier == 'on') {
|
||
attrs.defbouclieron = 1;
|
||
mod = true;
|
||
}
|
||
if (values.pnj_armure == 'on') {
|
||
attrs.defarmureon = 1;
|
||
mod = true;
|
||
}
|
||
if (mod) setAttrs(attrs);
|
||
}
|
||
});
|
||
}
|
||
if (verfdp < 5.02) {
|
||
updateAttaques501502('armes');
|
||
updateAttaques501502('pnjatk');
|
||
}
|
||
if (verfdp < 5.03) {
|
||
let sa = {};
|
||
getAttrs(['armeEnMain', 'armeEnMain_max', 'defarmureon', 'defarmure',
|
||
'casque_on', 'casque_rd', 'defbouclieron', 'defbouclier',
|
||
'force', 'dexterite', 'constitution', 'intelligence', 'sagesse', 'charisme'
|
||
], function(values) {
|
||
if (values.armeEnMain) {
|
||
sa.maindroite = values.armeEnMain;
|
||
sa.montrerattaquedroite = '1';
|
||
}
|
||
if (values.armeEnMain_max) {
|
||
if (values.armeEnMain_max == values.armeEnMain)
|
||
sa.maingauche = '2m';
|
||
else sa.maingauche = values.armeEnMain_max;
|
||
}
|
||
if (porteArmure(values)) sa.torseequipe = '-1';
|
||
if (porteCasque(values)) sa.teteequipe = '-1';
|
||
if (!sa.maingauche && porteBouclier(values)) sa.maingauche = 'b-1';
|
||
sa.FOR = Math.floor((parseInt(values.force) - 10) / 2) || '';
|
||
sa.DEX = Math.floor((parseInt(values.dexterite) - 10) / 2) || '';
|
||
sa.CON = Math.floor((parseInt(values.constitution) - 10) / 2) || '';
|
||
sa.INT = Math.floor((parseInt(values.intelligence) - 10) / 2) || '';
|
||
sa.SAG = Math.floor((parseInt(values.sagesse) - 10) / 2) || '';
|
||
sa.CHA = Math.floor((parseInt(values.charisme) - 10) / 2) || '';
|
||
setAttrs(sa, silent);
|
||
});
|
||
}
|
||
if (verfdp < 5.04) {
|
||
getAttrs(['torseequipe', 'teteequipe', 'maingauche'], function(values) {
|
||
let torseTrouve = values.torseequipe === '' || values.torseequipe == '0' || values.torseequipe == '-1';
|
||
let teteTrouvee = values.teteequipe === '' || values.teteequipe == '0' || values.teteequipe == '-1';
|
||
let bouclierTrouve = !values.maingauche || !values.maingauche.startsWith('b') || values.maingauche == 'b-1';
|
||
if (torseTrouve && teteTrouvee && bouclierTrouve) return; //Rien n'est équipé
|
||
getSectionIDs('repeating_armures', function(arrayArmures) {
|
||
let sa = {};
|
||
let n = arrayArmures.length;
|
||
if (n === 0) return;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
setAttrs(sa);
|
||
};
|
||
arrayArmures.forEach(function(id) {
|
||
const prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'typearmure', prefix + 'effetarmure'], function(vt) {
|
||
switch (vt[prefix + 'typearmure']) {
|
||
case 'Torse':
|
||
if (torseTrouve) break;
|
||
if (vt[prefix + 'labelarmure'] == values.torseequipe) {
|
||
torseTrouve = true;
|
||
sa[prefix + 'equipearmure'] = '1';
|
||
}
|
||
break;
|
||
case 'Casque':
|
||
if (teteTrouvee) break;
|
||
if (vt[prefix + 'labelarmure'] == values.teteequipe) {
|
||
teteTrouvee = true;
|
||
sa[prefix + 'equipearmure'] = '1';
|
||
}
|
||
break;
|
||
case 'Bouclier':
|
||
if (bouclierTrouve) break;
|
||
if ('b' + vt[prefix + 'labelarmure'] == values.maingauche) {
|
||
bouclierTrouve = true;
|
||
sa[prefix + 'equipearmure'] = '1';
|
||
}
|
||
break;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
}
|
||
setAttrs({
|
||
version: '5.04'
|
||
}, silent);
|
||
//Les listes dynamiques
|
||
peuplerListeArmures(peuplerListeArmes);
|
||
peuplerListeEmplacements();
|
||
if (v.option_setting == 'arran') {
|
||
//Quelques valeurs de départ selon la famille de profil par défaut
|
||
getAttrs(['famille_par_defaut', 'famille', 'charisme', 'sagesse', 'niveau'], function(values) {
|
||
if (values.famille_par_defaut == 1 && values.famille == 'aventurier') {
|
||
let attr = {
|
||
famille_par_defaut: 0,
|
||
DV: 8,
|
||
mod_atkcac: 1,
|
||
mod_atktir: 1,
|
||
option_setting_cac: 'arran',
|
||
option_setting_tir: 'arran',
|
||
option_setting_mag: 'arran',
|
||
option_setting_init: 'arran',
|
||
titrevoie4: "Voie de peuple",
|
||
titrevoie5: "Voie culturelle",
|
||
titrecapaciteraciale: "Trait de peuple",
|
||
formations_martiales_check: 1,
|
||
};
|
||
let charisme = toInt(values.charisme, 10, 1);
|
||
attr.pc_base = 4 + Math.floor((charisme - 10) / 2);
|
||
attr.pc_max = attr.pc_base;
|
||
attr.pc = attr.pc_base;
|
||
let sagesse = toInt(values.sagesse, 10, 1);
|
||
let niveau = toInt(values.niveau, 1, 0);
|
||
attr.pm_max = niveau + Math.floor((sagesse - 10) / 2);
|
||
attr.pm = attr.pm_max;
|
||
setAttrs(attr);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
function updateAttaques45(section, montrer) {
|
||
getSectionIDs('repeating_' + section, function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
const prefix = 'repeating_' + section + '_' + id + '_';
|
||
getAttrs([prefix + 'armetypeattaque'], function(values) {
|
||
let toSet = {};
|
||
let at = values[prefix + 'armetypeattaque'];
|
||
if (at == 'Arme de jet') {
|
||
toSet[prefix + 'armejet'] = 'on';
|
||
setAttrs(toSet);
|
||
} else if (montrer && at.startsWith('Arme')) {
|
||
toSet[prefix + 'armeactionvisible'] = 1;
|
||
setAttrs(toSet);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
function updateAttaques501502(section) {
|
||
getSectionIDs('repeating_' + section, function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
const prefix = 'repeating_' + section + '_' + id + '_';
|
||
getAttrs([prefix + 'armetypeattaque'], function(values) {
|
||
let toSet = {};
|
||
let at = values[prefix + 'armetypeattaque'];
|
||
if (at.startsWith('Arme') && at != 'Arme de jet') {
|
||
toSet[prefix + 'armeportable'] = 'on';
|
||
setAttrs(toSet);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
function extraireTitreCapacite(capacite) {
|
||
let res = {
|
||
titre: capacite,
|
||
texte: ''
|
||
};
|
||
capacite = (capacite + '').trim();
|
||
if (capacite.length === 0) return res;
|
||
var i = capacite.indexOf('\n');
|
||
if (i > 0 && i < 41) {
|
||
res.titre = capacite.substring(0, i).trim();
|
||
if (i < capacite.length - 1)
|
||
res.texte = capacite.substring(i + 1);
|
||
return res;
|
||
}
|
||
if (capacite.length < 42) return res;
|
||
i = capacite.lastIndexOf(' ', 42);
|
||
if (i < 0) i = capacite.indexOf(' ');
|
||
if (i < 0) return res;
|
||
res.titre = capacite.substring(0, i);
|
||
if (i < capacite.length - 1) res.texte = capacite.substring(i + 1);
|
||
return res;
|
||
}
|
||
|
||
function appliqueModificateurs34(section) {
|
||
getSectionIDs('repeating_' + section, function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
const prefix = 'repeating_' + section + '_' + id + '_';
|
||
getAttrs([prefix + 'armemodificateurs'], function(values) {
|
||
let modifs = values[prefix + 'armemodificateurs'].split(',');
|
||
let attrs = {};
|
||
let nbDes = 1; //Nombre de dés pour l'attaque
|
||
let plusFort = true;
|
||
modifs.forEach(function(m) {
|
||
switch (m.trim()) {
|
||
case 'tempDmg':
|
||
attrs[prefix + 'armedmtemp'] = 1;
|
||
return;
|
||
case 'pasDeDmg':
|
||
attrs[prefix + 'armedegats'] = '{{degats=}}';
|
||
return;
|
||
case 'poudre':
|
||
attrs[prefix + 'armepoudre'] = '{{poudre=[[1d20]]}}';
|
||
return;
|
||
case 'auto':
|
||
attrs[prefix + 'armereussiteauto'] = '{{attaqueautomatique=1}}';
|
||
return;
|
||
case 'reroll1':
|
||
attrs[prefix + 'armedmrollmod'] = attrs[prefix + 'armedmrollmod'] || '';
|
||
attrs[prefix + 'armedmrollmod'] += 'r1';
|
||
return;
|
||
case 'explodeMax':
|
||
attrs[prefix + 'armedmrollmod'] = attrs[prefix + 'armedmrollmod'] || '';
|
||
attrs[prefix + 'armedmrollmod'] += '!';
|
||
return;
|
||
case 'avantage':
|
||
case 'm2d20':
|
||
if (plusFort) nbDes++;
|
||
else if (nbDes <= 1) {
|
||
plusFort = true;
|
||
nbDes = 2;
|
||
} else nbDes--;
|
||
return;
|
||
case 'desavantage':
|
||
case 'désavantage':
|
||
if (plusFort) {
|
||
if (nbDes > 1) nbDes--;
|
||
else {
|
||
plusFort = false;
|
||
nbDes = 2;
|
||
}
|
||
} else nbDes++;
|
||
return;
|
||
case 'avecd12':
|
||
attrs[prefix + 'armeattde'] = '12';
|
||
return;
|
||
}
|
||
});
|
||
if (nbDes > 1) {
|
||
attrs[prefix + 'armeattnbde'] = nbDes;
|
||
if (plusFort) attrs[prefix + 'armeattrollmod'] = 'kh1';
|
||
else attrs[prefix + 'armeattrollmod'] = 'kl1';
|
||
}
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
function enleveAttaqueVisible(attr) {
|
||
getSectionIDs(attr, function(idArray) {
|
||
let toSet = {};
|
||
idArray.forEach(function(id) {
|
||
toSet[attr + '_' + id + '_armeactionvisible'] = 0;
|
||
});
|
||
setAttrs(toSet);
|
||
});
|
||
}
|
||
|
||
function ajouteLabels(attr) {
|
||
getSectionIDs(attr, function(idArray) {
|
||
getAttrs(['max_attack_label'], function(v) {
|
||
let maxLabel = toInt(v.max_attack_label, 0);
|
||
let initialMaxLabel = maxLabel;
|
||
let count = idArray.length;
|
||
const finalize = function() {
|
||
count--;
|
||
if (count === 0) {
|
||
if (maxLabel > initialMaxLabel)
|
||
setAttrs({
|
||
max_attack_label: maxLabel
|
||
}, silent);
|
||
}
|
||
};
|
||
idArray.forEach(function(id) {
|
||
const prefix = attr + '_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armenom'], function(values) {
|
||
let label = parseInt(values[prefix + 'armelabel']);
|
||
if (label > 0) return;
|
||
let toSet = {};
|
||
let nom = values[prefix + 'armenom'];
|
||
let postLabel = nom.indexOf(' ');
|
||
if (postLabel > 0 && postLabel < nom.length - 1) {
|
||
label = parseInt(nom.substring(0, postLabel));
|
||
if (!isNaN(label)) {
|
||
if (label > maxLabel) maxLabel = label;
|
||
toSet[prefix + 'armelabel'] = label;
|
||
toSet[prefix + 'armenom'] = nom.substring(postLabel + 1);
|
||
setAttrs(toSet);
|
||
finalize();
|
||
return;
|
||
}
|
||
}
|
||
//Pas de label dans le nom
|
||
maxLabel++;
|
||
toSet[prefix + 'armelabel'] = maxLabel;
|
||
setAttrs(toSet);
|
||
finalize();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
function car_sup_from_pj_to_pnj(att_sup) {
|
||
if (att_sup === undefined || att_sup == '@{jetnormal}') return 0;
|
||
return 'on';
|
||
}
|
||
|
||
//asynchrone, appelle callback avec un map label -> prefix attribut
|
||
function getLabels(attr, callback) {
|
||
let res = {};
|
||
getSectionIDs(attr, function(idArray) {
|
||
let labelArray = idArray.map(function(id) {
|
||
return attr + '_' + id + '_armelabel';
|
||
});
|
||
getAttrs(labelArray, function(values) {
|
||
idArray.forEach(function(id) {
|
||
var label = values[attr + '_' + id + '_armelabel'];
|
||
if (label === undefined) return;
|
||
res[label] = attr + '_' + id + '_';
|
||
});
|
||
callback(res);
|
||
});
|
||
});
|
||
}
|
||
|
||
function assignPredicate(pred, name, val) {
|
||
if (pred[name]) {
|
||
if (!Array.isArray(pred[name])) pred[name] = [pred[name]];
|
||
pred[name].push(val);
|
||
} else pred[name] = val;
|
||
}
|
||
|
||
function predicateOfRaw(raw) {
|
||
let pred = {};
|
||
let last, assign;
|
||
//On coupe d'abord par ligne
|
||
let lignes = raw.split('\n');
|
||
lignes.forEach(function(ligne) {
|
||
let indexPredComplexe = ligne.indexOf('::');
|
||
let indexCommentaire = ligne.indexOf('//');
|
||
let valeurPredComplexe = '';
|
||
if (indexPredComplexe > 0 &&
|
||
(indexCommentaire == -1 || indexCommentaire > indexPredComplexe)) {
|
||
valeurPredComplexe = ligne.substring(indexPredComplexe + 2);
|
||
ligne = ligne.substring(0, indexPredComplexe);
|
||
} else if (indexCommentaire > 0) {
|
||
ligne = ligne.substring(0, indexCommentaire);
|
||
}
|
||
ligne.split(/,| /).forEach(function(p) {
|
||
p = p.trim();
|
||
if (p === '') return;
|
||
if (p === ':') {
|
||
if (last) assign = true;
|
||
return;
|
||
}
|
||
let i = p.indexOf(':');
|
||
if (i < 0) {
|
||
if (last) {
|
||
if (assign) {
|
||
assignPredicate(pred, last, p);
|
||
assign = false;
|
||
} else pred[last] = true;
|
||
}
|
||
last = p;
|
||
return;
|
||
}
|
||
//p contient ':' mais pas seulement
|
||
if (i === 0) {
|
||
if (last) {
|
||
assignPredicate(pred, last, p.substring(1));
|
||
last = undefined;
|
||
} else {
|
||
last = p.substring(1);
|
||
}
|
||
assign = false;
|
||
return;
|
||
} //p ne commence pas par ':'
|
||
if (last) pred[last] = true;
|
||
if (i == p.length - 1) {
|
||
last = p.substring(0, i);
|
||
assign = true;
|
||
} else {
|
||
assignPredicate(pred, p.substring(0, i), p.substring(i + 1));
|
||
last = undefined;
|
||
assign = false;
|
||
}
|
||
});
|
||
if (last && valeurPredComplexe !== '') {
|
||
assignPredicate(pred, last, valeurPredComplexe);
|
||
last = undefined;
|
||
}
|
||
});
|
||
if (last) pred[last] = true;
|
||
return pred;
|
||
}
|
||
|
||
//Calcule les prédicats en fonction de ce qui est porté
|
||
//Seulement utilisé pour les fiches PJ.
|
||
function getPredicates(callback) {
|
||
getAttrs(['predicats_script', 'maindroite', 'maingauche'], function(values) {
|
||
let raw = values.predicats_script;
|
||
getSectionIDs('repeating_armes', function(arrayArmes) {
|
||
getSectionIDs('repeating_armures', function(arrayArmures) {
|
||
let n = arrayArmes.length + arrayArmures.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
let pred = predicateOfRaw(raw);
|
||
callback(pred);
|
||
};
|
||
if (n === 0) fin();
|
||
let armeDroiteTrouvee = values.maindroite == '0' || values.maindroite == 'Autre' || values.maindroite == 'Torche';
|
||
let armeGaucheTrouvee = !values.maingauche || values.maingauche == '0' || values.maingauche == '2m' || values.maingauche == 'Autre' || values.maingauche == 'Torche' || values.maingauche.startsWith('b');
|
||
arrayArmes.forEach(function(id) {
|
||
if (armeDroiteTrouvee && armeGaucheTrouvee) {
|
||
fin();
|
||
return;
|
||
}
|
||
const prefix = 'repeating_armes_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armepredicats'], function(vt) {
|
||
let label = vt[prefix + 'armelabel'];
|
||
if (!armeDroiteTrouvee && values.maindroite == label) {
|
||
armeDroiteTrouvee = true;
|
||
let p = vt[prefix + 'armepredicats'];
|
||
if (p) raw += '\n' + p;
|
||
} else if (!armeGaucheTrouvee && values.maingauche == label) {
|
||
armeGaucheTrouvee = true;
|
||
let p = vt[prefix + 'armepredicats'];
|
||
if (p) raw += '\n' + p;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
arrayArmures.forEach(function(id) {
|
||
const prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'effetarmure', prefix + 'equipearmure'], function(vt) {
|
||
if (vt[prefix + 'equipearmure'] == '1') {
|
||
let p = vt[prefix + 'effetarmure'];
|
||
if (p) raw += '\n' + p;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
on('change:repeating_armures:effetarmure', function(enventinfo) {
|
||
getAttrs(['repeating_armures_equipearmure', 'montrerattaquegauche'], function(values) {
|
||
if (values.repeating_armures_equipearmure != '1') return;
|
||
getPredicates(function(pred) {
|
||
if (pred.attaqueAuBouclier) {
|
||
if (values.montrerattaquegauche != '1')
|
||
setAttrs({
|
||
montrerattaquegauche: '1'
|
||
}, silent);
|
||
} else {
|
||
if (values.montrerattaquegauche != '0')
|
||
setAttrs({
|
||
montrerattaquegauche: '0'
|
||
}, silent);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
|
||
on('change:type_personnage', function(eventinfo) {
|
||
//Conversion quand on passe de PJ à PNJ
|
||
if (eventinfo.newValue == 'PNJ') {
|
||
getAttrs(
|
||
['force', 'for_bonus', 'dexterite', 'dex_bonus', 'constitution',
|
||
'con_bonus', 'intelligence', 'int_bonus', 'sagesse', 'sag_bonus',
|
||
'charisme', 'cha_bonus', 'INIT_DIV', 'defarmure', 'defarmureon',
|
||
"defbouclier", "defbouclieron", "DEFDIV", "PV_max", "for_sup",
|
||
"dex_sup", "con_sup", "int_sup", "sag_sup", "cha_sup", "PV", "RDS",
|
||
"jets_caches", "pnj_default_jets_caches",
|
||
],
|
||
function(values) {
|
||
let attrs = {
|
||
tab: "carac. pnj"
|
||
};
|
||
attrs.pnj_for = Math.floor((parseInt(values.force) - 10) / 2);
|
||
if (isNaN(attrs.pnj_for)) attrs.pnj_for = 0;
|
||
let bonus = parseInt(values.for_bonus);
|
||
if (!isNaN(bonus)) attrs.pnj_for += bonus;
|
||
attrs.pnj_init = parseInt(values.dexterite);
|
||
if (isNaN(attrs.pnj_init)) attrs.pnj_init = 10;
|
||
attrs.pnj_dex = Math.floor((attrs.pnj_init - 10) / 2);
|
||
attrs.pnj_def = 10 + attrs.pnj_dex;
|
||
bonus = parseInt(values.dex_bonus);
|
||
if (!isNaN(bonus)) attrs.pnj_dex += bonus;
|
||
attrs.pnj_con = Math.floor((parseInt(values.constitution) - 10) / 2);
|
||
if (isNaN(attrs.pnj_con)) attrs.pnj_con = 0;
|
||
bonus = parseInt(values.con_bonus);
|
||
if (!isNaN(bonus)) attrs.pnj_con += bonus;
|
||
attrs.pnj_int = Math.floor((parseInt(values.intelligence) - 10) / 2);
|
||
if (isNaN(attrs.pnj_int)) attrs.pnj_int = 0;
|
||
bonus = parseInt(values.int_bonus);
|
||
if (!isNaN(bonus)) attrs.pnj_int += bonus;
|
||
attrs.pnj_sag = Math.floor((parseInt(values.sagesse) - 10) / 2);
|
||
if (isNaN(attrs.pnj_sag)) attrs.pnj_sag = 0;
|
||
bonus = parseInt(values.sag_bonus);
|
||
if (!isNaN(bonus)) attrs.pnj_sag += bonus;
|
||
attrs.pnj_cha = Math.floor((parseInt(values.charisme) - 10) / 2);
|
||
if (isNaN(attrs.pnj_cha)) attrs.pnj_cha = 0;
|
||
bonus = parseInt(values.cha_bonus);
|
||
if (!isNaN(bonus)) attrs.pnj_cha += bonus;
|
||
bonus = parseInt(values.defarmure) * parseInt(values.defarmureon);
|
||
if (!isNaN(bonus)) attrs.pnj_def += bonus;
|
||
bonus = parseInt(values.defbouclier) * parseInt(values.defbouclieron);
|
||
if (!isNaN(bonus)) attrs.pnj_def += bonus;
|
||
bonus = parseInt(values.DEFDIV);
|
||
if (!isNaN(bonus)) attrs.pnj_def += bonus;
|
||
bonus = parseInt(values.INIT_DIV);
|
||
if (!isNaN(bonus)) attrs.pnj_init += bonus;
|
||
attrs.pnj_for_sup = car_sup_from_pj_to_pnj(values.for_sup);
|
||
attrs.pnj_dex_sup = car_sup_from_pj_to_pnj(values.dex_sup);
|
||
attrs.pnj_con_sup = car_sup_from_pj_to_pnj(values.con_sup);
|
||
attrs.pnj_int_sup = car_sup_from_pj_to_pnj(values.int_sup);
|
||
attrs.pnj_sag_sup = car_sup_from_pj_to_pnj(values.sag_sup);
|
||
attrs.pnj_cha_sup = car_sup_from_pj_to_pnj(values.cha_sup);
|
||
if (values.pnj_default_jets_caches == "true") {
|
||
attrs.pnj_jets_caches = '/w gm ';
|
||
attrs.jets_caches = '/w gm ';
|
||
} else {
|
||
attrs.pnj_jets_caches = values.jets_caches;
|
||
}
|
||
setAttrs(attrs);
|
||
});
|
||
//Copie des attaques
|
||
getLabels('repeating_pnjatk', function(pnjLabels) {
|
||
getSectionIDs('repeating_armes', function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
const prefix = 'repeating_armes_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armenom', prefix + 'armeatk', prefix + 'armeatkdiv', prefix + 'armecrit', prefix + 'armedmnbde', prefix + 'armedmde', prefix + 'armedmcar', prefix + 'armedmdiv', prefix + 'armeportee', prefix + 'armespec', prefix + 'armeoptflag', 'niveau', 'force', 'dexterite', 'constitution', 'intelligence', 'sagesse', 'charisme', 'ATKCAC_CARAC', 'ATKCAC_DIV', 'ATKTIR_CARAC', 'ATKTIR_DIV', 'ATKMAG_CARAC', 'ATKMAG_DIV'], function(values) {
|
||
const label = values[prefix + 'armelabel'];
|
||
if (!pnjLabels[label]) {
|
||
let attrs = {};
|
||
let pnjPref = 'repeating_pnjatk_' + generateRowID() + '_';
|
||
attrs[pnjPref + 'armelabel'] = label;
|
||
attrs[pnjPref + 'armenom'] = values[prefix + 'armenom'];
|
||
attrs[pnjPref + 'armeoptflag'] = values[prefix + 'armeoptflag'];
|
||
let atk = parseInt(values.niveau);
|
||
if (isNaN(atk)) return;
|
||
let typeAtk;
|
||
switch (values[prefix + 'armeatk']) {
|
||
case '@{ATKCAC}':
|
||
typeAtk = 'ATKCAC';
|
||
break;
|
||
case '@{ATKTIR}':
|
||
typeAtk = 'ATKTIR';
|
||
break;
|
||
case '@{ATKMAG}':
|
||
typeAtk = 'ATKMAG';
|
||
break;
|
||
default:
|
||
return;
|
||
}
|
||
var caracAtk;
|
||
switch (values[typeAtk + '_CARAC']) {
|
||
case '@{FOR}':
|
||
caracAtk = 'force';
|
||
break;
|
||
case '@{DEX}':
|
||
caracAtk = 'dexterite';
|
||
break;
|
||
case '@{CON}':
|
||
caracAtk = 'constitution';
|
||
break;
|
||
case '@{INT}':
|
||
caracAtk = 'intelligence';
|
||
break;
|
||
case '@{SAG}':
|
||
caracAtk = 'sagesse';
|
||
break;
|
||
case '@{CHA}':
|
||
caracAtk = 'charisme';
|
||
break;
|
||
default:
|
||
return;
|
||
}
|
||
caracAtk = parseInt(values[caracAtk]);
|
||
if (isNaN(caracAtk)) return;
|
||
atk += Math.floor((caracAtk - 10) / 2);
|
||
var div = parseInt(values[typeAtk + '_DIV']);
|
||
if (!isNaN(div)) atk += div;
|
||
div = parseInt(values[prefix + 'armeatkdiv']);
|
||
if (!isNaN(div)) atk += div;
|
||
attrs[pnjPref + 'armeatk'] = atk;
|
||
attrs[pnjPref + 'armecrit'] = values[prefix + 'armecrit'];
|
||
attrs[pnjPref + 'armedmnbde'] = values[prefix + 'armedmnbde'];
|
||
attrs[pnjPref + 'armedmde'] = values[prefix + 'armedmde'];
|
||
var dm = parseInt(values[prefix + 'armedmdiv']);
|
||
if (isNaN(dm)) dm = 0;
|
||
switch (values[prefix + 'armedmcar']) {
|
||
case '@{FOR}':
|
||
caracAtk = 'force';
|
||
break;
|
||
case '@{DEX}':
|
||
caracAtk = 'dexterite';
|
||
break;
|
||
case '@{CON}':
|
||
caracAtk = 'constitution';
|
||
break;
|
||
case '@{INT}':
|
||
caracAtk = 'intelligence';
|
||
break;
|
||
case '@{SAG}':
|
||
caracAtk = 'sagesse';
|
||
break;
|
||
case '@{CHA}':
|
||
caracAtk = 'charisme';
|
||
break;
|
||
default:
|
||
caracAtk = 0;
|
||
}
|
||
if (caracAtk) {
|
||
caracAtk = parseInt(values[caracAtk]);
|
||
if (!isNaN(caracAtk)) dm += Math.floor((caracAtk - 10) / 2);
|
||
}
|
||
attrs[pnjPref + 'armedm'] = dm;
|
||
attrs[pnjPref + 'armeportee'] = values[prefix + 'armeportee'];
|
||
attrs[pnjPref + 'armespec'] = values[prefix + 'armespec'];
|
||
setAttrs(attrs);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
});
|
||
} else {
|
||
//On passe de PNJ à PJ
|
||
getAttrs(['option_ba_niveau', 'niveau'], function(values) {
|
||
let attrsPJ = {
|
||
tab: 'caracteristiques'
|
||
};
|
||
if (values.option_ba_niveau == '1') {
|
||
attrsPJ.atkcac_base = values.niveau;
|
||
attrsPJ.atktir_base = values.niveau;
|
||
attrsPJ.atkmag_base = values.niveau;
|
||
}
|
||
setAttrs(attrsPJ);
|
||
});
|
||
}
|
||
});
|
||
|
||
//Conversion PNJ vers PJ
|
||
on('change:pnj_for', function(eventinfo) {
|
||
getAttrs(['for_bonus', 'pnj_for'], function(values) {
|
||
var bonus_carac = parseInt(values.pnj_for);
|
||
if (isNaN(bonus_carac)) return;
|
||
var pre_bonus = parseInt(values.for_bonus);
|
||
if (!isNaN(pre_bonus)) bonus_carac -= pre_bonus;
|
||
setAttrs({
|
||
force: 10 + 2 * bonus_carac,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_dex', function(eventinfo) {
|
||
getAttrs(['dex_bonus', "pnj_dex", "INIT_DIV", "defarmure", "defarmureon", "defbouclier", "defbouclieron", "pnj_init", "pnj_def"], function(values) {
|
||
let bonus_carac = parseInt(values.pnj_dex);
|
||
if (isNaN(bonus_carac)) return;
|
||
let pre_bonus = parseInt(values.dex_bonus);
|
||
if (!isNaN(pre_bonus)) bonus_carac -= pre_bonus;
|
||
let carac = 10 + 2 * bonus_carac;
|
||
//update INIT_DIV so that init does not change
|
||
let init = parseInt(values.pnj_init);
|
||
if (!isNaN(init)) {
|
||
if (init % 2 == 1) carac++;
|
||
setAttrs({
|
||
INIT_DIV: init - carac
|
||
});
|
||
}
|
||
//update DEFDIV so that DEF does not change
|
||
let def = parseInt(values.pnj_def);
|
||
if (!isNaN(def)) {
|
||
let defense = 10;
|
||
let bonus = parseInt(values.defarmure) * parseInt(values.defarmureon);
|
||
if (!isNaN(bonus)) defense += bonus;
|
||
bonus = parseInt(values.defbouclier) * parseInt(values.defbouclieron);
|
||
if (!isNaN(bonus)) defense += bonus;
|
||
bonus = Math.floor((parseInt(values.dexterite) - 10) / 2);
|
||
if (!isNaN(bonus)) defense += bonus;
|
||
setAttrs({
|
||
DEFDIV: def - defense
|
||
});
|
||
}
|
||
setAttrs({
|
||
dexterite: carac,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_con', function(eventinfo) {
|
||
getAttrs(['con_bonus', 'pnj_con'], function(values) {
|
||
var bonus_carac = parseInt(values.pnj_con);
|
||
if (isNaN(bonus_carac)) return;
|
||
var pre_bonus = parseInt(values.con_bonus);
|
||
if (!isNaN(pre_bonus)) bonus_carac -= pre_bonus;
|
||
setAttrs({
|
||
constitution: 10 + 2 * bonus_carac,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_int', function(eventinfo) {
|
||
getAttrs(['int_bonus', 'pnj_int'], function(values) {
|
||
var bonus_carac = parseInt(values.pnj_int);
|
||
if (isNaN(bonus_carac)) return;
|
||
var pre_bonus = parseInt(values.int_bonus);
|
||
if (!isNaN(pre_bonus)) bonus_carac -= pre_bonus;
|
||
setAttrs({
|
||
intelligence: 10 + 2 * bonus_carac,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_sag', function(eventinfo) {
|
||
getAttrs(['sag_bonus', 'pnj_sag'], function(values) {
|
||
var bonus_carac = parseInt(values.pnj_sag);
|
||
if (isNaN(bonus_carac)) return;
|
||
var pre_bonus = parseInt(values.sag_bonus);
|
||
if (!isNaN(pre_bonus)) bonus_carac -= pre_bonus;
|
||
setAttrs({
|
||
sagesse: 10 + 2 * bonus_carac,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_cha', function(eventinfo) {
|
||
getAttrs(['cha_bonus', 'pnj_cha'], function(values) {
|
||
var bonus_carac = parseInt(values.pnj_cha);
|
||
if (isNaN(bonus_carac)) return;
|
||
var pre_bonus = parseInt(values.cha_bonus);
|
||
if (!isNaN(pre_bonus)) bonus_carac -= pre_bonus;
|
||
setAttrs({
|
||
charisme: 10 + 2 * bonus_carac,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_def', function(eventinfo) {
|
||
getAttrs(["defarmure", "defarmureon", "defbouclier", "defbouclieron", "dexterite", "pnj_def"], function(values) {
|
||
var new_def = parseInt(values.pnj_def);
|
||
if (isNaN(new_def)) {
|
||
console.log("DEF pnj non définie");
|
||
return;
|
||
}
|
||
var defense = 10;
|
||
var bonus = parseInt(values.defarmure) * parseInt(values.defarmureon);
|
||
if (!isNaN(bonus)) defense += bonus;
|
||
bonus = parseInt(values.defbouclier) * parseInt(values.defbouclieron);
|
||
if (!isNaN(bonus)) defense += bonus;
|
||
bonus = Math.floor((parseInt(values.dexterite) - 10) / 2);
|
||
if (!isNaN(bonus)) defense += bonus;
|
||
setAttrs({
|
||
DEFDIV: new_def - defense,
|
||
defense_si_attaque_risquee: new_def - 4,
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_init', function(eventinfo) {
|
||
getAttrs(["dexterite", "pnj_init"], function(values) {
|
||
var new_init = parseInt(values.pnj_init);
|
||
if (isNaN(new_init)) {
|
||
console.log("Initiative de PNJ incorrecte");
|
||
return;
|
||
}
|
||
var dex = parseInt(values.dexterite);
|
||
if (isNaN(dex)) {
|
||
setAttrs({
|
||
dexterite: new_init,
|
||
INIT_DIV: 0
|
||
});
|
||
return;
|
||
}
|
||
if (dex % 2 == 1) {
|
||
if (new_init % 2 === 0) {
|
||
dex--;
|
||
setAttrs({
|
||
dexterite: dex
|
||
});
|
||
}
|
||
} else if (new_init % 2 == 1) {
|
||
dex++;
|
||
setAttrs({
|
||
dexterite: dex
|
||
});
|
||
}
|
||
setAttrs({
|
||
INIT_DIV: new_init - dex
|
||
});
|
||
});
|
||
});
|
||
on('change:pnj_for_sup', function(eventinfo) {
|
||
if (eventinfo.newValue == 'on') {
|
||
getAttrs(["for_sup"], function(values) {
|
||
if (values.for_sup && values.for_sup.startsWith('@{jetsup')) return;
|
||
setAttrs({
|
||
for_sup: '@{jetsup}'
|
||
});
|
||
});
|
||
} else {
|
||
setAttrs({
|
||
for_sup: '@{jetnormal}'
|
||
});
|
||
}
|
||
});
|
||
on('change:pnj_dex_sup', function(eventinfo) {
|
||
if (eventinfo.newValue == 'on') {
|
||
getAttrs(["dex_sup"], function(values) {
|
||
if (values.dex_sup && values.dex_sup.startsWith('@{jetsup')) return;
|
||
setAttrs({
|
||
dex_sup: '@{jetsup}'
|
||
});
|
||
});
|
||
} else {
|
||
setAttrs({
|
||
dex_sup: '@{jetnormal}'
|
||
});
|
||
}
|
||
});
|
||
on('change:pnj_con_sup', function(eventinfo) {
|
||
if (eventinfo.newValue == 'on') {
|
||
getAttrs(["con_sup"], function(values) {
|
||
if (values.con_sup && values.con_sup.startsWith('@{jetsup')) return;
|
||
setAttrs({
|
||
con_sup: '@{jetsup}'
|
||
});
|
||
});
|
||
} else {
|
||
setAttrs({
|
||
con_sup: '@{jetnormal}'
|
||
});
|
||
}
|
||
});
|
||
on('change:pnj_int_sup', function(eventinfo) {
|
||
if (eventinfo.newValue == 'on') {
|
||
getAttrs(["int_sup"], function(values) {
|
||
if (values.int_sup && values.int_sup.startsWith('@{jetsup')) return;
|
||
setAttrs({
|
||
int_sup: '@{jetsup}'
|
||
});
|
||
});
|
||
} else {
|
||
setAttrs({
|
||
int_sup: '@{jetnormal}'
|
||
});
|
||
}
|
||
});
|
||
on('change:pnj_sag_sup', function(eventinfo) {
|
||
if (eventinfo.newValue == 'on') {
|
||
getAttrs(["sag_sup"], function(values) {
|
||
if (values.sag_sup && values.sag_sup.startsWith('@{jetsup')) return;
|
||
setAttrs({
|
||
sag_sup: '@{jetsup}'
|
||
});
|
||
});
|
||
} else {
|
||
setAttrs({
|
||
sag_sup: '@{jetnormal}'
|
||
});
|
||
}
|
||
});
|
||
on('change:pnj_cha_sup', function(eventinfo) {
|
||
if (eventinfo.newValue == 'on') {
|
||
getAttrs(["cha_sup"], function(values) {
|
||
if (values.cha_sup && values.cha_sup.startsWith('@{jetsup')) return;
|
||
setAttrs({
|
||
cha_sup: '@{jetsup}'
|
||
});
|
||
});
|
||
} else {
|
||
setAttrs({
|
||
cha_sup: '@{jetnormal}'
|
||
});
|
||
}
|
||
});
|
||
on('change:pnj_jets_caches', function(eventinfo) {
|
||
getAttrs(["pnj_jets_caches"], function(values) {
|
||
setAttrs({
|
||
jets_caches: values.pnj_jets_caches
|
||
});
|
||
});
|
||
});
|
||
|
||
//Mise à jour des stats dérivées
|
||
//cascade
|
||
function calculeMod(carac, mod) {
|
||
on('change:' + carac, function(eventinfo) {
|
||
getAttrs([carac, mod], function(values) {
|
||
let m = Math.floor((parseInt(values[carac]) - 10) / 2);
|
||
if (m != parseInt(values[mod])) {
|
||
let sa = {};
|
||
sa[mod] = m;
|
||
setAttrs(sa);
|
||
}
|
||
});
|
||
});
|
||
}
|
||
|
||
calculeMod('force', 'FOR');
|
||
calculeMod('dexterite', 'DEX');
|
||
calculeMod('constitution', 'CON');
|
||
calculeMod('intelligence', 'INT');
|
||
calculeMod('sagesse', 'SAG');
|
||
calculeMod('charisme', 'CHA');
|
||
|
||
on('change:CHA change:option_pc change:pc_bonus change:famille', function(eventinfo) {
|
||
getAttrs(['CHA', 'option_pc', 'pc_bonus', 'pc_base', 'pc', 'pc_max', 'option_setting', 'famille'], function(values) {
|
||
let toSet = {};
|
||
let change;
|
||
let option_pc = values.option_pc;
|
||
let mod = toInt(values.CHA, 0);
|
||
if (option_pc == 1 || option_pc == 'on') {
|
||
let pc_bonus = parseInt(values.pc_bonus);
|
||
let pc_base = 3 + mod;
|
||
if (values.option_setting == 'arran') {
|
||
if (values.famille == 'aventurier') pc_base += 1;
|
||
else pc_base -= 1;
|
||
}
|
||
if (pc_base != values.pc_base) {
|
||
toSet.pc_base = pc_base;
|
||
change = true;
|
||
}
|
||
let new_pc_max = pc_base;
|
||
if (isNaN(pc_bonus)) new_pc_max = pc_base;
|
||
else new_pc_max = pc_base + pc_bonus;
|
||
if (new_pc_max < 0) new_pc_max = 0;
|
||
let pc_max = parseInt(values.pc_max);
|
||
if (new_pc_max != pc_max) {
|
||
toSet.pc_max = new_pc_max;
|
||
let pc = parseInt(values.pc);
|
||
if (isNaN(pc) || pc < 0 || isNaN(pc_max)) toSet.pc = new_pc_max;
|
||
else {
|
||
pc += new_pc_max - pc_max;
|
||
if (pc < 0) toSet.pc = 0;
|
||
else if (pc > new_pc_max) toSet.pc = new_pc_max;
|
||
else toSet.pc = pc;
|
||
}
|
||
change = true;
|
||
}
|
||
}
|
||
if (change) setAttrs(toSet);
|
||
});
|
||
});
|
||
|
||
//Mise à jour de la mana
|
||
//ne cascade pas
|
||
on('change:SAG change:option_pm change:niveau change:famille', function(eventinfo) {
|
||
getAttrs(['SAG', 'option_pm', 'niveau', 'pm', 'pm_max', 'option_setting', 'famille'], function(values) {
|
||
if (values.option_setting != 'arran') return;
|
||
let toSet = {};
|
||
let set;
|
||
let mod = toInt(values.SAG, 0);
|
||
let option_pm = values.option_pm;
|
||
if (option_pm == 1 || option_pm == 'on') {
|
||
let niveau = toInt(values.niveau, 1, 0);
|
||
let new_pm_max = niveau + mod;
|
||
if (values.famille == 'mystique') new_pm_max *= 2;
|
||
let pm_max = parseInt(values.pm_max);
|
||
if (new_pm_max != pm_max) {
|
||
toSet.pm_max = new_pm_max;
|
||
let pm = parseInt(values.pm);
|
||
if (isNaN(pm) || pm < 0 || isNaN(pm_max)) toSet.pm = new_pm_max;
|
||
else {
|
||
pm += new_pm_max - pm_max;
|
||
if (pm < 0) toSet.pm = 0;
|
||
else if (pm > new_pm_max) toSet.pm = new_pm_max;
|
||
else toSet.pm = pm;
|
||
}
|
||
setAttrs(toSet);
|
||
}
|
||
} else {
|
||
if (set) setAttrs(toSet, {
|
||
silent: true
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
//Importation de statblocks
|
||
const statsReconnues = {
|
||
for: 'pnj_for',
|
||
dex: 'pnj_dex',
|
||
con: 'pnj_con',
|
||
int: 'pnj_int',
|
||
sag: 'pnj_sag',
|
||
per: 'pnj_sag',
|
||
cha: 'pnj_cha',
|
||
creature: 'profil',
|
||
nc: 'niveau',
|
||
niveau: 'niveau',
|
||
taille: 'taille',
|
||
profil: 'profil',
|
||
init: 'pnj_init',
|
||
def: 'pnj_def',
|
||
pv: 'PV_max',
|
||
rd: 'RDS',
|
||
};
|
||
|
||
function buildRegexp(obj) {
|
||
let res = "\\b(";
|
||
let premier = true;
|
||
for (const field in obj) {
|
||
if (premier) {
|
||
res += field;
|
||
premier = false;
|
||
} else {
|
||
res += "|" + field;
|
||
}
|
||
}
|
||
res += "|créature)\\b"; //pour la version accentuée
|
||
return new RegExp(res, 'gi');
|
||
}
|
||
|
||
const patternStats = buildRegexp(statsReconnues);
|
||
|
||
const listeArmes = [{
|
||
keys: ['épée', 'epee', 'epée', 'sabre', 'cimeterre', 'cimetère'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'tranchant',
|
||
modificateurs: 'metal'
|
||
}, {
|
||
keys: ['fleau', 'fléau'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'contondant',
|
||
modificateurs: 'metal',
|
||
options: '--bonusContreBouclier 2',
|
||
}, {
|
||
keys: ['hache'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'tranchant',
|
||
modificateurs: 'hache metal'
|
||
}, {
|
||
keys: ['katana', 'vivelame'],
|
||
typeattaque: 'Arme 2 mains',
|
||
typedegats: 'tranchant',
|
||
modificateurs: 'metal'
|
||
}, {
|
||
keys: ['epieu', 'épieu'],
|
||
typeattaque: 'Arme 2 mains',
|
||
typedegats: 'percant',
|
||
modificateurs: 'epieu'
|
||
}, {
|
||
keys: ['bâton', 'baton'],
|
||
typeattaque: 'Arme 2 mains',
|
||
typedegats: 'contondant',
|
||
modificateurs: 'choc'
|
||
}, {
|
||
keys: ['gourdin'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'contondant',
|
||
modificateurs: 'choc'
|
||
}, {
|
||
keys: ['dague', 'rapière', 'rapiere', 'stylet'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'percant',
|
||
modificateurs: 'metal'
|
||
}, {
|
||
keys: ['mousquet'],
|
||
typeattaque: 'Arme 2 main',
|
||
typedegats: 'percant',
|
||
modificateurs: 'poudre metal'
|
||
}, {
|
||
keys: ['pétoire', 'petoire'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'percant',
|
||
modificateurs: 'poudre metal'
|
||
}, {
|
||
keys: ['arc', 'arbalète', 'arbalete'],
|
||
typeattaque: 'Arme 2 mains',
|
||
typedegats: 'percant',
|
||
modificateurs: ''
|
||
}, {
|
||
keys: ['masse', 'massue', 'fronde'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'contondant',
|
||
modificateurs: ''
|
||
}, {
|
||
keys: ['marteau'],
|
||
typeattaque: 'Arme 1 main',
|
||
typedegats: 'contondant',
|
||
modificateurs: 'marteau metal'
|
||
}, {
|
||
keys: ['javelot'],
|
||
typeattaque: 'Arme de jet',
|
||
typedegats: 'percant',
|
||
modificateurs: ''
|
||
}, {
|
||
keys: ['hachette'],
|
||
typeattaque: 'Arme de jet',
|
||
typedegats: 'tranchant metal',
|
||
modificateurs: 'metal'
|
||
}, {
|
||
keys: ['lance', 'trident'],
|
||
typeattaque: 'Arme 2 mains',
|
||
typedegats: 'percant metal',
|
||
modificateurs: ''
|
||
}];
|
||
|
||
function keyListToMap(l) {
|
||
let res = {};
|
||
l.forEach(function(s) {
|
||
s.keys.forEach(function(k) {
|
||
res[k] = s;
|
||
});
|
||
if (s.variantes) {
|
||
s.variantes = keyListToMap(s.variantes);
|
||
}
|
||
});
|
||
return res;
|
||
}
|
||
|
||
const mapArmes = keyListToMap(listeArmes);
|
||
|
||
//values doit contenir au moins:
|
||
// - scriptVersion
|
||
// - scriptVersion_max
|
||
function guessAttackType(nomAttaque, prefix, newAttrs, values) {
|
||
let typeAttaque = 'Naturel';
|
||
let na = nomAttaque.toLowerCase();
|
||
na.split(' ').forEach(function(mot) {
|
||
mot = mot.trim();
|
||
if (mot === '') return;
|
||
let s = mapArmes[mot];
|
||
if (s && s.typeattaque) {
|
||
newAttrs[prefix + 'typeattaque'] = s.typeattaque;
|
||
switch (s.typeattaque) {
|
||
case 'Arme de jet':
|
||
newAttrs[prefix + 'jet'] = 'on';
|
||
break;
|
||
case 'Arme 1 main':
|
||
case 'Arme 2 mains':
|
||
case 'Arme gauche':
|
||
newAttrs[prefix + 'portable'] = 'on';
|
||
break;
|
||
}
|
||
typeAttaque = s.typeattaque;
|
||
newAttrs[prefix + 'modificateurs'] = s.modificateurs;
|
||
if (s.options) newAttrs[prefix + 'options'] = s.options;
|
||
newAttrs[prefix + 'typedegats'] = s.typedegats;
|
||
}
|
||
});
|
||
if (na.includes('2 mains') || na.includes('deux mains')) {
|
||
newAttrs[prefix + 'typeattaque'] = 'Arme 2 mains';
|
||
typeAttaque = 'Arme 2 mains';
|
||
} else if (na.includes('attaque magique')) {
|
||
newAttrs[prefix + 'typeattaque'] = 'Sortilège';
|
||
typeAttaque = 'Sortilège';
|
||
}
|
||
if (values.scriptVersion && values.scriptVersion !== '') {
|
||
newAttrs[prefix + 'optflag'] = 'on';
|
||
}
|
||
}
|
||
|
||
//parse les expressions du type 3d6+4
|
||
//renvoie un structure avec les champs nbDe, dice et bonus
|
||
function parseDice(expr, msg) {
|
||
let dm = {
|
||
nbDe: 0,
|
||
dice: 4,
|
||
bonus: 0
|
||
};
|
||
let exprDM = expr.trim().toLowerCase();
|
||
let indexD = exprDM.indexOf('d');
|
||
if (indexD > 0) {
|
||
dm.nbDe = parseInt(exprDM.substring(0, indexD));
|
||
if (isNaN(dm.nbDe) || dm.nbDe < 0) {
|
||
if (msg)
|
||
console.log("Expression de " + msg + ' ' + exprDM + " mal formée");
|
||
console.log(expr);
|
||
return;
|
||
}
|
||
exprDM = exprDM.substring(indexD + 1);
|
||
indexD = exprDM.search(/[+\-]/);
|
||
if (indexD <= 0) {
|
||
dm.dice = parseInt(exprDM);
|
||
if (isNaN(dm.dice) || dm.dice < 1) {
|
||
if (msg)
|
||
console.log("Nombre de faces incorrect dans l'expression de " + msg);
|
||
console.log(expr);
|
||
return;
|
||
}
|
||
return dm;
|
||
}
|
||
exprDM = exprDM.replace('+-', '-');
|
||
dm.dice = parseInt(exprDM.substring(0, indexD));
|
||
if (isNaN(dm.dice) || dm.dice < 1) {
|
||
if (msg)
|
||
console.log("Nombre de faces incorrect dans l'expression de " + msg);
|
||
console.log(expr);
|
||
return;
|
||
}
|
||
exprDM = exprDM.substring(indexD).trim();
|
||
}
|
||
dm.bonus = parseInt(exprDM);
|
||
if (isNaN(dm.bonus)) {
|
||
if (msg)
|
||
console.log("Expression de " + msg + " incorrecte");
|
||
console.log(expr);
|
||
return;
|
||
}
|
||
return dm;
|
||
}
|
||
|
||
const voiesDeCreatures = {
|
||
72: {
|
||
nom: 'Voie du tueur',
|
||
1: {
|
||
predicats: 'discretion:5 ',
|
||
actions: [{
|
||
titre: 'Attaque mortelle (L)',
|
||
code: '#Attaque -1 --bonusAttaque 5 --sournoise 2'
|
||
}]
|
||
},
|
||
2: {
|
||
actions: [{
|
||
titre: 'Attaque mortelle (remplace le rang 1)',
|
||
code: '#Attaque -1 --bonusAttaque 5 --sournoise 4'
|
||
}, {
|
||
titre: 'Disparition',
|
||
code: '#Attaque -1 --disparition 4'
|
||
}]
|
||
},
|
||
3: {
|
||
actions: [{
|
||
titre: 'Attaque mortelle (remplace le rang 2)',
|
||
code: '#Attaque -1 --bonusAttaque 5 --sournoise 6 --if etatCible surpris --etat mort --save CON 15 --endif'
|
||
}, {
|
||
titre: 'Disparition',
|
||
code: '#Attaque -1 --disparition 6 --if etatCible surpris --etat mort --save CON 15 --endif'
|
||
}]
|
||
}
|
||
},
|
||
82: {
|
||
nom: 'Voie du prédateur',
|
||
1: {
|
||
actions: [{
|
||
titre: 'Embuscade des joueurs',
|
||
code: "!cof-surprise [[15+@{selected|DEX}]] --equipe joueurs"
|
||
}, {
|
||
titre: 'Attaque cible surprise',
|
||
code: "#Attaque -1 --sournoise 1 --if moins FOR --etat renverse --endif"
|
||
}, ],
|
||
},
|
||
2: {
|
||
predicats: 'devorer ',
|
||
},
|
||
3: {
|
||
predicats: 'gober ',
|
||
},
|
||
},
|
||
83: {
|
||
nom: 'Voie du PNJ récurrent',
|
||
1: {
|
||
predicats: 'instinctDeSurvie '
|
||
},
|
||
2: {
|
||
predicats: 'chairACanon '
|
||
},
|
||
},
|
||
84: {
|
||
nom: 'Voie de la meute',
|
||
1: {
|
||
predicats: 'interchangeable ',
|
||
},
|
||
2: {
|
||
actions: [{
|
||
titre: 'Attaque en traître',
|
||
code: '#Attaque -1 --sournoise 2 --bonusAttaque 5'
|
||
}]
|
||
},
|
||
},
|
||
85: {
|
||
nom: 'Voie de la magie maléfique',
|
||
},
|
||
87: {
|
||
nom: 'Voie de la magie de combat',
|
||
2: {
|
||
actions: [{
|
||
titre: 'Armure magique',
|
||
code: '!cof-effet-combat armureMagique'
|
||
}]
|
||
},
|
||
},
|
||
88: {
|
||
nom: 'Voie des créatures volantes',
|
||
1: {
|
||
actions: [{
|
||
titre: 'Attaque en piqué',
|
||
code: '#Attaque -1 --bonusAttaque 5 --plus 1d6',
|
||
}],
|
||
2: {
|
||
predicats: 'agripper ',
|
||
},
|
||
},
|
||
},
|
||
89: {
|
||
nom: 'Voie des créatures magiques',
|
||
},
|
||
91: {
|
||
nom: 'Voie du colosse',
|
||
1: {
|
||
predicats: 'fauchage '
|
||
},
|
||
2: {
|
||
actions: [{
|
||
titre: 'Balayage',
|
||
code: '#Attaque -1 --target @{target|Cible 2|token_id}'
|
||
}]
|
||
},
|
||
3: {
|
||
predicats: 'projection '
|
||
}
|
||
},
|
||
92: {
|
||
nom: 'Voie du cogneur',
|
||
1: {
|
||
actions: [{
|
||
titre: 'Charge',
|
||
code: '#Attaque -1 --m2d20 --pietine'
|
||
}],
|
||
},
|
||
2: {
|
||
predicats: 'peutEnrager '
|
||
},
|
||
3: {
|
||
actions: [{
|
||
titre: 'Charge (remplace le rang 1)',
|
||
code: '#Attaque -1 --m2d20 --percute'
|
||
}],
|
||
}
|
||
},
|
||
93: {
|
||
nom: 'Voie du champion',
|
||
1: {
|
||
actions: [{
|
||
titre: 'Attaque imparable (L)',
|
||
code: '#Attaque -1 --m2d20'
|
||
}],
|
||
predicats: 'champion ',
|
||
},
|
||
2: {
|
||
predicats: 'riposte ',
|
||
},
|
||
3: {
|
||
predicats: 'hausserLeTon ',
|
||
},
|
||
},
|
||
94: {
|
||
nom: "Voie du chef d'armée",
|
||
1: {
|
||
predicats: 'sergent ',
|
||
},
|
||
2: {
|
||
actions: [{
|
||
titre: 'Devenir capitaine de',
|
||
code: '!cof-capitaine @{selected|token_id} 2 --target @{target|token_id}',
|
||
}],
|
||
},
|
||
3: {
|
||
actions: [{
|
||
titre: 'Devenir commandant de',
|
||
code: '!cof-capitaine @{selected|token_id} 3 --target @{target|token_id}',
|
||
}],
|
||
predicats: 'commandant ',
|
||
},
|
||
},
|
||
};
|
||
|
||
//Les champs JSON qui peuvent être directement transcrits
|
||
const statsJSON = {
|
||
str_mod: 'pnj_for',
|
||
dex_mod: 'pnj_dex',
|
||
con_mod: 'pnj_con',
|
||
int_mod: 'pnj_int',
|
||
wis_mod: 'pnj_sag',
|
||
cha_mod: 'pnj_cha',
|
||
creature_family: 'race',
|
||
profile: 'profil',
|
||
level: 'niveau',
|
||
size: 'taille',
|
||
profil: 'profil',
|
||
init: 'pnj_init',
|
||
defense: 'pnj_def',
|
||
health_point: 'PV_max',
|
||
dmg_reduction: 'RDS',
|
||
name: 'character_name',
|
||
archetype: 'archetype',
|
||
boss_rank: 'boss_rank',
|
||
boss_type: 'boss_type',
|
||
description: 'notes',
|
||
special_capabilities: 'capacites_pnj',
|
||
};
|
||
|
||
function htmlToText(msg) {
|
||
msg = msg.replace(/<p>|<strong>|<\/strong>|<em>|<\/em>|<br \/>/g, '');
|
||
msg = msg.replace(/<\/p>/g, '\n');
|
||
return msg;
|
||
}
|
||
|
||
function readJSONStats(stats, maxAttack, values) {
|
||
console.log("Lecture d'un json des stats");
|
||
console.log(stats);
|
||
let se = {};
|
||
for (const f in statsJSON) {
|
||
if (stats[f] && stats[f].length > 0) {
|
||
let val = stats[f][0].value;
|
||
if (stats[f][0].label) val = stats[f][0].label;
|
||
if (val) {
|
||
if (stats[f][0].format == 'simple_html' ||
|
||
stats[f][0].format == 'basic_html') val = htmlToText(val);
|
||
se[statsJSON[f]] = val;
|
||
}
|
||
}
|
||
}
|
||
if (stats.comments && stats.comments.length > 0 && stats.comments[0].value) {
|
||
if (se.notes) se.notes += '\n';
|
||
else se.notes = '';
|
||
se.notes += htmlToText(stats.comments[0].value);
|
||
}
|
||
if (stats.paths && stats.paths.length > 0) {
|
||
let voies = stats.paths[0].value;
|
||
if (voies) {
|
||
if (se.capacites_pnj) se.capacites_pnj += '\n';
|
||
else se.capacites_pnj = '';
|
||
se.capacites_pnj += htmlToText(voies);
|
||
}
|
||
}
|
||
let predicats = '';
|
||
if (values.predicats_script) predicats = values.predicats_script + ' ';
|
||
if (stats.category && stats.category.length > 0) {
|
||
switch (stats.category[0].value) {
|
||
case 'alive': //rien à faire
|
||
break;
|
||
case 'humanoid':
|
||
predicats += 'humanoide ';
|
||
break;
|
||
case 'vegetative':
|
||
predicats += 'vegetatif ';
|
||
break;
|
||
case 'non_living':
|
||
predicats += 'nonVivant ';
|
||
break;
|
||
default:
|
||
console.log("Catégorie " + stats.category[0].value + " non reconnue");
|
||
}
|
||
}
|
||
if (stats.sup_abilities) {
|
||
stats.sup_abilities.forEach(function(sab) {
|
||
se['pnj_' + sab.label.toLowerCase() + '_sup'] = 'on';
|
||
se[sab.label.toLowerCase() + '_sup'] = '@{jetsup}';
|
||
});
|
||
}
|
||
if (se.niveau) se.niveau = parseInt(se.niveau);
|
||
se.PV = se.PV_max;
|
||
if (se.RDS) {
|
||
se.RDS = se.RDS.replace(/Armes magiques/, 'magique');
|
||
se.RDS = se.RDS.replace(/magie/g, 'magique');
|
||
}
|
||
if (stats.attacks && stats.attacks.length > 0) {
|
||
let atd = stats.attacks[0].data;
|
||
if (atd) {
|
||
atd.forEach(function(att) {
|
||
let nomAttaque = '';
|
||
if (att.name) nomAttaque = att.name;
|
||
let nbDe = 0;
|
||
let de = 4;
|
||
let bonusDM = 0;
|
||
if (att.dm) {
|
||
let d = parseDice(att.dm, "dégâts de l'attaque");
|
||
if (d) {
|
||
nbDe = d.nbDe;
|
||
de = d.dice;
|
||
bonusDM = d.bonus;
|
||
}
|
||
}
|
||
let bonusAtt = parseInt(att.test);
|
||
if (isNaN(bonusAtt)) {
|
||
console.log("Bonus d'attaque incorrect");
|
||
console.log(att);
|
||
bonusAtt = '';
|
||
}
|
||
let portee = parseInt(att.reach);
|
||
if (isNaN(portee)) portee = 0;
|
||
if (portee) {
|
||
//on va essayer d'enlever les indications de portée du nom de l'attaque.
|
||
let index = nomAttaque.indexOf('(' + portee);
|
||
if (index > 0) {
|
||
let index2 = nomAttaque.indexOf(')', index);
|
||
if (index2 > 0) {
|
||
if (index2 < nomAttaque.length - 1) {
|
||
nomAttaque = nomAttaque.substring(0, index) + nomAttaque.substring(index2 + 1);
|
||
} else {
|
||
nomAttaque = nomAttaque.substring(0, index);
|
||
}
|
||
nomAttaque = nomAttaque.trim();
|
||
}
|
||
}
|
||
}
|
||
const prefix = 'repeating_pnjatk_' + generateRowID() + '_arme';
|
||
maxAttack++;
|
||
se[prefix + 'label'] = maxAttack;
|
||
se[prefix + 'nom'] = nomAttaque;
|
||
se[prefix + 'atk'] = bonusAtt;
|
||
se[prefix + 'dmnbde'] = nbDe;
|
||
se[prefix + 'dmde'] = de;
|
||
se[prefix + 'dm'] = bonusDM;
|
||
if (att.special) se[prefix + 'spec'] = att.special;
|
||
if (portee) se[prefix + 'portee'] = portee;
|
||
// On essaie de trouver des valeurs pour le type de l'attaque
|
||
guessAttackType(nomAttaque, prefix, se, values);
|
||
});
|
||
}
|
||
}
|
||
let maxRangAction = parseInt(values.maxrangaction);
|
||
if (isNaN(maxRangAction)) maxRangAction = 0;
|
||
const addAction = function(a) {
|
||
maxRangAction++;
|
||
const prefix = 'repeating_actions_' + generateRowID() + '_action';
|
||
se[prefix + 'rang'] = maxRangAction;
|
||
for (const champ in a) {
|
||
se[prefix + champ] = a[champ];
|
||
}
|
||
};
|
||
if (stats.structured_capabilities) {
|
||
for (const vid in stats.structured_capabilities) {
|
||
let sc = stats.structured_capabilities[vid];
|
||
switch (sc.type) {
|
||
case 'creature':
|
||
let v = voiesDeCreatures[vid];
|
||
if (v) {
|
||
for (const rang in sc.capabilities) {
|
||
if (rang == 'nom') continue;
|
||
let r = v[rang];
|
||
if (r) {
|
||
if (r.actions) {
|
||
r.actions.forEach(addAction);
|
||
}
|
||
if (r.predicats) {
|
||
predicats += r.predicats;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case 'character':
|
||
case 'prestige':
|
||
case 'race': //On ne sait pas encore faire
|
||
break;
|
||
default:
|
||
console.log("Voie non reconnue");
|
||
console.log(sc);
|
||
}
|
||
}
|
||
}
|
||
if (predicats) se.predicats_script = predicats;
|
||
if (maxAttack) se.max_attack_label = maxAttack;
|
||
if (maxRangAction) se.maxrangaction = maxRangAction;
|
||
setAttrs(se);
|
||
}
|
||
|
||
//Parsing des statblocks. Peut cascader
|
||
on('change:statblock', function(eventinfo) {
|
||
getAttrs(['max_attack_label', 'scriptVersion', 'scriptVersion_max', 'predicats_script', 'maxrangaction'], function(values) {
|
||
let maxAttack = parseInt(values.max_attack_label);
|
||
if (isNaN(maxAttack)) maxAttack = 0;
|
||
let stats = eventinfo.newValue;
|
||
if (stats === '' || stats === undefined) return;
|
||
if (stats.startsWith('{"name":')) {
|
||
let jstats;
|
||
try {
|
||
jstats = JSON.parse(stats);
|
||
} catch (e) {
|
||
console.log("Erreur de décodage JSON du stat block");
|
||
console.log(e);
|
||
jstats = undefined;
|
||
}
|
||
if (jstats) {
|
||
readJSONStats(jstats, maxAttack, values);
|
||
return;
|
||
}
|
||
}
|
||
stats = stats.replace(/\r/g, '');
|
||
//On enlève les caractères images des dernières versions de COF
|
||
stats = stats.replace(/\ue1e9/g, ''); //DEF
|
||
stats = stats.replace(/♥/g, ''); //PV
|
||
stats = stats.replace(/\ue0bf/g, ''); //Attaque
|
||
stats = stats.replace(/\, /g, ' ');
|
||
let rows = stats.split(/\n/);
|
||
let newAttrs = {};
|
||
let previousLine = ''; //Au cas d'attaque sur plusieurs lignes
|
||
let previousContainsDM = false;
|
||
let lastPrefix = ''; //Pour les suites d'attaque sur la ligne suivante
|
||
let firstLine = true; //si la première ligne ne correspond à rien, c'est le nom
|
||
rows.forEach(function(row) {
|
||
if (row === '') {
|
||
previousLine = '';
|
||
lastPrefix = '';
|
||
firstLine = false;
|
||
previousContainsDM = false;
|
||
return;
|
||
}
|
||
row = row.trim();
|
||
if (row.endsWith('DM')) {
|
||
previousLine += row + ' ';
|
||
previousContainsDM = true;
|
||
} else if (previousContainsDM || row.search(/\bDM\b/i) >= 0) { //Attaque
|
||
let currentRow = previousLine + row;
|
||
let nomAttaqueFin = currentRow.search(/\s(\+\d+|0\b|DM)/i);
|
||
let nomAttaque = currentRow.substring(0, nomAttaqueFin);
|
||
let portee =
|
||
/\(\d+\s*(m|mètre|mètres|metre|metres)\)/i.exec(nomAttaque);
|
||
if (portee) {
|
||
nomAttaque = nomAttaque.substring(0, portee.index).trim();
|
||
portee = parseInt(portee[0].substring(1));
|
||
if (isNaN(portee)) portee = 0;
|
||
}
|
||
currentRow = currentRow.substring(nomAttaqueFin).trim();
|
||
let bonusAtt = 0;
|
||
if (currentRow.startsWith('+')) {
|
||
currentRow = currentRow.substring(1);
|
||
bonusAtt = parseInt(currentRow);
|
||
if (isNaN(bonusAtt)) {
|
||
console.log("Sheet worker: bonus d'attaque incorrect " + row);
|
||
previousLine = '';
|
||
return;
|
||
}
|
||
currentRow = currentRow.substring(currentRow.search(/\D/));
|
||
} else if (currentRow.startsWith('0')) {
|
||
currentRow = currentRow.substring(1).trim();
|
||
}
|
||
let index = currentRow.search(/\bDM\b/i);
|
||
let specAtt = currentRow.substring(0, index).trim();
|
||
let specInAttackName = /\([^\)]*\)/i.exec(nomAttaque);
|
||
if (specInAttackName) {
|
||
nomAttaque = nomAttaque.substring(0, specInAttackName.index).trim();
|
||
specAtt += ' ' + specInAttackName[0].substring(1, specInAttackName[0].length - 1);
|
||
}
|
||
if (!portee) {
|
||
//parfois la portée n'est pas placée juste après le nom de l'attaque et se retrouve dans le champ spécial
|
||
portee = /\(\d+\s*m\)/i.exec(specAtt);
|
||
if (portee) {
|
||
specAtt = specAtt.substring(0, portee.index).trim();
|
||
portee = parseInt(portee[0].substring(1));
|
||
if (isNaN(portee)) portee = 0;
|
||
}
|
||
}
|
||
currentRow = currentRow.substring(index + 3).trim();
|
||
index = currentRow.search(/\s/);
|
||
if (index < 0) {
|
||
index = currentRow.length;
|
||
}
|
||
let nbDe = 0;
|
||
let de = 4;
|
||
let bonusDM = 0;
|
||
let dmExpr = currentRow.substring(0, index);
|
||
let indexDe = dmExpr.search(/d/i);
|
||
if (indexDe < 0) {
|
||
bonusDM = parseInt(dmExpr);
|
||
if (isNaN(bonusDM)) {
|
||
console.log("Impossible de trouver les DM dans " + row);
|
||
previousLine += row + ' ';
|
||
previousContainsDM = true;
|
||
return;
|
||
}
|
||
} else {
|
||
nbDe = parseInt(dmExpr.substring(0, indexDe));
|
||
dmExpr = dmExpr.substring(indexDe + 1);
|
||
de = parseInt(dmExpr);
|
||
if (isNaN(bonusDM) || isNaN(de)) {
|
||
console.log("Impossible de trouver les DM dans " + row);
|
||
previousLine += row + ' ';
|
||
previousContainsDM = true;
|
||
return;
|
||
}
|
||
let indexBonusDM = dmExpr.search(/(\+|-)/);
|
||
if (indexBonusDM >= 0) {
|
||
bonusDM = parseInt(dmExpr.substring(indexBonusDM));
|
||
if (isNaN(bonusDM)) {
|
||
bonusDM = 0;
|
||
}
|
||
} else if (index > 0 && index < currentRow.length - 1) {
|
||
currentRow = currentRow.substring(index).trim();
|
||
index = 0;
|
||
if (currentRow.startsWith('+') || currentRow.startsWith('-')) {
|
||
bonusDM = parseInt(currentRow);
|
||
if (isNaN(bonusDM)) {
|
||
bonusDM = 0;
|
||
} else index = currentRow.search(/\s/);
|
||
}
|
||
}
|
||
}
|
||
if (index >= 0 && index < currentRow.length - 1) {
|
||
specAtt += currentRow.substring(index).trim();
|
||
}
|
||
const prefix = 'repeating_pnjatk_' + generateRowID() + '_arme';
|
||
maxAttack++;
|
||
newAttrs[prefix + 'label'] = maxAttack;
|
||
newAttrs[prefix + 'nom'] = nomAttaque;
|
||
newAttrs[prefix + 'atk'] = bonusAtt;
|
||
newAttrs[prefix + 'dmnbde'] = nbDe;
|
||
newAttrs[prefix + 'dmde'] = de;
|
||
newAttrs[prefix + 'dm'] = bonusDM;
|
||
newAttrs[prefix + 'spec'] = specAtt;
|
||
if (portee) newAttrs[prefix + 'portee'] = portee;
|
||
// On essaie de trouver des valeurs pour le type de l'attaque
|
||
guessAttackType(nomAttaque, prefix, newAttrs, values);
|
||
lastPrefix = prefix;
|
||
previousContainsDM = false;
|
||
previousLine = '';
|
||
} else if (row.startsWith('+') && lastPrefix !== '') {
|
||
newAttrs[lastPrefix + 'spec'] += row;
|
||
} else { //Pas attaque
|
||
lastPrefix = '';
|
||
let lexemes = [];
|
||
let lastMatch;
|
||
let match = patternStats.exec(row);
|
||
while (match) {
|
||
if (lastMatch) {
|
||
lexemes.push({
|
||
match: lastMatch,
|
||
end: match.index
|
||
});
|
||
}
|
||
lastMatch = match;
|
||
match = patternStats.exec(row);
|
||
}
|
||
if (lastMatch) {
|
||
lexemes.push({
|
||
match: lastMatch,
|
||
end: row.length
|
||
});
|
||
}
|
||
if (lexemes.length === 0) {
|
||
if (firstLine) {
|
||
newAttrs.character_name = row;
|
||
} else {
|
||
console.log("La ligne " + row + " ne correspond à rien");
|
||
previousLine = row + ' ';
|
||
}
|
||
} else previousLine = '';
|
||
lexemes.forEach(function(l) {
|
||
let lstat = l.match[0].toLowerCase();
|
||
let lattr = statsReconnues[lstat];
|
||
if (lattr === undefined && lstat == 'créature') lattr = statsReconnues.creature;
|
||
if (lattr === undefined) {
|
||
console.log("Erreur ! Pattern " + lstat + " non reconne. La ligne était " + l);
|
||
return;
|
||
}
|
||
let valAttr = row.substring(l.match.index + lstat.length, l.end).trim();
|
||
valAttr = valAttr.replace(/\)$/, '');
|
||
if (lattr.search(/(for|dex|con|sag|int|cha)/) > 0) {
|
||
//Cas ou on rajoute une autre valeur pour la caractéristique
|
||
//par exemple pour le centaure
|
||
let caracParen = valAttr.search(/\([+-]\d/);
|
||
if (caracParen > 0) {
|
||
valAttr = valAttr.substring(0, caracParen - 1).trim();
|
||
}
|
||
if (valAttr.endsWith('*')) {
|
||
valAttr = valAttr.substr(0, valAttr.length - 1);
|
||
newAttrs[lattr + '_sup'] = 'on';
|
||
}
|
||
//cas où le statblock donne valeur/bonus
|
||
let caracSlash = valAttr.indexOf('/');
|
||
if (caracSlash > 0) {
|
||
var caracVal = parseInt(valAttr);
|
||
valAttr = parseInt(valAttr.substring(caracSlash + 1));
|
||
switch (lattr) {
|
||
case 'pnj_for':
|
||
newAttrs.force = caracVal;
|
||
break;
|
||
case 'pnj_dex':
|
||
newAttrs.dexterite = caracVal;
|
||
break;
|
||
case 'pnj_con':
|
||
newAttrs.constitution = caracVal;
|
||
break;
|
||
case 'pnj_int':
|
||
newAttrs.intelligence = caracVal;
|
||
break;
|
||
case 'pnj_sag':
|
||
newAttrs.sagesse = caracVal;
|
||
break;
|
||
case 'pnj_cha':
|
||
newAttrs.charisme = caracVal;
|
||
break;
|
||
}
|
||
} else {
|
||
valAttr = parseInt(valAttr);
|
||
}
|
||
} else if (lattr == 'PV_max') {
|
||
//On met aussi les pv courants à jour
|
||
var pvMax = parseInt(valAttr);
|
||
//Cas où on note entre parenhèse les PV courants ou la RD
|
||
var pvParen = valAttr.indexOf('(');
|
||
if (pvParen > 0) {
|
||
var pvSuite = valAttr.substring(pvParen + 1);
|
||
valAttr = valAttr.substring(0, pvParen).trim();
|
||
pvMax = parseInt(valAttr);
|
||
if (pvSuite.startsWith('RD')) {
|
||
newAttrs.RDS = parseInt(pvSuite.substring(2));
|
||
newAttrs.PV = pvMax;
|
||
} else {
|
||
var pvCourant = parseInt(pvSuite);
|
||
newAttrs.PV = pvCourant;
|
||
}
|
||
} else newAttrs.PV = pvMax;
|
||
}
|
||
newAttrs[lattr] = valAttr;
|
||
});
|
||
}
|
||
firstLine = false;
|
||
});
|
||
newAttrs.max_attack_label = maxAttack;
|
||
setAttrs(newAttrs);
|
||
});
|
||
});
|
||
|
||
//Importation depuis Chroniques mobiles
|
||
|
||
//modifie les champs de sa
|
||
function importeVoies(sa, voies) {
|
||
if (!voies) return;
|
||
voies.forEach(function(voie, n) {
|
||
let vn = 'voie' + (n + 1);
|
||
sa[vn + 'nom'] = voie.name;
|
||
voie.abilities.forEach(function(capacite, r) {
|
||
let vrt = 'v' + (n + 1) + 'r' + (r + 1) + 'titre';
|
||
if (typeof capacite == 'string') {
|
||
sa[vrt] = capacite;
|
||
} else {
|
||
sa[vrt] = capacite.name;
|
||
if (capacite.limitedUse) sa[vrt] += ' ' + capacite.limitedUse;
|
||
if (capacite.spell) sa[vrt] += capacite.spell;
|
||
sa[vn + '-' + (r + 1)] = capacite.description;
|
||
}
|
||
});
|
||
});
|
||
}
|
||
|
||
function removeRepeating(sectionName) {
|
||
getSectionIDs(sectionName, function(rowIds) {
|
||
rowIds.forEach(function(rowId) {
|
||
removeRepeatingRow(`repeating_${sectionName}_${rowId}`);
|
||
});
|
||
});
|
||
}
|
||
|
||
function toInt(v, def, low) {
|
||
let res = parseInt(v);
|
||
if (isNaN(v)) return def;
|
||
if (low !== undefined && res < low) return low;
|
||
return res;
|
||
}
|
||
|
||
let preventPopulate = false;
|
||
|
||
function importeEquipement(sa, equipement, reset, v) {
|
||
if (!equipement) return;
|
||
if (reset) {
|
||
removeRepeating('armes');
|
||
removeRepeating('equipement');
|
||
removeRepeating('armures');
|
||
}
|
||
let max_attack_label = 0;
|
||
if (!reset) max_attack_label = toInt(v.max_attack_label, 0, 0);
|
||
let max_armure_label = 0;
|
||
if (!reset) max_armure_label = toInt(v.max_armure_label, 0, 0);
|
||
let equip_div = '';
|
||
if (!reset) equip_div = v.equip_div;
|
||
let armure;
|
||
let arme;
|
||
let bouclier;
|
||
equipement.forEach(function(gear) {
|
||
const nbr = parseInt(gear.nombre);
|
||
if (isNaN(nbr) || nbr < 1) return;
|
||
let gearName = '';
|
||
if (gear.code === "autre") {
|
||
gearName = gear.special;
|
||
} else {
|
||
gearName = gear.designation;
|
||
if (gear.special) gearName += " " + gear.special;
|
||
}
|
||
let isWeapon = false;
|
||
let isArmor = false;
|
||
let isConsumable = false;
|
||
let predicats = {};
|
||
gear.props.forEach(function(prop) {
|
||
switch (prop.id) {
|
||
case 'def':
|
||
case 'malus':
|
||
case 'rd':
|
||
isArmor = true;
|
||
predicats[prop.id] = parseInt(prop.valeur);
|
||
break;
|
||
case 'dm':
|
||
case 'portee':
|
||
case 'critique':
|
||
case 'dm1m':
|
||
case 'dm2m':
|
||
isWeapon = true;
|
||
predicats[prop.id] = prop.valeur;
|
||
break;
|
||
case 'consommable':
|
||
isConsumable = true;
|
||
break;
|
||
}
|
||
});
|
||
if (isConsumable) {
|
||
let pref = 'repeating_equipement_' + generateRowID() + '_';
|
||
sa[pref + 'equip_nom'] = gearName;
|
||
sa[pref + 'equip_qte'] = nbr;
|
||
let effet = effetDeConsommable(gearName);
|
||
if (effet) sa[pref + 'equip_effet'] = effet.effet;
|
||
} else if (isWeapon) {
|
||
let pref = 'repeating_armes_' + generateRowID() + '_arme';
|
||
max_attack_label++;
|
||
sa.max_attack_label = max_attack_label;
|
||
sa[pref + 'nom'] = gearName;
|
||
sa[pref + 'label'] = max_attack_label;
|
||
guessAttackType(gearName, pref, sa, v);
|
||
if (predicats.portee) {
|
||
sa[pref + 'atk'] = "@{ATKTIR}";
|
||
sa[pref + 'portee'] = predicats.portee;
|
||
sa[pref + 'dmcar'] = '0';
|
||
} else {
|
||
sa[pref + 'atk'] = "@{ATKCAC}";
|
||
}
|
||
if (predicats.critique && predicats.critique != '20')
|
||
sa[pref + 'crit'] = predicats.critique;
|
||
if (predicats.def) sa[pref + 'predicats'] = 'DEF:' + predicats.def;
|
||
if (predicats.dm1m) {
|
||
if (sa[pref + 'typeattaque'] != 'Arme de jet')
|
||
sa[pref + 'typeattaque'] = 'Arme 1 main';
|
||
let dm = parseDice(predicats.dm1m);
|
||
if (dm) {
|
||
if (dm.nbDe > 1) sa[pref + 'dmnbde'] = dm.nbDe;
|
||
if (dm.dice != 4) sa[pref + 'dmde'] = dm.dice;
|
||
if (dm.bonus) sa[pref + 'dmdiv'] = dm.bonus;
|
||
}
|
||
} else if (predicats.dm2m) {
|
||
sa[pref + 'typeattaque'] = 'Arme 2 mains';
|
||
let dm = parseDice(predicats.dm2m);
|
||
if (dm) {
|
||
if (dm.nbDe > 1) sa[pref + 'dmnbde'] = dm.nbDe;
|
||
if (dm.dice != 4) sa[pref + 'dmde'] = dm.dice;
|
||
if (dm.bonus) sa[pref + 'dmdiv'] = dm.bonus;
|
||
}
|
||
}
|
||
let dague = gearName.toLowerCase().includes('dague');
|
||
if (arme && !arme.dague && !dague) {
|
||
arme.plusieurs = true;
|
||
if (sa[pref + 'typeattaque'] == 'Arme 1 main') {
|
||
if (arme.a1m) arme.a1mp = true;
|
||
else {
|
||
arme.label = max_attack_label;
|
||
arme.nom = gearName;
|
||
arme.a1m = true;
|
||
}
|
||
}
|
||
} else if (!arme || (arme && arme.dague && !dague)) {
|
||
arme = {};
|
||
arme.label = max_attack_label;
|
||
arme.nom = gearName;
|
||
arme.dague = dague;
|
||
arme.a1m = sa[pref + 'typeattaque'] == 'Arme 1 main';
|
||
arme.a2m = sa[pref + 'typeattaque'] == 'Arme 2 mains';
|
||
}
|
||
} else if (isArmor) {
|
||
let torse = true;
|
||
let mg = false;
|
||
let pref = 'repeating_armures_' + generateRowID() + '_';
|
||
max_armure_label++;
|
||
sa.max_armure_label = max_armure_label;
|
||
sa[pref + 'nomarmure'] = gearName;
|
||
sa[pref + 'labelarmure'] = max_armure_label;
|
||
if (predicats.def) {
|
||
sa[pref + 'bonusarmure'] = predicats.def;
|
||
if (gearName.toLowerCase().includes('bouclier')) {
|
||
sa[pref + 'typearmure'] = 'Bouclier';
|
||
torse = false;
|
||
mg = true;
|
||
}
|
||
if (predicats.rd) sa[pref + 'effetarmure'] = 'RD:' + predicats.rd;
|
||
if (!predicats.malus) sa[pref + 'malusarmure'] = predicats.def;
|
||
} else if (predicats.rd) {
|
||
sa[pref + 'bonusarmure'] = predicats.rd;
|
||
sa[pref + 'typearmure'] = 'Casque';
|
||
torse = false;
|
||
if (!predicats.malus) sa[pref + 'malusarmure'] = predicats.rd;
|
||
}
|
||
if (predicats.malus) sa[pref + 'malusarmure'] = predicats.malus;
|
||
if (torse) {
|
||
if (armure) armure.plusieurs = true;
|
||
else {
|
||
armure = {
|
||
label: max_armure_label,
|
||
nom: gearName,
|
||
def: predicats.def,
|
||
equipe: pref + 'equipearmure'
|
||
};
|
||
if (predicats.malus) armure.malus = predicats.malus;
|
||
else armure.malus = armure.def;
|
||
}
|
||
} else if (mg) {
|
||
if (bouclier) bouclier.plusieurs = true;
|
||
else {
|
||
bouclier = {
|
||
label: max_armure_label,
|
||
nom: gearName,
|
||
def: predicats.def,
|
||
equipe: pref + 'equipearmure'
|
||
};
|
||
if (predicats.malus) bouclier.malus = predicats.malus;
|
||
else bouclier.malus = bouclier.def;
|
||
}
|
||
}
|
||
} else {
|
||
if (equip_div) equip_div += '\n' + gearName;
|
||
else equip_div = gearName;
|
||
}
|
||
});
|
||
sa.equip_div = equip_div;
|
||
if (armure && !armure.plusieurs) {
|
||
sa.torseequipe = armure.label;
|
||
sa.torseequipe_max = armure.label;
|
||
sa.defarmureon = '1';
|
||
sa.defarmure = armure.def;
|
||
sa.defarmuremalus = armure.malus;
|
||
sa[armure.equipe] = '1';
|
||
} else if (reset) {
|
||
sa.torseequipe = '0';
|
||
sa.torseequipe_max = '0';
|
||
sa.defarmureon = '0';
|
||
sa.defarmure = 0;
|
||
sa.defarmuremalus = 0;
|
||
}
|
||
if (arme) {
|
||
if (arme.plusieurs) {
|
||
if (bouclier && !bouclier.plusieurs && arme.a1m && !arme.a1mp) { //on choisit une arme à une main
|
||
sa.maindroite = arme.label;
|
||
sa.montrerattaquedroite = '1';
|
||
} else if (reset) {
|
||
sa.maindroite = '0';
|
||
sa.montrerattaquedroite = '0';
|
||
}
|
||
} else {
|
||
sa.maindroite = arme.label;
|
||
sa.montrerattaquedroite = '1';
|
||
if (arme.a2m) {
|
||
sa.maingauche = '2m';
|
||
sa.montrerattaquegauche = '0';
|
||
bouclier = false;
|
||
} else if (reset) {
|
||
sa.maingauche = '0';
|
||
sa.montrerattaquegauche = '0';
|
||
}
|
||
}
|
||
} else if (reset) {
|
||
sa.maindroite = '0';
|
||
sa.montrerattaquedroite = '0';
|
||
sa.maingauche = '0';
|
||
sa.montrerattaquegauche = '0';
|
||
}
|
||
if (bouclier && !bouclier.plusieurs) {
|
||
sa.maingauche = 'b' + bouclier.label;
|
||
sa.maingauche_max = bouclier.label;
|
||
sa.defbouclieron = '1';
|
||
sa.defbouclier = bouclier.def;
|
||
sa.defboucliermalus = bouclier.malus;
|
||
sa[bouclier.equipe] = '1';
|
||
} else if (reset && !(arme && arme.a2m)) {
|
||
sa.maingauche = '0';
|
||
sa.maingauche_max = '0';
|
||
sa.defbouclieron = '0';
|
||
sa.defbouclier = 0;
|
||
sa.defboucliermalus = 0;
|
||
}
|
||
}
|
||
|
||
//Ne cascade pas, faire les calculs
|
||
on('clicked:importprofile', function() {
|
||
getAttrs(['json_profile', 'reset_gears', 'max_attack_label', 'max_armure_label', 'scriptVersion', 'scriptVersion_max', 'equip_div'], function(v) {
|
||
const jsonProfile = v.json_profile.trim();
|
||
if (jsonProfile === '') return;
|
||
const resetGear = parseInt(v.reset_gears);
|
||
let stats;
|
||
try {
|
||
stats = JSON.parse(jsonProfile);
|
||
} catch (e) {
|
||
console.log("Erreur de décodage JSON de l'import chroniques mobiles");
|
||
console.log(e);
|
||
stats = undefined;
|
||
}
|
||
if (!stats) return;
|
||
let sa = {};
|
||
if (stats.character) {
|
||
let c = stats.character;
|
||
sa.profil = c.profile;
|
||
sa.famille = c.family;
|
||
importeVoies(sa, c.paths);
|
||
importeEquipement(sa, stats.gears, resetGear, v);
|
||
} else {
|
||
sa.profil = stats.profile;
|
||
sa.famille = stats.family;
|
||
importeVoies(sa, stats.paths);
|
||
}
|
||
preventPopulate = true;
|
||
setAttrs(sa, silent, function() {
|
||
peuplerListeArmures(
|
||
function() {
|
||
peuplerListeArmes(true);
|
||
preventPopulate = false;
|
||
}, true);
|
||
});
|
||
});
|
||
});
|
||
|
||
//Coche le port d'armure si sa def devient positive
|
||
//cascade
|
||
on('change:defarmure', function(eventinfo) {
|
||
getAttrs(['defarmure', 'defarmureon'], function(values) {
|
||
let def = parseInt(values.defarmure);
|
||
if (isNaN(def)) return;
|
||
let armureOn = parseInt(values.defarmureon);
|
||
if (eventinfo.previousValue > 0 && eventinfo.previousValue != def) {
|
||
if (def === 0 && armureOn) setAttrs({
|
||
defarmureon: 0
|
||
});
|
||
} else { //comprend aussi le cas où previousValue == def, car c'est le cas si l'attribut n'a encore jamais été modifié
|
||
if (def > 0 && !armureOn) setAttrs({
|
||
defarmureon: 1
|
||
});
|
||
}
|
||
});
|
||
});
|
||
on('change:defbouclier', function(eventinfo) {
|
||
getAttrs(['defbouclier', 'defbouclieron'], function(values) {
|
||
let def = parseInt(values.defbouclier);
|
||
if (isNaN(def)) return;
|
||
let bouclierOn = parseInt(values.defbouclieron);
|
||
if (eventinfo.previousValue > 0 && eventinfo.previousValue != def) {
|
||
if (def === 0 && bouclierOn) setAttrs({
|
||
defbouclieron: 0
|
||
});
|
||
} else {
|
||
if (def > 0 && !bouclierOn) setAttrs({
|
||
defbouclieron: 1
|
||
});
|
||
}
|
||
});
|
||
});
|
||
on('change:casque_rd', function(eventinfo) {
|
||
getAttrs(['casque_rd', 'casque_on'], function(values) {
|
||
var rd = parseInt(values.casque_rd);
|
||
if (isNaN(rd)) return;
|
||
var casqueOn = parseInt(values.casque_on);
|
||
if (eventinfo.previousValue > 0 && eventinfo.previousValue != rd) {
|
||
if (rd === 0 && casqueOn) setAttrs({
|
||
casque_on: 0
|
||
});
|
||
} else {
|
||
if (rd > 0 && !casqueOn) setAttrs({
|
||
casque_on: 1
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
//Numérotation des attaques, ne cascade pas
|
||
on('change:repeating_armes:armenom', function(eventinfo) {
|
||
getAttrs(['max_attack_label', 'repeating_armes_armelabel', 'repeating_armes_armenom', 'scriptVersion', 'scriptVersion_max'], function(values) {
|
||
let currentLabel = parseInt(values.repeating_armes_armelabel);
|
||
if (isNaN(currentLabel) || currentLabel === 0) {
|
||
currentLabel = parseInt(values.max_attack_label);
|
||
if (isNaN(currentLabel)) currentLabel = 0;
|
||
currentLabel++;
|
||
let sa = {
|
||
max_attack_label: currentLabel,
|
||
repeating_armes_armelabel: currentLabel
|
||
};
|
||
guessAttackType(values.repeating_armes_armenom, 'repeating_armes_arme', sa, values);
|
||
setAttrs(sa, silent, peuplerListeArmes);
|
||
} else peuplerListeArmes();
|
||
});
|
||
});
|
||
|
||
on('change:repeating_pnjatk:armenom', function(eventinfo) {
|
||
getAttrs(['max_attack_label', 'repeating_pnjatk_armelabel', 'repeating_pnjatk_armenom', 'scriptVersion', 'scriptVersion_max'], function(values) {
|
||
var currentLabel = parseInt(values.repeating_pnjatk_armelabel);
|
||
if (isNaN(currentLabel) || currentLabel === 0) {
|
||
currentLabel = parseInt(values.max_attack_label);
|
||
if (isNaN(currentLabel)) currentLabel = 0;
|
||
currentLabel++;
|
||
var sa = {
|
||
max_attack_label: currentLabel,
|
||
repeating_pnjatk_armelabel: currentLabel
|
||
};
|
||
guessAttackType(values.repeating_pnjatk_armenom, 'repeating_pnjatk_arme', sa, values);
|
||
setAttrs(sa, {
|
||
silent: true
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_armes remove:repeating_pnjatk', function(eventinfo) {
|
||
getAttrs(['max_attack_label'], function(values) {
|
||
let label = eventinfo.removedInfo[eventinfo.sourceAttribute + '_armelabel'];
|
||
if (values.max_attack_label == label) {
|
||
let maxLabel = 0;
|
||
getSectionIDs('repeating_armes', function(idarray) {
|
||
let labelArray = idarray.map(function(id) {
|
||
return 'repeating_armes_' + id + '_armelabel';
|
||
});
|
||
getSectionIDs('repeating_pnjatk', function(idarray) {
|
||
idarray.forEach(function(id) {
|
||
labelArray.push('repeating_pnjatk_' + id + '_armelabel');
|
||
});
|
||
getAttrs(labelArray, function(values) {
|
||
labelArray.forEach(function(ln) {
|
||
var l = parseInt(values[ln]);
|
||
if (isNaN(l)) {
|
||
console.log("Label de " + ln + " invalide");
|
||
return;
|
||
}
|
||
if (l > maxLabel) maxLabel = l;
|
||
});
|
||
setAttrs({
|
||
max_attack_label: maxLabel
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
//Montrer ou cacher les options d'arme de jet. Ne cascade pas.
|
||
on('change:repeating_armes:armetypeattaque', function(eventinfo) {
|
||
getAttrs(['repeating_armes_armetypeattaque', 'repeating_armes_armejet', 'repeating_armes_armeportable'], function(values) {
|
||
let se = {};
|
||
switch (values.repeating_armes_armetypeattaque) {
|
||
case 'Arme de jet':
|
||
if (values.repeating_armes_armejet != 'on')
|
||
se.repeating_armes_armejet = 'on';
|
||
if (values.repeating_armes_armeportable != 'off')
|
||
se.repeating_armes_armeportable = 'off';
|
||
break;
|
||
case 'Arme 1 main':
|
||
case 'Arme 2 mains':
|
||
case 'Arme gauche':
|
||
if (values.repeating_armes_armejet != 'off')
|
||
se.repeating_armes_armejet = 'off';
|
||
if (values.repeating_armes_armeportable != 'on')
|
||
se.repeating_armes_armeportable = 'on';
|
||
break;
|
||
default:
|
||
if (values.repeating_armes_armejet != 'off')
|
||
se.repeating_armes_armejet = 'off';
|
||
if (values.repeating_armes_armeportable != 'off')
|
||
se.repeating_armes_armeportable = 'off';
|
||
}
|
||
if (se != {}) setAttrs(se);
|
||
});
|
||
});
|
||
on('change:repeating_pnjatk:armetypeattaque', function(eventinfo) {
|
||
getAttrs(['repeating_pnjatk_armetypeattaque', 'repeating_pnjatk_armejet', 'repeating_pnjatk_armeportable'], function(values) {
|
||
let se = {};
|
||
switch (values.repeating_pnjatk_armetypeattaque) {
|
||
case 'Arme de jet':
|
||
if (values.repeating_pnjatk_armejet != 'on')
|
||
se.repeating_pnjatk_armejet = 'on';
|
||
if (values.repeating_pnjatk_armeportable != 'off')
|
||
se.repeating_pnjatk_armeportable = 'off';
|
||
break;
|
||
case 'Arme 1 main':
|
||
case 'Arme 2 mains':
|
||
case 'Arme gauche':
|
||
if (values.repeating_pnjatk_armejet != 'off')
|
||
se.repeating_pnjatk_armejet = 'off';
|
||
if (values.repeating_pnjatk_armeportable != 'on')
|
||
se.repeating_pnjatk_armeportable = 'on';
|
||
break;
|
||
default:
|
||
if (values.repeating_pnjatk_armejet != 'off')
|
||
se.repeating_pnjatk_armejet = 'off';
|
||
if (values.repeating_pnjatk_armeportable != 'off')
|
||
se.repeating_pnjatk_armeportable = 'off';
|
||
}
|
||
if (se != {}) setAttrs(se);
|
||
});
|
||
});
|
||
|
||
function setBaseAttacks() {
|
||
getAttrs(['option_ba_niveau', 'type_personnage', 'niveau'], function(values) {
|
||
if (values.type_personnage == 'PNJ') return;
|
||
if (values.option_ba_niveau != '1') return;
|
||
setAttrs({
|
||
atkcac_base: values.niveau,
|
||
atktir_base: values.niveau,
|
||
atkmag_base: values.niveau,
|
||
});
|
||
});
|
||
}
|
||
|
||
on('change:option_ba_niveau', function(enventinfo) {
|
||
setBaseAttacks();
|
||
});
|
||
|
||
on('change:niveau', function(enventinfo) {
|
||
setBaseAttacks();
|
||
});
|
||
|
||
//Les options d'attaque
|
||
on('change:attaque_en_puissance', function(eventinfo) {
|
||
getAttrs(['attaque_en_puissance'], function(values) {
|
||
var bonus = parseInt(values.attaque_en_puissance);
|
||
if (isNaN(bonus) || bonus < 1) {
|
||
setAttrs({
|
||
attaque_en_puissance: 1
|
||
});
|
||
return;
|
||
}
|
||
setAttrs({
|
||
malus_attaque_en_puissance: -5 * bonus
|
||
});
|
||
});
|
||
});
|
||
|
||
on('change:attaque_en_puissance_check change:attaque_en_puissance change:attaque_de_groupe', function(eventinfo) {
|
||
getAttrs(['attaque_en_puissance_check', 'attaque_en_puissance', 'attaque_assuree_check', 'attaque_de_groupe'], function(values) {
|
||
var attrs = {};
|
||
var bonus = 0;
|
||
var attaque_en_puissance = parseInt(values.attaque_en_puissance_check) * parseInt(values.attaque_en_puissance);
|
||
var attaque_assuree = parseInt(values.attaque_assuree_check);
|
||
if (!isNaN(attaque_en_puissance) && attaque_en_puissance > 0) {
|
||
bonus -= 5 * attaque_en_puissance;
|
||
attrs.bonus_dm_option = '[[' + attaque_en_puissance + 'd6]]';
|
||
if (attaque_assuree) attrs.attaque_assuree_check = 0;
|
||
} else {
|
||
attrs.bonus_dm_option = '';
|
||
if (attaque_assuree) bonus += 5;
|
||
}
|
||
var attaque_groupe = parseInt(values.attaque_de_groupe);
|
||
if (isNaN(attaque_groupe) || attaque_groupe < 1) {
|
||
attaque_groupe = 1;
|
||
attrs.attaque_groupe = 1;
|
||
}
|
||
if (attaque_groupe == 1) {
|
||
attrs.message_attaque_de_groupe = 'attaquant par jet';
|
||
} else {
|
||
var bg = (attaque_groupe - 1) * 2;
|
||
attrs.message_attaque_de_groupe = 'attaquants par jet (+' + bg + ' en attaque, DM x2 si attaque > DEF + 5, et x3 si critique)';
|
||
bonus += bg;
|
||
}
|
||
attrs.bonus_attaque_option = bonus;
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
on('change:attaque_assuree_check', function(eventinfo) {
|
||
getAttrs(['attaque_en_puissance_check', 'attaque_en_puissance', 'attaque_assuree_check', 'attaque_de_groupe'], function(values) {
|
||
var attrs = {};
|
||
var bonus = 0;
|
||
var attaque_en_puissance = parseInt(values.attaque_en_puissance_check) * parseInt(values.attaque_en_puissance);
|
||
var attaque_assuree = parseInt(values.attaque_assuree_check);
|
||
if (attaque_assuree) {
|
||
bonus += 5;
|
||
attrs.division_attaque_assuree = '/2';
|
||
if (isNaN(attaque_en_puissance) || attaque_en_puissance > 0)
|
||
attrs.attaque_en_puissance_check = 0;
|
||
} else {
|
||
attrs.division_attaque_assuree = '';
|
||
if (!isNaN(attaque_en_puissance) && attaque_en_puissance > 0)
|
||
bonus -= 5 * attaque_en_puissance;
|
||
}
|
||
var attaque_groupe = parseInt(values.attaque_de_groupe);
|
||
if (attaque_groupe > 1) {
|
||
bonus += (attaque_groupe - 1) * 2;
|
||
}
|
||
attrs.bonus_attaque_option = bonus;
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
on('change:attaque_risquee_check change:attaque_dm_temp_check', function(eventinfo) {
|
||
getAttrs(['attaque_risquee_check', 'attaque_dm_temp_check'], function(values) {
|
||
let attaque_risquee = parseInt(values.attaque_risquee_check);
|
||
let attaque_non_lethale = parseInt(values.attaque_dm_temp_check);
|
||
const updateArmes = function(section) {
|
||
getSectionIDs('repeating_' + section, function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
const prefix = 'repeating_' + section + '_' + id + '_';
|
||
getAttrs([prefix + 'armeportee', prefix + 'armemodificateurs'], function(values) {
|
||
let portee = values[prefix + 'armeportee'];
|
||
let modifs = values[prefix + 'armemodificateurs'].split(',');
|
||
let bonus = 0;
|
||
if (attaque_non_lethale) bonus = -2;
|
||
let attrs = {};
|
||
let dmTemp = attaque_non_lethale;
|
||
modifs.forEach(function(m) {
|
||
switch (m.trim()) {
|
||
case 'tempDmg':
|
||
dmTemp = true;
|
||
if (attaque_non_lethale) bonus = 0;
|
||
return;
|
||
case 'choc':
|
||
if (attaque_non_lethale) bonus = 0;
|
||
return;
|
||
}
|
||
});
|
||
if (dmTemp) attrs[prefix + 'armedmtemp'] = 1;
|
||
else attrs[prefix + 'armedmtemp'] = '';
|
||
if (attaque_risquee && !portee) {
|
||
attrs[prefix + 'armebonusoption'] = bonus + 2;
|
||
} else {
|
||
attrs[prefix + 'armebonusoption'] = bonus;
|
||
}
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
});
|
||
};
|
||
updateArmes('armes');
|
||
updateArmes('pnjatk');
|
||
});
|
||
});
|
||
|
||
const DEGATSPJ = '{{degats=[[(@{armedmnbde}d@{armedmde}@{armedmrollmod}+[[@{armedmcar}]]+@{armedmdiv})@{division_attaque_assuree}]]}}';
|
||
|
||
//Du coup, mise à jour aussi quand on change les attaques
|
||
on('change:repeating_armes:armeportee change:repeating_armes:armemodificateurs', function(eventinfo) {
|
||
getAttrs(['attaque_risquee_check', 'attaque_dm_temp_check', 'repeating_armes_armeportee', 'repeating_armes_armemodificateurs'], function(values) {
|
||
var attaque_risquee = parseInt(values.attaque_risquee_check);
|
||
var attaque_non_lethale = parseInt(values.attaque_dm_temp_check);
|
||
var portee = values.repeating_armes_armeportee;
|
||
var modifs = values.repeating_armes_armemodificateurs.split(',');
|
||
var bonus = 0;
|
||
if (attaque_non_lethale) bonus = -2;
|
||
var attrs = {};
|
||
var dmTemp = attaque_non_lethale;
|
||
var nbDes = 1; //Nombre de dés pour l'attaque
|
||
var plusFort = true;
|
||
attrs.repeating_armes_armedegats = DEGATSPJ;
|
||
attrs.repeating_armes_armepoudre = '{{poudre=}}';
|
||
attrs.repeating_armes_armereussiteauto = '{{attaqueautomatique=}}';
|
||
attrs.repeating_armes_armedmrollmod = '';
|
||
attrs.repeating_armes_armeattde = '@{ETATDE}';
|
||
modifs.forEach(function(m) {
|
||
switch (m.trim()) {
|
||
case 'tempDmg':
|
||
dmTemp = true;
|
||
if (attaque_non_lethale) bonus = 0;
|
||
return;
|
||
case 'choc':
|
||
if (attaque_non_lethale) bonus = 0;
|
||
return;
|
||
case 'pasDeDmg':
|
||
attrs.repeating_armes_armedegats = '{{degats=}}';
|
||
return;
|
||
case 'poudre':
|
||
attrs.repeating_armes_armepoudre = '{{poudre=[[1d20]]}}';
|
||
return;
|
||
case 'auto':
|
||
attrs.repeating_armes_armereussiteauto = '{{attaqueautomatique=1}}';
|
||
return;
|
||
case 'reroll1':
|
||
attrs.repeating_armes_armedmrollmod += 'r1';
|
||
return;
|
||
case 'explodeMax':
|
||
attrs.repeating_armes_armedmrollmod += '!';
|
||
return;
|
||
case 'avantage':
|
||
case 'm2d20':
|
||
if (plusFort) nbDes++;
|
||
else if (nbDes <= 1) {
|
||
plusFort = true;
|
||
nbDes = 2;
|
||
} else nbDes--;
|
||
return;
|
||
case 'desavantage':
|
||
case 'désavantage':
|
||
if (plusFort) {
|
||
if (nbDes > 1) nbDes--;
|
||
else {
|
||
plusFort = false;
|
||
nbDes = 2;
|
||
}
|
||
} else nbDes++;
|
||
return;
|
||
case 'avecd12':
|
||
attrs.repeating_armes_armeattde = '12';
|
||
return;
|
||
}
|
||
});
|
||
if (dmTemp) attrs.repeating_armes_armedmtemp = 1;
|
||
else attrs.repeating_armes_armedmtemp = '';
|
||
if (attaque_risquee && !portee) {
|
||
attrs.repeating_armes_armebonusoption = bonus + 2;
|
||
} else {
|
||
attrs.repeating_armes_armebonusoption = bonus;
|
||
}
|
||
attrs.repeating_armes_armeattnbde = nbDes;
|
||
if (nbDes > 1) {
|
||
if (plusFort) attrs.repeating_armes_armeattrollmod = 'kh1';
|
||
else attrs.repeating_armes_armeattrollmod = 'kl1';
|
||
} else attrs.repeating_armes_armeattrollmod = '';
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
const DEGATSPNJ = '{{degats=[[(@{armedmnbde}d@{armedmde}@{armedmrollmod}+@{armedm})@{division_attaque_assuree}]]}}';
|
||
|
||
on('change:repeating_pnjatk:armeportee change:repeating_pnjatk:armemodificateurs', function(eventinfo) {
|
||
getAttrs(['attaque_risquee_check', 'attaque_dm_temp_check', 'repeating_pnjatk_armeportee', 'repeating_pnjatk_armemodificateurs'], function(values) {
|
||
let attaque_risquee = parseInt(values.attaque_risquee_check);
|
||
let attaque_non_lethale = parseInt(values.attaque_dm_temp_check);
|
||
let portee = values.repeating_pnjatk_armeportee;
|
||
let modifs = values.repeating_pnjatk_armemodificateurs.split(',');
|
||
let bonus = 0;
|
||
if (attaque_non_lethale) bonus = -2;
|
||
let attrs = {};
|
||
let dmTemp = attaque_non_lethale;
|
||
let nbDes = 1; //Nombre de dés pour l'attaque
|
||
let plusFort = true;
|
||
attrs.repeating_pnjatk_armedegats = DEGATSPNJ;
|
||
attrs.repeating_pnjatk_armepoudre = '{{poudre=}}';
|
||
attrs.repeating_pnjatk_armereussiteauto = '{{attaqueautomatique=}}';
|
||
attrs.repeating_pnjatk_armedmrollmod = '';
|
||
attrs.repeating_pnjatk_armeattde = '@{ETATDE}';
|
||
modifs.forEach(function(m) {
|
||
switch (m.trim()) {
|
||
case 'tempDmg':
|
||
dmTemp = true;
|
||
if (attaque_non_lethale) bonus = 0;
|
||
return;
|
||
case 'choc':
|
||
if (attaque_non_lethale) bonus = 0;
|
||
return;
|
||
case 'pasDeDmg':
|
||
attrs.repeating_pnjatk_armedegats = '{{degats=}}';
|
||
return;
|
||
case 'poudre':
|
||
attrs.repeating_pnjatk_armepoudre = '{{poudre=[[1d20]]}}';
|
||
return;
|
||
case 'auto':
|
||
attrs.repeating_pnjatk_armereussiteauto = '{{attaqueautomatique=1}}';
|
||
return;
|
||
case 'reroll1':
|
||
attrs.repeating_pnjatk_armedmrollmod += 'r1';
|
||
return;
|
||
case 'explodeMax':
|
||
attrs.repeating_pnjatk_armedmrollmod += '!';
|
||
return;
|
||
case 'avantage':
|
||
case 'm2d20':
|
||
if (plusFort) nbDes++;
|
||
else if (nbDes <= 1) {
|
||
plusFort = true;
|
||
nbDes = 2;
|
||
} else nbDes--;
|
||
return;
|
||
case 'desavantage':
|
||
case 'désavantage':
|
||
if (plusFort) {
|
||
if (nbDes > 1) nbDes--;
|
||
else {
|
||
plusFort = false;
|
||
nbDes = 2;
|
||
}
|
||
} else nbDes++;
|
||
return;
|
||
case 'avecd12':
|
||
attrs.repeating_pnjatk_armeattde = '12';
|
||
return;
|
||
}
|
||
});
|
||
if (dmTemp) attrs.repeating_pnjatk_armedmtemp = 1;
|
||
else attrs.repeating_pnjatk_armedmtemp = '';
|
||
if (attaque_risquee && !portee) {
|
||
attrs.repeating_pnjatk_armebonusoption = bonus + 2;
|
||
} else {
|
||
attrs.repeating_pnjatk_armebonusoption = bonus;
|
||
}
|
||
attrs.repeating_pnjatk_armeattnbde = nbDes;
|
||
if (nbDes > 1) {
|
||
if (plusFort) attrs.repeating_pnjatk_armeattrollmod = 'kh1';
|
||
else attrs.repeating_pnjatk_armeattrollmod = 'kl1';
|
||
} else attrs.repeating_pnjatk_armeattrollmod = '';
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
//Les options de script
|
||
on('change:tab', function(eventinfo) {
|
||
if (eventinfo.newValue != 'Script' && eventinfo.newValue != 'script pnj') return;
|
||
getAttrs(['show_script', 'scriptVersion', 'scriptVersion_max'], function(values) {
|
||
if (values.scriptVersion) {
|
||
let sa = {
|
||
message_version: ''
|
||
};
|
||
const version = parseFloat(values.scriptVersion_max);
|
||
if (!isNaN(version) && version >= 3)
|
||
sa.message_version = "COFantasy version " + version;
|
||
if (values.show_script === '0')
|
||
sa = {
|
||
show_script: 1
|
||
};
|
||
setAttrs(sa, {
|
||
silent: true
|
||
});
|
||
} else {
|
||
if (values.show_script == 0) return;
|
||
setAttrs({
|
||
show_script: 0
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('change:repeating_actions:actiontitre', function(eventinfo) {
|
||
getAttrs(['maxrangaction', 'repeating_actions_actionrang', 'repeating_actions_actiontitre'], function(values) {
|
||
var rangActuel = parseInt(values.repeating_actions_actionrang);
|
||
if (isNaN(rangActuel) || rangActuel === 0) {
|
||
rangActuel = parseInt(values.maxrangaction);
|
||
if (isNaN(rangActuel)) rangActuel = 0;
|
||
rangActuel++;
|
||
setAttrs({
|
||
maxrangaction: rangActuel,
|
||
repeating_actions_actionrang: rangActuel
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_actions', function(eventinfo) {
|
||
getAttrs(['maxrangaction'], function(values) {
|
||
var rang = eventinfo.removedInfo[eventinfo.sourceAttribute + '_actionrang'];
|
||
if (values.maxrangaction <= rang) {
|
||
var maxRang = 0;
|
||
getSectionIDs('repeating_actions', function(idarray) {
|
||
var rangArray = idarray.map(function(id) {
|
||
return 'repeating_actions_' + id + '_actionrang';
|
||
});
|
||
getAttrs(rangArray, function(values) {
|
||
rangArray.forEach(function(ln) {
|
||
var l = parseInt(values[ln]);
|
||
if (isNaN(l)) {
|
||
console.log("Rang de " + ln + " invalide");
|
||
return;
|
||
}
|
||
if (l > maxRang) maxRang = l;
|
||
});
|
||
setAttrs({
|
||
maxrangaction: maxRang
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('change:repeating_actions:actionmontree', function(eventinfo) {
|
||
getAttrs(['repeating_actions_actionmontree', 'repeating_actions_actionoptflag'], function(values) {
|
||
if (values.repeating_actions_actionmontree == 1) return;
|
||
if (values.repeating_actions_actionoptflag == "off") return;
|
||
setAttrs({
|
||
repeating_actions_actionoptflag: 'off'
|
||
});
|
||
});
|
||
});
|
||
|
||
on('change:repeating_actions:actiontype', function(eventinfo) {
|
||
getAttrs(['repeating_actions_actiontype', 'repeating_actions_actionoptflag'], function(values) {
|
||
if (values.repeating_actions_actiontype == 'action') return;
|
||
if (values.repeating_actions_actionoptflag == "off") return;
|
||
setAttrs({
|
||
repeating_actions_actionoptflag: 'off'
|
||
});
|
||
});
|
||
});
|
||
|
||
on('change:repeating_actions1:actiontitre', function(eventinfo) {
|
||
getAttrs(['maxrangaction1', 'repeating_actions1_actionrang', 'repeating_actions1_actiontitre'], function(values) {
|
||
var rangActuel = parseInt(values.repeating_actions1_actionrang);
|
||
if (isNaN(rangActuel) || rangActuel === 0) {
|
||
rangActuel = parseInt(values.maxrangaction1);
|
||
if (isNaN(rangActuel)) rangActuel = 0;
|
||
rangActuel++;
|
||
setAttrs({
|
||
maxrangaction1: rangActuel,
|
||
repeating_actions1_actionrang: rangActuel
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_actions1', function(eventinfo) {
|
||
getAttrs(['maxrangaction1'], function(values) {
|
||
var rang = eventinfo.removedInfo[eventinfo.sourceAttribute + '_actionrang'];
|
||
if (values.maxrangaction1 <= rang) {
|
||
var maxRang = 0;
|
||
getSectionIDs('repeating_actions1', function(idarray) {
|
||
var rangArray = idarray.map(function(id) {
|
||
return 'repeating_actions1_' + id + '_actionrang';
|
||
});
|
||
getAttrs(rangArray, function(values) {
|
||
rangArray.forEach(function(ln) {
|
||
var l = parseInt(values[ln]);
|
||
if (isNaN(l)) {
|
||
console.log("Rang de " + ln + " invalide");
|
||
return;
|
||
}
|
||
if (l > maxRang) maxRang = l;
|
||
});
|
||
setAttrs({
|
||
maxrangaction1: maxRang
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
|
||
on('change:repeating_actions2:actiontitre', function(eventinfo) {
|
||
getAttrs(['maxrangaction2', 'repeating_actions2_actionrang', 'repeating_actions2_actiontitre'], function(values) {
|
||
var rangActuel = parseInt(values.repeating_actions2_actionrang);
|
||
if (isNaN(rangActuel) || rangActuel === 0) {
|
||
rangActuel = parseInt(values.maxrangaction2);
|
||
if (isNaN(rangActuel)) rangActuel = 0;
|
||
rangActuel++;
|
||
setAttrs({
|
||
maxrangaction2: rangActuel,
|
||
repeating_actions2_actionrang: rangActuel
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_actions2', function(eventinfo) {
|
||
getAttrs(['maxrangaction2'], function(values) {
|
||
var rang = eventinfo.removedInfo[eventinfo.sourceAttribute + '_actionrang'];
|
||
if (values.maxrangaction2 <= rang) {
|
||
var maxRang = 0;
|
||
getSectionIDs('repeating_actions2', function(idarray) {
|
||
var rangArray = idarray.map(function(id) {
|
||
return 'repeating_actions2_' + id + '_actionrang';
|
||
});
|
||
getAttrs(rangArray, function(values) {
|
||
rangArray.forEach(function(ln) {
|
||
var l = parseInt(values[ln]);
|
||
if (isNaN(l)) {
|
||
console.log("Rang de " + ln + " invalide");
|
||
return;
|
||
}
|
||
if (l > maxRang) maxRang = l;
|
||
});
|
||
setAttrs({
|
||
maxrangaction2: maxRang
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
|
||
on('change:repeating_actions3:actiontitre', function(eventinfo) {
|
||
getAttrs(['maxrangaction3', 'repeating_actions3_actionrang', 'repeating_actions3_actiontitre'], function(values) {
|
||
var rangActuel = parseInt(values.repeating_actions3_actionrang);
|
||
if (isNaN(rangActuel) || rangActuel === 0) {
|
||
rangActuel = parseInt(values.maxrangaction3);
|
||
if (isNaN(rangActuel)) rangActuel = 0;
|
||
rangActuel++;
|
||
setAttrs({
|
||
maxrangaction3: rangActuel,
|
||
repeating_actions3_actionrang: rangActuel
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_actions3', function(eventinfo) {
|
||
getAttrs(['maxrangaction3'], function(values) {
|
||
var rang = eventinfo.removedInfo[eventinfo.sourceAttribute + '_actionrang'];
|
||
if (values.maxrangaction3 <= rang) {
|
||
var maxRang = 0;
|
||
getSectionIDs('repeating_actions3', function(idarray) {
|
||
var rangArray = idarray.map(function(id) {
|
||
return 'repeating_actions3_' + id + '_actionrang';
|
||
});
|
||
getAttrs(rangArray, function(values) {
|
||
rangArray.forEach(function(ln) {
|
||
var l = parseInt(values[ln]);
|
||
if (isNaN(l)) {
|
||
console.log("Rang de " + ln + " invalide");
|
||
return;
|
||
}
|
||
if (l > maxRang) maxRang = l;
|
||
});
|
||
setAttrs({
|
||
maxrangaction3: maxRang
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
|
||
on('change:repeating_actions4:actiontitre', function(eventinfo) {
|
||
getAttrs(['maxrangaction4', 'repeating_actions4_actionrang', 'repeating_actions4_actiontitre'], function(values) {
|
||
var rangActuel = parseInt(values.repeating_actions4_actionrang);
|
||
if (isNaN(rangActuel) || rangActuel === 0) {
|
||
rangActuel = parseInt(values.maxrangaction4);
|
||
if (isNaN(rangActuel)) rangActuel = 0;
|
||
rangActuel++;
|
||
setAttrs({
|
||
maxrangaction4: rangActuel,
|
||
repeating_actions4_actionrang: rangActuel
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_actions4', function(eventinfo) {
|
||
getAttrs(['maxrangaction4'], function(values) {
|
||
var rang = eventinfo.removedInfo[eventinfo.sourceAttribute + '_actionrang'];
|
||
if (values.maxrangaction4 <= rang) {
|
||
var maxRang = 0;
|
||
getSectionIDs('repeating_actions4', function(idarray) {
|
||
var rangArray = idarray.map(function(id) {
|
||
return 'repeating_actions4_' + id + '_actionrang';
|
||
});
|
||
getAttrs(rangArray, function(values) {
|
||
rangArray.forEach(function(ln) {
|
||
var l = parseInt(values[ln]);
|
||
if (isNaN(l)) {
|
||
console.log("Rang de " + ln + " invalide");
|
||
return;
|
||
}
|
||
if (l > maxRang) maxRang = l;
|
||
});
|
||
setAttrs({
|
||
maxrangaction4: maxRang
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
//Consommables
|
||
const listeConsommables = [{
|
||
keys: ['agrandissement', "d'agrandissement"],
|
||
effet: "!cof-effet-temp agrandissement 8",
|
||
}, {
|
||
keys: ['flèche', 'fleche'],
|
||
variantes: [{
|
||
keys: ['enflammée', 'enflammee'],
|
||
effet: "!cof-attack @{selected|token_id} @{target|token_id} Flèche enflammée --toucher [[@{selected|ATKMAG}]] --dm 1d6 + [[@{selected|INT}]] --portee 30 --fx beam-fire --feu --sortilege --enflamme"
|
||
}],
|
||
}, {
|
||
keys: ['force'],
|
||
variantes: [{
|
||
keys: ['géant', 'geant'],
|
||
effet: "!cof-effet-temp forceDeGeant 10",
|
||
}],
|
||
}, {
|
||
keys: ['forme'],
|
||
variantes: [{
|
||
keys: ['gazeuse'],
|
||
effet: "!cof-effet-temp formeGazeuse [[1d4+3]]",
|
||
}],
|
||
}, {
|
||
keys: ['gland'],
|
||
variantes: [{
|
||
keys: ['pouvoir'],
|
||
effet: "#Attaque Gland de pouvoir --toucher [[@{selected|ATKTIR}]] --portee 10 --pasDeDmg --magique --effet statueDeBois [[2d6+@{selected|SAG}]] --valeur 10 10",
|
||
}],
|
||
}, {
|
||
keys: ['fortifiant'],
|
||
effet: "!cof-fortifiant 2"
|
||
}, {
|
||
keys: ['huile', "d'huile"],
|
||
variantes: [{
|
||
keys: ['instable'],
|
||
effet: "!cof-huile-instable @{target|token_id}",
|
||
}],
|
||
}, {
|
||
keys: ['invisibilité', 'invisibilite', "d'invisibilité", "d'invisibilite"],
|
||
effet: "!cof-set-state invisible true --message devient invisible"
|
||
}, {
|
||
keys: ['résistance', 'resistance'],
|
||
variantes: [{
|
||
keys: ['acide', "l'acide"],
|
||
effet: "!cof-set-attribute resistanceA_acide true",
|
||
}, {
|
||
keys: ['feu'],
|
||
effet: "!cof-set-attribute resistanceA_feu true",
|
||
}],
|
||
}, {
|
||
keys: ['trousse'],
|
||
variantes: [{
|
||
keys: ['soin', 'soins'],
|
||
effet: "!cof-soin @{selected|token_id} @{target|token_id} 1",
|
||
}],
|
||
}, {
|
||
keys: ['soin', 'soins'],
|
||
effet: "!cof-soin 1d8",
|
||
variantes: [{
|
||
keys: ['léger', 'leger', 'légers', 'legers'],
|
||
effet: "!cof-soin 1d8+@{selected|niveau}",
|
||
}, {
|
||
keys: ['modéré', 'modere', 'modérés', 'moderes'],
|
||
effet: "!cof-soin 2d8+@{selected|niveau}",
|
||
}],
|
||
}];
|
||
|
||
const mapConsommables = keyListToMap(listeConsommables);
|
||
|
||
//retourne soit undefined, soit un objet de champ effet
|
||
function effetDeConsommable(nom) {
|
||
let tokens = nom.toLowerCase().trim();
|
||
if (tokens === '') return;
|
||
tokens = tokens.split(' ');
|
||
let parse = [
|
||
[mapConsommables]
|
||
];
|
||
let effet;
|
||
tokens.forEach(function(t) {
|
||
let updateParse = {};
|
||
parse.forEach(function(pa, i) {
|
||
pa.forEach(function(p) {
|
||
let s = p[t];
|
||
if (s === undefined) return;
|
||
if (s.effet && (effet === undefined || effet.rang < i))
|
||
effet = {
|
||
rang: i,
|
||
effet: s.effet
|
||
};
|
||
if (s.variantes) {
|
||
updateParse[i + 1] = updateParse[i + 1] || [];
|
||
updateParse[i + 1].push(s.variantes);
|
||
}
|
||
});
|
||
});
|
||
for (let i in updateParse) {
|
||
if (i == parse.length) parse.push([]);
|
||
parse[i] = parse[i].concat(updateParse[i]);
|
||
}
|
||
});
|
||
return effet;
|
||
}
|
||
|
||
on('change:repeating_equipement:equip_nom', function(eventinf) {
|
||
getAttrs(['repeating_equipement_equip_nom'], function(values) {
|
||
let effet = effetDeConsommable(values.repeating_equipement_equip_nom);
|
||
if (effet === undefined) return;
|
||
setAttrs({
|
||
repeating_equipement_equip_effet: effet.effet,
|
||
});
|
||
});
|
||
});
|
||
|
||
//Fonctions spécifiques aux terres d'Arran
|
||
on('change:option_setting', function(eventinfo) {
|
||
getAttrs(['option_setting', 'famille', 'charisme', 'pc_bonus'], function(values) {
|
||
var attrs = {
|
||
option_setting_cac: values.option_setting,
|
||
option_setting_tir: values.option_setting,
|
||
option_setting_mag: values.option_setting,
|
||
option_setting_init: values.option_setting,
|
||
};
|
||
var charisme = parseInt(values.charisme);
|
||
if (!isNaN(charisme) && charisme > 0) {
|
||
attrs.pc_base = 3 + Math.floor((charisme - 10) / 2);
|
||
} else attrs.pc_base = 0;
|
||
switch (values.option_setting) {
|
||
case 'generique':
|
||
attrs.mod_atkcac = 0;
|
||
attrs.mod_atktir = 0;
|
||
attrs.mod_atkcar = 0;
|
||
attrs.mod_initiative = 0;
|
||
attrs.titrevoie4 = '';
|
||
attrs.titrevoie5 = '';
|
||
attrs.titrecapaciteraciale = '';
|
||
attrs.talent_magique_present = '';
|
||
attrs.formations_martiales_check = '';
|
||
break;
|
||
case 'arran':
|
||
switch (values.famille) {
|
||
case 'aventurier':
|
||
attrs.DV = 8;
|
||
attrs.mod_atkcac = 1;
|
||
attrs.mod_atktir = 1;
|
||
attrs.mod_atkmag = 0;
|
||
attrs.pc_base += 1;
|
||
attrs.talent_magique_present = '';
|
||
break;
|
||
case 'combattant':
|
||
attrs.DV = 10;
|
||
attrs.mod_atkcac = 2;
|
||
attrs.mod_atktir = 2;
|
||
attrs.mod_atkmag = 0;
|
||
attrs.pc_base -= 1;
|
||
attrs.talent_magique_present = '';
|
||
break;
|
||
case 'mystique':
|
||
attrs.DV = 6;
|
||
attrs.mod_atkcac = 0;
|
||
attrs.mod_atktir = 0;
|
||
attrs.mod_atkmag = 2;
|
||
attrs.pc_base -= 1;
|
||
attrs.talent_magique_present = 1;
|
||
break;
|
||
}
|
||
attrs.ATKCAC_CARAC = '';
|
||
attrs.ATKTIR_CARAC = '';
|
||
attrs.ATKMAG_CARAC = '';
|
||
attrs.option_pc = 1;
|
||
attrs.option_pr = 1;
|
||
attrs.option_pm = 1;
|
||
attrs.titrevoie4 = "Voie de peuple";
|
||
attrs.titrevoie5 = "Voie culturelle";
|
||
attrs.titrecapaciteraciale = "Trait de peuple";
|
||
attrs.formations_martiales_check = 1;
|
||
}
|
||
let pc_bonus = parseInt(values.pc_bonus);
|
||
if (!isNaN(pc_bonus)) attrs.pc_max = attrs.pc_base + pc_bonus;
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
on('change:famille', function(eventinfo) {
|
||
getAttrs(['famille', 'defarmureon', 'defarmuremalus', 'defbouclieron', 'defboucliermalus'], function(values) {
|
||
let attrs = {};
|
||
switch (values.famille) {
|
||
case 'aventurier':
|
||
attrs.DV = 8;
|
||
attrs.mod_atkcac = 1;
|
||
attrs.mod_atktir = 1;
|
||
attrs.mod_atkmag = 0;
|
||
attrs.talent_magique_present = '';
|
||
break;
|
||
case 'combattant':
|
||
attrs.DV = 10;
|
||
attrs.mod_atkcac = 2;
|
||
attrs.mod_atktir = 2;
|
||
attrs.mod_atkmag = 0;
|
||
attrs.talent_magique_present = '';
|
||
break;
|
||
case 'mystique':
|
||
attrs.DV = 6;
|
||
attrs.mod_atkcac = 0;
|
||
attrs.mod_atktir = 0;
|
||
attrs.mod_atkmag = 2;
|
||
attrs.talent_magique_present = 1;
|
||
break;
|
||
default:
|
||
return;
|
||
}
|
||
let malusArmure = values.defarmureon * values.defarmuremalus + values.defbouclieron * values.defboucliermalus;
|
||
attrs.mod_atkmag -= malusArmure;
|
||
attrs.mod_atktir -= Math.floor(malusArmure / 2);
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
on('change:defarmureon change:defarmuremalus change:defbouclieron change:defboucliermalus', function(eventinfo) {
|
||
getAttrs(['famille', 'defarmureon', 'defarmuremalus', 'defbouclieron', 'defboucliermalus', 'option_setting'], function(values) {
|
||
if (values.option_setting != 'arran') return;
|
||
let malusArmure = values.defarmureon * values.defarmuremalus + values.defbouclieron * values.defboucliermalus;
|
||
let attrs = {};
|
||
switch (values.famille) {
|
||
case 'aventurier':
|
||
attrs.mod_atktir = 1;
|
||
attrs.mod_atkmag = 0;
|
||
break;
|
||
case 'combattant':
|
||
attrs.mod_atktir = 2;
|
||
attrs.mod_atkmag = 0;
|
||
break;
|
||
case 'mystique':
|
||
attrs.mod_atktir = 0;
|
||
attrs.mod_atkmag = 2;
|
||
break;
|
||
default:
|
||
return;
|
||
}
|
||
attrs.mod_atktir -= Math.floor(malusArmure / 2);
|
||
attrs.mod_atkmag -= malusArmure;
|
||
attrs.mod_initiative = -malusArmure;
|
||
setAttrs(attrs);
|
||
});
|
||
});
|
||
|
||
//Numérotation des munitions, ne cascade pas
|
||
on('change:repeating_munitions:nommunition', function(eventinfo) {
|
||
getAttrs(['max_munition_label', 'repeating_munitions_labelmunition', 'repeating_munitions_nommunition'], function(values) {
|
||
let currentLabel = parseInt(values.repeating_munitions_labelmunition);
|
||
if (isNaN(currentLabel) || currentLabel === 0) {
|
||
currentLabel = parseInt(values.max_munition_label);
|
||
if (isNaN(currentLabel)) currentLabel = 0;
|
||
currentLabel++;
|
||
let sa = {
|
||
max_munition_label: currentLabel,
|
||
repeating_munitions_labelmunition: currentLabel
|
||
};
|
||
setAttrs(sa, {
|
||
silent: true
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
//Numérotation des armures, cascade
|
||
on('change:repeating_armures:nomarmure', function(eventinfo) {
|
||
getAttrs(['max_armure_label', 'repeating_armures_labelarmure', 'repeating_armures_nomarmure', 'repeating_armures_typearmure', 'repeating_armures_equipearmure'], function(values) {
|
||
let currentLabel = parseInt(values.repeating_armures_labelarmure);
|
||
if (isNaN(currentLabel) || currentLabel === 0) {
|
||
currentLabel = parseInt(values.max_armure_label);
|
||
if (isNaN(currentLabel)) currentLabel = 0;
|
||
currentLabel++;
|
||
let sa = {
|
||
max_armure_label: currentLabel,
|
||
repeating_armures_labelarmure: currentLabel
|
||
};
|
||
setAttrs(sa, {
|
||
silent: false
|
||
});
|
||
} else {
|
||
switch (values.repeating_armures_typearmure) {
|
||
case 'Torse':
|
||
case 'Bouclier':
|
||
case 'Casque':
|
||
peuplerListeArmures();
|
||
return;
|
||
case 'Autre':
|
||
return;
|
||
default:
|
||
if (values.repeating_armures_equipearmure == '1')
|
||
updateEmplacement(values.repeating_armures_typearmure);
|
||
return;
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
on('change:repeating_armures:labelarmure', function(eventinfo) {
|
||
peuplerListeArmures();
|
||
});
|
||
|
||
on('change:repeating_armures:typearmure', function(eventinfo) {
|
||
getAttrs(['repeating_armures_typearmure', 'repeating_armures_equipearmure', 'repeating_armures_labelarmure'], function(values) {
|
||
let t = values.repeating_armures_typearmure;
|
||
let equipe = values.repeating_armures_equipearmure;
|
||
let label = values.repeating_armures_labelarmure;
|
||
switch (eventinfo.previousValue) {
|
||
case 'Torse':
|
||
case 'Casque':
|
||
case 'Bouclier':
|
||
peuplerListeArmures();
|
||
if (!equipe) return;
|
||
switch (t) {
|
||
case 'Torse':
|
||
case 'Casque':
|
||
case 'Bouclier':
|
||
case 'Autre':
|
||
return;
|
||
}
|
||
checkSlots(t, label);
|
||
return;
|
||
case 'Autre':
|
||
switch (t) {
|
||
case 'Torse':
|
||
case 'Casque':
|
||
case 'Bouclier':
|
||
peuplerListeArmures();
|
||
return;
|
||
}
|
||
if (!equipe) return;
|
||
checkSlots(t, label);
|
||
return;
|
||
default:
|
||
if (equipe) updateEmplacement(eventinfo.previousValue);
|
||
switch (t) {
|
||
case 'Torse':
|
||
case 'Casque':
|
||
case 'Bouclier':
|
||
peuplerListeArmures();
|
||
return;
|
||
case 'Autre':
|
||
return;
|
||
}
|
||
if (equipe) checkSlots(t, label);
|
||
|
||
}
|
||
});
|
||
});
|
||
|
||
on('remove:repeating_armures', function(eventinfo) {
|
||
let t = eventinfo.removedInfo[eventinfo.sourceAttribute + '_typearmure'];
|
||
switch (t) {
|
||
case 'Torse':
|
||
case 'Casque':
|
||
case 'Bouclier':
|
||
peuplerListeArmures();
|
||
return;
|
||
case 'Autre':
|
||
return;
|
||
default:
|
||
let equipe = eventinfo.removedInfo[eventinfo.sourceAttribute + '_equipearmure'];
|
||
if (equipe == '1') updateEmplacement(t);
|
||
}
|
||
});
|
||
|
||
function keyOfName(nom) {
|
||
nom = nom + '';
|
||
nom = nom.trim().toLowerCase();
|
||
nom = nom.replace(/é/g, 'e');
|
||
nom = nom.replace(/ç/g, 'c');
|
||
return nom;
|
||
}
|
||
|
||
//Les compétences
|
||
|
||
var competences = {
|
||
desamorcage: {
|
||
nom: 'Désamorçage',
|
||
main: 'DEX',
|
||
caracs: {
|
||
DEX: {},
|
||
INT: {},
|
||
}
|
||
},
|
||
discretion: {
|
||
nom: 'Discrétion',
|
||
main: 'DEX',
|
||
caracs: {
|
||
DEX: {
|
||
malus: 'armure'
|
||
},
|
||
}
|
||
},
|
||
mecanique: {
|
||
nom: 'Mécanique',
|
||
main: 'INT',
|
||
caracs: {
|
||
DEX: {},
|
||
INT: {},
|
||
}
|
||
},
|
||
perception: {
|
||
nom: 'Perception',
|
||
main: 'SAG',
|
||
caracs: {
|
||
SAG: {
|
||
malus: 'casque'
|
||
},
|
||
}
|
||
},
|
||
survie: {
|
||
nom: 'Survie',
|
||
main: 'SAG',
|
||
caracs: {
|
||
SAG: {
|
||
malus: 'casque'
|
||
},
|
||
CON: {
|
||
malus: 'armure'
|
||
}
|
||
}
|
||
},
|
||
vigilance: {
|
||
nom: 'Vigilance',
|
||
main: 'SAG',
|
||
caracs: {
|
||
SAG: {
|
||
malus: 'casque'
|
||
},
|
||
}
|
||
},
|
||
};
|
||
|
||
on('change:repeating_competences:comp_carac', function(eventinfo) {
|
||
let carac = eventinfo.newValue;
|
||
if (!carac) return;
|
||
carac = carac.toLowerCase();
|
||
setAttrs({
|
||
repeating_competences_comp_jet: "@{" + carac + "_sup} + [[@{" + carac + "} + @{" + carac + "_bonus}]]"
|
||
});
|
||
});
|
||
|
||
on('change:repeating_competences:comp_bonusCapa', function(eventinfo) {
|
||
let bc = parseInt(eventinfo.newValue);
|
||
if (isNaN(bc)) bc = eventinfo.newValue;
|
||
else if (bc > 0) bc = '+' + bc;
|
||
else if (bc === 0) bc = '';
|
||
setAttrs({
|
||
repeating_competences_comp_bonusCapaText: bc
|
||
});
|
||
});
|
||
|
||
function bonusTotalCompetence(compValues, prefix, values) {
|
||
let bonusTotal = 0;
|
||
let bonus = parseInt(compValues[prefix + 'bonusCapa']);
|
||
if (!isNaN(bonus)) bonusTotal += bonus;
|
||
bonus = parseInt(compValues[prefix + 'bonus']);
|
||
if (!isNaN(bonus)) bonusTotal += bonus;
|
||
switch (compValues[prefix + 'malus']) {
|
||
case 'armure':
|
||
bonus = values.defarmureon * values.defarmuremalus + values.defbouclieron * values.defboucliermalus;
|
||
if (!isNaN(bonus)) bonusTotal -= bonus;
|
||
break;
|
||
case 'casque':
|
||
bonus = values.casque_on * values.casque_malus;
|
||
if (!isNaN(bonus)) bonusTotal -= bonus;
|
||
break;
|
||
}
|
||
var sa = {};
|
||
sa[prefix + 'bonusTotal'] = bonusTotal;
|
||
setAttrs(sa);
|
||
}
|
||
|
||
on('change:repeating_competences:comp_bonusCapa change:repeating_competences:comp_bonus change:repeating_competences:comp_malus', function(eventinfo) {
|
||
getAttrs(['repeating_competences_comp_bonusCapa', 'repeating_competences_comp_bonus', 'repeating_competences_comp_malus', 'defarmureon', 'defarmuremalus', 'defbouclieron', 'defboucliermalus', 'casque_on', 'casque_malus'], function(values) {
|
||
bonusTotalCompetence(values, 'repeating_competences_comp_', values);
|
||
});
|
||
});
|
||
|
||
on('change:defarmureon change:defarmuremalus change:defbouclieron change:defboucliermalus change:casque_on change:casque_malus', function(eventinfo) {
|
||
getAttrs(['defarmureon', 'defarmuremalus', 'defbouclieron', 'defboucliermalus', 'casque_on', 'casque_malus'], function(values) {
|
||
getSectionIDs('repeating_competences', function(idArray) {
|
||
idArray.forEach(function(id) {
|
||
var prefix = 'repeating_competences_' + id + '_comp_';
|
||
getAttrs([prefix + 'bonusCapa', prefix + 'bonus', prefix + 'malus'], function(compValues) {
|
||
bonusTotalCompetence(compValues, prefix, values);
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
on('change:repeating_competences:comp_nom change:repeating_competences:comp_nomCapa', function(eventinfo) {
|
||
getAttrs(['repeating_competences_comp_nom', 'repeating_competences_comp_nomCapa', 'repeating_competences_comp_carac', 'repeating_competences_comp_malus'], function(values) {
|
||
var nom = values.repeating_competences_comp_nom;
|
||
//Le nom doit être égal à nomCapa si il existe
|
||
var nomCapa = values.repeating_competences_comp_nomCapa;
|
||
if (nomCapa !== '' && nom != nomCapa) {
|
||
setAttrs({
|
||
repeating_competences_comp_nom: nomCapa
|
||
});
|
||
return;
|
||
}
|
||
var n = keyOfName(nom);
|
||
var c = competences[n];
|
||
if (c === undefined) return;
|
||
var carac = values.repeating_competences_comp_carac;
|
||
var sa = {};
|
||
var modif;
|
||
if (carac == 'FOR' && c.main != 'FOR') {
|
||
sa.repeating_competences_comp_carac = c.main;
|
||
carac = c.main;
|
||
modif = true;
|
||
}
|
||
carac = c.caracs[carac];
|
||
if (carac.malus && carac.malus != values.repeating_competences_comp_malus) {
|
||
sa.repeating_competences_comp_malus = carac.malus;
|
||
modif = true;
|
||
}
|
||
if (modif) setAttrs(sa);
|
||
});
|
||
});
|
||
|
||
on('change:repeating_competences:comp_carac', function(eventinfo) {
|
||
getAttrs(['repeating_competences_comp_nom', 'repeating_competences_comp_malus'], function(values) {
|
||
let nom = values.repeating_competences_comp_nom;
|
||
let n = keyOfName(nom);
|
||
let c = competences[n];
|
||
if (c === undefined) return;
|
||
let carac = c.caracs[eventinfo.newValue];
|
||
if (carac.malus && carac.malus != values.repeating_competences_comp_malus) {
|
||
setAttrs({
|
||
repeating_competences_comp_malus: carac.malus
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
let listeBouclier = [];
|
||
|
||
function porteArmure(values) {
|
||
return values.defarmureon == '1' && parseInt(values.defarmure) > 0;
|
||
}
|
||
|
||
function porteBouclier(values) {
|
||
return values.defbouclieron == '1' && parseInt(values.defbouclier) > 0;
|
||
}
|
||
|
||
function porteCasque(values) {
|
||
return values.casque_on == '1' && parseInt(values.casque_rd) > 0;
|
||
}
|
||
|
||
//Équipement
|
||
// Armures torse
|
||
function peuplerListeArmures(callback, doit) {
|
||
if (preventPopulate && !doit) return;
|
||
preventPopulate = true;
|
||
let optionsArmure = [{
|
||
label: 'aucune armure',
|
||
value: '0'
|
||
}];
|
||
let optionsCasque = [{
|
||
label: 'rien sur la tête',
|
||
value: '0'
|
||
}];
|
||
listeBouclier = [{
|
||
label: 'rien en main',
|
||
value: '0'
|
||
}];
|
||
getAttrs(['torseequipe', 'teteequipe', 'maingauche', 'defarmure', 'defarmureon', 'casque_rd', 'casque_on', 'defbouclier', 'defbouclieron'], function(vt) {
|
||
let armureActuelle = vt.torseequipe;
|
||
if (armureActuelle === '') {
|
||
if (porteArmure(vt)) armureActuelle = '-1';
|
||
else armureActuelle = '0';
|
||
}
|
||
let casqueActuel = vt.teteequipe;
|
||
if (casqueActuel === '') {
|
||
if (porteCasque(vt)) casqueActuel = '-1';
|
||
else casqueActuel = '0';
|
||
}
|
||
let bouclierActuel = vt.maingauche;
|
||
if (bouclierActuel === '') {
|
||
if (porteBouclier(vt)) bouclierActuel = 'b-1';
|
||
else bouclierActuel = '0';
|
||
}
|
||
let armureTrouvee;
|
||
let armureExiste;
|
||
let casqueTrouve;
|
||
let casqueExiste;
|
||
let bouclierTrouve;
|
||
let bouclierExiste;
|
||
if (armureActuelle == optionsArmure[0].value) {
|
||
armureTrouvee = true;
|
||
optionsArmure[0].selected = true;
|
||
}
|
||
if (casqueActuel == optionsCasque[0].value) {
|
||
casqueTrouve = true;
|
||
optionsCasque[0].selected = true;
|
||
}
|
||
if (bouclierActuel == listeBouclier[0].value) {
|
||
bouclierTrouve = true;
|
||
listeBouclier[0].selected = true;
|
||
}
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (!armureTrouvee) {
|
||
optionsArmure.push({
|
||
label: "armure inconnue",
|
||
value: -1,
|
||
selected: true
|
||
});
|
||
} else if (!armureExiste && parseInt(vt.defarmure) > 0) {
|
||
optionsArmure.push({
|
||
label: "armure inconnue",
|
||
value: -1,
|
||
});
|
||
}
|
||
if (!casqueTrouve) {
|
||
optionsCasque.push({
|
||
label: "casque inconnu",
|
||
value: -1,
|
||
selected: true
|
||
});
|
||
} else if (!casqueExiste && parseInt(vt.casque_rd) > 0) {
|
||
optionsCasque.push({
|
||
label: "casque inconnu",
|
||
value: -1,
|
||
});
|
||
}
|
||
if (!bouclierExiste && parseInt(vt.defbouclier) > 0) {
|
||
listeBouclier.push({
|
||
label: "bouclier inconnu",
|
||
value: "b-1",
|
||
selected: vt.defbouclieron
|
||
});
|
||
}
|
||
callback = callback || function(x) {
|
||
return;
|
||
};
|
||
populateListOptions({
|
||
elemSelector: '.listeArmuresTorse',
|
||
optionsArray: optionsArmure,
|
||
callback: function() {
|
||
populateListOptions({
|
||
elemSelector: '.listeArmuresCasque',
|
||
optionsArray: optionsCasque,
|
||
callback: function() {
|
||
callback(true);
|
||
preventPopulate = false;
|
||
}
|
||
});
|
||
}
|
||
});
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'nomarmure', prefix + 'typearmure'], function(values) {
|
||
switch (values[prefix + 'typearmure']) {
|
||
case 'Torse':
|
||
{
|
||
armureExiste = true;
|
||
let opt = {
|
||
label: values[prefix + 'nomarmure'],
|
||
value: values[prefix + 'labelarmure']
|
||
};
|
||
if (!armureTrouvee && armureActuelle == opt.value) {
|
||
armureTrouvee = true;
|
||
opt.selected = true;
|
||
}
|
||
optionsArmure.push(opt);
|
||
fin();
|
||
return;
|
||
}
|
||
case 'Casque':
|
||
{
|
||
casqueExiste = true;
|
||
let opt = {
|
||
label: values[prefix + 'nomarmure'],
|
||
value: values[prefix + 'labelarmure']
|
||
};
|
||
if (!casqueTrouve && casqueActuel == opt.value) {
|
||
casqueTrouve = true;
|
||
opt.selected = true;
|
||
}
|
||
optionsCasque.push(opt);
|
||
fin();
|
||
return;
|
||
}
|
||
case 'Bouclier':
|
||
{
|
||
bouclierExiste = true;
|
||
let opt = {
|
||
label: values[prefix + 'nomarmure'],
|
||
value: 'b' + values[prefix + 'labelarmure']
|
||
};
|
||
if (!bouclierTrouve && bouclierActuel == opt.value) {
|
||
bouclierTrouve = true;
|
||
opt.selected = true;
|
||
}
|
||
listeBouclier.push(opt);
|
||
fin();
|
||
return;
|
||
}
|
||
default:
|
||
fin();
|
||
}
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
function peuplerListeArmes(doit) {
|
||
if (preventPopulate && !doit) return;
|
||
let optionsDroite = [{
|
||
label: 'rien en main',
|
||
value: '0'
|
||
}];
|
||
let optionsGauche = [...listeBouclier];
|
||
getAttrs(['maindroite', 'maingauche'], function(vt) {
|
||
let mainDroite = vt.maindroite || '0';
|
||
let mainGauche = vt.maingauche || '0';
|
||
let armeTrouvee;
|
||
let armeGaucheTrouvee;
|
||
if (mainDroite == optionsDroite[0].value) {
|
||
armeTrouvee = true;
|
||
optionsDroite[0].selected = true;
|
||
}
|
||
if (mainGauche == optionsGauche[0].value) {
|
||
armeGaucheTrouvee = true;
|
||
optionsGauche[0].selected = true;
|
||
}
|
||
getSectionIDs('repeating_armes', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
let opt = {
|
||
label: 'torche',
|
||
value: 'Torche'
|
||
};
|
||
if (!armeTrouvee && mainDroite == opt.value) {
|
||
opt.selected = true;
|
||
armeTrouvee = true;
|
||
}
|
||
optionsDroite.push(opt);
|
||
optionsDroite.push({
|
||
label: 'autre objet',
|
||
value: 'Autre',
|
||
selected: !armeTrouvee
|
||
});
|
||
opt = {
|
||
label: 'tenu à 2 mains',
|
||
value: '2m'
|
||
};
|
||
if (!armeGaucheTrouvee && mainGauche == opt.value) {
|
||
opt.selected = true;
|
||
armeGaucheTrouvee = true;
|
||
}
|
||
optionsGauche.push(opt);
|
||
opt = {
|
||
label: 'torche',
|
||
value: 'Torche'
|
||
};
|
||
if (!armeGaucheTrouvee && mainGauche == opt.value) {
|
||
opt.selected = true;
|
||
armeGaucheTrouvee = true;
|
||
}
|
||
optionsGauche.push(opt);
|
||
optionsGauche.push({
|
||
label: 'autre objet',
|
||
value: 'Autre',
|
||
selected: !armeGaucheTrouvee
|
||
});
|
||
populateListOptions({
|
||
elemSelector: '.listeMainDroite',
|
||
optionsArray: optionsDroite,
|
||
callback: function() {
|
||
populateListOptions({
|
||
elemSelector: '.listeMainGauche',
|
||
optionsArray: optionsGauche,
|
||
});
|
||
}
|
||
});
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armes_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armenom', prefix + 'armetypeattaque', prefix + 'armedmnbde', prefix + 'armedmde', prefix + 'armeactionvisible'], function(values) {
|
||
if (values[prefix + 'armeactionvisible'] == '0') {
|
||
fin();
|
||
return;
|
||
}
|
||
let opt = {
|
||
label: values[prefix + 'armenom'],
|
||
value: values[prefix + 'armelabel']
|
||
};
|
||
if (!armeTrouvee && mainDroite == opt.value) {
|
||
armeTrouvee = true;
|
||
opt.selected = true;
|
||
}
|
||
optionsDroite.push(opt);
|
||
let typeArme = values[prefix + 'armetypeattaque'];
|
||
if (typeArme == 'Arme gauche' || (typeArme != 'Arme 2 mains' &&
|
||
parseInt(values[prefix + 'armedmnbde'] < 2) &&
|
||
parseInt(values[prefix + 'armedmde'] < 7))) {
|
||
let optG = {...opt
|
||
};
|
||
optG.selected = !armeGaucheTrouvee && mainGauche == optG.value;
|
||
if (optG.selected) armeGaucheTrouvee = true;
|
||
optionsGauche.push(optG);
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
let emplacements = {
|
||
Torse: {
|
||
slots: 1
|
||
},
|
||
Bouclier: {
|
||
slots: 1
|
||
},
|
||
Casque: {
|
||
slots: 1
|
||
},
|
||
Autre: {
|
||
slots: 1000
|
||
}
|
||
};
|
||
|
||
function peuplerListeEmplacements() {
|
||
let listeEmplacements = [{
|
||
value: 'Torse',
|
||
label: 'Torse',
|
||
}, {
|
||
value: 'Bouclier',
|
||
label: 'Bouclier'
|
||
}, {
|
||
value: 'Casque',
|
||
label: 'Casque'
|
||
}];
|
||
getSectionIDs('repeating_emplacements', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
listeEmplacements.push({
|
||
value: 'Autre',
|
||
label: 'Autre'
|
||
});
|
||
populateListOptions({
|
||
elemSelector: '.listeEmplacements',
|
||
optionsArray: listeEmplacements,
|
||
});
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_emplacements_' + id + '_';
|
||
getAttrs([prefix + 'nom', prefix + 'maxslots'], function(va) {
|
||
let e = va[prefix + 'nom'];
|
||
if (e) {
|
||
listeEmplacements.push({
|
||
value: e,
|
||
label: e
|
||
});
|
||
let se = {
|
||
slots: toInt(va[prefix + 'maxslots'], 1, 1),
|
||
prefix
|
||
};
|
||
emplacements[e] = se;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
let defaultEmpl = ['Torse', 'Casque', 'Bouclier', 'Autre'];
|
||
|
||
on('change:repeating_emplacements:nom', function(eventinfo) {
|
||
//On vérifie qu'il n'y a pas de doublon
|
||
let empl = new Set(defaultEmpl);
|
||
getAttrs(['repeating_emplacements_nom'], function(values) {
|
||
let e = values.repeating_emplacements_nom;
|
||
if (!e) return;
|
||
if (empl.has(e)) {
|
||
setAttrs({
|
||
repeating_emplacements_nom: ''
|
||
}, silent);
|
||
return;
|
||
}
|
||
let doublon;
|
||
getSectionIDs('repeating_emplacements', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (!doublon) peuplerListeEmplacements();
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_emplacements_' + id + '_';
|
||
getAttrs([prefix + 'nom'], function(va) {
|
||
let f = va[prefix + 'nom'];
|
||
if (!f) {
|
||
fin();
|
||
return;
|
||
}
|
||
if (empl.has(f)) {
|
||
if (f == e) {
|
||
doublon = true;
|
||
setAttrs({
|
||
repeating_emplacements_nom: ''
|
||
}, silent);
|
||
} else {
|
||
console.log("Doublon dans la liste d'emplacements : " + f);
|
||
removeRepeatingRow('repeating_emplacements_' + id);
|
||
}
|
||
} else empl.add(f);
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//t est l'emplacement (ou type d'armure). Si label est présent, on veut rajouter label, et on sait que sans label c'est ok
|
||
function checkSlots(t, label) {
|
||
let m = 1;
|
||
let et = emplacements[t];
|
||
if (et) {
|
||
m = et.slots;
|
||
if (!m) m = 1;
|
||
}
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let trop, removed;
|
||
let fin = function() {
|
||
if (trop) return; //on a alors fait l'appel final
|
||
n--;
|
||
if (n > 0) return;
|
||
if (label || removed) updateEmplacement(t);
|
||
};
|
||
let prev;
|
||
let nb = 0;
|
||
idArray.forEach(function(id) {
|
||
if (trop) return;
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'typearmure', prefix + 'labelarmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'typearmure'] != t ||
|
||
va[prefix + 'equipearmure'] != '1') {
|
||
fin();
|
||
return;
|
||
}
|
||
if (nb >= m) {
|
||
if (va[prefix + 'labelarmure'] == label) prefix = prev;
|
||
let sa = {};
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
setAttrs(sa, silent);
|
||
if (label) {
|
||
trop = true;
|
||
updateEmplacement(t);
|
||
} else {
|
||
removed = true;
|
||
fin();
|
||
}
|
||
} else {
|
||
nb++;
|
||
if (label && va[prefix + 'labelarmure'] != label) prev = prefix;
|
||
fin();
|
||
}
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
on('change:repeating_emplacements:maxslots', function(eventinfo) {
|
||
getAttrs(['repeating_emplacements_nom', 'repeating_emplacements_maxslots'], function(values) {
|
||
let e = values.repeating_emplacements_nom;
|
||
if (!e) return;
|
||
if (!emplacements[e]) {
|
||
peuplerListeEmplacements();
|
||
return;
|
||
}
|
||
let old = emplacements[e].slots;
|
||
emplacements[e].slots =
|
||
toInt(values.repeating_emplacements_maxslots, 1, 1);
|
||
if (old > emplacements[e].slots) checkSlots(e);
|
||
});
|
||
});
|
||
|
||
on('change:torseequipe', function(eventinfo) {
|
||
//torseequipe_max est le label d'armure par défaut
|
||
getAttrs(['torseequipe', 'torseequipe_max', 'defarmureon', 'defarmure', 'defarmuremalus'], function(values) {
|
||
let set;
|
||
let sa = {};
|
||
if (values.torseequipe == '0') { //On déséquipe
|
||
if (values.defarmureon != '0') {
|
||
sa.defarmureon = '0';
|
||
set = true;
|
||
}
|
||
//Il faut aussi décocher l'armure dans la liste
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (set) setAttrs(sa, silent);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'typearmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'equipearmure'] == '1' && va[prefix + 'typearmure'] == 'Torse') {
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
set = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
return;
|
||
} //On équipe une armure
|
||
if (values.torseequipe && values.torseequipe_max != values.torseequipe) {
|
||
sa.torseequipe_max = values.torseequipe;
|
||
set = true;
|
||
}
|
||
if (values.defarmureon == '0') {
|
||
sa.defarmureon = '1';
|
||
set = true;
|
||
}
|
||
//On cherche l'armure correspondante dans la liste d'équipements
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (set) setAttrs(sa, silent);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'bonusarmure', prefix + 'malusarmure', prefix + 'typearmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'labelarmure'] == values.torseequipe) {
|
||
if (va[prefix + 'bonusarmure'] != values.defarmure) {
|
||
sa.defarmure = va[prefix + 'bonusarmure'];
|
||
set = true;
|
||
}
|
||
if (va[prefix + 'malusarmure'] != values.defarmuremalus) {
|
||
sa.defarmuremalus = va[prefix + 'malusarmure'];
|
||
set = true;
|
||
}
|
||
if (va[prefix + 'equipearmure'] != '1') {
|
||
sa[prefix + 'equipearmure'] = '1';
|
||
set = true;
|
||
}
|
||
} else if (va[prefix + 'equipearmure'] == '1' && va[prefix + 'typearmure'] == 'Torse') {
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
set = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
on('change:repeating_armures:bonusarmure', function(eventinfo) {
|
||
getAttrs(['repeating_armures_bonusarmure', 'repeating_armures_labelarmure', 'torseequipe', 'teteequipe', 'maingauche', 'typemaingauche'], function(value) {
|
||
if (value.torseequipe == value.repeating_armures_labelarmure) {
|
||
setAttrs({
|
||
defarmure: value.repeating_armures_bonusarmure
|
||
}, {
|
||
silent: true
|
||
});
|
||
} else if (value.teteequipe == value.repeating_armures_labelarmure) {
|
||
setAttrs({
|
||
casque_rd: value.repeating_armures_bonusarmure
|
||
}, {
|
||
silent: true
|
||
});
|
||
} else if (value.typemaingauche == 'Bouclier' && value.maingauche == value.repeating_armures_labelarmure) {
|
||
setAttrs({
|
||
defbouclier: value.repeating_armures_bonusarmure
|
||
}, {
|
||
silent: true
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('change:repeating_armures:malusarmure', function(eventinfo) {
|
||
getAttrs(['repeating_armures_malusarmure', 'repeating_armures_labelarmure',
|
||
'torseequipe', 'teteequipe', 'maingauche', 'typemaingauche'
|
||
], function(value) {
|
||
if (value.torseequipe == value.repeating_armures_labelarmure) {
|
||
setAttrs({
|
||
defarmuremalus: value.repeating_armures_malusarmure
|
||
}, {
|
||
silent: true
|
||
});
|
||
} else if (value.teteequipe == value.repeating_armures_labelarmure) {
|
||
setAttrs({
|
||
casque_malus: value.repeating_armures_malusarmure
|
||
}, {
|
||
silent: true
|
||
});
|
||
} else if (value.typemaingauche == 'Bouclier' && value.maingauche == value.repeating_armures_labelarmure) {
|
||
setAttrs({
|
||
defboucliermalus: value.repeating_armures_bonusarmure
|
||
}, {
|
||
silent: true
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
on('change:defarmureon', function(enventInfo) {
|
||
getAttrs(['defarmureon', 'defarmure', 'defarmuremalus', 'torseequipe', 'torseequipe_max'], function(values) {
|
||
if (values.defarmureon == '0') {
|
||
let sa = {
|
||
torseequipe: '0'
|
||
};
|
||
if (values.torseequipe && values.torseequipe != '0') sa.torseequipe_max = values.torseequipe;
|
||
setAttrs(sa);
|
||
return;
|
||
}
|
||
if (values.torseequipe && values.torseequipe != '0') return; //armure déjà équipée
|
||
//On met une armure
|
||
let nouvelleArmure = '-1';
|
||
if (values.torseequipe_max) nouvelleArmure = values.torseequipe_max;
|
||
let sa = {
|
||
torseequipe: nouvelleArmure
|
||
};
|
||
if (nouvelleArmure == '-1') {
|
||
setAttrs(sa, silent);
|
||
return;
|
||
}
|
||
//On cherche la nouvelle armure pour mettre à jour les valeurs
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let armureTrouvee;
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
setAttrs(sa);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
if (armureTrouvee) {
|
||
fin();
|
||
return;
|
||
}
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'bonusarmure', prefix + 'malusarmure'], function(va) {
|
||
if (va[prefix + 'labelarmure'] == nouvelleArmure) {
|
||
armureTrouvee = true;
|
||
if (va[prefix + 'bonusarmure'] != values.defarmure) {
|
||
sa.defarmure = va[prefix + 'bonusarmure'];
|
||
}
|
||
if (va[prefix + 'malusarmure'] != values.defarmuremalus) {
|
||
sa.defarmuremalus = va[prefix + 'malusarmure'];
|
||
}
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//Casques
|
||
on('change:teteequipe', function(eventinfo) {
|
||
//teteequipe_max est le label d'armure par défaut
|
||
getAttrs(['teteequipe', 'teteequipe_max', 'casque_on', 'casque_rd', 'casque_malus'], function(values) {
|
||
let set;
|
||
let sa = {};
|
||
if (values.teteequipe == '0') { //On déséquipe
|
||
if (values.casque_on != '0') {
|
||
sa.casque_on = '0';
|
||
set = true;
|
||
}
|
||
//Il faut aussi décocher le casque dans la liste
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (set) setAttrs(sa, silent);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'typearmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'equipearmure'] == '1' && va[prefix + 'typearmure'] == 'Casque') {
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
set = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
return;
|
||
} //On équipe un casque
|
||
if (values.teteequipe && values.teteequipe_max != values.teteequipe) {
|
||
sa.teteequipe_max = values.teteequipe;
|
||
set = true;
|
||
}
|
||
if (values.casque_on == '0') {
|
||
sa.casque_on = '1';
|
||
set = true;
|
||
}
|
||
//On cherche l'armure correspondante dans la liste d'équipements
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (set) setAttrs(sa, silent);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'bonusarmure', prefix + 'malusarmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'labelarmure'] == values.teteequipe) {
|
||
if (va[prefix + 'bonusarmure'] != values.casque_rd) {
|
||
sa.casque_rd = va[prefix + 'bonusarmure'];
|
||
set = true;
|
||
}
|
||
if (va[prefix + 'malusarmure'] != values.casque_malus) {
|
||
sa.casque_malus = va[prefix + 'malusarmure'];
|
||
set = true;
|
||
}
|
||
if (va[prefix + 'equipearmure'] != '1') {
|
||
sa[prefix + 'equipearmure'] = '1';
|
||
set = true;
|
||
}
|
||
} else if (va[prefix + 'equipearmure'] == '1' && va[prefix + 'typearmure'] == 'Casque') {
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
set = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//cascade, pour mettre à jour la liste d'équipements
|
||
on('change:casque_on', function(enventInfo) {
|
||
getAttrs(['casque_on', 'casque_rd', 'casque_malus', 'teteequipe', 'teteequipe_max'], function(values) {
|
||
if (values.casque_on == '0') {
|
||
let sa = {
|
||
teteequipe: '0'
|
||
};
|
||
if (values.teteequipe) sa.teteequipe_max = values.teteequipe;
|
||
setAttrs(sa);
|
||
return;
|
||
}
|
||
if (values.teteequipe && values.teteequipe != '0') return;
|
||
//On met une armure
|
||
let nouvelleArmure = '-1';
|
||
if (values.teteequipe_max) nouvelleArmure = values.teteequipe_max;
|
||
let sa = {
|
||
teteequipe: nouvelleArmure
|
||
};
|
||
if (nouvelleArmure == '-1') {
|
||
setAttrs(sa, silent);
|
||
return;
|
||
}
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let casqueTrouve;
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
setAttrs(sa);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
if (casqueTrouve) {
|
||
fin();
|
||
return;
|
||
}
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'bonusarmure', prefix + 'malusarmure'], function(va) {
|
||
if (va[prefix + 'labelarmure'] == nouvelleArmure) {
|
||
casqueTrouve = true;
|
||
if (va[prefix + 'bonusarmure'] != values.casque_rd) {
|
||
sa.casque_rd = va[prefix + 'bonusarmure'];
|
||
}
|
||
if (va[prefix + 'malusarmure'] != values.casque_malus) {
|
||
sa.casque_malus = va[prefix + 'malusarmure'];
|
||
}
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//Boucliers
|
||
on('change:maingauche', function(eventinfo) {
|
||
getAttrs(['maingauche', 'maingauche_max', 'defbouclieron', 'defbouclier', 'defboucliermalus', 'montrerattaquegauche'], function(values) {
|
||
//Les boucliers sont codés par une valeur commençant par 'b'
|
||
if (values.maingauche && values.maingauche.startsWith('b')) {
|
||
let set;
|
||
let sa = {};
|
||
if (values.montrerattaquegauche == '1') {
|
||
set = true;
|
||
sa.montrerattaquegauche = '0';
|
||
}
|
||
let label = values.maingauche.substring(1);
|
||
if (values.maingauche_max != label) {
|
||
sa.maingauche_max = label;
|
||
set = true;
|
||
}
|
||
if (values.defbouclieron == '0') {
|
||
sa.defbouclieron = '1';
|
||
set = true;
|
||
}
|
||
//On cherche l'armure correspondante dans la liste d'équipements
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let bouclierTrouve;
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
getPredicates(function(pred) {
|
||
if (pred.attaqueAuBouclier) {
|
||
set = true;
|
||
sa.montrerattaquegauche = '1';
|
||
}
|
||
if (set) setAttrs(sa, silent);
|
||
});
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'bonusarmure', prefix + 'malusarmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'labelarmure'] == label) {
|
||
bouclierTrouve = true;
|
||
if (va[prefix + 'bonusarmure'] != values.defbouclier) {
|
||
sa.defbouclier = va[prefix + 'bonusarmure'];
|
||
set = true;
|
||
}
|
||
if (va[prefix + 'malusarmure'] != values.defboucliermalus) {
|
||
sa.defboucliermalus = va[prefix + 'malusarmure'];
|
||
set = true;
|
||
}
|
||
if (va[prefix + 'equipearmure'] != '1') {
|
||
sa[prefix + 'equipearmure'] = '1';
|
||
set = true;
|
||
}
|
||
} else if (va[prefix + 'equipearmure'] == '1' && va[prefix + 'typearmure'] == 'Bouclier') {
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
set = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
return;
|
||
}
|
||
//pas de bouclier
|
||
let set;
|
||
let sa = {};
|
||
if (values.defbouclieron != '0') {
|
||
sa.defbouclieron = '0';
|
||
set = true;
|
||
}
|
||
//On a peut-être une arme
|
||
let label = values.maingauche;
|
||
//On cherche l'arme correspondante dans la liste d'équipements
|
||
getSectionIDs('repeating_armes', function(armeArray) {
|
||
//De plus, on va déséquiper les boucliers si besoin
|
||
getSectionIDs('repeating_armures', function(armuresArray) {
|
||
let armeTrouvee;
|
||
let n = armeArray.length + armuresArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (armeTrouvee && values.montrerattaquegauche == '0') {
|
||
set = true;
|
||
sa.montrerattaquegauche = '1';
|
||
} else if (!armeTrouvee && values.montrerattaquegauche == '1') {
|
||
set = true;
|
||
sa.montrerattaquegauche = '0';
|
||
}
|
||
if (set) setAttrs(sa, silent);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
armeArray.forEach(function(id) {
|
||
if (armeTrouvee) {
|
||
fin();
|
||
return;
|
||
}
|
||
let prefix = 'repeating_armes_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armetypeattaque'], function(va) {
|
||
if (!armeTrouvee && va[prefix + 'armelabel'] == label) {
|
||
armeTrouvee = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
armuresArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'typearmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'equipearmure'] == '1' && va[prefix + 'typearmure'] == 'Bouclier') {
|
||
sa[prefix + 'equipearmure'] = '0';
|
||
set = true;
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//cascade pour mettreà jour les objets équipés
|
||
on('change:defbouclieron', function(enventInfo) {
|
||
getAttrs(['defbouclieron', 'defbouclier', 'defboucliermalus',
|
||
'maingauche', 'maingauche_max'
|
||
], function(values) {
|
||
if (values.defbouclieron == '0') {
|
||
if (values.maingauche && values.maingauche.startsWith('b')) {
|
||
setAttrs({
|
||
maingauche: '0',
|
||
maingauche_max: values.maingauche.substring(1)
|
||
});
|
||
}
|
||
return;
|
||
}
|
||
if (values.maingauche && values.maingauche.startsWith('b')) return;
|
||
//On met un bouclier
|
||
let nouvelleArmure = '-1';
|
||
if (values.maingauche_max) nouvelleArmure = values.maingauche_max;
|
||
let sa = {
|
||
maingauche: 'b' + nouvelleArmure
|
||
};
|
||
if (nouvelleArmure == '-1') {
|
||
setAttrs(sa, silent);
|
||
return;
|
||
}
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let bouclierTrouve;
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
setAttrs(sa);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
if (bouclierTrouve) {
|
||
fin();
|
||
return;
|
||
}
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'labelarmure', prefix + 'bonusarmure', prefix + 'malusarmure'], function(va) {
|
||
if (va[prefix + 'labelarmure'] == nouvelleArmure) {
|
||
bouclierTrouve = true;
|
||
if (va[prefix + 'bonusarmure'] != values.defbouclier) {
|
||
sa.defbouclier = va[prefix + 'bonusarmure'];
|
||
}
|
||
if (va[prefix + 'malusarmure'] != values.deboucliermalus) {
|
||
sa.defboucliermalus = va[prefix + 'malusarmure'];
|
||
}
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//Mis à jour de ce qui est visible comme équipé depuis la liste des emplacemens
|
||
function updateEmplacement(e) {
|
||
let et = emplacements[e];
|
||
if (!et || !et.prefix) return;
|
||
let objets = '';
|
||
getSectionIDs('repeating_armures', function(idArray) {
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
getAttrs([et.prefix + 'objets'], function(values) {
|
||
let old = values[et.prefix + 'objets'];
|
||
if (old != objets) {
|
||
let sa = {};
|
||
sa[et.prefix + 'objets'] = objets;
|
||
setAttrs(sa, silent);
|
||
}
|
||
});
|
||
};
|
||
if (n === 0) fin();
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armures_' + id + '_';
|
||
getAttrs([prefix + 'typearmure', prefix + 'nomarmure', prefix + 'equipearmure'], function(va) {
|
||
if (va[prefix + 'equipearmure'] != '1' || va[prefix + 'typearmure'] != e) {
|
||
fin();
|
||
return;
|
||
}
|
||
if (!objets) objets = va[prefix + 'nomarmure'];
|
||
else objets += ', ' + va[prefix + 'nomarmure'];
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
//équipement depuis la liste d'objets, cascade
|
||
on('change:repeating_armures:equipearmure', function(eventinfo) {
|
||
getAttrs(['repeating_armures_equipearmure', 'repeating_armures_labelarmure', 'repeating_armures_typearmure', 'torseequipe', 'teteequipe', 'maingauche', 'montrerattaquegauche'], function(values) {
|
||
let label = values.repeating_armures_labelarmure;
|
||
if (values.repeating_armures_equipearmure == '1') {
|
||
//On équipe
|
||
switch (values.repeating_armures_typearmure) {
|
||
case 'Torse':
|
||
{
|
||
if (values.torseequipe == label) return;
|
||
setAttrs({
|
||
torseequipe: label
|
||
}); //cascade
|
||
return;
|
||
}
|
||
case 'Casque':
|
||
{
|
||
if (values.teteequipe == label) return;
|
||
setAttrs({
|
||
teteequipe: label
|
||
}); //cascade
|
||
return;
|
||
}
|
||
case 'Bouclier':
|
||
{
|
||
label = 'b' + label;
|
||
if (values.maingauche == label) return;
|
||
setAttrs({
|
||
maingauche: label
|
||
}); //cascade
|
||
return;
|
||
}
|
||
case 'Autre':
|
||
return;
|
||
default: //vérifier le nombre équipés, et en enlever s'il y en a trop
|
||
let t = values.repeating_armures_typearmure;
|
||
checkSlots(t, label);
|
||
return;
|
||
}
|
||
}
|
||
//On déséquipe
|
||
if (label == '0') return;
|
||
switch (values.repeating_armures_typearmure) {
|
||
case 'Torse':
|
||
{
|
||
if (values.torseequipe != label) return;
|
||
setAttrs({
|
||
torseequipe: '0'
|
||
}); //cascade
|
||
return;
|
||
}
|
||
case 'Casque':
|
||
{
|
||
if (values.teteequipe != label) return;
|
||
setAttrs({
|
||
teteequipe: '0'
|
||
}); //cascade
|
||
return;
|
||
}
|
||
case 'Bouclier':
|
||
{
|
||
label = 'b' + label;
|
||
if (values.maingauche != label) return;
|
||
setAttrs({
|
||
maingauche: '0'
|
||
}); //cascade
|
||
return;
|
||
}
|
||
default:
|
||
return; //rien à faire pour l'instant
|
||
}
|
||
});
|
||
});
|
||
|
||
//Bouton d'attaque
|
||
on('clicked:maindroite', function(info) {
|
||
getAttrs(['maindroite'], function(vt) {
|
||
boutonAttaque(vt.maindroite);
|
||
});
|
||
});
|
||
|
||
on('clicked:maingauche', function(info) {
|
||
getAttrs(['maingauche'], function(vt) {
|
||
let label = vt.maingauche;
|
||
if (label.startsWith('b')) {
|
||
getPredicates(function(pred) {
|
||
boutonAttaque(pred.attaqueAuBouclier);
|
||
});
|
||
} else {
|
||
boutonAttaque(label);
|
||
}
|
||
});
|
||
});
|
||
|
||
function boutonAttaque(label) {
|
||
getSectionIDs('repeating_armes', function(idArray) {
|
||
let armeTrouvee;
|
||
let nom = 'Arme inconnue';
|
||
let nbde = '1';
|
||
let de = '20';
|
||
let attrollmod = '';
|
||
let crit = '20';
|
||
let atk = '@{ATKCAC}';
|
||
let div = '0';
|
||
let bonusoption = '0';
|
||
let reussiteauto = '{{attaqueautomatique=}}';
|
||
let poudre = '{{poudre=}}';
|
||
let dmnbde = '1';
|
||
let dmde = '6';
|
||
let dmrollmod = '';
|
||
let dmcar = '@{FOR}';
|
||
let dmdiv = '0';
|
||
let degats = '{{degats=[[(' + dmnbde + 'd' + dmde + dmrollmod + '+[[' + dmcar + ']]+' + dmdiv + ')@{division_attaque_assuree}]]}}';
|
||
let spec = '';
|
||
let dmtemp = '';
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (!armeTrouvee) {
|
||
console.log("Pas d'arme trouvée");
|
||
}
|
||
let jet = "@{jets_caches}&{template:co1} {{perso=@{displayname}}}";
|
||
jet += " {{name=" + nom + "}}";
|
||
let jetAttaque = nbde + 'd' + de + attrollmod + 'cs>' + crit + 'cf1 + [[' + atk + ']] + ' + div + ' +@{bonus_attaque_option} +' + bonusoption;
|
||
jet += " {{subtags=Attaque}} {{attaque=[[" + jetAttaque + "]]}}";
|
||
jet += " " + reussiteauto;
|
||
jet += " " + poudre;
|
||
jet += " " + degats;
|
||
jet += " {{special=" + spec + "}}";
|
||
jet += " {{degats2=@{bonus_dm_option}}} {{dmtemp=" + dmtemp + "}}";
|
||
startRoll(jet, function(results) {
|
||
finishRoll(results.rollId);
|
||
});
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
let prefix = 'repeating_armes_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armenom', prefix + 'armeattnbde', prefix + 'armeattde', prefix + 'armeattrollmod', prefix + 'armecrit', prefix + 'armeatk', prefix + 'armeatkdiv', prefix + 'armebonusoption', prefix + 'armereussiteauto', prefix + 'armepoudre', prefix + 'armedmnbde', prefix + 'armedmde', prefix + 'armedmrollmod', prefix + 'armedmcar', prefix + 'armedmdiv', prefix + 'armedegats', prefix + 'armespec', prefix + 'armedmtemp'], function(values) {
|
||
if (!armeTrouvee && label == values[prefix + 'armelabel']) {
|
||
armeTrouvee = true;
|
||
nom = values[prefix + 'armenom'];
|
||
nbde = values[prefix + 'armeattnbde'];
|
||
de = values[prefix + 'armeattde'];
|
||
attrollmod = values[prefix + 'armeattrollmod'];
|
||
crit = values[prefix + 'armecrit'];
|
||
atk = values[prefix + 'armeatk'];
|
||
div = values[prefix + 'armeatkdiv'];
|
||
bonusoption = values[prefix + 'armebonusoption'];
|
||
reussiteauto = values[prefix + 'armereussiteauto'];
|
||
poudre = values[prefix + 'armepoudre'];
|
||
dmnbde = values[prefix + 'armedmnbde'];
|
||
dmde = values[prefix + 'armedmde'];
|
||
dmrollmod = values[prefix + 'armedmrollmod'];
|
||
dmcar = values[prefix + 'armedmcar'];
|
||
dmdiv = values[prefix + 'armedmdiv'];
|
||
degats = values[prefix + 'armedmdiv'];
|
||
if (degats != '{{degats=}}')
|
||
degats = '{{degats=[[(' + dmnbde + 'd' + dmde + dmrollmod + '+[[' + dmcar + ']]+' + dmdiv + ')@{division_attaque_assuree}]]}}';
|
||
spec = values[prefix + 'armespec'];
|
||
dmtemp = values[prefix + 'armedmtemp'];
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
}
|
||
|
||
//cascade, pour pouvoir enlever le bouclier
|
||
on('change:maindroite', function(eventinfo) {
|
||
getAttrs(['maindroite', 'maingauche', 'montrerattaquedroite'], function(values) {
|
||
let set;
|
||
let sa = {};
|
||
let label = values.maindroite;
|
||
if (label == '0') {
|
||
if (values.montrerattaquedroite == '1') {
|
||
set = true;
|
||
sa.montrerattaquedroite = '0';
|
||
}
|
||
if (values.maingauche == '2m') {
|
||
set = true;
|
||
sa.maingauche = '0';
|
||
}
|
||
if (set) setAttrs(sa, silent);
|
||
return;
|
||
}
|
||
//On cherche l'arme correspondante dans la liste d'équipements
|
||
getSectionIDs('repeating_armes', function(idArray) {
|
||
let armeTrouvee;
|
||
let n = idArray.length;
|
||
let fin = function() {
|
||
n--;
|
||
if (n > 0) return;
|
||
if (armeTrouvee && values.montrerattaquedroite == '0') {
|
||
set = true;
|
||
sa.montrerattaquedroite = '1';
|
||
} else if (!armeTrouvee && values.montrerattaquedroite == '1') {
|
||
set = true;
|
||
sa.montrerattaquedroite = '0';
|
||
}
|
||
if (set) setAttrs(sa);
|
||
};
|
||
if (n === 0) {
|
||
fin();
|
||
return;
|
||
}
|
||
idArray.forEach(function(id) {
|
||
if (armeTrouvee) {
|
||
fin();
|
||
return;
|
||
}
|
||
let prefix = 'repeating_armes_' + id + '_';
|
||
getAttrs([prefix + 'armelabel', prefix + 'armetypeattaque'], function(va) {
|
||
if (!armeTrouvee && va[prefix + 'armelabel'] == label) {
|
||
armeTrouvee = true;
|
||
if (va[prefix + 'armetypeattaque'] == 'Arme 2 mains') {
|
||
if (values.maingauche != '2m') {
|
||
set = true;
|
||
sa.maingauche = '2m';
|
||
}
|
||
} else {
|
||
if (values.maingauche == '2m') {
|
||
set = true;
|
||
sa.maingauche = '0';
|
||
}
|
||
}
|
||
}
|
||
fin();
|
||
});
|
||
});
|
||
});
|
||
});
|
||
});
|
||
|
||
//Les capacités
|
||
|
||
/*let capacites = {
|
||
mecanismes: {
|
||
voie: "voie de l'artilleur",
|
||
rang: 1,
|
||
texte: "l’arquebusier obtient un bonus de +1 par Rang dans cette voie à tous les tests visant à réparer ou à comprendre des mécanismes (cela inclut le fait de désamorcer des pièges mécaniques et de manipuler des armes de siège). Il peut appliquer ce bonus à tous les tests d’attaque avec des armes de siège (baliste, couleuvrine, canon, trébuchet, catapulte, etc.).",
|
||
bonus: [{
|
||
type: 'competence',
|
||
nom: 'Mécanique',
|
||
valeur: 'rang'
|
||
}, {
|
||
type: 'competence',
|
||
nom: 'Désamorçage',
|
||
valeur: 'rang'
|
||
}, ]
|
||
},
|
||
};*/
|
||
</script>
|