Made damage save form a bit more intuitive
This commit is contained in:
@@ -31,9 +31,22 @@
|
|||||||
@change="change('damageType', ...arguments)"
|
@change="change('damageType', ...arguments)"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
<v-col cols="12">
|
||||||
|
<smart-toggle
|
||||||
|
label="Target creature"
|
||||||
|
:value="model.target"
|
||||||
|
:options="[
|
||||||
|
{name: 'Action Target', value: 'target'},
|
||||||
|
{name: 'Self', value: 'self'},
|
||||||
|
]"
|
||||||
|
:error-messages="errors.target"
|
||||||
|
@change="change('target', ...arguments)"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<smart-switch
|
<smart-switch
|
||||||
label="Save for half damage"
|
class="mt-0"
|
||||||
|
label="Saving throw"
|
||||||
:value="!!model.save"
|
:value="!!model.save"
|
||||||
:error-messages="errors.save"
|
:error-messages="errors.save"
|
||||||
@change="(val, ack) => $emit('change', {
|
@change="(val, ack) => $emit('change', {
|
||||||
@@ -76,24 +89,23 @@
|
|||||||
$emit('change', {path: ['save', 'stat'], value, ack})"
|
$emit('change', {path: ['save', 'stat'], value, ack})"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
<v-col cols="12">
|
||||||
|
<computed-field
|
||||||
|
v-if="!!model.save"
|
||||||
|
label="Damage on successful save"
|
||||||
|
hint="Use "~damage" to reference the damage that would normally be dealt"
|
||||||
|
placeholder="Half damage"
|
||||||
|
persistent-placeholder
|
||||||
|
:model="model.save.damageFunction"
|
||||||
|
:error-messages="errors['save.damageFunction']"
|
||||||
|
@change="({path, value, ack}) =>
|
||||||
|
$emit('change', {path: ['save', 'damageFunction', ...path], value, ack})"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-expand-transition>
|
</v-expand-transition>
|
||||||
<v-row>
|
|
||||||
<v-col cols="12">
|
|
||||||
<smart-toggle
|
|
||||||
label="Target creature"
|
|
||||||
:value="model.target"
|
|
||||||
:options="[
|
|
||||||
{name: 'Action Target', value: 'target'},
|
|
||||||
{name: 'Self', value: 'self'},
|
|
||||||
]"
|
|
||||||
:error-messages="errors.target"
|
|
||||||
@change="change('target', ...arguments)"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<form-sections type="damage">
|
<form-sections type="damage">
|
||||||
<form-section name="Behavior">
|
<form-section name="Log">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<smart-switch
|
<smart-switch
|
||||||
@@ -103,19 +115,6 @@
|
|||||||
@change="change('silent', ...arguments)"
|
@change="change('silent', ...arguments)"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12">
|
|
||||||
<computed-field
|
|
||||||
v-if="!!model.save"
|
|
||||||
label="Damage function"
|
|
||||||
hint="Instead of half, you can use a function to determine the new damage to deal; use "~damage" to reference the standard damage"
|
|
||||||
placeholder="~damage / 2"
|
|
||||||
persistent-placeholder
|
|
||||||
:model="model.save.damageFunction"
|
|
||||||
:error-messages="errors['save.damageFunction']"
|
|
||||||
@change="({path, value, ack}) =>
|
|
||||||
$emit('change', {path: ['save', 'damageFunction', ...path], value, ack})"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</form-section>
|
</form-section>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
Reference in New Issue
Block a user