REGISTER_BUFF(_("Jump"),jump,JUMP,10,'0.7 0.2 1');
REGISTER_BUFF(_("Flight"),flight,FLIGHT,11,'1 0.2 0.5');
REGISTER_BUFF(_("Invisible"),invisible,INVISIBLE,12,'0.9 0.9 0.9');
+REGISTER_BUFF(_("Blessed"),blessed,BLESSED,14,'0.9 0.3 0');
#undef REGISTER_BUFF
#ifdef SVQC
BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
BUFF_SPAWNFUNCS(invisible, BUFF_INVISIBLE)
+BUFF_SPAWNFUNCS(blessed, BUFF_BLESSED)
BUFF_SPAWNFUNCS(random, 0)
BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler, BUFF_MEDIC)
-BUFF_SPAWNFUNC_Q3TA_COMPAT(resistance, BUFF_RESISTANCE)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(resistance, BUFF_RESISTANCE)
BUFF_SPAWNFUNC_Q3TA_COMPAT(scout, BUFF_SPEED)
BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen, BUFF_AMMO)
DEATHTYPE(DEATH_DROWN, DEATH_SELF_DROWN, DEATH_MURDER_DROWN, NORMAL_POS) \
DEATHTYPE(DEATH_FALL, DEATH_SELF_FALL, DEATH_MURDER_FALL, NORMAL_POS) \
DEATHTYPE(DEATH_FIRE, DEATH_SELF_FIRE, DEATH_MURDER_FIRE, NORMAL_POS) \
+ DEATHTYPE(DEATH_FOOT, DEATH_SELF_FOOT, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_GENERIC, DEATH_SELF_GENERIC, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_HURTTRIGGER, DEATH_SELF_VOID, DEATH_MURDER_VOID, NORMAL_POS) \
DEATHTYPE(DEATH_KILL, DEATH_SELF_SUICIDE, NO_MSG, NORMAL_POS) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_DROWN, 2, 1, "s1 s2loc spree_lost", "s1", "notify_water", _("^BG%s^K1 couldn't catch their breath%s%s"), _("^BG%s^K1 was in the water for too long%s%s")) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FALL, 2, 1, "s1 s2loc spree_lost", "s1", "notify_fall", _("^BG%s^K1 hit the ground with a crunch%s%s"), _("^BG%s^K1 hit the ground with a bit too much force%s%s")) \
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"), _("^BG%s^K1 felt a little hot%s%s")) \
- MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC, 2, 1, "s1 s2loc spree_lost", "s1", "notify_selfkill", _("^BG%s^K1 died%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FOOT, 2, 1, "s1 s2loc spree_lost", "s1", "notify_parrot", _("^BG%s^K1 is a dead parrot!%s%s"),"") \
+ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 died%s%s"), "") \
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"), _("^BG%s^K1 found a hot place%s%s")) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_AFRIT, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was turned to ash by an Afrit%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_CREEPER, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 was blown up by Creeper%s%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_DROWN, 0, 0, "", NO_CPID, "0 0", _("^K1You couldn't catch your breath!"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FALL, 0, 0, "", NO_CPID, "0 0", _("^K1You hit the ground with a crunch!"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FIRE, 0, 0, "", NO_CPID, "0 0", _("^K1You got a little bit too crispy!"), _("^K1You felt a little too hot!")) \
+ MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FOOT, 0, 0, "", NO_CPID, "0 0", _("^K1This is an ex-parrot!"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_GENERIC, 0, 0, "", NO_CPID, "0 0", _("^K1You killed your own dumb self!"), _("^K1You need to be more careful!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_LAVA, 0, 0, "", NO_CPID, "0 0", _("^K1You couldn't stand the heat!"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_MONSTER, 0, 0, "", NO_CPID, "0 0", _("^K1You were killed by a monster!"), _("^K1You need to watch out for monsters!")) \
MSG_MULTI_NOTIF(1, DEATH_SELF_DROWN, NO_MSG, INFO_DEATH_SELF_DROWN, CENTER_DEATH_SELF_DROWN) \
MSG_MULTI_NOTIF(1, DEATH_SELF_FALL, NO_MSG, INFO_DEATH_SELF_FALL, CENTER_DEATH_SELF_FALL) \
MSG_MULTI_NOTIF(1, DEATH_SELF_FIRE, NO_MSG, INFO_DEATH_SELF_FIRE, CENTER_DEATH_SELF_FIRE) \
+ MSG_MULTI_NOTIF(1, DEATH_SELF_FOOT, NO_MSG, INFO_DEATH_SELF_FOOT, CENTER_DEATH_SELF_FOOT) \
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_AFRIT, NO_MSG, INFO_DEATH_SELF_MON_AFRIT, CENTER_DEATH_SELF_MONSTER) \
buff_Init(ent);
}
+#ifdef MONTY
+void buff_Blessed_Foot_Touch()
+{
+ if(other.iscreature && other.takedamage && other.health > 0)
+ {
+ int mydamage = 9999;
+ if(other == self.realowner)
+ mydamage = 5; // but spammed
+ Damage (other, self, world, mydamage, DEATH_FOOT, other.origin, '0 0 0');
+ }
+}
+
+void buff_Blessed_Foot_Think()
+{
+ self.nextthink = time;
+ if(self.buff_blessed_time)
+ if(time >= self.buff_blessed_time)
+ {
+ remove(self);
+ return;
+ }
+ if(self.origin_z <= self.buff_blessed_bottom_z)
+ {
+ if(!self.buff_blessed_soundplayed)
+ {
+ self.buff_blessed_time = time + 1;
+ self.velocity = '0 0 0';
+ setorigin(self, self.buff_blessed_bottom);
+ //sound(self, CH_TRIGGER_SINGLE, "monty/foot.wav", VOL_BASE, ATTEN_MAX);
+ sound(self, CH_TRIGGER_SINGLE, "monty/foot.wav", VOL_BASEVOICE, ATTEN_MIN);
+ self.buff_blessed_soundplayed = true;
+ }
+ }
+ else
+ {
+ self.velocity = '0 0 -1500';
+ //setorigin(self, self.origin - '0 0 10');
+ }
+}
+
+void buff_Blessed_SpawnFoot(entity player)
+{
+ makevectors(player.angles);
+ vector org = player.origin + (v_forward * 220) + ('0 0 1' * 32);
+ vector bottom;
+ vector top;
+ entity foot = spawn();
+
+ foot.realowner = player; // don't set owner, as we want this to crush owner
+ foot.classname = "montyfoot";
+ foot.solid = SOLID_TRIGGER;
+ foot.touch = buff_Blessed_Foot_Touch;
+ foot.think = buff_Blessed_Foot_Think;
+ foot.nextthink = time;
+ foot.movetype = MOVETYPE_NOCLIP;
+ foot.scale = 6;
+
+ setmodel(foot, "models/monty/foot.iqm");
+ setsize(foot, '-150 -150 0', '150 150 250');
+
+ //tracebox(org, foot.mins, foot.maxs, org + '0 0 800', MOVE_NORMAL, foot);
+ top = org + '0 0 800';
+ foot.dphitcontentsmask = DPCONTENTS_SOLID;
+ tracebox(org, foot.mins, foot.maxs, org - '0 0 2000', MOVE_WORLDONLY, foot);
+ foot.dphitcontentsmask = DPCONTENTS_LAVA;
+ bottom = trace_endpos;
+
+ foot.buff_blessed_bottom = bottom;
+ foot.buff_blessed_top = top;
+ setorigin(foot, top);
+
+ sound(player, CH_TRIGGER_SINGLE, "monty/ni.wav", VOL_BASEVOICE, ATTEN_NORM);
+}
+#endif
+
// mutator hooks
MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_SplitHealthArmor)
{
}
}
+#ifdef MONTY
+ if(!self.crouch)
+ self.buff_blessed_crouch_held = false;
+
+ if(self.buffs & BUFF_BLESSED)
+ if(time >= self.buff_blessed_time)
+ if(self.crouch && !self.buff_blessed_crouch_held)
+ {
+ buff_Blessed_SpawnFoot(self);
+ self.buff_blessed_time = time + 0.5;
+ self.buff_blessed_crouch_held = true;
+ }
+#endif
+
if((self.buffs & BUFF_INVISIBLE) && (self.oldbuffs & BUFF_INVISIBLE))
if(self.alpha != autocvar_g_buffs_invisible_alpha)
self.alpha = autocvar_g_buffs_invisible_alpha;
void buffs_Initialize()
{
+ precache_model("models/monty/foot.iqm");
precache_model("models/relics/relic.md3");
precache_sound("misc/strength_respawn.wav");
precache_sound("misc/shield_respawn.wav");
precache_sound("relics/relic_effect.wav");
precache_sound(W_Sound("rocket_impact"));
precache_sound("keepaway/respawn.wav");
+ precache_sound("monty/foot.wav");
+ precache_sound("monty/ni.wav");
addstat(STAT_BUFFS, AS_INT, buffs);
// disability
.float buff_disability_time;
.float buff_disability_effect_time;
+#ifdef MONTY
+// blessed
+.float buff_blessed_time; // a little delay to prevent super spam
+.vector buff_blessed_bottom;
+.vector buff_blessed_top;
+.bool buff_blessed_soundplayed;
+.bool buff_blessed_crouch_held;
+#endif
// buff definitions
.float buff_active;