]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/buffs/all.inc
Numerous enhancements to the new status effects system, split powerups into a dedicat...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / buffs / all.inc
1 string Buff_UndeprecateName(string buffname)
2 {
3     switch(buffname)
4     {
5         case "ammoregen": return "ammo";
6         case "guard": return "resistance";
7         case "revival": case "regen": return "medic";
8         case "jumper": return "jump";
9         default: return buffname;
10     }
11 }
12
13 CLASS(AmmoBuff, Buff)
14     ATTRIB(AmmoBuff, m_name, string, _("Ammo"));
15     ATTRIB(AmmoBuff, netname, string, "ammo");
16     ATTRIB(AmmoBuff, m_icon, string, "buff_ammo");
17     ATTRIB(AmmoBuff, m_skin, int, 3);
18     ATTRIB(AmmoBuff, m_color, vector, '0.76 1 0.1');
19 ENDCLASS(AmmoBuff)
20 REGISTER_BUFF(AMMO, NEW(AmmoBuff));
21 BUFF_SPAWNFUNCS(ammo, BUFF_AMMO)
22 BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen, BUFF_AMMO)
23
24 CLASS(ResistanceBuff, Buff)
25     ATTRIB(ResistanceBuff, m_name, string, _("Resistance"));
26     ATTRIB(ResistanceBuff, netname, string, "resistance");
27     ATTRIB(ResistanceBuff, m_icon, string, "buff_resistance");
28     ATTRIB(ResistanceBuff, m_skin, int, 0);
29     ATTRIB(ResistanceBuff, m_color, vector, '0.36 1 0.07');
30 ENDCLASS(ResistanceBuff)
31 REGISTER_BUFF(RESISTANCE, NEW(ResistanceBuff));
32 BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
33 BUFF_SPAWNFUNC_Q3TA_COMPAT(guard, BUFF_RESISTANCE)
34
35 CLASS(MedicBuff, Buff)
36     ATTRIB(MedicBuff, m_name, string, _("Medic"));
37     ATTRIB(MedicBuff, netname, string, "medic");
38     ATTRIB(MedicBuff, m_icon, string, "buff_medic");
39     ATTRIB(MedicBuff, m_skin, int, 1);
40     ATTRIB(MedicBuff, m_color, vector, '1 0.12 0');
41 ENDCLASS(MedicBuff)
42 REGISTER_BUFF(MEDIC, NEW(MedicBuff));
43 BUFF_SPAWNFUNCS(medic, BUFF_MEDIC)
44 BUFF_SPAWNFUNC_Q3TA_COMPAT(regen, BUFF_MEDIC)
45 BUFF_SPAWNFUNC_Q3TA_COMPAT(revival, BUFF_MEDIC)
46
47 CLASS(BashBuff, Buff)
48     ATTRIB(BashBuff, m_name, string, _("Bash"));
49     ATTRIB(BashBuff, netname, string, "bash");
50     ATTRIB(BashBuff, m_icon, string, "buff_bash");
51     ATTRIB(BashBuff, m_skin, int, 5);
52     ATTRIB(BashBuff, m_color, vector, '1 0.39 0');
53 ENDCLASS(BashBuff)
54 REGISTER_BUFF(BASH, NEW(BashBuff));
55 BUFF_SPAWNFUNCS(bash, BUFF_BASH)
56 BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler, BUFF_BASH)
57
58 CLASS(VampireBuff, Buff)
59     ATTRIB(VampireBuff, m_name, string, _("Vampire"));
60     ATTRIB(VampireBuff, netname, string, "vampire");
61     ATTRIB(VampireBuff, m_icon, string, "buff_vampire");
62     ATTRIB(VampireBuff, m_skin, int, 2);
63     ATTRIB(VampireBuff, m_color, vector, '1 0 0.24');
64 ENDCLASS(VampireBuff)
65 REGISTER_BUFF(VAMPIRE, NEW(VampireBuff));
66 BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE)
67
68 CLASS(DisabilityBuff, Buff)
69     ATTRIB(DisabilityBuff, m_name, string, _("Disability"));
70     ATTRIB(DisabilityBuff, netname, string, "disability");
71     ATTRIB(DisabilityBuff, m_icon, string, "buff_disability");
72     ATTRIB(DisabilityBuff, m_skin, int, 7);
73     ATTRIB(DisabilityBuff, m_color, vector, '0.94 0.3 1');
74 ENDCLASS(DisabilityBuff)
75 REGISTER_BUFF(DISABILITY, NEW(DisabilityBuff));
76 BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY)
77 // status effect applied to targets by the disability buff
78 CLASS(Disabled, StatusEffects)
79     ATTRIB(Disabled, netname, string, "disabled");
80     ATTRIB(Disabled, m_name, string, _("Disabled"));
81     ATTRIB(Disabled, m_icon, string, "buff_disability");
82     ATTRIB(Disabled, m_color, vector, '0.94 0.3 1');
83     ATTRIB(Disabled, m_hidden, bool, true);
84     ATTRIB(Disabled, m_lifetime, float, 10);
85     ATTRIB(Disabled, disabled_effect_time, float, 0); // TODO: handle this effect client side like EF_FLAME!
86 ENDCLASS(Disabled)
87 REGISTER_STATUSEFFECT(Disabled, NEW(Disabled));
88
89 CLASS(VengeanceBuff, Buff)
90     ATTRIB(VengeanceBuff, m_name, string, _("Vengeance"));
91     ATTRIB(VengeanceBuff, netname, string, "vengeance");
92     ATTRIB(VengeanceBuff, m_icon, string, "buff_vengeance");
93     ATTRIB(VengeanceBuff, m_skin, int, 15);
94     ATTRIB(VengeanceBuff, m_color, vector, '1 0.23 0.61');
95 ENDCLASS(VengeanceBuff)
96 REGISTER_BUFF(VENGEANCE, NEW(VengeanceBuff));
97 BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE)
98
99 CLASS(JumpBuff, Buff)
100     ATTRIB(JumpBuff, m_name, string, _("Jump"));
101     ATTRIB(JumpBuff, netname, string, "jump");
102     ATTRIB(JumpBuff, m_icon, string, "buff_jump");
103     ATTRIB(JumpBuff, m_skin, int, 10);
104     ATTRIB(JumpBuff, m_color, vector, '0.24 0.78 1');
105 ENDCLASS(JumpBuff)
106 REGISTER_BUFF(JUMP, NEW(JumpBuff));
107 BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
108 BUFF_SPAWNFUNC_Q3TA_COMPAT(jumper, BUFF_JUMP)
109
110 CLASS(InfernoBuff, Buff)
111     ATTRIB(InfernoBuff, m_name, string, _("Inferno"));
112     ATTRIB(InfernoBuff, netname, string, "inferno");
113     ATTRIB(InfernoBuff, m_icon, string, "buff_inferno");
114     ATTRIB(InfernoBuff, m_skin, int, 16);
115     ATTRIB(InfernoBuff, m_color, vector, '1 0.62 0');
116 ENDCLASS(InfernoBuff)
117 REGISTER_BUFF(INFERNO, NEW(InfernoBuff));
118 BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
119
120 CLASS(SwapperBuff, Buff)
121     ATTRIB(SwapperBuff, m_name, string, _("Swapper"));
122     ATTRIB(SwapperBuff, netname, string, "swapper");
123     ATTRIB(SwapperBuff, m_icon, string, "buff_swapper");
124     ATTRIB(SwapperBuff, m_skin, int, 17);
125     ATTRIB(SwapperBuff, m_color, vector, '0.63 0.36 1');
126 ENDCLASS(SwapperBuff)
127 REGISTER_BUFF(SWAPPER, NEW(SwapperBuff));
128 BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
129
130 CLASS(MagnetBuff, Buff)
131     ATTRIB(MagnetBuff, m_name, string, _("Magnet"));
132     ATTRIB(MagnetBuff, netname, string, "magnet");
133     ATTRIB(MagnetBuff, m_icon, string, "buff_magnet");
134     ATTRIB(MagnetBuff, m_skin, int, 18);
135     ATTRIB(MagnetBuff, m_color, vector, '1 0.95 0.18');
136 ENDCLASS(MagnetBuff)
137 REGISTER_BUFF(MAGNET, NEW(MagnetBuff));
138 BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
139
140 CLASS(LuckBuff, Buff)
141     ATTRIB(LuckBuff, m_name, string, _("Luck"));
142     ATTRIB(LuckBuff, netname, string, "luck");
143     ATTRIB(LuckBuff, m_icon, string, "buff_luck");
144     ATTRIB(LuckBuff, m_skin, int, 19);
145     ATTRIB(LuckBuff, m_color, vector, '1 0.23 0.44');
146 ENDCLASS(LuckBuff)
147 REGISTER_BUFF(LUCK, NEW(LuckBuff));
148 BUFF_SPAWNFUNCS(luck, BUFF_LUCK)
149
150 CLASS(FlightBuff, Buff)
151     ATTRIB(FlightBuff, m_name, string, _("Flight"));
152     ATTRIB(FlightBuff, netname, string, "flight");
153     ATTRIB(FlightBuff, m_icon, string, "buff_flight");
154     ATTRIB(FlightBuff, m_skin, int, 11);
155     ATTRIB(FlightBuff, m_color, vector, '0.23 0.44 1');
156 ENDCLASS(FlightBuff)
157 REGISTER_BUFF(FLIGHT, NEW(FlightBuff));
158 BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
159 BUFF_SPAWNFUNC_Q3TA_COMPAT(flight, BUFF_FLIGHT)