Added 'prepared' field to spells

This commit is contained in:
Stefan Zermatten
2020-06-22 13:45:47 +02:00
parent 757cf5c34b
commit c44aeac198
2 changed files with 23 additions and 11 deletions

View File

@@ -25,6 +25,10 @@ let SpellSchema = new SimpleSchema({})
type: Boolean,
optional: true,
},
prepared: {
type: Boolean,
optional: true,
},
// This spell ignores spell slot rules
castWithoutSpellSlots: {
type: Boolean,

View File

@@ -1,5 +1,23 @@
<template lang="html">
<div class="attribute-form">
<div class="spell-form">
<div class="layout row wrap justify-space-between">
<smart-switch
label="Prepared"
style="width: 200px; flex-grow: 0;"
class="mx-2"
:value="model.prepared"
:error-messages="errors.prepared"
@change="change('prepared', ...arguments)"
/>
<smart-switch
label="Always prepared"
style="width: 200px; flex-grow: 0;"
class="mx-2"
:value="model.alwaysPrepared"
:error-messages="errors.alwaysPrepared"
@change="change('alwaysPrepared', ...arguments)"
/>
</div>
<text-field
ref="focusFirst"
label="Name"
@@ -27,16 +45,6 @@
@change="change('school', ...arguments)"
/>
</div>
<div class="layout row wrap">
<smart-switch
label="Always prepared"
style="width: 200px; flex-grow: 0;"
class="ml-2"
:value="model.alwaysPrepared"
:error-messages="errors.alwaysPrepared"
@change="change('alwaysPrepared', ...arguments)"
/>
</div>
<text-field
label="Casting Time"
:value="model.castingTime"