NicePack/sources/Perks/Enforcer/NiceEnforcerAbilitiesAdapter.uc

61 lines
2.0 KiB
Ucode

//==============================================================================
// NicePack / NiceSharpshooterAbilitiesAdapter
//==============================================================================
// Temporary stand-in for future functionality.
// Use this class to catch events from sharpshooter players' abilities.
//==============================================================================
// 'Nice pack' source
// Do whatever the fuck you want with it
// Author: dkanus
// E-mail: dkanus@gmail.com
//==============================================================================
class NiceEnforcerAbilitiesAdapter extends NiceAbilitiesAdapter;
static function AbilityActivated(
string abilityID,
NicePlayerController relatedPlayer)
{
local NiceHumanPawn nicePawn;
if (relatedPlayer == none) return;
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
if (nicePawn == none) return;
if (abilityID == "fullcounter")
{
nicePawn.invincibilityTimer += 2.0;
relatedPlayer.abilityManager.SetAbilityState(0, ASTATE_COOLDOWN);
}
if (abilityID == "juggernaut")
{
relatedPlayer.abilityManager.SetAbilityState(1, ASTATE_COOLDOWN);
relatedPlayer.ServerStartleZeds(
class'NiceSkillEnforcerJuggernautA'.default.distance,
class'NiceSkillEnforcerJuggernautA'.default.duration);
}
if (abilityID == "brute")
{
nicePawn.bruteTimer =
class'NiceSkillEnforcerBruteA'.default.abilityDuration;
nicePawn.quadDamageRemaining = class'NiceSkillEnforcerBruteA'.default.maximumDamageAdded;
}
}
static function ModAbilityCooldown( string abilityID,
NicePlayerController relatedPlayer,
out float cooldown)
{
local NiceHumanPawn nicePawn;
if (relatedPlayer == none) return;
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
if (nicePawn == none) return;
if (abilityID == "brute")
{
nicePawn.quadDamageRemaining = 0;
}
}
defaultproperties
{
}