set g_monster_wyvern_fireball_speed 400 "Wyvern fireball projectile speed"
// Cerberus
-set g_monster_cerberus 1 "Enable Cerberuss"
+set g_monster_cerberus 1 "Enable Cerberuses"
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_knight_speed_walk 75 "Knight walk speed"
set g_monster_knight_speed_run 150 "Knight run speed"
-// Rotfish
-set g_monster_fish 1 "Enable Rotfish"
-set g_monster_fish_health 25 "Rotfish health"
-set g_monster_fish_damage 10 "Rotfish bite attack damage"
-set g_monster_fish_drop health "Rotfish drops this item on death"
-set g_monster_fish_drop_size small "Size of the item Rotfish drop. Possible values are: small, medium, large"
-set g_monster_fish_speed_walk 40 "Rotfish walk speed"
-set g_monster_fish_speed_run 70 "Rotfish run speed"
+// Stingray
+set g_monster_stingray 1 "Enable Stingray"
+set g_monster_stingray_health 25 "Stingray health"
+set g_monster_stingray_damage 10 "Stingray bite attack damage"
+set g_monster_stingray_drop health "Stingray drops this item on death"
+set g_monster_stingray_drop_size small "Size of the item Stingray drop. Possible values are: small, medium, large"
+set g_monster_stingray_speed_walk 40 "Stingray walk speed"
+set g_monster_stingray_speed_run 70 "Stingray run speed"
// Mage
set g_monster_mage 1 "Enable Mages"
precache_model(KNIGHT_MODEL);
break;
}
- case MONSTER_FISH:
+ case MONSTER_STINGRAY:
{
- precache_model(FISH_MODEL);
+ precache_model(STINGRAY_MODEL);
break;
}
case MONSTER_MAGE:
if(self) self.scale = 1.3;
break;
}
- case MONSTER_FISH:
+ case MONSTER_STINGRAY:
{
- mid2info_model = FISH_MODEL;
- mid2info_name = "Rotfish";
- mid2info_min = FISH_MIN;
- mid2info_max = FISH_MAX;
+ mid2info_model = STINGRAY_MODEL;
+ mid2info_name = "Stingray";
+ mid2info_min = STINGRAY_MIN;
+ mid2info_max = STINGRAY_MAX;
if(self) self.scale = 1.3;
break;
}
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_STINGRAY, DEATH_SELF_MON_STINGRAY, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_KNIGHT_CRUSH, DEATH_SELF_MON_KNIGHT_CRUSH, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_KNIGHT_FBALL, DEATH_SELF_MON_KNIGHT_FBALL, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_MONSTER_KNIGHT_INFERNO, DEATH_SELF_MON_KNIGHT_INFERNO, NO_MSG, NORMAL_POS) \
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_STINGRAY, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was fatally wounded by a Stingray%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_INFO_NOTIF(1, INFO_DEATH_SELF_MON_KNIGHT_FBALL, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was turned to ash by a Knight%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_KNIGHT_INFERNO, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was burned to death by a Knight%s%s\n"), "") \
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_STINGRAY, NO_MSG, INFO_DEATH_SELF_MON_STINGRAY, 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) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_KNIGHT_FBALL, NO_MSG, INFO_DEATH_SELF_MON_KNIGHT_FBALL, CENTER_DEATH_SELF_MONSTER) \
MSG_MULTI_NOTIF(1, DEATH_SELF_MON_KNIGHT_INFERNO, NO_MSG, INFO_DEATH_SELF_MON_KNIGHT_INFERNO, CENTER_DEATH_SELF_MONSTER) \
me.TR(me);
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", "stingray", _("Stingray")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "mage", _("Mage")));
me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "wyvern", _("Wyvern")));
me.TR(me);
float MONSTER_CERBERUS = 8;
float MONSTER_SLIME = 9;
float MONSTER_KNIGHT = 10;
-float MONSTER_FISH = 11;
+float MONSTER_STINGRAY = 11;
float MONSTER_MAGE = 12;
float MONSTER_SPIDER = 13;
float MONSTER_LAST = 14;
+++ /dev/null
-// size
-const vector FISH_MIN = '-20 -20 -31';
-const vector FISH_MAX = '20 20 20';
-
-// model
-string FISH_MODEL = "models/monsters/fish.mdl";
-
-#ifdef SVQC
-// cvars
-float autocvar_g_monster_fish;
-float autocvar_g_monster_fish_health;
-float autocvar_g_monster_fish_damage;
-float autocvar_g_monster_fish_speed_walk;
-float autocvar_g_monster_fish_speed_run;
-
-// animations
-const float fish_anim_attack = 0;
-const float fish_anim_death = 1;
-const float fish_anim_swim = 2;
-const float fish_anim_pain = 3;
-
-void fish_think ()
-{
- self.think = fish_think;
- self.nextthink = time + self.ticrate;
-
- monster_move(autocvar_g_monster_fish_speed_run, autocvar_g_monster_fish_speed_walk, 10, fish_anim_swim, fish_anim_swim, fish_anim_swim);
-}
-
-float fish_attack(float attack_type)
-{
- switch(attack_type)
- {
- case MONSTER_ATTACK_MELEE:
- {
- monsters_setframe(fish_anim_attack);
- self.attack_finished_single = time + 0.5;
- monster_melee(self.enemy, autocvar_g_monster_fish_damage, 0.1, DEATH_MONSTER_FISH, FALSE);
-
- return TRUE;
- }
- case MONSTER_ATTACK_RANGED:
- }
-
- return FALSE;
-}
-
-void fish_die ()
-{
- Monster_CheckDropCvars ("fish");
-
- self.think = monster_dead_think;
- self.nextthink = time + self.ticrate;
- self.ltime = time + 5;
- monsters_setframe(fish_anim_death);
-
- monster_hook_death(); // for post-death mods
-}
-
-void fish_spawn ()
-{
- if not(self.health)
- self.health = autocvar_g_monster_fish_health;
-
- self.damageforcescale = 0.5;
- self.classname = "monster_fish";
- self.monster_attackfunc = fish_attack;
- self.flags |= FL_SWIM;
- self.nextthink = time + random() * 0.5 + 0.1;
- self.think = fish_think;
-
- monster_setupsounds("fish");
-
- monster_hook_spawn(); // for post-spawn mods
-}
-
-void spawnfunc_monster_fish ()
-{
- if not(autocvar_g_monster_fish) { remove(self); return; }
-
- self.monster_spawnfunc = spawnfunc_monster_fish;
-
- if(Monster_CheckAppearFlags(self))
- return;
-
- self.scale = 1.3;
-
- if not (monster_initialize(
- "Rotfish", MONSTER_FISH,
- FISH_MIN, FISH_MAX,
- TRUE,
- fish_die, fish_spawn))
- {
- remove(self);
- return;
- }
-}
-
-#endif // SVQC
--- /dev/null
+// 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 ()
+{
+ self.think = stingray_think;
+ self.nextthink = time + self.ticrate;
+
+ monster_move(autocvar_g_monster_stingray_speed_run, autocvar_g_monster_stingray_speed_walk, 10, stingray_anim_swim, stingray_anim_swim, stingray_anim_swim);
+}
+
+float stingray_attack(float attack_type)
+{
+ switch(attack_type)
+ {
+ case MONSTER_ATTACK_MELEE:
+ {
+ monsters_setframe(stingray_anim_attack);
+ self.attack_finished_single = time + 0.5;
+ monster_melee(self.enemy, autocvar_g_monster_stingray_damage, 0.1, DEATH_MONSTER_STINGRAY, FALSE);
+
+ return TRUE;
+ }
+ case MONSTER_ATTACK_RANGED:
+ }
+
+ return FALSE;
+}
+
+void stingray_die ()
+{
+ Monster_CheckDropCvars ("stingray");
+
+ self.think = monster_dead_think;
+ self.nextthink = time + self.ticrate;
+ self.ltime = time + 5;
+ monsters_setframe(stingray_anim_death);
+
+ monster_hook_death(); // for post-death mods
+}
+
+void stingray_spawn ()
+{
+ if not(self.health)
+ self.health = autocvar_g_monster_stingray_health;
+
+ self.damageforcescale = 0.5;
+ self.classname = "monster_stingray";
+ self.monster_attackfunc = stingray_attack;
+ self.flags |= FL_SWIM;
+ self.nextthink = time + random() * 0.5 + 0.1;
+ self.think = stingray_think;
+
+ monster_setupsounds("stingray");
+
+ monster_hook_spawn(); // for post-spawn mods
+}
+
+void spawnfunc_monster_stingray ()
+{
+ if not(autocvar_g_monster_stingray) { remove(self); return; }
+
+ self.monster_spawnfunc = spawnfunc_monster_stingray;
+
+ if(Monster_CheckAppearFlags(self))
+ return;
+
+ self.scale = 1.3;
+
+ if not (monster_initialize(
+ "Stingray", MONSTER_STINGRAY,
+ STINGRAY_MIN, STINGRAY_MAX,
+ TRUE,
+ stingray_die, stingray_spawn))
+ {
+ remove(self);
+ return;
+ }
+}
+
+#endif // SVQC
#include "monster/cerberus.qc"
#include "monster/slime.qc"
#include "monster/knight.qc"
-#include "monster/fish.qc"
+#include "monster/stingray.qc"
#include "monster/mage.qc"
#include "monster/zombie.qc"
#include "monster/spider.qc"
case MONSTER_SLIME:
case MONSTER_CERBERUS:
case MONSTER_WYVERN:
- case MONSTER_FISH:
+ case MONSTER_STINGRAY:
return SWARM_WEAK;
case MONSTER_KNIGHT:
case MONSTER_OGRE:
case MONSTER_CERBERUS: return "cerberus";
case MONSTER_SLIME: return "slime";
case MONSTER_KNIGHT: return "knight";
- case MONSTER_FISH: return "fish";
+ case MONSTER_STINGRAY: return "stingray";
case MONSTER_MAGE: return "mage";
case MONSTER_SPIDER: return "spider";
default: return "";
return SWARM_NORMAL;
case MONSTER_WYVERN:
return SWARM_FLY;
- case MONSTER_FISH:
+ case MONSTER_STINGRAY:
return SWARM_SWIM;
}
}
if(n_shamblers) RandomSelection_Add(world, MONSTER_SHAMBLER, "", 0.2, 0.2);
if(n_slimes) RandomSelection_Add(world, MONSTER_SLIME, "", 0.2, 0.2);
if(n_wyverns && flyspawns_count) RandomSelection_Add(world, MONSTER_WYVERN, "", 1, 1);
- if(n_fish && waterspawns_count) RandomSelection_Add(world, MONSTER_FISH, "", 0.2, 0.2);
+ if(n_stingrays && waterspawns_count) RandomSelection_Add(world, MONSTER_STINGRAY, "", 0.2, 0.2);
return RandomSelection_chosen_float;
}
if(flyspawns_count > 0)
n_wyverns = DistributeEvenly_Get(1);
if(waterspawns_count > 0)
- n_fish = DistributeEvenly_Get(1);
+ n_stingrays = DistributeEvenly_Get(1);
}
void combat_phase_begin()
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;
+ case MONSTER_STINGRAY: n_stingrays -= 1; break;
case MONSTER_MAGE: n_mages -= 1; break;
case MONSTER_SPIDER: n_spiders -= 1; break;
}
// Counters
float monster_count, totalmonsters;
-float n_bruisers, n_cerberuses, n_ogres, n_shamblers, n_wyverns, n_mages, 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_knights, n_animuses, n_zombies, n_slimes, n_stingrays, n_spiders;
float current_monsters;
float waterspawns_count, flyspawns_count;
float wave_count, max_waves;