foundry-sw5e/templates/actors/oldActor/parts/actor-features.html
Jacob Lucas 2a7e1c419e Updated to DND5e 1.3.2
Things unfinished:
 - Migration
 - The update adds new sections to the class sheet to allow some light customisation, this hasn't been included, but could be extended for the sake of dynamic classes with automatic class features and more
 - The French
 - The packs have not yet been updated, meaning due to the addition of a progression field to the class item, classes now don't set force or tech points
 - I updated the function calls in starships, but I didn't update it very thoroughly, it'll need checking
 - I only did a little testing
 - There has since been updates to DND5e that hasn't made it to release that patch bugs, those should be implemented
Things changed from base 5e:
 - Short rests and long rests were merged into one function, this needed some rewrites to account for force and tech points, and for printing the correct message
Extra Comments:
 - Unfinished code exists for automatic spell scrolls, this could be extended for single use force or tech powers
 - Weapon proficiencies probably need revising
 - Elven accuracy, halfling lucky, and reliable talent are present in the roll logic, this probably needs revising for sw5e
 - SW5e has a variant rule that permits force powers of any alignment to use either charisma or wisdom, that could be implemented
 - SW5e's version of gritty realism, [Longer Rests](https://sw5e.com/rules/variantRules/Longer%20Rests) differs from base dnd, this could be implemented
 - Extra ideas I've had while looking through the code can be found in Todos next to the ideas relevant context
2021-06-04 22:20:48 +01:00

139 lines
4.9 KiB
HTML

{{#unless isVehicle}}
<div class="inventory-filters flexrow">
<ul class="filter-list flexrow" data-filter="features">
<li class="filter-item" data-filter="action">{{localize "SW5E.Action"}}</li>
<li class="filter-item" data-filter="bonus">{{localize "SW5E.BonusAction"}}</li>
<li class="filter-item" data-filter="reaction">{{localize "SW5E.Reaction"}}</li>
</ul>
</div>
{{/unless}}
<ol class="items-list inventory-list">
{{#each sections as |section sid|}}
<li class="items-header flexrow">
<h3 class="item-name flexrow">{{localize section.label}}</h3>
{{#if section.hasActions}}
<div class="item-detail item-uses">{{localize "SW5E.Uses"}}</div>
<div class="item-detail item-action">{{localize "SW5E.Usage"}}</div>
{{/if}}
{{#if section.columns}}
{{#each section.columns}}
<div class="item-detail {{css}}">{{label}}</div>
{{/each}}
{{/if}}
{{#if ../owner}}
<div class="item-controls flexrow">
<a class="item-control item-create" title="{{localize 'SW5E.FeatureAdd'}}" {{#each section.dataset as |v k|}}data-{{k}}="{{v}}"{{/each}}>
<i class="fas fa-plus"></i> {{localize "SW5E.Add"}}
</a>
</div>
{{/if}}
</li>
<ol class="item-list">
{{#each section.items as |item iid|}}
<li class="item flexrow {{#if isDepleted}}depleted{{/if}}" data-item-id="{{item._id}}">
<div class="item-name flexrow rollable">
<div class="item-image" style="background-image: url('{{item.img}}')"></div>
<h4>
{{item.name}}
{{#if item.isOriginalClass}} <i class="original-class fas fa-sun" title="{{localize 'SW5E.ClassOriginal'}}"></i>{{/if}}
</h4>
</div>
{{#if section.hasActions}}
<div class="item-detail item-uses">
{{#if item.isOnCooldown}}
<a class="item-recharge rollable">{{item.labels.recharge}}</a>
{{else if item.data.recharge.value}}
{{localize "SW5E.Charged"}}
{{else if item.hasUses}}
<input type="text" value="{{item.data.uses.value}}" placeholder="0"/>/ {{item.data.uses.max}}
{{/if}}
</div>
<div class="item-detail item-action">
{{#if item.data.activation.type }}
{{item.labels.activation}}
{{/if}}
</div>
{{else if section.isSpecies}}
<div class="item-detail player-species">
</div>
{{else if section.isArchetype}}
<div class="item-detail player-archetype">
{{item.data.name}}
</div>
{{else if section.isBackground}}
<div class="item-detail player-background">
{{item.data.name}}
</div>
{{else if section.isClassfeatures}}
<div class="item-detail player-classfeatures">
{{item.data.name}}
</div>
{{else if section.isFightingstyles}}
<div class="item-detail player-fightingstyles">
{{item.data.name}}
</div>
{{else if section.isFightingmasteries}}
<div class="item-detail player-fightingmasteries">
{{item.data.name}}
</div>
{{else if section.isLightsaberform}}
<div class="item-detail player-lightsaberforms">
{{item.data.name}}
</div>
{{else if section.isClass}}
<div class="item-detail player-class">
{{item.data.archetype}}
</div>
<div class="item-detail item-action">
Level {{item.data.levels}}
</div>
{{/if}}
{{#if section.columns}}
{{#each section.columns}}
<div class="item-detail {{css}}">
{{#with (lookup item property)}}
{{#if ../editable}}
<input type="text" value="{{this}}" placeholder="&mdash;"
data-dtype="{{../editable}}">
{{else}}
{{this}}
{{/if}}
{{/with}}
</div>
{{/each}}
{{/if}}
{{#if ../../owner}}
<div class="item-controls flexrow">
{{#if section.crewable}}
<a class="item-control item-toggle {{item.toggleClass}}"
title="{{item.toggleTitle}}">
<i class="fas fa-sun"></i>
</a>
{{/if}}
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
{{/if}}
</li>
{{/each}}
</ol>
{{/each}}
</ol>