Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions addons/sourcemod/configs/vsh/vsh.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
//
//List of possible filters
//- cond - Does client have cond id X
//- victimcond - Does the victim have cond id X, only meant for 'attackdamage', use 'cond' for 'takedamage'
//- activeweapon - Is client active weapon X
//- attackweapon - Is attacked weapon in slot X, only works on 'attackdamage' and 'takedamage'
//- aim - Is client aiming at boss
Expand Down Expand Up @@ -506,6 +507,26 @@
"desp" "Pain Train: {positive}5x capture rate, {negative}+10% damage vulnerability from all sources"
"attrib" "67 ; 1.0 ; 68 ; 4.0 ; 412 ; 1.1"
}

"415" //Reserve Shooter
{
"attackdamage"
{
"filter"
{
"victimcond" "81" // Blast jumping
}

// Scuffed way of dealing minicrits
"Tags_AddCond"
{
"cond" "78" // On-kill minicrit
"duration" "0.001"
}
}
}



// SCOUT

Expand Down Expand Up @@ -792,6 +813,24 @@
}
}

"127" //Direct Hit
{
"attackdamage"
{
"filter"
{
"victimcond" "81" // Blast jumping
}

// Scuffed way of dealing minicrits
"Tags_AddCond"
{
"cond" "78" // On-kill minicrit
"duration" "0.001"
}
}
}

"129" //Buff Banner
{
"desp" "Buff Banner: {positive}Barrage of minicrit rockets on use"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void BraveJump_OnButtonRelease(SaxtonHaleBase boss, int button)

SetEntProp(boss.iClient, Prop_Send, "m_bJumping", true);
SetEntityFlags(boss.iClient, GetEntityFlags(boss.iClient) & ~FL_ONGROUND);
TF2_AddCondition(boss.iClient, TFCond_BlastJumping);

float flCooldownTime = (boss.GetPropFloat("BraveJump", "Cooldown")*(float(boss.GetPropInt("BraveJump", "JumpCharge"))/float(boss.GetPropInt("BraveJump", "MaxJumpCharge"))));
if (flCooldownTime < boss.GetPropFloat("BraveJump", "MinCooldown"))
Expand Down
6 changes: 4 additions & 2 deletions addons/sourcemod/scripting/vsh/abilities/ability_dash_jump.sp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ public void DashJump_OnButtonPress(SaxtonHaleBase boss, int iButton)
vecVel[1] = Cosine(DegToRad(vecAng[0])) * Sine(DegToRad(vecAng[1])) * boss.GetPropFloat("DashJump", "MaxForce");
vecVel[2] = (((-vecAng[0]) * 1.5) + 90.0) * 3.0;

SetEntProp(boss.iClient, Prop_Send, "m_bJumping", true);

TeleportEntity(boss.iClient, NULL_VECTOR, NULL_VECTOR, vecVel);

SetEntProp(boss.iClient, Prop_Send, "m_bJumping", true);
SetEntityFlags(boss.iClient, GetEntityFlags(boss.iClient) & ~FL_ONGROUND);
TF2_AddCondition(boss.iClient, TFCond_BlastJumping);

g_flDashJumpCooldownWait[boss.iClient] += boss.GetPropFloat("DashJump", "Cooldown");
boss.CallFunction("UpdateHudInfo", 0.0, boss.GetPropFloat("DashJump", "Cooldown") * 2); //Update every frame for cooldown * 2

Expand Down
4 changes: 4 additions & 0 deletions addons/sourcemod/scripting/vsh/abilities/ability_lunge.sp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ public void Lunge_OnButtonPress(SaxtonHaleBase boss, int iButton)
vecVelocity[2] = 310.0;

TeleportEntity(boss.iClient, NULL_VECTOR, NULL_VECTOR, vecVelocity);

SetEntProp(boss.iClient, Prop_Send, "m_bJumping", true);
SetEntityFlags(boss.iClient, GetEntityFlags(boss.iClient) & ~FL_ONGROUND);
TF2_AddCondition(boss.iClient, TFCond_BlastJumping);
}
}

Expand Down
5 changes: 5 additions & 0 deletions addons/sourcemod/scripting/vsh/abilities/ability_wallclimb.sp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public Action WallClimb_OnAttackCritical(SaxtonHaleBase boss, int iWeapon, bool
vecVelocity[2] = boss.GetPropFloat("WallClimb", "MaxHeight");

TeleportEntity(iClient, NULL_VECTOR, NULL_VECTOR, vecVelocity);

SetEntProp(boss.iClient, Prop_Send, "m_bJumping", true);
SetEntityFlags(boss.iClient, GetEntityFlags(boss.iClient) & ~FL_ONGROUND);
TF2_AddCondition(boss.iClient, TFCond_BlastJumping);

return Plugin_Continue;
}

Expand Down
3 changes: 3 additions & 0 deletions addons/sourcemod/scripting/vsh/base_boss.sp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public void SaxtonHaleBoss_OnThink(SaxtonHaleBase boss)
bool bGlow = (boss.flGlowTime == -1.0 || boss.flGlowTime >= GetGameTime());
SetEntProp(boss.iClient, Prop_Send, "m_bGlowEnabled", bGlow);

if ((GetEntityFlags(boss.iClient) & FL_ONGROUND) && TF2_IsPlayerInCondition(boss.iClient, TFCond_BlastJumping))
TF2_RemoveCondition(boss.iClient, TFCond_BlastJumping);

//Dont modify his speed during setup time or when taunting
if (boss.flSpeed >= 0.0 && GameRules_GetRoundState() != RoundState_Preround && !TF2_IsPlayerInCondition(boss.iClient, TFCond_Taunting))
{
Expand Down
9 changes: 8 additions & 1 deletion addons/sourcemod/scripting/vsh/tags/tags_filter.sp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ enum TagsFilterType //List of possible filters
TagsFilterType_FeignDeath,
TagsFilterType_VictimUber,
TagsFilterType_SelfDamage,
TagsFilterType_VictimCond,
}

enum struct TagsFilterStruct
Expand All @@ -28,7 +29,7 @@ enum struct TagsFilterStruct

switch (this.nType)
{
case TagsFilterType_Cond, TagsFilterType_HitFromBehind, TagsFilterType_BackstabCount, TagsFilterType_DamageMaximum, TagsFilterType_DamageMinimum:
case TagsFilterType_Cond, TagsFilterType_HitFromBehind, TagsFilterType_BackstabCount, TagsFilterType_DamageMaximum, TagsFilterType_DamageMinimum, TagsFilterType_VictimCond:
{
//Get number from string
return !!StringToIntEx(sValue, this.nValue);
Expand Down Expand Up @@ -178,6 +179,11 @@ enum struct TagsFilterStruct
bool bSelf = (iVictim == iAttacker);
return (this.nValue ? bSelf : !bSelf);
}
case TagsFilterType_VictimCond:
{
int iVictim = tParams.GetInt("victim");
return TF2_IsPlayerInCondition(iVictim, this.nValue);
}
}

return false;
Expand Down Expand Up @@ -261,6 +267,7 @@ TagsFilterType TagsFilter_GetType(const char[] sTarget)
mFilterType.SetValue("feigndeath", TagsFilterType_FeignDeath);
mFilterType.SetValue("victimuber", TagsFilterType_VictimUber);
mFilterType.SetValue("selfdamage", TagsFilterType_SelfDamage);
mFilterType.SetValue("victimcond", TagsFilterType_VictimCond);
}

TagsFilterType nFilterType = TagsFilterType_Invalid;
Expand Down