mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix Renegade
This commit is contained in:
1 parent
484e94b51b
commit
789543b15f
3 files changed
+9
-16
No files matched your search
@@ -369,7 +369,7 @@ namespace EHR
|
||||
if (pc.IsAlive() && !pc.inMovingPlat && room != null && room.RoomId == RoomGoal && DonePlayers.Add(pc.PlayerId))
|
||||
{
|
||||
Logger.Info($"{pc.GetRealName()} entered the correct room", "RoomRush");
|
||||
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
|
||||
pc.Notify($"{DonePlayers.Count}.", 2f);
|
||||
|
||||
int timeLeft = TimeWhenFirstPlayerEntersRoom.GetInt();
|
||||
|
||||
|
||||
@@ -33,10 +33,5 @@ namespace EHR.Impostor
|
||||
{
|
||||
return pc.IsAlive();
|
||||
}
|
||||
|
||||
public override bool OnCheckMurderAsTarget(PlayerControl killer, PlayerControl target)
|
||||
{
|
||||
return !killer.Is(CustomRoleTypes.Impostor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,9 +157,9 @@ namespace EHR.Impostor
|
||||
|
||||
public override void OnFixedUpdate(PlayerControl player)
|
||||
{
|
||||
if (!GameStates.IsInTask || !IsEnable || player == null) return;
|
||||
if (!GameStates.IsInTask || !IsEnable || Main.HasJustStarted || ExileController.Instance || player == null) return;
|
||||
|
||||
if (Count++ < 10) return;
|
||||
if (Count++ < 30) return;
|
||||
|
||||
Count = 0;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace EHR.Impostor
|
||||
if (!player.IsModClient())
|
||||
{
|
||||
long cooldown = lastTime + (long)Cooldown - now;
|
||||
if ((int)cooldown != CD) player.Notify(string.Format(GetString("CDPT"), cooldown + 1), 1.1f, true);
|
||||
if ((int)cooldown != CD) player.Notify(string.Format(GetString("CDPT"), cooldown + 1), 1.1f, overrideAll: true);
|
||||
|
||||
CD = (int)cooldown;
|
||||
}
|
||||
@@ -259,20 +259,18 @@ namespace EHR.Impostor
|
||||
|
||||
public override string GetSuffix(PlayerControl seer, PlayerControl target, bool hud = false, bool meeting = false)
|
||||
{
|
||||
if (!hud || seer == null || !GameStates.IsInTask || !PlayerControl.LocalPlayer.IsAlive()) return string.Empty;
|
||||
|
||||
if (Main.PlayerStates[seer.PlayerId].Role is not Swooper sw) return string.Empty;
|
||||
if (!hud || seer == null || seer.PlayerId != SwooperId || !GameStates.IsInTask || ExileController.Instance || !seer.IsAlive()) return string.Empty;
|
||||
|
||||
var str = new StringBuilder();
|
||||
|
||||
if (sw.IsInvis)
|
||||
if (IsInvis)
|
||||
{
|
||||
long remainTime = sw.InvisTime + (long)sw.Duration - Utils.TimeStamp;
|
||||
long remainTime = InvisTime + (long)Duration - Utils.TimeStamp;
|
||||
str.Append(string.Format(GetString("SwooperInvisStateCountdown"), remainTime + 1));
|
||||
}
|
||||
else if (sw.lastTime != -10)
|
||||
else if (lastTime != -10)
|
||||
{
|
||||
long cooldown = sw.lastTime + (long)sw.Cooldown - Utils.TimeStamp;
|
||||
long cooldown = lastTime + (long)Cooldown - Utils.TimeStamp;
|
||||
str.Append(string.Format(GetString("SwooperInvisCooldownRemain"), cooldown + 1));
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user