From 8772e539da4764e83cb4fa01035b4ffe89eb39c4 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Wed, 27 Feb 2019 16:08:20 +0200 Subject: [PATCH] Made initiative a skill of type "check" instead of a modifier --- app/imports/api/creature/Creatures.js | 2 +- .../api/creature/DEFAULT_CHARACTER_DOCS.js | 3 ++- app/imports/api/creature/properties/Skills.js | 2 +- app/imports/ui/character/StatsTab.vue | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/imports/api/creature/Creatures.js b/app/imports/api/creature/Creatures.js index 79d2f1ba..7323ee86 100644 --- a/app/imports/api/creature/Creatures.js +++ b/app/imports/api/creature/Creatures.js @@ -37,7 +37,7 @@ let creatureSchema = schema({ type: {type: String, defaultValue: "pc", allowedValues: ["pc", "npc", "monster"]}, //computed - variables: {type: Object, blackbox: true}, + variables: {type: Object, blackbox: true, defaultValue: {}}, //permissions owner: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1}, diff --git a/app/imports/api/creature/DEFAULT_CHARACTER_DOCS.js b/app/imports/api/creature/DEFAULT_CHARACTER_DOCS.js index d1c61c69..086daf2a 100644 --- a/app/imports/api/creature/DEFAULT_CHARACTER_DOCS.js +++ b/app/imports/api/creature/DEFAULT_CHARACTER_DOCS.js @@ -39,7 +39,6 @@ export default () => ({ {"name": "Level 9 Spell Slots", "variableName": "level9SpellSlots", "type": "spellSlot"}, {"name": "Proficiency Bonus", "variableName": "proficiencyBonus", "type": "modifier"}, - {"name": "Initiative", "variableName": "initiative", "type": "modifier"}, {"name": "Carry Capacity Multiplier", "variableName": "carryMultiplier", "type": "utility", "baseValue": 1}, {"name": "Rage Damage", "variableName": "rageDamage", "type": "utility"}, @@ -71,6 +70,8 @@ export default () => ({ {"name": "Intelligence Save", "variableName": "intelligenceSave", "ability": "intelligence", "type":"save"}, {"name": "Wisdom Save", "variableName": "wisdomSave", "ability": "wisdom", "type":"save"}, {"name": "Charisma Save", "variableName": "charismaSave", "ability": "charisma", "type":"save"}, + + {"name": "Initiative", "variableName": "initiative", "ability": "dexterity", "type":"check"}, ], "damageMultipliers": [ diff --git a/app/imports/api/creature/properties/Skills.js b/app/imports/api/creature/properties/Skills.js index c03642cf..b95dd80a 100644 --- a/app/imports/api/creature/properties/Skills.js +++ b/app/imports/api/creature/properties/Skills.js @@ -33,7 +33,7 @@ let skillSchema = schema({ allowedValues: [ "skill", "save", - "stat", + "check", "tool", "weapon", "language", diff --git a/app/imports/ui/character/StatsTab.vue b/app/imports/ui/character/StatsTab.vue index 67e71d7d..cadf257b 100644 --- a/app/imports/ui/character/StatsTab.vue +++ b/app/imports/ui/character/StatsTab.vue @@ -39,6 +39,14 @@ /> +
+ +
+
@@ -212,6 +220,14 @@ } }); }, + checks(){ + return Skills.find({ + charId: this.charId, + type: 'check', + }, { + sort: {order: 1}, + }); + }, savingThrows(){ return Skills.find({ charId: this.charId,