✨
This commit is contained in:
34
modules/objects/pokemonActor.js
Normal file
34
modules/objects/pokemonActor.js
Normal file
@@ -0,0 +1,34 @@
|
||||
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})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user