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