Fix Allergic & Leery progress

This commit is contained in:
Gurge44 committed 2024-11-01 21:42:41 +01:00
1 parent e7e4ede2a4
commit 806eeffb12
4 files changed
+60 -3

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
namespace EHR.Modules
{
public class Achievement
{
public enum AchievementType
{
IdeasLiveOn, // As Undead, win with at least 3 Necromancers
HowCouldIBelieveThem, // Vote for Jester that was ejected
WhatKindOfGeniusCameUpWithThisRoleIdea, // Get Dad role
StabbingTheBack, // Kill a Crewmate as Backstabber
Honk, // Drag someone as Goose
Bruh, // Get vanilla Crewmate role
HowDoICraftThisAgain, // Craft something as Adventurer
ImCrewISwear, // Kill the last Impostor with all Neutral Killers dead
Covid20, // Infect 2 people as Virus
TheresThisGameMyDadTaughtMeItsCalledSwitch, // Swap as or be Swapped by Shifter at least 3 times in one round
FirstDayOnTheJob, // As an Amnesiac, remember that you were a Sidekick or Deathknight
UnderNewManagement, // As an Amnesiac, remember that you were a Cultist or Virus
OutOfTime, // Suicide or lose due to your role or an addon
TooCold, // Get frozen by Freezer, Beartrap, etc.
APerfectTimeToRewindIt, // Rewind time as Time Master
SerialKiller, // Kill everyone in FFA mode
PVPMaster, // Win in Solo PVP mode
HarderThanDrivingThroughTrafficLightsRight, // Win in Stop and Go mode
TwoFast4You, // Win in Speedrun mode
TooHotForMe, // Win in Hot Potato mode
SeekAndHide, // Win in Hide and Seek mode
Two012, // Win in Natural Disasters mode
YourFlagIsMine, // Win in Capture The Flag mode
BestReactionTime, // Win in Room Rush mode
KimJongUnExperience, // Vote for someone as Dictator
ImUnstoppable, // Get Medic's shield as Snitch
ThereCanOnlyBeOne, // Kill someone who had the same role as you
CantTouchThis, // As Detour, redirect at least 3 interactions
ItsMorbinTime, // Shapeshift into someone
WhatHaveIDone, // Kill your Lover, Romantic, Lawyer or Follower
BetrayalLevel100, // Kill Madmate as Impostor or Impostor as Madmate
TheRealTraitor, // Kill renegade as traitor (the neutral one)
DiePleaseDie, // Try to kill the same player with Medic's shield 2 times, both unsuccessfully
MasterDetective, // As Crewmate, vote only for Impostors and Neutral Killers
}
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace EHR.Modules
{
public static class Statistics
{
}
}
+3 -2
View File
@@ -100,8 +100,9 @@ namespace EHR.AddOns.Common
public static string GetSelfSuffix(PlayerControl seer)
{
if (!seer.IsAlive() || !AllergyMaxTS.TryGetValue(seer.PlayerId, out long endTS)) return string.Empty;
return string.Format(Translator.GetString("Allergic.Suffix"), Math.Ceiling(endTS / (float)Utils.TimeStamp * 100));
long now = Utils.TimeStamp;
float percentage = (float)(endTS - now) / Time.GetInt();
return string.Format(Translator.GetString("Allergic.Suffix"), 100 - (int)Math.Round(percentage * 100f));
}
}
}
+7 -1
View File
@@ -97,7 +97,13 @@ namespace EHR.Crewmate
if (seer.PlayerId != LeeryId || seer.PlayerId != target.PlayerId || meeting || hud || !ShowNearestPlayerName.GetBool() || InvestigationEndTS == 0) return string.Empty;
string text = string.Format(Translator.GetString("LeerySuffix"), CurrentTarget.ColoredPlayerName());
if (ShowProgress.GetBool()) text += $" {Math.Ceiling(InvestigationEndTS / (float)Utils.TimeStamp * 100)}%";
if (ShowProgress.GetBool())
{
long now = Utils.TimeStamp;
float percentage = (float)(InvestigationEndTS - now) / Duration.GetInt();
text += $" {100 - (int)Math.Round(percentage * 100f)}%";
}
return text;
}