There is a cooldown to prevent bash stacking:
Code:
//Will only trigger from things not listed below
if(!StrEqual(weapon,"hegrenade",false))
{
//abilities below
//Bash
new skill_level=skill_level_bash[attacker];
if(skill_level>0 && Math_GetRandomFloat(0.0, 1.0) <= BashChance[skill_level])
{
//Bash can only occur if target is not already bashed
if(BashTimer[victim] == INVALID_HANDLE)
{
//Slow client and start timer
War3_SetBuff( victim, fSlow, thisRaceID, 0.00000001 );
BashTimer[victim] = CreateTimer(1.0,expire_slow,victim);
//effect
new Float:Position[3];
GetClientAbsOrigin(victim, Position);
est_Effect11(SpawnSprite, Position, 1.0, 2.3, 90);
TE_SendToAll();
CPrintToChat(attacker, "{gold}Bashed enemy");
CPrintToChat(victim, "{gold}You got bashed");
}
}
}
}
}
//Remove slow after time
public Action:expire_slow(Handle:timer,any:victim)
{
//Code to run when timer ends
BashTimer[victim] = INVALID_HANDLE;
//Return cleint to normal speed
if(Client_IsValid(victim))
{
War3_SetBuff( victim, fSlow, thisRaceID, 1.0 );
}
}