void throw(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as throw finisher
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
int SDir = getentityproperty(target,"direction");
int MDir;
if(Face==0){ // Same facing?
MDir = SDir;
}
if(Face==1){ // Opposite facing?
if(SDir==0){ // Facing left?
MDir = 1;
} else { MDir = 0;}
}
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
if(dir==0){ // Facing left?
x = -x;
}
if(Type==1)
{
damageentity(target, self, 1, 1, openborconstant("ATK_NORMAL")); // 1st throw type
}
if(Type==2)
{
damageentity(target, self, 1, 1, openborconstant("ATK_NORMAL9")); // 2nd throw type
}
if(Type==3)
{
damageentity(target, self, 1, 1, openborconstant("ATK_NORMAL2")); // 3rd throw type
}
if(Type==4)
{
damageentity(target, self, 1, 1, openborconstant("ATK_SHOCK")); // 4rd throw type
}
if(Type==5)
{
damageentity(target, self, 1, 1, openborconstant("ATK_NORMAL11")); // 5th throw type
}
if(Type==6)
{
damageentity(target, self, 1, 1, openborconstant("ATK_BURN")); // 5th throw type
}
changeentityproperty(target, "attacking", 1);
changeentityproperty(target, "damage_on_landing", Damage);
changeentityproperty(target, "projectile", 1);
changeentityproperty(target, "direction", MDir);
tossentity(target, y, x, z); // Toss opponent ;)
}
}