diff --git a/ability_free_tank_heavy_terminator_ability.sp b/ability_free_tank_heavy_terminator_ability.sp index cb8809aa..6982acd1 100644 --- a/ability_free_tank_heavy_terminator_ability.sp +++ b/ability_free_tank_heavy_terminator_ability.sp @@ -20,16 +20,14 @@ #define TARGET_FOUND "ui/cyoa_objective_panel_expand.wav" #define TARGET_TERMINATED "ui/cyoa_map_open.wav.wav" #define TARGET_CANCEL "ui/cyoa_map_close.wav" -float scale = 1.15; - enum { -target_valid, -target_in_spawn, -target_no_valid_target, -target_lost, -target_terminated, -target_cancelled + target_valid, + target_in_spawn, + target_no_valid_target, + target_lost, + target_terminated, + target_cancelled } public OnMapStart() { @@ -82,7 +80,7 @@ int g_previous_target = -2; bool g_isTerminator = false; float gametime = -1.0; float gametime_retarget = -1.0; - +int g_the_terminator = -1; public FindTerminator() { @@ -91,6 +89,7 @@ public FindTerminator() { // PrintToChatAll("Terminator was %N", i); g_isTerminator = true; + g_the_terminator = i; return i; } } @@ -111,7 +110,7 @@ void FindTerminationTarget(){ //Only do this check if there is a terminator - if (g_isTerminator) + if (g_isTerminator) { //Find the Terminator target TFTeam clientTeam = TF2_GetClientTeam(client); @@ -141,10 +140,14 @@ void FindTerminationTarget(){ if (IsValidEntity(g_iGlowEnt[client])) { RemoveEntity(g_iGlowEnt[client]); } - + // PrintToChatAll("Applying glow to %N", randomPlayer); g_iGlowEnt[client] = EntIndexToEntRef(TF2_AttachBasicGlow(randomPlayer)); g_target = randomPlayer; - if (IsValidClient(g_iGlowEnt[client])) SDKHook(g_iGlowEnt[client], SDKHook_SetTransmit, OnGlowShouldTransmit); + if (IsValidEntity(g_iGlowEnt[client])) + { + // PrintToChatAll("Hooking onglow for %N", g_iGlowEnt[client]); + SDKHook(g_iGlowEnt[client], SDKHook_SetTransmit, OnGlowShouldTransmit); + } g_flTagEndTime[client] = GetGameTime() + flDuration; gametime = -1.0; } @@ -217,19 +220,26 @@ void TerminatorHeal(int client) Action OnGlowShouldTransmit(int glow, int client) { int glowTarget = GetEntPropEnt(glow, Prop_Data, "m_hParent"); - if (!g_isTerminator || g_targetstatus != target_valid) return Plugin_Stop; - if (!IsValidEntity(glowTarget)) { - return Plugin_Stop; - } - - + // PrintToChatAll("Glow %N", glowTarget); + // PrintToChatAll("Glow team %i",TF2_GetClientTeam(glowTarget)); + // PrintToChatAll("Terminatorteam team %i",TF2_GetClientTeam(FindTerminator())); if (!TF2_IsEnemyTeam(TF2_GetClientTeam(glowTarget), TF2_GetClientTeam(client))) { // prevent showing outline on teammates // TODO make this more robust for teamcounts larger than 2 -- // we'd need to track the attacker return Plugin_Stop; } + + if (!g_isTerminator || g_targetstatus != target_valid) return Plugin_Stop; + + if (!IsValidEntity(glowTarget)) { + return Plugin_Stop; + } + + + + return Plugin_Continue; } diff --git a/berobot_dmg_handler.sp b/berobot_dmg_handler.sp index e2833e9b..b31f2824 100644 --- a/berobot_dmg_handler.sp +++ b/berobot_dmg_handler.sp @@ -1356,21 +1356,24 @@ public Action Event_post_inventory_application(Event event, const char[] name, b TF2Attrib_RemoveByName(Weapon3, "fire rate bonus"); stat1 = 0.70; + stat2 = 0.2; if (Weapon1 != -1) { TF2Attrib_SetByName(Weapon1, "Reload time decreased", stat1); // SetDemoDamageBuff(Weapon1); + TF2Attrib_SetByName(Weapon1, "dmg falloff decreased", stat2); } if (Weapon2 != -1) { TF2Attrib_SetByName(Weapon2, "Reload time decreased", stat1); + TF2Attrib_SetByName(Weapon2, "dmg falloff decreased", stat2); // SetDemoDamageBuff(Weapon2); } stat1 = 1.0-stat1; - Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Demoman: All of projectile weapons {orange}Reload %0.0f%%%% faster\n{teamcolor}Melee weapons {orange}more damage{teamcolor} the more damage you do",chat_display, OneIs100(stat1)); + Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Demoman: All of projectile weapons {orange}Reload %0.0f%%%% faster. +%0.0f%%%% splash damage bonus\n{teamcolor}Melee weapons {orange}more damage{teamcolor} the more damage you do",chat_display, OneIs100(stat1), MoreIsMore(stat2)); } if (Weapon3 != -1) @@ -1937,8 +1940,13 @@ public Action Event_post_inventory_application(Event event, const char[] name, b if (IsAirStrike(Weapon1)) { stat1 = 16.0; + stat2 = 0.15; + stat3 = 2.0; TF2Attrib_SetByName(Weapon1, "clipsize increase on kill",stat1); - Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}AirStrike: {orange}Gains additional clip{teamcolor} by doing %i damage to robots, {orange}+%0.0f extra max bonus clip on kill", chat_display, RoundToNearest(g_AirStrikeDMGRequirement), stat1); + TF2Attrib_SetByName(Weapon1, "rocketjump attackrate bonus",stat2); + TF2Attrib_SetByName(Weapon1, "maxammo primary increased",stat3); + + Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}AirStrike: {orange}Gains additional clip{teamcolor} by doing %i damage to robots, {orange}+%0.0f extra max bonus clip on kill. %0.0f%%%% faster firing speed while rocket jumping. +%0.0f%%%% max ammo bonus", chat_display, RoundToNearest(g_AirStrikeDMGRequirement), stat1, LessIsMore(stat2), OneIs100(stat2)); } if (IsBlackBox(Weapon1)) { @@ -1953,24 +1961,26 @@ public Action Event_post_inventory_application(Event event, const char[] name, b TF2Attrib_SetByName(Weapon1, "clip size upgrade atomic", stat1); Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Beggars Bazooka: {orange}+%0.0f clip size",chat_display, stat1); } - if (IsAnyRocketLauncher(Weapon1)) - { - stat1 = 0.8; - TF2Attrib_SetByName(Weapon1, "Reload time decreased", stat1); - Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Primary {orange}+%0.0f%%%% faster reload",chat_display, LessIsMore(stat1)); - } - if (IsRocketLauncher(Weapon1)) { stat1 = 1.5; 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 (IsAnyRocketLauncher(Weapon1)) + { + stat1 = 0.7; + stat2 = 0.15; + TF2Attrib_SetByName(Weapon1, "Reload time decreased", stat1); + TF2Attrib_SetByName(Weapon1, "dmg falloff decreased", stat2); + Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Primary {orange}+%0.0f%%%% faster reload. +%0.0f%%%% splash damage bonus",chat_display, LessIsMore(stat1), MoreIsMore(stat2)); + } if (IsEqualizer(Weapon3)) { stat1 = 20.0; TF2Attrib_SetByName(Weapon3, "mod rage on hit bonus", stat1); - Format(chat_display, sizeof(chat_display), "%s{orange}\nEqualizer: %0.0f%%%%{teamcolor} increased rage build",chat_display, MoreIsMore(stat1)); + + Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Equalizer: %0.0f%%%%{teamcolor} increased rage build",chat_display, MoreIsMore(stat1)); } if (IsMarketGardner(Weapon3)) diff --git a/berobot_handler.sp b/berobot_handler.sp index 189ce3df..916b0f04 100644 --- a/berobot_handler.sp +++ b/berobot_handler.sp @@ -2227,7 +2227,7 @@ int Native_EnsureRobotCount(Handle plugin, int numParams) if (g_f_Damage_Bonus == -1.0 && (g_b_changed_dmg || !g_b_broadcast_msg)) { // PrintCenterTextAll("Alert: Robot Power Restored\nRobots take normal damage"); - MC_PrintToChatAll("{magenta}Alert: Robot Power Restored\nRobots take normal damage"); + MC_PrintToChatAll("{magenta}Alert: Balance Restored\nRobots take normal damage"); g_b_broadcast_msg = true; } @@ -2237,7 +2237,7 @@ int Native_EnsureRobotCount(Handle plugin, int numParams) { char word[5]; // Assuming "more" or "less" won't exceed 4 characters GetDamageWord(word, sizeof(word)); - MC_PrintToChatAll("{magenta}Alert: Low Power!\nRobots take {orange}%.0f %% %s {magenta}damage!", (g_f_Damage_Bonus-1.0)*100,word); + MC_PrintToChatAll("{magenta}Alert: Player Imbalance detected\nRobots take {orange}%.0f %% %s {magenta}damage!", (g_f_Damage_Bonus-1.0)*100,word); // PrintCenterTextAll("Alert: Low Power!\nRobots take %.0f %% %s damage!", (g_f_Damage_Bonus-1.0)*100,word); g_b_broadcast_msg = true; } @@ -2259,7 +2259,7 @@ int Native_EnsureRobotCount(Handle plugin, int numParams) { char word[5]; // Assuming "more" or "less" won't exceed 4 characters GetDamageWord(word, sizeof(word)); - MC_PrintToChatAll("{magenta}Alert: High Power!\nRobots take {orange}%.0f %% %s {magenta}damage!", (g_f_Damage_Bonus-1.0)*100,word); + MC_PrintToChatAll("{magenta}Alert: Player Imbalance detected!\nRobots take {orange}%.0f %% %s {magenta}damage!", (g_f_Damage_Bonus-1.0)*100,word); // PrintCenterTextAll("Alert: High Power!\nRobots take %.0f %% %s damage!", (g_f_Damage_Bonus-1.0)*100, word); g_b_broadcast_msg = true; } @@ -2277,7 +2277,7 @@ int Native_EnsureRobotCount(Handle plugin, int numParams) { char word[5]; // Assuming "more" or "less" won't exceed 4 characters GetDamageWord(word, sizeof(word)); - MC_PrintToChatAll("{magenta}Low Power!\nRobots take {orange}%.0f %% %s {magenta}damage!", (g_f_Damage_Bonus-1.0)*100,word); + MC_PrintToChatAll("{magenta}Player Imbalance detected!\nRobots take {orange}%.0f %% %s {magenta}damage!", (g_f_Damage_Bonus-1.0)*100,word); // PrintCenterTextAll("Alert: Low Power!\nRobots take %.0f %% %s damage!", (g_f_Damage_Bonus-1.0)*100, word); g_b_broadcast_msg = true; } diff --git a/cfg/robots/boss_heavy_kommisarkrit.cfg b/cfg/robots/boss_heavy_kommisarkrit.cfg index 73efeb0d..40323716 100644 --- a/cfg/robots/boss_heavy_kommisarkrit.cfg +++ b/cfg/robots/boss_heavy_kommisarkrit.cfg @@ -12,7 +12,7 @@ "scale" "1.75" "health_bonus_per_player" "100" "boss_cost" "1" - "rc_cost" "75.0" + "rc_cost" "50.0" "difficulty" "2" "sounds" { diff --git a/cfg/robots/boss_pyro_skilltron.cfg b/cfg/robots/boss_pyro_skilltron.cfg index 3d57cb4f..bd741549 100644 --- a/cfg/robots/boss_pyro_skilltron.cfg +++ b/cfg/robots/boss_pyro_skilltron.cfg @@ -12,7 +12,7 @@ "scale" "1.75" "health_bonus_per_player" "100" "boss_cost" "1" - "rc_cost" "30.0" + "rc_cost" "35.0" "difficulty" "2" "sounds" { diff --git a/cfg/robots/boss_soldier_General_Crits.cfg b/cfg/robots/boss_soldier_General_Crits.cfg index 2cf09cd8..93ee9bf7 100644 --- a/cfg/robots/boss_soldier_General_Crits.cfg +++ b/cfg/robots/boss_soldier_General_Crits.cfg @@ -11,7 +11,7 @@ "health" "5800" "health_bonus_per_player" "75" "boss_cost" "1" - "rc_cost" "70.0" + "rc_cost" "50.0" "difficulty" "2" "sounds" { diff --git a/cfg/robots/boss_soldier_saxtron_hale.cfg b/cfg/robots/boss_soldier_saxtron_hale.cfg index 55abc859..b9288e48 100644 --- a/cfg/robots/boss_soldier_saxtron_hale.cfg +++ b/cfg/robots/boss_soldier_saxtron_hale.cfg @@ -11,7 +11,7 @@ "health" "2046" "health_bonus_per_player" "250" "boss_cost" "1" - "rc_cost" "50.0" + "rc_cost" "40.0" "difficulty" "2" "scale" "1.5" "sounds" diff --git a/cfg/robots/free_sniper_jbird.cfg b/cfg/robots/free_sniper_jbird.cfg index 6dc3cfe2..c0fbabd1 100644 --- a/cfg/robots/free_sniper_jbird.cfg +++ b/cfg/robots/free_sniper_jbird.cfg @@ -27,7 +27,6 @@ "ammo regen" "100.0" "head scale" "0.8" "rage giving scale" "0.75" - "health regen" "10.0" } "remove_weapon_slots" { diff --git a/cfg/robots/free_sniper_skeeter.cfg b/cfg/robots/free_sniper_skeeter.cfg index dcb4b211..5f5d25e2 100644 --- a/cfg/robots/free_sniper_skeeter.cfg +++ b/cfg/robots/free_sniper_skeeter.cfg @@ -57,7 +57,6 @@ "lunchbox adds minicrits" "3.0" "apply z velocity on damage" "550.0" "faster reload rate" "0.35" - "heal on hit for rapidfire" "25.0" } } "tf_weapon_smg" diff --git a/cfg/robots/free_tank_heavy_terminator.cfg b/cfg/robots/free_tank_heavy_terminator.cfg index 6c9b6daf..6b911a11 100644 --- a/cfg/robots/free_tank_heavy_terminator.cfg +++ b/cfg/robots/free_tank_heavy_terminator.cfg @@ -8,7 +8,7 @@ "role" "Tank" "subclass" "Tank" "tips" "HiNet: Terminate your target" - "health" "1100" + "health" "1500" "health_bonus_per_player" "75" "difficulty" "2" "scale" "1.15"