1031 lines
33 KiB
C++
1031 lines
33 KiB
C++
|
/*
|
||
|
==============================================================================
|
||
|
|
||
|
Boss Form 1
|
||
|
coded by Michael Rogers a.k.a Xsniper
|
||
|
http://xsniper.virtualave.net/
|
||
|
|
||
|
==============================================================================
|
||
|
*/
|
||
|
|
||
|
$cd /models/enemies
|
||
|
$origin 0 0 32
|
||
|
$base base
|
||
|
$skin base
|
||
|
|
||
|
$frame ataka01 ataka02 ataka03 ataka04 ataka05 ataka06 ataka07 ataka08 ataka09 ataka10
|
||
|
$frame ataka11 ataka12
|
||
|
|
||
|
$frame atakb01 atakb02 atakb03 atakb04 atakb05 atakb06 atakb07 atakb08 atakb09 atakb10
|
||
|
|
||
|
$frame atakc01 atakc02 atakc03 atakc04 atakc05 atakc06 atakc07 atakc08 atakc09 atakc10
|
||
|
$frame atakc11 atakc12
|
||
|
|
||
|
$frame block01
|
||
|
|
||
|
$frame cataka01 cataka02 cataka03 cataka04 cataka05 cataka06 cataka07 cataka08 cataka09 cataka10
|
||
|
$frame cataka11 cataka12
|
||
|
|
||
|
$frame catakb01 catakb02 catakb03 catakb04 catakb05 catakb06 catakb07 catakb08 catakb09 catakb10
|
||
|
|
||
|
$frame cblock01
|
||
|
|
||
|
$frame cpain01
|
||
|
|
||
|
$frame cwalk01 cwalk02 cwalk03 cwalk04 cwalk05 cwalk06 cwalk07 cwalk08 cwalk09 cwalk10
|
||
|
$frame cwalk11 cwalk12
|
||
|
|
||
|
$frame crouch01 crouch02 crouch03 crouch04 crouch05 crouch06 crouch07 crouch08 crouch09 crouch10
|
||
|
$frame crouch11 crouch12
|
||
|
|
||
|
$frame deatha01 deatha02 deatha03 deatha04 deatha05 deatha06 deatha07 deatha08 deatha09 deatha10
|
||
|
$frame deatha11 deatha12 deatha13 deatha14 deatha15 deatha16 deatha17 deatha18 deatha19 deatha20
|
||
|
|
||
|
$frame jump01
|
||
|
|
||
|
$frame jumpb01 jumpb02 jumpb03 jumpb04 jumpb05 jumpb06 jumpb07 jumpb08 jumpb09 jumpb10
|
||
|
$frame jumpb11
|
||
|
|
||
|
$frame land01
|
||
|
|
||
|
$frame painh01
|
||
|
|
||
|
$frame painl01
|
||
|
|
||
|
$frame painlg01
|
||
|
|
||
|
$frame painr01
|
||
|
|
||
|
$frame run01 run02 run03 run04 run05 run06 run07 run08 run09 run10
|
||
|
|
||
|
$frame search01
|
||
|
|
||
|
$frame standa01 standa02 standa03 standa04 standa05 standa06 standa07 standa08 standa09 standa10
|
||
|
$frame standa11 standa12
|
||
|
|
||
|
$frame standb01 standb02 standb03 standb04 standb05 standb06 standb07 standb08 standb09 standb10
|
||
|
$frame standb11 standb12
|
||
|
|
||
|
$frame use01
|
||
|
|
||
|
$frame walka01 walka02 walka03 walka04 walka05 walka06 walka07 walka08 walka09 walka10
|
||
|
$frame walka11 walka12
|
||
|
|
||
|
$frame walkb01 walkb02 walkb03 walkb04 walkb05 walkb06 walkb07 walkb08 walkb09 walkb10
|
||
|
$frame walkb11 walkb12
|
||
|
|
||
|
|
||
|
void() bossf1_stand;
|
||
|
void() bossf1_walk;
|
||
|
void() bossf1_run1;
|
||
|
void() bossf1_run;
|
||
|
void() bossf1_crouch1;
|
||
|
void() boss_change_speed;
|
||
|
void() bossf1_painsound;
|
||
|
void() bossf1_tauntsound;
|
||
|
void(vector spot) create_bossf1bot;
|
||
|
void(vector spot, float x) delay_bossf2bot;
|
||
|
void() bossf1_cwalk1;
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
==========================
|
||
|
Abilities Code
|
||
|
==========================
|
||
|
*/
|
||
|
|
||
|
void() CastLightning =
|
||
|
{
|
||
|
local vector org, dir;
|
||
|
|
||
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||
|
|
||
|
ai_face ();
|
||
|
|
||
|
//take some ammo away from bots
|
||
|
if (self.classname == "xsniperbot")
|
||
|
{
|
||
|
//take ammo based on wmode
|
||
|
if (self.wmode == 1)
|
||
|
self.currentammo = self.ammo_mana_green = self.ammo_mana_green - 1;
|
||
|
else
|
||
|
self.currentammo = self.ammo_mana_green = self.ammo_mana_green - 10;
|
||
|
}
|
||
|
|
||
|
org = self.origin + '0 0 10';
|
||
|
|
||
|
dir = self.enemy.origin + '0 0 16' - org;
|
||
|
dir = normalize (dir);
|
||
|
|
||
|
traceline (org, self.origin + dir*600, TRUE, self);
|
||
|
|
||
|
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
||
|
if (self.classname != "xsniperbot")
|
||
|
WriteByte (MSG_BROADCAST, TE_LIGHTNING1);
|
||
|
else
|
||
|
WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
|
||
|
WriteEntity (MSG_BROADCAST, self);
|
||
|
WriteCoord (MSG_BROADCAST, org_x);
|
||
|
WriteCoord (MSG_BROADCAST, org_y);
|
||
|
WriteCoord (MSG_BROADCAST, org_z);
|
||
|
WriteCoord (MSG_BROADCAST, trace_endpos_x);
|
||
|
WriteCoord (MSG_BROADCAST, trace_endpos_y);
|
||
|
WriteCoord (MSG_BROADCAST, trace_endpos_z);
|
||
|
|
||
|
if (self.classname != "xsniperbot")
|
||
|
LightningDamage (org, trace_endpos, self, 6);
|
||
|
else
|
||
|
{
|
||
|
if (self.wmode == 2)
|
||
|
LightningArcDamage2 (org, trace_endpos + v_forward*4, self, 55);
|
||
|
else
|
||
|
LightningDamage (org, trace_endpos, self, 45);
|
||
|
}
|
||
|
|
||
|
//knock the enemy back
|
||
|
//self.enemy.velocity = dir * 600;
|
||
|
};
|
||
|
|
||
|
/*
|
||
|
====================
|
||
|
bossf1_check_summon
|
||
|
|
||
|
Check to see if we can summon
|
||
|
|
||
|
float stype: summon type
|
||
|
0: left
|
||
|
1: right
|
||
|
====================
|
||
|
*/
|
||
|
float(float stype) bossf1_check_summon =
|
||
|
{
|
||
|
return monster_check_teleport(stype);
|
||
|
};
|
||
|
|
||
|
/*
|
||
|
====================
|
||
|
bossf1_summon
|
||
|
|
||
|
The first Boss Form will summon shadow clones
|
||
|
====================
|
||
|
*/
|
||
|
void() bossf1_summon =
|
||
|
{
|
||
|
//don't summon anymore clones if we are over the maximum allowed clones
|
||
|
if (num_clones >= 3)
|
||
|
return;
|
||
|
|
||
|
//set up angles stuff
|
||
|
self.v_angle = self.angles;
|
||
|
makevectors (self.angles);
|
||
|
|
||
|
//create him where we were earlier
|
||
|
create_bossf1bot(self.oldorigin);
|
||
|
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
==========================
|
||
|
Animation Frames
|
||
|
==========================
|
||
|
*/
|
||
|
|
||
|
void() bossf1_standa1 =[ $standa01, bossf1_standa2 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa2 =[ $standa02, bossf1_standa3 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa3 =[ $standa03, bossf1_standa4 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa4 =[ $standa04, bossf1_standa5 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa5 =[ $standa05, bossf1_standa6 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa6 =[ $standa06, bossf1_standa7 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa7 =[ $standa07, bossf1_standa8 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa8 =[ $standa08, bossf1_standa9 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa9 =[ $standa09, bossf1_standa10 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa10 =[ $standa10, bossf1_standa11 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa11 =[ $standa11, bossf1_standa12 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standa12 =[ $standa12, bossf1_stand ] {ai_stand();ai_face_player();};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_standb1 =[ $standb01, bossf1_standb2 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb2 =[ $standb02, bossf1_standb3 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb3 =[ $standb03, bossf1_standb4 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb4 =[ $standb04, bossf1_standb5 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb5 =[ $standb05, bossf1_standb6 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb6 =[ $standb06, bossf1_standb7 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb7 =[ $standb07, bossf1_standb8 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb8 =[ $standb08, bossf1_standb9 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb9 =[ $standb09, bossf1_standb10 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb10 =[ $standb10, bossf1_standb11 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb11 =[ $standb11, bossf1_standb12 ] {ai_stand();ai_face_player();};
|
||
|
void() bossf1_standb12 =[ $standb12, bossf1_stand ] {ai_stand();ai_face_player();};
|
||
|
|
||
|
void() bossf1_stand =
|
||
|
{
|
||
|
//make some noise
|
||
|
bossf1_tauntsound();
|
||
|
|
||
|
//check our health, if we are hurt badly then crouch instead
|
||
|
if (self.health <= 200 && self.classname != "monster_shadowclone")
|
||
|
bossf1_crouch1();
|
||
|
else
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
bossf1_standa1();
|
||
|
else
|
||
|
bossf1_standb1();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_walka1 =[ $walka01, bossf1_walka2 ] {ai_walk(10);};
|
||
|
void() bossf1_walka2 =[ $walka02, bossf1_walka3 ] {ai_walk(8);};
|
||
|
void() bossf1_walka3 =[ $walka03, bossf1_walka4 ] {ai_walk(6);};
|
||
|
void() bossf1_walka4 =[ $walka04, bossf1_walka5 ] {ai_walk(5);};
|
||
|
void() bossf1_walka5 =[ $walka05, bossf1_walka6 ] {ai_walk(10);};
|
||
|
void() bossf1_walka6 =[ $walka06, bossf1_walka7 ] {ai_walk(8);};
|
||
|
void() bossf1_walka7 =[ $walka07, bossf1_walka8 ] {ai_walk(6);};
|
||
|
void() bossf1_walka8 =[ $walka08, bossf1_walka9 ] {ai_walk(5);};
|
||
|
void() bossf1_walka9 =[ $walka09, bossf1_walka10 ] {ai_walk(10);};
|
||
|
void() bossf1_walka10 =[ $walka10, bossf1_walka11 ] {ai_walk(8);};
|
||
|
void() bossf1_walka11 =[ $walka11, bossf1_walka12 ] {ai_walk(6);};
|
||
|
void() bossf1_walka12 =[ $walka12, bossf1_walk ] {ai_walk(5);};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_walkb1 =[ $walkb01, bossf1_walkb2 ] {ai_walk(10);};
|
||
|
void() bossf1_walkb2 =[ $walkb02, bossf1_walkb3 ] {ai_walk(8);};
|
||
|
void() bossf1_walkb3 =[ $walkb03, bossf1_walkb4 ] {ai_walk(6);};
|
||
|
void() bossf1_walkb4 =[ $walkb04, bossf1_walkb5 ] {ai_walk(5);};
|
||
|
void() bossf1_walkb5 =[ $walkb05, bossf1_walkb6 ] {ai_walk(10);};
|
||
|
void() bossf1_walkb6 =[ $walkb06, bossf1_walkb7 ] {ai_walk(8);};
|
||
|
void() bossf1_walkb7 =[ $walkb07, bossf1_walkb8 ] {ai_walk(6);};
|
||
|
void() bossf1_walkb8 =[ $walkb08, bossf1_walkb9 ] {ai_walk(5);};
|
||
|
void() bossf1_walkb9 =[ $walkb09, bossf1_walkb10 ] {ai_walk(10);};
|
||
|
void() bossf1_walkb10 =[ $walkb10, bossf1_walkb11 ] {ai_walk(8);};
|
||
|
void() bossf1_walkb11 =[ $walkb11, bossf1_walkb12 ] {ai_walk(6);};
|
||
|
void() bossf1_walkb12 =[ $walkb12, bossf1_walk ] {ai_walk(5);};
|
||
|
|
||
|
void() bossf1_walk =
|
||
|
{
|
||
|
//make some noise
|
||
|
bossf1_tauntsound();
|
||
|
|
||
|
//check our health, if we are hurt badly then crouch instead
|
||
|
if (self.health <= 200 && self.classname != "monster_shadowclone")
|
||
|
bossf1_cwalk1();
|
||
|
else
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
bossf1_walka1();
|
||
|
else
|
||
|
bossf1_walkb1();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_run1 =[ $run01, bossf1_run2 ]
|
||
|
{
|
||
|
ai_face();
|
||
|
ai_run(20);
|
||
|
};
|
||
|
void() bossf1_run2 =[ $run02, bossf1_run3 ] {ai_run(16);};
|
||
|
void() bossf1_run3 =[ $run03, bossf1_run4 ] {ai_run(12);};
|
||
|
void() bossf1_run4 =[ $run04, bossf1_run5 ] {ai_run(10);};
|
||
|
void() bossf1_run5 =[ $run05, bossf1_run6 ] {ai_run(20);};
|
||
|
void() bossf1_run6 =[ $run06, bossf1_run7 ] {ai_run(16);};
|
||
|
void() bossf1_run7 =[ $run07, bossf1_run8 ] {ai_run(12);};
|
||
|
void() bossf1_run8 =[ $run08, bossf1_run9 ] {ai_run(10);};
|
||
|
void() bossf1_run9 =[ $run09, bossf1_run10 ] {ai_run(20);};
|
||
|
void() bossf1_run10 =[ $run10, bossf1_run ] {ai_run(16);};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
==========================
|
||
|
Missile Attacks
|
||
|
==========================
|
||
|
*/
|
||
|
|
||
|
//apprentice and necro's skull attack
|
||
|
void() bossf1_ataka1 =[ $ataka01, bossf1_ataka2 ]
|
||
|
{
|
||
|
ai_face();
|
||
|
Apprent_StartMissile(1);
|
||
|
};
|
||
|
void() bossf1_ataka2 =[ $ataka02, bossf1_ataka3 ] {ai_face();};
|
||
|
void() bossf1_ataka3 =[ $ataka03, bossf1_ataka4 ] {ai_face();};
|
||
|
void() bossf1_ataka4 =[ $ataka04, bossf1_ataka5 ] {ai_face();};
|
||
|
void() bossf1_ataka5 =[ $ataka05, bossf1_ataka6 ] {ai_face();};
|
||
|
void() bossf1_ataka6 =[ $ataka06, bossf1_ataka7 ] {ai_face();};
|
||
|
void() bossf1_ataka7 =[ $ataka07, bossf1_ataka8 ] {ai_face();};
|
||
|
void() bossf1_ataka8 =[ $ataka08, bossf1_ataka9 ] {ai_face();};
|
||
|
void() bossf1_ataka9 =[ $ataka09, bossf1_ataka10 ] {ai_face();};
|
||
|
void() bossf1_ataka10 =[ $ataka10, bossf1_ataka11 ] {ai_face();};
|
||
|
void() bossf1_ataka11 =[ $ataka11, bossf1_ataka12 ] {ai_face();};
|
||
|
void() bossf1_ataka12 =[ $ataka12, bossf1_run ] {ai_face();};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
//casts lightning from his hand at the player
|
||
|
void() bossf1_use1 =[ $use01, bossf1_use2 ]
|
||
|
{
|
||
|
ai_face();
|
||
|
sound (self, CHAN_WEAPON, "weapons/holy/lightarc.wav", 1, ATTN_NORM);
|
||
|
CastLightning();
|
||
|
};
|
||
|
void() bossf1_use2 =[ $use01, bossf1_use3 ] {ai_face();CastLightning();};
|
||
|
void() bossf1_use3 =[ $use01, bossf1_run ] {ai_face();CastLightning();};
|
||
|
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
==========================
|
||
|
Melee Attacks
|
||
|
==========================
|
||
|
*/
|
||
|
|
||
|
void() bossf1_atakb1 =[ $ataka01, bossf1_atakb2 ] {ai_face();ai_charge(30);};
|
||
|
void() bossf1_atakb2 =[ $ataka02, bossf1_atakb3 ] {ai_charge(26);ai_melee();};
|
||
|
void() bossf1_atakb3 =[ $ataka03, bossf1_atakb4 ] {ai_charge(22);ai_melee();};
|
||
|
void() bossf1_atakb4 =[ $ataka04, bossf1_atakb5 ] {ai_charge(20);ai_melee();};
|
||
|
void() bossf1_atakb5 =[ $ataka05, bossf1_atakb6 ] {ai_charge(30);ai_melee();};
|
||
|
void() bossf1_atakb6 =[ $ataka06, bossf1_atakb7 ] {ai_charge(26);ai_melee();};
|
||
|
void() bossf1_atakb7 =[ $ataka07, bossf1_atakb8 ] {};
|
||
|
void() bossf1_atakb8 =[ $ataka08, bossf1_atakb9 ] {};
|
||
|
void() bossf1_atakb9 =[ $ataka09, bossf1_atakb10 ] {};
|
||
|
void() bossf1_atakb10 =[ $ataka10, bossf1_atakb11 ] {};
|
||
|
void() bossf1_atakb11 =[ $ataka11, bossf1_atakb12 ] {};
|
||
|
void() bossf1_atakb12 =[ $ataka12, bossf1_run ] {};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_atakc1 =[ $atakb01, bossf1_atakc2 ] {ai_face();ai_charge(30);};
|
||
|
void() bossf1_atakc2 =[ $atakb02, bossf1_atakc3 ] {ai_charge(26);};
|
||
|
void() bossf1_atakc3 =[ $atakb03, bossf1_atakc4 ] {ai_charge(22);ai_melee();};
|
||
|
void() bossf1_atakc4 =[ $atakb04, bossf1_atakc5 ] {ai_charge(20);ai_melee();};
|
||
|
void() bossf1_atakc5 =[ $atakb05, bossf1_atakc6 ] {ai_charge(30);ai_melee();};
|
||
|
void() bossf1_atakc6 =[ $atakb06, bossf1_atakc7 ] {ai_charge(26);ai_melee();};
|
||
|
void() bossf1_atakc7 =[ $atakb07, bossf1_atakc8 ] {};
|
||
|
void() bossf1_atakc8 =[ $atakb08, bossf1_atakc9 ] {};
|
||
|
void() bossf1_atakc9 =[ $atakb09, bossf1_atakc10 ] {};
|
||
|
void() bossf1_atakc10 =[ $atakb10, bossf1_run ] {};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
==========================
|
||
|
Crouching When Hurt Badly
|
||
|
==========================
|
||
|
*/
|
||
|
|
||
|
//don't want to go into pain frame while flipping, just doesnt look right
|
||
|
float flipping; //0 means I'm not flipping, 1 means I am.
|
||
|
|
||
|
void() bossf1_flipa1 =[ $jumpb01, bossf1_flipa2 ]
|
||
|
{
|
||
|
//hey I'm flipping!
|
||
|
flipping = 1;
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1jumpback.wav", 1, ATTN_NORM);
|
||
|
ai_face();
|
||
|
};
|
||
|
void() bossf1_flipa2 =[ $jumpb02, bossf1_flipa3 ] {ai_back(10);};
|
||
|
void() bossf1_flipa3 =[ $jumpb03, bossf1_flipa4 ] {ai_back(8);};
|
||
|
void() bossf1_flipa4 =[ $jumpb04, bossf1_flipa5 ] {ai_back(6);};
|
||
|
void() bossf1_flipa5 =[ $jumpb05, bossf1_flipa6 ] {ai_back(10);};
|
||
|
void() bossf1_flipa6 =[ $jumpb06, bossf1_flipa7 ] {ai_back(8);};
|
||
|
void() bossf1_flipa7 =[ $jumpb07, bossf1_flipa8 ] {ai_back(6);};
|
||
|
void() bossf1_flipa8 =[ $jumpb08, bossf1_flipa9 ] {ai_back(10);};
|
||
|
void() bossf1_flipa9 =[ $jumpb09, bossf1_flipa10 ] {ai_back(8);};
|
||
|
void() bossf1_flipa10 =[ $jumpb10, bossf1_flipa11 ] {ai_back(6);};
|
||
|
void() bossf1_flipa11 =[ $jumpb11, bossf1_flipa12 ] {ai_back(10);};
|
||
|
void() bossf1_flipa12 =[ $land01, bossf1_flipa13 ] {};
|
||
|
void() bossf1_flipa13 =[ $land01, bossf1_flipa14 ] {};
|
||
|
void() bossf1_flipa14 =[ $land01, bossf1_flipa15 ] {};
|
||
|
void() bossf1_flipa15 =[ $land01, bossf1_run ]
|
||
|
{
|
||
|
//ok not flipping anymore
|
||
|
flipping = 0;
|
||
|
//set game speed at random
|
||
|
sound (self, CHAN_VOICE, "artifact/power.wav", 1, ATTN_NORM);
|
||
|
boss_change_speed();
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_crouch1 =[ $crouch01, bossf1_crouch2 ] {ai_stand();};
|
||
|
void() bossf1_crouch2 =[ $crouch02, bossf1_crouch3 ] {ai_stand();};
|
||
|
void() bossf1_crouch3 =[ $crouch03, bossf1_crouch4 ] {ai_stand();};
|
||
|
void() bossf1_crouch4 =[ $crouch04, bossf1_crouch5 ] {ai_stand();};
|
||
|
void() bossf1_crouch5 =[ $crouch05, bossf1_crouch6 ] {ai_stand();};
|
||
|
void() bossf1_crouch6 =[ $crouch06, bossf1_crouch7 ] {ai_stand();};
|
||
|
void() bossf1_crouch7 =[ $crouch07, bossf1_crouch8 ] {ai_stand();};
|
||
|
void() bossf1_crouch8 =[ $crouch08, bossf1_crouch9 ] {ai_stand();};
|
||
|
void() bossf1_crouch9 =[ $crouch09, bossf1_crouch10 ] {ai_stand();};
|
||
|
void() bossf1_crouch10 =[ $crouch10, bossf1_crouch11 ] {ai_stand();};
|
||
|
void() bossf1_crouch11 =[ $crouch11, bossf1_crouch12 ] {ai_stand();};
|
||
|
void() bossf1_crouch12 =[ $crouch12, bossf1_stand ] {ai_stand();};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_cwalk1 =[ $cwalk01, bossf1_cwalk2 ] {ai_walk(5);};
|
||
|
void() bossf1_cwalk2 =[ $cwalk02, bossf1_cwalk3 ] {ai_walk(4);};
|
||
|
void() bossf1_cwalk3 =[ $cwalk03, bossf1_cwalk4 ] {ai_walk(3);};
|
||
|
void() bossf1_cwalk4 =[ $cwalk04, bossf1_cwalk5 ] {ai_walk(2);};
|
||
|
void() bossf1_cwalk5 =[ $cwalk05, bossf1_cwalk6 ] {ai_walk(5);};
|
||
|
void() bossf1_cwalk6 =[ $cwalk06, bossf1_cwalk7 ] {ai_walk(4);};
|
||
|
void() bossf1_cwalk7 =[ $cwalk07, bossf1_cwalk8 ] {ai_walk(3);};
|
||
|
void() bossf1_cwalk8 =[ $cwalk08, bossf1_cwalk9 ] {ai_walk(2);};
|
||
|
void() bossf1_cwalk9 =[ $cwalk09, bossf1_cwalk10 ] {ai_walk(5);};
|
||
|
void() bossf1_cwalk10 =[ $cwalk10, bossf1_cwalk11 ] {ai_walk(4);};
|
||
|
void() bossf1_cwalk11 =[ $cwalk11, bossf1_cwalk12 ] {ai_walk(3);};
|
||
|
void() bossf1_cwalk12 =[ $cwalk12, bossf1_walk ] {ai_walk(2);};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_crun1 =[ $cwalk01, bossf1_crun2 ] {ai_run(10);};
|
||
|
void() bossf1_crun2 =[ $cwalk02, bossf1_crun3 ] {ai_run(8);};
|
||
|
void() bossf1_crun3 =[ $cwalk03, bossf1_crun4 ] {ai_run(6);};
|
||
|
void() bossf1_crun4 =[ $cwalk04, bossf1_crun5 ] {ai_run(5);};
|
||
|
void() bossf1_crun5 =[ $cwalk05, bossf1_crun6 ] {ai_run(10);};
|
||
|
void() bossf1_crun6 =[ $cwalk06, bossf1_crun7 ] {ai_run(8);};
|
||
|
void() bossf1_crun7 =[ $cwalk07, bossf1_crun8 ] {ai_run(6);};
|
||
|
void() bossf1_crun8 =[ $cwalk08, bossf1_crun9 ] {ai_run(5);};
|
||
|
void() bossf1_crun9 =[ $cwalk09, bossf1_crun10 ] {ai_run(10);};
|
||
|
void() bossf1_crun10 =[ $cwalk10, bossf1_crun11 ] {ai_run(8);};
|
||
|
void() bossf1_crun11 =[ $cwalk11, bossf1_crun12 ] {ai_run(6);};
|
||
|
void() bossf1_crun12 =[ $cwalk12, bossf1_run ] {ai_run(5);};
|
||
|
|
||
|
float hurtbad;
|
||
|
|
||
|
void() bossf1_run =
|
||
|
{
|
||
|
//make some noise
|
||
|
bossf1_tauntsound();
|
||
|
|
||
|
//check our health, if we are hurt badly then crouch instead
|
||
|
if (self.health <= 200 && self.classname != "monster_shadowclone")
|
||
|
{
|
||
|
if (hurtbad == 0)
|
||
|
{
|
||
|
bossf1_flipa1();
|
||
|
hurtbad = 1;
|
||
|
}
|
||
|
else
|
||
|
bossf1_crun1();
|
||
|
}
|
||
|
else
|
||
|
bossf1_run1();
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_cataka1 =[ $cataka01, bossf1_cataka2 ] {ai_face();ai_charge(30);};
|
||
|
void() bossf1_cataka2 =[ $cataka02, bossf1_cataka3 ] {ai_charge(26);ai_melee();};
|
||
|
void() bossf1_cataka3 =[ $cataka03, bossf1_cataka4 ] {ai_charge(22);ai_melee();};
|
||
|
void() bossf1_cataka4 =[ $cataka04, bossf1_cataka5 ] {ai_charge(20);ai_melee();};
|
||
|
void() bossf1_cataka5 =[ $cataka05, bossf1_cataka6 ] {ai_charge(30);ai_melee();};
|
||
|
void() bossf1_cataka6 =[ $cataka06, bossf1_cataka7 ] {ai_charge(26);ai_melee();};
|
||
|
void() bossf1_cataka7 =[ $cataka07, bossf1_cataka8 ] {};
|
||
|
void() bossf1_cataka8 =[ $cataka08, bossf1_cataka9 ] {};
|
||
|
void() bossf1_cataka9 =[ $cataka09, bossf1_cataka10 ] {};
|
||
|
void() bossf1_cataka10 =[ $cataka10, bossf1_cataka11 ] {};
|
||
|
void() bossf1_cataka11 =[ $cataka11, bossf1_cataka12 ] {};
|
||
|
void() bossf1_cataka12 =[ $cataka12, bossf1_run ] {};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_catakb1 =[ $catakb01, bossf1_catakb2 ] {ai_face();ai_charge(30);};
|
||
|
void() bossf1_catakb2 =[ $catakb02, bossf1_catakb3 ] {ai_charge(26);};
|
||
|
void() bossf1_catakb3 =[ $catakb03, bossf1_catakb4 ] {ai_charge(22);ai_melee();};
|
||
|
void() bossf1_catakb4 =[ $catakb04, bossf1_catakb5 ] {ai_charge(20);ai_melee();};
|
||
|
void() bossf1_catakb5 =[ $catakb05, bossf1_catakb6 ] {ai_charge(30);ai_melee();};
|
||
|
void() bossf1_catakb6 =[ $catakb06, bossf1_catakb7 ] {ai_charge(26);ai_melee();};
|
||
|
void() bossf1_catakb7 =[ $catakb07, bossf1_catakb8 ] {};
|
||
|
void() bossf1_catakb8 =[ $catakb08, bossf1_catakb9 ] {};
|
||
|
void() bossf1_catakb9 =[ $catakb09, bossf1_catakb10 ] {};
|
||
|
void() bossf1_catakb10 =[ $catakb10, bossf1_run ] {};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
=========================================
|
||
|
Backflip Dodging and Time Alteration
|
||
|
=========================================
|
||
|
*/
|
||
|
|
||
|
void() bossf1_flipb1 =[ $jumpb01, bossf1_flipb2 ]
|
||
|
{
|
||
|
//hey I'm flipping!
|
||
|
flipping = 1;
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1jumpback.wav", 1, ATTN_NORM);
|
||
|
ai_face();
|
||
|
};
|
||
|
void() bossf1_flipb2 =[ $jumpb02, bossf1_flipb3 ] {ai_back(10);};
|
||
|
void() bossf1_flipb3 =[ $jumpb03, bossf1_flipb4 ] {ai_back(8);};
|
||
|
void() bossf1_flipb4 =[ $jumpb04, bossf1_flipb5 ] {ai_back(6);};
|
||
|
void() bossf1_flipb5 =[ $jumpb05, bossf1_flipb6 ] {ai_back(10);};
|
||
|
void() bossf1_flipb6 =[ $jumpb06, bossf1_flipb7 ] {ai_back(8);};
|
||
|
void() bossf1_flipb7 =[ $jumpb07, bossf1_flipb8 ] {ai_back(6);};
|
||
|
void() bossf1_flipb8 =[ $jumpb08, bossf1_flipb9 ] {ai_back(10);};
|
||
|
void() bossf1_flipb9 =[ $jumpb09, bossf1_flipb10 ] {ai_back(8);};
|
||
|
void() bossf1_flipb10 =[ $jumpb10, bossf1_flipb11 ] {ai_back(6);};
|
||
|
void() bossf1_flipb11 =[ $jumpb11, bossf1_flipb12 ] {ai_back(10);};
|
||
|
void() bossf1_flipb12 =[ $land01, bossf1_flipb13 ]
|
||
|
{
|
||
|
//lets teleport right here
|
||
|
boss_teleport(0);
|
||
|
};
|
||
|
void() bossf1_flipb13 =[ $land01, bossf1_flipb14 ] {};
|
||
|
void() bossf1_flipb14 =[ $land01, bossf1_flipb15 ] {};
|
||
|
void() bossf1_flipb15 =[ $land01, bossf1_run ]
|
||
|
{
|
||
|
//ok not flipping anymore
|
||
|
flipping = 0;
|
||
|
//set game speed at random
|
||
|
sound (self, CHAN_VOICE, "artifact/power.wav", 1, ATTN_NORM);
|
||
|
boss_change_speed();
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
=========================================
|
||
|
Summoning Shadow Clones
|
||
|
=========================================
|
||
|
*/
|
||
|
|
||
|
void() bossf1_atakd1 =[ $atakc01, bossf1_atakd2 ]
|
||
|
{
|
||
|
ai_face();
|
||
|
|
||
|
//set our old origin equal to our current one
|
||
|
self.oldorigin = self.origin;
|
||
|
|
||
|
//teleport
|
||
|
boss_teleport(0);
|
||
|
};
|
||
|
void() bossf1_atakd2 =[ $atakc02, bossf1_atakd3 ] {ai_face();};
|
||
|
void() bossf1_atakd3 =[ $atakc03, bossf1_atakd4 ] {ai_face();};
|
||
|
void() bossf1_atakd4 =[ $atakc04, bossf1_atakd5 ] {ai_face();};
|
||
|
void() bossf1_atakd5 =[ $atakc05, bossf1_atakd6 ] {ai_face();};
|
||
|
void() bossf1_atakd6 =[ $atakc06, bossf1_atakd7 ] {ai_face();};
|
||
|
void() bossf1_atakd7 =[ $atakc07, bossf1_atakd8 ] {ai_face();};
|
||
|
void() bossf1_atakd8 =[ $atakc08, bossf1_atakd9 ] {ai_face();bossf1_summon();};
|
||
|
void() bossf1_atakd9 =[ $atakc09, bossf1_atakd10 ] {ai_face();};
|
||
|
void() bossf1_atakd10 =[ $atakc10, bossf1_atakd11 ] {ai_face();};
|
||
|
void() bossf1_atakd11 =[ $atakc11, bossf1_atakd12 ] {ai_face();};
|
||
|
void() bossf1_atakd12 =[ $atakc12, bossf1_run ] {ai_face();};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*
|
||
|
=========================================
|
||
|
Blocking - commented out for now
|
||
|
=========================================
|
||
|
|
||
|
|
||
|
void() bossf1_block1 =[ $block01, bossf1_run ] {ai_face();};
|
||
|
|
||
|
void() bossf1_cblock1 =[ $cblock01, bossf1_run ] {ai_face();};
|
||
|
|
||
|
void() bossf1_block =
|
||
|
{
|
||
|
|
||
|
};
|
||
|
|
||
|
*/
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_paina1 =[ $painh01, bossf1_run ] {};
|
||
|
|
||
|
void() bossf1_painb1 =[ $painl01, bossf1_run ] {};
|
||
|
|
||
|
void() bossf1_painc1 =[ $painlg01, bossf1_run ] {};
|
||
|
|
||
|
void() bossf1_paind1 =[ $painr01, bossf1_run ] {};
|
||
|
|
||
|
void(entity attacker, float damage) bossf1_pain =
|
||
|
{
|
||
|
local float r;
|
||
|
|
||
|
r = random();
|
||
|
|
||
|
|
||
|
//don't want to go into pain frame while flipping, just doesnt look right
|
||
|
if (flipping == 1)
|
||
|
return;
|
||
|
|
||
|
if (self.pain_finished > time)
|
||
|
return;
|
||
|
|
||
|
self.pain_finished = time + 0.1;
|
||
|
|
||
|
//make some noise
|
||
|
bossf1_painsound();
|
||
|
|
||
|
//select pain frame at random
|
||
|
if (r <= 0.25)
|
||
|
bossf1_paina1();
|
||
|
else if (r <= 0.5)
|
||
|
bossf1_painb1();
|
||
|
else if (r <= 0.75)
|
||
|
bossf1_painc1();
|
||
|
else
|
||
|
bossf1_paind1();
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_blowup =
|
||
|
{
|
||
|
/*
|
||
|
local entity telespot;
|
||
|
|
||
|
//search for center of the arena
|
||
|
telespot = find(world, targetname, "centerarena");
|
||
|
|
||
|
//spawn bf2 in the center
|
||
|
if(telespot.targetname == "centerarena")
|
||
|
create_bossf2bot(telespot.origin);
|
||
|
*/
|
||
|
|
||
|
//Create Boss Form 2 after 1.5 seconds
|
||
|
delay_bossf2bot(self.origin,1.5);
|
||
|
|
||
|
T_RadiusDamage (self, self, 120, world);
|
||
|
|
||
|
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
||
|
WriteByte (MSG_BROADCAST, TE_TAREXPLOSION);
|
||
|
WriteCoord (MSG_BROADCAST, self.origin_x);
|
||
|
WriteCoord (MSG_BROADCAST, self.origin_y);
|
||
|
WriteCoord (MSG_BROADCAST, self.origin_z);
|
||
|
|
||
|
BecomeExplosion ();
|
||
|
};
|
||
|
|
||
|
void() bossf1_deathfinished =
|
||
|
{
|
||
|
//create some explosions
|
||
|
create_explosion((self.origin - (v_right * 20)),0.5,0,40);
|
||
|
create_explosion((self.origin - (v_right * 40)),1,0,40);
|
||
|
create_explosion((self.origin - (v_right * 25) + '0 0 10'),1.5,0,40);
|
||
|
create_explosion((self.origin - (v_right * 35) + '0 0 5'),2,0,40);
|
||
|
create_explosion((self.origin + (v_right * 20)),0.5,0,40);
|
||
|
create_explosion((self.origin + (v_right * 40)),1,0,40);
|
||
|
create_explosion((self.origin + (v_right * 25) + '0 0 10'),1.5,0,40);
|
||
|
create_explosion((self.origin + (v_right * 35) + '0 0 5'),2,0,40);
|
||
|
create_explosion((self.origin - '0 0 10'),3,1,40); //this is the big one
|
||
|
create_explosion((self.origin - (v_right * 20)),2.5,0,40);
|
||
|
create_explosion((self.origin + (v_right * 20)),3,0,40);
|
||
|
|
||
|
//now its time for us to blow up!
|
||
|
self.nextthink = time + 2.9;
|
||
|
self.think = bossf1_blowup;
|
||
|
};
|
||
|
|
||
|
void() bossf1_die1 =[ $deatha01, bossf1_die2 ] {};
|
||
|
void() bossf1_die2 =[ $deatha02, bossf1_die3 ] {};
|
||
|
void() bossf1_die3 =[ $deatha03, bossf1_die4 ] {};
|
||
|
void() bossf1_die4 =[ $deatha04, bossf1_die5 ] {};
|
||
|
void() bossf1_die5 =[ $deatha05, bossf1_die6 ] {};
|
||
|
void() bossf1_die6 =[ $deatha06, bossf1_die7 ] {};
|
||
|
void() bossf1_die7 =[ $deatha07, bossf1_die8 ] {};
|
||
|
void() bossf1_die8 =[ $deatha08, bossf1_die9 ] {};
|
||
|
void() bossf1_die9 =[ $deatha09, bossf1_die10 ] {};
|
||
|
void() bossf1_die10 =[ $deatha10, bossf1_die11 ] {};
|
||
|
void() bossf1_die11 =[ $deatha11, bossf1_die12 ] {};
|
||
|
void() bossf1_die12 =[ $deatha12, bossf1_die13 ] {};
|
||
|
void() bossf1_die13 =[ $deatha13, bossf1_die14 ] {};
|
||
|
void() bossf1_die14 =[ $deatha14, bossf1_die14 ]
|
||
|
{
|
||
|
//create bf2 bot at centerarena
|
||
|
bossf1_deathfinished();
|
||
|
};
|
||
|
void() bossf1_die15 =[ $deatha15, bossf1_die16 ] {};
|
||
|
void() bossf1_die16 =[ $deatha16, bossf1_die17 ] {};
|
||
|
void() bossf1_die17 =[ $deatha17, bossf1_die18 ] {};
|
||
|
void() bossf1_die18 =[ $deatha18, bossf1_die19 ] {};
|
||
|
void() bossf1_die19 =[ $deatha19, bossf1_die20 ] {};
|
||
|
void() bossf1_die20 =[ $deatha20, bossf1_die20 ] {};
|
||
|
|
||
|
void() bossf1_die =
|
||
|
{
|
||
|
//teleport player to death area
|
||
|
boss_teleport(2);
|
||
|
|
||
|
//set game speed back to normal
|
||
|
adjust_speed(0,0);
|
||
|
|
||
|
//lets teleport to center arena
|
||
|
boss_teleport(1);
|
||
|
|
||
|
//face the player
|
||
|
ai_face_player();
|
||
|
|
||
|
//this seemed important
|
||
|
self.solid = SOLID_NOT;
|
||
|
|
||
|
//make some noise
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1die2.wav", 1, ATTN_NORM);
|
||
|
|
||
|
//kill the clones
|
||
|
bf1_dead = 1;
|
||
|
|
||
|
//go into death animation
|
||
|
bossf1_die1();
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
void() bossf1_painsound =
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1hit1.wav", 1, ATTN_NORM);
|
||
|
else
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1hit2.wav", 1, ATTN_NORM);
|
||
|
};
|
||
|
|
||
|
void() bossf1_attacksound =
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1die3.wav", 1, ATTN_NORM);
|
||
|
else
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1hit3.wav", 1, ATTN_NORM);
|
||
|
};
|
||
|
|
||
|
void() bossf1_tauntsound =
|
||
|
{
|
||
|
//don't always want to make this sound
|
||
|
if (random() <= 0.3)
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1laugh1.wav", 1, ATTN_NORM);
|
||
|
else
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1laugh2.wav", 1, ATTN_NORM);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
float speed_toggle;
|
||
|
|
||
|
void() boss_change_speed =
|
||
|
{
|
||
|
local float stime;
|
||
|
|
||
|
//check to see if we can change speed
|
||
|
if (world_speed == 1)
|
||
|
return;
|
||
|
|
||
|
//set up speed toggle
|
||
|
speed_toggle = speed_toggle + 1;
|
||
|
|
||
|
//set game speed by speed toggle
|
||
|
if (speed_toggle == 1) //normal speed
|
||
|
{
|
||
|
//set up stime
|
||
|
stime = 3;
|
||
|
|
||
|
adjust_speed(0,stime);
|
||
|
gamespeed = 0;
|
||
|
}
|
||
|
else if (speed_toggle == 2) //double speed
|
||
|
{
|
||
|
//set up stime
|
||
|
stime = 6;
|
||
|
|
||
|
adjust_speed(1,stime);
|
||
|
gamespeed = 1;
|
||
|
}
|
||
|
else //slow motion
|
||
|
{
|
||
|
//set up stime
|
||
|
stime = 1.5;
|
||
|
|
||
|
adjust_speed(3,stime);
|
||
|
gamespeed = 3;
|
||
|
speed_toggle = 0;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
void() bossf1_melee =
|
||
|
{
|
||
|
//make some noise
|
||
|
bossf1_attacksound();
|
||
|
|
||
|
//check our health, if we are hurt badly then use crouch attacks
|
||
|
if (self.health <= 200)
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
bossf1_cataka1();
|
||
|
else
|
||
|
bossf1_catakb1();
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
if (random() <= 0.5)
|
||
|
bossf1_atakb1();
|
||
|
else
|
||
|
bossf1_atakc1();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
void() bossf1_missile =
|
||
|
{
|
||
|
local float r;
|
||
|
|
||
|
r = random();
|
||
|
|
||
|
//check our health, if we are hurt badly then no more missile attacks
|
||
|
if (self.health <= 200 && self.classname != "monster_shadowclone")
|
||
|
return;
|
||
|
else
|
||
|
{
|
||
|
if (r <= 0.5)
|
||
|
bossf1_ataka1(); //skull blast
|
||
|
else
|
||
|
{
|
||
|
if (time > lightning_wait)
|
||
|
bossf1_use1(); //lightning attack
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//=================================================================================================
|
||
|
|
||
|
/*EWED monster_bossf1 (1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
||
|
*/
|
||
|
void() monster_bossf1 =
|
||
|
{
|
||
|
if (deathmatch)
|
||
|
{
|
||
|
remove(self);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
//boss form1 precaches
|
||
|
precache_model ("models/enemies/bossform1.md2");
|
||
|
precache_model ("models/weapons/gfx/skullblast.md2");
|
||
|
|
||
|
//boss form1 sound precaches
|
||
|
precache_sound ("enemy/apprent/ability.wav");
|
||
|
precache_sound ("weapons/holy/lightarc.wav");
|
||
|
precache_sound ("artifact/power.wav");
|
||
|
precache_sound ("weapons/lock4.wav"); //used for missile touch function
|
||
|
|
||
|
precache_sound ("boss1/bf1die2.wav");
|
||
|
precache_sound ("boss1/bf1die3.wav");
|
||
|
precache_sound ("boss1/bf1hit1.wav");
|
||
|
precache_sound ("boss1/bf1hit2.wav");
|
||
|
precache_sound ("boss1/bf1hit3.wav");
|
||
|
precache_sound ("boss1/bf1jumpback.wav");
|
||
|
precache_sound ("boss1/bf1laugh1.wav");
|
||
|
precache_sound ("boss1/bf1laugh2.wav");
|
||
|
|
||
|
//boss form2 precaches
|
||
|
precache_model ("models/enemies/bossform2.md2");
|
||
|
precache_model ("models/enemies/demonorb.md2");
|
||
|
precache_model ("models/weapons/gfx/fireball.mdl");
|
||
|
precache_model ("progs/flame2.mdl");
|
||
|
|
||
|
//boss form2 sound precaches
|
||
|
precache_sound ("weapons/demon/firehit.wav");
|
||
|
precache_sound ("weapons/demon/hellstafffire.wav");
|
||
|
|
||
|
precache_sound ("boss2/bf2claw2.wav");
|
||
|
precache_sound ("boss2/bf2claw.wav");
|
||
|
precache_sound ("boss2/bf2death3.wav");
|
||
|
precache_sound ("boss2/bf2pain2.wav");
|
||
|
precache_sound ("boss2/bf2pain.wav");
|
||
|
precache_sound ("boss2/bf2roar.wav");
|
||
|
precache_sound ("boss2/bf2sight.wav");
|
||
|
precache_sound ("boss2/bf2sightslow.wav");
|
||
|
precache_sound ("boss2/bf2walk.wav");
|
||
|
precache_sound ("weapons/lstart.wav");
|
||
|
|
||
|
self.solid = SOLID_SLIDEBOX;
|
||
|
self.movetype = MOVETYPE_STEP;
|
||
|
|
||
|
setmodel (self, "models/enemies/bossform1.md2");
|
||
|
|
||
|
setsize (self, '-16 -16 -24', '16 16 40');
|
||
|
// setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||
|
self.health = set_health(1000);
|
||
|
self.speed = set_speed(600);
|
||
|
self.dtype = 5; //special dodge type, cause he be da boss man ;)
|
||
|
hurtbad = 0; //not hurt badly yet, start it at 0
|
||
|
bf1_dead = 0; //not dead yet, start it at 0
|
||
|
num_clones = 0; //aren't any shadow clones yet
|
||
|
|
||
|
self.th_stand = bossf1_stand;
|
||
|
self.th_walk = bossf1_walk;
|
||
|
self.th_run = bossf1_run1;
|
||
|
self.th_melee = bossf1_melee;
|
||
|
self.th_missile = bossf1_missile;
|
||
|
self.th_pain = bossf1_pain;
|
||
|
self.th_die = bossf1_die;
|
||
|
|
||
|
//my new classname is?
|
||
|
self.classname = "monster_bossf1";
|
||
|
|
||
|
//set up our monflag
|
||
|
self.monflag = "TRUE";
|
||
|
|
||
|
walkmonster_start ();
|
||
|
};
|
||
|
|
||
|
/*
|
||
|
=========================================
|
||
|
Shadow Clones
|
||
|
=========================================
|
||
|
*/
|
||
|
|
||
|
void() bossf1bot_die =
|
||
|
{
|
||
|
//decrement number of shadow clones
|
||
|
num_clones = num_clones - 1;
|
||
|
|
||
|
//this seemed important
|
||
|
self.solid = SOLID_NOT;
|
||
|
|
||
|
//make some noise
|
||
|
sound (self, CHAN_VOICE, "boss1/bf1die2.wav", 1, ATTN_NORM);
|
||
|
|
||
|
//teleport out
|
||
|
spawn_tfog (self.origin);
|
||
|
//spawn_tdeath (self.origin, self);
|
||
|
remove(self);
|
||
|
return;
|
||
|
};
|
||
|
|
||
|
void() search_for_boss =
|
||
|
{
|
||
|
local entity boss;
|
||
|
|
||
|
//need to make sure the boss is still alive
|
||
|
|
||
|
if (bf1_dead == 1)
|
||
|
self.think = self.th_die;
|
||
|
};
|
||
|
|
||
|
/*
|
||
|
=================
|
||
|
create_bossf1bot
|
||
|
|
||
|
Creates a weaker partially transparent version of the first Boss form at the specified 'spot'.
|
||
|
This is used by Boss Form 1.
|
||
|
=================
|
||
|
*/
|
||
|
void(vector spot) create_bossf1bot =
|
||
|
{
|
||
|
local entity bot;
|
||
|
|
||
|
// start entity and place it in world
|
||
|
bot = spawn();
|
||
|
bot.angles = self.angles;
|
||
|
setorigin (bot, spot);
|
||
|
bot.fixangle = TRUE;
|
||
|
spawn_tfog (bot.origin);
|
||
|
spawn_tdeath (bot.origin, bot);
|
||
|
|
||
|
// set size and shape
|
||
|
bot.solid = SOLID_SLIDEBOX;
|
||
|
bot.movetype = MOVETYPE_STEP;
|
||
|
setmodel (bot, "models/enemies/bossform1.md2");
|
||
|
setsize (bot, '-16 -16 -24', '16 16 40');
|
||
|
bot.flags = bot.flags | FL_MONSTER;
|
||
|
bot.takedamage = DAMAGE_AIM;
|
||
|
|
||
|
// define his animation
|
||
|
bot.th_stand = bossf1_stand;
|
||
|
bot.th_walk = bossf1_walk;
|
||
|
bot.th_run = bossf1_run;
|
||
|
bot.th_die = bossf1bot_die;
|
||
|
bot.th_melee = bossf1_melee;
|
||
|
bot.th_missile = bossf1_missile;
|
||
|
bot.th_pain = bossf1_pain;
|
||
|
bot.health = 10;
|
||
|
bot.speed = set_speed(600);
|
||
|
bot.dtype = 5; //special dodge type, cause he be da boss man ;)
|
||
|
|
||
|
//Tomaz Special Effects
|
||
|
bot.alpha = 0.5; //make him transparent
|
||
|
|
||
|
// polish him up
|
||
|
bot.classname = "monster_shadowclone";
|
||
|
bot.ideal_yaw = bot.angles * '0 1 0';
|
||
|
bot.yaw_speed = 120;
|
||
|
bot.view_ofs = '0 0 22';
|
||
|
|
||
|
//set up our monflag
|
||
|
bot.monflag = "TRUE";
|
||
|
|
||
|
// begin his thinking
|
||
|
bot.nextthink = time + 0.1 + random();
|
||
|
bot.think = bot.th_run;
|
||
|
|
||
|
};
|