Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ChaosTokens/Buttons/RollButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using ChaosTokens.Options;
using MiraAPI.GameOptions;
using MiraAPI.Hud;
using MiraAPI.Keybinds;
using MiraAPI.Modifiers;
using MiraAPI.Utilities.Assets;
using TownOfUs.Buttons;
Expand All @@ -17,7 +18,6 @@ public class RollButton : TownOfUsButton
public override LoadableAsset<Sprite> Sprite => Assets.DiceButton;
public override Color TextOutlineColor => ChaosTokensPlugin.MainColor;
public override ButtonLocation Location => ButtonLocation.BottomLeft;
public override string Keybind => Keybinds.ModifierAction;

protected override void OnClick()
{
Expand Down
5 changes: 4 additions & 1 deletion ChaosTokens/ChaosEffects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public enum ChaosEffects
Tasks,
Vision,
Invisible,
Assassin,

// Negative
RevealSelf,
Expand All @@ -22,8 +23,10 @@ public enum ChaosEffects
Drunk,
FakeRevealSelf,
Hyperactive,
Nausea,
Nausea, // Unused
Colorblind,
ScreenFlip, // Unused
Blind, // Unused

// Neutral
RevealRandom,
Expand Down
6 changes: 3 additions & 3 deletions ChaosTokens/ChaosTokens.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<DebugType>embedded</DebugType>

<Authors>Chipseq</Authors>
<Version>1.1.2</Version>
<Version>1.1.3</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AllOfUs.MiraAPI" Version="0.2.0-dev" />
<PackageReference Include="AllOfUs.MiraAPI" Version="0.3.0" />
<PackageReference Include="Reactor" Version="2.3.1" />
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.735" Private="false" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2025.4.15" PrivateAssets="all" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2025.9.9" PrivateAssets="all" />

<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all"/>
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.1.0-rc.1" PrivateAssets="all" ExcludeAssets="runtime"/>
Expand Down
38 changes: 38 additions & 0 deletions ChaosTokens/ChaosTokensRpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using TownOfUs;
using TownOfUs.Events;
using TownOfUs.Modifiers;
using TownOfUs.Modifiers.Game;
using TownOfUs.Modifiers.Game.Alliance;
using TownOfUs.Modifiers.Impostor;
using TownOfUs.Modules;
Expand Down Expand Up @@ -269,6 +270,20 @@ void Reroll()

player.RpcAddModifier<TokenInvisible>();
break;
case ChaosEffects.Assassin:
if (player.HasModifier<TokenAssassin>())
{
Reroll();
break;
}
if (player.HasModifier<AssassinModifier>())
{
Reroll();
break;
}

player.RpcAddModifier<TokenAssassin>();
break;


case ChaosEffects.RevealSelf:
Expand Down Expand Up @@ -373,7 +388,26 @@ void Reroll()

player.RpcAddModifier<TokenColorblind>();
break;
/*
case ChaosEffects.ScreenFlip:
if (player.HasModifier<TokenScreenFlip>())
{
Reroll();
break;
}

player.RpcAddModifier<TokenScreenFlip>();
break;
case ChaosEffects.Blind:
if (player.HasModifier<TokenBlind>() || player.HasModifier<TokenVision>())
{
Reroll();
break;
}

player.RpcAddModifier<TokenBlind>();
break;
*/

case ChaosEffects.RevealRandom:
if (_revealsLeft <= 0)
Expand Down Expand Up @@ -479,6 +513,10 @@ void Reroll()

player.RpcAddModifier<TokenNoSkip>();
break;

default:
Reroll();
break;
}

return reroll;
Expand Down
Loading