f._id);
+ },
+ healthBars() {
+ return getAttributeOfType(this.creature, this.folderIds, 'healthBar');
+ },
abilities() {
- return getAttributeOfType(this.creature, 'ability');
+ return getAttributeOfType(this.creature, this.folderIds, 'ability');
},
stats() {
- return getAttributeOfType(this.creature, 'stat');
+ return getAttributeOfType(this.creature, this.folderIds, 'stat');
},
toggles() {
return CreatureProperties.find({
- 'ancestors.id': this.creatureId,
type: 'toggle',
+ 'ancestors.id': this.creatureId,
+ 'parent.id': { $nin: this.folderIds },
removed: { $ne: true },
deactivatedByAncestor: { $ne: true },
showUI: true,
@@ -435,52 +473,56 @@ export default {
});
},
modifiers() {
- return getAttributeOfType(this.creature, 'modifier');
+ return getAttributeOfType(this.creature, this.folderIds, 'modifier');
},
resources() {
- return getAttributeOfType(this.creature, 'resource');
+ return getAttributeOfType(this.creature, this.folderIds, 'resource');
},
spellSlots() {
- return getAttributeOfType(this.creature, 'spellSlot');
+ return getAttributeOfType(this.creature, this.folderIds, 'spellSlot');
},
hasSpells() {
- const cursor = getProperties(this.creature, {
+ const cursor = getProperties(this.creature, this.folderIds, {
type: 'spell',
})
return cursor && cursor.count();
},
hitDice() {
- return getAttributeOfType(this.creature, 'hitDice');
+ return getAttributeOfType(this.creature, this.folderIds, 'hitDice');
},
checks() {
- return getSkillOfType(this.creature, 'check');
+ return getSkillOfType(this.creature, this.folderIds, 'check');
},
savingThrows() {
- return getSkillOfType(this.creature, 'save');
+ return getSkillOfType(this.creature, this.folderIds, 'save');
},
skills() {
- return getSkillOfType(this.creature, 'skill');
+ return getSkillOfType(this.creature, this.folderIds, 'skill');
},
tools() {
- return getSkillOfType(this.creature, 'tool');
+ return getSkillOfType(this.creature, this.folderIds, 'tool');
},
weapons() {
- return getSkillOfType(this.creature, 'weapon');
+ return getSkillOfType(this.creature, this.folderIds, 'weapon');
},
armors() {
- return getSkillOfType(this.creature, 'armor');
+ return getSkillOfType(this.creature, this.folderIds, 'armor');
},
languages() {
- return getSkillOfType(this.creature, 'language');
+ return getSkillOfType(this.creature, this.folderIds, 'language');
+ },
+ events() {
+ const events = getProperties(this.creature, this.folderIds, { type: 'action', actionType: 'event' });
+ return uniqBy(events.fetch(), e => e.variableName);
},
actions() {
- return getProperties(this.creature, { type: 'action' });
+ return getProperties(this.creature, this.folderIds, { type: 'action', actionType: { $ne: 'event' } });
},
appliedBuffs() {
- return getProperties(this.creature, { type: 'buff' });
+ return getProperties(this.creature, this.folderIds, { type: 'buff' });
},
multipliers() {
- return getProperties(this.creature, {
+ return getProperties(this.creature, this.folderIds, {
type: 'damageMultiplier'
}, {
sort: { value: 1, order: 1 }
@@ -503,13 +545,23 @@ export default {
});
},
incrementChange(_id, { type, value }) {
- if (type === 'increment') {
- damageProperty.call({ _id, operation: 'increment', value: -value });
- }
+ damageProperty.call({
+ _id,
+ operation: type,
+ value: -value
+ }, error => {
+ if (error) {
+ snackbar({ text: error.reason || error.message || error.toString() });
+ console.error(error);
+ }
+ });
},
softRemove(_id) {
softRemoveProperty.call({ _id }, error => {
- if (error) console.error(error);
+ if (error) {
+ snackbar({ text: error.reason || error.message || error.toString() });
+ console.error(error);
+ }
});
},
castSpell() {
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue b/app/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue
new file mode 100644
index 00000000..5a4c5b53
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue
@@ -0,0 +1,339 @@
+
+
+
+
+
+
+
+
+
+ Character not found
+
+
+ Either this character does not exist, or you don't have permission
+ to view it.
+
+
+
+
+
+
+
+
+ {{ creature.name }}
+
+
+
+ {{ creature.alignment }} {{ background }}
+
+
+ {{ race }} {{ creature.gender }}
+
+
+ Level {{ level }} {{ classes[0].name }}
+
+
+ Level {{ level }} ({{ classes.map(c => `${c.name} ${c.level}`).join(', ') }})
+
+
+
+
+
+ {{ creatureUrl }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/PrintedInventory.vue b/app/imports/ui/creature/character/printedCharacterSheet/PrintedInventory.vue
new file mode 100644
index 00000000..53694a81
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/PrintedInventory.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+ Inventory
+
+
+ $vuetify.icons.injustice
+ Weight Carried:
+ {{ weightCarried }} lb
+
+
+ $vuetify.icons.cash
+ Net worth:
+
+
+
+ $vuetify.icons.spell
+ Items attuned:
+ {{ variables.itemsAttuned && variables.itemsAttuned.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/PrintedSpells.vue b/app/imports/ui/creature/character/printedCharacterSheet/PrintedSpells.vue
new file mode 100644
index 00000000..1d60374b
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/PrintedSpells.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/PrintedStats.vue b/app/imports/ui/creature/character/printedCharacterSheet/PrintedStats.vue
new file mode 100644
index 00000000..e3bad2a4
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/PrintedStats.vue
@@ -0,0 +1,639 @@
+
+
+
+
+
+
+
+
+
+ {{ ability.total }}
+
+
+ {{ numberToSignedString(ability.modifier) }}
+
+
+
+
+ {{ numberToSignedString(ability.modifier) }}
+
+
+ {{ ability.total }}
+
+
+
+
+ {{ ability.name }}
+
+
+
+
+
+
+
+
+ {{ toggle.name }}
+
+
+
+
+
+ {{ stat.value }}
+
+
+ {{ stat.name }}
+
+
+
+
+
+ {{ numberToSignedString(modifier.value) }}
+
+
+ {{ modifier.name }}
+
+
+
+
+
+ {{ numberToSignedString(check.value) }}
+
+
+ {{ check.name }}
+
+
+
+
+
+ Total: {{ healthBar.total }}
+
+
+
+ {{ healthBar.name }}
+
+
+
+
+
+
+
+
+ Total:
+
+
+ {{ hitDie.total }}{{ hitDie.hitDiceSize }}
+
+
+
+
+ Hit Dice
+
+
+
+
+
+
+
+ {{ resource.name }}
+
+
+ total: {{ resource.total }}
+
+
+
+
+ {{ resource.name }}
+
+
+
+
+
+
+
+ Spell Slots
+
+
+
+ {{ spellSlot.name }}
+
+
+ Total: {{ spellSlot.total }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ note.name }}
+
+
+
+
+
+
+
+
+
+
+ {{ feature.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedAction.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedAction.vue
new file mode 100644
index 00000000..5f1adf07
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedAction.vue
@@ -0,0 +1,247 @@
+
+
+
+ {{ actionTypeName }}
+
+
+
+
+
+ {{ rollBonus }}
+
+
+
+
+
+
+
+ {{ model.name || propertyName }}
+
+
+
+
+ {{ model.uses }} uses
+
+
+
+
+ Cost: {{ attributeConsumed.quantity && attributeConsumed.quantity.value }} {{ attributeConsumed.statName || attributeConsumed.variableName }}
+
+
+
+ Uses: {{ itemConsumed.quantity && itemConsumed.quantity.value || 0 }} {{ itemConsumed.itemName || itemConsumed.tag }}
+
+
+
+
+
+
+
+
$emit('sub-click', e)"
+ />
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedContainer.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedContainer.vue
new file mode 100644
index 00000000..a15ed8c8
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedContainer.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+ {{ model.name }}
+
+
+
+
+
+
+
+
+ $vuetify.icons.two_coins
+
+
+
+
+
+
+ $vuetify.icons.cash
+
+
+
+ contents
+
+
+
+
+
+
+
+
+
+ $vuetify.icons.weight
+
+ {{ model.weight }} lb
+
+
+
+
+ $vuetify.icons.injustice
+
+ {{ model.contentsWeight }} lb
+
+ contents
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedDamageMultipliers.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedDamageMultipliers.vue
new file mode 100644
index 00000000..386aabcd
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedDamageMultipliers.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+ {{ multiplier.name }}
+
+
+ {{ title(multiplier) }}
+
+
+ {{ multiplier.damageTypes.join(', ') }}
+
+
+
+ For:
+
+ {{ multiplier.includeTags.join(', ') }}
+
+
+
+ Except:
+
+ {{ multiplier.excludeTags.join(', ') }}
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedItem.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedItem.vue
new file mode 100644
index 00000000..ccc5b85d
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedItem.vue
@@ -0,0 +1,173 @@
+
+
+
+
+ {{ title }}
+
+ ({{ attunementText }})
+
+
+
+
+
+
+
+
+
+
+ $vuetify.icons.cash
+
+
+
+
+
+ $vuetify.icons.two_coins
+
+
+
+ each
+
+
+
+
+
+
+
+
+
+ $vuetify.icons.injustice
+
+ {{ totalWeight }} lb
+
+
+
+ $vuetify.icons.weight
+
+ {{ model.weight }} lb
+
+ each
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSkill.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSkill.vue
new file mode 100644
index 00000000..2920634c
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSkill.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ {{ displayedModifier }}
+
+
+ mdi-chevron-double-up
+
+
+ mdi-chevron-double-down
+
+
+
+
+ {{ model.name }}
+
+ *
+
+
+ ({{ passiveScore }})
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpell.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpell.vue
new file mode 100644
index 00000000..8367c2a0
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpell.vue
@@ -0,0 +1,82 @@
+
+
+
+ {{ model.name }}
+
+
+ {{ levelText }} {{ model.school }} {{ model.ritual ? '(ritual)' : '' }}
+
+
+ {{ model.school }} cantrip
+
+
+ Casting Time: {{ model.castingTime }}
+
+
+ Range: {{ model.range }}
+
+
+ Components: {{ spellComponents }}
+
+
+ Duration: {{ model.duration }}
+
+
+
+
+
+
+
+
+
+
diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpellList.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpellList.vue
new file mode 100644
index 00000000..e158000f
--- /dev/null
+++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpellList.vue
@@ -0,0 +1,45 @@
+
+
+
+ {{ model.name }}
+
+
+ Spell Save DC: {{ model.dc && model.dc.value }}
+
+
+ Spell casting ability: {{ model.ability }}
+
+
+ Spell casting ability modifier: {{ model.abilityMod }}
+
+
+ Spell Attack Bonus: {{ model.attackRollBonus && model.attackRollBonus.value }}
+
+
+ Maximum prepared spells: {{ model.maxPrepared && model.maxPrepared.value }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue b/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue
index 944c7642..60eea258 100644
--- a/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue
+++ b/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue
@@ -16,6 +16,14 @@
flat
@change="propertyHelpChanged"
/>
+
+ mdi-help
+
import LibraryNodes from '/imports/api/library/LibraryNodes.js';
import DialogBase from '/imports/ui/dialogStack/DialogBase.vue';
-import { getPropertyName } from '/imports/constants/PROPERTIES.js';
+import PROPERTIES, { getPropertyName } from '/imports/constants/PROPERTIES.js';
import TreeNodeView from '/imports/ui/properties/treeNodeViews/TreeNodeView.vue';
import LibraryNodeExpansionContent from '/imports/ui/library/LibraryNodeExpansionContent.vue';
import schemaFormMixin from '/imports/ui/properties/forms/shared/schemaFormMixin.js';
@@ -235,7 +243,11 @@ export default {
},
toolbarColor(){
return getThemeColor('secondary');
- }
+ },
+ docsPath() {
+ const propDef = PROPERTIES[this.type];
+ return propDef && propDef.docsPath;
+ },
},
watch: {
type(newType){
@@ -259,6 +271,15 @@ export default {
});
});
},
+ helpDialog() {
+ this.$store.commit('pushDialogStack', {
+ component: 'help-dialog',
+ elementId: 'help-button',
+ data: {
+ path: this.docsPath,
+ },
+ });
+ },
searchChanged(val, ack){
this._subs.searchLibraryNodes.setData('searchTerm', val);
this._subs.searchLibraryNodes.setData('limit', undefined);
diff --git a/app/imports/ui/library/LibraryNodeInsertForm.vue b/app/imports/ui/library/LibraryNodeInsertForm.vue
index ebd94d49..c006dde6 100644
--- a/app/imports/ui/library/LibraryNodeInsertForm.vue
+++ b/app/imports/ui/library/LibraryNodeInsertForm.vue
@@ -12,6 +12,13 @@
:value="model.color"
@input="value => change({path: ['color'], value})"
/>
+
+ mdi-help
+
diff --git a/app/imports/ui/properties/components/actions/EventButton.vue b/app/imports/ui/properties/components/actions/EventButton.vue
new file mode 100644
index 00000000..29bdb0c6
--- /dev/null
+++ b/app/imports/ui/properties/components/actions/EventButton.vue
@@ -0,0 +1,80 @@
+
+
+
+
+ {{ model.name }}
+
+
+
+
+
+
+
diff --git a/app/imports/ui/properties/components/attributes/AttributeCard.vue b/app/imports/ui/properties/components/attributes/AttributeCard.vue
index 7b3e1492..f1fd03f9 100644
--- a/app/imports/ui/properties/components/attributes/AttributeCard.vue
+++ b/app/imports/ui/properties/components/attributes/AttributeCard.vue
@@ -5,54 +5,19 @@
@mouseover="hasClickListener ? hovering = true : undefined"
@mouseleave="hasClickListener ? hovering = false : undefined"
>
-
-
-
- {{ computedValue }}
-
-
-
- {{ computedValue }}
-
-
- {{ model.name }}
-
-
+
-
-
diff --git a/app/imports/ui/properties/components/attributes/AttributeCardContent.vue b/app/imports/ui/properties/components/attributes/AttributeCardContent.vue
new file mode 100644
index 00000000..439ad70f
--- /dev/null
+++ b/app/imports/ui/properties/components/attributes/AttributeCardContent.vue
@@ -0,0 +1,97 @@
+
+
+
+
+ {{ computedValue }}
+
+
+
+ {{ computedValue }}
+
+
+ {{ model.name }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/imports/ui/properties/components/attributes/HealthBar.vue b/app/imports/ui/properties/components/attributes/HealthBar.vue
index da4bbb7d..cc83302b 100644
--- a/app/imports/ui/properties/components/attributes/HealthBar.vue
+++ b/app/imports/ui/properties/components/attributes/HealthBar.vue
@@ -6,7 +6,7 @@
style="min-height: 42px;"
:class="{ hover }"
class="my-1 health-bar"
- :data-id="_id"
+ :data-id="model._id"
>
- {{ name }}
+ {{ model.name }}
- {{ value }} / {{ maxValue }}
+ {{ model.value }} / {{ model.total }}