set g_monster_shalrath_shield_blockpercent 20 "% of damage inflicted on Vore if using a force field"
set g_monster_shalrath_shield_delay 7 "Refire for Vore force shield"
set g_monster_shalrath_shield_time 3 "Amount of time Vore force field lasts"
+set g_monster_shalrath_attack_grenade_damage 25 "Vore fake item grenade attack damage"
+set g_monster_shalrath_attack_grenade_edgedamage 20 "Vore fake item grenade attack edge damage"
+set g_monster_shalrath_attack_grenade_radius 100 "Vore fake item grenade attack explosion radius"
+set g_monster_shalrath_attack_grenade_lifetime 5 "Vore fake item grenade life time"
+set g_monster_shalrath_attack_grenade_speed 150 "Vore fake item grenade forward speed"
+set g_monster_shalrath_attack_grenade_speed_up 95 "Vore fake item grenade upwards speed"
+set g_monster_shalrath_attack_grenade_speed_z 0 "Vore fake item grenade speed angle"
+set g_monster_shalrath_attack_grenade_spread 0 "Vore fake item grenade spread"
+set g_monster_shalrath_attack_grenade_force 170 "Vore fake item grenade damage knockback"
+set g_monster_shalrath_attack_grenade_chance 30 "% chance of Vore attack being fake item grenade"
// Zombie
set g_monster_zombie 1 "Enable Zombies"
case PROJECTILE_FLAC: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; self.traileffect = particleeffectnum("TR_SEEKER"); break;
case PROJECTILE_SEEKER: setmodel(self, "models/tagrocket.md3"); self.traileffect = particleeffectnum("TR_SEEKER"); break;
- case PROJECTILE_VORE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(""); break;
+ case PROJECTILE_VORE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum("TR_VORESPIKE"); break;
case PROJECTILE_RAPTORBOMB: setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
float autocvar_g_monster_shalrath_shield_time;
float autocvar_g_monster_shalrath_shield_delay;
float autocvar_g_monster_shalrath_shield_blockpercent;
+float autocvar_g_monster_shalrath_attack_grenade_damage;
+float autocvar_g_monster_shalrath_attack_grenade_edgedamage;
+float autocvar_g_monster_shalrath_attack_grenade_radius;
+float autocvar_g_monster_shalrath_attack_grenade_lifetime;
+float autocvar_g_monster_shalrath_attack_grenade_force;
+float autocvar_g_monster_shalrath_attack_grenade_chance;
// animations
const float shalrath_anim_idle = 0;
self.attack_finished_single = time + autocvar_g_monster_shalrath_attack_melee_delay;
}
+void shalrath_grenade_explode()
+{
+ pointparticles(particleeffectnum("explosion_small"), self.origin, '0 0 0', 1);
+
+ sound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+ RadiusDamage (self, self.realowner, autocvar_g_monster_shalrath_attack_grenade_damage, autocvar_g_monster_shalrath_attack_grenade_edgedamage, autocvar_g_monster_shalrath_attack_grenade_radius, world, autocvar_g_monster_shalrath_attack_grenade_force, DEATH_MONSTER_MAGE, other);
+ remove(self);
+}
+
+void shalrath_grenade_touch()
+{
+ if(IS_PLAYER(other))
+ {
+ PROJECTILE_TOUCH;
+ shalrath_grenade_explode();
+ return;
+ }
+}
+
+void shalrath_throw_itemgrenade()
+{
+ makevectors(self.angles);
+
+ W_SetupShot_ProjectileSize (self, '-64 -64 -64', '64 64 64', FALSE, 4, "", CH_WEAPON_A, autocvar_g_monster_shalrath_attack_grenade_damage);
+ w_shotdir = v_forward; // no TrueAim for grenades please
+
+ entity gren = spawn ();
+ gren.owner = gren.realowner = self;
+ gren.classname = "grenade";
+ gren.bot_dodge = FALSE;
+ gren.movetype = MOVETYPE_BOUNCE;
+ gren.solid = SOLID_TRIGGER;
+ gren.projectiledeathtype = DEATH_MONSTER_MAGE;
+ setorigin(gren, w_shotorg);
+ setsize(gren, '-64 -64 -64', '64 64 64');
+
+ gren.nextthink = time + autocvar_g_monster_shalrath_attack_grenade_lifetime;
+ gren.think = shalrath_grenade_explode;
+ gren.use = shalrath_grenade_explode;
+ gren.touch = shalrath_grenade_touch;
+
+ gren.missile_flags = MIF_SPLASH | MIF_ARC;
+ W_SETUPPROJECTILEVELOCITY_UP(gren, g_monster_shalrath_attack_grenade);
+
+ gren.flags = FL_PROJECTILE;
+
+ setmodel(gren, "models/items/g_h50.md3");
+
+ self.attack_finished_single = time + 1.5;
+}
+
float shal_missile ()
{
+ if(random() < autocvar_g_monster_shalrath_attack_grenade_chance / 100)
+ {
+ shalrath_throw_itemgrenade();
+ return TRUE;
+ }
+
shalrath_attack();
return TRUE;