#Fix 78 : add role level

This commit is contained in:
sladecraven 2022-09-29 13:14:34 +02:00
parent 1bb869e715
commit 4065d46ffd
2 changed files with 84 additions and 71 deletions

View File

@ -443,7 +443,8 @@
"specincrease": [], "specincrease": [],
"perks": [], "perks": [],
"perksrole": "", "perksrole": "",
"description": "" "description": "",
"rolelevel": 0
}, },
"ability": { "ability": {
"affectedstat": "str", "affectedstat": "str",

View File

@ -1,80 +1,92 @@
<form class="{{cssClass}}" autocomplete="off"> <form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header"> <header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/> <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields"> <div class="header-fields">
<h1 class="charname"> <h1 class="charname">
<input name="name" type="text" value="{{name}}" placeholder="Name"/> <input name="name" type="text" value="{{name}}" placeholder="Name" />
</h1> </h1>
</div> </div>
</header> </header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}} {{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}} {{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details"> <div class="tab details" data-group="primary" data-tab="details">
<ul> <ul>
<li class="flexrow"><label class="generic-label">Stat increase 1</label> <li class="flexrow"><label class="generic-label">Role Level</label>
<select class="competence-base flexrow" type="text" name="system.statincrease1" value="{{data.statincrease1}}" data-dtype="String"> <input type="text" class="input-numeric-short padd-right" name="system.rolelevel" value="{{data.rolelevel}}"
{{#select data.statincrease1}} data-dtype="Number" />
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}} </li>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Stat increase 2</label>
<select class="competence-base flexrow" type="text" name="system.statincrease2" value="{{data.statincrease2}}" data-dtype="String">
{{#select data.statincrease2}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/select}}
</select>
</li>
<li class="flexrow"> <li class="flexrow"><label class="generic-label">Stat increase 1</label>
<label class="generic-label">Role Ability</label> <select class="competence-base flexrow" type="text" name="system.statincrease1" value="{{data.statincrease1}}"
</li> data-dtype="String">
<ul class="ul-level1"> {{#select data.statincrease1}}
<li class="flexrow"><div class="drop-specialability"><label>Drop Abilities here !</label></div> {{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
</li> {{/select}}
{{#each data.specialability as |ability idx|}} </select>
<li class="flexrow"> </li>
<label name="system.specialability[{{idx}}].name"><a class="view-subitem" data-type="specialability" data-index="{{idx}}">{{ability.name}}</a></label> <li class="flexrow"><label class="generic-label">Stat increase 2</label>
<div class="item-controls padd-left"> <select class="competence-base flexrow" type="text" name="system.statincrease2" value="{{data.statincrease2}}"
<a class="item-control delete-subitem padd-left" data-type="specialability" data-index="{{idx}}" title="Delete Ability"><i class="fas fa-trash"></i></a> data-dtype="String">
</div> {{#select data.statincrease2}}
</li> {{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=false}}
{{/each}} {{/select}}
</ul> </select>
</li>
<li class="flexrow">
<label class="generic-label">Role Ability</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<div class="drop-specialability"><label>Drop Abilities here !</label></div>
</li> </li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label> {{#each data.specialability as |ability idx|}}
</li> <li class="flexrow">
<ul class="ul-level1"> <label name="system.specialability[{{idx}}].name"><a class="view-subitem" data-type="specialability"
<li class="flexrow"> data-index="{{idx}}">{{ability.name}}</a></label>
{{#each data.statincreasechoice as |stat idx|}} <div class="item-controls padd-left">
<label name="statchoice{{idx}}">{{stat.name}}</label> <a class="item-control delete-subitem padd-left" data-type="specialability" data-index="{{idx}}"
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag" data-stat-idx="{{idx}}" {{checked stat.flag}}/></label> title="Delete Ability"><i class="fas fa-trash"></i></a>
{{/each}} </div>
</li> </li>
</ul> {{/each}}
</li> </ul>
</li>
<li class="flexrow"><label class="generic-label">Statistic increase (Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
{{#each data.statincreasechoice as |stat idx|}}
<label name="statchoice{{idx}}">{{stat.name}}</label>
<label class="attribute-value checkbox"><input type="checkbox" class="stat-choice-flag"
data-stat-idx="{{idx}}" {{checked stat.flag}} /></label>
{{/each}}
</li>
</ul>
</li>
<li class="flexrow"><label class="generic-label">Role category for available perks</label> <li class="flexrow"><label class="generic-label">Role category for available perks</label>
<select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}" data-dtype="String"> <select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}"
{{#select data.perksrole}} data-dtype="String">
<option value="agitator">Agitator</option> {{#select data.perksrole}}
<option value="defender">Defender</option> <option value="agitator">Agitator</option>
<option value="enhancer">Enhancer</option> <option value="defender">Defender</option>
<option value="scrapper">Scrapper</option> <option value="enhancer">Enhancer</option>
<option value="ranged">Ranged</option> <option value="scrapper">Scrapper</option>
<option value="tactician">Tactician</option> <option value="ranged">Ranged</option>
{{/select}} <option value="tactician">Tactician</option>
</select> {{/select}}
</li> </select>
</li>
</ul> </ul>
</div> </div>
</section> </section>
</form> </form>