Added base values to skills to make implementing non player creatures easier
This commit is contained in:
@@ -40,6 +40,11 @@ skillSchema = new SimpleSchema({
|
||||
order: {
|
||||
type: Number,
|
||||
},
|
||||
baseValue: {
|
||||
type: Number,
|
||||
decimal: true,
|
||||
optional: true,
|
||||
},
|
||||
value: {
|
||||
type: Number,
|
||||
decimal: true,
|
||||
|
||||
@@ -230,6 +230,7 @@ function buildCreature(charId){
|
||||
busyComputing: false,
|
||||
type: "skill",
|
||||
ability: skill.ability,
|
||||
base: skill.baseValue || 0,
|
||||
result: 0, // For skills the result is the skillMod
|
||||
proficiency: 0,
|
||||
add: 0,
|
||||
@@ -528,9 +529,9 @@ function combineSkill(stat, char){
|
||||
if (stat.result < stat.min) stat.result = stat.min;
|
||||
if (stat.result > stat.max) stat.result = stat.max;
|
||||
stat.result = Math.floor(stat.result);
|
||||
if (stat.base > stat.result) stat.result = stat.base;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* combineDamageMultiplier - Combine damageMultiplier's results into final values
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user