Initial import
This commit is contained in:
33
module/actor/actor.js
Normal file
33
module/actor/actor.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
|
||||
* @extends {Actor}
|
||||
*/
|
||||
export class frostgraveActor extends Actor {
|
||||
|
||||
/**
|
||||
* Augment the basic actor data with additional dynamic data.
|
||||
*/
|
||||
prepareData() {
|
||||
super.prepareData();
|
||||
|
||||
const actorData = this.data;
|
||||
const data = actorData.data;
|
||||
const flags = actorData.flags;
|
||||
|
||||
// Make separate methods for each Actor type (character, npc, etc.) to keep
|
||||
// things organized.
|
||||
if (actorData.type === 'character') this._prepareCharacterData(actorData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare Character type specific data
|
||||
*/
|
||||
_prepareCharacterData(actorData) {
|
||||
const data = actorData.data;
|
||||
|
||||
// Make modifications to data here. For example:
|
||||
|
||||
data.exptotal = data.expscenario + data.expbanked;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user