-// size
const vector ANIMUS_MIN = '-41 -41 -31';
const vector ANIMUS_MAX = '41 41 31';
-// model
string ANIMUS_MODEL = "models/monsters/demon.mdl";
#ifdef SVQC
-// cvars
float autocvar_g_monster_animus;
float autocvar_g_monster_animus_health;
float autocvar_g_monster_animus_attack_jump_damage;
float autocvar_g_monster_animus_speed_walk;
float autocvar_g_monster_animus_speed_run;
-// animations
const float animus_anim_stand = 0;
const float animus_anim_walk = 1;
const float animus_anim_run = 2;
const float animus_anim_death = 5;
const float animus_anim_attack = 6;
-void animus_think ()
+void animus_think()
{
self.think = animus_think;
self.nextthink = time + self.ticrate;
monster_move(autocvar_g_monster_animus_speed_run, autocvar_g_monster_animus_speed_walk, 100, animus_anim_run, animus_anim_walk, animus_anim_stand);
}
-void animus_touch_jump ()
+void animus_touch_jump()
{
if (self.health <= 0)
return;
return FALSE;
}
-void animus_die ()
+void animus_die()
{
Monster_CheckDropCvars ("animus");
monster_hook_death(); // for post-death mods
}
-void animus_spawn ()
+void animus_spawn()
{
if not(self.health)
self.health = autocvar_g_monster_animus_health;
monster_hook_spawn(); // for post-spawn mods
}
-void spawnfunc_monster_animus ()
-{
+void spawnfunc_monster_animus()
+{
if not(autocvar_g_monster_animus) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_animus;
-// size
const vector BRUISER_MIN = '-20 -20 -31';
const vector BRUISER_MAX = '20 20 53';
-// model
string BRUISER_MODEL = "models/monsters/knight.mdl";
#ifdef SVQC
-// cvars
float autocvar_g_monster_bruiser;
float autocvar_g_monster_bruiser_health;
float autocvar_g_monster_bruiser_melee_damage;
float autocvar_g_monster_bruiser_speed_walk;
float autocvar_g_monster_bruiser_speed_run;
-// animations
const float bruiser_anim_stand = 0;
const float bruiser_anim_run = 1;
const float bruiser_anim_runattack = 2;
const float bruiser_anim_death1 = 9;
const float bruiser_anim_death2 = 10;
-void bruiser_think ()
+void bruiser_think()
{
self.think = bruiser_think;
self.nextthink = time + self.ticrate;
return FALSE;
}
-void bruiser_die ()
+void bruiser_die()
{
Monster_CheckDropCvars ("bruiser");
monster_hook_death(); // for post-death mods
}
-void bruiser_spawn ()
+void bruiser_spawn()
{
if not(self.health)
self.health = autocvar_g_monster_bruiser_health;
monster_hook_spawn(); // for post-spawn mods
}
-void spawnfunc_monster_bruiser ()
-{
+void spawnfunc_monster_bruiser()
+{
if not(autocvar_g_monster_bruiser) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_bruiser;
-// size
const vector BRUTE_MIN = '-36 -36 -20';
const vector BRUTE_MAX = '36 36 50';
-// model
string BRUTE_MODEL = "models/monsters/ogre.dpm";
#ifdef SVQC
-// cvars
float autocvar_g_monster_brute;
float autocvar_g_monster_brute_health;
float autocvar_g_monster_brute_chainsaw_damage;
float autocvar_g_monster_brute_attack_grenade_force;
float autocvar_g_monster_brute_attack_grenade_radius;
-// animations
const float brute_anim_idle = 0;
const float brute_anim_walk = 1;
const float brute_anim_run = 2;
}
void spawnfunc_monster_brute()
-{
+{
if not(autocvar_g_monster_brute) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_brute;
-// size
const vector CERBERUS_MIN = '-16 -16 -24';
const vector CERBERUS_MAX = '16 16 12';
-// model
string CERBERUS_MODEL = "models/monsters/dog.dpm";
#ifdef SVQC
-// cvars
float autocvar_g_monster_cerberus;
float autocvar_g_monster_cerberus_health;
float autocvar_g_monster_cerberus_bite_damage;
float autocvar_g_monster_cerberus_speed_walk;
float autocvar_g_monster_cerberus_speed_run;
-// animations
const float cerberus_anim_idle = 0;
const float cerberus_anim_walk = 1;
const float cerberus_anim_run = 2;
}
void spawnfunc_monster_cerberus()
-{
+{
if not(autocvar_g_monster_cerberus) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_cerberus;
-// size
const vector KNIGHT_MIN = '-20 -20 -32';
const vector KNIGHT_MAX = '20 20 41';
-// model
string KNIGHT_MODEL = "models/monsters/hknight.mdl";
#ifdef SVQC
-// cvars
float autocvar_g_monster_knight;
float autocvar_g_monster_knight_health;
float autocvar_g_monster_knight_melee_damage;
float autocvar_g_monster_knight_jump_damage;
float autocvar_g_monster_knight_jump_dist;
-// animations
const float knight_anim_stand = 0;
const float knight_anim_walk = 1;
const float knight_anim_run = 2;
}
void spawnfunc_monster_knight()
-{
+{
if not(autocvar_g_monster_knight) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_knight;
-// size
const vector MAGE_MIN = '-36 -36 -24';
const vector MAGE_MAX = '36 36 50';
-// model
string MAGE_MODEL = "models/monsters/mage.dpm";
#ifdef SVQC
-// cvars
float autocvar_g_monster_mage;
float autocvar_g_monster_mage_health;
float autocvar_g_monster_mage_speed;
float autocvar_g_monster_mage_attack_grenade_force;
float autocvar_g_monster_mage_attack_grenade_chance;
-// animations
const float mage_anim_idle = 0;
const float mage_anim_walk = 1;
const float mage_anim_attack = 2;
}
void spawnfunc_monster_mage()
-{
+{
if not(autocvar_g_monster_mage) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_mage;
-// size
const vector SHAMBLER_MIN = '-41 -41 -31';
const vector SHAMBLER_MAX = '41 41 65';
-// model
string SHAMBLER_MODEL = "models/monsters/shambler.mdl";
#ifdef SVQC
-// cvars
float autocvar_g_monster_shambler;
float autocvar_g_monster_shambler_health;
float autocvar_g_monster_shambler_damage;
float autocvar_g_monster_shambler_speed_walk;
float autocvar_g_monster_shambler_speed_run;
-// animations
const float shambler_anim_stand = 0;
const float shambler_anim_walk = 1;
const float shambler_anim_run = 2;
const float shambler_anim_pain = 7;
const float shambler_anim_death = 8;
-void shambler_think ()
+void shambler_think()
{
self.think = shambler_think;
self.nextthink = time + self.ticrate;
monster_move(autocvar_g_monster_shambler_speed_run, autocvar_g_monster_shambler_speed_walk, 300, shambler_anim_run, shambler_anim_walk, shambler_anim_stand);
}
-void shambler_smash ()
+void shambler_smash()
{
self.monster_delayedattack = func_null;
self.delay = -1;
monster_melee(self.enemy, autocvar_g_monster_shambler_damage, 0.3, DEATH_MONSTER_SHAMBLER_SMASH, TRUE);
}
-void shambler_delayedsmash ()
+void shambler_delayedsmash()
{
monsters_setframe(shambler_anim_smash);
self.monster_delayedattack = shambler_smash;
}
}
-void CastLightning ()
+void CastLightning()
{
self.monster_delayedattack = func_null;
self.delay = -1;
return FALSE;
}
-void shambler_die ()
+void shambler_die()
{
Monster_CheckDropCvars ("shambler");
monster_hook_death(); // for post-death mods
}
-void shambler_spawn ()
+void shambler_spawn()
{
if not(self.health)
self.health = autocvar_g_monster_shambler_health;
monster_hook_spawn(); // for post-spawn mods
}
-void spawnfunc_monster_shambler ()
-{
+void spawnfunc_monster_shambler()
+{
if not(autocvar_g_monster_shambler) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_shambler;
-// size
const vector SLIME_MIN = '-16 -16 -24';
const vector SLIME_MAX = '16 16 16';
-// model
string SLIME_MODEL = "models/monsters/slime.dpm";
#ifdef SVQC
-// cvars
float autocvar_g_monster_slime;
float autocvar_g_monster_slime_health;
float autocvar_g_monster_slime_speed_walk;
float autocvar_g_monster_slime_speed_run;
-// animations
const float slime_anim_walk = 0;
const float slime_anim_idle = 1;
const float slime_anim_jump = 2;
const float slime_anim_die = 4;
const float slime_anim_pain = 5;
-void() slime_dead;
-
void slime_think()
{
self.think = slime_think;
}
void spawnfunc_monster_slime()
-{
+{
if not(autocvar_g_monster_slime) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_slime;
-// size
const vector SPIDER_MIN = '-18 -18 -25';
const vector SPIDER_MAX = '18 18 30';
-// model
string SPIDER_MODEL = "models/monsters/spider.dpm";
#ifdef SVQC
-// cvars
float autocvar_g_monster_spider;
float autocvar_g_monster_spider_stopspeed;
float autocvar_g_monster_spider_attack_leap_delay;
float autocvar_g_monster_spider_speed_run;
float autocvar_g_monster_spider_attack_type;
-// animations
const float spider_anim_idle = 0;
const float spider_anim_walk = 1;
const float spider_anim_attack = 2;
monster_move(autocvar_g_monster_spider_speed_run, autocvar_g_monster_spider_speed_walk, autocvar_g_monster_spider_stopspeed, spider_anim_walk, spider_anim_walk, spider_anim_idle);
}
-void spider_web_explode ()
+void spider_web_explode()
{
float damg = 0, edamg = 0, rad = 1;
switch(self.realowner.spider_type)
remove (self);
}
-void spider_web_touch ()
+void spider_web_touch()
{
PROJECTILE_TOUCH;
return FALSE;
}
-void spider_die ()
+void spider_die()
{
Monster_CheckDropCvars ("spider");
-// size
const vector STINGRAY_MIN = '-20 -20 -31';
const vector STINGRAY_MAX = '20 20 20';
-// model
string STINGRAY_MODEL = "models/monsters/fish.mdl";
#ifdef SVQC
-// cvars
float autocvar_g_monster_stingray;
float autocvar_g_monster_stingray_health;
float autocvar_g_monster_stingray_damage;
float autocvar_g_monster_stingray_speed_walk;
float autocvar_g_monster_stingray_speed_run;
-// animations
const float stingray_anim_attack = 0;
const float stingray_anim_death = 1;
const float stingray_anim_swim = 2;
const float stingray_anim_pain = 3;
-void stingray_think ()
+void stingray_think()
{
self.think = stingray_think;
self.nextthink = time + self.ticrate;
return FALSE;
}
-void stingray_die ()
+void stingray_die()
{
Monster_CheckDropCvars ("stingray");
monster_hook_death(); // for post-death mods
}
-void stingray_spawn ()
+void stingray_spawn()
{
if not(self.health)
self.health = autocvar_g_monster_stingray_health;
monster_hook_spawn(); // for post-spawn mods
}
-void spawnfunc_monster_stingray ()
-{
+void spawnfunc_monster_stingray()
+{
if not(autocvar_g_monster_stingray) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_stingray;
-// size
const vector WYVERN_MIN = '-20 -20 -58';
const vector WYVERN_MAX = '20 20 20';
-// model
string WYVERN_MODEL = "models/monsters/wizard.mdl";
#ifdef SVQC
-// cvars
float autocvar_g_monster_wyvern;
float autocvar_g_monster_wyvern_health;
float autocvar_g_monster_wyvern_speed_walk;
float autocvar_g_monster_wyvern_fireball_damagetime;
float autocvar_g_monster_wyvern_fireball_speed;
-// animations
const float wyvern_anim_hover = 0;
const float wyvern_anim_fly = 1;
const float wyvern_anim_magic = 2;
const float wyvern_anim_pain = 3;
const float wyvern_anim_death = 4;
-void wyvern_think ()
+void wyvern_think()
{
self.think = wyvern_think;
self.nextthink = time + self.ticrate;
}
void spawnfunc_monster_wyvern()
-{
+{
if not(autocvar_g_monster_wyvern) { remove(self); return; }
self.monster_spawnfunc = spawnfunc_monster_wyvern;
-// size
const vector ZOMBIE_MIN = '-18 -18 -25';
const vector ZOMBIE_MAX = '18 18 47';
-// model
string ZOMBIE_MODEL = "models/monsters/zombie.dpm";
#ifdef SVQC
-// cvars
float autocvar_g_monster_zombie;
float autocvar_g_monster_zombie_stopspeed;
float autocvar_g_monster_zombie_attack_leap_damage;
float autocvar_g_monster_zombie_speed_walk;
float autocvar_g_monster_zombie_speed_run;
-// animations
const float zombie_anim_attackleap = 0;
const float zombie_anim_attackrun1 = 1;
const float zombie_anim_attackrun2 = 2;
monster_move(autocvar_g_monster_zombie_speed_run, autocvar_g_monster_zombie_speed_walk, autocvar_g_monster_zombie_stopspeed, zombie_anim_runforward, zombie_anim_runforward, zombie_anim_idle);
}
-void zombie_attack_leap_touch ()
+void zombie_attack_leap_touch()
{
if (self.health <= 0)
return;
return FALSE;
}
-void zombie_die ()
+void zombie_die()
{
Monster_CheckDropCvars ("zombie");
// called when a monster is dropping loot
// INPUT, OUTPUT:
.void() monster_loot;
+ entity other;
MUTATOR_HOOKABLE(MonsterMove);
// called when a monster moves