From e8e18f16cb58cacee09d6c694adef407854f7d28 Mon Sep 17 00:00:00 2001 From: Newchan Date: Sat, 25 Apr 2026 18:30:13 +0700 Subject: [PATCH] Fix Wiper do not have Phantom basis despite mentioned in the desc (#599) * Update CustomRolesHelper.cs * Update CustomRolesHelper.cs * Update Wiper.cs * Update HudSpritePatch.cs --- Modules/CustomRolesHelper.cs | 4 ++-- Patches/HudSpritePatch.cs | 6 ++++++ Roles/Standard/Impostor/Killing/Wiper.cs | 17 ++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Modules/CustomRolesHelper.cs b/Modules/CustomRolesHelper.cs index af134ecb9..fba5727ed 100644 --- a/Modules/CustomRolesHelper.cs +++ b/Modules/CustomRolesHelper.cs @@ -32,7 +32,6 @@ internal static class CustomRolesHelper CustomRoles.NoteKiller, CustomRoles.Weatherman, CustomRoles.Amogus, - CustomRoles.Wiper, CustomRoles.PortalMaker, CustomRoles.Gardener, CustomRoles.Farmer, @@ -153,7 +152,7 @@ internal static class CustomRolesHelper CustomRoles.DoubleAgent => CustomRoles.Crewmate, CustomRoles.Inhibitor => CustomRoles.Impostor, CustomRoles.Occultist => CustomRoles.Impostor, - CustomRoles.Wiper => CustomRoles.Impostor, + CustomRoles.Wiper => UsePets ? CustomRoles.Impostor : CustomRoles.Shapeshifter, CustomRoles.Forger => CustomRoles.Impostor, CustomRoles.ClockBlocker => CustomRoles.Impostor, CustomRoles.Psychopath => CustomRoles.Impostor, @@ -1112,6 +1111,7 @@ internal static class CustomRolesHelper or CustomRoles.Hypnotist or CustomRoles.Librarian or CustomRoles.Miner + or CustomRoles.Wiper or CustomRoles.RiftMaker or CustomRoles.Ninja or CustomRoles.QuickShooter diff --git a/Patches/HudSpritePatch.cs b/Patches/HudSpritePatch.cs index 39ce82420..066776530 100644 --- a/Patches/HudSpritePatch.cs +++ b/Patches/HudSpritePatch.cs @@ -640,6 +640,12 @@ public static class HudSpritePatch else newAbilityButton = CustomButton.Get("Mine"); break; } + case CustomRoles.Wiper: + { + if (Options.UsePets.GetBool() && !Options.UsePhantomBasis.GetBool()) newPetButton = DefaultIcons[0]; + else newAbilityButton = DefaultIcons[0]; + break; + } case CustomRoles.Analyst: case CustomRoles.Witness: { diff --git a/Roles/Standard/Impostor/Killing/Wiper.cs b/Roles/Standard/Impostor/Killing/Wiper.cs index 950536907..46790f457 100644 --- a/Roles/Standard/Impostor/Killing/Wiper.cs +++ b/Roles/Standard/Impostor/Killing/Wiper.cs @@ -50,6 +50,21 @@ public class Wiper : RoleBase { if (Options.UsePhantomBasis.GetBool()) AURoleOptions.PhantomCooldown = AbilityCooldown.GetInt(); + else + { + if (Options.UsePets.GetBool()) return; + + AURoleOptions.ShapeshifterCooldown = AbilityCooldown.GetFloat(); + AURoleOptions.ShapeshifterDuration = 1f; + } + } + + public override void SetButtonTexts(HudManager hud, byte id) + { + if (Options.UsePets.GetBool() && !Options.UsePhantomBasis.GetBool()) + hud.PetButton?.OverrideText(Translator.GetString("KillButtonText")); + else + hud.AbilityButton?.OverrideText(Translator.GetString("KillButtonText")); } public override void OnPet(PlayerControl pc) @@ -143,4 +158,4 @@ public class Wiper : RoleBase if (IsInvalidRoom(room)) return Utils.ColorString(Color.red, Translator.GetString("Wiper.MustBeInRoomToUseAbility")); return string.Format(Translator.GetString("Wiper.CurrentRoom"), Translator.GetString($"{room.RoomId}")); } -} \ No newline at end of file +}