mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] Beastform Types (#372)
* Temp * Finished Evolved * Fixed hybrid * Changed generalConfig.tiers to be number based * Weaponhandling while in beastform * Added unarmed strike in sidebar * Added DamageEnricher * Added effect enricher * Corrected downtime buttons and actions * Added BeastformTooltip * Split the BeastformDialog into parts with tabs * Added temp beastform features * rollData change * Improvement * character.getRollData cleanup
This commit is contained in:
parent
867947c2c5
commit
42a705a870
93 changed files with 2795 additions and 538 deletions
|
|
@ -15,13 +15,20 @@ Parameters:
|
|||
- showActions {boolean} : If true show feature's actions.
|
||||
--}}
|
||||
|
||||
<li class="inventory-item" {{#if (eq type 'action' )}}data-action-id="{{item.id}}" {{/if}}
|
||||
<li class="inventory-item" {{#if (or (eq type 'action' ) (eq type 'attack'))}}data-action-id="{{item.id}}" {{/if}}
|
||||
data-item-uuid="{{item.uuid}}" data-type="{{type}}" draggable="true">
|
||||
<div class="inventory-item-header" {{#unless noExtensible}}data-action="toggleExtended" {{/unless}}>
|
||||
{{!-- Image --}}
|
||||
<div class="img-portait"
|
||||
data-action='{{ifThen (hasProperty item "use") "useItem" (ifThen (hasProperty item "toChat") "toChat" "editDoc") }}'
|
||||
{{#unless hideTooltip}}data-tooltip="#item#{{item.uuid}}" {{/unless}}>
|
||||
data-action='{{ifThen (or (hasProperty item "use") (eq type 'attack')) "useItem" (ifThen (hasProperty item "toChat") "toChat" "editDoc") }}'
|
||||
{{#unless hideTooltip}}
|
||||
{{#if (eq type 'attack')}}
|
||||
data-tooltip="#attack#{{item.actor.uuid}}"
|
||||
{{else}}
|
||||
data-tooltip="#item#{{item.uuid}}"
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
>
|
||||
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" />
|
||||
<img class="roll-img" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="d20">
|
||||
</div>
|
||||
|
|
@ -30,7 +37,20 @@ Parameters:
|
|||
<div class="item-label {{#if hideResources}}fullWidth{{/if}}">
|
||||
|
||||
{{!-- Item Name --}}
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
<div class="item-name">{{localize item.name}}</div>
|
||||
|
||||
{{!-- Attack Block Start --}}
|
||||
{{#if (eq type 'attack')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize 'DAGGERHEART.GENERAL.unarmed'}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize 'DAGGERHEART.CONFIG.ActionType.action'}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{!-- Attack Block End --}}
|
||||
|
||||
{{!-- Weapon Block Start --}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
|
|
|
|||
207
templates/sheets/global/partials/inventory-item.hbs
Normal file
207
templates/sheets/global/partials/inventory-item.hbs
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
<li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-type="{{type}}" draggable="true">
|
||||
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}} />
|
||||
<div class="item-label-wrapper">
|
||||
<div class="item-label {{#unless (and (not isSidebar) (or (eq item.system.resource.type 'simple') item.system.quantity))}}fullWidth{{/unless}}">
|
||||
{{#if isCompanion}}
|
||||
<a class="item-name" data-action="attackRoll">{{item.name}}</a>
|
||||
{{else}}
|
||||
<div class="item-name">{{localize item.name}}</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
<div class="item-tags">
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.short')}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.short')}}
|
||||
<span> - </span>
|
||||
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
|
||||
{{#each item.system.attack.damage.parts.0.type as | type | }}
|
||||
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
||||
<i class="fa-solid {{icon}}"></i>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
|
||||
(
|
||||
{{#each item.system.attack.damage.parts.0.type}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}}
|
||||
{{/each}}
|
||||
)
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Burden.' item.system.burden)}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'armor')}}
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{item.system.baseScore}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{item.system.baseScore}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.base"}}:
|
||||
{{item.system.baseThresholds.major}}
|
||||
<span>/</span>
|
||||
{{item.system.baseThresholds.severe}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (eq type 'domainCard')}}
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}}
|
||||
<span> - </span>
|
||||
{{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}}
|
||||
<span> - </span>
|
||||
<span class="recall-value">{{item.system.recallCost}}</span>
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
<span class="recall-label">{{localize "DAGGERHEART.ITEMS.DomainCard.recallCost"}}: </span>
|
||||
<span class="recall-value">{{item.system.recallCost}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (eq type 'effect')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'TYPES.Item.' item.parent.type)}}
|
||||
<span>: </span>
|
||||
{{item.parent.name}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{#if item.duration.duration}}
|
||||
{{localize 'DAGGERHEART.EFFECTS.Duration.temporary'}}
|
||||
{{else}}
|
||||
{{localize 'DAGGERHEART.EFFECTS.Duration.passive'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#each item.statuses as |status|}}
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Condition.' status '.name')}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'action')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.ActionType.' item.actionType)}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'attack')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize 'DAGGERHEART.GENERAL.unarmed'}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize 'DAGGERHEART.CONFIG.ActionType.action'}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and (not isSidebar) (eq item.system.resource.type 'simple'))}}
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}}
|
||||
{{/if}}
|
||||
{{#if (and (not isSidebar) item.system.quantity)}}
|
||||
<div class="item-resource">
|
||||
<input type="number" class="inventory-item-quantity" value="{{item.system.quantity}}" step="1" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#unless hideControls}}
|
||||
{{#if isActor}}
|
||||
<div class="controls">
|
||||
{{#if (eq type 'actor')}}
|
||||
<a data-action="viewActor" data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.UI.Tooltip.openActorWorld"}}'>
|
||||
<i class="fa-solid fa-globe"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (eq type 'adversary')}}
|
||||
<a data-action="viewAdversary" data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.UI.Tooltip.openActorWorld"}}'>
|
||||
<i class="fa-solid fa-globe"></i>
|
||||
</a>
|
||||
<a data-action='deleteAdversary' data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "CONTROLS.CommonDelete"}}'>
|
||||
<i class='fas fa-trash'></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="controls">
|
||||
{{#if (eq type 'weapon')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.UI.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.UI.Tooltip.unequip'}}{{/unless}}">
|
||||
<i class="fa-solid fa-hands"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (eq type 'armor')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.UI.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.UI.Tooltip.unequip'}}{{/unless}}">
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (eq type 'domainCard')}}
|
||||
{{#unless item.system.inVault}}
|
||||
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.UI.Tooltip.sendToVault'}}">
|
||||
<i class="fa-solid fa-arrow-down"></i>
|
||||
</a>
|
||||
{{else}}
|
||||
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.UI.Tooltip.sendToLoadout'}}">
|
||||
<i class="fa-solid fa-arrow-up"></i>
|
||||
</a>
|
||||
{{/unless}}
|
||||
|
||||
{{/if}}
|
||||
<a data-action="toChat" data-tooltip="{{localize 'DAGGERHEART.UI.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
|
||||
<a data-action="triggerContextMenu" data-tooltip="{{localize 'DAGGERHEART.UI.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<span></span>
|
||||
{{/unless}}
|
||||
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
|
||||
{{#if (and (not isSidebar) (eq item.system.resource.type 'diceValue'))}}
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}}
|
||||
{{/if}}
|
||||
{{#if featureType}}
|
||||
<div class="item-buttons">
|
||||
{{#each item.system.actions as | action |}}
|
||||
<button type="button" data-action="useAction" data-action-id="{{action.id}}">{{action.name}}</button>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
Loading…
Add table
Add a link
Reference in a new issue