Char creation process finalized
This commit is contained in:
@@ -282,9 +282,9 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getStatus(statusKey) {
|
||||
if ( statusKey == "nrg") {
|
||||
if (statusKey == "nrg") {
|
||||
return duplicate(this.system.nrg)
|
||||
}
|
||||
}
|
||||
return duplicate(this.system.secondary[statusKey])
|
||||
}
|
||||
|
||||
@@ -479,6 +479,29 @@ export class PegasusActor extends Actor {
|
||||
let update = { _id: item.id, "data.activated": !item.system.activated }
|
||||
await this.updateEmbeddedDocuments('Item', [update]) // Updates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
setHandInformation( info) {
|
||||
this.update( {'system.biodata.preferredhand': info} )
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
increaseRoleAbility() {
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
addCDP( value) {
|
||||
let cdp = this.system.biodata.cdp
|
||||
cdp += value
|
||||
this.update( {'system.biodata.cdp': cdp})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
addPPP(value) {
|
||||
let ppp = duplicate(this.system.ppp)
|
||||
ppp.availablePPP += value
|
||||
this.update({ 'system.ppp': ppp })
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -1558,14 +1581,14 @@ export class PegasusActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async modStatus(key, inc = 1) {
|
||||
if ( key == "nrg") {
|
||||
if (key == "nrg") {
|
||||
let nrg = duplicate(this.system.nrg)
|
||||
nrg.mod += parseInt(inc)
|
||||
await this.update({ [`data.nrg`]: nrg })
|
||||
await this.update({ [`data.nrg`]: nrg })
|
||||
} else {
|
||||
let status = duplicate(this.system.secondary[key])
|
||||
status.bonus += parseInt(inc)
|
||||
await this.update({ [`data.secondary.${key}`]: status })
|
||||
await this.update({ [`data.secondary.${key}`]: status })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user