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 animus shambler bruiser marine wyvern dog slime knight fish mage zombie spider" "monsters not listed here will spawn as bruisers"
+set g_monsters_spawn_list "ogre animus shambler bruiser marine wyvern cerberus slime knight fish mage zombie spider" "monsters not listed here will spawn as bruisers"
// Ogre
set g_monster_ogre 1 "Enable Ogres"
set g_monster_wyvern_fireball_radius 70 "Wyvern fireball projectile damage radius"
set g_monster_wyvern_fireball_speed 400 "Wyvern fireball projectile speed"
-// Rottweiler
-set g_monster_dog 1 "Enable Rottweilers"
-set g_monster_dog_health 25 "Rottweiler health"
-set g_monster_dog_bite_damage 15 "Rottweiler bite attack damage"
-set g_monster_dog_attack_jump_damage 30 "Rottweiler jump attack damage"
-set g_monster_dog_drop health "Rottweiler drops this item on death"
-set g_monster_dog_drop_size small "Size of the item Rottweilers drop. Possible values are: small, medium, large"
-set g_monster_dog_speed_walk 60 "Rottweiler walk speed"
-set g_monster_dog_speed_run 120 "Rottweiler run speed"
+// Cerberus
+set g_monster_cerberus 1 "Enable Cerberuss"
+set g_monster_cerberus_health 25 "Cerberus health"
+set g_monster_cerberus_bite_damage 15 "Cerberus bite attack damage"
+set g_monster_cerberus_attack_jump_damage 30 "Cerberus jump attack damage"
+set g_monster_cerberus_drop health "Cerberus drops this item on death"
+set g_monster_cerberus_drop_size small "Size of the item Cerberuss drop. Possible values are: small, medium, large"
+set g_monster_cerberus_speed_walk 60 "Cerberus walk speed"
+set g_monster_cerberus_speed_run 120 "Cerberus run speed"
// Slime
set g_monster_slime 1 "Enable Slime"
set g_monster_spider_speed_run 400 "Spider run speed"
set g_monster_spider_stopspeed 100 Speed at which spider stops"
set g_monster_spider_drop health "Spider drops this item on death"
-set g_monster_spider_drop_size large "Size of the item spiders drop. Possible values are: small, medium, large"
\ No newline at end of file
+set g_monster_spider_drop_size large "Size of the item spiders drop. Possible values are: small, medium, large"
precache_model(WYVERN_MODEL);
break;
}
- case MONSTER_DOG:
+ case MONSTER_CERBERUS:
{
- precache_model(DOG_MODEL);
+ precache_model(CERBERUS_MODEL);
break;
}
case MONSTER_SLIME:
if(self) self.scale = 1.3;
break;
}
- case MONSTER_DOG:
+ case MONSTER_CERBERUS:
{
- mid2info_model = DOG_MODEL;
+ mid2info_model = CERBERUS_MODEL;
mid2info_name = "Cerberus";
- mid2info_min = DOG_MIN;
- mid2info_max = DOG_MAX;
+ mid2info_min = CERBERUS_MIN;
+ mid2info_max = CERBERUS_MAX;
break;
}
case MONSTER_SLIME:
DEATHTYPE(DEATH_KILL, DEATH_SELF_SUICIDE, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_LAVA, DEATH_SELF_LAVA, DEATH_MURDER_LAVA, NORMAL_POS) \
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_CERBERUS_BITE, DEATH_SELF_MON_CERBERUS_BITE, NO_MSG, DEATH_MONSTER_FIRST) \
+ DEATHTYPE(DEATH_MONSTER_CERBERUS_JUMP, DEATH_SELF_MON_CERBERUS_JUMP, 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_KNIGHT_CRUSH, DEATH_SELF_MON_KNIGHT_CRUSH, NO_MSG, NORMAL_POS) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FIRE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 became a bit too crispy%s%s\n"), _("^BG%s^K1 felt a little hot%s%s\n")) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC, 2, 1, "s1 s2loc spree_lost", "s1", "notify_selfkill", _("^BG%s^K1 died%s%s\n"), "") \
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_CERBERUS_BITE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was mauled by a Cerberus%s%s\n"), "") \
+ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_CERBERUS_JUMP, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 didn't see the pouncing Cerberus%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_KNIGHT_CRUSH, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was crushed by a pouncing Knight%s%s\n"), "") \
MSG_MULTI_NOTIF(1, DEATH_SELF_FIRE, NO_MSG, INFO_DEATH_SELF_FIRE, CENTER_DEATH_SELF_FIRE) \
MSG_MULTI_NOTIF(1, DEATH_SELF_GENERIC, NO_MSG, INFO_DEATH_SELF_GENERIC, CENTER_DEATH_SELF_GENERIC) \
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_CERBERUS_BITE, NO_MSG, INFO_DEATH_SELF_MON_CERBERUS_BITE, CENTER_DEATH_SELF_MONSTER) \
+ MSG_MULTI_NOTIF(1, DEATH_SELF_MON_CERBERUS_JUMP, NO_MSG, INFO_DEATH_SELF_MON_CERBERUS_JUMP, 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_KNIGHT_CRUSH, NO_MSG, INFO_DEATH_SELF_MON_KNIGHT_CRUSH, CENTER_DEATH_SELF_MONSTER) \
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "shambler", _("Shambler")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "soldier", _("Marine")));
me.TR(me);
- me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "dog", _("Cerberus")));
+ me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "cerberus", _("Cerberus")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "slime", _("Slime")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "fish", _("Rotfish")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "mage", _("Mage")));
self.enemy = world;
self.movetype = MOVETYPE_TOSS;
self.moveto = self.origin;
+ self.touch = MonsterTouch; // reset incase monster was pouncing
if not(self.flags & FL_FLY)
self.velocity = '0 0 0';
float MONSTER_BRUISER = 6;
float MONSTER_MARINE = 7;
float MONSTER_WYVERN = 8;
-float MONSTER_DOG = 9;
+float MONSTER_CERBERUS = 9;
float MONSTER_SLIME = 10;
float MONSTER_KNIGHT = 11;
float MONSTER_FISH = 12;
--- /dev/null
+// 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_attack_jump_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;
+const float cerberus_anim_attack = 3;
+const float cerberus_anim_die = 4;
+const float cerberus_anim_pain = 5;
+
+void cerberus_think()
+{
+ self.think = cerberus_think;
+ self.nextthink = time + self.ticrate;
+
+ monster_move(autocvar_g_monster_cerberus_speed_run, autocvar_g_monster_cerberus_speed_walk, 50, cerberus_anim_run, cerberus_anim_walk, cerberus_anim_idle);
+}
+
+void cerberus_touch_jump()
+{
+ if (other.takedamage)
+ if (vlen(self.velocity) > 300)
+ {
+ Damage(self.enemy, self, self, autocvar_g_monster_cerberus_attack_jump_damage * monster_skill, DEATH_MONSTER_CERBERUS_JUMP, self.enemy.origin, normalize(self.enemy.origin - self.origin));
+ self.touch = MonsterTouch;
+ }
+
+ if(trace_dphitcontents)
+ self.touch = MonsterTouch;
+}
+
+float cerberus_attack(float attack_type)
+{
+ switch(attack_type)
+ {
+ case MONSTER_ATTACK_MELEE:
+ {
+ monsters_setframe(cerberus_anim_attack);
+ self.attack_finished_single = time + 0.7;
+ monster_melee(self.enemy, autocvar_g_monster_cerberus_bite_damage, 0.2, DEATH_MONSTER_CERBERUS_BITE, TRUE);
+
+ return TRUE;
+ }
+ case MONSTER_ATTACK_RANGED:
+ {
+ makevectors(self.angles);
+ if(monster_leap(cerberus_anim_attack, cerberus_touch_jump, v_forward * 300 + '0 0 200', 0.8))
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+void cerberus_die()
+{
+ Monster_CheckDropCvars ("cerberus");
+
+ self.think = monster_dead_think;
+ self.nextthink = time + self.ticrate;
+ self.ltime = time + 5;
+ monsters_setframe(cerberus_anim_die);
+
+ monster_hook_death(); // for post-death mods
+}
+
+void cerberus_spawn()
+{
+ if not(self.health)
+ self.health = autocvar_g_monster_cerberus_health;
+
+ self.damageforcescale = 0;
+ self.classname = "monster_cerberus";
+ self.monster_attackfunc = cerberus_attack;
+ self.nextthink = time + random() * 0.5 + 0.1;
+ self.think = cerberus_think;
+
+ monsters_setframe(cerberus_anim_idle);
+
+ monster_setupsounds("cerberus");
+
+ monster_hook_spawn(); // for post-spawn mods
+}
+
+void spawnfunc_monster_cerberus()
+{
+ if not(autocvar_g_monster_cerberus) { remove(self); return; }
+
+ self.monster_spawnfunc = spawnfunc_monster_cerberus;
+
+ if(Monster_CheckAppearFlags(self))
+ return;
+
+ if not (monster_initialize(
+ "Cerberus", MONSTER_CERBERUS,
+ CERBERUS_MIN, CERBERUS_MAX,
+ FALSE,
+ cerberus_die, cerberus_spawn))
+ {
+ remove(self);
+ return;
+ }
+}
+
+// compatibility with old spawns
+void spawnfunc_monster_dog() { spawnfunc_monster_cerberus(); }
+
+#endif // SVQC
+++ /dev/null
-// size
-const vector DOG_MIN = '-16 -16 -24';
-const vector DOG_MAX = '16 16 12';
-
-// model
-string DOG_MODEL = "models/monsters/dog.dpm";
-
-#ifdef SVQC
-// cvars
-float autocvar_g_monster_dog;
-float autocvar_g_monster_dog_health;
-float autocvar_g_monster_dog_bite_damage;
-float autocvar_g_monster_dog_attack_jump_damage;
-float autocvar_g_monster_dog_speed_walk;
-float autocvar_g_monster_dog_speed_run;
-
-// animations
-const float dog_anim_idle = 0;
-const float dog_anim_walk = 1;
-const float dog_anim_run = 2;
-const float dog_anim_attack = 3;
-const float dog_anim_die = 4;
-const float dog_anim_pain = 5;
-
-void dog_think ()
-{
- self.think = dog_think;
- self.nextthink = time + self.ticrate;
-
- monster_move(autocvar_g_monster_dog_speed_run, autocvar_g_monster_dog_speed_walk, 50, dog_anim_run, dog_anim_walk, dog_anim_idle);
-}
-
-void Dog_JumpTouch ()
-{
- if (self.health <= 0)
- return;
-
- if (other.takedamage)
- {
- if (vlen(self.velocity) > 300)
- Damage(self.enemy, self, self, autocvar_g_monster_dog_attack_jump_damage * monster_skill, DEATH_MONSTER_DOG_JUMP, self.enemy.origin, normalize(self.enemy.origin - self.origin));
- }
-
- if(self.flags & FL_ONGROUND)
- self.touch = MonsterTouch;
-}
-
-float cerberus_attack(float attack_type)
-{
- switch(attack_type)
- {
- case MONSTER_ATTACK_MELEE:
- {
- monsters_setframe(dog_anim_attack);
- self.attack_finished_single = time + 0.7;
- monster_melee(self.enemy, autocvar_g_monster_dog_bite_damage, 0.2, DEATH_MONSTER_DOG_BITE, TRUE);
-
- return TRUE;
- }
- case MONSTER_ATTACK_RANGED:
- {
- makevectors(self.angles);
- if(monster_leap(dog_anim_attack, Dog_JumpTouch, v_forward * 300 + '0 0 200', 0.8))
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-void dog_die ()
-{
- Monster_CheckDropCvars ("dog");
-
- self.think = monster_dead_think;
- self.nextthink = time + self.ticrate;
- self.ltime = time + 5;
- monsters_setframe(dog_anim_die);
-
- monster_hook_death(); // for post-death mods
-}
-
-void dog_spawn ()
-{
- if not(self.health)
- self.health = autocvar_g_monster_dog_health;
-
- self.damageforcescale = 0;
- self.classname = "monster_dog";
- self.monster_attackfunc = cerberus_attack;
- self.nextthink = time + random() * 0.5 + 0.1;
- self.think = dog_think;
-
- monsters_setframe(dog_anim_idle);
-
- monster_setupsounds("dog");
-
- monster_hook_spawn(); // for post-spawn mods
-}
-
-void spawnfunc_monster_dog ()
-{
- if not(autocvar_g_monster_dog) { remove(self); return; }
-
- self.monster_spawnfunc = spawnfunc_monster_dog;
-
- if(Monster_CheckAppearFlags(self))
- return;
-
- if not (monster_initialize(
- "Cerberus", MONSTER_DOG,
- DOG_MIN, DOG_MAX,
- FALSE,
- dog_die, dog_spawn))
- {
- remove(self);
- return;
- }
-}
-
-#endif // SVQC
#include "monster/bruiser.qc"
#include "monster/soldier.qc"
#include "monster/wyvern.qc"
-#include "monster/dog.qc"
+#include "monster/cerberus.qc"
#include "monster/slime.qc"
#include "monster/knight.qc"
#include "monster/fish.qc"
case MONSTER_ZOMBIE:
case MONSTER_SPIDER:
case MONSTER_SLIME:
- case MONSTER_DOG:
+ case MONSTER_CERBERUS:
case MONSTER_WYVERN:
case MONSTER_FISH:
return SWARM_WEAK;
case MONSTER_BRUISER: return "bruiser";
case MONSTER_MARINE: return "marine";
case MONSTER_WYVERN: return "wyvern";
- case MONSTER_DOG: return "dog";
+ case MONSTER_CERBERUS: return "cerberus";
case MONSTER_SLIME: return "slime";
case MONSTER_KNIGHT: return "knight";
case MONSTER_FISH: return "fish";
case MONSTER_ZOMBIE:
case MONSTER_SPIDER:
case MONSTER_SLIME:
- case MONSTER_DOG:
+ case MONSTER_CERBERUS:
case MONSTER_OGRE:
case MONSTER_SHAMBLER:
case MONSTER_MAGE:
if(n_zombies) RandomSelection_Add(world, MONSTER_ZOMBIE, "", 1, 1);
if(n_spiders) RandomSelection_Add(world, MONSTER_SPIDER, "", 1, 1);
if(n_ogres) RandomSelection_Add(world, MONSTER_OGRE, "", 1, 1);
- if(n_dogs) RandomSelection_Add(world, MONSTER_DOG, "", 1, 1);
+ if(n_cerberuses) RandomSelection_Add(world, MONSTER_CERBERUS, "", 1, 1);
if(n_bruisers) RandomSelection_Add(world, MONSTER_BRUISER, "", 1, 1);
if(n_shamblers) RandomSelection_Add(world, MONSTER_SHAMBLER, "", 0.2, 0.2);
if(n_slimes) RandomSelection_Add(world, MONSTER_SLIME, "", 0.2, 0.2);
mc += 1;
DistributeEvenly_Init(maxmonsters, mc);
- n_animuses = DistributeEvenly_Get(1);
- n_ogres = DistributeEvenly_Get(1);
- n_dogs = DistributeEvenly_Get(1);
- n_bruisers = DistributeEvenly_Get(1);
- n_mages = DistributeEvenly_Get(1);
- n_soldiers = DistributeEvenly_Get(1);
- n_knights = DistributeEvenly_Get(1);
- n_zombies = DistributeEvenly_Get(1);
- n_spiders = DistributeEvenly_Get(1);
- n_slimes = DistributeEvenly_Get(0.7);
- n_shamblers = DistributeEvenly_Get(0.3);
+ n_animuses = DistributeEvenly_Get(1);
+ n_ogres = DistributeEvenly_Get(1);
+ n_cerberuses = DistributeEvenly_Get(1);
+ n_bruisers = DistributeEvenly_Get(1);
+ n_mages = DistributeEvenly_Get(1);
+ n_soldiers = DistributeEvenly_Get(1);
+ n_knights = DistributeEvenly_Get(1);
+ n_zombies = DistributeEvenly_Get(1);
+ n_spiders = DistributeEvenly_Get(1);
+ n_slimes = DistributeEvenly_Get(0.7);
+ n_shamblers = DistributeEvenly_Get(0.3);
if(flyspawns_count > 0)
n_wyverns = DistributeEvenly_Get(1);
if(waterspawns_count > 0)
case MONSTER_BRUISER: n_bruisers -= 1; break;
case MONSTER_MARINE: n_soldiers -= 1; break;
case MONSTER_WYVERN: n_wyverns -= 1; break;
- case MONSTER_DOG: n_dogs -= 1; break;
+ case MONSTER_CERBERUS: n_cerberuses -= 1; break;
case MONSTER_SLIME: n_slimes -= 1; break;
case MONSTER_KNIGHT: n_knights -= 1; break;
case MONSTER_FISH: n_fish -= 1; break;
// Counters
float monster_count, totalmonsters;
-float n_bruisers, n_dogs, n_ogres, n_shamblers, n_wyverns, n_mages, n_soldiers, n_knights, n_animuses, n_zombies, n_slimes, n_fish, n_spiders;
+float n_bruisers, n_cerberuses, n_ogres, n_shamblers, n_wyverns, n_mages, n_soldiers, n_knights, n_animuses, n_zombies, n_slimes, n_fish, n_spiders;
float current_monsters;
float waterspawns_count, flyspawns_count;
float wave_count, max_waves;