Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jDaivid committed Feb 12, 2025
1 parent 4610ab5 commit 66bb5fc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,11 @@ methodmap Karlas < CClotBody

if((StrContains(data, "anger") != -1))
npc.Anger = true;

for (int entity = 0; entity < MAXENTITIES; entity++)
{
f_GlobalHitDetectionLogic[npc.index][entity] = 0.0;
}

return npc;
}
Expand Down Expand Up @@ -1272,8 +1277,8 @@ static void Projectile_Detect_Loop(DataPack pack)

Ruina_Laser_Logic Laser;
Laser.client = owner;
Laser.Damage = Modify_Damage(-1, 25.0);
Laser.Bonus_Damage = Modify_Damage(-1, 25.0) * 6.0;
Laser.Damage = Modify_Damage(-1, 17.0);
Laser.Bonus_Damage = Modify_Damage(-1, 17.0) * 6.0;
Laser.damagetype = DMG_PLASMA|DMG_PREVENT_PHYSICS_FORCE;
//Laser.Radius = radius;
Laser.End_Point = Vec_Points[1];
Expand All @@ -1285,7 +1290,7 @@ static void Projectile_Detect_Loop(DataPack pack)
DataPack pack2 = new DataPack();
pack2.WriteCell(EntIndexToEntRef(projectile));
float Throttle = 0.04; //0.025
int frames_offset = RoundToCeil(66.0*Throttle); //no need to call this every frame if avoidable
int frames_offset = RoundToCeil((66.0*TickrateModify)*Throttle); //no need to call this every frame if avoidable
if(frames_offset < 0)
frames_offset = 1;
RequestFrames(Projectile_Detect_Loop, frames_offset, pack2);
Expand All @@ -1294,10 +1299,6 @@ static void Projectile_Detect_Loop(DataPack pack)
}
static void On_LaserHit(int client, int target, int damagetype, float damage)
{
for (int entity = 0; entity < MAXENTITIES; entity++)
{
f_GlobalHitDetectionLogic[client][entity] = 0.0;
}
if(f_GlobalHitDetectionLogic[client][target] > GetGameTime())
return;

Expand Down Expand Up @@ -1416,35 +1417,18 @@ static void Karlas_Aggresive_Behavior(Karlas npc, int PrimaryThreatIndex, float
{
fl_karlas_sword_battery[npc.index] +=1.5;
}

if(IsValidClient(target))

//clause ae karlas knockback
if(!b_lostOVERDRIVE[npc.index])
{
float Bonus_damage = 1.0;
int weapon = GetEntPropEnt(target, Prop_Send, "m_hActiveWeapon");

if(IsValidEntity(weapon))
{
char classname[32];
GetEntityClassname(weapon, classname, 32);

int weapon_slot = TF2_GetClassnameSlot(classname);

if(weapon_slot != 2 || i_IsWandWeapon[weapon])
{
Bonus_damage = 1.5;
}
meleedmg *= Bonus_damage;
}
//clause ae karlas knockback
if(!b_lostOVERDRIVE[npc.index])
bool Silence = NpcStats_IsEnemySilenced(npc.index);
if(IsValidClient(target) && !Silence)
{
Custom_Knockback(npc.index, target, 900.0, true);
TF2_AddCondition(target, TFCond_LostFooting, 0.5);
TF2_AddCondition(target, TFCond_AirCurrent, 0.5);
}

Custom_Knockback(npc.index, target, Silence ? 560.0 : 900.0, true);
}

SDKHooks_TakeDamage(target, npc.index, npc.index, meleedmg, DMG_CLUB, -1, _, vecHit);
npc.PlayMeleeHitSound();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2354,12 +2354,14 @@ public Action Normal_Laser_Think(int iNPC) //A short burst of a laser.
return Plugin_Stop;
}

/*
//uncomment this and the other thing to reenable
bool update = false;
if(npc.m_flNorm_Attack_Throttle < GameTime)
{
npc.m_flNorm_Attack_Throttle = GameTime + 0.1;
update = true;
}
}*/

npc.m_bAllowBackWalking = true;

Expand Down Expand Up @@ -2418,16 +2420,20 @@ public Action Normal_Laser_Think(int iNPC) //A short burst of a laser.
npc.FaceTowards(vecTarget, Turn_Speed);
}

if(update)
//if(update)
{
float Dmg = Modify_Damage(-1, 15.0);
//extreme amounts of trolley
float Dmg = Modify_Damage(-1, 4.5);
Dmg *= (0.75-Logarithm(Ratio));
Dmg /= TickrateModify; //since the damage is dealt every tick, make it so the dmg is modified by tickrate modif.
//the 0.75 is min dmg it will reach at ability end.
Laser.Damage = Dmg;
Laser.Radius = radius;
Laser.Bonus_Damage = Dmg*6.0;
Laser.damagetype = DMG_PLASMA;
Laser.Deal_Damage();

//CPrintToChatAll("Damage: %f", Dmg);
}

float startPoint[3], endPoint[3];
Expand Down

0 comments on commit 66bb5fc

Please sign in to comment.