Skip to content

Commit

Permalink
And the one passive
Browse files Browse the repository at this point in the history
  • Loading branch information
Batfoxkid committed Nov 19, 2024
1 parent b2d9762 commit 7d9f3db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public void GroundPound_Create(SaxtonHaleBase boss)

boss.SetPropFloat("GroundPound", "StartTimer", 2.8);
boss.SetPropFloat("GroundPound", "GravityMultiplier", 8.0);
boss.SetPropFloat("GroundPound", "JumpCooldown", 5.0);

boss.SetPropFloat("GroundPound", "ImpactPush", 500.0);
boss.SetPropFloat("GroundPound", "ImpactVelocity", 750.0);
Expand Down Expand Up @@ -100,15 +101,17 @@ public void GroundPound_OnButton(SaxtonHaleBase boss, int &buttons)
g_flClientBossWeighDownTimer[boss.iClient] = 0.0;
SetEntityGravity(boss.iClient, GetEntityGravity(boss.iClient) * boss.GetPropFloat("GroundPound", "GravityMultiplier"));
TF2_AddCondition(boss.iClient, TFCond_SpeedBuffAlly, TFCondDuration_Infinite);

float flJumpCooldown = boss.GetPropFloat("GroundPound", "JumpCooldown");

// Add brave jump cooldown to it
if (boss.HasClass("BraveJump"))
if (flJumpCooldown > 0.0 && boss.HasClass("BraveJump"))
{
float flCooldownWait = boss.GetPropFloat("BraveJump", "CooldownWait");
if (flCooldownWait)
{
boss.SetPropFloat("BraveJump", "CooldownWait", flCooldownWait + 5.0);
boss.CallFunction("UpdateHudInfo", 1.0, flCooldownWait + 5.0); //Update every second for cooldown duration
boss.SetPropFloat("BraveJump", "CooldownWait", flCooldownWait + flJumpCooldown);
boss.CallFunction("UpdateHudInfo", 1.0, flCooldownWait + flJumpCooldown); //Update every second for cooldown duration
}
}
}
Expand Down
11 changes: 7 additions & 4 deletions addons/sourcemod/scripting/vsh/bosses/boss_yeti.sp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ static char g_strYetiFootsteps[][] = {
public void Yeti_Create(SaxtonHaleBase boss)
{
boss.CreateClass("BraveJump");
boss.CreateClass("GroundPound");
boss.CreateClass("RageMeteor");

boss.SetPropFloat("GroundPound", "JumpCooldown", 0.0);

boss.iHealthPerPlayer = 650;
boss.flHealthExponential = 1.05;
Expand All @@ -63,7 +66,7 @@ public void Yeti_GetBossInfo(SaxtonHaleBase boss, char[] sInfo, int length)
StrCat(sInfo, length, "\nHealth: Medium");
StrCat(sInfo, length, "\n ");
StrCat(sInfo, length, "\nAbilities");
StrCat(sInfo, length, "\n- Brave Jump");
StrCat(sInfo, length, "\n- Brave Jump (Not Reduced by Ground Pound)");
StrCat(sInfo, length, "\n ");
StrCat(sInfo, length, "\nRage");
StrCat(sInfo, length, "\n- Damage requirement: 2500");
Expand Down Expand Up @@ -104,15 +107,15 @@ public void Yeti_OnRage(SaxtonHaleBase boss)

public void Yeti_OnPlayerKilled(SaxtonHaleBase boss, Event event, int iVictim)
{
KillIconShared(boss, event, true);
KillIconShared(event, true);
}

public void Yeti_OnDestroyObject(SaxtonHaleBase boss, Event event)
{
KillIconShared(boss, event, false);
KillIconShared(event, false);
}

static void KillIconShared(SaxtonHaleBase boss, Event event, bool bLog)
static void KillIconShared(Event event, bool bLog)
{
int iWeaponId = event.GetInt("weaponid");

Expand Down

0 comments on commit 7d9f3db

Please sign in to comment.