Skip to content

Commit

Permalink
v4.0.0 Source Code
Browse files Browse the repository at this point in the history
  • Loading branch information
eDonnes124 committed Jan 24, 2023
1 parent 166b76d commit 5a2e3d8
Show file tree
Hide file tree
Showing 306 changed files with 4,922 additions and 3,516 deletions.
Binary file modified Images/Roles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 105 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Join our [Discord](https://discord.gg/ugyc4EVUYZ) if you have any problems or wa
- [Altruist](#altruist)
- [Medic](#medic)
- [Engineer](#engineer)
- [Imitator](#imitator)
- [Mayor](#mayor)
- [Medium](#medium)
- [Swapper](#swapper)
- [Time Lord](#time-lord)
- [Transporter](#transporter)

**Neutral Roles**
Expand All @@ -37,6 +37,7 @@ Join our [Discord](https://discord.gg/ugyc4EVUYZ) if you have any problems or wa
- [Jester](#jester)
- [Phantom](#phantom)
- [Arsonist](#arsonist)
- [Juggernaut](#juggernaut)
- [Plaguebearer](#plaguebearer)
- [The Glitch](#the-glitch)
- [Werewolf](#werewolf)
Expand All @@ -46,7 +47,7 @@ Join our [Discord](https://discord.gg/ugyc4EVUYZ) if you have any problems or wa
- [Grenadier](#grenadier)
- [Morphling](#morphling)
- [Swooper](#swooper)
- [Poisoner](#poisoner)
- [Bomber](#bomber)
- [Traitor](#traitor)
- [Blackmailer](#blackmailer)
- [Janitor](#janitor)
Expand Down Expand Up @@ -74,6 +75,7 @@ Join our [Discord](https://discord.gg/ugyc4EVUYZ) if you have any problems or wa
# Releases
| Among Us - Version| Mod Version | Link |
|----------|-------------|-----------------|
| 2022.12.14s & 2022.12.14e | v4.0.0 | [Download](https://github.com/eDonnes124/Town-Of-Us/releases/download/v4.0.0/ToU.v4.0.0.zip) |
| 2022.10.25s & 2022.10.25e | v3.4.0 | [Download](https://github.com/eDonnes124/Town-Of-Us/releases/download/v3.4.0/ToU.v3.4.0.zip) |
| 2022.8.24s & 2022.8.24e & 2022.9.20s & 2022.9.20e | v3.3.2 | [Download](https://github.com/eDonnes124/Town-Of-Us/releases/download/v3.3.2/ToU.v3.3.2.zip) |
| 2022.8.24s & 2022.8.24e & 2022.9.20s & 2022.9.20e | v3.3.1 | [Download](https://github.com/eDonnes124/Town-Of-Us/releases/download/v3.3.1/ToU.v3.3.1.zip) |
Expand Down Expand Up @@ -126,6 +128,28 @@ Join our [Discord](https://discord.gg/ugyc4EVUYZ) if you have any problems or wa
<details>
<summary> Changelog </summary>
<details>
<summary> v4.0.0 </summary>
<ul> <li>Compatibility with the new Among Us version v2022.12.14</li> </ul>
<ul> <li>New Role: Imitator (Replacing Time Lord)</li> </ul>
<ul> <li>New Role: Bomber (Poisoner rework)</li> </ul>
<ul> <li>New Game Mode: Cultist</li> </ul>
<ul> <li>New Game Mode Roles: Necromancer & Whisperer as well as Crewmate/Impostor variants of already existing roles</li> </ul>
<ul> <li>New Setting: Enable Hidden Roles</li> </ul>
<ul> <li>New Settings for hidden roles</li> </ul>
<ul> <li>New Setting: Undertaker Drag Speed</li> </ul>
<ul> <li>Bug Fix: Executioner/Guardian Angel turned Amnesiac/Jester/Survivor no longer have red text after changing role</li> </ul>
<ul> <li>Amnesiac remembering a role no longer makes their task list swap with the player they remembered</li> </ul>
<ul> <li>Bug Fix: Amnesiac no longer sees themself with the remembered players' modifier</li> </ul>
<ul> <li>Bug Fix: Amnesiac no longer loses tasks if the person they remembered from disconnects or vice versa</li> </ul>
<ul> <li>Bug Fix: Underdog kill timer is now in sync with normal kill cooldowns</li> </ul>
<ul> <li>Bug Fix: Underdog now has the correct kill cooldown on game start</li> </ul>
<ul> <li>Bug Fix: Underdog now can have a kill cooldown below 10secs</li> </ul>
<ul> <li>Bug Fix: Miner's mines are no longer invisible in certain places</li> </ul>
<ul> <li>Bug Fix: Undertaker no longer can make a body become invisible in certain places</li> </ul>
<ul> <li>Bug Fix: Neutral Killers now get correct cooldowns when attacking a vesting Survivor or a Guardian Angel shield</li> </ul>
<ul> <li>Adjusted the Trapper's trap & Grenadier's flash radius so they scale correctly</li> </ul>
</details>
<details>
<summary> v3.4.0 </summary>
<ul> <li>New Role: Escapist</li> </ul>
<ul> <li>New Modifier: Radar</li> </ul>
Expand Down Expand Up @@ -786,7 +810,7 @@ However, this is done so in a random order, not stating who entered the trap, no
| Trap Cooldown | The cooldown on the Trapper's trap button | Time | 25s |
| Traps Removed Each Round | Whether the Trapper's traps are removed after each meeting | Toggle | True |
| Maximum Number of Traps Per Game | The number of traps they can place in a game | Number | 5 |
| Trap Size | The size of each trap | Factor | 1x |
| Trap Size | The size of each trap | Factor | 0.25x |
| Minimum Number of Roles required to Trigger Trap | The number of players that must enter the trap for it to be triggered | Number | 3 |

-----------------------
Expand Down Expand Up @@ -886,12 +910,19 @@ A report can contain the name of the killer or the color type (Darker/Lighter)
- Watermelon - Darker
- Chocolate - Darker
- Sky Blue - Lighter
- Beige - Darker
- Hot Pink - Lighter
- Beige - Lighter
- Magenta - Darker
- Turquoise - Lighter
- Lilac - Lighter
- Olive - Darker
- Azure - Lighter
- Plum - Darker
- Jungle - Darker
- Mint - Lighter
- Chartreuse - Lighter
- Macau - Darker
- Tawny - Darker
- Gold - Lighter
- Rainbow - Lighter

### Game Options
Expand All @@ -917,6 +948,19 @@ They can use vents to get across the map easily.
| Engineer | The percentage probability of the Engineer appearing | Percentage | 0% |
| Engineer Fix Per | Whether the Engineer can fix 1 sabotage per round or per game | Round / Game | Round |

-----------------------
## Imitator
### **Team: Crewmates**
The Imitator is a Crewmate that can mimic dead crewamtes.\
During meetings the Imitator can select who they are going to imitate the following round from the dead.\
They can choose to use each dead players as many times as they wish.\
It should be noted the Imitator can not imitate all crew roles.

### Game Options
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| Imitator | The percentage probability of the Imitator appearing | Percentage | 0% |

-----------------------
## Mayor
### **Team: Crewmates**
Expand Down Expand Up @@ -961,24 +1005,6 @@ All the votes for the first player will instead be counted towards the second pl
| Swapper | The percentage probability of the Swapper appearing | Percentage | 0% |
| Swapper Can Button | Whether the Swapper Can Press the Button | Toggle | True |

-----------------------
## Time Lord
### **Team: Crewmates**
The Time Lord is a Crewmate that can rewind time and reverse the positions of all players.\
If enabled, any players killed during this time will be revived.\
Nothing but movements and kills are affected.\
If enabled, the Time Lord can't use Vitals to make things more balanced.

### Game Options
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| Time Lord | The percentage probability of the Time Lord appearing | Percentage | 0% |
| Revive During Rewind | Whether the Time Lord revives dead players when rewinding | Toggle | False |
| Rewind Duration | How far the rewind goes back in time | Time | 2s |
| Rewind Cooldown | The cooldown of the Time Lord's Rewind button | Time | 25s |
| Max Uses | The amount of times the Rewind ability can be used | Number | 5 |
| Time Lord can use Vitals | Whether the Time Lord has the ability to use Vitals | Toggle | False |

-----------------------
## Transporter
### **Team: Crewmates**
Expand Down Expand Up @@ -1102,6 +1128,22 @@ The Arsonist needs to be the last killer alive to win the game.
| Arsonist Has Impostor Vision | Whether the Arsonist Has Impostor Vision | Toggle | False |
| Ignite Cooldown Removed When Arso Is Last Killer | Whether the Arsonist's Ignite Cooldown is removed when they're the final killer | Toggle | False |

-----------------------
## Juggernaut
### **Team: Neutral**

The Juggernaut is a Neutral role with its own win condition.\
The Juggernaut's special ability is that their kill cooldown reduces with each kill.\
This means in theory the Juggernaut can have a 0 second kill cooldown!\
The Juggernaut is also a hidden role, meaning it will show up randomly and can not be toggled by percentages like other roles.\
The Juggernaut needs to be the last killer alive to win the game.
### Game Options
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| Juggernaut Kill Cooldown | The initial cooldown of the Juggernaut's Kill button | Time | 25s |
| Reduced Kill Cooldown Per Kill | The amount of time removed from the Juggernaut's Kill Cooldown Per Kill | Time | 5s |
| Juggernaut can Vent | Whether the Juggernaut can Vent | Toggle | False |

-----------------------
## Plaguebearer
### **Team: Neutral**
Expand Down Expand Up @@ -1134,11 +1176,11 @@ The Glitch can Mimic someone, which results in them looking exactly like the oth
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| The Glitch | The percentage probability of The Glitch appearing | Percentage | 0% |
| Mimic Cooldown | The cooldown of The Glitch's Mimic button | Time | 30s |
| Mimic Cooldown | The cooldown of The Glitch's Mimic button | Time | 25s |
| Mimic Duration | How long The Glitch can Mimic a player | Time | 10s |
| Hack Cooldown | The cooldown of The Glitch's Hack button | Time | 30s |
| Hack Cooldown | The cooldown of The Glitch's Hack button | Time | 25s |
| Hack Duration | How long The Glitch can Hack a player | Time | 10s |
| Glitch Kill Cooldown | The cooldown of the Glitch's Kill button | Time | 30s |
| Glitch Kill Cooldown | The cooldown of the Glitch's Kill button | Time | 25s |
| Glitch Hack Distance | How far away The Glitch can Hack someone from | Short / Normal / Long | Short |
| Glitch can Vent | Whether the Glitch can Vent | Toggle | False |

Expand Down Expand Up @@ -1223,19 +1265,21 @@ The Swooper is an Impostor that can temporarily turn invisible.
| Swooper can Vent | Whether the Swooper can Vent | Toggle | False |

-----------------------
## Poisoner
## Bomber
### **Team: Impostors**

The Poisoner is an Impostor who has to poison another player instead of kill.\
When they poison a player, the poisoned player dies either upon the start of the next meeting or after a set duration.
The Bomber is an Impostor who has the ability to plant bombs instead of kill.\
After a bomb is planted, the bomb will detonate a fixed time period as per settings.\
Once the bomb detonates it will kill all crewmates (and Impostors!) inside the radius.

### Game Options
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| Poisoner | The percentage probability of the Poisoner appearing | Percentage | 0% |
| Poison Cooldown | The cooldown of the Poisoner's Poison button | Time | 25s |
| Poison Kill Delay | The delay of the kill after being poisoned | Time | 5s |
| Poisoner can Vent | Whether the Poisoner can Vent | Toggle | False |
| Bomber | The percentage probability of the Bomber appearing | Percentage | 0% |
| Detonate Delay | The delay of the detonation after bomb has been planted | Time | 5s |
| Max Kills In Detonation | Maximum number of kills in the detonation | Time | 5s |
| Detonate Radius | How wide the detonate radius is | Factor | 0.25x |
| Bomber can Vent | Whether the Bomber can Vent | Toggle | False |

-----------------------
## Traitor
Expand Down Expand Up @@ -1300,6 +1344,7 @@ The Undertaker is an Impostor that can drag and drop bodies.
|----------|:-------------:|:------:|:------:|
| Undertaker | The percentage probability of the Undertaker appearing | Percentage | 0% |
| Undertaker Drag Cooldown | The cooldown of the Undertaker Drag ability | Time | 25s |
| Undertaker Speed While Dragging | How fast the Undertaker moves while dragging a body in comparison to normal | Factor | 0.75x |
| Undertaker can Vent | Whether the Undertaker can Vent | Toggle | False |
| Undertaker can Vent while Dragging | Whether the Undertaker can Vent when they are Dragging a Body | Toggle | False |

Expand Down Expand Up @@ -1472,7 +1517,7 @@ When they are the only remaining Impostor, they will have their kill cooldown sh
# Game Mode Settings
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| Game Mode | What game mode the next game will be | Classic / All Any / Killing Only | Classic |
| Game Mode | What game mode the next game will be | Classic / All Any / Killing Only / Cultist | Classic |

-----------------------
# Classic Game Mode Settings
Expand All @@ -1499,6 +1544,31 @@ When they are the only remaining Impostor, they will have their kill cooldown sh
| Add Arsonist | Whether Arsonist will be added to the role list | Toggle | True |
| Add Plaguebearer | Whether Plaguebearer will be added to the role list | Toggle | True |

-----------------------
# Cultist Settings
| Name | Description | Type | Default |
|----------|:-------------:|:------:|:------:|
| Mayor | The percentage probability of the Mayor appearing | Percentage | 0% |
| Seer | The percentage probability of the Seer appearing | Percentage | 0% |
| Sheriff | The percentage probability of the Sheriff appearing | Percentage | 0% |
| Survivor | The percentage probability of the Survivor appearing | Percentage | 0% |
| Number Of Special Roles | How many special roles will spawn | Number | 4 |
| Max Chameleons | The maximum number of Chameleons that can spawn | Number | 3 |
| Max Engineers | The maximum number of Engineers that can spawn | Number | 3 |
| Max Investigators | The maximum number of Investigators that can spawn | Number | 3 |
| Max Mystics | The maximum number of Mystics that can spawn | Number | 3 |
| Max Spies | The maximum number of Spies that can spawn | Number | 3 |
| Max Transporters | The maximum number of Transporters that can spawn | Number | 3 |
| Max Vigilantes | The maximum number of Vigilantes that can spawn | Number | 3 |
| Initial Whisper Cooldown | The initial cooldown of the Whisperer's Whisper button | Time | 25s |
| Increased Cooldown Per Whisper | The amount of time the Whisperer's whisper cooldown increases by per Whisper | Time | 5s |
| Whisper Radius | How wide the whisper radius is | Factor | 0.25x |
| Conversion Percentage | The percentage someone is leant towards being converted (addition not chance) | Percentage | 25% |
| Decreased Conversion Percentage Per Conversion | The percentage decrease of the conversion percentage with each conversion | Percentage | 5% |
| Initial Revive Cooldown | The initial cooldown of the Necromancer's Revive button | Time | 25s |
| Increased Cooldown Per Revive | The amount of time the Necromancer's revive cooldown increases by per Revive | Time | 25s |
| Maximum Number Of Reveals | The maximum number of times the Seer can reveal someone | Number | 5 |

-----------------------
# Map Settings
| Name | Description | Type | Default |
Expand Down Expand Up @@ -1540,6 +1610,7 @@ When they are the only remaining Impostor, they will have their kill cooldown sh
| Disable Meeting Skip Button | Whether the meeting button is disabled | No / Emergency / Always | No |
| Disable Level Icons | Whether all level icons are removed in meetings | Toggle | False |
| Disable Player Nameplates | Whether all decorative nameplates are disabled in meetings | Toggle | False |
| Enable Hidden Roles | Whether hidden roles are added to the role selections | Toggle | True |

-----------------------
# Task Tracking Settings
Expand Down
2 changes: 1 addition & 1 deletion source/Patches/CamoComms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void Postfix(HudManager __instance)
if (CustomGameOptions.ColourblindComms)
{
if (ShipStatus.Instance != null)
switch (PlayerControl.GameOptions.MapId)
switch (GameOptionsManager.Instance.currentNormalGameOptions.MapId)
{
case 0:
case 2:
Expand Down
11 changes: 0 additions & 11 deletions source/Patches/ClientOptions.cs

This file was deleted.

3 changes: 2 additions & 1 deletion source/Patches/Colors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Colors {
public readonly static Color Engineer = new Color(1f, 0.65f, 0.04f, 1f);
public readonly static Color Swapper = new Color(0.4f, 0.9f, 0.4f, 1f);
public readonly static Color Investigator = new Color(0f, 0.7f, 0.7f, 1f);
public readonly static Color TimeLord = new Color(0f, 0f, 1f, 1f);
public readonly static Color Medic = new Color(0f, 0.4f, 0f, 1f);
public readonly static Color Seer = new Color(1f, 0.8f, 0.5f, 1f);
public readonly static Color Spy = new Color(0.8f, 0.64f, 0.8f, 1f);
Expand All @@ -26,6 +25,8 @@ class Colors {
public readonly static Color Mystic = new Color(0.3f, 0.6f, 0.9f, 1f);
public readonly static Color Trapper = new Color(0.65f, 0.82f, 0.7f, 1f);
public readonly static Color Detective = new Color(0.3f, 0.3f, 1f, 1f);
public readonly static Color Chameleon = new Color(0.5f, 0.5f, 0f, 1f);
public readonly static Color Imitator = new Color(0.7f, 0.85f, 0.3f, 1f);

// Neutral Colors
public readonly static Color Jester = new Color(1f, 0.75f, 0.8f, 1f);
Expand Down
17 changes: 0 additions & 17 deletions source/Patches/ConstantsPatch.cs

This file was deleted.

10 changes: 3 additions & 7 deletions source/Patches/CrewmateRoles/AltruistMod/Coroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using InnerNet;
using Reactor.Utilities.Extensions;
using TownOfUs.CrewmateRoles.MedicMod;
using TownOfUs.Extensions;
using TownOfUs.Roles;
using UnityEngine;
using Object = UnityEngine.Object;
using TownOfUs.Roles.Modifiers;
using AmongUs.GameOptions;

namespace TownOfUs.CrewmateRoles.AltruistMod
{
Expand Down Expand Up @@ -56,13 +56,9 @@ public static IEnumerator AltruistRevive(DeadBody target, Altruist role)

var player = Utils.PlayerById(parentId);

foreach (var poisoner in Role.GetRoles(RoleEnum.Poisoner))
{
var poisonerRole = (Poisoner)poisoner;
if (poisonerRole.PoisonedPlayer == player) poisonerRole.PoisonedPlayer = poisonerRole.Player;
}

player.Revive();
if (player.Is(Faction.Impostors)) RoleManager.Instance.SetRole(player, RoleTypes.Impostor);
else RoleManager.Instance.SetRole(player, RoleTypes.Crewmate);
Murder.KilledPlayers.Remove(
Murder.KilledPlayers.FirstOrDefault(x => x.PlayerId == player.PlayerId));
revived.Add(player);
Expand Down
Loading

0 comments on commit 5a2e3d8

Please sign in to comment.