ring,models/relics/relic_ring
mesh,models/relics/relic
-sign,textures/common/nodraw
\ No newline at end of file
+sign,models/relics/sign_resistance
\ No newline at end of file
set g_buffs_cooldown_respawn 3 "cooldown period when buff is reloading"
set g_buffs_ammo 1 "ammo buff: infinite ammunition"
set g_buffs_ammo_time 60 "ammo buff carry time"
+set g_buffs_resistance 1 "resistance buff: greatly reduces damage taken"
+set g_buffs_resistance_time 60 "resistance buff time"
+set g_buffs_resistance_blockpercent 0.5 "damage reduction multiplier, higher values mean less damage"
set g_buffs_medic 1 "medic buff: increased regeneration speed, extra health, chance to survive a fatal attack"
set g_buffs_medic_time 60 "medic buff carry time"
set g_buffs_medic_survive_chance 0.6 "multiplier chance of player surviving a fatal hit"
MY(type) = "static";
MY(velocityjitter) = '64.0 64.0 32.0';
}
+
+DEF(relic_resistance);
+SUB(relic_resistance) {
+ MY(airfriction) = 0.200000;
+ MY(alpha_min) = 128;
+ MY(alpha_max) = 256;
+ MY(alpha_fade) = 256;
+ MY(color_min) = "0x00ff80";
+ MY(color_max) = "0x00ff80";
+ MY(count) = 20;
+ MY(gravity) = -0.100000;
+ MY(liquidfriction) = 0.800000;
+ MY(originjitter) = '8.0 8.0 32.0';
+ MY(size_min) = 1.500000;
+ MY(size_max) = 1.500000;
+ MY(type) = "static";
+ MY(velocityjitter) = '64.0 64.0 32.0';
+}
{
case "ammoregen": return "ammo"; // Q3TA ammoregen
case "doubler": return "inferno"; // Q3TA doubler
+ case "guard": return "resistance"; // Q3TA guard
case "revival": case "regen": return "medic"; // WOP revival, Q3A regen
case "jumper": return "jump"; // WOP jumper
case "invulnerability": return "vampire"; // Q3TA invulnerability
REGISTER_BUFF(FLIGHT, NEW(FlightBuff));
BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
BUFF_SPAWNFUNC_Q3COMPAT(item_flight, BUFF_FLIGHT)
+
+CLASS(ResistanceBuff, Buff)
+ ATTRIB(ResistanceBuff, m_name, string, _("Resistance"));
+ ATTRIB(ResistanceBuff, netname, string, "resistance");
+ ATTRIB(ResistanceBuff, m_icon, string, "buff_resistance");
+ ATTRIB(ResistanceBuff, m_skin, int, 11);
+ ATTRIB(ResistanceBuff, m_color, vector, '0.36 1 0.07');
+ENDCLASS(ResistanceBuff)
+REGISTER_BUFF(RESISTANCE, NEW(ResistanceBuff));
+BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
+BUFF_SPAWNFUNC_Q3COMPAT(item_guard, BUFF_RESISTANCE)
if(frag_deathtype == DEATH_BUFF.m_id) { return; }
+ if(StatusEffects_active(BUFF_RESISTANCE, frag_target))
+ {
+ float reduced = frag_damage * autocvar_g_buffs_resistance_blockpercent;
+ frag_damage = bound(0, frag_damage - reduced, frag_damage);
+ }
+
if(StatusEffects_active(BUFF_MEDIC, frag_target))
if((GetResource(frag_target, RES_HEALTH) - frag_damage) <= 0)
if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
bool autocvar_g_buffs_drop = false;
float autocvar_g_buffs_cooldown_activate;
float autocvar_g_buffs_cooldown_respawn;
+float autocvar_g_buffs_resistance_blockpercent;
float autocvar_g_buffs_medic_survive_chance;
float autocvar_g_buffs_medic_survive_health;
float autocvar_g_buffs_medic_rot;
}
}
+models/relics/sign_resistance
+{
+ deformVertexes autosprite
+ cull none
+ nopicmip
+ {
+ map models/relics/sign_resistance
+ blendfunc add
+ }
+}
+
models/relics/sign_swapper
{
deformVertexes autosprite