Skip to content

Commit

Permalink
Vampireの仕様修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tukasa0001 committed Jan 4, 2022
1 parent b2cc16a commit b1257de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions Patches/CheckGameEndPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ public static bool Prefix(ShipStatus __instance) {
if (CheckAndEndGameForHideAndSeek(__instance, statistics)) return false;
} else {
if (CheckAndEndGameForSabotageWin(__instance)) return false;
if (CheckAndEndGameForImpostorWin(__instance, statistics)) return false;
if (CheckAndEndGameForCrewmateWin(__instance, statistics)) return false;
if(main.IsHideAndSeek) {
if (CheckAndEndGameForHideAndSeek(__instance, statistics)) return false;
} else {
if (CheckAndEndGameForImpostorWin(__instance, statistics)) return false;
}
}
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions Patches/HudPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public static void Postfix(HudManager __instance) {
}
//Vampire
if(main.isVampire(PlayerControl.LocalPlayer)) {
TaskTextPrefix = "<color=#00ff00>" + main.getLang(lang.Vampire) + "</color>\r\n" +
"<color=#00ff00>" + main.getLang(lang.VampireInfo) + "</color>\r\n";
TaskTextPrefix = "<color=#a557a5>" + main.getLang(lang.Vampire) + "</color>\r\n" +
"<color=#a557a5>" + main.getLang(lang.VampireInfo) + "</color>\r\n";
}
if(!__instance.TaskText.text.Contains(TaskTextPrefix)) {
__instance.TaskText.text = TaskTextPrefix + "\r\n" + __instance.TaskText.text;
Expand Down
1 change: 1 addition & 0 deletions Patches/OutroPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public static void Postfix(EndGameManager __instance) {
if(main.isFixedCooldown && AmongUsClient.Instance.AmHost) {
PlayerControl.GameOptions.KillCooldown = main.BeforeFixCooldown;
PlayerControl.LocalPlayer.RpcSyncSettings(PlayerControl.GameOptions);
main.BitPlayers = new Dictionary<byte, (byte, float)>();
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions Patches/PlayerContorolPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public static bool Prefix(PlayerControl __instance) {
foreach(var pc in PlayerControl.AllPlayerControls) {
if(bp.Key == pc.PlayerId && !pc.Data.IsDead) {
pc.RpcMurderPlayer(pc);
main.PlaySoundRPC(bp.Value.Item1, Sounds.KillSound);
}
}
main.PlaySoundRPC(bp.Value.Item1, Sounds.KillSound);
}
}
main.BitPlayers = new Dictionary<byte, (byte, float)>();
Expand All @@ -85,8 +85,7 @@ public static void Postfix(PlayerControl __instance) {
//main.BitPlayers[__instance.PlayerId].Item2:キルするまでの秒数
if(main.BitPlayers[__instance.PlayerId].Item2 >= 10) {
byte vampireID = main.BitPlayers[__instance.PlayerId].Item1;
if(AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Started &&
!__instance.Data.IsDead) {
if(!__instance.Data.IsDead) {
__instance.RpcMurderPlayer(__instance);
main.PlaySoundRPC(vampireID,Sounds.KillSound);
}
Expand Down

0 comments on commit b1257de

Please sign in to comment.