alpha 256 256 64
color 0xFF0FFF 0xFF0FFF
sizeincrease 1
+
+//EF_POISON
+//poison
+// used nowhere in code
+effect EF_POISON
+count 100
+type smoke
+tex 48 55
+size 5 21
+alpha 200 356 512
+gravity -0.5
+color 0x00ff00 0x00ff00
+bounce 2
+sizeincrease -1
+originoffset 0 0 10
+originjitter 12 12 34
+velocityjitter 22 22 50
+// smoke
+effect EF_POISON
+type alphastatic
+count 50
+tex 0 8
+size 11 15
+sizeincrease 6
+alpha 200 256 200
+color 0x00ff00 0x00ff00
+gravity -0.3
+originoffset 0 0 10
+originjitter 12 12 34
+velocityjitter 11 11 50
+bounce 2
+effect EF_POISON
+count 0.5
+lightradius 200
+lightradiusfade 10000
+lightcolor 0.9 0.9 0.2
float rainbow_last_flicker;
vector rainbow_prev_color;
+float old_v_idlescale;
+
#define BUTTON_3 4
#define BUTTON_4 8
float cl_notice_run();
}
}
- if(autocvar_hud_damage && !getstati(STAT_FROZEN))
+ if(autocvar_hud_damage && !getstati(STAT_FROZEN) && !getstati(STAT_POISONED))
{
splash_size_x = max(vid_conwidth, vid_conheight);
splash_size_y = max(vid_conwidth, vid_conheight);
}
}
}
+
+ if(getstati(STAT_POISONED))
+ {
+ if(cvar("v_idlescale") != 50)
+ {
+ old_v_idlescale = cvar("v_idlescale");
+ cvar_set("v_idlescale", "50");
+ }
+ }
+ else
+ {
+ if(cvar("v_idlescale") == 50)
+ cvar_set("v_idlescale", ftos(old_v_idlescale));
+ }
+
float e1 = (autocvar_hud_postprocessing_maxbluralpha != 0);
float e2 = (autocvar_hud_powerup != 0);
DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
}
+
+ if(getstati(STAT_POISONED))
+ drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, '0.25 0.90 0.25', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
if(autocvar_r_letterbox == 0)
if(autocvar_viewsize < 120)
if(eff & EF_FULLBRIGHT)
self.renderflags |= RF_FULLBRIGHT;
if(eff & EF_FLAME)
- pointparticles(particleeffectnum("EF_FLAME"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+ {
+ if(getstati(STAT_POISONED))
+ pointparticles(particleeffectnum("EF_POISON"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+ else
+ pointparticles(particleeffectnum("EF_FLAME"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+ }
if(eff & EF_STARDUST)
pointparticles(particleeffectnum("EF_STARDUST"), self.origin, '0 0 0', bound(0, frametime, 0.1));
if(eff & EF_NOSHADOW)
const float STAT_MONSTERS_TOTAL = 75;
const float STAT_MONSTERS_KILLED = 76;
+const float STAT_POISONED = 77;
+
// mod stats (1xx)
const float STAT_REDALIVE = 100;
const float STAT_BLUEALIVE = 101;
if(self.revive_progress >= 1)
Unfreeze(self);
}
+
+ if(!Fire_IsBurning(self))
+ self.poisoned = FALSE;
MUTATOR_CALLHOOK(PlayerPreThink);
.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
.entity iceblock;
+.float poisoned;
+
.entity muzzle_flash;
.float misc_bulletcounter; // replaces uzi & hlac bullet counter.
return (time < e.fire_endtime);
}
-float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
+float Fire_AddDamage(entity e, entity o, float d, float t, float dt, float ispoison)
{
float dps;
float maxtime, mintime, maxdamage, mindamage, maxdps, mindps, totaldamage, totaltime;
+
+ e.poisoned = ispoison;
if(IS_PLAYER(e))
{
o = e.fire_owner;
// water and slime stop fire
+ if(!e.poisoned)
if(e.waterlevel)
if(e.watertype != CONTENT_LAVA)
e.fire_endtime = 0;
{
t = autocvar_g_balance_firetransfer_time * (e.fire_endtime - time);
d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
- Fire_AddDamage(other, o, d, t, DEATH_FIRE);
+ Fire_AddDamage(other, o, d, t, DEATH_FIRE, FALSE);
}
}
}
Fire_ApplyEffect(self.owner);
if(!Fire_IsBurning(self.owner))
{
+ self.owner.poisoned = FALSE;
self.owner.fire_burner = world;
remove(self);
return;
// misc
addstat(STAT_RESPAWN_TIME, AS_FLOAT, stat_respawn_time);
+ addstat(STAT_POISONED, AS_INT, poisoned);
next_pingtime = time + 5;
if(self.msound_sight == "") self.msound_sight = strzone(strcat("monsters/", mon, "_sight.wav"));
}
-void monster_melee (entity targ, float damg, float er, float deathtype, float dostop)
+float monster_melee (entity targ, float damg, float er, float deathtype, float dostop)
{
float dot, rdmg = damg * random();
if (self.health <= 0)
- return;
+ return FALSE;
if (targ == world)
- return;
+ return FALSE;
if(dostop)
{
if(dot > er)
Damage(targ, self, self, rdmg * monster_skill, deathtype, targ.origin, normalize(targ.origin - self.origin));
+
+ return TRUE;
}
void Monster_CheckDropCvars (string mon)
sound(self.enemy, CHAN_AUTO, "player/lava.wav", 1, ATTN_NORM);
if(vlen(self.enemy.origin - self.origin) <= 2000)
- Fire_AddDamage(self.enemy, self, autocvar_g_monster_knight_inferno_damage * monster_skill, autocvar_g_monster_knight_inferno_damagetime, DEATH_MONSTER_KNIGHT_INFERNO);
+ Fire_AddDamage(self.enemy, self, autocvar_g_monster_knight_inferno_damage * monster_skill, autocvar_g_monster_knight_inferno_damagetime, DEATH_MONSTER_KNIGHT_INFERNO, FALSE);
}
void knight_fireball_explode()
RadiusDamage(self, self.realowner, autocvar_g_monster_knight_fireball_damage, autocvar_g_monster_knight_fireball_edgedamage, autocvar_g_monster_knight_fireball_force, world, autocvar_g_monster_knight_fireball_radius, self.projectiledeathtype, world);
for(e = world; (e = findfloat(e, takedamage, DAMAGE_AIM)); ) if(vlen(e.origin - self.origin) <= autocvar_g_monster_knight_fireball_radius)
- Fire_AddDamage(e, self, 5 * monster_skill, autocvar_g_monster_knight_inferno_damagetime, self.projectiledeathtype);
+ Fire_AddDamage(e, self, 5 * monster_skill, autocvar_g_monster_knight_inferno_damagetime, self.projectiledeathtype, FALSE);
remove(self);
}
void spider_web_explode()
{
- float damg = 0, edamg = 0, rad = 1;
- switch(self.realowner.spider_type)
+ entity e;
+ if(self)
{
- case SPIDER_TYPE_ICE:
- break; // no change
- case SPIDER_TYPE_FIRE:
- damg = 15;
- rad = 25;
- edamg = 6;
- break;
+ float damg = 0, edamg = 0, rad = 1;
+ switch(self.realowner.spider_type)
+ {
+ case SPIDER_TYPE_ICE:
+ pointparticles(particleeffectnum("electro_impact"), self.origin, '0 0 0', 1);
+ break;
+ case SPIDER_TYPE_FIRE:
+ pointparticles(particleeffectnum("fireball_explode"), self.origin, '0 0 0', 1);
+ damg = 15;
+ rad = 25;
+ edamg = 6;
+ break;
+ }
+
+ RadiusDamage(self, self.realowner, damg, edamg, 0, world, rad, DEATH_MONSTER_SPIDER_FIRE, world); // ice deals no damage anyway
+
+ if(self.realowner.spider_type == SPIDER_TYPE_FIRE)
+ for(e = findradius(self.origin, rad); e; e = e.chain) if(e.takedamage && e.deadflag == DEAD_NO)
+ {
+ switch(self.realowner.spider_type)
+ {
+ case SPIDER_TYPE_ICE:
+ Freeze(other, 0.3, 2, FALSE);
+ break;
+ case SPIDER_TYPE_FIRE:
+ Fire_AddDamage(e, self.realowner, 5 * monster_skill, autocvar_g_monster_spider_attack_fire_time, DEATH_MONSTER_SPIDER_FIRE, FALSE);
+ break;
+ }
+ }
+
+ remove(self);
}
-
- RadiusDamage (self, self.realowner, damg, edamg, rad, world, 0, self.projectiledeathtype, other);
-
- remove (self);
}
void spider_web_touch()
{
PROJECTILE_TOUCH;
- if(other.takedamage == DAMAGE_AIM)
- if(other.health > 0)
- switch(self.realowner.spider_type)
- {
- case SPIDER_TYPE_ICE:
- Freeze(other, 0.3, 2, FALSE);
- break;
- case SPIDER_TYPE_FIRE:
- Fire_AddDamage(other, self.realowner, 5 * monster_skill, autocvar_g_monster_spider_attack_fire_time, DEATH_MONSTER_SPIDER_FIRE);
- break;
- }
-
spider_web_explode();
}
void spider_shootweb(float ptype)
{
- float p = 0, dt = 0;
+ float p = 0;
string snd = "";
switch(ptype)
{
case SPIDER_TYPE_ICE:
p = PROJECTILE_ELECTRO;
- dt = WEP_ELECTRO;
snd = "weapons/electro_fire2.wav";
break;
case SPIDER_TYPE_FIRE:
p = PROJECTILE_FIREMINE;
- dt = WEP_FIREBALL;
snd = "weapons/fireball_fire.wav";
break;
}
proj.bot_dodgerating = 0;
proj.nextthink = time + 5;
PROJECTILE_MAKETRIGGER(proj);
- proj.projectiledeathtype = dt | HITTYPE_SECONDARY;
+ proj.projectiledeathtype = DEATH_MONSTER_SPIDER_FIRE;
setorigin(proj, w_shotorg);
//proj.glow_size = 50;
{
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);
+ if(monster_melee(self.enemy, autocvar_g_monster_stingray_damage, 0.1, DEATH_MONSTER_STINGRAY, FALSE))
+ if(random() < 0.2)
+ Fire_AddDamage(self.enemy, self, 30, 10, DEATH_MONSTER_STINGRAY, TRUE);
return TRUE;
}
RadiusDamage(self, self.realowner, autocvar_g_monster_wyvern_fireball_damage, autocvar_g_monster_wyvern_fireball_edgedamage, autocvar_g_monster_wyvern_fireball_force, world, autocvar_g_monster_wyvern_fireball_radius, self.projectiledeathtype, world);
for(e = world; (e = findfloat(e, takedamage, DAMAGE_AIM)); ) if(vlen(e.origin - self.origin) <= autocvar_g_monster_wyvern_fireball_radius)
- Fire_AddDamage(e, self, 5 * monster_skill, autocvar_g_monster_wyvern_fireball_damagetime, self.projectiledeathtype);
+ Fire_AddDamage(e, self, 5 * monster_skill, autocvar_g_monster_wyvern_fireball_damagetime, self.projectiledeathtype, FALSE);
remove(self);
}
{
d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, self.origin) - RandomSelection_chosen_ent.fireball_impactvec);
d = damage + (edgedamage - damage) * (d / dist);
- Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
+ Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE, FALSE);
//trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
pointparticles(particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
}
{
PROJECTILE_TOUCH;
if (other.takedamage == DAMAGE_AIM)
- if(Fire_AddDamage(other, self.realowner, autocvar_g_balance_fireball_secondary_damage, autocvar_g_balance_fireball_secondary_damagetime, self.projectiledeathtype) >= 0)
+ if(Fire_AddDamage(other, self.realowner, autocvar_g_balance_fireball_secondary_damage, autocvar_g_balance_fireball_secondary_damagetime, self.projectiledeathtype, FALSE) >= 0)
{
remove(self);
return;