//
// 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:
//      Raptor Script Object Class
//

#include "scripts/common.txt"

//-----------------------------------------------------------------------------
//
// Raptor
//
//-----------------------------------------------------------------------------

/*
==============================================================
TurokRaptor
==============================================================
*/

final class TurokRaptor : TurokEnemy
{
    TurokRaptor(kActor @actor)
    {
        super(actor);
    }
    
    /*
    ==============================================================
    FireRaptorMissile
    ==============================================================
    */
    
    void FireRaptorMissile(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        if(self.GetTarget() is null)
        {
            return;
        }
        
        self.SpawnFx("fx/generic_178.kfx", kVec3(x, y, z));
    }
    
    /*
    ==============================================================
    DeathSound
    ==============================================================
    */
    
    void DeathSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/raptor_death.ksnd");
    }
    
    /*
    ==============================================================
    InjurySound
    ==============================================================
    */
    
    void InjurySound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/raptor_injury.ksnd");
    }
    
    /*
    ==============================================================
    ViolentSound
    ==============================================================
    */
    
    void ViolentSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/raptor_violent_death.ksnd");
    }
}

//-----------------------------------------------------------------------------
//
// Dimetrodon
//
//-----------------------------------------------------------------------------

/*
==============================================================
TurokDimetrodon
==============================================================
*/

final class TurokDimetrodon : TurokEnemy
{
    TurokDimetrodon(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/dimetrodon_death.ksnd");
    }
    
    /*
    ==============================================================
    ViolentSound
    ==============================================================
    */
    
    void ViolentSound(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        self.PlaySound("sounds/shaders/dimetrodon_violent_death.ksnd");
    }
}
