100 lines
3.9 KiB
HTML
100 lines
3.9 KiB
HTML
<template name="spells">
|
|
<div fit>
|
|
<div id="spells" class="scroll-y" fit>
|
|
<div class="spellsContainer" layout horizontal start wrap>
|
|
{{#if hasSlots}}
|
|
<paper-shadow class="card container spellSlotContainer" hero-id="main" {{detailHero}}>
|
|
<div class="containerTop whiteTop" layout horizontal center>
|
|
<div class="containerName subhead" hero-id="title" flex>Spell Slots</div>
|
|
</div>
|
|
<div flex class="containerMain">
|
|
{{#each levels}}{{#if showSlots ..}}
|
|
<div class="itemSlot">
|
|
<paper-item class="inventoryItem spellSlot" hero-id="main" {{detailHero slotStatName ../_id}} layout horizontal>
|
|
<div class="slotName">
|
|
{{name}}
|
|
</div>
|
|
<div flex layout horizontal center>
|
|
{{#each slotBubbles ..}}
|
|
<paper-icon-button class="slotBubble" icon={{icon}} disabled={{disabled}}></paper-icon-button>
|
|
{{/each}}
|
|
</div>
|
|
</paper-item>
|
|
</div>
|
|
{{/if}}{{/each}}
|
|
</div>
|
|
</paper-shadow>
|
|
{{/if}}
|
|
{{#each spellLists}}
|
|
<paper-shadow class="card container spellList" hero-id="main" {{detailHero}} flex>
|
|
<div class="containerTop {{colorClass}}" hero-id="toolbar" layout horizontal center {{detailHero}}>
|
|
<div flex>
|
|
<div class="containerName subhead">{{name}}</div>
|
|
<div class="caption">
|
|
{{#if saveDC}}
|
|
Save DC: {{evaluate charId saveDC}}
|
|
<div style="width: 16px; display: inline-block;"></div>
|
|
{{/if}}
|
|
{{#if attackBonus}}
|
|
Attack Bonus: {{evaluateSigned charId attackBonus}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{#if settings.showUnprepared}}
|
|
{{#if maxPrepared}}<div class="subhead">{{numPrepared}} / {{evaluate charId maxPrepared}}</div>{{/if}}
|
|
<core-tooltip label="Done" position="left">
|
|
<paper-icon-button class="finishPrep" icon="done"></paper-icon-button>
|
|
</core-tooltip>
|
|
{{else}}
|
|
<core-tooltip label="Change prepared spells" position="left">
|
|
<paper-icon-button class="prepSpells" icon="book"></paper-icon-button>
|
|
</core-tooltip>
|
|
{{/if}}
|
|
</div>
|
|
<div class="containerMain">
|
|
{{#each levels}}
|
|
<div class="spellLevel">
|
|
{{#if spellCount .. ../../_id}}
|
|
<div class="list-subhead" layout horizontal center>
|
|
{{name}}
|
|
</div>
|
|
{{/if}}
|
|
{{#each spells ../_id ../../_id}}
|
|
{{#if showSpell ../../settings.showUnprepared}}
|
|
<div class="itemSlot">
|
|
<paper-item class="inventoryItem spell" hero-id="main" {{detailHero}}
|
|
layout horizontal center>
|
|
<!--disabled={{cantCast ../level ../../..}} to grey out spells above highest usable slot-->
|
|
<core-icon icon="social:whatshot"
|
|
style="color: {{hexColor color}};"
|
|
></core-icon>
|
|
<div flex layout vertical>
|
|
<div>{{name}}</div>
|
|
<div class="caption">
|
|
{{school}} {{castingTime}}
|
|
{{#if ritual}}(ritual){{/if}}{{#if spellComponents}} - {{spellComponents}}{{/if}}
|
|
</div>
|
|
</div>
|
|
{{#if ../../settings.showUnprepared}}
|
|
<paper-checkbox class="preparedCheckbox" checked={{isPrepared}} disabled={{cantUnprepare}}></paper-checkbox>
|
|
{{/if}}
|
|
</paper-item>
|
|
</div>
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
</paper-shadow>
|
|
{{/each}}
|
|
</div>
|
|
<div class="fab-buffer"></div>
|
|
</div>
|
|
</div>
|
|
{{#if canEditCharacter _id}}
|
|
<paper-fab-menu id="inventoryAddMenu" icon="add" closeIcon="close" duration="0.3">
|
|
<paper-fab-menu-item id="addSpell" icon="note-add" color="#d23f31" tooltip="Spell"></paper-fab-menu-item>
|
|
<paper-fab-menu-item id="addSpellList" icon="work" color="#d23f31" tooltip="Spell List"></paper-fab-menu-item>
|
|
</paper-fab-menu>
|
|
{{/if}}
|
|
</template> |