Added healing damage type
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
const DAMAGE_TYPES = Object.freeze([
|
||||
"bludgeoning",
|
||||
"piercing",
|
||||
"slashing",
|
||||
"acid",
|
||||
"cold",
|
||||
"fire",
|
||||
"force",
|
||||
"lightning",
|
||||
"necrotic",
|
||||
"poison",
|
||||
"psychic",
|
||||
"radiant",
|
||||
"thunder",
|
||||
'healing',
|
||||
'bludgeoning',
|
||||
'piercing',
|
||||
'slashing',
|
||||
'acid',
|
||||
'cold',
|
||||
'fire',
|
||||
'force',
|
||||
'lightning',
|
||||
'necrotic',
|
||||
'poison',
|
||||
'psychic',
|
||||
'radiant',
|
||||
'thunder',
|
||||
]);
|
||||
|
||||
export default DAMAGE_TYPES;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<template lang="html">
|
||||
<div class="layout row align-center justify-start">
|
||||
<property-icon
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
:type="model.type"
|
||||
:class="selected && 'primary--text'"
|
||||
:color="model.color"
|
||||
/>
|
||||
:class="selected && 'primary--text'"
|
||||
>
|
||||
{{ icon }}
|
||||
</v-icon>
|
||||
<div
|
||||
class="text-no-wrap text-truncate"
|
||||
>
|
||||
@@ -14,7 +15,12 @@
|
||||
:value="model.amount"
|
||||
:expect-number="false"
|
||||
/>
|
||||
{{ model.damageType }} damage
|
||||
<span class="mr-1">
|
||||
{{ model.damageType }}
|
||||
</span>
|
||||
<span v-if="model.damageType !== 'healing'">
|
||||
damage
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,11 +28,21 @@
|
||||
<script>
|
||||
import treeNodeViewMixin from '/imports/ui/properties/treeNodeViews/treeNodeViewMixin.js';
|
||||
import ComputedForCreature from '/imports/ui/components/computation/ComputedForCreature.vue';
|
||||
import { getPropertyIcon } from '/imports/constants/PROPERTIES.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Computed: ComputedForCreature,
|
||||
},
|
||||
mixins: [treeNodeViewMixin],
|
||||
computed: {
|
||||
icon(){
|
||||
if (this.model.damageType === 'healing'){
|
||||
return 'group_work'
|
||||
} else {
|
||||
return getPropertyIcon('damage');
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
class="mr-2"
|
||||
:value="model.amount"
|
||||
:expect-number="false"
|
||||
/> {{ model.damageType }} damage
|
||||
/>
|
||||
{{ model.damageType }}
|
||||
<span v-if="model.damageType !== 'healing'">
|
||||
damage
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user