Syn for 0.8.0
This commit is contained in:
		| @@ -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<flipData.nbStun; i++) { | ||||
|       let stun = this.data.items.find( item => item.type == 'consequence' && item.name == 'Stun'); | ||||
|       let newSeverity = stun.data.severity; | ||||
|       for(let i=0; i<flipData.nbStun; i++) { | ||||
|         newSeverity = SoSUtility.increaseConsequenceSeverity( newSeverity ); | ||||
|       } | ||||
|       await this.updateOwnedItem( { _id: stun.id, 'data.severity': newSeverity}); | ||||
|       await this.updateEmbeddedDocuments( "Item", [ { _id: stun.id, 'data.severity': newSeverity} ] ); | ||||
|       flipData.isStun = newSeverity; | ||||
|     } | ||||
|     await this.update( { 'data.scores.currentwounds': currentWounds, 'data.wounds': wounds } ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user