Changes by code002lover
Blood Fueled Additions -HoherGeist
This commit is contained in:
parent
2f483ca113
commit
6810309b46
@ -1,5 +1,7 @@
|
|||||||
|
using LabApi.Events.Handlers;
|
||||||
using LabApi.Features.Wrappers;
|
using LabApi.Features.Wrappers;
|
||||||
using PlayerRoles.FirstPersonControl;
|
using PlayerRoles.FirstPersonControl;
|
||||||
|
using PlayerRoles.PlayableScps.Scp939;
|
||||||
using Logger = LabApi.Features.Console.Logger;
|
using Logger = LabApi.Features.Console.Logger;
|
||||||
using Random = System.Random;
|
using Random = System.Random;
|
||||||
|
|
||||||
@ -36,7 +38,21 @@ public class BloodFueledManager
|
|||||||
public BloodFueledManager(CustomClasses plugin)
|
public BloodFueledManager(CustomClasses plugin)
|
||||||
{
|
{
|
||||||
_plugin = plugin;
|
_plugin = plugin;
|
||||||
|
PlayerEvents.Hurt += ev =>
|
||||||
|
{
|
||||||
|
if (ev.DamageHandler is not Scp939DamageHandler damageHandler) return;
|
||||||
|
var attacker = Player.Get(damageHandler.Attacker.Hub);
|
||||||
|
if (attacker == null) return;
|
||||||
|
if (!IsBloodFueled(attacker)) return;
|
||||||
|
|
||||||
|
if (ev.Player.Health <= 0)
|
||||||
|
{
|
||||||
|
attacker.StaminaRemaining += 0.2f;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
attacker.StaminaRemaining += 0.1f;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ public sealed class CustomClasses : Plugin
|
|||||||
public readonly CustomClassManager ClassManager = new();
|
public readonly CustomClassManager ClassManager = new();
|
||||||
public SerpentsHandManager SerpentsHandManager;
|
public SerpentsHandManager SerpentsHandManager;
|
||||||
public NegromancerManager NegromancerManager;
|
public NegromancerManager NegromancerManager;
|
||||||
|
public BloodFueledManager BloodFueledManager;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override string Name => "CustomClasses";
|
public override string Name => "CustomClasses";
|
||||||
@ -159,6 +160,7 @@ public sealed class CustomClasses : Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
NegromancerManager = new NegromancerManager(this);
|
NegromancerManager = new NegromancerManager(this);
|
||||||
|
BloodFueledManager = new BloodFueledManager(this);
|
||||||
|
|
||||||
Instance = this;
|
Instance = this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user