Skip to content

Commit

Permalink
remove boss purchase message and remove some copy pasted code
Browse files Browse the repository at this point in the history
  • Loading branch information
higps committed Oct 4, 2023
1 parent ec95286 commit 9f7f5d4
Show file tree
Hide file tree
Showing 170 changed files with 307 additions and 3,860 deletions.
7 changes: 0 additions & 7 deletions Z_dont_compile_behomer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -224,28 +224,21 @@ MakeGiantSoldier(client)

int iHealth = 3800;

int MaxHealth = 200;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.75);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.4);
TF2Attrib_SetByName(client, "damage force reduction", 0.4);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.4);
TF2Attrib_SetByName(client, "airblast vertical vulnerability multiplier", 0.1);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);

//TF2Attrib_SetByName(client, "override footstep sound set", 3.0);

Expand Down
1 change: 1 addition & 0 deletions berobot_equipment.sp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <tf2attributes>
#include <tf2utils>
#include <tf2items>
#include <tf2>

#pragma newdecls required
#pragma semicolon 1
Expand Down
50 changes: 45 additions & 5 deletions berobot_factory.sp
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,51 @@ public any Native_IsSentryBuster(Handle plugin, int numParams)

public any Native_RoboSetHealth(Handle plugin, int numParams)
{
int client = GetNativeCell(1);
int NewHealth = GetNativeCell(2);
SetEntProp(client, Prop_Send, "m_iHealth", NewHealth, 1);
SetEntProp(client, Prop_Data, "m_iHealth", NewHealth, 1);
SetEntProp(client, Prop_Data, "m_iMaxHealth", NewHealth, 1);
int client = GetNativeCell(1);
TFClassType iClass = GetNativeCell(2);
int iHealth = GetNativeCell(3);
float OverHealRate = GetNativeCell(4);
int ClassHealth;

switch (iClass) {
case TFClass_Scout:
ClassHealth = 125;
case TFClass_Soldier:
ClassHealth = 200;
case TFClass_Pyro:
ClassHealth = 175;
case TFClass_DemoMan:
ClassHealth = 175;
case TFClass_Heavy:
ClassHealth = 300;
case TFClass_Engineer:
ClassHealth = 125;
case TFClass_Medic:
ClassHealth = 150;
case TFClass_Sniper:
ClassHealth = 125;
case TFClass_Spy:
ClassHealth = 125;
default:
ClassHealth = 100; // Default health if class is not recognized
}

//Set New health before doing the rest
SetEntProp(client, Prop_Send, "m_iHealth", iHealth, 1);
SetEntProp(client, Prop_Data, "m_iHealth", iHealth, 1);
SetEntProp(client, Prop_Data, "m_iMaxHealth", iHealth, 1);

//Calculate the overheal and health pickup penalty
int iAdditiveHP = iHealth - ClassHealth;
float OverHeal = float(ClassHealth) * OverHealRate;
float TotalHealthOverHeal = iHealth * OverHealRate;
float OverHealPenaltyRate = OverHeal / TotalHealthOverHeal;
TF2Attrib_SetByName(client, "patient overheal penalty", OverHealPenaltyRate);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));

float HealthPackPickUpRate = float(ClassHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);

}

// public Action Timer_SetDefenseBuff(Handle timer, any client)
Expand Down
16 changes: 8 additions & 8 deletions berobot_restrictions_team.sp
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,14 @@ void SetRestriciton(RobotCoins restriction, char robotName[NAMELENGTH], bool ena

OnRestrictionChanged(robotName);

char msg[256];
if (enable)
Format(msg, sizeof(msg), "Robot '%s' now available for purchase", robotName);
else
Format(msg, sizeof(msg), "Robot '%s' currently not affordable", robotName);

SMLogTag(SML_VERBOSE, msg);
MM_PrintToChatAll(msg);
// char msg[256];
// if (enable)
// Format(msg, sizeof(msg), "Robot '%s' now available for purchase", robotName);
// else
// Format(msg, sizeof(msg), "Robot '%s' currently not affordable", robotName);

// SMLogTag(SML_VERBOSE, msg);
// MM_PrintToChatAll(msg);
}

void GetRestrictions()
Expand Down
7 changes: 0 additions & 7 deletions boss_demoman_demopan.sp
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,9 @@ MakeSolar(client)
int iHealth = 7500;


int MaxHealth = 175;
// PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);
Expand All @@ -125,13 +122,9 @@ MakeSolar(client)

SetEntPropFloat(client, Prop_Send, "m_flModelScale", scale);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "move speed penalty", 0.85);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);

TF2Attrib_SetByName(client, "override footstep sound set", 4.0);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.4);
Expand Down
7 changes: 0 additions & 7 deletions boss_demoman_nuker.sp
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,9 @@ MakeSolar(client)
int iHealth = 5000;


int MaxHealth = 175;
// PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);
Expand All @@ -131,14 +128,10 @@ MakeSolar(client)

SetEntPropFloat(client, Prop_Send, "m_flModelScale", scale);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "move speed penalty", 0.5);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.3);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);

TF2Attrib_SetByName(client, "override footstep sound set", 4.0);

Expand Down
5 changes: 0 additions & 5 deletions boss_heavy_kommisarkrit.sp
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,9 @@ MakeBigBigJoey(client)
int iHealth = 7500;


