Skip to content

Commit

Permalink
fix: Skill modifiers and option default jumps fixed *so happy!*
Browse files Browse the repository at this point in the history
  • Loading branch information
UltraKev committed Aug 19, 2020
1 parent e136dbf commit 5ddc84b
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 115 deletions.
13 changes: 8 additions & 5 deletions src/module/entities/TwodsixActor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class TwodsixActor extends Actor {
this._prepareCharacterData(actorData);
break;
default:
console.log(`Unhandled actorData.type in prepareData:${actorData.type}`)

}

}
Expand All @@ -32,13 +32,16 @@ export default class TwodsixActor extends Actor {
_prepareCharacterData(actorData:ActorData):void {
// Get the Actor's data object
const {data} = actorData;

for (const cha of Object.values(data.characteristics as Record<any, any>)) {
cha.current = cha.value - cha.damage;
cha.mod = calcModFor(cha.current);
}


for (const skill of Object.values(data.skills as Record<any, any>)) {
var characteristic = skill.characteristic;
console.log(skill)
skill.mod = data.characteristics[characteristic].mod;
}
}


}
2 changes: 2 additions & 0 deletions static/styles/twodsix.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5ddc84b

Please sign in to comment.