feat: Adjust gameplay mechanics and round settings.

```
- Adjust player elimination thresholds for SpeedrunDay in `SpecialDays/SpeedrunDay.cs`.
- Update round timings for Last Guard in `LastGuard.cs`.
- Disable creation of InfectionDay in `SpecialDayFactory.cs`.
- Refine reward handling and restrictions in `RewardGenerator.cs`.
- Overhaul weapon progression, cleanup logic, and gameplay mechanics for GunGameDay in `SpecialDays/GunGameDay.cs`.
- Improve SDType parsing, adjust supporter permission checks, and temporarily disable Gold Supporter permission for SPEEDRUN in `Enums/SDType.cs`.
```

[mod/Jailbreak.SpecialDay/SpecialDays/SpeedrunDay.cs]
- Adjusted the player elimination thresholds for various player counts, reducing the number of eliminations for each range.
[mod/Jailbreak.LastGuard/LastGuard.cs]
- Changed the base round time for the Last Guard from 60 to 30 seconds.
- Adjusted the maximum round time for the Last Guard from 120 to 90 seconds.
[mod/Jailbreak.SpecialDay/SpecialDayFactory.cs]
A line initializing `SDType.INFECTION` was commented out, effectively disabling the creation of `InfectionDay`.
[mod/Jailbreak.RTD/RewardGenerator.cs]
- Commented out the addition of a new color reward with red color.
- Added a new reward restriction for rifles under the "Very low" probability category.
[public/Jailbreak.Public/Mod/SpecialDay/Enums/SDType.cs]
Modified the `FromString` method to handle additional `type` string variations with a case-insensitive replacement and matching for SDType values.

Removed `OITC` and `NOSCOPE` from the conditions checking Silver Supporter permissions in the `CanCall` method and instead focused on `SPEEDRUN`.

Commented out the Gold Supporter permission check and message for `SPEEDRUN` in the `CanCall` method, making it currently inactive.
[mod/Jailbreak.SpecialDay/SpecialDays/GunGameDay.cs]
- Adjusted the weapon progression logic by introducing additional shuffles for weapon categories and modifying order initialization.
- Introduced unhooking of the `CCSPlayer_ItemServices_CanAcquireFunc` virtual function when a player wins the game.
- Added a condition to verify valid acquisition of weapons based on progression and weapon categories, overriding the default behavior when necessary.
- Enhanced end-round cleanup by deregistering event handlers for player death and spawn.
- Minor adjustments to gameplay mechanics, including changes to player speed, weapon handling, and damage disabling for the winning player.
- Updated round settings and server commands to adjust behavior at critical game stages.
This commit is contained in:
MSWS
2025-04-25 19:13:46 -07:00
parent 37adbf1853
commit 1845621483
6 changed files with 18 additions and 14 deletions

View File

