2006-02-24 04:48:15 +00:00
|
|
|
static FRandom pr_bruisattack ("BruisAttack");
|
|
|
|
|
|
|
|
|
2008-08-10 20:48:55 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(AActor, A_BruisAttack)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (!self->target)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (self->CheckMeleeRange ())
|
|
|
|
{
|
|
|
|
int damage = (pr_bruisattack()%8+1)*10;
|
|
|
|
S_Sound (self, CHAN_WEAPON, "baron/melee", 1, ATTN_NORM);
|
2013-01-02 04:39:59 +00:00
|
|
|
int newdam = P_DamageMobj (self->target, self, self, damage, NAME_Melee);
|
|
|
|
P_TraceBleed (newdam > 0 ? newdam : damage, self->target, self);
|
2006-02-24 04:48:15 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// launch a missile
|
2006-10-31 14:53:21 +00:00
|
|
|
P_SpawnMissile (self, self->target, PClass::FindClass("BaronBall"));
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|