diff --git a/rpg-docs/.meteor/.gitignore b/rpg-docs/.meteor/.gitignore index b6fe44a8..f289029d 100644 --- a/rpg-docs/.meteor/.gitignore +++ b/rpg-docs/.meteor/.gitignore @@ -1,3 +1,5 @@ local local + +local diff --git a/rpg-docs/Model/Character/Characters.js b/rpg-docs/Model/Character/Characters.js index 3ad0b355..4647652f 100644 --- a/rpg-docs/Model/Character/Characters.js +++ b/rpg-docs/Model/Character/Characters.js @@ -34,6 +34,12 @@ Schemas.Character = new SimpleSchema({ }, experience: {type: Schemas.Attribute}, proficiencyBonus: {type: Schemas.Attribute}, + "proficiencyBonus.add": { + type: [Schemas.Effect], + defaultValue: [ + {name: "Proficiency bonus by level", calculation: "floor(level / 4.1) + 2"} + ] + }, speed: {type: Schemas.Attribute}, weight: {type: Schemas.Attribute}, weightCarried: {type: Schemas.Attribute}, @@ -221,7 +227,7 @@ Schemas.Character = new SimpleSchema({ //proficiencies weaponsProficiencies: { - type: [Schemas.Proficiency], + type: [Schemas.Proficiency], defaultValue: [] }, toolsProficiencies: { @@ -229,7 +235,7 @@ Schemas.Character = new SimpleSchema({ defaultValue: [] }, languages: { - type: [Schemas.Proficiency], + type: [Schemas.Proficiency], defaultValue: [] }, @@ -259,7 +265,7 @@ Characters.find({},{fields: {time: 1, expirations: 1}}).observe({ } }); -var attributeBase = function(attribute){ +var attributeBase = function(charId, attribute){ var value = 0; //add all values in add array _.each(attribute.add, function(effect){ @@ -285,10 +291,10 @@ var attributeBase = function(attribute){ return value; } -//functions and calculated values. -//These functions can only rely on this._id since no other +//functions and calculated values. +//These functions can only rely on this._id since no other //field is likely to be attached to all returned characters -Characters.helpers({ +Characters.helpers({ //returns the value stored in the field requested //will set up dependencies on just that field getField : function(fieldName){ @@ -320,7 +326,7 @@ Characters.helpers({ return this.getField(fieldName); }, - attributeValue: (function(){ + attributeValue: (function(){ //store a private array of attributes we've visited without returning //if we try to visit the same attribute twice before resolving its value //we are in a dependency loop and need to GTFO @@ -339,16 +345,16 @@ Characters.helpers({ var charId = this._id; var attribute = this.getField(attributeName); //base value - var value = attributeBase(attribute); + var value = attributeBase(charId, attribute); value += attribute.adjustment; - + //this attribute returns, pull it from the array, we may visit it again safely visitedAttributes = _.without(visitedAttributes, attributeName); return value; } })(), - attributeBase: (function(){ + attributeBase: (function(){ //store a private array of attributes we've visited without returning //if we try to visit the same attribute twice before resolving its value //we are in a dependency loop and need to GTFO @@ -367,8 +373,8 @@ Characters.helpers({ var charId = this._id; var attribute = this.getField(attributeName); //base value - var value = attributeBase(attribute); - + var value = attributeBase(charId, attribute); + //this attribute returns, pull it from the array, we may visit it again safely visitedAttributes = _.without(visitedAttributes, attributeName); return value; @@ -449,12 +455,12 @@ Characters.helpers({ return prof; }, - passiveSkill: function(skill){ - if (_.isString(skill)){ - skill = this.getField(skill); + passiveSkill: function(skillName){ + if (_.isString(skillName)){ + var skill = this.getField(skillName); } var charId = this._id - var mod = +this.skillMod(skill); + var mod = +this.skillMod(skillName); var value = 10 + mod; _.each(skill.passiveAdd, function(effect){ value += evaluateEffect(charId, effect); @@ -485,4 +491,4 @@ Characters.helpers({ if(xp > 355000) return 20; return 0; } -}); \ No newline at end of file +}); diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index ef606d52..0818b07f 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -1,11 +1,15 @@ +Router.configure({ + loadingTemplate: 'loading' +}); + Router.map( function () { - this.route('home', + this.route('home', { path: '/', waitOn: function(){ return Meteor.subscribe("characterList", Meteor.userId()); }, - data: { + data: { characters: function(){ return Characters.find({}, {fields: {_id: 1}}); } @@ -44,4 +48,4 @@ Router.map( function () { return data; } }); -}); \ No newline at end of file +}); diff --git a/rpg-docs/client/views/character/SideAbilities/skills/skills.css b/rpg-docs/client/views/character/SideAbilities/skills/skills.css index 98fe850d..38644db4 100644 --- a/rpg-docs/client/views/character/SideAbilities/skills/skills.css +++ b/rpg-docs/client/views/character/SideAbilities/skills/skills.css @@ -1,38 +1,42 @@ .profIcon{ - display: inline-block; - width: 23px; - height: 14px; - background-size: contain; - background-repeat: no-repeat; - - position: relative; - top: 1px; + display: inline-block; + width: 23px; + height: 14px; + background-size: contain; + background-repeat: no-repeat; + + position: relative; + top: 1px; + + /*TODO fix the actual images and remove inversion*/ + -webkit-filter: invert(100%); + opacity: 0.54; } -table.skillTable td:nth-of-type(2) { - text-align: right; +table.skillTable td:nth-of-type(2) { + text-align: right; } -table.skillTable td:nth-of-type(3) { - padding-left: 8px; +table.skillTable td:nth-of-type(3) { + padding-left: 8px; } td.fail { - color: #AF0000; + color: #AF0000; } .advantage{ - background-image: url(/png/advantage/greenUp.png); - background-size: contain; - background-repeat: no-repeat; + background-image: url(/png/advantage/greenUp.png); + background-size: contain; + background-repeat: no-repeat; } .disadvantage{ - background-image: url(/png/advantage/redDown.png); - background-size: contain; - background-repeat: no-repeat; + background-image: url(/png/advantage/redDown.png); + background-size: contain; + background-repeat: no-repeat; } td.conditionals::after{ - content: "*"; -} \ No newline at end of file + content: "*"; +} diff --git a/rpg-docs/client/views/character/Stats/stats.css b/rpg-docs/client/views/character/Stats/stats.css index d045e793..ed6d0680 100644 --- a/rpg-docs/client/views/character/Stats/stats.css +++ b/rpg-docs/client/views/character/Stats/stats.css @@ -1,4 +1,6 @@ #stats{ display: flex; justify-content: space-around; -} \ No newline at end of file + align-items: flex-start; + flex-wrap: wrap; +} diff --git a/rpg-docs/client/views/character/Stats/stats.html b/rpg-docs/client/views/character/Stats/stats.html index d67c5fc7..9c75b974 100644 --- a/rpg-docs/client/views/character/Stats/stats.html +++ b/rpg-docs/client/views/character/Stats/stats.html @@ -1,80 +1,80 @@ \ No newline at end of file + {{attributevalue "level1SpellSlots"}} + {{attributevalue "level2SpellSlots"}} + {{attributevalue "level3SpellSlots"}} + {{attributevalue "level4SpellSlots"}} + {{attributevalue "level5SpellSlots"}} + {{attributevalue "level6SpellSlots"}} + {{attributevalue "level7SpellSlots"}} + {{attributevalue "level8SpellSlots"}} + {{attributevalue "level9SpellSlots"}} + diff --git a/rpg-docs/client/views/character/abilityCards/abilityCards.css b/rpg-docs/client/views/character/abilityCards/abilityCards.css new file mode 100644 index 00000000..e69de29b diff --git a/rpg-docs/client/views/character/abilityCards/abilityCards.html b/rpg-docs/client/views/character/abilityCards/abilityCards.html new file mode 100644 index 00000000..214d362a --- /dev/null +++ b/rpg-docs/client/views/character/abilityCards/abilityCards.html @@ -0,0 +1,98 @@ + + + + + + + + + + + + + diff --git a/rpg-docs/client/views/character/characterSheet.html b/rpg-docs/client/views/character/characterSheet.html index 13158d42..7f515e2d 100644 --- a/rpg-docs/client/views/character/characterSheet.html +++ b/rpg-docs/client/views/character/characterSheet.html @@ -29,10 +29,10 @@
{{> stats}}
-
{{> features}}
-
{{> persona}}
-
{{> inventory}}
-
{{> spellBook}}
-
{{> journal}}
+
features
+
persona
+
inventory
+
spellBook
+
journal
diff --git a/rpg-docs/client/views/general.css b/rpg-docs/client/views/general.css index 1fd5c93d..b8d60674 100644 --- a/rpg-docs/client/views/general.css +++ b/rpg-docs/client/views/general.css @@ -1,33 +1,119 @@ root { - display: block; + display: block; } body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - color: #333; - overflow-x: hidden; - box-sizing: border-box; + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial; + margin: 0; + overflow-x: hidden; } body.core-narrow { - padding: 8px; + padding: 8px; } .calculatedValue { - color: #021C33; - font-weight: bold; + color: #021C33; + font-weight: bold; } * { - box-sizing: border-box; + box-sizing: border-box; } -h2 { - margin: 0; +h1, .headline { + font-size: 24px; + font-weight: 400; + margin: 0; + color: #000; + color: rgba(0,0,0,0.87); + letter-spacing: 0; } -h3 { - font-size: 16px; - font-weight: 400; -} \ No newline at end of file +h2, .title { + font-size: 20px; + font-weight: 500; + margin: 0; + color: #000; + color: rgba(0,0,0,0.87); + letter-spacing: 0.005; +} + +h3, .subhead { + font-size: 16px; + font-weight: 400; + margin: 0; + color: #000; + color: rgba(0,0,0,0.87); + letter-spacing: 0.010; +} + +.body2 { + font-size: 14px; + font-weight: 500; + color: #000; + color: rgba(0,0,0,0.87); + letter-spacing: 0.010; +} + +p, .body1, body { + font-size: 14px; + font-weight: 400; + color: #000; + color: rgba(0,0,0,0.87); + letter-spacing: 0.010; +} + +.caption{ + font-size: 12px; + font-weight: 400; + color: #000; + color: rgba(0,0,0,0.54); + letter-spacing: 0.020; +} + +hr { + background-color: #444; + opacity: 0.12; + border-width: 0; + color: #444; + height: 1px; + line-height: 0; + margin: 0 -16px; + text-align: center; +} + +paper-button { + font-size: 14px; + font-weight: 400; + text-transform: uppercase; + color: #000; + color: rgba(0,0,0,0.87); + letter-spacing: 0.010; +} + +.card { + width: 148px; + margin: 4px; + padding: 16px; + font-size: 14px; + border-radius: 2px; + background-color: white; +} + +.card.double { + width: 304px; +} + +.card paper-button { + font-size: 14px; + letter-spacing: 0.01em; +} + +.grey-background, body { + background-color: #E0E0E0; +} + +.center { + text-align: center; +} diff --git a/rpg-docs/client/views/index.html b/rpg-docs/client/views/index.html index 7772d766..96c0283e 100644 --- a/rpg-docs/client/views/index.html +++ b/rpg-docs/client/views/index.html @@ -5,6 +5,7 @@ + + - diff --git a/rpg-docs/client/views/loading/loading.css b/rpg-docs/client/views/loading/loading.css new file mode 100644 index 00000000..47e35481 --- /dev/null +++ b/rpg-docs/client/views/loading/loading.css @@ -0,0 +1,3 @@ +paper-spinner.red::shadow .circle { + border-color: #db4437; +} diff --git a/rpg-docs/client/views/loading/loading.html b/rpg-docs/client/views/loading/loading.html new file mode 100644 index 00000000..432b1b18 --- /dev/null +++ b/rpg-docs/client/views/loading/loading.html @@ -0,0 +1,3 @@ +