EdC V1.1 update
- Added : magic tab - Added : simple roll at the top of the sheet - Updated : changing an injury level now update the others accordingly - Fixed : skill aspect name not updating when source aspect is changed
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
.sheet-info,
|
||||
.sheet-field,
|
||||
.sheet-stuff,
|
||||
.sheet-magie,
|
||||
.sheet-advantage{
|
||||
display: none;
|
||||
padding: 1.5em;
|
||||
@@ -92,7 +93,7 @@
|
||||
}
|
||||
|
||||
|
||||
.sheet-modal label span, .sheet-path [name='act_modaltrue'] {
|
||||
.sheet-modal label span, .sheet-path [name='act_modaltrue'], .sheet-magie [name='act_modaltrue'] {
|
||||
background-color: transparent;
|
||||
color: black;
|
||||
transition : all 0.3s ease;
|
||||
@@ -111,7 +112,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sheet-modal label input:checked ~ span, .sheet-path [name='act_modaltrue']:hover {
|
||||
.sheet-modal label input:checked ~ span, .sheet-path [name='act_modaltrue']:hover, .sheet-magie [name='act_modaltrue']:hover {
|
||||
color: #db569b;
|
||||
border-color: #db569b;
|
||||
}
|
||||
@@ -151,6 +152,7 @@
|
||||
.sheet-tabstoggle[value="path"] ~ div.sheet-path,
|
||||
.sheet-tabstoggle[value="info"] ~ div.sheet-info,
|
||||
.sheet-tabstoggle[value="field"] ~ div.sheet-field,
|
||||
.sheet-tabstoggle[value="magie"] ~ div.sheet-magie,
|
||||
.sheet-tabstoggle[value="stuff"] ~ div.sheet-stuff,
|
||||
.sheet-tabstoggle[value="advantage"] ~ div.sheet-advantage {
|
||||
display: block;
|
||||
@@ -161,6 +163,7 @@
|
||||
.sheet-tabstoggle[value="path"] ~ div [name=act_path],
|
||||
.sheet-tabstoggle[value="info"] ~ div [name=act_info],
|
||||
.sheet-tabstoggle[value="field"] ~ div [name=act_field],
|
||||
.sheet-tabstoggle[value="magie"] ~ div [name=act_magie],
|
||||
.sheet-tabstoggle[value="stuff"] ~ div [name=act_stuff],
|
||||
.sheet-tabstoggle[value="advantage"] ~ div [name=act_advantage] {
|
||||
color: #db569b;
|
||||
@@ -172,6 +175,7 @@
|
||||
.sheet-tabstoggle[value="path"] ~ div [name=act_path] span,
|
||||
.sheet-tabstoggle[value="info"] ~ div [name=act_info] span,
|
||||
.sheet-tabstoggle[value="field"] ~ div [name=act_field] span,
|
||||
.sheet-tabstoggle[value="magie"] ~ div [name=act_magie] span,
|
||||
.sheet-tabstoggle[value="stuff"] ~ div [name=act_stuff] span,
|
||||
.sheet-tabstoggle[value="advantage"] ~ div [name=act_advantage] span {
|
||||
position: absolute;
|
||||
@@ -188,6 +192,7 @@
|
||||
.sheet-tabstoggle[value="path"] ~ div [name=act_path] span:nth-child(1),
|
||||
.sheet-tabstoggle[value="info"] ~ div [name=act_info] span:nth-child(1),
|
||||
.sheet-tabstoggle[value="field"] ~ div [name=act_field] span:nth-child(1),
|
||||
.sheet-tabstoggle[value="magie"] ~ div [name=act_magie] span:nth-child(1),
|
||||
.sheet-tabstoggle[value="stuff"] ~ div [name=act_stuff] span:nth-child(1),
|
||||
.sheet-tabstoggle[value="advantage"] ~ div [name=act_advantage] span:nth-child(1) {
|
||||
background-image: url('https://lh3.googleusercontent.com/pw/ACtC-3csmQHTvBiBqDJne8K2hlMKNFv-CLGVrqfwzvYbJBI47hVM5XVK_m1SZG-j2VT-xaAKQJefSsGgpwhNgUJ9DfFlUP9hdCyBRg00lRoPFdYu7Giva9lI2w7HBQbj1MvEhFIbFTGagxcYdtxlLfRKGg8t4Q=w48-h37-no?authuser=0');
|
||||
@@ -200,6 +205,7 @@
|
||||
.sheet-tabstoggle[value="path"] ~ div [name=act_path] span:nth-child(2),
|
||||
.sheet-tabstoggle[value="info"] ~ div [name=act_info] span:nth-child(2),
|
||||
.sheet-tabstoggle[value="field"] ~ div [name=act_field] span:nth-child(2),
|
||||
.sheet-tabstoggle[value="magie"] ~ div [name=act_magie] span:nth-child(2),
|
||||
.sheet-tabstoggle[value="stuff"] ~ div [name=act_stuff] span:nth-child(2),
|
||||
.sheet-tabstoggle[value="advantage"] ~ div [name=act_advantage] span:nth-child(2) {
|
||||
background-image: url('https://lh3.googleusercontent.com/pw/ACtC-3dig12iVccXHjyBvw9EHpkd3LnUK53KDY8Nlvcl5L0a3GwuGyKiGHpTE6uOOfukKWPdZ_mW7fJ4VSX3QCDh8mVn8g1JwJTEH7Hw5i3P5Gjc1DfLQItGNkpCZFziCbFKK4Ed5tsPO8PapXsVgbUImpeRmQ=w58-h54-no?authuser=0');
|
||||
@@ -212,6 +218,7 @@
|
||||
.sheet-tabstoggle[value="path"] ~ div [name=act_path] span:nth-child(3),
|
||||
.sheet-tabstoggle[value="info"] ~ div [name=act_info] span:nth-child(3),
|
||||
.sheet-tabstoggle[value="field"] ~ div [name=act_field] span:nth-child(3),
|
||||
.sheet-tabstoggle[value="magie"] ~ div [name=act_magie] span:nth-child(3),
|
||||
.sheet-tabstoggle[value="stuff"] ~ div [name=act_stuff] span:nth-child(3),
|
||||
.sheet-tabstoggle[value="advantage"] ~ div [name=act_advantage] span:nth-child(3) {
|
||||
background-image: url('https://lh3.googleusercontent.com/pw/ACtC-3ckNowHdOSTaSsBvuKhb55WlaUBETtUCjRNA8BKNGIdAU0eY0C66t2vozlTStWcVC4BFtnxanKF2fQM5WrhHT0E1pTcT83U12wZY1itkwe7A20yjVhNij02J4knXY2FXsbT_3W7mwligrK0puB4JoIFsg=w61-h43-no?authuser=0');
|
||||
@@ -519,12 +526,12 @@ input {
|
||||
border-radius: 0;
|
||||
font-family: 'Architects Daughter', cursive;
|
||||
font-weight: 900;
|
||||
font-size: 20px ;
|
||||
font-size: 18px ;
|
||||
margin: 10px;
|
||||
margin-top: 1em;
|
||||
box-shadow : none;
|
||||
border : 1px solid black;
|
||||
padding : 10px 20px;
|
||||
padding : 10px 18px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
@@ -575,7 +582,7 @@ input {
|
||||
/*************************************************/
|
||||
|
||||
|
||||
.sheet-field, .sheet-path{
|
||||
.sheet-field, .sheet-path, .sheet-magie{
|
||||
background-image: url('https://lh3.googleusercontent.com/pw/ACtC-3fTzjmZRH7haOXA72Cii5euWoOjmwJlg0VCo-uaRRpMBQ-UrMaP3Q2ed9bvMjUWThw9S4AFAEdlR0lhFbPN7BEV0ZAu4bZ_MgWSpjh8QjFer8YGxSRE7cdnF652mBz7HgQSN7j5pGj1RRVT-41KMrN9=w599-h937-no?authuser=0');
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom left;
|
||||
@@ -718,11 +725,11 @@ input {
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.sheet-techniques{
|
||||
.sheet-techniques, .sheet-magies{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sheet-techniques .repitem{
|
||||
.sheet-techniques .repitem, .sheet-magies .repitem{
|
||||
width: 49%;
|
||||
display: inline-block;
|
||||
max-width: 450px;
|
||||
@@ -772,7 +779,7 @@ input {
|
||||
background-color: white;
|
||||
background-image: url(https://imgsrv.roll20.net/?src=https%3A//lh3.googleusercontent.com/pw/ACtC-3cWAcftXDquAPtdF3BEzJaTgNCSRX5QWPPLLm52UHkA5UN527Wc7saEdL99mh0XFBLkoiruQvfih5z2qrj5LxdOhHv-4kx5riKEubxJ_s2kFvfSrZVnDRAITuuk5RA983UgRVQifIcvHLDP-tj4Sj_R%3Dw1153-h825-no%3Fauthuser%3D0);
|
||||
background-size: 150px;
|
||||
background-position: 93% 5%;
|
||||
background-position: 93% 9px;
|
||||
background-repeat: no-repeat;
|
||||
color: black;
|
||||
padding: 0 10px;
|
||||
|
||||
+198
-71
@@ -10,12 +10,17 @@
|
||||
<p><span class='title'>Nom :</span> <input disabled name="attr_character_name" type="text" /></p>
|
||||
</div>
|
||||
<div class='cell cell-6'>
|
||||
<p><span class='title'>Origines :</span> <input name="attr_character_origine" type="text" /></p>
|
||||
<p><span class='title'>Origines :</span> <input name="attr_character_origine" type="text" /></p>
|
||||
</div>
|
||||
<div class="cell cell-10">
|
||||
<p><span class='title'>Concept :</span> <input name="attr_character_concept" type="text" /></p>
|
||||
<div class="cell cell-8">
|
||||
<p><span class='title'>Concept :</span> <input name="attr_character_concept" type="text" /></p>
|
||||
</div>
|
||||
<div class="cell cell-2 text-center">
|
||||
<span class="title">XP :</span> <span class='number-wrapper'><input type="number" placeholder="0" name="attr_xp" /></span>
|
||||
</div>
|
||||
<div class="cell cell-2 text-center">
|
||||
<button type="roll" value="&{template:sakura} {{check=[[2d6cs0cf0]]}} {{mincheck=[[2]]}} {{maxcheck=[[12]]}} {{currentinjury=@{foocurrentinjurylevel}}}" name="roll_standard"></button>
|
||||
</div>
|
||||
<div class="cell cell-2 text-center"> <span class="title">XP :</span> <span class='number-wrapper'><input type="number" placeholder="0" name="attr_xp" /></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -171,8 +176,9 @@
|
||||
<button class='tabs-button' type="action" name="act_field" >Champs <span></span><span></span><span></span></button>
|
||||
<button class='tabs-button' type="action" name="act_advantage" >Avantages <span></span><span></span><span></span></button>
|
||||
<button class='tabs-button' type="action" name="act_path" >Voie <span></span><span></span><span></span></button>
|
||||
<button class='tabs-button' type="action" name="act_magie" >Magie <span></span><span></span><span></span></button>
|
||||
<button class='tabs-button' type="action" name="act_stuff" >Équipement <span></span><span></span><span></span></button>
|
||||
<button class='tabs-button' type="action" name="act_info" >Informations <span></span><span></span><span></span></button>
|
||||
<button class='tabs-button' type="action" name="act_info" >Divers <span></span><span></span><span></span></button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -366,9 +372,7 @@
|
||||
<fieldset class="repeating_skill">
|
||||
<div class="row">
|
||||
<div class="cell cell-3"><p>Technique :</p></div>
|
||||
<div class="cell cell-1"></div>
|
||||
<div class="cell cell-6"><input type="text" name="attr_skillname"/></div>
|
||||
<div class="cell cell-1"></div>
|
||||
<div class="cell cell-8"><input type="text" name="attr_skillname"/></div>
|
||||
<div class="cell cell-3 mt-1">
|
||||
<p>Aspect:</p>
|
||||
</div>
|
||||
@@ -399,6 +403,76 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='sheet-magie'>
|
||||
<div class="row ">
|
||||
<div class="cell cell-12 text-center">
|
||||
<h2 class="title"> Magie </h2>
|
||||
<div class='underligne underligne-1'>
|
||||
<img src="https://lh3.googleusercontent.com/pw/ACtC-3c3ENhJzSMnALDWpDDtlFtx7B4Rqhn8LR5YGlZlabABgw_YSAdXHPcVEtAPomSFhKimZgugjGQ2ABvkpKQLj91_JJOSMYyyTyPnNoPsQc9WoJk8a4dycAzb8eefo70c_71KzCVldfiyXvrO0-gcdwPm=w662-h53-no?authuser=0">
|
||||
<div class="cell cell-12 text-center mt-1">
|
||||
<button type="action" name="act_modaltrue" >Calculer une difficulté</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="magies slider">
|
||||
<fieldset class="repeating_magic">
|
||||
<div class="row">
|
||||
<div class="cell cell-3"><p>Nom :</p></div>
|
||||
<div class="cell cell-8"><input type="text" name="attr_magicname"/></div>
|
||||
<div class="cell cell-3 mt-1">
|
||||
<p>Champ:</p>
|
||||
</div>
|
||||
<div class="cell cell-1 ">
|
||||
<button class="right" type="action" name="act_prevfieldmagic">
|
||||
<img src="https://lh3.googleusercontent.com/pw/ACtC-3dTW1t8u643KKvBvpgrnwblWKviIJ_o5ljMMCxBG204LOaj4iW9tE6VEE4BA3fobyOKKdr9Xqmevz4_ViNAJZdEjka_asiITjtiyLZciFs4X-o0UZ3h9BqGlcFcG1_9CY7HdlUu-HKMZ9aF3tHmN4fO=w128-h176-no?authuser=0">
|
||||
</button>
|
||||
</div>
|
||||
<div class="cell cell-6 text-center">
|
||||
<input type="hidden" name="attr_foomagicassociatedfield" value="bla"/>
|
||||
<input type="text" disabled name="attr_magicassociatedfield" value="@{foomagicassociatedfield}"/>
|
||||
<input type="hidden" name="attr_foomagicassociatedfieldlvl"/>
|
||||
<input type="hidden" name="attr_fooindexfield" value="-1" />
|
||||
</div>
|
||||
<div class="cell cell-1">
|
||||
<button class="left" type="action" name="act_nextfieldmagic">
|
||||
<img src='https://lh3.googleusercontent.com/pw/ACtC-3dM3amrbq3K0od0-KjZvqPKXBV9o6cdk4Xwh8H7nXnBPqDveu2pNRJIfbQtST4LQ_GDdS-9S6hHxBxG6ar9uW6UqJt9POJwzhSylh1z_Oi603dRv0dgZmY9VxfzbKpsvuWfJzegxGgsC4SctWeSjQj9=w128-h176-no?authuser=0'>
|
||||
</button>
|
||||
</div>
|
||||
<div class="cell cell-3 mt-1">
|
||||
<p>Spécialisation:</p>
|
||||
</div>
|
||||
<div class="cell cell-1 ">
|
||||
<button class="right" type="action" name="act_prevspemagic">
|
||||
<img src="https://lh3.googleusercontent.com/pw/ACtC-3dTW1t8u643KKvBvpgrnwblWKviIJ_o5ljMMCxBG204LOaj4iW9tE6VEE4BA3fobyOKKdr9Xqmevz4_ViNAJZdEjka_asiITjtiyLZciFs4X-o0UZ3h9BqGlcFcG1_9CY7HdlUu-HKMZ9aF3tHmN4fO=w128-h176-no?authuser=0">
|
||||
</button>
|
||||
</div>
|
||||
<div class="cell cell-6 text-center">
|
||||
<input type="hidden" name="attr_foomagicassociatedspe"/>
|
||||
<input type="text" disabled name="attr_magicassociatedspe" value="@{foomagicassociatedspe}"/>
|
||||
<input type="hidden" name="attr_foomagicassociatedspelvl"/>
|
||||
<input type="hidden" name="attr_fooindexspe" value="-1" />
|
||||
</div>
|
||||
<div class="cell cell-1">
|
||||
<button class="left" type="action" name="act_nextspemagic">
|
||||
<img src='https://lh3.googleusercontent.com/pw/ACtC-3dM3amrbq3K0od0-KjZvqPKXBV9o6cdk4Xwh8H7nXnBPqDveu2pNRJIfbQtST4LQ_GDdS-9S6hHxBxG6ar9uW6UqJt9POJwzhSylh1z_Oi603dRv0dgZmY9VxfzbKpsvuWfJzegxGgsC4SctWeSjQj9=w128-h176-no?authuser=0'>
|
||||
</button>
|
||||
</div>
|
||||
<div class="cell cell-4 mt-1">
|
||||
<p>Bonus: <span class="number-wrapper"><input type="number" name="attr_magicbonus" placeholder="0"></span></p>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-6 mt-1"><p>Majoration: <span class="tech-power number-wrapper"><input type="number" name="attr_magicdiff" placeholder="0"></span></p></div>
|
||||
<div class="cell cell-2 mt-1">
|
||||
<input type="hidden" name="attr_foototalmagiclvl" value="[[@{foomagicassociatedfieldlvl} + @{foomagicassociatedspelvl}]]"/>
|
||||
<button class="roll-tech" type="roll" name="roll_magie" value="&{template:sakura} {{subtitle=Magie :}} {{rollname=@{magicname}}} {{check=[[2d6cs0cf0 + @{magicbonus} + @{foototalmagiclvl}]]}} {{mincheck=[[2 + @{magicbonus} + @{foototalmagiclvl}]]}} {{maxcheck=[[12 + @{magicbonus} + @{foototalmagiclvl}]]}} {{currentinjury=@{foocurrentinjurylevel}}} {{note=Difficulté : [[8 + @{magicdiff}]]}} {{desc=@{magiceffect}}}"/>
|
||||
</div>
|
||||
<textarea type="text" name="attr_magiceffect" rows="5"></textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='sheet-stuff'>
|
||||
<div class="text-center">
|
||||
<div class="row">
|
||||
@@ -535,7 +609,7 @@
|
||||
</div>
|
||||
<div class='sheet-info'>
|
||||
<div class="text-center">
|
||||
<h2 class="title"> INFORMATIONS </h2>
|
||||
<h2 class="title"> Divers </h2>
|
||||
<div class='underligne underligne-2'>
|
||||
<img src="https://lh3.googleusercontent.com/pw/ACtC-3f7VjhCW6tyHGIHg6hcPZQTXN_sPyjTbtaaETRxtZNKb1ONEJgdc9gtatciDX93ZQTzCjae8G6H1R_aCw-FzPIvbFmV7OhphmNDlyXw-PIWOG5vw7q3K3OJyjwqLWZ6TwePB0aNK8PFdDeMXF904XVs=w851-h83-no?authuser=0">
|
||||
</div>
|
||||
@@ -596,6 +670,7 @@
|
||||
<p class="sheet-template-note"><small>{{note}}</small></p>
|
||||
</div>
|
||||
{{/note}}
|
||||
</div>
|
||||
</rolltemplate>
|
||||
<rolltemplate class="sheet-rolltemplate-sakura-chatmenu">
|
||||
{{content}}
|
||||
@@ -616,13 +691,13 @@
|
||||
</button>
|
||||
|
||||
<div class="row mt-1">
|
||||
<div class="cell cell-6">
|
||||
<h2 class="title mt-1">Calcul de Technique</h2>
|
||||
<div class='underligne underligne-2'>
|
||||
<div class="cell cell-8">
|
||||
<h2 class="title mt-1">Calcul de Technique ou Magie</h2>
|
||||
<div class='text-center underligne underligne-2'>
|
||||
<img src="https://lh3.googleusercontent.com/pw/ACtC-3f7VjhCW6tyHGIHg6hcPZQTXN_sPyjTbtaaETRxtZNKb1ONEJgdc9gtatciDX93ZQTzCjae8G6H1R_aCw-FzPIvbFmV7OhphmNDlyXw-PIWOG5vw7q3K3OJyjwqLWZ6TwePB0aNK8PFdDeMXF904XVs=w851-h83-no?authuser=0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell cell-6 score">
|
||||
<div class="cell cell-4 score">
|
||||
<span class="number-wrapper path-wrapper"><input type='hidden' name='attr_modalpower' value="0" ><input type="number" name="attr_modalpowerFake" placeholder="0" value="@{modalpower}" disabled></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -773,7 +848,7 @@
|
||||
<label><input type="radio" name="attr_modalbonus" value="2"> <span> 3 </span></label>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<label><input type="radio" name="attr_modalbonus" value="3"> <span> 4 </span></label>
|
||||
<label><input type="radio" name="attr_modalbonus" value="3"> <span> 4 </span></label>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<label><input type="radio" name="attr_modalbonus" value="4"> <span> 5 </span></label>
|
||||
@@ -892,7 +967,7 @@
|
||||
|
||||
// TABS
|
||||
|
||||
const buttonlist = ["field","advantage","path", "info", "stuff"];
|
||||
const buttonlist = ["field","advantage","path", "info", "stuff", "magie"];
|
||||
buttonlist.forEach(button => {
|
||||
on(`clicked:${button}`, function() {
|
||||
setAttrs({
|
||||
@@ -988,77 +1063,76 @@
|
||||
});
|
||||
}
|
||||
|
||||
// TODO refacto
|
||||
on("clicked:repeating_weapon:nextspeweapon", function(e){
|
||||
getAttrs(["repeating_weapon_fooindexspe","repeating_weapon_fooindexfield"], function(values){
|
||||
let speIndex = values["repeating_weapon_fooindexspe"];
|
||||
let fieldIndex = values["repeating_weapon_fooindexfield"];
|
||||
getSectionIDs("spec", function(idarray){
|
||||
function getPrevRepeatingCorrelatedValue(containingSectionName,changingIndexName,fixedIndexName,browsedSectionName)
|
||||
{
|
||||
getAttrs(["repeating_"+containingSectionName+"_"+changingIndexName,"repeating_"+containingSectionName+"_"+fixedIndexName], function(values){
|
||||
let speIndex = values["repeating_"+containingSectionName+"_"+changingIndexName];
|
||||
let fieldIndex = values["repeating_"+containingSectionName+"_"+fixedIndexName];
|
||||
getSectionIDs(browsedSectionName, function(idarray){
|
||||
if(idarray.length==0)return;
|
||||
if(idarray.length>1){
|
||||
var val = parseInt(speIndex,10);
|
||||
let correlation = fieldIndex;
|
||||
getAttrs(idarray.map(elt=>"repeating_spec_"+elt+"_fooindexfield"),function(x){
|
||||
getAttrs(idarray.map(elt=>"repeating_"+browsedSectionName+"_"+elt+"_"+fixedIndexName),function(x){
|
||||
let length = idarray.length;
|
||||
negX = negArray(idarray);
|
||||
for(let i=length-1;i>=0;i--){
|
||||
var nIndex = speIndex-length+i;
|
||||
if(x["repeating_"+browsedSectionName+"_"+negX[nIndex]+"_"+fixedIndexName]==correlation)
|
||||
{
|
||||
val = parseInt(nIndex,10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
var setObj = {};
|
||||
setObj["repeating_"+containingSectionName+"_"+changingIndexName] = val<0?val+length:val;
|
||||
setAttrs(setObj);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var setObj = {};
|
||||
setObj["repeating_"+containingSectionName+"_"+changingIndexName] = 0;
|
||||
setAttrs(setObj);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function getNextRepeatingCorrelatedValue(containingSectionName,changingIndexName,fixedIndexName,browsedSectionName){
|
||||
getAttrs(["repeating_"+containingSectionName+"_"+changingIndexName,"repeating_"+containingSectionName+"_"+fixedIndexName], function(values){
|
||||
let speIndex = values["repeating_"+containingSectionName+"_"+changingIndexName];
|
||||
let fieldIndex = values["repeating_"+containingSectionName+"_"+fixedIndexName];
|
||||
getSectionIDs(browsedSectionName, function(idarray){
|
||||
if(idarray.length==0)return;
|
||||
if(idarray.length>1){
|
||||
var val = parseInt(speIndex,10);
|
||||
let correlation = fieldIndex;
|
||||
getAttrs(idarray.map(elt=>"repeating_"+browsedSectionName+"_"+elt+"_"+fixedIndexName),function(x){
|
||||
let length = idarray.length;
|
||||
//negX = idarray;// negArray(idarray);
|
||||
for(let i=0;i<length;i++){
|
||||
var nIndex = speIndex+i+1;
|
||||
if(nIndex>=length) nIndex = speIndex-length+i+1;
|
||||
if(x["repeating_spec_"+idarray[nIndex]+"_fooindexfield"]==correlation)
|
||||
if(x["repeating_"+browsedSectionName+"_"+idarray[nIndex]+"_"+fixedIndexName]==correlation)
|
||||
{
|
||||
val = parseInt(nIndex,10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
var setObj = {};
|
||||
setObj["repeating_weapon_fooindexspe"] = val;
|
||||
setObj["repeating_"+containingSectionName+"_"+changingIndexName] = val;
|
||||
setAttrs(setObj);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var setObj = {};
|
||||
setObj["repeating_weapon_fooindexspe"] = 0;
|
||||
setObj["repeating_"+containingSectionName+"_"+changingIndexName] = 0;
|
||||
setAttrs(setObj);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
on("clicked:repeating_weapon:prevspeweapon", function(e){
|
||||
getAttrs(["repeating_weapon_fooindexspe","repeating_weapon_fooindexfield"], function(values){
|
||||
let speIndex = values["repeating_weapon_fooindexspe"];
|
||||
let fieldIndex = values["repeating_weapon_fooindexfield"];
|
||||
getSectionIDs("spec", function(idarray){
|
||||
if(idarray.length==0)return;
|
||||
if(idarray.length>1){
|
||||
var val = parseInt(speIndex,10);
|
||||
let correlation = fieldIndex;
|
||||
getAttrs(idarray.map(elt=>"repeating_spec_"+elt+"_fooindexfield"),function(x){
|
||||
let length = idarray.length;
|
||||
negX = negArray(idarray);
|
||||
for(let i=length-1;i>=0;i--){
|
||||
var nIndex = speIndex-length+i;
|
||||
if(x["repeating_spec_"+negX[nIndex]+"_fooindexfield"]==correlation)
|
||||
{
|
||||
val = parseInt(nIndex,10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
var setObj = {};
|
||||
setObj["repeating_weapon_fooindexspe"] = val<0?val+length:val;
|
||||
setAttrs(setObj);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var setObj = {};
|
||||
setObj["repeating_weapon_fooindexspe"] = 0;
|
||||
setAttrs(setObj);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
// END TODO refacto
|
||||
}
|
||||
|
||||
function getPrevRepeatingValue(targetRepeatingIndexName, sourceRepeatingName)
|
||||
{
|
||||
@@ -1097,16 +1171,32 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
on("clicked:repeating_weapon:nextspeweapon", function(e){
|
||||
getNextRepeatingCorrelatedValue("weapon","fooindexspe","fooindexfield","spec");
|
||||
});
|
||||
on("clicked:repeating_weapon:prevspeweapon", function(e){
|
||||
getPrevRepeatingCorrelatedValue("weapon","fooindexspe","fooindexfield","spec");
|
||||
});
|
||||
on("clicked:repeating_magic:nextspemagic", function(e){
|
||||
getNextRepeatingCorrelatedValue("magic","fooindexspe","fooindexfield","spec");
|
||||
});
|
||||
on("clicked:repeating_magic:prevspemagic", function(e){
|
||||
getPrevRepeatingCorrelatedValue("magic","fooindexspe","fooindexfield","spec");
|
||||
});
|
||||
|
||||
on("change:repeating_field:fieldname", function(e){
|
||||
let changedID = e.sourceAttribute.split('_')[2];
|
||||
updateRepeatingRelatedAttrFromRepeating("field", "spec", "fooindexfield", changedID, "foospecassociatedfield", e.newValue);
|
||||
updateRepeatingRelatedAttrFromRepeating("field", "weapon", "fooindexfield", changedID, "fooweaponassociatedfield", e.newValue);
|
||||
updateRepeatingRelatedAttrFromRepeating("field", "magic", "fooindexfield", changedID, "foomagicassociatedfield", e.newValue);
|
||||
});
|
||||
|
||||
on("change:repeating_field:fieldlvl", function(e){
|
||||
let changedID = e.sourceAttribute.split('_')[2];
|
||||
updateRepeatingRelatedAttrFromRepeating("field", "spec", "fooindexfield", changedID, "foospecassociatedfieldlvl", e.newValue);
|
||||
updateRepeatingRelatedAttrFromRepeating("field", "weapon", "fooindexfield", changedID, "fooweaponassociatedfieldlvl", e.newValue);
|
||||
updateRepeatingRelatedAttrFromRepeating("field", "magic", "fooindexfield", changedID, "foomagicassociatedfieldlvl", e.newValue);
|
||||
});
|
||||
|
||||
on("change:repeating_field:fieldlvl", function() {
|
||||
@@ -1135,11 +1225,13 @@
|
||||
on("change:repeating_spec:specname", function(e){
|
||||
let changedID = e.sourceAttribute.split('_')[2];
|
||||
updateRepeatingRelatedAttrFromRepeating("spec", "weapon", "fooindexspe", changedID, "fooweaponassociatedspe", e.newValue);
|
||||
updateRepeatingRelatedAttrFromRepeating("spec", "magic", "fooindexspe", changedID, "foomagicassociatedspe", e.newValue);
|
||||
});
|
||||
|
||||
on("change:repeating_spec:speclvl", function(e){
|
||||
let changedID = e.sourceAttribute.split('_')[2];
|
||||
updateRepeatingRelatedAttrFromRepeating("spec", "weapon", "fooindexspe", changedID, "fooweaponassociatedspelvl", e.newValue);
|
||||
updateRepeatingRelatedAttrFromRepeating("spec", "magic", "fooindexspe", changedID, "foomagicassociatedspelvl", e.newValue);
|
||||
});
|
||||
|
||||
on("change:repeating_spec:specmodif", function(e){
|
||||
@@ -1168,6 +1260,11 @@
|
||||
updateRepeatingRelatedAttrFromRepeating("aspect", "skill", "fooindexaspect", changedID, "fooskillassociatedaspectlvl", e.newValue);
|
||||
});
|
||||
|
||||
on("change:repeating_aspect:aspectname", function(e){
|
||||
let changedID = e.sourceAttribute.split('_')[2];
|
||||
updateRepeatingRelatedAttrFromRepeating("aspect", "skill", "fooindexaspect", changedID, "fooskillassociatedaspect", e.newValue);
|
||||
});
|
||||
|
||||
on("change:repeating_spec:fooindexfield", function(e){
|
||||
fooRepeatingRelatedIndexChangeCallback("repeating_spec_fooindexfield", "field", ["fieldname", "fieldlvl"], ["repeating_spec_foospecassociatedfield", "repeating_spec_foospecassociatedfieldlvl"]);
|
||||
});
|
||||
@@ -1255,16 +1352,31 @@
|
||||
});
|
||||
|
||||
on("change:injury_contusions change:injury_meurtrissures change:injury_legeres change:injury_moderes change:injury_graves change:injury_mort change:injury_inconscient", function(e){
|
||||
getAttrs(["injury_meurtrissures","injury_legeres","injury_moderes","injury_graves","injury_mort","injury_inconscient"],function(x){
|
||||
let value = "";
|
||||
if(x.injury_meurtrissures>0) value="-1";
|
||||
if(x.injury_legeres>0) value="-3";
|
||||
if(x.injury_moderes>0) value="-5";
|
||||
if(x.injury_graves>0) value="-7";
|
||||
if(x.injury_mort>0) value="+3/-9";
|
||||
if(x.injury_inconscient>0) value="Inconscient";
|
||||
setAttrs({foocurrentinjurylevel: value});
|
||||
});
|
||||
if(e.sourceType=="player"){
|
||||
let injuryArray = ["injury_contusions","injury_meurtrissures","injury_legeres","injury_moderes","injury_graves","injury_mort","injury_inconscient"];
|
||||
let injuryLevel = ["","-1","-3","-5","-7","+3/-9","Inconscient"];
|
||||
let changedLevel = injuryArray.indexOf(e.sourceAttribute);
|
||||
let maxed = injuryArray.slice(0, changedLevel);
|
||||
if(maxed.length>0)
|
||||
{
|
||||
setMaxed = {};
|
||||
for(var m in maxed)
|
||||
{
|
||||
setMaxed[maxed[m]]=5;
|
||||
}
|
||||
setAttrs(setMaxed);
|
||||
}
|
||||
if(changedLevel+1<=injuryArray.length){
|
||||
let minied = injuryArray.slice(changedLevel+1,injuryArray.length);
|
||||
setMinied = {};
|
||||
for(var m in minied)
|
||||
{
|
||||
setMinied[minied[m]]=0;
|
||||
}
|
||||
setAttrs(setMinied);
|
||||
}
|
||||
setAttrs({foocurrentinjurylevel: injuryLevel[changedLevel]});
|
||||
}
|
||||
});
|
||||
|
||||
on("clicked:repeating_weapon:nextfieldweapon", function(eventInfo) {
|
||||
@@ -1275,6 +1387,14 @@
|
||||
getPrevRepeatingValue("repeating_weapon_fooindexfield", "field");
|
||||
});
|
||||
|
||||
on("clicked:repeating_magic:nextfieldmagic", function(eventInfo) {
|
||||
getNextRepeatingValue("repeating_magic_fooindexfield", "field");
|
||||
});
|
||||
|
||||
on("clicked:repeating_magic:prevfieldmagic", function(eventInfo) {
|
||||
getPrevRepeatingValue("repeating_magic_fooindexfield", "field");
|
||||
});
|
||||
|
||||
on("change:repeating_weapon:fooindexfield", function(e){
|
||||
fooRepeatingRelatedIndexChangeCallback("repeating_weapon_fooindexfield", "field", ["fieldname", "fieldlvl"], ["repeating_weapon_fooweaponassociatedfield", "repeating_weapon_fooweaponassociatedfieldlvl"]);
|
||||
});
|
||||
@@ -1283,6 +1403,13 @@
|
||||
fooRepeatingRelatedIndexChangeCallback("repeating_weapon_fooindexspe", "spec", ["specname", "speclvl", "specmodif"], ["repeating_weapon_fooweaponassociatedspe", "repeating_weapon_fooweaponassociatedspelvl", "repeating_weapon_fooweaponassociatedspelvlbonus"]);
|
||||
});
|
||||
|
||||
on("change:repeating_magic:fooindexfield", function(e){
|
||||
fooRepeatingRelatedIndexChangeCallback("repeating_magic_fooindexfield", "field", ["fieldname", "fieldlvl"], ["repeating_magic_foomagicassociatedfield", "repeating_magic_foomagicassociatedfieldlvl"]);
|
||||
});
|
||||
|
||||
on("change:repeating_magic:fooindexspe", function(e){
|
||||
fooRepeatingRelatedIndexChangeCallback("repeating_magic_fooindexspe", "spec", ["specname", "speclvl", "specmodif"], ["repeating_magic_foomagicassociatedspe", "repeating_magic_foomagicassociatedspelvl", "repeating_magic_foomagicassociatedspelvlbonus"]);
|
||||
});
|
||||
|
||||
on("change:modalrange change:modaltime change:modalvalue change:modaltarget change:modaldiff change:modalench change:modalbonus change:modalinvoc change:modalpurif change:modaltransformationm change:modaltransformationt", function(e){
|
||||
getAttrs(["modalrange","modaltime","modalvalue","modalench","modaldiff", "modaltarget","modalbonus","modalinvoc", "modalpurif", "modaltransformationt", "modaltransformationm"],function(x){
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
Player sheet for L'Empire des cerisiers by Olivier Sanfilippo published by Arkhane Asylum in 2020. Sheet is based on 2020 Arkhane Asylum's designed player sheet.
|
||||
|
||||
## Current Version
|
||||
1.0
|
||||
1.1
|
||||
|
||||
### Change log
|
||||
|
||||
#### 1.1
|
||||
* Added : magic tab
|
||||
* Added : simple roll at the top of the sheet
|
||||
* Updated : changing an injury level now update the others accordingly
|
||||
* Fixed : skill aspect name not updating when source aspect is changed
|
||||
|
||||
#### 1.0
|
||||
* Sheet creation for Roll20
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
"authors": "Marc-J and Talina",
|
||||
"roll20userid": "3631783,3632466",
|
||||
"preview": "EdC.png",
|
||||
"instructions": "# L'Empire des cerisiers Character Sheet\n\n\nPlayer sheet for L'Empire des cerisiers by Olivier Sanfilippo published by Arkhane Asylum in 2020.\nThis sheet was created for the use of L'Empire des Cerisiers players and community. ##Player sheet\n\nSheet is based on 2020 Arkhane Asylum's designed player sheet.\n\n\n## Current Version 1.0"
|
||||
"instructions": "# L'Empire des cerisiers Character Sheet\n\n\nPlayer sheet for L'Empire des cerisiers by Olivier Sanfilippo published by Arkhane Asylum in 2020.\nThis sheet was created for the use of L'Empire des Cerisiers players and community. ##Player sheet\n\nSheet is based on 2020 Arkhane Asylum's designed player sheet.\n\n\n## Current Version 1.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user