//
// Copyright(C) 2014-2015 Samuel Villarreal
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// DESCRIPTION:
//      Alien Script Object Class
//

#include "scripts/common.txt"

//-----------------------------------------------------------------------------
//
// Alien
//
//-----------------------------------------------------------------------------

/*
==============================================================
TurokAlien
==============================================================
*/

final class TurokAlien : TurokEnemy
{
    TurokAlien(kActor @actor)
    {
        super(actor);
    }
    
    /*
    ==============================================================
    GunFire
    ==============================================================
    */
    
    void GunFire(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        if(self.GetTarget() is null)
        {
            return;
        }
        
        self.PlaySound("sounds/shaders/tek_weapon_1.ksnd");
        
        self.SpawnProjectile("fx/enemy_plasma1.kfx", kVec3(x, y, z),
            self.GetTarget().Origin(), Math::Deg2Rad(45.0f));
    }
    
    /*
    ==============================================================
    DeathSound
    ==============================================================
    */
    
    void DeathSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/alien_death.ksnd");
    }
    
    /*
    ==============================================================
    ViolentSound
    ==============================================================
    */
    
    void ViolentSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/alien_violent_death.ksnd");
    }
}

//-----------------------------------------------------------------------------
//
// TurokStalker
//
//-----------------------------------------------------------------------------

/*
==============================================================
TurokStalker
==============================================================
*/

final class TurokStalker : TurokEnemy
{
    TurokStalker(kActor @actor)
    {
        super(actor);
    }
    
    /*
    ==============================================================
    DeathSound
    ==============================================================
    */
    
    void DeathSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/leaper_death.ksnd");
    }
    
    /*
    ==============================================================
    InjurySound
    ==============================================================
    */
    
    void InjurySound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/leaper_injury.ksnd");
    }
    
    /*
    ==============================================================
    ViolentSound
    ==============================================================
    */
    
    void ViolentSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/leaper_violent_death.ksnd");
    }
}
