From 142c22d85f8831628d24213cefe8094f6a655de3 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 24 May 2021 09:11:57 +0200 Subject: [PATCH] Syn for 0.8.0 --- module/actor.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/actor.js b/module/actor.js index e648d41..0c9a287 100644 --- a/module/actor.js +++ b/module/actor.js @@ -415,18 +415,18 @@ export class SoSActor extends Actor { currentWounds.value = sumWound; if ( sumWound >= this.data.data.scores.wound.value) { let bleeding = this.data.items.find( item => item.type == 'consequence' && item.name == 'Bleeding'); - let newSeverity = SoSUtility.increaseConsequenceSeverity( bleeding.severity ); - await this.updateOwnedItem( { _id: bleeding.id, 'data.severity': newSeverity}); + let newSeverity = SoSUtility.increaseConsequenceSeverity( bleeding.data.severity ); + await this.updateEmbeddedDocuments( "Item", [ { _id: bleeding.id, 'data.severity': newSeverity} ] ); flipData.isBleeding = newSeverity; } // Stun consequence if ( flipData.nbStun > 0) { - let stun = this.data.items.find( item => item.type == 'consequence' && item.name == 'Sun'); - let newSeverity = stun.severity; - for(i=0; i item.type == 'consequence' && item.name == 'Stun'); + let newSeverity = stun.data.severity; + for(let i=0; i