Minor fixes
This commit is contained in:
@ -630,7 +630,7 @@ export class PegasusActor extends Actor {
|
||||
updates['data.combat.stunthreshold'] = nrgValue
|
||||
}
|
||||
|
||||
let momentum = PegasusUtility.getDiceValue(this.data.data.statistics.foc.value) + this.data.data.statistics.foc.mod
|
||||
let momentum = this.data.data.statistics.foc.value + this.data.data.statistics.foc.mod
|
||||
if (momentum != this.data.data.momentum.max) {
|
||||
updates['data.momentum.value'] = 0
|
||||
updates['data.momentum.max'] = momentum
|
||||
@ -685,6 +685,15 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async incDecQuantity( objetId, incDec = 0 ) {
|
||||
let objetQ = this.data.items.get(objetId )
|
||||
if (objetQ) {
|
||||
let newQ = objetQ.data.data.quantity + incDec;
|
||||
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantity': newQ }]); // pdates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
applyAbility(ability, updates = []) {
|
||||
if (ability.data.affectedstat != "notapplicable") {
|
||||
|
Reference in New Issue
Block a user