Skip to content

Commit

Permalink
added bison and basejumper buffs liberty launcher, fixed uber being g…
Browse files Browse the repository at this point in the history
…ranted for blood bandit
  • Loading branch information
higps committed Nov 1, 2023
1 parent 9c61d41 commit 0005d2b
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 8 deletions.
54 changes: 52 additions & 2 deletions berobot_dmg_handler.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ public Action Event_post_inventory_application(Event event, const char[] name, b

stat1 = 1.6;
TF2Attrib_SetByName(Weapon1, "clip size bonus", stat1);
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Liberty Launcher: {orange}+%0.0f%%%% clip size{teamcolor}",chat_display, MoreIsMore(stat1));
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Liberty Launcher: {orange}+%0.0f%%%% clip{teamcolor}",chat_display, MoreIsMore(stat1));

if (Weapon2 != -1)
{
Expand All @@ -1736,9 +1736,22 @@ public Action Event_post_inventory_application(Event event, const char[] name, b
TF2Attrib_SetByName(Weapon2, "clip size bonus", stat1);
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Liberty Launcher: {orange}+%0.0f%% Bonus Clip on Shotgun",chat_display, MoreIsMore(stat1));
}

if(IsBison(Weapon2))
{
stat1 = 0.65;
TF2Attrib_SetByName(Weapon2, "faster reload rate", stat1);
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Bison: {orange}+%0.0f%% faster reload",chat_display, LessIsMore(stat1));
}
if(IsBaseJumper(Weapon2))
{
stat1 = 25.0;
TF2Attrib_SetByName(Weapon2, "max health additive bonus", stat1);
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Base Jumper: {orange}+%0.0f%% max hp",chat_display, stat1);
}
}else
{
//Either mantreads or gunboats

}
}else
{
Expand Down Expand Up @@ -1770,6 +1783,7 @@ public Action Event_post_inventory_application(Event event, const char[] name, b
TF2Attrib_SetByName(Weapon1, "Blast radius increased", stat1);
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Rocket Launcher {orange}+%0.0f%%%% larger explosion radius",chat_display, MoreIsMore(stat1));
}

if (IsWearable(Weapon2))
{

Expand Down Expand Up @@ -1800,6 +1814,13 @@ public Action Event_post_inventory_application(Event event, const char[] name, b
}
}
}

if (isEqualizer(Weapon3))
{
stat1 = 20.0;
Format(chat_display, sizeof(chat_display), "%s{orange}\nEqualizer: %0.0f%%%% {teamcolor}increased rage build",chat_display, MoreIsMore(stat1));
TF2Attrib_SetByName(Weapon3, "mod rage on hit bonus", stat1);
}
}

if (HasFrontierJustice(client))
Expand Down Expand Up @@ -2451,6 +2472,21 @@ bool isLibertyLauncher(int weapon)
return false;
}

bool isEqualizer(int weapon)
{
if(weapon == -1 && weapon <= MaxClients) return false;

switch(GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"))
{
//If other Equalizer are added, add here
case 128:
{
return true;
}
}
return false;
}

bool IsAnyBanner(int weapon)
{
if(weapon == -1 && weapon <= MaxClients) return false;
Expand All @@ -2466,6 +2502,20 @@ bool IsAnyBanner(int weapon)
return false;
}

bool IsBison(int weapon)
{
if(weapon == -1 && weapon <= MaxClients) return false;

switch(GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"))
{
case 442:
{
return true;
}
}
return false;
}

bool IsRocketLauncher(int weapon)
{
if(weapon == -1 && weapon <= MaxClients) return false;
Expand Down
1 change: 0 additions & 1 deletion cfg/robots/paid_engineer_chatgpt_guardian.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"damage bonus" "1.25"
"clip size penalty" "1.6"
"killstreak tier" "1.0"
"mod sentry killed revenge" "1.0"
"engineer building teleporting pickup" "10.0"
"dmg penalty vs buildings" "0.5"
}
Expand Down
4 changes: 2 additions & 2 deletions cfg/robots/paid_healer_medic_blood_bandit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
{
"killstreak tier" "1.0"
"overheal penalty" "0.01"
"ubercharge rate penalty" "1.3"
"ubercharge rate penalty" "1.6"
"heal rate bonus" "2.0"
}
"custom_attributes_weapon"
{
"medigun charge is cond" "cond=94 duration=4.0"
"medigun charge is cond" "cond=94 duration=6.0"
}
}
}
Expand Down
11 changes: 8 additions & 3 deletions mm_attribute_medigun_is_cond.sp
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,20 @@ MRESReturn OnGetPlayerProvidedCharge(int client, Handle hReturn) {
if (IsUberchargeDeployed(activeWeapon) && IsGroupOverhealMedigun(activeWeapon, healprops)) {
DHookSetReturn(hReturn, -1);
// PrintToChatAll("Nothing %i", g_cond);
RequestFrame(testframe, client);
return MRES_Supercede;
}
return MRES_Ignored;
}

void testframe(int client){
// PrintToChatAll("Frame after");
int healtarget = getHealingTarget(client);
TF2_AddCondition(client, g_cond, g_duration);
if(IsClientInGame(healtarget))
{
TF2_AddCondition(healtarget, g_cond, g_duration);
}
return MRES_Supercede;
}
return MRES_Ignored;
}

bool IsUberchargeDeployed(int weapon) {
Expand Down

0 comments on commit 0005d2b

Please sign in to comment.