diff --git a/rpg-docs/Model/Character/Characters.js b/rpg-docs/Model/Character/Characters.js
index b914b8de..1bbab29f 100644
--- a/rpg-docs/Model/Character/Characters.js
+++ b/rpg-docs/Model/Character/Characters.js
@@ -185,15 +185,9 @@ Characters.helpers({
return value;
},
-
- skillMod: function(skill){
- //get the final value of the ability score
- var ability = this.attributeValue(this.attributes[skill.ability]);
-
- //base modifier
- var mod = +getMod(ability)
-
- //multiply proficiency bonus by largest value in proficiency array
+
+ proficiency: function(skill){
+ //return largest value in proficiency array
var prof = 0;
for(var i = 0, l = skill.proficiency.length; i < l; i++){
var newProf = pop(skill.proficiency[i].value, this);
@@ -201,6 +195,23 @@ Characters.helpers({
prof = newProf;
}
}
+ return prof;
+ },
+
+ skillMod: function(skill){
+ if(skill === undefined){
+ console.log("Cannot get skillMod of undefined");
+ return;
+ }
+ //get the final value of the ability score
+ var ability = this.attributeValue(this.attributes[skill.ability]);
+
+ //base modifier
+ var mod = +getMod(ability)
+
+ //multiply proficiency bonus by largest value in proficiency array
+ var prof = this.proficiency(skill);
+
//add multiplied proficiency bonus to modifier
mod += prof * this.attributeValue(this.attributes.proficiencyBonus);
diff --git a/rpg-docs/client/views/character/character.css b/rpg-docs/client/views/character/character.css
index badd6eb3..7fd04e6c 100644
--- a/rpg-docs/client/views/character/character.css
+++ b/rpg-docs/client/views/character/character.css
@@ -1,6 +1,7 @@
.flexContainer {
display: flex;
flex-wrap: wrap;
+ justify-content: space-around;
}
#abilityScores {
@@ -14,12 +15,16 @@
.floatBox{
color: #301d02;
+ /*Fancy image border*/
border-image-width: 92px 60px 57px 60px;
border-image-outset: 15px;
border-image-source: url('/png/big-border.png');
border-image-slice: 275 179 171 179;
border-image-repeat: stretch;
+ /*Shadow*/
+ box-shadow: 0px 5px 20px rgba(0, 0, 0, 1);
+
padding: 0px 5px 5px 5px;
margin: 15px;
background: #f0e3d1;
diff --git a/rpg-docs/client/views/character/character.html b/rpg-docs/client/views/character/character.html
index b4a4f054..483c59f3 100644
--- a/rpg-docs/client/views/character/character.html
+++ b/rpg-docs/client/views/character/character.html
@@ -11,7 +11,7 @@
Proficiency Bonus {{proficiencyBonus}}
diff --git a/rpg-docs/client/views/character/healthBar/healthBar.css b/rpg-docs/client/views/character/healthBar/healthBar.css
index eadb9c61..9b3330d1 100644
--- a/rpg-docs/client/views/character/healthBar/healthBar.css
+++ b/rpg-docs/client/views/character/healthBar/healthBar.css
@@ -34,7 +34,7 @@
top: 2px;
height: 26px;
border-radius: 15px;
- background-color: #AF6700;
+ background-color: #CA9548;
}
.healthBarBorder{
diff --git a/rpg-docs/client/views/character/savesAndSkills.html b/rpg-docs/client/views/character/savesAndSkills.html
deleted file mode 100644
index b78886c9..00000000
--- a/rpg-docs/client/views/character/savesAndSkills.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
- Saving Throws
-
- Strength Save {{skillMod skills.strengthSave}}
-
- Dexterity Save {{skillMod skills.dexteritySave}}
-
- Constitution Save {{skillMod skills.constitutionSave}}
-
- Intelligence Save {{skillMod skills.intelligenceSave}}
-
- Wisdom Save {{skillMod skills.wisdomSave}}
-
- Charisma Save {{skillMod skills.charismaSave}}
-
- Skills
-
- Acrobatics {{skillMod skills.acrobatics}}
-
- Animal Handling {{skillMod skills.animalHandling}}
-
- Arcana {{skillMod skills.arcana}}
-
- Athletics {{skillMod skills.athletics}}
-
- Deception {{skillMod skills.deception}}
-
- History {{skillMod skills.history}}
-
- Insight {{skillMod skills.insight}}
-
- Intimidation {{skillMod skills.intimidation}}
-
- Investigation {{skillMod skills.investigation}}
-
- Medicine {{skillMod skills.medicine}}
-
- Nature {{skillMod skills.nature}}
-
- Perception {{skillMod skills.perception}}
-
- Persuasion {{skillMod skills.persuasion}}
-
- Religion {{skillMod skills.religion}}
-
- Sleight of Hand {{skillMod skills.sleightOfHand}}
-
- Stealth {{skillMod skills.stealth}}
-
- Survival {{skillMod skills.survival}}
-
-
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/skills/skills.css b/rpg-docs/client/views/character/skills/skills.css
new file mode 100644
index 00000000..98fe850d
--- /dev/null
+++ b/rpg-docs/client/views/character/skills/skills.css
@@ -0,0 +1,38 @@
+.profIcon{
+ display: inline-block;
+ width: 23px;
+ height: 14px;
+ background-size: contain;
+ background-repeat: no-repeat;
+
+ position: relative;
+ top: 1px;
+}
+
+table.skillTable td:nth-of-type(2) {
+ text-align: right;
+}
+
+table.skillTable td:nth-of-type(3) {
+ padding-left: 8px;
+}
+
+td.fail {
+ color: #AF0000;
+}
+
+.advantage{
+ 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;
+}
+
+td.conditionals::after{
+ content: "*";
+}
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/skills/skills.html b/rpg-docs/client/views/character/skills/skills.html
new file mode 100644
index 00000000..0fccfb2b
--- /dev/null
+++ b/rpg-docs/client/views/character/skills/skills.html
@@ -0,0 +1,30 @@
+
+ Saving Throws
+
+ {{#each saveList}}
+
+ |
+ {{#if failSkill}}
+ fail |
+ {{else}}
+ {{../skillMod skill}} |
+ {{/if}}
+ {{name}} |
+
+ {{/each}}
+
+ Skills
+
+ {{#each skillList}}
+
+ |
+ {{#if failSkill}}
+ fail |
+ {{else}}
+ {{../skillMod skill}} |
+ {{/if}}
+ {{name}} |
+
+ {{/each}}
+
+
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/skills/skills.js b/rpg-docs/client/views/character/skills/skills.js
new file mode 100644
index 00000000..20b759d4
--- /dev/null
+++ b/rpg-docs/client/views/character/skills/skills.js
@@ -0,0 +1,53 @@
+Template.skills.helpers({
+ saveList: function(){
+ return [
+ {name: "Strength", skill: this.skills.strengthSave},
+ {name: "Dexterity", skill: this.skills.dexteritySave},
+ {name: "Constitution", skill: this.skills.constitutionSave},
+ {name: "Intelligence", skill: this.skills.intelligenceSave},
+ {name: "Wisdom", skill: this.skills.wisdomSave},
+ {name: "Charisma", skill: this.skills.charismaSave}
+ ];
+ },
+ skillList: function(){
+ return [
+ {name: "Acrobatics", skill: this.skills.acrobatics},
+ {name: "Animal Handling", skill: this.skills.animalHandling},
+ {name: "Arcana", skill: this.skills.arcana},
+ {name: "Athletics", skill: this.skills.athletics},
+ {name: "Deception", skill: this.skills.deception},
+ {name: "History", skill: this.skills.history},
+ {name: "Insight", skill: this.skills.insight},
+ {name: "Intimidation", skill: this.skills.intimidation},
+ {name: "Investigation", skill: this.skills.investigation},
+ {name: "Medicine", skill: this.skills.medicine},
+ {name: "Nature", skill: this.skills.nature},
+ {name: "Perception", skill: this.skills.perception},
+ {name: "Performance", skill: this.skills.performance},
+ {name: "Persuasion", skill: this.skills.persuasion},
+ {name: "Religion", skill: this.skills.religion},
+ {name: "Sleight of Hand", skill: this.skills.sleightOfHand},
+ {name: "Stealth", skill: this.skills.stealth},
+ {name: "Survival", skill: this.skills.survival}
+ ];
+ },
+ profIcon: function(skill){
+ var prof = Template.parentData(1).proficiency(skill);
+ if(prof > 0 && prof < 1) return "profHalf.png";
+ if(prof === 1) return "profSingle.png";
+ if(prof > 1) return "profDouble.png";
+ return "profNone.png";
+ },
+ failSkill: function(){
+ return this.skill.fail.length > 0;
+ },
+ advantage: function(){
+ var adv = this.skill.advantage.length;
+ var disadv = this.skill.disadvantage.length;
+ if(adv > 0 && disadv === 0) return "advantage";
+ if(disadv > 0 && adv === 0) return "disadvantage";
+ },
+ conditionals: function(){
+ if(this.skill.conditional.length > 0) return "conditionals";
+ }
+});
\ No newline at end of file
diff --git a/rpg-docs/client/views/general.css b/rpg-docs/client/views/general.css
index 296e3835..b956d8f7 100644
--- a/rpg-docs/client/views/general.css
+++ b/rpg-docs/client/views/general.css
@@ -4,5 +4,5 @@ root {
body {
font-family: sans-serif;
- background-color: #333;
+ background: #201500;
}
\ No newline at end of file
diff --git a/rpg-docs/public/png/advantage/greenUp.png b/rpg-docs/public/png/advantage/greenUp.png
new file mode 100644
index 00000000..47c56696
Binary files /dev/null and b/rpg-docs/public/png/advantage/greenUp.png differ
diff --git a/rpg-docs/public/png/advantage/redDown.png b/rpg-docs/public/png/advantage/redDown.png
new file mode 100644
index 00000000..2825d652
Binary files /dev/null and b/rpg-docs/public/png/advantage/redDown.png differ
diff --git a/rpg-docs/public/png/profIcons/profDouble.png b/rpg-docs/public/png/profIcons/profDouble.png
new file mode 100644
index 00000000..f286c2cf
Binary files /dev/null and b/rpg-docs/public/png/profIcons/profDouble.png differ
diff --git a/rpg-docs/public/png/profIcons/profHalf.png b/rpg-docs/public/png/profIcons/profHalf.png
new file mode 100644
index 00000000..4e406d00
Binary files /dev/null and b/rpg-docs/public/png/profIcons/profHalf.png differ
diff --git a/rpg-docs/public/png/profIcons/profNone.png b/rpg-docs/public/png/profIcons/profNone.png
new file mode 100644
index 00000000..d0bbf872
Binary files /dev/null and b/rpg-docs/public/png/profIcons/profNone.png differ
diff --git a/rpg-docs/public/png/profIcons/profSingle.png b/rpg-docs/public/png/profIcons/profSingle.png
new file mode 100644
index 00000000..f6d02686
Binary files /dev/null and b/rpg-docs/public/png/profIcons/profSingle.png differ