34 lines
735 B
JavaScript
34 lines
735 B
JavaScript
export default class pokemonActor extends Actor {
|
|
preparedata() {
|
|
|
|
// In case some steps need to be overwritten later
|
|
|
|
super.preparedata();
|
|
}
|
|
|
|
prepareDerivedData() {
|
|
const actorData = this.system;
|
|
|
|
this._preparePlayerCharacterData(actorData);
|
|
}
|
|
|
|
_preparePlayerCharacterData(actorData) {
|
|
this._setCharacterValues(actorData);
|
|
}
|
|
|
|
async _setCharacterValues(data) {
|
|
// Calculations of values here
|
|
}
|
|
|
|
setNote(note) {
|
|
this.update({"system.note ": note});
|
|
}
|
|
|
|
addLogEntry(entry) {
|
|
// Add a log entry to the character event log
|
|
|
|
let log = this.system.log;
|
|
log.push(entry);
|
|
this.update({"system.log": log})
|
|
}
|
|
} |