Implemented skill list

Proficiency icons
(dis)advantage icons
asterisks for conditionals
"auto fail" notification
better looking border art
This commit is contained in:
Thaum
2014-11-06 11:58:46 +00:00
parent 58fea9d6a1
commit 071f48831e
15 changed files with 149 additions and 64 deletions

View File

@@ -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);