Made initiative a skill of type "check" instead of a modifier

This commit is contained in:
Stefan Zermatten
2019-02-27 16:08:20 +02:00
parent 4e7c0c5a90
commit 8772e539da
4 changed files with 20 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ let creatureSchema = schema({
type: {type: String, defaultValue: "pc", allowedValues: ["pc", "npc", "monster"]}, type: {type: String, defaultValue: "pc", allowedValues: ["pc", "npc", "monster"]},
//computed //computed
variables: {type: Object, blackbox: true}, variables: {type: Object, blackbox: true, defaultValue: {}},
//permissions //permissions
owner: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1}, owner: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},

View File

@@ -39,7 +39,6 @@ export default () => ({
{"name": "Level 9 Spell Slots", "variableName": "level9SpellSlots", "type": "spellSlot"}, {"name": "Level 9 Spell Slots", "variableName": "level9SpellSlots", "type": "spellSlot"},
{"name": "Proficiency Bonus", "variableName": "proficiencyBonus", "type": "modifier"}, {"name": "Proficiency Bonus", "variableName": "proficiencyBonus", "type": "modifier"},
{"name": "Initiative", "variableName": "initiative", "type": "modifier"},
{"name": "Carry Capacity Multiplier", "variableName": "carryMultiplier", "type": "utility", "baseValue": 1}, {"name": "Carry Capacity Multiplier", "variableName": "carryMultiplier", "type": "utility", "baseValue": 1},
{"name": "Rage Damage", "variableName": "rageDamage", "type": "utility"}, {"name": "Rage Damage", "variableName": "rageDamage", "type": "utility"},
@@ -71,6 +70,8 @@ export default () => ({
{"name": "Intelligence Save", "variableName": "intelligenceSave", "ability": "intelligence", "type":"save"}, {"name": "Intelligence Save", "variableName": "intelligenceSave", "ability": "intelligence", "type":"save"},
{"name": "Wisdom Save", "variableName": "wisdomSave", "ability": "wisdom", "type":"save"}, {"name": "Wisdom Save", "variableName": "wisdomSave", "ability": "wisdom", "type":"save"},
{"name": "Charisma Save", "variableName": "charismaSave", "ability": "charisma", "type":"save"}, {"name": "Charisma Save", "variableName": "charismaSave", "ability": "charisma", "type":"save"},
{"name": "Initiative", "variableName": "initiative", "ability": "dexterity", "type":"check"},
], ],
"damageMultipliers": [ "damageMultipliers": [

View File

@@ -33,7 +33,7 @@ let skillSchema = schema({
allowedValues: [ allowedValues: [
"skill", "skill",
"save", "save",
"stat", "check",
"tool", "tool",
"weapon", "weapon",
"language", "language",

View File

@@ -39,6 +39,14 @@
/> />
</div> </div>
<div v-for="check in checks" class="check" :key="check._id">
<attribute-card modifier
v-bind="check"
:data-id="check._id"
@click="clickSkill({_id: check._id})"
/>
</div>
<div class="hit-dice"> <div class="hit-dice">
<v-card> <v-card>
<v-list> <v-list>
@@ -212,6 +220,14 @@
} }
}); });
}, },
checks(){
return Skills.find({
charId: this.charId,
type: 'check',
}, {
sort: {order: 1},
});
},
savingThrows(){ savingThrows(){
return Skills.find({ return Skills.find({
charId: this.charId, charId: this.charId,