Skip to content

Commit

Permalink
Balancing and Fixing [M][E]
Browse files Browse the repository at this point in the history
- Buffed max health of default bosses (+1 player)
- Buffed default forward jump velocity (0.0275% -> 0.275%)
- Buffed default teleport cooldown (30s -> 20s)
- Buffed default teleport delay (40s -> 30s)
- Buffed Epic Scout rage gain (-20n -> -30n)
- Added sound and particle argument to charge teleport
- Fixed default values for teleport velocity
- Added no collision effects to rage teleport
- Fixed Epic Scout not equipping cosmetics on creation
- Epic Scout stealing no longer requires melee or hitgroups
- Buffed Epic Scout health steal from enemy bosses (600 HP -> 1000 HP)
- Added ff2_game_streakdamage
- Fixed "ammo from damage" descriptions
Closes #121
Closes #124
Closes #146
Closes #153
Closes #162
  • Loading branch information
Batfoxkid committed Mar 19, 2024
1 parent d105cf1 commit a435098
Show file tree
Hide file tree
Showing 26 changed files with 212 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name_ru" "Христианский Брутальный Снайпер"
"class" "sniper"
"model" "models/player/saxton_hale/cbs_v6.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(253.6+n)*((n-1)^0.6127)+1444"
"maxspeed" "340"
"fversion" "2"
Expand All @@ -32,7 +32,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/configs/freak_fortress_2/demopan.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name_en" "Demopan"
"name_ru" "Дэмопан"
"class" "demoman"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(253.6+n)*((n-1)^0.6127)+1444"
"maxspeed" "270"
"fversion" "2"
Expand Down Expand Up @@ -53,7 +53,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "0.975 + (n * 0.000275)"
"forward" "0.975 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/configs/freak_fortress_2/easterbunny.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name" "Easter Bunny"
"class" "demoman"
"model" "models/player/saxton_hale/easter_demo.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(253.6+n)*((n-1)^0.6127)+1444"
"maxspeed" "340"
"sound_block_vo" "1"
Expand Down Expand Up @@ -32,7 +32,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.5)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
18 changes: 14 additions & 4 deletions addons/sourcemod/configs/freak_fortress_2/gentlespy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name" "GentleSpy"
"class" "spy"
"model" "models/freak_fortress_2/gentlespy/the_gentlespy_v3.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(333.7+n)*((n-1)^0.4657)+1900"
"maxspeed" "350"
"fversion" "2"
Expand All @@ -21,6 +21,19 @@
"attributes" "2 ; 4.4 ; 214 ; 0 ; 252 ; 0.6 ; 275 ; 1 ; 400 ; 1"
}

"special_mobility"
{
"slot" "1"
"options" "1"
"button" "11"
"cooldown" "9999.0"
"delay" "9999.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
}
"special_weighdown"
{
"slot" "2"
Expand Down Expand Up @@ -92,9 +105,6 @@
"friendly" "true"
"stun" "2.0"
"slowdown" "1.0"
"flags" "97"
"sound" "false"
"particle" ""

"plugin_name" "ff2r_default_abilities"
}
Expand Down
6 changes: 3 additions & 3 deletions addons/sourcemod/configs/freak_fortress_2/hhh_hale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name_ru" "Безголовый Безлошадный Всадник Мл."
"class" "demoman"
"model" "models/player/saxton_hale/hhh_jr_mk3.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(253.6+n)*((n-1)^0.6127)+1444"
"maxspeed" "330"
"sound_block_vo" "1"
Expand All @@ -30,8 +30,8 @@
"options" "2"
"button" "11"
"charge" "2.5"
"cooldown" "30.0"
"delay" "40.0"
"cooldown" "20.0"
"delay" "30.0"
"stun" "2.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/configs/freak_fortress_2/ninjaspy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"class" "spy"
"model" "models/freak_fortress_2/ninjaspy/ninjaspy_v2_2.mdl"
"lives" "3"
"health_formula" "((((760.8+n)*(n-1))^1.0341)+1089)/3"
"health_formula" "((((760.8+n)*(n-1))^1.0341)+2046)/3"
"ragedamage" "(185.6+n)*((n-1)^0.6127)+1790"
"maxspeed" "340"
"fversion" "2"
Expand All @@ -33,7 +33,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"
"stun" "2.25"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name" "Epic Scout"
"class" "scout"
"model" "models/freak_fortress_2/epic/scout.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)"
"ragedamage" "4020-(20*n)"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"ragedamage" "4030-(30*n)"
"maxspeed" "-1"
"fversion" "2"
"knockback" "2"
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/configs/freak_fortress_2/saxtonhale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name_ru" "Сакстон Хейл"
"class" "soldier"
"model" "models/player/saxton_hale_jungle_inferno/saxton_hale.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(253.6+n)*((n-1)^0.6127)+1444"
"maxspeed" "340"
"sound_block_vo" "1"
Expand Down Expand Up @@ -33,7 +33,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/configs/freak_fortress_2/seeldier.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/configs/freak_fortress_2/seeman.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/configs/freak_fortress_2/vagineer_hale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name_ru" "Вагинер"
"class" "engineer"
"model" "models/player/saxton_hale/vagineer_v151.mdl"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+1089"
"health_formula" "(((760.8+n)*(n-1))^1.0341)+2046"
"ragedamage" "(267.1+n)*((n-1)^0.7254)+1431"
"maxspeed" "340"
"sound_block_vo" "1"
Expand Down Expand Up @@ -33,7 +33,7 @@
"cooldown" "5.0"
"delay" "5.0"
"upward" "750 + (n * 3.25)"
"forward" "1.0 + (n * 0.000275)"
"forward" "1.0 + (n * 0.00275)"
"emergency" "2000.0"

