Zero value stats now appear in character sheet

This commit is contained in:
Thaum Rystra
2020-04-29 11:10:23 +02:00
parent 4fd62d17bd
commit d63565633e
2 changed files with 7 additions and 20 deletions

View File

@@ -204,18 +204,6 @@
});
};
const getNonZeroAttributeOfType = function(charId, type){
return CreatureProperties.find({
'ancestors.id': charId,
type: 'attribute',
attributeType: type,
value: {$ne: 0},
removed: {$ne: true},
}, {
sort: {order: 1}
});
};
export default {
components: {
AbilityListTile,
@@ -246,13 +234,13 @@
return getAttributeOfType(this.creatureId, 'modifier');
},
resources(){
return getNonZeroAttributeOfType(this.creatureId, 'resource');
return getAttributeOfType(this.creatureId, 'resource');
},
spellSlots(){
return getNonZeroAttributeOfType(this.creatureId, 'spellSlot');
return getAttributeOfType(this.creatureId, 'spellSlot');
},
hitDice(){
return getNonZeroAttributeOfType(this.creatureId, 'hitDice');
return getAttributeOfType(this.creatureId, 'hitDice');
},
checks(){
return CreatureProperties.find({

View File

@@ -1,9 +1,9 @@
<template lang="html">
<health-bar-card
:attributes="attributes"
@change="healthBarChanged"
@click="healthBarClicked"
/>
:attributes="attributes"
@change="healthBarChanged"
@click="healthBarClicked"
/>
</template>
<script>
@@ -23,7 +23,6 @@
'ancestors.id': this.creatureId,
type: 'attribute',
attributeType: 'healthBar',
value: {$ne: 0},
}, {
sort: {order: 1},
});