]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/effects/all.inc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / all.inc
1 #pragma once
2 // Global list of effects, networked to CSQC by ID to save bandwidth and to use client particle numbers (allows mismatching effectinfos to some degree)
3 // Not too concerned about the order of this list, just keep the weapon effects together!
4
5 #include "../teams.qh"
6
7 // EFFECT(istrail, EFFECT_NAME,     "effectinfo_string")
8 EFFECT(0, EXPLOSION_SMALL,          "explosion_small")
9 EFFECT(0, EXPLOSION_MEDIUM,         "explosion_medium")
10 EFFECT(0, EXPLOSION_BIG,            "explosion_big")
11
12 EFFECT(0, SMOKE_SMALL,              "smoke_small")
13 EFFECT(0, SMOKE_LARGE,              "smoke_large")
14
15
16 EFFECT(0, ARC_MUZZLEFLASH,          "arc_muzzleflash")
17
18 EFFECT(0, BLASTER_IMPACT,           "laser_impact")
19 EFFECT(0, BLASTER_MUZZLEFLASH,      "laser_muzzleflash")
20
21 EFFECT(0, SHOTGUN_IMPACT,           "shotgun_impact")
22 EFFECT(0, SHOTGUN_MUZZLEFLASH,      "shotgun_muzzleflash")
23
24 EFFECT(0, ARC_BEAM,                 "arc_beam")
25 EFFECT(0, ARC_BEAM_HEAL,            "arc_beam_heal")
26 EFFECT(0, ARC_BEAM_HEAL_IMPACT,     "arc_beam_healimpact")
27 EFFECT(0, ARC_BEAM_HEAL_IMPACT2,    "healray_impact")
28 EFFECT(0, ARC_BOLT_EXPLODE,         "arc_bolt_explode")
29 EFFECT(0, ARC_OVERHEAT,             "arc_overheat")
30 EFFECT(0, ARC_OVERHEAT_FIRE,        "arc_overheat_fire")
31 EFFECT(0, ARC_SMOKE,                "arc_smoke")
32 EFFECT(0, ARC_LIGHTNING,            "arc_lightning")
33 EFFECT(0, ARC_LIGHTNING2,           "electro_lightning")
34
35 EFFECT(0, MACHINEGUN_IMPACT,        "machinegun_impact")
36 EFFECT(0, MACHINEGUN_MUZZLEFLASH,   "uzi_muzzleflash")
37
38 EFFECT(0, GRENADE_EXPLODE,          "grenade_explode")
39 EFFECT(0, GRENADE_MUZZLEFLASH,      "grenadelauncher_muzzleflash")
40
41 EFFECT(0, ELECTRO_BALLEXPLODE,      "electro_ballexplode")
42 EFFECT(0, ELECTRO_COMBO,            "electro_combo")
43 EFFECT(0, ELECTRO_IMPACT,           "electro_impact")
44 EFFECT(0, ELECTRO_MUZZLEFLASH,      "electro_muzzleflash")
45
46 EFFECT(0, CRYLINK_IMPACT,           "crylink_impactbig")
47 EFFECT(0, CRYLINK_IMPACT2,          "crylink_impact")
48 EFFECT(0, CRYLINK_JOINEXPLODE,      "crylink_joinexplode")
49 EFFECT(0, CRYLINK_MUZZLEFLASH,      "crylink_muzzleflash")
50
51 EFFECT(0, VORTEX_BEAM,              "nex_beam")
52 EFFECT(0, VORTEX_BEAM_OLD,          "TE_TEI_G3")
53 EFFECT(0, VORTEX_IMPACT,            "nex_impact")
54 EFFECT(0, VORTEX_MUZZLEFLASH,       "nex_muzzleflash")
55
56 EFFECT(1, VAPORIZER_RED,            "TE_TEI_G3RED")
57 EFFECT(1, VAPORIZER_HIT_RED,        "TE_TEI_G3RED_HIT")
58 EFFECT(1, VAPORIZER_BLUE,           "TE_TEI_G3BLUE")
59 EFFECT(1, VAPORIZER_HIT_BLUE,       "TE_TEI_G3BLUE_HIT")
60 EFFECT(1, VAPORIZER_YELLOW,         "TE_TEI_G3YELLOW")
61 EFFECT(1, VAPORIZER_HIT_YELLOW,     "TE_TEI_G3YELLOW_HIT")
62 EFFECT(1, VAPORIZER_PINK,           "TE_TEI_G3PINK")
63 EFFECT(1, VAPORIZER_HIT_PINK,       "TE_TEI_G3PINK_HIT")
64 EFFECT(1, VAPORIZER_NEUTRAL,        "TE_TEI_G3")
65 EFFECT(1, VAPORIZER_HIT_NEUTRAL,    "TE_TEI_G3_HIT")
66 entity EFFECT_VAPORIZER(int teamid)
67 {
68     switch (teamid) {
69         case NUM_TEAM_1:    return EFFECT_VAPORIZER_RED;
70         case NUM_TEAM_2:    return EFFECT_VAPORIZER_BLUE;
71         case NUM_TEAM_3:    return EFFECT_VAPORIZER_YELLOW;
72         case NUM_TEAM_4:    return EFFECT_VAPORIZER_PINK;
73         default:            return EFFECT_VAPORIZER_NEUTRAL;
74     }
75 }
76 entity EFFECT_VAPORIZER_HIT(int teamid)
77 {
78     switch (teamid) {
79         case NUM_TEAM_1:    return EFFECT_VAPORIZER_HIT_RED;
80         case NUM_TEAM_2:    return EFFECT_VAPORIZER_HIT_BLUE;
81         case NUM_TEAM_3:    return EFFECT_VAPORIZER_HIT_YELLOW;
82         case NUM_TEAM_4:    return EFFECT_VAPORIZER_HIT_PINK;
83         default:            return EFFECT_VAPORIZER_HIT_NEUTRAL;
84     }
85 }
86
87 EFFECT(0, RIFLE_IMPACT,             "machinegun_impact")
88 EFFECT(0, RIFLE_MUZZLEFLASH,        "rifle_muzzleflash")
89 EFFECT(1, RIFLE,                    "tr_rifle")
90 EFFECT(1, RIFLE_WEAK,               "tr_rifle_weak")
91
92 EFFECT(0, HAGAR_BOUNCE,             "hagar_bounce")
93 EFFECT(0, HAGAR_EXPLODE,            "hagar_explode")
94 EFFECT(0, HAGAR_MUZZLEFLASH,        "hagar_muzzleflash")
95 EFFECT(1, HAGAR_ROCKET,             "tr_hagar")
96
97 EFFECT(0, ROCKET_EXPLODE,           "rocket_explode")
98 EFFECT(0, ROCKET_GUIDE,             "rocket_guide")
99 EFFECT(0, ROCKET_MUZZLEFLASH,       "rocketlauncher_muzzleflash")
100
101 EFFECT(0, HOOK_EXPLODE,             "hookbomb_explode")
102 EFFECT(0, HOOK_IMPACT,              "grapple_impact")
103 EFFECT(0, HOOK_MUZZLEFLASH,         "grapple_muzzleflash")
104
105 EFFECT(0, SEEKER_MUZZLEFLASH,       "seeker_muzzleflash")
106
107 EFFECT(1, FIREBALL,                 "fireball")
108 EFFECT(0, FIREBALL_BFGDAMAGE,       "fireball_bfgdamage")
109 EFFECT(0, FIREBALL_EXPLODE,         "fireball_explode")
110 EFFECT(0, FIREBALL_LASER,           "fireball_laser")
111 EFFECT(0, FIREBALL_MUZZLEFLASH,     "fireball_muzzleflash")
112 EFFECT(0, FIREBALL_PRE_MUZZLEFLASH, "fireball_preattack_muzzleflash")
113
114
115
116 EFFECT(0, RAPTOR_CANNON_IMPACT,     "raptor_cannon_impact")
117 EFFECT(0, RAPTOR_BOMB_IMPACT,       "raptor_bomb_impact")
118 EFFECT(0, RAPTOR_BOMB_SPREAD,       "raptor_bomb_spread")
119 EFFECT(0, RAPTOR_MUZZLEFLASH,       "raptor_cannon_muzzleflash")
120
121 EFFECT(0, RACER_BOOSTER,            "wakizashi_booster_smoke")
122 EFFECT(0, RACER_IMPACT,             "wakizashi_gun_impact")
123 EFFECT(0, RACER_MUZZLEFLASH,        "wakizashi_gun_muzzleflash")
124 EFFECT(0, RACER_ROCKETLAUNCH,       "wakizashi_rocket_launch")
125 EFFECT(0, RACER_ROCKET_EXPLODE,     "wakizashi_rocket_explode")
126 EFFECT(1, RACER_ROCKET_TRAIL,       "wakizashi_rocket_thrust")
127
128 EFFECT(0, SPIDERBOT_ROCKETLAUNCH,           "spiderbot_rocket_launch")
129 EFFECT(1, SPIDERBOT_ROCKET_TRAIL,           "spiderbot_rocket_thrust")
130 EFFECT(0, SPIDERBOT_ROCKET_EXPLODE,         "spiderbot_rocket_explode")
131 EFFECT(0, SPIDERBOT_MINIGUN_IMPACT,         "spiderbot_minigun_impact")
132 EFFECT(0, SPIDERBOT_MINIGUN_MUZZLEFLASH,    "spiderbot_minigun_muzzleflash")
133
134 EFFECT(0, BUMBLEBEE_HEAL_MUZZLEFLASH,   "healray_muzzleflash")
135 EFFECT(0, BUMBLEBEE_HEAL_IMPACT,        "healray_impact")
136
137 EFFECT(0, BIGPLASMA_IMPACT,         "bigplasma_impact")
138 EFFECT(0, BIGPLASMA_MUZZLEFLASH,    "bigplasma_muzzleflash")
139
140 EFFECT(0, TELEPORT,                 "teleport")
141
142 EFFECT(0, SPAWNPOINT_RED,           "spawn_point_red")
143 EFFECT(0, SPAWNPOINT_BLUE,          "spawn_point_blue")
144 EFFECT(0, SPAWNPOINT_YELLOW,        "spawn_point_yellow")
145 EFFECT(0, SPAWNPOINT_PINK,          "spawn_point_pink")
146 EFFECT(0, SPAWNPOINT_NEUTRAL,       "spawn_point_neutral")
147 entity EFFECT_SPAWNPOINT(int teamid)
148 {
149     switch (teamid) {
150         case NUM_TEAM_1:    return EFFECT_SPAWNPOINT_RED;
151         case NUM_TEAM_2:    return EFFECT_SPAWNPOINT_BLUE;
152         case NUM_TEAM_3:    return EFFECT_SPAWNPOINT_YELLOW;
153         case NUM_TEAM_4:    return EFFECT_SPAWNPOINT_PINK;
154         default:            return EFFECT_SPAWNPOINT_NEUTRAL;
155     }
156 }
157
158 EFFECT(0, SPAWN_RED,                "spawn_event_red")
159 EFFECT(0, SPAWN_BLUE,               "spawn_event_blue")
160 EFFECT(0, SPAWN_YELLOW,             "spawn_event_yellow")
161 EFFECT(0, SPAWN_PINK,               "spawn_event_pink")
162 EFFECT(0, SPAWN_NEUTRAL,            "spawn_event_neutral")
163 entity EFFECT_SPAWN(int teamid)
164 {
165     switch (teamid) {
166         case NUM_TEAM_1:    return EFFECT_SPAWN_RED;
167         case NUM_TEAM_2:    return EFFECT_SPAWN_BLUE;
168         case NUM_TEAM_3:    return EFFECT_SPAWN_YELLOW;
169         case NUM_TEAM_4:    return EFFECT_SPAWN_PINK;
170         default:            return EFFECT_SPAWN_NEUTRAL;
171     }
172 }
173
174 EFFECT(0, ICEORGLASS,               "iceorglass")
175 EFFECT(0, ICEFIELD,                 "icefield")
176 EFFECT(0, FIREFIELD,                "firefield")
177 EFFECT(0, HEALING,                  "healing_fx")
178 EFFECT(0, ARMOR_REPAIR,             "armorrepair_fx")
179 EFFECT(0, AMMO_REGEN,               "ammoregen_fx")
180 EFFECT(1, LASER_BEAM_FAST,          "nex242_misc_laser_beam_fast")
181 EFFECT(0, RESPAWN_GHOST,            "respawn_ghost")
182
183 EFFECT(0, FLAG_TOUCH_RED,           "redflag_touch")
184 EFFECT(0, FLAG_TOUCH_BLUE,          "blueflag_touch")
185 EFFECT(0, FLAG_TOUCH_YELLOW,        "yellowflag_touch")
186 EFFECT(0, FLAG_TOUCH_PINK,          "pinkflag_touch")
187 EFFECT(0, FLAG_TOUCH_NEUTRAL,       "neutralflag_touch")
188 entity EFFECT_FLAG_TOUCH(int teamid)
189 {
190     switch (teamid) {
191         case NUM_TEAM_1:    return EFFECT_FLAG_TOUCH_RED;
192         case NUM_TEAM_2:    return EFFECT_FLAG_TOUCH_BLUE;
193         case NUM_TEAM_3:    return EFFECT_FLAG_TOUCH_YELLOW;
194         case NUM_TEAM_4:    return EFFECT_FLAG_TOUCH_PINK;
195         default:            return EFFECT_FLAG_TOUCH_NEUTRAL;
196     }
197 }
198
199 EFFECT(1, PASS_RED,                 "red_pass")
200 EFFECT(1, PASS_BLUE,                "blue_pass")
201 EFFECT(1, PASS_YELLOW,              "yellow_pass")
202 EFFECT(1, PASS_PINK,                "pink_pass")
203 EFFECT(1, PASS_NEUTRAL,             "neutral_pass")
204 entity EFFECT_PASS(int teamid)
205 {
206     switch (teamid) {
207         case NUM_TEAM_1:    return EFFECT_PASS_RED;
208         case NUM_TEAM_2:    return EFFECT_PASS_BLUE;
209         case NUM_TEAM_3:    return EFFECT_PASS_YELLOW;
210         case NUM_TEAM_4:    return EFFECT_PASS_PINK;
211         default:            return EFFECT_PASS_NEUTRAL;
212     }
213 }
214
215 EFFECT(0, CAP_RED,                  "red_cap")
216 EFFECT(0, CAP_BLUE,                 "blue_cap")
217 EFFECT(0, CAP_YELLOW,               "yellow_cap")
218 EFFECT(0, CAP_PINK,                 "pink_cap")
219 EFFECT(0, CAP_NEUTRAL,              "neutral_cap")
220 entity EFFECT_CAP(int teamid)
221 {
222     switch (teamid) {
223         case NUM_TEAM_1:    return EFFECT_CAP_RED;
224         case NUM_TEAM_2:    return EFFECT_CAP_BLUE;
225         case NUM_TEAM_3:    return EFFECT_CAP_YELLOW;
226         case NUM_TEAM_4:    return EFFECT_CAP_PINK;
227         default:            return EFFECT_CAP_NEUTRAL;
228     }
229 }
230
231 EFFECT(0, ITEM_PICKUP,              "item_pickup")
232 EFFECT(0, ITEM_RESPAWN,             "item_respawn")
233
234 EFFECT(0, ONS_GENERATOR_DAMAGED,    "torch_small")
235 EFFECT(0, ONS_GENERATOR_GIB,        "onslaught_generator_gib_explode")
236 EFFECT(0, ONS_GENERATOR_EXPLODE,    "onslaught_generator_smallexplosion")
237 EFFECT(0, ONS_GENERATOR_EXPLODE2,   "onslaught_generator_finalexplosion")
238
239
240
241 EFFECT(0, LASER_DEADLY,             "laser_deadly")
242 EFFECT(1, FLAC_TRAIL,               "TR_SEEKER")
243 EFFECT(1, SEEKER_TRAIL,             "TR_SEEKER")
244 EFFECT(1, FIREMINE,                 "firemine")
245 EFFECT(0, BALL_SPARKS,              "kaball_sparks")
246 EFFECT(0, ELECTRIC_SPARKS,          "electricity_sparks")
247 EFFECT(0, SPARKS,                   "sparks")
248 EFFECT(0, RAGE,                     "rage")
249 EFFECT(0, SMOKING,                  "smoking")
250 EFFECT(0, SMOKE_RING,               "smoke_ring")
251 EFFECT(0, JUMPPAD,                  "jumppad_activate")
252 EFFECT(1, BULLET,                   "tr_bullet")
253 EFFECT(1, BULLET_WEAK,              "tr_bullet_weak")
254 EFFECT(0, EF_FLAME,                 "EF_FLAME")
255 EFFECT(0, EF_STARDUST,              "EF_STARDUST")
256 EFFECT(0, TE_EXPLOSION,             "TE_EXPLOSION")
257 EFFECT(1, TR_NEXUIZPLASMA,          "TR_NEXUIZPLASMA")
258 EFFECT(1, TR_CRYLINKPLASMA,         "TR_CRYLINKPLASMA")
259 EFFECT(1, TR_ROCKET,                "TR_ROCKET")
260 EFFECT(1, TR_GRENADE,               "TR_GRENADE")
261 EFFECT(1, TR_BLOOD,                 "TR_BLOOD")
262 EFFECT(1, TR_WIZSPIKE,              "TR_WIZSPIKE")
263 EFFECT(1, TR_SLIGHTBLOOD,           "TR_SLIGHTBLOOD")
264 EFFECT(1, TR_KNIGHTSPIKE,           "TR_KNIGHTSPIKE")
265 EFFECT(1, TR_VORESPIKE,             "TR_VORESPIKE")
266 EFFECT(0, TE_SPARK,                 "TE_SPARK")
267
268 EFFECT(1, ROCKETMINSTA_LASER_RED,       "rocketminsta_laser_red")
269 EFFECT(1, ROCKETMINSTA_LASER_BLUE,      "rocketminsta_laser_blue")
270 EFFECT(1, ROCKETMINSTA_LASER_YELLOW,    "rocketminsta_laser_yellow")
271 EFFECT(1, ROCKETMINSTA_LASER_PINK,      "rocketminsta_laser_pink")
272 EFFECT(1, ROCKETMINSTA_LASER_NEUTRAL,   "rocketminsta_laser_neutral")
273 entity EFFECT_ROCKETMINSTA_LASER(int teamid)
274 {
275     entity e;
276     switch (teamid) {
277         case NUM_TEAM_1:    e = EFFECT_ROCKETMINSTA_LASER_RED; break;
278         case NUM_TEAM_2:    e = EFFECT_ROCKETMINSTA_LASER_BLUE; break;
279         case NUM_TEAM_3:    e = EFFECT_ROCKETMINSTA_LASER_YELLOW; break;
280         case NUM_TEAM_4:    e = EFFECT_ROCKETMINSTA_LASER_PINK; break;
281         default:            e = EFFECT_ROCKETMINSTA_LASER_NEUTRAL; break;
282     }
283     if (particleeffectnum(e) < 0 || !Team_IsValidTeam(teamid)) { e = EFFECT_TR_NEXUIZPLASMA; }
284     return e;
285 }