int MaxHealth = 300;
// PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);
Expand All @@ -163,10 +160,8 @@ MakeBigBigJoey(client)
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.1);

TF2Attrib_SetByName(client, "aiming movespeed increased", 2.0);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);

TF2Attrib_SetByName(client, "health from healers reduced", 0.0);
TF2Attrib_SetByName(client, "health from packs decreased", 0.0);
Expand Down
7 changes: 0 additions & 7 deletions boss_pyro_skilltron.sp
Original file line number Diff line number Diff line change
Expand Up @@ -139,27 +139,20 @@ MakeGiantPyro(client)

int iHealth = 5000;

int MaxHealth = 175;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.75);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.5);
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.8);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);
//
TF2Attrib_SetByName(client, "health from healers reduced", 0.0);
// TF2Attrib_SetByName(client, "override footstep sound set", 6.0);
Expand Down
9 changes: 0 additions & 9 deletions boss_saxtron_h4l3.sp
Original file line number Diff line number Diff line change
Expand Up @@ -414,29 +414,20 @@ MakeGiantSoldier(client)

int iHealth = 2046+PlayerBonusHP;

int MaxHealth = 300;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
float OverHealRate = 1.5;

float OverHeal = float(MaxHealth) * OverHealRate;
float TotalHealthOverHeal = iHealth * OverHealRate;

float OverHealPenaltyRate = OverHeal / TotalHealthOverHeal;

float scale = 1.25;
TF2Attrib_SetByName(client, "patient overheal penalty", OverHealPenaltyRate);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", scale);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 1.5);
TF2Attrib_SetByName(client, "damage force reduction", 0.4);
//float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", 0.0);
//TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "healing received penalty", 0.0);
Expand Down
5 changes: 0 additions & 5 deletions boss_soldier_General_Crits.sp
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,17 @@ MakeGiantSoldier(client)
SetModel(client, GSOLDIER);

int iHealth = 5800;
int MaxHealth = 200;
int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", scale);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.5);
TF2Attrib_SetByName(client, "damage force reduction", 0.4);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.4);
TF2Attrib_SetByName(client, "airblast vertical vulnerability multiplier", 0.1);
TF2Attrib_SetByName(client, "health from packs decreased", 0.0);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);
TF2Attrib_SetByName(client, "healing received penalty", 0.0);
TF2Attrib_SetByName(client, "health from healers reduced", 0.0);
TF2Attrib_SetByName(client, "rage giving scale", 0.65);
Expand Down
15 changes: 3 additions & 12 deletions free_damage_flames_pyro_agro.sp
Original file line number Diff line number Diff line change
Expand Up @@ -129,29 +129,20 @@ MakeGiantPyro(client)
CreateTimer(0.0, Timer_Switch, client);
SetModel(client, GPYRO);

int iHealth = 3000;

int MaxHealth = 175;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
RoboSetHealth(client, TFClass_Pyro, 3000, 1.5);

// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.75);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.65);
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.8);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);

TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);

// TF2Attrib_SetByName(client, "override footstep sound set", 6.0);

Expand Down
8 changes: 1 addition & 7 deletions free_damage_flames_pyro_lister.sp
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,21 @@ MakeGiantPyro(client)

int iHealth = 3000;

int MaxHealth = 175;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);

// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.75);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.65);
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.8);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);
//
// TF2Attrib_SetByName(client, "override footstep sound set", 6.0);

Expand Down
7 changes: 0 additions & 7 deletions free_damage_flames_pyro_rocketman.sp
Original file line number Diff line number Diff line change
Expand Up @@ -126,27 +126,20 @@ MakeGiantPyro(client)

int iHealth = 3500;

int MaxHealth = 175;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);

// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.75);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.65);
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.8);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);

// TF2Attrib_SetByName(client, "override footstep sound set", 6.0);

Expand Down
7 changes: 0 additions & 7 deletions free_damage_flames_pyro_spitfire.sp
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,20 @@ MakeGiantPyro(client)

int iHealth = 2500;

int MaxHealth = 175;
//PrintToChatAll("MaxHealth %i", MaxHealth);

int iAdditiveHP = iHealth - MaxHealth;

TF2_SetHealth(client, iHealth);
// PrintToChatAll("iHealth %i", iHealth);
float scale = 1.65;
// PrintToChatAll("iAdditiveHP %i", iAdditiveHP);

SetEntPropFloat(client, Prop_Send, "m_flModelScale", scale);
SetEntProp(client, Prop_Send, "m_bIsMiniBoss", true);
TF2Attrib_SetByName(client, "max health additive bonus", float(iAdditiveHP));
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "move speed penalty", 0.65);
TF2Attrib_SetByName(client, "damage force reduction", 0.5);
TF2Attrib_SetByName(client, "airblast vulnerability multiplier", 0.5);
float HealthPackPickUpRate = float(MaxHealth) / float(iHealth);
TF2Attrib_SetByName(client, "health from packs decreased", HealthPackPickUpRate);
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);


//TF2Attrib_SetByName(client, "deploy time decreased", 1.0);
Expand Down
Loading

0 comments on commit 9f7f5d4

Please sign in to comment.