@@ -24,7 +24,7 @@ internal class ExileControllerBeginPatch
24
24
public static bool Prefix ( ExileController __instance , [ HarmonyArgument ( 0 ) ] ref GameData . PlayerInfo exiled , [ HarmonyArgument ( 1 ) ] bool tie )
25
25
{
26
26
lastExiled = exiled ;
27
-
27
+ Message ( $ "开始放逐: { exiled ? . PlayerName ?? "null" } " ) ;
28
28
if ( Balancer . currentAbilityUser != null && Balancer . IsDoubleExile && ! IsSec )
29
29
{
30
30
IsSec = true ;
@@ -64,9 +64,25 @@ void createlate(int index)
64
64
Helpers . SetActiveAllObject ( controller . gameObject . GetChildren ( ) , "RaftAnimation" , false ) ;
65
65
controller . transform . localPosition = new ( - 3.75f , - 0.2f , - 60f ) ;
66
66
}
67
+ if ( Lawyer . lawyer != null && exiled ? . Object . PlayerId == Lawyer . target . PlayerId && Lawyer . target != Jester . jester )
68
+ {
69
+ var writer = StartRPC ( PlayerControl . LocalPlayer , CustomRPC . LawyerPromotesToPursuer ) ;
70
+ writer . Write ( true ) ;
71
+ writer . EndRPC ( ) ;
72
+ Lawyer . PromotesToPursuer ( true ) ;
73
+ }
74
+
67
75
if ( ! IsSec ) return true ;
68
76
}
69
77
78
+ if ( Lawyer . lawyer != null && exiled ? . Object . PlayerId == Lawyer . target . PlayerId && Lawyer . target != Jester . jester )
79
+ {
80
+ var writer = StartRPC ( PlayerControl . LocalPlayer , CustomRPC . LawyerPromotesToPursuer ) ;
81
+ writer . Write ( true ) ;
82
+ writer . EndRPC ( ) ;
83
+ Lawyer . PromotesToPursuer ( true ) ;
84
+ }
85
+
70
86
// Medic shield
71
87
if ( Medic . medic != null && AmongUsClient . Instance . AmHost && Medic . futureShielded != null && ! Medic . medic . Data . IsDead )
72
88
{
@@ -176,7 +192,7 @@ internal class ExileControllerWrapUpPatch
176
192
public static void Prefix ( GameObject obj )
177
193
{
178
194
// Nightvision:
179
- if ( obj ? . name != null && obj . name . Contains ( "FungleSecurity" ) )
195
+ if ( obj != null && obj . name != null && obj . name . Contains ( "FungleSecurity" ) )
180
196
{
181
197
SurveillanceMinigamePatch . resetNightVision ( ) ;
182
198
return ;
@@ -198,7 +214,7 @@ public static void Prefix(GameObject obj)
198
214
199
215
private static void WrapUpPostfix ( GameData . PlayerInfo exiled )
200
216
{
201
- Message ( "驱逐结束 " ) ;
217
+ Message ( "WrapUp " ) ;
202
218
if ( CachedPlayer . LocalPlayer . IsDead ) CanSeeRoleInfo = true ;
203
219
// Prosecutor win condition
204
220
if ( exiled != null && Executioner . executioner != null && Executioner . target != null &&
@@ -227,27 +243,31 @@ private static void WrapUpPostfix(GameData.PlayerInfo exiled)
227
243
AmongUsClient . Instance . FinishRpcImmediately ( writer ) ;
228
244
Executioner . PromotesRole ( ) ;
229
245
}
230
- else if ( Witness . Player == CachedPlayer . LocalPlayer . PlayerControl && Witness . target != null && Witness . killerTarget != null )
246
+ if ( Witness . target != null && Witness . killerTarget != null )
231
247
{
232
- bool skip = exiled == null ;
248
+ bool skip = exiled == null && Witness . skipMeeting ;
233
249
bool targetIsKillerAndNotExiled = Witness . target == Witness . killerTarget && ( exiled ? . Object == null || Witness . target != exiled ? . Object ) ;
234
- bool targetIsExiledAndNotKiller = ( Witness . target == exiled ? . Object || ( Witness . meetingDie && Witness . target . IsDead ( ) ) )
235
- && Witness . target != Witness . killerTarget ;
250
+ bool targetIsExiledAndNotKiller = Witness . target != Witness . killerTarget && ( Witness . target == exiled ? . Object ||
251
+ ( Witness . meetingDie && Witness . target . IsDead ( ) ) ) ;
236
252
237
- if ( targetIsKillerAndNotExiled || targetIsExiledAndNotKiller )
253
+ if ( ( ! skip && targetIsKillerAndNotExiled ) || targetIsExiledAndNotKiller )
238
254
{
239
255
Witness . exiledCount ++ ;
240
256
}
241
257
242
258
if ( Witness . exiledCount == Witness . exileToWin )
243
259
{
244
- var writer = StartRPC ( CachedPlayer . LocalPlayer . PlayerControl , CustomRPC . WitnessWin ) ;
245
- writer . EndRPC ( ) ;
246
260
Witness . triggerWitnessWin = true ;
247
261
}
248
262
}
249
263
Witness . target = Witness . killerTarget = null ;
250
264
265
+ if ( Vortox . Player . IsAlive ( ) )
266
+ {
267
+ Vortox . skipCount ++ ;
268
+ if ( Vortox . skipCount == Vortox . skipMeetingNum ) Vortox . triggerImpWin = true ;
269
+ }
270
+
251
271
// Reset custom button timers where necessary
252
272
CustomButton . MeetingEndedUpdate ( ) ;
253
273
@@ -292,7 +312,6 @@ private static void WrapUpPostfix(GameData.PlayerInfo exiled)
292
312
} ) ) ) ;
293
313
}
294
314
}
295
-
296
315
Seer . deadBodyPositions = new List < Vector3 > ( ) ;
297
316
}
298
317
@@ -436,18 +455,16 @@ private static void WrapUpPostfix(GameData.PlayerInfo exiled)
436
455
437
456
if ( InfoSleuth . infoSleuth != null && InfoSleuth . target != null && InfoSleuth . infoSleuth == PlayerControl . LocalPlayer )
438
457
{
439
- string msg ;
440
- var random = rnd . Next ( 2 ) ;
441
- var isNotCrew = isNeutral ( InfoSleuth . target ) || InfoSleuth . target . isImpostor ( ) ;
442
- var team = "的阵营是 " + teamString ( InfoSleuth . target ) ;
458
+ var isNotCrew = ( isNeutral ( InfoSleuth . target ) || InfoSleuth . target . isImpostor ( ) ) ^ Vortox . Reversal ;
459
+ var team = "的阵营是 " + getTeam ( InfoSleuth . target ) ;
443
460
var info = InfoSleuth . infoType switch
444
461
{
445
462
0 => isNotCrew ? "不是船员" : "是船员" ,
446
463
1 => team ,
447
- _ => random == 0 ? isNotCrew ? "不是船员" : "是船员" : team ,
464
+ _ => rnd . Next ( 2 ) == 0 ? isNotCrew ? "不是船员" : "是船员" : team ,
448
465
} ;
449
466
450
- msg = $ "{ InfoSleuth . target . Data . PlayerName } { info } ";
467
+ string msg = $ "{ InfoSleuth . target . Data . PlayerName } { info } ";
451
468
452
469
FastDestroyableSingleton < HudManager > . Instance . Chat . AddChat ( PlayerControl . LocalPlayer , $ "{ msg } ") ;
453
470
var writer = StartRPC ( PlayerControl . LocalPlayer , CustomRPC . ShareGhostInfo ) ;
@@ -459,6 +476,19 @@ private static void WrapUpPostfix(GameData.PlayerInfo exiled)
459
476
var writer1 = StartRPC ( PlayerControl . LocalPlayer , CustomRPC . InfoSleuthNoTarget ) ;
460
477
writer1 . EndRPC ( ) ;
461
478
RPCProcedure . infoSleuthNoTarget ( ) ;
479
+
480
+ static string getTeam ( PlayerControl player )
481
+ {
482
+ if ( Vortox . Player . IsAlive ( ) )
483
+ {
484
+ if ( player . isCrew ( ) ) return rnd . Next ( 2 ) == 0 ? "NeutralRolesText" . Translate ( ) : "ImpostorRolesText" . Translate ( ) ;
485
+ if ( isNeutral ( player ) || player . isImpostor ( ) ) return "CrewmateRolesText" . Translate ( ) ;
486
+ }
487
+
488
+ return isNeutral ( player ) ? "NeutralRolesText" . Translate ( )
489
+ : player . isImpostor ( ) ? "ImpostorRolesText" . Translate ( )
490
+ : "CrewmateRolesText" . Translate ( ) ;
491
+ }
462
492
}
463
493
464
494
// Invert add meeting
@@ -471,8 +501,7 @@ private static void WrapUpPostfix(GameData.PlayerInfo exiled)
471
501
( GameOptionsManager . Instance . currentNormalGameOptions . KillCooldown / 2 ) + 2 , new Action < float > ( p =>
472
502
{ if ( p == 1f ) foreach ( var trap in Trap . traps ) trap . triggerable = true ; } ) ) ) ;
473
503
474
- if ( ! Yoyo . markStaysOverMeeting )
475
- Silhouette . clearSilhouettes ( ) ;
504
+ if ( ! Yoyo . markStaysOverMeeting ) Silhouette . clearSilhouettes ( ) ;
476
505
477
506
if ( AmongUsClient . Instance . AmHost )
478
507
{
0 commit comments