set g_monsters_skill_hard 5 "Monster hard skill level (used for skill based functions)"
set g_monsters_skill_insane 7 "Monster insane skill level (used for skill based functions)"
set g_monsters_skill_nightmare 10 "Monster nightmare skill level (used for skill based functions)"
-set g_monsters_spawn_list "ogre demon shambler bruiser marine wyvern dog slime hellknight fish mage zombie spider" "monsters not listed here will spawn as bruisers"
+set g_monsters_spawn_list "ogre animus shambler bruiser marine wyvern dog slime hellknight fish mage zombie spider" "monsters not listed here will spawn as bruisers"
// Ogre
set g_monster_ogre 1 "Enable Ogres"
set g_monster_ogre_attack_grenade_radius 200 "Ogre grenade explosion radius"
set g_monster_ogre_attack_grenade_force 15 "Ogre grenade knockback"
-// Fiend
-set g_monster_demon 1 "Enable Fiends"
-set g_monster_demon_health 300 "Fiend health"
-set g_monster_demon_attack_jump_damage 40 "Fiend jump attack damage"
-set g_monster_demon_damage 20 "Fiend melee attack damage"
-set g_monster_demon_drop health "Fiend drops this item on death"
-set g_monster_demon_drop_size medium "Size of the item Fiends drop. Possible values are: small, medium, large"
-set g_monster_demon_speed_walk 150 "Fiend walk speed"
-set g_monster_demon_speed_run 300 "Fiend run speed"
+// Animus
+set g_monster_animus 1 "Enable Animuses"
+set g_monster_animus_health 300 "Animus health"
+set g_monster_animus_attack_jump_damage 40 "Animus jump attack damage"
+set g_monster_animus_damage 20 "Animus melee attack damage"
+set g_monster_animus_drop health "Animus drops this item on death"
+set g_monster_animus_drop_size medium "Size of the item Animuses drop. Possible values are: small, medium, large"
+set g_monster_animus_speed_walk 150 "Animus walk speed"
+set g_monster_animus_speed_run 300 "Animus run speed"
// Shambler
set g_monster_shambler 1 "Enable Shamblers"
precache_model(OGRE_MODEL);
break;
}
- case MONSTER_DEMON:
+ case MONSTER_ANIMUS:
{
- precache_model(DEMON_MODEL);
+ precache_model(ANIMUS_MODEL);
break;
}
case MONSTER_SHAMBLER:
mid2info_max = OGRE_MAX;
break;
}
- case MONSTER_DEMON:
+ case MONSTER_ANIMUS:
{
- mid2info_model = DEMON_MODEL;
- mid2info_name = "Fiend";
- mid2info_min = DEMON_MIN;
- mid2info_max = DEMON_MAX;
+ mid2info_model = ANIMUS_MODEL;
+ mid2info_name = "Animus";
+ mid2info_min = ANIMUS_MIN;
+ mid2info_max = ANIMUS_MAX;
if(self) self.scale = 1.3;
break;
}
DEATHTYPE(DEATH_MIRRORDAMAGE, DEATH_SELF_BETRAYAL, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_DOG_BITE, DEATH_SELF_MON_DOG_BITE, NO_MSG, DEATH_MONSTER_FIRST) \
DEATHTYPE(DEATH_MONSTER_DOG_JUMP, DEATH_SELF_MON_DOG_JUMP, NO_MSG, NORMAL_POS) \
- DEATHTYPE(DEATH_MONSTER_FIEND, DEATH_SELF_MON_FIEND, NO_MSG, NORMAL_POS) \
+ DEATHTYPE(DEATH_MONSTER_ANIMUS, DEATH_SELF_MON_ANIMUS, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_FISH, DEATH_SELF_MON_FISH, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_HKNIGHT_CRUSH, DEATH_SELF_MON_HKNIGHT_CRUSH, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_HKNIGHT_FBALL, DEATH_SELF_MON_HKNIGHT_FBALL, NO_MSG, NORMAL_POS) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_LAVA, 2, 1, "s1 s2loc spree_lost", "s1", "notify_lava", _("^BG%s^K1 turned into hot slag%s%s\n"), _("^BG%s^K1 found a hot place%s%s\n")) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_DOG_BITE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was mauled by a Rottweiler%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_DOG_JUMP, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 didn't see the pouncing Rottweiler%s%s\n"), "") \
- MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_FIEND, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was eviscerated by a Fiend%s%s\n"), "") \
+ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ANIMUS, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was eviscerated by an Animus%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_FISH, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was fed to the Rotfish%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_HKNIGHT_CRUSH, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was crushed by a pouncing Hell-Knight%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_HKNIGHT_FBALL, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was turned to ash by a Hell-Knight%s%s\n"), "") \
MSG_MULTI_NOTIF(1, DEATH_SELF_LAVA, NO_MSG, INFO_DEATH_SELF_LAVA, CENTER_DEATH_SELF_LAVA) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_DOG_BITE, NO_MSG, INFO_DEATH_SELF_MON_DOG_BITE, CENTER_DEATH_SELF_MONSTER) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_DOG_JUMP, NO_MSG, INFO_DEATH_SELF_MON_DOG_JUMP, CENTER_DEATH_SELF_MONSTER) \
- MSG_MULTI_NOTIF(1, DEATH_SELF_MON_FIEND, NO_MSG, INFO_DEATH_SELF_MON_FIEND, CENTER_DEATH_SELF_MONSTER) \
+ MSG_MULTI_NOTIF(1, DEATH_SELF_MON_ANIMUS, NO_MSG, INFO_DEATH_SELF_MON_ANIMUS, CENTER_DEATH_SELF_MONSTER) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_FISH, NO_MSG, INFO_DEATH_SELF_MON_FISH, CENTER_DEATH_SELF_MONSTER) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_HKNIGHT_CRUSH, NO_MSG, INFO_DEATH_SELF_MON_HKNIGHT_CRUSH, CENTER_DEATH_SELF_MONSTER) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_HKNIGHT_FBALL, NO_MSG, INFO_DEATH_SELF_MON_HKNIGHT_FBALL, CENTER_DEATH_SELF_MONSTER) \
me.TR(me);
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "zombie", _("Zombie")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "ogre", _("Ogre")));
- me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "demon", _("Fiend")));
+ me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "animus", _("Animus")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "spider", _("Spider")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "bruiser", _("Bruiser")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "hellknight", _("Hell-Knight")));
float MONSTER_FIRST = 1;
float MONSTER_ZOMBIE = 2;
float MONSTER_OGRE = 3;
-float MONSTER_DEMON = 4;
+float MONSTER_ANIMUS = 4;
float MONSTER_SHAMBLER = 5;
float MONSTER_BRUISER = 6;
float MONSTER_MARINE = 7;
--- /dev/null
+// 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_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_leap = 3;
+const float animus_anim_pain = 4;
+const float animus_anim_death = 5;
+const float animus_anim_attack = 6;
+
+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 ()
+{
+ if (self.health <= 0)
+ return;
+
+ if (monster_isvalidtarget(other, self))
+ {
+ if (vlen(self.velocity) > 300)
+ {
+ Damage(other, self, self, autocvar_g_monster_animus_attack_jump_damage * monster_skill, DEATH_MONSTER_ANIMUS, other.origin, normalize(other.origin - self.origin));
+ self.touch = MonsterTouch; // instantly turn it off to stop damage spam
+ }
+ }
+
+ if(trace_dphitcontents)
+ self.touch = MonsterTouch;
+}
+
+float animus_attack(float attack_type)
+{
+ switch(attack_type)
+ {
+ case MONSTER_ATTACK_MELEE:
+ {
+ monsters_setframe(animus_anim_attack);
+ self.attack_finished_single = time + 1;
+ monster_melee(self.enemy, autocvar_g_monster_animus_damage, 0.3, DEATH_MONSTER_ANIMUS, TRUE);
+
+ return TRUE;
+ }
+ case MONSTER_ATTACK_RANGED:
+ {
+ makevectors(self.angles);
+ if(monster_leap(animus_anim_leap, animus_touch_jump, v_forward * 700 + '0 0 300', 0.8))
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+void animus_die ()
+{
+ Monster_CheckDropCvars ("animus");
+
+ self.think = monster_dead_think;
+ self.nextthink = time + self.ticrate;
+ self.ltime = time + 5;
+ monsters_setframe(animus_anim_death);
+
+ monster_hook_death(); // for post-death mods
+}
+
+void animus_spawn ()
+{
+ if not(self.health)
+ self.health = autocvar_g_monster_animus_health;
+
+ self.damageforcescale = 0;
+ self.classname = "monster_animus";
+ self.monster_attackfunc = animus_attack;
+ self.nextthink = time + random() * 0.5 + 0.1;
+ self.think = animus_think;
+
+ monsters_setframe(animus_anim_stand);
+
+ monster_setupsounds("animus");
+
+ monster_hook_spawn(); // for post-spawn mods
+}
+
+void spawnfunc_monster_animus ()
+{
+ if not(autocvar_g_monster_animus) { remove(self); return; }
+
+ self.monster_spawnfunc = spawnfunc_monster_animus;
+
+ if(Monster_CheckAppearFlags(self))
+ return;
+
+ self.scale = 1.3;
+
+ if not (monster_initialize(
+ "Animus", MONSTER_ANIMUS,
+ ANIMUS_MIN, ANIMUS_MAX,
+ FALSE,
+ animus_die, animus_spawn))
+ {
+ remove(self);
+ return;
+ }
+}
+
+// compatibility with old spawns
+void spawnfunc_monster_demon1() { spawnfunc_monster_animus(); }
+void spawnfunc_monster_demon() { spawnfunc_monster_animus(); }
+
+#endif // SVQC
+++ /dev/null
-// size
-const vector DEMON_MIN = '-41 -41 -31';
-const vector DEMON_MAX = '41 41 31';
-
-// model
-string DEMON_MODEL = "models/monsters/demon.mdl";
-
-#ifdef SVQC
-// cvars
-float autocvar_g_monster_demon;
-float autocvar_g_monster_demon_health;
-float autocvar_g_monster_demon_attack_jump_damage;
-float autocvar_g_monster_demon_damage;
-float autocvar_g_monster_demon_speed_walk;
-float autocvar_g_monster_demon_speed_run;
-
-// animations
-const float demon_anim_stand = 0;
-const float demon_anim_walk = 1;
-const float demon_anim_run = 2;
-const float demon_anim_leap = 3;
-const float demon_anim_pain = 4;
-const float demon_anim_death = 5;
-const float demon_anim_attack = 6;
-
-void demon_think ()
-{
- self.think = demon_think;
- self.nextthink = time + self.ticrate;
-
- monster_move(autocvar_g_monster_demon_speed_run, autocvar_g_monster_demon_speed_walk, 100, demon_anim_run, demon_anim_walk, demon_anim_stand);
-}
-
-void Demon_JumpTouch ()
-{
- if (self.health <= 0)
- return;
-
- if (monster_isvalidtarget(other, self))
- {
- if (vlen(self.velocity) > 300)
- {
- Damage(other, self, self, autocvar_g_monster_demon_attack_jump_damage * monster_skill, DEATH_MONSTER_FIEND, other.origin, normalize(other.origin - self.origin));
- self.touch = MonsterTouch; // instantly turn it off to stop damage spam
- }
- }
-
- if(self.flags & FL_ONGROUND)
- self.touch = MonsterTouch;
-}
-
-float demon_attack(float attack_type)
-{
- switch(attack_type)
- {
- case MONSTER_ATTACK_MELEE:
- {
- monsters_setframe(demon_anim_attack);
- self.attack_finished_single = time + 1;
- monster_melee(self.enemy, autocvar_g_monster_demon_damage, 0.3, DEATH_MONSTER_FIEND, TRUE);
-
- return TRUE;
- }
- case MONSTER_ATTACK_RANGED:
- {
- makevectors(self.angles);
- if(monster_leap(demon_anim_leap, Demon_JumpTouch, v_forward * 700 + '0 0 300', 0.8))
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-void demon_die ()
-{
- Monster_CheckDropCvars ("demon");
-
- self.think = monster_dead_think;
- self.nextthink = time + self.ticrate;
- self.ltime = time + 5;
- monsters_setframe(demon_anim_death);
-
- monster_hook_death(); // for post-death mods
-}
-
-void demon_spawn ()
-{
- if not(self.health)
- self.health = autocvar_g_monster_demon_health;
-
- self.damageforcescale = 0;
- self.classname = "monster_demon";
- self.monster_attackfunc = demon_attack;
- self.nextthink = time + random() * 0.5 + 0.1;
- self.think = demon_think;
-
- monsters_setframe(demon_anim_stand);
-
- monster_setupsounds("demon");
-
- monster_hook_spawn(); // for post-spawn mods
-}
-
-void spawnfunc_monster_demon ()
-{
- if not(autocvar_g_monster_demon) { remove(self); return; }
-
- self.monster_spawnfunc = spawnfunc_monster_demon;
-
- if(Monster_CheckAppearFlags(self))
- return;
-
- self.scale = 1.3;
-
- if not (monster_initialize(
- "Fiend", MONSTER_DEMON,
- DEMON_MIN, DEMON_MAX,
- FALSE,
- demon_die, demon_spawn))
- {
- remove(self);
- return;
- }
-}
-
-// compatibility with old spawns
-void spawnfunc_monster_demon1() { spawnfunc_monster_demon(); }
-
-#endif // SVQC
return;
}
- if (trace_dphitcontents)
+ if(trace_dphitcontents)
{
self.touch = MonsterTouch;
self.movetype = MOVETYPE_WALK;
// Monsters
#include "monster/ogre.qc"
-#include "monster/demon.qc"
+#include "monster/animus.qc"
#include "monster/shambler.qc"
#include "monster/bruiser.qc"
#include "monster/soldier.qc"
case MONSTER_OGRE:
case MONSTER_SHAMBLER:
case MONSTER_MAGE:
- case MONSTER_DEMON:
+ case MONSTER_ANIMUS:
return SWARM_STRONG;
default: return SWARM_NORMAL;
}
{
case MONSTER_ZOMBIE: return "zombie";
case MONSTER_OGRE: return "ogre";
- case MONSTER_DEMON: return "demon";
+ case MONSTER_ANIMUS: return "animus";
case MONSTER_SHAMBLER: return "shambler";
case MONSTER_BRUISER: return "bruiser";
case MONSTER_MARINE: return "marine";
case MONSTER_SHAMBLER:
case MONSTER_MAGE:
case MONSTER_HELLKNIGHT:
- case MONSTER_DEMON:
+ case MONSTER_ANIMUS:
return SWARM_NORMAL;
case MONSTER_WYVERN:
return SWARM_FLY;
{
RandomSelection_Init();
- if(n_demons) RandomSelection_Add(world, MONSTER_DEMON, "", 1, 1);
+ if(n_animuses) RandomSelection_Add(world, MONSTER_ANIMUS, "", 1, 1);
if(n_shalraths) RandomSelection_Add(world, MONSTER_MAGE, "", 1, 1);
if(n_soldiers) RandomSelection_Add(world, MONSTER_MARINE, "", 1, 1);
if(n_hknights) RandomSelection_Add(world, MONSTER_HELLKNIGHT, "", 1, 1);
mc += 1;
DistributeEvenly_Init(maxmonsters, mc);
- n_demons = DistributeEvenly_Get(1);
+ n_animuses = DistributeEvenly_Get(1);
n_ogres = DistributeEvenly_Get(1);
n_dogs = DistributeEvenly_Get(1);
n_bruisers = DistributeEvenly_Get(1);
{
case MONSTER_ZOMBIE: n_zombies -= 1; break;
case MONSTER_OGRE: n_ogres -= 1; break;
- case MONSTER_DEMON: n_demons -= 1; break;
+ case MONSTER_ANIMUS: n_animuses -= 1; break;
case MONSTER_SHAMBLER: n_shamblers -= 1; break;
case MONSTER_BRUISER: n_bruisers -= 1; break;
case MONSTER_MARINE: n_soldiers -= 1; break;
// Counters
float monster_count, totalmonsters;
-float n_bruisers, n_dogs, n_ogres, n_shamblers, n_wyverns, n_shalraths, n_soldiers, n_hknights, n_demons, n_zombies, n_slimes, n_fish, n_spiders;
+float n_bruisers, n_dogs, n_ogres, n_shamblers, n_wyverns, n_shalraths, n_soldiers, n_hknights, n_animuses, n_zombies, n_slimes, n_fish, n_spiders;
float current_monsters;
float waterspawns_count, flyspawns_count;
float wave_count, max_waves;