This commit is contained in:
Gurge44 committed 2026-02-22 12:01:27 +01:00
1 parent b7d970207e
commit 9979de8137
3 files changed
+11 -15

No files matched your search

+1 -1
View File
@@ -2101,7 +2101,7 @@
"PenguinVictimKill": "As the victim of the Penguin/Goose, you cannot interact with others",
"Perplexer": "Perplexer",
"PerplexerInfo": "Invert a player's movement controls",
"PerplexerInfoLong": "(Impostors):\nAs the Perplexer, use your shapeshift menu to select a player. That player will get their movement controls inverted for a certain amout of time.",
"PerplexerInfoLong": "(Impostors):\\nAs the Perplexer, use your shapeshift menu to select a player. That player will get their movement controls inverted for a certain amout of time.",
"PhantomEHR": "Phantom",
"PhantomEHRInfo": "Go invisible temporarily",
"PhantomEHRInfoLong": "(Impostors):\\nAs the Phantom, you can go invisible for a short period. During this time, you can't be seen by Crewmates.",
@@ -39,7 +39,7 @@ public class Fakeshifter : RoleBase
public override void ApplyGameOptions(IGameOptions opt, byte playerId)
{
AURoleOptions.ShapeshifterCooldown = AbilityCooldown.GetInt();
opt.SetVision(true);
AURoleOptions.ShapeshifterDuration = 0.1f;
}
public override bool OnShapeshift(PlayerControl shapeshifter, PlayerControl target, bool shapeshifting)
+9 -13
View File
@@ -25,7 +25,7 @@ public class Perplexer : RoleBase
.AutoSetupOption(ref KillCooldown, 30f, new FloatValueRule(1, 120, 1), OptionFormat.Seconds)
.AutoSetupOption(ref AbilityCooldown, 30f, new FloatValueRule(1, 120, 1), OptionFormat.Seconds)
.AutoSetupOption(ref AbilityDuration, 10f, new FloatValueRule(1, 120, 1), OptionFormat.Seconds)
.AutoSetupOption(ref AbilityUseLimit, 3f, new FloatValueRule(0, 20, 0.05f), OptionFormat.None)
.AutoSetupOption(ref AbilityUseLimit, 3f, new FloatValueRule(0, 20, 0.05f), OptionFormat.Times)
.AutoSetupOption(ref AbilityUseGainWithEachKill, 0.5f, new FloatValueRule(0f, 5f, 0.25f), OptionFormat.Times);
}
@@ -44,26 +44,22 @@ public class Perplexer : RoleBase
public override void ApplyGameOptions(IGameOptions opt, byte playerId)
{
AURoleOptions.ShapeshifterCooldown = AbilityCooldown.GetInt();
opt.SetVision(true);
AURoleOptions.ShapeshifterDuration = 0.1f;
}
public override bool OnShapeshift(PlayerControl shapeshifter, PlayerControl target, bool shapeshifting)
{
bool animated = !Options.DisableShapeshiftAnimations.GetBool();
if (MarkedId == byte.MaxValue && target.IsAlive())
{
MarkedId = target.PlayerId;
Main.AllPlayerSpeed[target.PlayerId] *= -1;
Utils.MarkEveryoneDirtySettings();
LateTask.New(() => shapeshifter.RpcShapeshift(shapeshifter, animated), animated ? 1.2f : 0.5f);
Main.AllPlayerSpeed[MarkedId] *= -1;
target.MarkDirtySettings();
LateTask.New(() =>
{
if (target != null && target.IsAlive())
{
Main.AllPlayerSpeed[target.PlayerId] *= -1;
MarkedId = byte.MaxValue;
Utils.MarkEveryoneDirtySettings();
}
if (Main.AllPlayerSpeed[MarkedId] < 0f) Main.AllPlayerSpeed[MarkedId] *= -1;
MarkedId = byte.MaxValue;
if (target && target.IsAlive()) target.MarkDirtySettings();
}, AbilityDuration.GetFloat(), "Perplexer Revert Control Invert");
}
return false;