@@ -35,7 +35,7 @@ public class LastGuard(ILGLocale notifications, ILastRequestManager lrManager,
public static readonly FakeConVar<int> CV_LG_BASE_ROUND_TIME =
new("css_jb_lg_time_base",
"Round time to set when LG is activated, 0 to disable", 60);
"Round time to set when LG is activated, 0 to disable", 30);
public static readonly FakeConVar<int> CV_LG_KILL_BONUS_TIME =
new("css_jb_lg_time_per_kill",
@@ -43,7 +43,7 @@ public class LastGuard(ILGLocale notifications, ILastRequestManager lrManager,
public static readonly FakeConVar<int> CV_LG_MAX_TIME =
new("css_jb_lg_time_max",
"Max round time to give the LG regardless of bonuses", 120);
"Max round time to give the LG regardless of bonuses", 90);
public static readonly FakeConVar<int> CV_LG_PER_PRISONER_TIME =
new("css_jb_lg_time_per_prisoner",

View File

@@ -64,7 +64,7 @@ public class RewardGenerator(IC4Service bomb, IWardenSelectionService warden,
(new AmmoWeaponReward("weapon_glock", 0, 0), PROB_LOW),
(new ChatSpyReward(basePlugin), PROB_LOW * 1.5f),
(new ColorReward(Color.FromArgb(0, 255, 0), true), PROB_LOW),
(new ColorReward(Color.FromArgb(255, 0, 0), true), PROB_LOW),
// (new ColorReward(Color.FromArgb(255, 0, 0), true), PROB_LOW),
(new CannotUseReward(basePlugin, WeaponType.GRENADE), PROB_LOW),
(new CannotScope(basePlugin), PROB_LOW),
(new CannotRightKnife(basePlugin), PROB_LOW),
@@ -81,6 +81,7 @@ public class RewardGenerator(IC4Service bomb, IWardenSelectionService warden,
(new NoWeaponReward(), PROB_VERY_LOW),
(new CannotUseReward(basePlugin, WeaponType.SMGS), PROB_VERY_LOW),
(new CannotUseReward(basePlugin, WeaponType.PISTOLS), PROB_VERY_LOW),
(new CannotUseReward(basePlugin, WeaponType.RIFLES), PROB_VERY_LOW),
(new RandomTeleportReward(provider.GetService<IZoneManager>()),
PROB_VERY_LOW),
(new BombReward(bomb), PROB_VERY_LOW),

View File

@@ -17,7 +17,7 @@ public class SpecialDayFactory(IServiceProvider provider) : ISpecialDayFactory {
SDType.FFA => new FFADay(plugin, provider),
SDType.GUNGAME => new GunGameDay(plugin, provider),
SDType.HNS => new HideAndSeekDay(plugin, provider),
SDType.INFECTION => new InfectionDay(plugin, provider),
// SDType.INFECTION => new InfectionDay(plugin, provider),
SDType.NOSCOPE => new NoScopeDay(plugin, provider),
SDType.OITC => new OneInTheChamberDay(plugin, provider),
SDType.SPEEDRUN => new SpeedrunDay(plugin, provider),

View File

@@ -138,6 +138,9 @@ public class GunGameDay(BasePlugin plugin, IServiceProvider provider)
p.RemoveWeapons();
}
VirtualFunctions.CCSPlayer_ItemServices_CanAcquireFunc.Unhook(
OnCanAcquire, HookMode.Pre);
attacker.SetSpeed(2f);
attacker.RemoveWeapons();
attacker.GiveNamedItem("weapon_negev");

View File

@@ -783,11 +783,11 @@ public class SpeedrunDay(BasePlugin plugin, IServiceProvider provider)
return players switch {
<= 4 => 1,
<= 8 => 3,
<= 12 => 5,
<= 20 => 10,
<= 35 => 12,
<= 40 => 15,
<= 64 => 30,
<= 12 => 4,
<= 20 => 5,
<= 35 => 8,
<= 40 => 10,
<= 64 => 15,
_ => players / 5
};
}

View File

@@ -43,14 +43,14 @@ public static class SDTypeExtensions {
public static string?
CanCall(this SDType type, CCSPlayerController? executor) {
return type switch {
SDType.HNS or SDType.OITC or SDType.NOSCOPE =>
SDType.SPEEDRUN =>
AdminManager.PlayerHasPermissions(executor, "@ego/dssilver") ?
null :
$"You must be a {ChatColors.Green}Silver Supporter {ChatColors.Default}({ChatColors.LightBlue}https://edgm.rs/donate{ChatColors.Default}){ChatColors.Grey} to start this day.",
SDType.SPEEDRUN =>
AdminManager.PlayerHasPermissions(executor, "@ego/dsgold") ?
null :
$"You must be a {ChatColors.Gold}Gold Supporter {ChatColors.Default}({ChatColors.LightBlue}https://edgm.rs/donate{ChatColors.Default}){ChatColors.Grey} to start this day.",
// SDType.SPEEDRUN =>
// AdminManager.PlayerHasPermissions(executor, "@ego/dsgold") ?
// null :
// $"You must be a {ChatColors.Gold}Gold Supporter {ChatColors.Default}({ChatColors.LightBlue}https://edgm.rs/donate{ChatColors.Default}){ChatColors.Grey} to start this day.",
_ => null
};
}