"plugin_name" "ff2r_default_abilities"
Expand Down
6 changes: 6 additions & 0 deletions addons/sourcemod/gamedata/ff2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
"linux" "@_ZN9CTFPlayer12DropAmmoPackERK15CTakeDamageInfobb"
"windows" "\x55\x8B\xEC\x83\xEC\x28\x53\x8B\xD9\xC7\x45\xFC\x00\x00\x00\x00"
}
"CTFPlayer::GetMaxAmmo"
{
"library" "server"
"linux" "@_ZN9CTFPlayer10GetMaxAmmoEii"
"windows" "\x55\x8B\xEC\x8B\x45\x0C\x56\x57\x8B\xF9\x83\xF8\xFF\x75\x2A\xFF\xB7\x2A\x2A\x2A\x2A\xEB\x01\x50\xE8"
}
"CTFPlayer::PickupWeaponFromOther"
{
"library" "server"
Expand Down
112 changes: 58 additions & 54 deletions addons/sourcemod/scripting/ff2r_default_abilities.sp
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,13 @@
"cooldown" "5.0" // Cooldown after use
"delay" "5.0" // Delay before first use
"upward" "750 + (n * 3.25)" // Super Jump upward velocity set (n=0.0 ~ 100.0)
"forward" "1.0 + (n * 0.000275)" // Super Jump forward velocity multi (n=0.0 ~ 100.0)
"forward" "1.0 + (n * 0.00275)" // Super Jump forward velocity multi (n=0.0 ~ 100.0)
"emergency" "2000.0" // Super Jump upward velocity added when touching a hazard
"stun" "2.0" // Teleport stun duration
"flags" "97" // Teleport stun flags
"slowdown" "1.0" // Teleport stun slowdown
"sound" "false" // Teleport stun sound
"particle" "" // Teleport stun particle effect
"reset on attack" "false" // Reset charge on attack
"targets" "3" // Teleport targets (1=Teammates, 2=Enemies)
Expand Down Expand Up @@ -949,34 +951,7 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float

if(target != -1)
{
float stun = ability.GetFloat("stun", 2.0);

if(stun > 0.0)
{
int flags = ability.GetInt("flags", TF_STUNFLAGS_LOSERSTATE);
float slowdown = ability.GetFloat("slowdown", 1.0);

if(slowdown > 0.0)
TF2_RemoveCondition(client, TFCond_MegaHeal);

TF2_StunPlayer(client, stun, slowdown, flags);
SetEntPropFloat(client, Prop_Send, "m_flNextAttack", GetGameTime() + stun);

TF2_AddCondition(target, TFCond_UberchargedHidden, 0.2, client);

DataPack pack;
CreateDataTimer(stun, Timer_RestoreCollision, pack, TIMER_FLAG_NO_MAPCHANGE);
pack.WriteCell(GetClientUserId(client));
pack.WriteCell(GetEntProp(client, Prop_Send, "m_CollisionGroup"));

SetEntityCollisionGroup(client, 2);
}

GetEntPropVector(target, Prop_Send, "m_vecOrigin", pos1);

SetEntProp(client, Prop_Send, "m_bDucked", true);
SetEntityFlags(client, GetEntityFlags(client) | FL_DUCKING);
TeleportEntity(client, pos1, _, view_as<float>({0.0, 0.0, 0.0}));
Rage_TeleportToTarget(client, target, ability);

char buffer[8];
if(ability.GetString("slot", buffer, sizeof(buffer)))
Expand Down Expand Up @@ -1005,20 +980,24 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float

static char buffer[512];

ability.GetString("forward", buffer, sizeof(buffer), "750 + (n * 3.25)");
ability.GetString("forward", buffer, sizeof(buffer), "1.0 + (n * 0.00275)");
float velo = ParseFormula(buffer, power);
velocity[0] *= velo;
velocity[1] *= velo;

ability.GetString("upward", buffer, sizeof(buffer), "1.0 + (n * 0.000275)");
ability.GetString("upward", buffer, sizeof(buffer), "750 + (n * 3.25)");
velocity[2] = ParseFormula(buffer, power);

if(emergency)
velocity[2] += ability.GetFloat("emergency", 2000.0);

TeleportEntity(client, _, _, velocity);

SetEntProp(client, Prop_Send, "m_bJumping", true);
if (BlastJumpStateOffset != -1) {

if(BlastJumpStateOffset != -1)
SetEntData(client, BlastJumpStateOffset, TF_PLAYER_ENEMY_BLASTED_ME);
}

TF2_AddCondition(client, TFCond_BlastJumping, _, client);

if(ability.GetString("slot", buffer, sizeof(buffer)))
Expand Down Expand Up @@ -1074,9 +1053,10 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
button = ability.GetInt("button", 11);
SetHudTextParams(-1.0, 0.88, 0.1, 255, 255, 255, 255);

float charge = ability.GetFloat("charge", 1.5);

if(timeIn)
{
float charge = ability.GetFloat("charge", 1.5);
if(emergency || jump || charge < 999.9)
{
if(charge < 0.001)
Expand Down Expand Up @@ -1106,7 +1086,7 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
}
}
}
else if(button >= 0 && (jump || ability.GetFloat("charge", 1.5) < 999.9))
else if(button >= 0 && (jump || charge < 999.9))
{
char help[32];
FormatEx(help, sizeof(help), "Boss Mobility %d", button);
Expand Down Expand Up @@ -1500,24 +1480,7 @@ public void FF2R_OnAbility(int client, const char[] ability, AbilityData cfg)

if(victims)
{
int alive = GetTotalPlayersAlive(CvarFriendlyFire.BoolValue ? -1 : team1);
float stun = GetFormula(cfg, "stun", alive, 2.0);
if(stun > 0.0)
{
SetEntPropFloat(client, Prop_Send, "m_flNextAttack", GetGameTime() + stun);
TF2_StunPlayer(client, stun, GetFormula(cfg, "slowdown", alive, 0.0), cfg.GetInt("flags", TF_STUNFLAGS_LOSERSTATE), cfg.GetBool("sound") ? client : 0);

char particle[48];
if(cfg.GetString("particle", particle, sizeof(particle)))
AttachParticle(client, particle, stun);
}

float pos[3];
GetEntPropVector(victim[GetRandomInt(0, victims-1)], Prop_Send, "m_vecOrigin", pos);

SetEntProp(client, Prop_Send, "m_bDucked", true);
SetEntityFlags(client, GetEntityFlags(client) | FL_DUCKING);
TeleportEntity(client, pos);
Rage_TeleportToTarget(client, victim[GetRandomInt(0, victims-1)], cfg);
}
}
else if(!StrContains(ability, "rage_tradespam", false))
Expand Down Expand Up @@ -2719,7 +2682,9 @@ void SpawnCloneList(int[] clients, int &amount, int &cap, ConfigData cfg, int ow
TF2_RespawnPlayer(clients[i]);
SetEntProp(clients[i], Prop_Send, "m_bDucked", true);
SetEntityFlags(clients[i], GetEntityFlags(clients[i]) | FL_DUCKING);
if(!teleToSpawn) TeleportEntity(clients[i], pos, _, vel);

if(!teleToSpawn)
TeleportEntity(clients[i], pos, _, vel);

// Lessen the strength cap between active and AFK players
CloneIdle[clients[i]] = true;
Expand Down Expand Up @@ -2988,6 +2953,45 @@ public Action Hook_PickupDelay(int entity, int client)
return Plugin_Handled;
}

void Rage_TeleportToTarget(int client, int target, ConfigData cfg)
{
int alive = GetTotalPlayersAlive(CvarFriendlyFire.BoolValue ? -1 : GetClientTeam(client));
float stun = GetFormula(cfg, "stun", alive, 2.0);

if(stun > 0.0)
{
int flags = cfg.GetInt("flags", TF_STUNFLAGS_LOSERSTATE);
float slowdown = GetFormula(cfg, "slowdown", alive, 1.0);
bool sound = cfg.GetBool("sound");

if(slowdown > 0.0)
TF2_RemoveCondition(client, TFCond_MegaHeal);

TF2_StunPlayer(client, stun, slowdown, flags, sound ? client : 0);
SetEntPropFloat(client, Prop_Send, "m_flNextAttack", GetGameTime() + stun);

TF2_AddCondition(target, TFCond_UberchargedHidden, 0.2, client);

char particle[48];
if(cfg.GetString("particle", particle, sizeof(particle)))
AttachParticle(client, particle, stun);

DataPack pack;
CreateDataTimer(stun, Timer_RestoreCollision, pack, TIMER_FLAG_NO_MAPCHANGE);
pack.WriteCell(GetClientUserId(client));
pack.WriteCell(GetEntProp(client, Prop_Send, "m_CollisionGroup"));

SetEntityCollisionGroup(client, 2);
}

float pos[3];
GetEntPropVector(target, Prop_Send, "m_vecOrigin", pos);

SetEntProp(client, Prop_Send, "m_bDucked", true);
SetEntityFlags(client, GetEntityFlags(client) | FL_DUCKING);
TeleportEntity(client, pos, _, view_as<float>({0.0, 0.0, 0.0}));
}

public Action Timer_EnableBuilding(Handle timer, int ref)
{
int entity = EntRefToEntIndex(ref);
Expand Down
Loading

0 comments on commit a435098

Please sign in to comment.