@@ -67,28 +67,6 @@ export default class CombatHelpersWFRP {
6767 }
6868 }
6969
70- static async endCombat ( combat ) {
71- if ( ! game . user . isUniqueGM )
72- return
73-
74- let content = ""
75- let scriptResult = "" ;
76- for ( let script of CombatHelpersWFRP . scripts . endCombat ) {
77- scriptResult = await script ( combat ) ;
78- if ( scriptResult ) {
79- content += scriptResult + "<br><br>" ;
80- }
81- }
82- if ( content ) {
83- content = `<h2>${ game . i18n . localize ( "CHAT.EndCombat" ) } </h3>` + content ;
84- ChatMessage . create ( { content, whisper : ChatMessage . getWhisperRecipients ( "GM" ) } )
85- }
86- for ( let turn of combat . turns ) {
87- await Promise . all ( turn . actor . runScripts ( "endCombat" , { combat} , true ) ) ;
88- Hooks . callAll ( "wfrp4e:endCombat" , combat ) ;
89- }
90- }
91-
9270 static async checkFearTerror ( combat ) {
9371 if ( ! game . user . isUniqueGM )
9472 return
@@ -123,7 +101,7 @@ export default class CombatHelpersWFRP {
123101 msg += CombatHelpersWFRP . checkSizeFearTerror ( combat )
124102
125103 if ( msg )
126- await ChatMessage . create ( game . wfrp4e . utility . chatDataSetup ( msg , "gmroll" ) )
104+ await ChatMessage . create ( game . wfrp4e . utility . chatDataSetup ( msg , "gmroll" , false , { alias : "Fear & Terror" } ) )
127105 }
128106
129107 static checkSizeFearTerror ( combat ) {
@@ -220,7 +198,17 @@ export default class CombatHelpersWFRP {
220198 content += game . i18n . localize ( "CHAT.CorruptionTest" ) ;
221199 content += `<br>@Corruption[Minor]<br>@Corruption[Moderate]<br>@Corruption[Major]`
222200 }
223- return content
201+
202+ if ( content )
203+ {
204+ ChatMessage . implementation . create ( {
205+ content,
206+ speaker : {
207+ alias : "End Combat - Corruption"
208+ } ,
209+ whisper : ChatMessage . getWhisperRecipients ( "GM" )
210+ } )
211+ }
224212 }
225213
226214 static async checkInfection ( combat ) {
@@ -235,7 +223,16 @@ export default class CombatHelpersWFRP {
235223 content += `<br><b>${ actor } </b>`
236224 }
237225 }
238- return content
226+ if ( content )
227+ {
228+ ChatMessage . implementation . create ( {
229+ content,
230+ speaker : {
231+ alias : "End Combat - Infections"
232+ } ,
233+ whisper : ChatMessage . getWhisperRecipients ( "GM" )
234+ } )
235+ }
239236 }
240237
241238 static async checkDiseases ( combat ) {
@@ -263,7 +260,17 @@ export default class CombatHelpersWFRP {
263260
264261 content += game . i18n . localize ( "CHAT.DiseasesRules" ) ;
265262 }
266- return content
263+
264+ if ( content )
265+ {
266+ ChatMessage . implementation . create ( {
267+ content,
268+ speaker : {
269+ alias : "End Combat - Diseases"
270+ } ,
271+ whisper : ChatMessage . getWhisperRecipients ( "GM" )
272+ } )
273+ }
267274 }
268275
269276 static async checkEndRoundConditions ( combat ) {
0 commit comments