This commit is contained in:
2025-06-05 01:12:55 +02:00
parent 17c654d889
commit 96596e9c08
39 changed files with 1157 additions and 1350 deletions
+5 -8
View File
@@ -1,25 +1,24 @@
using CustomPlayerEffects;
using LabApi.Events.Arguments.Scp0492Events;
using LabApi.Events.Handlers;
using LabApi.Features;
using LabApi.Loader.Features.Plugins;
using InventorySystem.Items.Usables.Scp330;
using LabApi.Events.Arguments.PlayerEvents;
using LabApi.Events.Arguments.Scp0492Events;
using LabApi.Events.Arguments.ServerEvents;
using LabApi.Events.Handlers;
using LabApi.Features;
using LabApi.Features.Wrappers;
using LabApi.Loader.Features.Plugins;
namespace GrowingZombies;
public class GrowingZombies : Plugin
{
private readonly Dictionary<Player, int> _zombieCorpseCount = new();
public override string Name => "GrowingZombies";
public override string Author => "Code002Lover";
public override Version Version { get; } = new(1, 0, 0);
public override string Description => "Makes zombies grow stronger as they eat more";
public override Version RequiredApiVersion { get; } = new(LabApiProperties.CompiledVersion);
private readonly Dictionary<Player, int> _zombieCorpseCount = new();
public override void Enable()
{
Scp0492Events.ConsumedCorpse += OnZombieEat;
@@ -65,9 +64,7 @@ public class GrowingZombies : Plugin
// Add damage resistance after eating multiple corpses
var damageResistance = (byte)Math.Min(0.5 - corpsesEaten * 0.5f, 2f);
if (corpsesEaten >= 3)
{
ev.Player.ReferenceHub.playerEffectsController.ChangeState<DamageReduction>(damageResistance, 20);
}
// Add regeneration effect after eating multiple corpses
if (corpsesEaten < 5) return;