Add spells and alchemy

This commit is contained in:
2022-01-23 09:25:09 +01:00
parent 5eb059a2fa
commit aeb7739879
28 changed files with 696 additions and 71 deletions

View File

@ -3,3 +3,15 @@
<label class="property-label">{{localize "BOL.ui.rank"}}</label>
<input type="text" name="data.rank" value="{{data.rank}}" data-dtype="Number"/>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.isSorcerer"}}</label>
<input class="field-value" type="checkbox" name="data.properties.sorcerer" {{checked data.properties.sorcerer}}>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.isAlchemist"}}</label>
<input class="field-value" type="checkbox" name="data.properties.alchemist" {{checked data.properties.alchemist}}>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.isPriest"}}</label>
<input class="field-value" type="checkbox" name="data.properties.priest" {{checked data.properties.priest}}>
</div>

View File

@ -23,3 +23,6 @@
{{#if (eq data.category "spell")}}
{{> "systems/bol/templates/item/parts/properties/item/spell-properties.hbs"}}
{{/if}}
{{#if (eq data.category "alchemy")}}
{{> "systems/bol/templates/item/parts/properties/item/alchemy-properties.hbs"}}
{{/if}}

View File

@ -0,0 +1,39 @@
<h3 class="form-header">{{localize "BOL.ui.alchemyProperties"}}</h3>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.alchemyType"}}</label>
<select class="field-value" name="data.properties.alchemytype" data-dtype="String">
{{#select data.properties.alchemytype}}
{{#each config.alchemyType as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.difficulty"}}</label>
<select name="data.properties.difficulty" value="{{data.properties.difficulty}}">
{{#select data.properties.difficulty}}
<option value="2">Trés Facile (+2)</option>
<option value="1">Facile (+1)</option>
<option value="0">Moyenne (0)</option>
<option value="-1">Ardue (-1)</option>
<option value="-2">Difficile (-2)</option>
<option value="-4">Très Difficile (-4)</option>
<option value="-6">Impossible (-6)</option>
<option value="-8">Héroïque (-8)</option>
{{/select}}
</select>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.pccost"}}</label>
<input class="field-value" type="text" name="data.properties.pccost" value="{{data.properties.pccost}}" data-dtype="Number"/>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.pcnow"}}</label>
<input class="field-value" type="text" name="data.properties.pccurrent" value="{{data.properties.pccurrent}}" data-dtype="Number"/>
</div>

View File

@ -1,27 +1,97 @@
<h3 class="form-header">{{localize "BOL.ui.spellProperties"}}</h3>
<div class="form-group">
<div class="form-fields center">
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.circle"}}</label>
<select class="field-value" name="data.properties.circle" data-dtype="Number">
{{#select data.properties.circle}}
{{#each config.spellType as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.difficulty"}}</label>
<input class="field-value" type="text" name="data.properties.difficulty" value="{{data.properties.difficulty}}" data-dtype="Number"/>
</div>
</div>
<select name="data.properties.difficulty" value="{{data.properties.difficulty}}">
{{#select data.properties.difficulty}}
<option value="2">Trés Facile (+2)</option>
<option value="1">Facile (+1)</option>
<option value="0">Moyenne (0)</option>
<option value="-1">Ardue (-1)</option>
<option value="-2">Difficile (-2)</option>
<option value="-4">Très Difficile (-4)</option>
<option value="-6">Impossible (-6)</option>
<option value="-8">Héroïque (-8)</option>
{{/select}}
</select>
</div>
<div class="form-group">
<div class="form-fields center">
<label class="property-label">{{localize "BOL.ui.duration"}}</label>
<input class="field-value" type="text" name="data.properties.duration" value="{{data.properties.duration}}" data-dtype="String"/>
</div>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.ppcost"}}</label>
<input class="field-value" type="text" name="data.properties.ppcost" value="{{data.properties.ppcost}}" data-dtype="Number"/>
</div>
<div class="form-group">
<div class="form-fields center">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.spellkeep" {{checked data.properties.spellkeep}}> {{localize "BOL.ui.spellkeep"}}
</label>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.duration"}}</label>
<input class="field-value" type="text" name="data.properties.duration" value="{{data.properties.duration}}" data-dtype="String"/>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.mandatoryconditions"}}</label>
<select class="field-value" name="data.properties.nbmandatoryconditions" data-dtype="Number">
{{#select data.properties.nbmandatoryconditions}}
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
{{/select}}
</select>
</div>
{{#each data.properties.mandatoryconditions as |cond idx|}}
{{#if (lt idx @root.data.properties.nbmandatoryconditions)}}
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.mandatoryconditions"}} {{add idx 1}}</label>
<input class="field-value" type="text" name="data.properties.mandatoryconditions.{{idx}}" value="{{cond}}" data-dtype="String"/>
</div>
{{/if}}
{{/each}}
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.optionnalconditions"}}</label>
<select class="field-value" name="data.properties.nboptionnalconditions" data-dtype="Number">
{{#select data.properties.nboptionnalconditions}}
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
{{/select}}
</select>
</div>
{{#each data.properties.optionnalconditions as |cond idx|}}
{{#if (lt idx @root.data.properties.nboptionnalconditions)}}
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.optionnalconditions"}} {{add idx 1}}</label>
<input class="field-value" type="text" name="data.properties.optionnalconditions.{{idx}}" value="{{cond}}" data-dtype="String"/>
</div>
{{/if}}
{{/each}}
<div class="property flexrow">
<div class="form-fields center">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.concentrate" {{checked data.properties.concentrate}}> {{localize "BOL.ui.concentrate"}}
</label>
</div>
</div>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.spellkeep" {{checked data.properties.spellkeep}}> {{localize "BOL.ui.spellkeep"}}
</label>
</div>
<div class="form-fields center">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.concentrate" {{checked data.properties.concentrate}}> {{localize "BOL.ui.concentrate"}}
</label>
</div>
</div>