diff --git a/app/imports/api/creature/properties/Effects.js b/app/imports/api/creature/properties/Effects.js index 243f2ec2..d264b80b 100644 --- a/app/imports/api/creature/properties/Effects.js +++ b/app/imports/api/creature/properties/Effects.js @@ -2,13 +2,13 @@ import SimpleSchema from 'simpl-schema'; import schema from '/imports/api/schema.js'; import {makeChild} from "/imports/api/parenting.js"; -Effects = new Mongo.Collection("effects"); +let Effects = new Mongo.Collection("effects"); /* * Effects are reason-value attached to skills and abilities * that modify their final value or presentation in some way */ -effectSchema = schema({ +let effectSchema = schema({ charId: { type: String, regEx: SimpleSchema.RegEx.Id, diff --git a/app/imports/api/creature/properties/Proficiencies.js b/app/imports/api/creature/properties/Proficiencies.js index 90317302..4c3e8dff 100644 --- a/app/imports/api/creature/properties/Proficiencies.js +++ b/app/imports/api/creature/properties/Proficiencies.js @@ -20,6 +20,10 @@ proficiencySchema = schema({ allowedValues: [0, 0.5, 1, 2], defaultValue: 1, }, + skill: { + type: String, + optional: true, + }, type: { type: String, allowedValues: ["skill", "save", "weapon", "armor", "tool", "language"], @@ -34,6 +38,6 @@ proficiencySchema = schema({ Proficiencies.attachSchema(proficiencySchema); // Proficiencies.attachBehaviour("softRemovable"); -makeChild(Proficiencies, ["enabled"]); +makeChild(Proficiencies, ["enabled", "name"]); export default Proficiencies; diff --git a/app/imports/api/creature/properties/Skills.js b/app/imports/api/creature/properties/Skills.js index 2d2e41b0..c03642cf 100644 --- a/app/imports/api/creature/properties/Skills.js +++ b/app/imports/api/creature/properties/Skills.js @@ -22,10 +22,12 @@ let skillSchema = schema({ variableName: { type: String, }, + // The variable name of the ability this skill relies on ability: { type: String, optional: true, }, + // What type of skill is this type: { type: String, allowedValues: [ @@ -42,36 +44,49 @@ let skillSchema = schema({ order: { type: SimpleSchema.Integer, }, + // If the baseValue is higher than the computed value, it will be used as `value` baseValue: { type: Number, optional: true, }, + // The base proficiency of this skill baseProficiency: { type: Number, optional: true, }, + // Computed value of skill to be added to skill rolls value: { type: Number, defaultValue: 0, }, + // Computed value added by the ability + abilityMod: { + type: SimpleSchema.Integer, + optional: true, + }, + // Computed advantage/disadvantage advantage: { type: SimpleSchema.Integer, optional: true, allowedValues: [-1, 0, 1], }, + // Computed bonus to passive checks passiveBonus: { type: Number, optional: true, }, + // Computed proficiency multiplier proficiency: { type: Number, allowedValues: [0, 0.5, 1, 2], defaultValue: 0, }, + // Computed number of total conditional benefits conditionalBenefits: { type: SimpleSchema.Integer, optional: true, }, + // Computed boolean of whether this skill is forced to fail fail: { type: SimpleSchema.Integer, optional: true, diff --git a/app/imports/ui/character/StatsTab.vue b/app/imports/ui/character/StatsTab.vue index 60d45939..4db53b02 100644 --- a/app/imports/ui/character/StatsTab.vue +++ b/app/imports/ui/character/StatsTab.vue @@ -180,6 +180,13 @@ data: {_id}, }); }, + clickSkill({_id}){ + this.$store.commit("pushDialogStack", { + component: "skill-dialog-container", + elementId: _id, + data: {_id}, + }); + }, hitDiceChange(_id, {type, value}){ if (type === 'increment'){ adjustAttribute.call({_id, increment: value}); diff --git a/app/imports/ui/components/AttributeDialog.vue b/app/imports/ui/components/AttributeDialog.vue index 2f94bd67..ee5d8023 100644 --- a/app/imports/ui/components/AttributeDialog.vue +++ b/app/imports/ui/components/AttributeDialog.vue @@ -34,7 +34,6 @@ + + diff --git a/app/imports/ui/components/SkillDialogContainer.vue b/app/imports/ui/components/SkillDialogContainer.vue new file mode 100644 index 00000000..693b6ca3 --- /dev/null +++ b/app/imports/ui/components/SkillDialogContainer.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/app/imports/ui/components/SkillEdit.vue b/app/imports/ui/components/SkillEdit.vue new file mode 100644 index 00000000..8ce115d7 --- /dev/null +++ b/app/imports/ui/components/SkillEdit.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/app/imports/ui/components/SkillListTile.vue b/app/imports/ui/components/SkillListTile.vue index 7fc77572..a0fee87e 100644 --- a/app/imports/ui/components/SkillListTile.vue +++ b/app/imports/ui/components/SkillListTile.vue @@ -66,6 +66,9 @@ export default { .skill-list-tile >>> .v-list__tile { height: 34px; } + .skill-list-tile{ + background: inherit; + } .prof-icon { min-width: 30px; } diff --git a/app/imports/ui/components/SkillProficiencyList.vue b/app/imports/ui/components/SkillProficiencyList.vue new file mode 100644 index 00000000..0e7f81c3 --- /dev/null +++ b/app/imports/ui/components/SkillProficiencyList.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/app/imports/ui/dialogStack/DialogComponentIndex.js b/app/imports/ui/dialogStack/DialogComponentIndex.js index e722af04..259eb1c0 100644 --- a/app/imports/ui/dialogStack/DialogComponentIndex.js +++ b/app/imports/ui/dialogStack/DialogComponentIndex.js @@ -1,7 +1,9 @@ import AttributeDialog from '/imports/ui/components/AttributeDialog.vue'; import AttributeDialogContainer from '/imports/ui/components/AttributeDialogContainer.vue'; +import SkillDialogContainer from '/imports/ui/components/SkillDialogContainer.vue'; export default { AttributeDialog, AttributeDialogContainer, + SkillDialogContainer, };