AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.morphlingMorph(Morphling.sampledTarget.PlayerId);
Morphling.sampledTarget = null;
- morphlingButton.HasEffect = true; // Trigger effect on this click
+ morphlingButton.EffectDuration = 10f;
} else if (Morphling.currentTarget != null) {
Morphling.sampledTarget = Morphling.currentTarget;
morphlingButton.Sprite = Morphling.getMorphSprite();
- morphlingButton.HasEffect = false; // Block effect on this click
+ morphlingButton.EffectDuration = 1f;
}
},
() => { return Morphling.morphling != null && Morphling.morphling == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
true,
10f,
() => {
- morphlingButton.Timer = morphlingButton.MaxTimer;
- morphlingButton.Sprite = Morphling.getSampleSprite();
+ if (Morphling.sampledTarget == null) {
+ morphlingButton.Timer = morphlingButton.MaxTimer;
+ morphlingButton.Sprite = Morphling.getSampleSprite();
+ }
}
);
__instance
);
+ // Set the default (or settings from the previous game) timers/durations when spawning the buttons
+ setCustomButtonCooldowns();
}
}
}
\ No newline at end of file
{
static void Postfix(VersionShower __instance) {
string spacer = new String('\n', 21);
- string fullCredentials = "[FCCE03FF]TheOtherRoles[] v2.0.0 beta:\n- Modded by [FCCE03FF]Eisbison[] and [FFEB91FF]Thunderstorm584[]\n- Balanced with [FFEB91FF]Dhalucard[]\n- Button design by [FFEB91FF]Bavari[]";
+ string fullCredentials = "[FCCE03FF]TheOtherRoles[] v2.0.1 beta:\n- Modded by [FCCE03FF]Eisbison[] and [FFEB91FF]Thunderstorm584[]\n- Balanced with [FFEB91FF]Dhalucard[]\n- Button design by [FFEB91FF]Bavari[]";
if (__instance.text.Text.Contains(spacer))
__instance.text.Text += "\n" + fullCredentials;
else
enum CustomGameOverReason {
LoversWin = 10,
TeamJackalWin = 11,
- ChildLose = 12
+ ChildLose = 12,
+ JesterWin = 13
}
enum WinCondition {
LoversTeamWin,
LoversSoloWin,
JesterWin,
- BountyHunterWin,
- JesterAndBountyHunterWin,
JackalWin,
ChildLose
}
}
bool childLose = Child.child != null && gameOverReason == (GameOverReason)CustomGameOverReason.ChildLose;
- bool jesterWin = Jester.jester != null && Jester.jester.IDOFAMCIJKE.CIDDOFDJHJH;
- bool bountyHunterWin = BountyHunter.bountyHunter != null && BountyHunter.bountyHunter.IDOFAMCIJKE.CIDDOFDJHJH;
+ bool jesterWin = Jester.jester != null && gameOverReason == (GameOverReason)CustomGameOverReason.JesterWin;
- // Child lose condition (should be implemented using a proper GameOverReason in the future)
+ // Child lose
if (childLose) {
TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
WinningPlayerData wpd = new WinningPlayerData(Child.child.IDOFAMCIJKE);
AdditionalTempData.winCondition = WinCondition.ChildLose;
}
- // Jester and Bounty Hunter win condition (should be implemented using a proper GameOverReason in the future)
- else if (jesterWin || bountyHunterWin) {
+ // Jester win
+ else if (jesterWin) {
TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
- if (jesterWin) {
- WinningPlayerData wpd = new WinningPlayerData(Jester.jester.IDOFAMCIJKE);
- wpd.CIDDOFDJHJH = false;
- TempData.BDGOKPKHCNB.Add(wpd);
- AdditionalTempData.winCondition = WinCondition.JesterWin;
- }
- if (bountyHunterWin) {
- WinningPlayerData wpd = new WinningPlayerData(BountyHunter.bountyHunter.IDOFAMCIJKE);
- wpd.CIDDOFDJHJH = false;
- TempData.BDGOKPKHCNB.Add(wpd);
- if (AdditionalTempData.winCondition == WinCondition.JesterWin)
- AdditionalTempData.winCondition = WinCondition.JesterAndBountyHunterWin;
- else
- AdditionalTempData.winCondition = WinCondition.BountyHunterWin;
- }
+ WinningPlayerData wpd = new WinningPlayerData(Jester.jester.IDOFAMCIJKE);
+ TempData.BDGOKPKHCNB.Add(wpd);
+ AdditionalTempData.winCondition = WinCondition.JesterWin;
}
- // Lovers win conditions (should be implemented using a proper GameOverReason in the future)
+ // Lovers win conditions
else if (Lovers.existingAndAlive() && gameOverReason == (GameOverReason)CustomGameOverReason.LoversWin) {
AdditionalTempData.localIsLover = (PlayerControl.LocalPlayer == Lovers.lover1 || PlayerControl.LocalPlayer == Lovers.lover2);
// Double win for lovers, crewmates also win
textRenderer.Text = "Jester Wins";
textRenderer.Color = Jester.color;
}
- else if (AdditionalTempData.winCondition == WinCondition.BountyHunterWin) {
- textRenderer.Text = "Bounty Hunter Wins";
- textRenderer.Color = BountyHunter.color;
- }
- else if (AdditionalTempData.winCondition == WinCondition.JesterAndBountyHunterWin) {
- textRenderer.Text = "[AD653BFF]Bounty Hunter[FFFFFFFF] and [FF54A7FF]Jester[FFFFFFFF] Win";
- textRenderer.Color = Color.white;
- }
else if (AdditionalTempData.winCondition == WinCondition.LoversTeamWin) {
if (AdditionalTempData.localIsLover) {
__instance.WinText.Text = "Double Victory";
if (!GameData.Instance) return false;
var statistics = new PlayerStatistics(__instance);
if (CheckAndEndGameForChildLose(__instance)) return false;
- if(CheckAndEndGameForSabotageWin(__instance)) return false;
- if(CheckAndEndGameForTaskWin(__instance)) return false;
- if(CheckAndEndGameForLoverWin(__instance, statistics)) return false;
- if(CheckAndEndGameForJackalWin(__instance, statistics)) return false;
- if(CheckAndEndGameForImpostorWin(__instance, statistics)) return false;
- if(CheckAndEndGameForCrewmateWin(__instance, statistics)) return false;
+ if (CheckAndEndGameForJesterWin(__instance)) return false;
+ if (CheckAndEndGameForSabotageWin(__instance)) return false;
+ if (CheckAndEndGameForTaskWin(__instance)) return false;
+ if (CheckAndEndGameForLoverWin(__instance, statistics)) return false;
+ if (CheckAndEndGameForJackalWin(__instance, statistics)) return false;
+ if (CheckAndEndGameForImpostorWin(__instance, statistics)) return false;
+ if (CheckAndEndGameForCrewmateWin(__instance, statistics)) return false;
return false;
}
return false;
}
+ private static bool CheckAndEndGameForJesterWin(ShipStatus __instance) {
+ if (Jester.triggerJesterWin) {
+ if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ {
+ __instance.enabled = false;
+ ShipStatus.PBKIGLMJEDH((GameOverReason)CustomGameOverReason.JesterWin, false);
+ }
+ DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ ReviveEveryone();
+ return true;
+ }
+ return false;
+ }
private static bool CheckAndEndGameForSabotageWin(ShipStatus __instance) {
if (__instance.Systems == null) return false;
__instance.__4__this.ImpostorText.gameObject.SetActive(true);
__instance.__4__this.BackgroundBar.material.color = Lovers.color;
}
- else if (PlayerControl.LocalPlayer == BountyHunter.bountyHunter)
- {
- __instance.__4__this.Title.Text = "Bounty Hunter";
- __instance.__4__this.Title.Color = BountyHunter.color;
- __instance.__4__this.ImpostorText.Text = "Hunt [ED653BFF]" + BountyHunter.target?.IDOFAMCIJKE?.HGGCLJHCDBM + "[FFFFFFFF] down";
- __instance.__4__this.BackgroundBar.material.color = BountyHunter.color;
- }
else if (roleInfo.name == "Crewmate" || roleInfo.name == "Impostor") {}
else {
__instance.__4__this.Title.Text = roleInfo.name;
namespace TheOtherRoles
{
- [BepInPlugin(Id, "The Other Roles", "2.0.0")]
+ [BepInPlugin(Id, "The Other Roles", "2.0.1")]
[BepInProcess("Among Us.exe")]
public class TheOtherRolesPlugin : BasePlugin
{
Child.child.SetKillTimer(PlayerControl.GameOptions.ELBDIKIOHHH * multiplier);
}
- if (ExileController.Instance.KLHCDCKJHKC != null) {
- byte exiledId = ExileController.Instance.KLHCDCKJHKC.GMBAIPNOKLP;
-
- // Child lose condition
- if (Child.child != null && Child.child.PlayerId == exiledId && !Child.isGrownUp() && !Child.child.IDOFAMCIJKE.CIDDOFDJHJH) {
- MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ChildLose, Hazel.SendOption.Reliable, -1);
- AmongUsClient.Instance.FinishRpcImmediately(writer);
- RPCProcedure.childLose();
- }
- // Jester and Bounty Hunter win condition
- else if ((Jester.jester != null && Jester.jester.PlayerId == exiledId) || (BountyHunter.bountyHunter != null && !BountyHunter.bountyHunter.IDOFAMCIJKE.FGNJJFABIHJ && BountyHunter.target != null && BountyHunter.target.PlayerId == exiledId)) {
- MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.JesterBountyHunterWin, Hazel.SendOption.Reliable, -1);
- writer.Write(exiledId);
- AmongUsClient.Instance.FinishRpcImmediately(writer);
- RPCProcedure.jesterBountyHunterWin(exiledId);
- }
- }
-
// Seer spawn souls
if (Seer.deadBodyPositions != null && Seer.seer != null && PlayerControl.LocalPlayer == Seer.seer && (Seer.mode == 0 || Seer.mode == 2)) {
foreach (Vector3 pos in Seer.deadBodyPositions) {
__result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Hacker.";
else if(Child.child != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Child.child.PlayerId)
__result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Child.";
- else if(BountyHunter.bountyHunter != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == BountyHunter.bountyHunter.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Bounty Hunter.";
else if(Tracker.tracker != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Tracker.tracker.PlayerId)
__result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Tracker.";
else if(Snitch.snitch != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Snitch.snitch.PlayerId)
}
}
+ public static void playerSizeUpdate(PlayerControl p) {
+ if (Child.child == null) return;
+
+ float growingProgress = Child.growingProgress();
+ float scale = growingProgress * 0.35f + 0.35f;
+
+ if (p == Child.child)
+ Child.child.transform.localScale = new Vector3(scale, scale, 1f);
+ if (Morphling.morphling != null && p == Morphling.morphling && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f)
+ p.transform.localScale = new Vector3(scale, scale, 1f);
+ }
+
+ public static void Prefix(PlayerControl __instance) {
+ if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.CJDCOJJNIGL.Started) return;
+
+ // Reset player sizes
+ __instance.transform.localScale = new Vector3(0.7f, 0.7f, 1f);
+ }
+
public static void Postfix(PlayerControl __instance) {
if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.CJDCOJJNIGL.Started) return;
// Update Role Description
Helpers.refreshRoleDescription(__instance);
+ // Child and Morphling shrink
+ playerSizeUpdate(__instance);
if (PlayerControl.LocalPlayer == __instance) {
// Time Master
if (timeSinceDeath < Detective.reportNameDuration * 1000) {
msg = $"Body Report: The killer appears to be {deadPlayer.killerIfExisting.name}!";
} else if (timeSinceDeath < Detective.reportColorDuration * 1000) {
- var typeOfColor = Helpers.isLighterColor(deadPlayer.killerIfExisting.IDOFAMCIJKE.JFHFMIKFHGG) ? "darker" : "lighter";
+ var typeOfColor = Helpers.isLighterColor(deadPlayer.killerIfExisting.IDOFAMCIJKE.JFHFMIKFHGG) ? "lighter" : "darker";
msg = $"Body Report: The killer appears to be a {typeOfColor} color!";
} else {
msg = $"Body Report: The corpse is too old to gain information from!";
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.Exiled))]
public static class ExilePlayerPatch
{
+ public static void Prefix(PlayerControl __instance) {
+ // Child exile lose condition
+ if (Child.child != null && Child.child == __instance && !Child.isGrownUp() && !Child.child.IDOFAMCIJKE.CIDDOFDJHJH) {
+ Child.triggerChildLose = true;
+ }
+ // Jester win condition
+ else if (Jester.jester != null && Jester.jester == __instance) {
+ Jester.triggerJesterWin = true;
+ }
+ }
+
public static void Postfix(PlayerControl __instance)
{
// Collect dead player info
Camouflager,
Hacker,
Child,
- BountyHunter,
Tracker,
Vampire,
Snitch,
// Role functionality
- JesterBountyHunterWin = 80,
- EngineerFixLights,
+ EngineerFixLights = 81,
EngineerUsedRepair,
JanitorClean,
SheriffKill,
CamouflagerCamouflage,
TrackerUsedTracker,
LoverSuicide,
- SetBountyHunterTarget,
VampireSetBitten,
VampireTryKill,
PlaceGarlic,
SidekickKill,
JackalCreatesSidekick,
SidekickPromotes,
- ChildLose,
ErasePlayerRole,
SetFutureErased,
SetFutureShifted
case RoleId.Child:
Child.child = player;
break;
- case RoleId.BountyHunter:
- BountyHunter.bountyHunter = player;
- break;
case RoleId.Tracker:
Tracker.tracker = player;
break;
// Role functionality
- public static void jesterBountyHunterWin(byte exiledId) {
- PlayerControl exiled = Helpers.playerById(exiledId);
- if (exiled == null) return;
-
- bool jesterWin = false;
- bool bountyHunterWin = false;
-
- if (Jester.jester != null && exiled == Jester.jester) {
- Jester.jester.Revive();
- Jester.jester.IDOFAMCIJKE.FGNJJFABIHJ = false;
- Jester.jester.IDOFAMCIJKE.CIDDOFDJHJH = true;
- jesterWin = true;
- }
- if (BountyHunter.bountyHunter != null && !BountyHunter.bountyHunter.IDOFAMCIJKE.FGNJJFABIHJ && BountyHunter.target == exiled) {
- BountyHunter.bountyHunter.IDOFAMCIJKE.CIDDOFDJHJH = true;
- bountyHunterWin = true;
- }
-
- foreach (PlayerControl player in PlayerControl.AllPlayerControls)
- {
- if (player != null && player != Jester.jester && player != BountyHunter.bountyHunter)
- {
- player.RemoveInfected();
- player.Die(DeathReason.Exile);
- player.IDOFAMCIJKE.FGNJJFABIHJ = true;
- player.IDOFAMCIJKE.CIDDOFDJHJH = false;
- }
- }
- if (jesterWin && !bountyHunterWin && BountyHunter.bountyHunter != null) {
- BountyHunter.bountyHunter.RemoveInfected();
- BountyHunter.bountyHunter.Die(DeathReason.Exile);
- BountyHunter.bountyHunter.IDOFAMCIJKE.FGNJJFABIHJ = true;
- BountyHunter.bountyHunter.IDOFAMCIJKE.CIDDOFDJHJH = false;
- } else if (bountyHunterWin && !jesterWin && Jester.jester != null) {
- Jester.jester.RemoveInfected();
- Jester.jester.Die(DeathReason.Exile);
- Jester.jester.IDOFAMCIJKE.FGNJJFABIHJ = true;
- Jester.jester.IDOFAMCIJKE.CIDDOFDJHJH = false;
- }
- }
-
public static void engineerFixLights() {
SwitchSystem switchSystem = ShipStatus.Instance.Systems[SystemTypes.Electrical].Cast<SwitchSystem>();
switchSystem.GNPBPJHLPAO = switchSystem.KNFBDAFFMGF;
Hacker.hacker = oldShifter;
} else if (Child.child != null && Child.child == player) {
Child.child = oldShifter;
- } else if (BountyHunter.bountyHunter != null && BountyHunter.bountyHunter == player) {
- BountyHunter.bountyHunter = oldShifter;
} else if (Tracker.tracker != null && Tracker.tracker == player) {
Tracker.tracker = oldShifter;
} else if (Snitch.snitch != null && Snitch.snitch == player) {
}
}
- public static void setBountyHunterTarget(byte targetId) {
- foreach (PlayerControl player in PlayerControl.AllPlayerControls)
- if (player.PlayerId == targetId)
- BountyHunter.target = player;
- }
-
public static void vampireSetBitten(byte targetId, byte reset) {
if (reset != 0) {
Vampire.bitten = null;
Sidekick.clearAndReload();
return;
}
-
- public static void childLose() {
- Child.triggerChildLose = true;
- }
public static void erasePlayerRole(byte playerId) {
PlayerControl player = Helpers.playerById(playerId);
if (player == Hacker.hacker) Hacker.clearAndReload();
if (player == Child.child) Child.clearAndReload();
if (player == Tracker.tracker) Tracker.clearAndReload();
- if (player == BountyHunter.bountyHunter) BountyHunter.clearAndReload();
if (player == Snitch.snitch) Snitch.clearAndReload();
if (player == Swapper.swapper) Swapper.clearAndReload();
// Role functionality
- case (byte)CustomRPC.JesterBountyHunterWin:
- RPCProcedure.jesterBountyHunterWin(DOOILGKLBBF.ReadByte());
- break;
case (byte)CustomRPC.EngineerFixLights:
RPCProcedure.engineerFixLights();
break;
case (byte)CustomRPC.LoverSuicide:
RPCProcedure.loverSuicide(DOOILGKLBBF.ReadByte());
break;
- case (byte)CustomRPC.SetBountyHunterTarget:
- RPCProcedure.setBountyHunterTarget(DOOILGKLBBF.ReadByte());
- break;
case (byte)CustomRPC.VampireSetBitten:
byte bittenId = DOOILGKLBBF.ReadByte();
byte reset = DOOILGKLBBF.ReadByte();
case (byte)CustomRPC.SidekickPromotes:
RPCProcedure.sidekickPromotes();
break;
- case (byte)CustomRPC.ChildLose:
- RPCProcedure.childLose();
- break;
case (byte)CustomRPC.ErasePlayerRole:
RPCProcedure.erasePlayerRole(DOOILGKLBBF.ReadByte());
break;
crewSettings.Add((byte)RoleId.Tracker, CustomOptionHolder.trackerSpawnRate.getSelection());
crewSettings.Add((byte)RoleId.Snitch, CustomOptionHolder.snitchSpawnRate.getSelection());
crewSettings.Add((byte)RoleId.Jackal, CustomOptionHolder.jackalSpawnRate.getSelection());
- // crewSettings.Add((byte)RoleId.BountyHunter, CustomOptionHolder.bountyHunterSpawnRate.getSelection()); BOUNTY HUNTER
// Set special roles
if (impostors.Count >= 3 && maxImpostorRoles >= 3 && (rnd.Next(1, 101) <= CustomOptionHolder.mafiaSpawnRate.getSelection() * 10)) {
setRoleToRandomPlayer(roleId, impostors);
}
}
-
- // if (crewmates.Count > 0 && (rnd.Next(1, 101) <= CustomOptionHolder.bountyHunterSpawnRate.getSelection())) {
- // List<PlayerControl> availableTargets = PlayerControl.AllPlayerControls.ToArray().ToList();
- // var bountyHunterIndex = rnd.Next(0, crewmates.Count);
- // byte bountyHunterId = crewmates[bountyHunterIndex].PlayerId;
-
- // availableTargets.RemoveAll(x => x.IDOFAMCIJKE.CIDDOFDJHJH || x.PlayerId == bountyHunterId);
-
- // if (availableTargets.Count > 0) {
- // byte targetId = availableTargets[rnd.Next(0, availableTargets.Count)].PlayerId;
- // crewmates.RemoveAt(bountyHunterIndex);
- // setRoleToPlayer((byte)RoleId.BountyHunter, bountyHunterId);
- // writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetBountyHunterTarget, Hazel.SendOption.Reliable, -1);
- // writer.Write(targetId);
- // AmongUsClient.Instance.FinishRpcImmediately(writer);
- // RPCProcedure.setBountyHunterTarget(targetId);
- // }
- // }
}
}
}
"No one will harm you until you grow up",
"No one will harm you"));
}
- if (BountyHunter.bountyHunter != null && p == BountyHunter.bountyHunter) {
- infos.Add(new RoleInfo("Bounty Hunter",
- BountyHunter.color,
- "Hunt your bounty down",
- "Hunt your bounty"));
- ;
- }
if (Tracker.tracker != null && p == Tracker.tracker) {
infos.Add(new RoleInfo("Tracker",
Tracker.color,
Camouflager.clearAndReload();
Hacker.clearAndReload();
Child.clearAndReload();
- BountyHunter.clearAndReload();
Tracker.clearAndReload();
Vampire.clearAndReload();
Snitch.clearAndReload();
public static PlayerControl jester;
public static Color color = new Color(255f / 255f, 84f / 255f, 167f / 255f, 1);
+ public static bool triggerJesterWin = false;
+
public static void clearAndReload() {
jester = null;
+ triggerJesterWin = false;
}
}
public static PlayerControl janitor;
public static Color color = Palette.LDCHDOFJPGH;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
private static Sprite buttonSprite;
public static Sprite getButtonSprite() {
public static PlayerControl sheriff;
public static Color color = new Color(255f / 255f, 204f / 255f, 0f / 255f, 1);
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static bool jesterCanDieToSheriff = false;
public static PlayerControl currentTarget;
public static float lighterModeLightsOnVision = 2f;
public static float lighterModeLightsOffVision = 0.75f;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static float duration = 5f;
public static float lighterTimer = 0f;
public static bool anonymousFootprints = false;
public static float reportNameDuration = 0f;
public static float reportColorDuration = 20f;
-
- public static float timer = 1f;
+ public static float timer = 6.2f;
public static void clearAndReload() {
detective = null;
footprintDuration = CustomOptionHolder.detectiveFootprintDuration.getFloat();
reportNameDuration = CustomOptionHolder.detectiveReportNameDuration.getFloat();
reportColorDuration = CustomOptionHolder.detectiveReportColorDuration.getFloat();
- timer = footprintIntervall;
+ timer = 6.2f;
}
}
}
public static bool reviveDuringRewind = false;
public static float rewindTime = 3f;
public static float shieldDuration = 3f; // Constant
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static bool shieldActive = false;
public static bool isRewinding = false;
private static Sprite sampleSprite;
private static Sprite morphSprite;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static PlayerControl currentTarget;
public static PlayerControl sampledTarget;
public static PlayerControl camouflager;
public static Color color = Palette.LDCHDOFJPGH;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static float camouflageTimer = 0f;
private static Sprite buttonSprite;
private static Sprite adminTableIcon;
public static Color color = new Color(252f / 255f, 90f / 255f, 30f / 255f, 1);
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static float duration = 10f;
public static bool onlyColorType = false;
public static PlayerControl child;
public static Color color = Color.white;
- public static float growingUpDuration = float.MaxValue;
+ public static float growingUpDuration = 400f;
public static DateTime timeOfGrowthStart = DateTime.UtcNow;
public static bool triggerChildLose = false;
}
}
- public static class BountyHunter {
- public static PlayerControl bountyHunter;
- public static Color color = new Color(237f / 255f, 101f / 255f, 59f / 255f, 1);
-
- public static bool notifyBounty = true;
- public static PlayerControl target;
-
- public static void clearAndReload() {
- bountyHunter = null;
- target = null;
- // notifyBounty = CustomOptionHolder.bountyHunterNotifyBounty.getBool();
- }
- }
-
public static class Tracker {
public static PlayerControl tracker;
public static Color color = new Color(117f / 255f, 209f / 255f, 255f / 255f, 1);
public static Color color = Palette.LDCHDOFJPGH;
public static float delay = 10f;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static bool canKillNearGarlics = true;
public static bool localPlacedGarlic = false;
public static bool garlicsActive = true;
public static PlayerControl currentTarget;
public static List<PlayerControl> formerJackals = new List<PlayerControl>();
- public static float cooldown = float.MaxValue;
- public static float createSidekickCooldown = float.MaxValue;
+ public static float cooldown = 30f;
+ public static float createSidekickCooldown = 30f;
public static bool canUseVents = true;
public static bool canCreateSidekick = true;
public static Sprite buttonSprite;
public static PlayerControl currentTarget;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
public static bool canUseVents = true;
public static bool canKill = true;
public static bool promotesToJackal = true;
public static List<PlayerControl> futureErased = new List<PlayerControl>();
public static PlayerControl currentTarget;
- public static float cooldown = float.MaxValue;
+ public static float cooldown = 30f;
private static Sprite buttonSprite;
public static Sprite getButtonSprite() {
setPlayerNameColor(Seer.seer, Seer.color);
else if (Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer)
setPlayerNameColor(Hacker.hacker, Hacker.color);
- else if (BountyHunter.bountyHunter != null && BountyHunter.target != null && BountyHunter.bountyHunter == PlayerControl.LocalPlayer) {
- setPlayerNameColor(BountyHunter.bountyHunter, BountyHunter.color);
- setPlayerNameColor(BountyHunter.target, BountyHunter.color);
- }
else if (Tracker.tracker != null && Tracker.tracker == PlayerControl.LocalPlayer)
setPlayerNameColor(Tracker.tracker, Tracker.color);
else if (Snitch.snitch != null && Snitch.snitch == PlayerControl.LocalPlayer)
p.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
p.HatRenderer.SetHat(0, 0);
Helpers.setSkinWithAnim(p.MyPhysics, 0);
- if (p.CurrentPet) UnityEngine.Object.Destroy(p.CurrentPet.gameObject);
+ bool spawnPet = false;
+ if (p.CurrentPet == null) spawnPet = true;
+ else if (p.CurrentPet.EKONGILOOPE != DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllPets[0].EKONGILOOPE) {
+ UnityEngine.Object.Destroy(p.CurrentPet.gameObject);
+ spawnPet = true;
+ }
+
+ if (spawnPet) {
+ p.CurrentPet = UnityEngine.Object.Instantiate<PetBehaviour>(DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllPets[0]);
+ p.CurrentPet.transform.position = p.transform.position;
+ p.CurrentPet.Source = p;
+ }
}
}
}
public static void childUpdate() {
- foreach (PlayerControl p in PlayerControl.AllPlayerControls) {
- if (p == null) continue;
- p.transform.localScale = new Vector3(0.7f, 0.7f, 1f);
- if (Child.child == null) continue;
+ if (Child.child == null) return;
- float growingProgress = Child.growingProgress();
- float scale = growingProgress * 0.35f + 0.35f;
- string suffix = "";
- if (growingProgress != 1f)
- suffix = " [FAD934FF](" + Mathf.FloorToInt(growingProgress * 18) + ")";
-
- if (Child.child == p) {
- p.transform.localScale = new Vector3(scale, scale, 1f);
- p.nameText.Text += suffix;
- if (MeetingHud.Instance != null)
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN)
- if (player.NameText != null && p.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Text += suffix;
- }
- else if (Morphling.morphling != null && Morphling.morphling == p && Morphling.morphTarget != null && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f) {
- p.transform.localScale = new Vector3(scale, scale, 1f);
- p.nameText.Text += suffix;
- }
- else
- p.transform.localScale = new Vector3(0.7f, 0.7f, 1f);
- }
- }
-
- public static void bountyHunterUpdate() {
- if (BountyHunter.bountyHunter == null || BountyHunter.target == null) return;
+ float growingProgress = Child.growingProgress();
+ float scale = growingProgress * 0.35f + 0.35f;
+ string suffix = "";
+ if (growingProgress != 1f)
+ suffix = " [FAD934FF](" + Mathf.FloorToInt(growingProgress * 18) + ")";
- if (BountyHunter.notifyBounty && PlayerControl.LocalPlayer == BountyHunter.target) {
- string suffix = "[AD653BFF] (Bounty)[FFFFFFFF]";
- PlayerControl.LocalPlayer.nameText.Text += suffix;
- if (MeetingHud.Instance != null)
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN)
- if (player.NameText != null && PlayerControl.LocalPlayer.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Text += suffix;
+ Child.child.nameText.Text += suffix;
+ if (MeetingHud.Instance != null) {
+ foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN)
+ if (player.NameText != null && Child.child.PlayerId == player.HMPHKKGPLAG)
+ player.NameText.Text += suffix;
}
+
+ if (Morphling.morphling != null && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f)
+ Morphling.morphling.nameText.Text += suffix;
}
static void vampireDeactivateKillButton(HudManager __instance) {
camouflageAndMorphActions();
// Child
childUpdate();
- // Bounty Hunter
- bountyHunterUpdate();
// Vampire
vampireDeactivateKillButton(__instance);
// Snitch