Xonotic
all.inc
Go to the documentation of this file.
1 string Buff_UndeprecateName(string buffname)
2 {
3  switch(buffname)
4  {
5  case "ammoregen": return "ammo"; // Q3TA ammoregen
6  case "doubler": return "inferno"; // Q3TA doubler
7  case "scout": return "bash"; // Q3TA scout
8  case "guard": return "resistance"; // Q3TA guard
9  case "revival": case "regen": return "medic"; // WOP revival, Q3A regen
10  case "jumper": return "jump"; // WOP jumper
11  case "invulnerability": return "vampire"; // Q3TA invulnerability
12  case "kamikaze": return "vengeance"; // Q3TA kamikaze
13  case "teleporter": return "swapper"; // Q3A personal teleporter
14  default: return buffname;
15  }
16 }
17 
19  ATTRIB(AmmoBuff, m_name, string, _("Ammo"));
20  ATTRIB(AmmoBuff, netname, string, "ammo");
21  ATTRIB(AmmoBuff, m_icon, string, "buff_ammo");
22  ATTRIB(AmmoBuff, m_skin, int, 3);
23  ATTRIB(AmmoBuff, m_color, vector, '0.76 1 0.1');
24 ENDCLASS(AmmoBuff)
25 REGISTER_BUFF(AMMO, NEW(AmmoBuff));
26 BUFF_SPAWNFUNCS(ammo, BUFF_AMMO)
27 BUFF_SPAWNFUNC_Q3COMPAT(item_ammoregen, BUFF_AMMO)
28 
30  ATTRIB(ResistanceBuff, m_name, string, _("Resistance"));
31  ATTRIB(ResistanceBuff, netname, string, "resistance");
32  ATTRIB(ResistanceBuff, m_icon, string, "buff_resistance");
33  ATTRIB(ResistanceBuff, m_skin, int, 0);
34  ATTRIB(ResistanceBuff, m_color, vector, '0.36 1 0.07');
35 ENDCLASS(ResistanceBuff)
36 REGISTER_BUFF(RESISTANCE, NEW(ResistanceBuff));
37 BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
38 BUFF_SPAWNFUNC_Q3COMPAT(item_guard, BUFF_RESISTANCE)
39 
41  ATTRIB(MedicBuff, m_name, string, _("Medic"));
42  ATTRIB(MedicBuff, netname, string, "medic");
43  ATTRIB(MedicBuff, m_icon, string, "buff_medic");
44  ATTRIB(MedicBuff, m_skin, int, 1);
45  ATTRIB(MedicBuff, m_color, vector, '1 0.12 0');
46 ENDCLASS(MedicBuff)
47 REGISTER_BUFF(MEDIC, NEW(MedicBuff));
48 BUFF_SPAWNFUNCS(medic, BUFF_MEDIC)
49 BUFF_SPAWNFUNC_Q3COMPAT(item_regen, BUFF_MEDIC)
50 BUFF_SPAWNFUNC_Q3COMPAT(item_revival, BUFF_MEDIC)
51 
53  ATTRIB(BashBuff, m_name, string, _("Bash"));
54  ATTRIB(BashBuff, netname, string, "bash");
55  ATTRIB(BashBuff, m_icon, string, "buff_bash");
56  ATTRIB(BashBuff, m_skin, int, 5);
57  ATTRIB(BashBuff, m_color, vector, '1 0.39 0');
58 ENDCLASS(BashBuff)
59 REGISTER_BUFF(BASH, NEW(BashBuff));
60 BUFF_SPAWNFUNCS(bash, BUFF_BASH)
61 BUFF_SPAWNFUNC_Q3COMPAT(item_scout, BUFF_BASH)
62 
64  ATTRIB(VampireBuff, m_name, string, _("Vampire"));
65  ATTRIB(VampireBuff, netname, string, "vampire");
66  ATTRIB(VampireBuff, m_icon, string, "buff_vampire");
67  ATTRIB(VampireBuff, m_skin, int, 2);
68  ATTRIB(VampireBuff, m_color, vector, '1 0 0.24');
69 ENDCLASS(VampireBuff)
70 REGISTER_BUFF(VAMPIRE, NEW(VampireBuff));
71 BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE)
72 BUFF_SPAWNFUNC_Q3COMPAT(holdable_invulnerability, BUFF_VAMPIRE)
73 
75  ATTRIB(DisabilityBuff, m_name, string, _("Disability"));
76  ATTRIB(DisabilityBuff, netname, string, "disability");
77  ATTRIB(DisabilityBuff, m_icon, string, "buff_disability");
78  ATTRIB(DisabilityBuff, m_skin, int, 7);
79  ATTRIB(DisabilityBuff, m_color, vector, '0.94 0.3 1');
80 ENDCLASS(DisabilityBuff)
81 REGISTER_BUFF(DISABILITY, NEW(DisabilityBuff));
82 BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY)
83 // status effect applied to targets by the disability buff
85  ATTRIB(Disabled, netname, string, "disabled");
86 #if 0
87  // NOTE: status effect name and icon disabled as they are not displayed
88  // re-enable if status effects are given a visual element
89  ATTRIB(Disabled, m_name, string, _("Disabled"));
90  ATTRIB(Disabled, m_icon, string, "buff_disability");
91 #endif
92  ATTRIB(Disabled, m_color, vector, '0.94 0.3 1');
93  ATTRIB(Disabled, m_hidden, bool, true);
94  ATTRIB(Disabled, m_lifetime, float, 10);
95  ATTRIB(Disabled, disabled_effect_time, float, 0); // TODO: handle this effect client side like EF_FLAME!
96 ENDCLASS(Disabled)
97 REGISTER_STATUSEFFECT(Disabled, NEW(Disabled));
98 
100  ATTRIB(VengeanceBuff, m_name, string, _("Vengeance"));
101  ATTRIB(VengeanceBuff, netname, string, "vengeance");
102  ATTRIB(VengeanceBuff, m_icon, string, "buff_vengeance");
103  ATTRIB(VengeanceBuff, m_skin, int, 15);
104  ATTRIB(VengeanceBuff, m_color, vector, '1 0.23 0.61');
105 ENDCLASS(VengeanceBuff)
106 REGISTER_BUFF(VENGEANCE, NEW(VengeanceBuff));
107 BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE)
108 BUFF_SPAWNFUNC_Q3COMPAT(holdable_kamikaze, BUFF_VENGEANCE)
109 
111  ATTRIB(JumpBuff, m_name, string, _("Jump"));
112  ATTRIB(JumpBuff, netname, string, "jump");
113  ATTRIB(JumpBuff, m_icon, string, "buff_jump");
114  ATTRIB(JumpBuff, m_skin, int, 10);
115  ATTRIB(JumpBuff, m_color, vector, '0.24 0.78 1');
116 ENDCLASS(JumpBuff)
117 REGISTER_BUFF(JUMP, NEW(JumpBuff));
118 BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
119 BUFF_SPAWNFUNC_Q3COMPAT(item_jumper, BUFF_JUMP)
120 
122  ATTRIB(InfernoBuff, m_name, string, _("Inferno"));
123  ATTRIB(InfernoBuff, netname, string, "inferno");
124  ATTRIB(InfernoBuff, m_icon, string, "buff_inferno");
125  ATTRIB(InfernoBuff, m_skin, int, 16);
126  ATTRIB(InfernoBuff, m_color, vector, '1 0.62 0');
127 ENDCLASS(InfernoBuff)
128 REGISTER_BUFF(INFERNO, NEW(InfernoBuff));
129 BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
130 BUFF_SPAWNFUNC_Q3COMPAT(item_doubler, BUFF_INFERNO)
131 
133  ATTRIB(SwapperBuff, m_name, string, _("Swapper"));
134  ATTRIB(SwapperBuff, netname, string, "swapper");
135  ATTRIB(SwapperBuff, m_icon, string, "buff_swapper");
136  ATTRIB(SwapperBuff, m_skin, int, 17);
137  ATTRIB(SwapperBuff, m_color, vector, '0.63 0.36 1');
138 ENDCLASS(SwapperBuff)
139 REGISTER_BUFF(SWAPPER, NEW(SwapperBuff));
140 BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
141 BUFF_SPAWNFUNC_Q3COMPAT(holdable_teleporter, BUFF_SWAPPER)
142 
144  ATTRIB(MagnetBuff, m_name, string, _("Magnet"));
145  ATTRIB(MagnetBuff, netname, string, "magnet");
146  ATTRIB(MagnetBuff, m_icon, string, "buff_magnet");
147  ATTRIB(MagnetBuff, m_skin, int, 18);
148  ATTRIB(MagnetBuff, m_color, vector, '1 0.95 0.18');
149 ENDCLASS(MagnetBuff)
150 REGISTER_BUFF(MAGNET, NEW(MagnetBuff));
151 BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
152 
154  ATTRIB(LuckBuff, m_name, string, _("Luck"));
155  ATTRIB(LuckBuff, netname, string, "luck");
156  ATTRIB(LuckBuff, m_icon, string, "buff_luck");
157  ATTRIB(LuckBuff, m_skin, int, 19);
158  ATTRIB(LuckBuff, m_color, vector, '1 0.23 0.44');
159 ENDCLASS(LuckBuff)
160 REGISTER_BUFF(LUCK, NEW(LuckBuff));
161 BUFF_SPAWNFUNCS(luck, BUFF_LUCK)
162 
164  ATTRIB(FlightBuff, m_name, string, _("Flight"));
165  ATTRIB(FlightBuff, netname, string, "flight");
166  ATTRIB(FlightBuff, m_icon, string, "buff_flight");
167  ATTRIB(FlightBuff, m_skin, int, 11);
168  ATTRIB(FlightBuff, m_color, vector, '0.23 0.44 1');
169 ENDCLASS(FlightBuff)
170 REGISTER_BUFF(FLIGHT, NEW(FlightBuff));
171 BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
172 BUFF_SPAWNFUNC_Q3COMPAT(item_flight, BUFF_FLIGHT)
Definition: all.inc:18
Definition: ammo.qh:19
#define NEW(cname,...)
Definition: oo.qh:105
CLASS(Object) Object
Definition: oo.qh:318
REGISTER_STATUSEFFECT(Disabled, NEW(Disabled))
bool disabled
string netname
Definition: powerups.qc:20
string Buff_UndeprecateName(string buffname)
Definition: all.inc:1
Definition: all.inc:84
#define ATTRIB(...)
Definition: oo.qh:136
Definition: all.inc:52
float ammo
Definition: sv_turrets.qh:44
Definition: buffs.qh:20
#define BUFF_SPAWNFUNCS(e, b)
Definition: buffs.qh:66
#define BUFF_SPAWNFUNC_Q3COMPAT(o, r)
Definition: buffs.qh:67
vector(float skel, float bonenum) _skel_get_boneabs_hidden
REGISTER_BUFF(AMMO, NEW(AmmoBuff))
#define ENDCLASS(cname)
Definition: oo.qh:269
string m_name
Definition: scores.qh:135