File: | src/skills.c |
Location: | line 932, column 4 |
Description: | Value stored to 'nextypos' is never read |
1 | /* |
2 | * |
3 | * Copyright (c) 2002, 2003 Johannes Prix |
4 | * Copyright (c) 2004-2010 Arthur Huillet |
5 | * |
6 | * This file is part of Freedroid |
7 | * |
8 | * Freedroid is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or |
11 | * (at your option) any later version. |
12 | * |
13 | * Freedroid is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
19 | * along with Freedroid; see the file COPYING. If not, write to the |
20 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | * MA 02111-1307 USA |
22 | * |
23 | */ |
24 | |
25 | /** |
26 | * This file contains all the functions managing the character skills, |
27 | * which means all the special functions and also the spells of the |
28 | * players character. |
29 | */ |
30 | |
31 | #define _skills_c |
32 | |
33 | #include "system.h" |
34 | |
35 | #include "defs.h" |
36 | #include "struct.h" |
37 | #include "global.h" |
38 | #include "proto.h" |
39 | |
40 | #define CLASS_X175 175 |
41 | |
42 | #define EXPERIENCE_Y150 150 |
43 | #define NEXT_LEVEL_Y220 220 |
44 | |
45 | #define GOLD_Y132 132 |
46 | |
47 | #define BUTTON_MOD_X(-6) (-6) |
48 | #define BUTTON_MOD_Y(-4) (-4) |
49 | #define BUTTON_WIDTH35 35 |
50 | #define BUTTON_HEIGHT19 19 |
51 | |
52 | #define DAMAGE_X260 260 |
53 | #define DAMAGE_Y225 225 |
54 | |
55 | #define RECHARGE_X260 260 |
56 | #define RECHARGE_Y200 200 |
57 | |
58 | #define DAMRED_X260 260 |
59 | #define DAMRED_Y171 171 |
60 | |
61 | #define INV_BUTTON_X600 600 |
62 | #define INV_BUTTON_Y400 400 |
63 | #define CHA_BUTTON_X600 600 |
64 | #define CHA_BUTTON_Y430 430 |
65 | #define INV_BUTTON_WIDTH38 38 |
66 | #define INV_BUTTON_HEIGHT22 22 |
67 | |
68 | #define SPELL_LEVEL_BUTTONS_X60 60 |
69 | #define SPELL_LEVEL_BUTTONS_Y423 423 |
70 | #define SPELL_LEVEL_BUTTON_WIDTH30 30 |
71 | #define SPELL_LEVEL_BUTTON_HEIGHT30 SPELL_LEVEL_BUTTON_WIDTH30 |
72 | |
73 | #define NUMBER_OF_SKILL_PAGES8 8 |
74 | |
75 | static int Override_Power_Limit = 0; |
76 | static struct image skill_level_images[NUMBER_OF_SKILL_PAGES8]; |
77 | |
78 | /** |
79 | * This function improves a generic skill (hack melee ranged magic) by one |
80 | * |
81 | */ |
82 | void ImproveSkill(int *skill) |
83 | { |
84 | if (*skill >= NUMBER_OF_SKILL_LEVELS10 - 1) |
85 | return; |
86 | (*skill)++; |
87 | }; // void ImproveSkill ( int * skill ) |
88 | |
89 | /** |
90 | * This function improves a program by one |
91 | * returns 1 if it can't be improved any further, returns 0 otherwise |
92 | * |
93 | */ |
94 | int improve_program(int prog_id) |
95 | { |
96 | if(prog_id < 0) |
97 | return 0; |
98 | |
99 | if(Me.skill_level[prog_id] >= NUMBER_OF_SKILL_LEVELS10 - 1) |
100 | return 1; |
101 | |
102 | Me.skill_level[prog_id]++; |
103 | return 0; |
104 | } |
105 | |
106 | void downgrade_program(int prog_id) |
107 | { |
108 | if (prog_id < 0) |
109 | return; |
110 | |
111 | Me.skill_level[prog_id]--; |
112 | if (Me.skill_level[prog_id] < 0) |
113 | Me.skill_level[prog_id] = 0; |
114 | |
115 | // If the current skill level was downgraded to 0, the current |
116 | // skill needs to be unselected. |
117 | if (!Me.skill_level[prog_id] && Me.readied_skill == prog_id) { |
118 | int i; |
119 | for (i = 0; i < MAX_NUMBER_OF_PROGRAMS50; i++) { |
120 | if (Me.skill_level[i] > 0) { |
121 | activate_nth_skill(i); |
122 | return; |
123 | } |
124 | } |
125 | |
126 | error_message(__FUNCTION__, "No skills are available for selection.", PLEASE_INFORM); |
127 | } |
128 | } |
129 | |
130 | /* ------------------ |
131 | * This function calculates the heat cost of running a given program (source or blob), based on current program level and casting ability |
132 | * -----------------*/ |
133 | int calculate_program_heat_cost(int program_id) |
134 | { |
135 | // 0.9^0, 0.9^1, 0.9^2 ... ...0.9^9 |
136 | float cost_ratio[NUMBER_OF_SKILL_LEVELS10] = { 1.0, 0.9, 0.81, 0.73, 0.66, 0.59, 0.53, 0.48, 0.43, 0.39 }; |
137 | |
138 | if (program_id == get_program_index_with_name("Emergency shutdown") ) { //then use cost_ratio^-1 |
139 | return (1/cost_ratio[Me.spellcasting_skill]) * (SpellSkillMap[program_id].heat_cost + |
140 | SpellSkillMap[program_id].heat_cost_per_level * (Me.skill_level[program_id] - 1)); |
141 | } else { |
142 | return cost_ratio[Me.spellcasting_skill] * (SpellSkillMap[program_id].heat_cost + |
143 | SpellSkillMap[program_id].heat_cost_per_level * (Me.skill_level[program_id] - 1)); |
144 | } |
145 | }; |
146 | |
147 | /* ------------------ |
148 | * This function calculates the damage dealt by a hit of a given program |
149 | * -----------------*/ |
150 | static int calculate_program_hit_damage(int program_id) |
151 | { |
152 | return (SpellSkillMap[program_id].damage_base + SpellSkillMap[program_id].damage_per_level * (Me.skill_level[program_id] - 1) + |
153 | MyRandom(SpellSkillMap[program_id].damage_mod)); |
154 | } |
155 | |
156 | /* ------------------ |
157 | * This function calculates the lowest damage a program can deal |
158 | *-----------------*/ |
159 | static int calculate_program_hit_damage_low(int program_id) |
160 | { |
161 | return (SpellSkillMap[program_id].damage_base + SpellSkillMap[program_id].damage_per_level * (Me.skill_level[program_id] - 1)); |
162 | |
163 | } |
164 | |
165 | static int calculate_program_hit_damage_high(int program_id) |
166 | { |
167 | return (SpellSkillMap[program_id].damage_base + SpellSkillMap[program_id].damage_per_level * (Me.skill_level[program_id] - 1) + |
168 | SpellSkillMap[program_id].damage_mod); |
169 | } |
170 | |
171 | /* ------------------ |
172 | * This function calculates the duration of the special effect of a |
173 | * given program |
174 | * ------------------*/ |
175 | static float calculate_program_effect_duration(int program_id) |
176 | { |
177 | return (SpellSkillMap[program_id].effect_duration + |
178 | SpellSkillMap[program_id].effect_duration_per_level * (Me.skill_level[program_id] - 1)); |
179 | } |
180 | |
181 | /** |
182 | * This function calculates the busy time (recovery time) for tux after running a program |
183 | */ |
184 | static float calculate_program_busy_time(void) |
185 | { |
186 | float busy_time[NUMBER_OF_SKILL_LEVELS10] = { 1.0, 0.9, 0.81, 0.73, 0.66, 0.59, 0.53, 0.48, 0.43, 0.39 }; |
187 | return busy_time[Me.spellcasting_skill]; |
188 | } |
189 | |
190 | /* ------------------ |
191 | * This function looks for a given program name in the program spec array |
192 | * -------------------*/ |
193 | int get_program_index_with_name(const char *pname) |
194 | { |
195 | int i = 0; |
196 | while (i < number_of_skills) { |
197 | if (!strcmp(SpellSkillMap[i].name, pname)__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[i].name) && __builtin_constant_p (pname ) && (__s1_len = strlen (SpellSkillMap[i].name), __s2_len = strlen (pname), (!((size_t)(const void *)((SpellSkillMap[i ].name) + 1) - (size_t)(const void *)(SpellSkillMap[i].name) == 1) || __s1_len >= 4) && (!((size_t)(const void *) ((pname) + 1) - (size_t)(const void *)(pname) == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[i].name, pname) : (__builtin_constant_p (SpellSkillMap[i].name) && ((size_t )(const void *)((SpellSkillMap[i].name) + 1) - (size_t)(const void *)(SpellSkillMap[i].name) == 1) && (__s1_len = strlen (SpellSkillMap[i].name), __s1_len < 4) ? (__builtin_constant_p (pname) && ((size_t)(const void *)((pname) + 1) - (size_t )(const void *)(pname) == 1) ? __builtin_strcmp (SpellSkillMap [i].name, pname) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (pname); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[i] .name))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[i].name))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[i].name))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[i].name))[3] - __s2[3] ); } } __result; }))) : (__builtin_constant_p (pname) && ((size_t)(const void *)((pname) + 1) - (size_t)(const void * )(pname) == 1) && (__s2_len = strlen (pname), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[i].name) && ((size_t)(const void *)((SpellSkillMap[i].name) + 1) - (size_t )(const void *)(SpellSkillMap[i].name) == 1) ? __builtin_strcmp (SpellSkillMap[i].name, pname) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [i].name); int __result = (((const unsigned char *) (const char *) (pname))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ( pname))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( pname))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (pname ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [i].name, pname)))); })) |
198 | return i; |
199 | i++; |
200 | } |
201 | |
202 | fprintf(stderrstderr, "%s\n", pname); |
203 | |
204 | error_message(__FUNCTION__, "\ |
205 | FreedroidRPG could not find the program name above in the program spec array!", PLEASE_INFORM | IS_FATAL); |
206 | return -1; |
207 | } |
208 | |
209 | /** |
210 | * This function creates a teleporter portal to the home location. |
211 | * @return 1 on success, 0 on failure |
212 | */ |
213 | int TeleportHome(void) |
214 | { |
215 | // Check if this level permits teleport |
216 | if (curShip.AllLevels[Me.pos.z]->flags & TELEPORT_BLOCKED) { |
217 | append_new_game_message(_("You cannot teleport here!")("You cannot teleport here!"[0]!='\0'?dcgettext (((void*)0), "You cannot teleport here!" , 5):"")); |
218 | return 0; |
219 | } |
220 | |
221 | // Find homespot position. |
222 | gps home_spot = get_map_label_center("TeleportHomeTarget"); |
223 | |
224 | // If homespot was not found, a fatal error has been generated, but we |
225 | // however check it once again, to prevent any bug. |
226 | |
227 | if (home_spot.z == -1) |
228 | return 1; |
229 | |
230 | // Case 1 : Tux is in homespot's level, and there is a teleport anchor |
231 | // -> teleport back to previous position |
232 | // |
233 | if (Me.pos.z == home_spot.z && (Me.teleport_anchor.z != -1)) { |
234 | |
235 | // Teleport |
236 | teleport_arrival_sound(); |
237 | reset_visible_levels(); |
238 | Teleport(Me.teleport_anchor.z, Me.teleport_anchor.x, Me.teleport_anchor.y, TRUE(1), TRUE(1)); |
239 | clear_active_bullets(); |
240 | |
241 | // Reset teleport anchor |
242 | Me.teleport_anchor.x = 0; |
243 | Me.teleport_anchor.y = 0; |
244 | Me.teleport_anchor.z = -1; |
245 | |
246 | return 1; |
247 | } |
248 | |
249 | // Any other cases : Store current position and teleport Tux to homespot |
250 | // |
251 | Me.teleport_anchor.x = Me.pos.x; |
252 | Me.teleport_anchor.y = Me.pos.y; |
253 | Me.teleport_anchor.z = Me.pos.z; |
254 | |
255 | teleport_arrival_sound(); |
256 | reset_visible_levels(); |
257 | Teleport(home_spot.z, home_spot.x, home_spot.y, TRUE(1), TRUE(1)); |
258 | clear_active_bullets(); |
259 | |
260 | return 1; |
261 | } // void TeleportHome ( void ) |
262 | |
263 | /** |
264 | * This function handles the program the player has just activated. |
265 | * It checks temperature (does not increase it), and makes sure a |
266 | * busy_time is set. |
267 | */ |
268 | void HandleCurrentlyActivatedSkill() |
269 | { |
270 | if (!MouseRightClicked() || Me.busy_time > 0) |
271 | return; |
272 | |
273 | if (MouseCursorIsInInventoryGrid(GetMousePos_x(), GetMousePos_y())) |
274 | return; |
275 | |
276 | if (Me.skill_level[Me.readied_skill] <= 0) |
277 | return; |
278 | |
279 | /* We calculate the spellcost and check the power limit override - the temperature is raised further down, when the actual effect |
280 | gets triggered */ |
281 | int SpellCost = calculate_program_heat_cost(Me.readied_skill); |
282 | |
283 | if (Me.temperature > Me.max_temperature - SpellCost && !Override_Power_Limit) { |
284 | Override_Power_Limit = 1; |
285 | return; |
286 | } |
287 | Override_Power_Limit = 0; |
288 | |
289 | switch (SpellSkillMap[Me.readied_skill].form) { |
290 | case PROGRAM_FORM_INSTANT: |
291 | case PROGRAM_FORM_BULLET: |
292 | case PROGRAM_FORM_RADIAL: |
293 | if (!MouseCursorIsInUserRect(GetMousePos_x(), GetMousePos_y())) |
294 | return;; |
295 | break; |
296 | } |
297 | |
298 | DoSkill(Me.readied_skill, SpellCost); |
299 | |
300 | /* Certain special actions implemented through DoSkill may set their own |
301 | * busy time, such as weapon reload. In that case, do not touch busy_time. |
302 | * Otherwise, mark that we are running a program. |
303 | */ |
304 | |
305 | if (Me.busy_time == 0) { |
306 | Me.busy_time = calculate_program_busy_time(); |
307 | Me.busy_type = RUNNING_PROGRAM; |
308 | } |
309 | |
310 | return; |
311 | }; // void HandleCurrentlyActivatedSkill( void ) |
312 | |
313 | /** |
314 | * \brief Perform a skill action. |
315 | * \param skill_index The index of the skill. |
316 | * \param SpellCost The cost of spell calculated before. |
317 | * \return FALSE if the skill has failed, TRUE otherwise. |
318 | */ |
319 | int DoSkill(int skill_index, int SpellCost) |
320 | { |
321 | enemy *droid_below_mouse_cursor = NULL((void*)0); |
322 | |
323 | float hitdmg = calculate_program_hit_damage(skill_index); |
324 | float effdur = calculate_program_effect_duration(skill_index); |
325 | |
326 | /*we handle the form of the program now */ |
327 | switch (SpellSkillMap[skill_index].form) { |
328 | case PROGRAM_FORM_INSTANT: |
329 | droid_below_mouse_cursor = GetLivingDroidBelowMouseCursor(); |
330 | if (droid_below_mouse_cursor == NULL((void*)0)) |
331 | return 0; |
332 | if (!DirectLineColldet(Me.pos.x, |
333 | Me.pos.y, |
334 | translate_pixel_to_map_location((float)input_axis.x, |
335 | (float)input_axis.y, |
336 | TRUE(1)), |
337 | translate_pixel_to_map_location((float)input_axis.x, |
338 | (float)input_axis.y, FALSE(0)), Me.pos.z, &FlyablePassFilter)) |
339 | return 0; |
340 | |
341 | if ((Droidmap[droid_below_mouse_cursor->type].is_human && !SpellSkillMap[skill_index].hurt_humans) |
342 | || (!Droidmap[droid_below_mouse_cursor->type].is_human && !SpellSkillMap[skill_index].hurt_bots)) |
343 | return 0; |
344 | |
345 | if (hitdmg > 0) |
346 | hit_enemy(droid_below_mouse_cursor, hitdmg, 1, -1, 1); |
347 | |
348 | if (!strcmp(SpellSkillMap[skill_index].effect, "paralyze")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("paralyze") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("paralyze"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("paralyze") && ((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("paralyze"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("paralyze" ) && ((size_t)(const void *)(("paralyze") + 1) - (size_t )(const void *)("paralyze") == 1) && (__s2_len = strlen ("paralyze"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("paralyze"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("paralyze"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("paralyze"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("paralyze"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze")))); })) |
349 | droid_below_mouse_cursor->paralysation_duration_left += effdur; |
350 | if (!strcmp(SpellSkillMap[skill_index].effect, "slowdown")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("slowdown") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("slowdown"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("slowdown") && ((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("slowdown"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("slowdown" ) && ((size_t)(const void *)(("slowdown") + 1) - (size_t )(const void *)("slowdown") == 1) && (__s2_len = strlen ("slowdown"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("slowdown"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("slowdown"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("slowdown"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("slowdown"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown")))); })) |
351 | droid_below_mouse_cursor->frozen += effdur; |
352 | if (!strcmp(SpellSkillMap[skill_index].effect, "poison")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("poison") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("poison"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("poison") && ((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("poison"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("poison" ) && ((size_t)(const void *)(("poison") + 1) - (size_t )(const void *)("poison") == 1) && (__s2_len = strlen ("poison"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "poison") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("poison"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("poison"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" )))); })) { |
353 | droid_below_mouse_cursor->poison_duration_left += effdur; |
354 | droid_below_mouse_cursor->poison_damage_per_sec += hitdmg; |
355 | } |
356 | |
357 | if (!strcmp(SpellSkillMap[skill_index].effect, "takeover")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("takeover") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("takeover"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("takeover") + 1) - (size_t)(const void *)("takeover") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "takeover" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("takeover") && ((size_t)(const void *)(("takeover") + 1) - (size_t)(const void *)("takeover") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "takeover") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("takeover"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("takeover" ) && ((size_t)(const void *)(("takeover") + 1) - (size_t )(const void *)("takeover") == 1) && (__s2_len = strlen ("takeover"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "takeover") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("takeover"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("takeover"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("takeover"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("takeover"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "takeover")))); })) { |
358 | if (!is_friendly(droid_below_mouse_cursor->faction, FACTION_SELF)) { |
359 | // Only hostile droids can be hacked. |
360 | |
361 | float used_capsules_ratio = 1; |
362 | if (droid_takeover(droid_below_mouse_cursor, &used_capsules_ratio)) { |
363 | // Only capsules that were used generate heat - hard fights are more exhausting that easy ones |
364 | Me.temperature += used_capsules_ratio * SpellCost; |
365 | |
366 | // upon successful takeover |
367 | // go directly to chat to choose droid program |
368 | if (GameConfig.talk_to_bots_after_takeover) |
369 | chat_with_droid(droid_below_mouse_cursor); |
370 | return 1; |
371 | } |
372 | } else { |
373 | return 0; |
374 | } |
375 | } |
376 | Me.temperature += SpellCost; |
377 | return 1; |
378 | |
379 | case PROGRAM_FORM_SELF: |
380 | |
381 | if (!strcmp(SpellSkillMap[skill_index].effect, "teleport_home")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("teleport_home") && (__s1_len = strlen (SpellSkillMap [skill_index].effect), __s2_len = strlen ("teleport_home"), ( !((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("teleport_home") + 1) - (size_t)(const void *)("teleport_home" ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "teleport_home") : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)( const void *)(SpellSkillMap[skill_index].effect) == 1) && (__s1_len = strlen (SpellSkillMap[skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("teleport_home") && ((size_t)(const void *)(("teleport_home") + 1) - (size_t)(const void *)("teleport_home") == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "teleport_home") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("teleport_home"); int __result = (((const unsigned char *) ( const char *) (SpellSkillMap[skill_index].effect))[0] - __s2[ 0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("teleport_home" ) && ((size_t)(const void *)(("teleport_home") + 1) - (size_t)(const void *)("teleport_home") == 1) && (__s2_len = strlen ("teleport_home"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)( const void *)(SpellSkillMap[skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "teleport_home") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = ( ((const unsigned char *) (const char *) ("teleport_home"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("teleport_home") )[1] - __s2[1]); if (__s2_len > 1 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("teleport_home" ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) ("teleport_home" ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "teleport_home")))); })) |
382 | if (!TeleportHome()) |
383 | return 0; |
384 | |
385 | Me.energy -= hitdmg; |
386 | Me.temperature += SpellCost; |
387 | Me.slowdown_duration += strcmp(SpellSkillMap[skill_index].effect, "slowdown")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("slowdown") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("slowdown"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("slowdown") && ((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("slowdown"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("slowdown" ) && ((size_t)(const void *)(("slowdown") + 1) - (size_t )(const void *)("slowdown") == 1) && (__s2_len = strlen ("slowdown"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("slowdown"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("slowdown"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("slowdown"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("slowdown"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown")))); }) ? 0 : effdur; |
388 | Me.paralyze_duration += strcmp(SpellSkillMap[skill_index].effect, "paralyze")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("paralyze") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("paralyze"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("paralyze") && ((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("paralyze"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("paralyze" ) && ((size_t)(const void *)(("paralyze") + 1) - (size_t )(const void *)("paralyze") == 1) && (__s2_len = strlen ("paralyze"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("paralyze"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("paralyze"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("paralyze"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("paralyze"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze")))); }) ? 0 : effdur; |
389 | Me.invisible_duration += strcmp(SpellSkillMap[skill_index].effect, "invisibility")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("invisibility") && (__s1_len = strlen (SpellSkillMap [skill_index].effect), __s2_len = strlen ("invisibility"), (! ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("invisibility") + 1) - (size_t)(const void *)("invisibility" ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "invisibility") : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)( const void *)(SpellSkillMap[skill_index].effect) == 1) && (__s1_len = strlen (SpellSkillMap[skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("invisibility") && ( (size_t)(const void *)(("invisibility") + 1) - (size_t)(const void *)("invisibility") == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "invisibility") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("invisibility"); int __result = (((const unsigned char *) ( const char *) (SpellSkillMap[skill_index].effect))[0] - __s2[ 0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("invisibility" ) && ((size_t)(const void *)(("invisibility") + 1) - ( size_t)(const void *)("invisibility") == 1) && (__s2_len = strlen ("invisibility"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)( const void *)(SpellSkillMap[skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "invisibility") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = ( ((const unsigned char *) (const char *) ("invisibility"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("invisibility")) [1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("invisibility" ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) ("invisibility" ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "invisibility")))); }) ? 0 : effdur; |
390 | Me.nmap_duration += strcmp(SpellSkillMap[skill_index].effect, "nmap")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("nmap") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("nmap"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("nmap") + 1) - (size_t)(const void *)("nmap") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "nmap") : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect ) == 1) && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s1_len < 4) ? (__builtin_constant_p ("nmap") && ((size_t)(const void *)(("nmap") + 1) - (size_t)(const void * )("nmap") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index ].effect, "nmap") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("nmap"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("nmap") && ((size_t)(const void *)(("nmap") + 1) - ( size_t)(const void *)("nmap") == 1) && (__s2_len = strlen ("nmap"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "nmap") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("nmap"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("nmap"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("nmap"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("nmap"))[3] - __s2[3]); } } __result; })) )) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "nmap" )))); }) ? 0 : effdur; |
391 | Me.light_bonus_end_date = Me.current_game_date + (strcmp(SpellSkillMap[skill_index].effect, "light")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("light") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("light"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("light") + 1) - (size_t)(const void *)("light") == 1) || __s2_len >= 4) ) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "light" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("light") && ((size_t)(const void *)(("light") + 1) - (size_t)(const void *)("light") == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "light") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("light" ); int __result = (((const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index]. effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("light") && ((size_t)(const void *)(("light") + 1) - (size_t)(const void *)("light") == 1) && (__s2_len = strlen ("light"), __s2_len < 4) ? (__builtin_constant_p ( SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)( const void *)(SpellSkillMap[skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "light") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = ( ((const unsigned char *) (const char *) ("light"))[0] - __s2[ 0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("light"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("light"))[2] - __s2 [2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("light"))[3] - __s2 [3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[skill_index ].effect, "light")))); }) ? 0 : effdur); |
392 | return 1; |
393 | |
394 | case PROGRAM_FORM_BULLET: |
395 | Me.temperature += SpellCost; |
396 | |
397 | moderately_finepoint target_location; |
398 | target_location.x = translate_pixel_to_map_location(input_axis.x, input_axis.y, TRUE(1)); |
399 | target_location.y = translate_pixel_to_map_location(input_axis.x, input_axis.y, FALSE(0)); |
400 | |
401 | bullet bul_parms; |
402 | /*XXX hardcoded laser pistol type */ |
403 | if (SpellSkillMap[skill_index].graphics_code != -1) |
404 | FillInDefaultBulletStruct(&bul_parms, SpellSkillMap[skill_index].graphics_code, get_item_type_by_id("Laser pistol")); |
405 | else |
406 | FillInDefaultBulletStruct(&bul_parms, GetBulletByName("half_magenta"), get_item_type_by_id("Laser pistol")); |
407 | |
408 | bul_parms.freezing_level = strcmp(SpellSkillMap[skill_index].effect, "slowdown")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("slowdown") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("slowdown"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("slowdown") && ((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("slowdown"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("slowdown" ) && ((size_t)(const void *)(("slowdown") + 1) - (size_t )(const void *)("slowdown") == 1) && (__s2_len = strlen ("slowdown"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("slowdown"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("slowdown"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("slowdown"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("slowdown"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown")))); }) ? 0 : effdur; |
409 | bul_parms.poison_duration = strcmp(SpellSkillMap[skill_index].effect, "poison")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("poison") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("poison"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("poison") && ((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("poison"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("poison" ) && ((size_t)(const void *)(("poison") + 1) - (size_t )(const void *)("poison") == 1) && (__s2_len = strlen ("poison"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "poison") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("poison"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("poison"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" )))); }) ? 0 : effdur; |
410 | bul_parms.poison_damage_per_sec = strcmp(SpellSkillMap[skill_index].effect, "poison")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("poison") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("poison"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("poison") && ((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("poison"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("poison" ) && ((size_t)(const void *)(("poison") + 1) - (size_t )(const void *)("poison") == 1) && (__s2_len = strlen ("poison"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "poison") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("poison"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("poison"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" )))); }) ? 0 : hitdmg; |
411 | bul_parms.paralysation_duration = strcmp(SpellSkillMap[skill_index].effect, "paralyze")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("paralyze") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("paralyze"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("paralyze") && ((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("paralyze"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("paralyze" ) && ((size_t)(const void *)(("paralyze") + 1) - (size_t )(const void *)("paralyze") == 1) && (__s2_len = strlen ("paralyze"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("paralyze"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("paralyze"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("paralyze"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("paralyze"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze")))); }) ? 0 : effdur; |
412 | bul_parms.damage = hitdmg; |
413 | if (SpellSkillMap[skill_index].hurt_humans && SpellSkillMap[skill_index].hurt_bots) |
414 | bul_parms.hit_type = ATTACK_HIT_ALL; |
415 | else if (SpellSkillMap[skill_index].hurt_humans) |
416 | bul_parms.hit_type = ATTACK_HIT_HUMANS; |
417 | else |
418 | bul_parms.hit_type = ATTACK_HIT_BOTS; |
419 | |
420 | FireTuxRangedWeaponRaw(get_item_type_by_id("Laser pistol"), -1, &bul_parms, target_location); |
421 | |
422 | return 1; //no extra effects |
423 | |
424 | case PROGRAM_FORM_RADIAL: |
425 | Me.temperature += SpellCost; |
426 | |
427 | do_radial_skill(skill_index, Me.pos.x, Me.pos.y, 1); |
428 | |
429 | return 1; |
430 | |
431 | case PROGRAM_FORM_SPECIAL: |
432 | |
433 | /*handle the special extra effects of the skill */ |
434 | if (!strcmp(SpellSkillMap[skill_index].effect, "none")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("none") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("none"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("none") + 1) - (size_t)(const void *)("none") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "none") : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect ) == 1) && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s1_len < 4) ? (__builtin_constant_p ("none") && ((size_t)(const void *)(("none") + 1) - (size_t)(const void * )("none") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index ].effect, "none") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("none"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("none") && ((size_t)(const void *)(("none") + 1) - ( size_t)(const void *)("none") == 1) && (__s2_len = strlen ("none"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "none") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("none"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("none"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("none"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("none"))[3] - __s2[3]); } } __result; })) )) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "none" )))); })) { |
435 | return 1; |
436 | } |
437 | |
438 | if (!strcmp(SpellSkillMap[skill_index].effect, "weapon")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("weapon") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("weapon"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("weapon") + 1 ) - (size_t)(const void *)("weapon") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "weapon" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("weapon") && ((size_t)(const void *)(("weapon") + 1 ) - (size_t)(const void *)("weapon") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "weapon") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("weapon"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("weapon" ) && ((size_t)(const void *)(("weapon") + 1) - (size_t )(const void *)("weapon") == 1) && (__s2_len = strlen ("weapon"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "weapon") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("weapon"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("weapon"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("weapon"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("weapon"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "weapon" )))); })) { |
439 | if (!MouseCursorIsInUserRect(GetMousePos_x(), GetMousePos_y())) |
440 | return 0; |
441 | |
442 | tux_wants_to_attack_now(TRUE(1)); |
443 | return 1; |
444 | } |
445 | |
446 | if (!strcmp(SpellSkillMap[skill_index].effect, "repair")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("repair") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("repair"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("repair") + 1 ) - (size_t)(const void *)("repair") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "repair" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("repair") && ((size_t)(const void *)(("repair") + 1 ) - (size_t)(const void *)("repair") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "repair") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("repair"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("repair" ) && ((size_t)(const void *)(("repair") + 1) - (size_t )(const void *)("repair") == 1) && (__s2_len = strlen ("repair"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "repair") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("repair"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("repair"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("repair"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("repair"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "repair" )))); })) { |
447 | if (!MouseCursorIsInInvRect(GetMousePos_x(), GetMousePos_y()) |
448 | || (!GameConfig.Inventory_Visible)) { |
449 | // Do nothing here. The right mouse click while in inventory screen |
450 | // will be handled in the inventory screen management function. |
451 | // |
452 | play_sound("effects/tux_ingame_comments/CantRepairThat.ogg"); |
453 | } |
454 | return 1; |
455 | } |
456 | } |
457 | |
458 | return 0; |
459 | }; // void HandleCurrentlyActivatedSkill( void ) |
460 | |
461 | |
462 | /** |
463 | * This function starts a new radial skill (grenade blast, etc) from |
464 | * the given x and y coordinates. |
465 | */ |
466 | void do_radial_skill(int skill_index, int pos_x, int pos_y, int from_tux) |
467 | { |
468 | float hitdmg = calculate_program_hit_damage(skill_index); |
469 | float effdur = calculate_program_effect_duration(skill_index); |
470 | |
471 | int i, j; |
472 | for (i = 0; i < MAX_ACTIVE_SPELLS100; i++) { |
473 | if (AllActiveSpells[i].img_type == (-1)) |
474 | break; |
475 | } |
476 | if (i >= MAX_ACTIVE_SPELLS100) |
477 | i = 0; |
478 | |
479 | AllActiveSpells[i].img_type = |
480 | (SpellSkillMap[skill_index].graphics_code == -1 ? 2 : SpellSkillMap[skill_index].graphics_code); |
481 | AllActiveSpells[i].spell_center.x = pos_x; |
482 | AllActiveSpells[i].spell_center.y = pos_y; |
483 | AllActiveSpells[i].spell_radius = 0.3; |
484 | if (!strcmp(SpellSkillMap[skill_index].effect, "short")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("short") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("short"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("short") + 1) - (size_t)(const void *)("short") == 1) || __s2_len >= 4) ) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "short" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("short") && ((size_t)(const void *)(("short") + 1) - (size_t)(const void *)("short") == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "short") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("short" ); int __result = (((const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index]. effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("short") && ((size_t)(const void *)(("short") + 1) - (size_t)(const void *)("short") == 1) && (__s2_len = strlen ("short"), __s2_len < 4) ? (__builtin_constant_p ( SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)( const void *)(SpellSkillMap[skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "short") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = ( ((const unsigned char *) (const char *) ("short"))[0] - __s2[ 0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("short"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("short"))[2] - __s2 [2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("short"))[3] - __s2 [3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[skill_index ].effect, "short")))); })) |
485 | AllActiveSpells[i].spell_age = 0.5; |
486 | else |
487 | AllActiveSpells[i].spell_age = 0; |
488 | |
489 | AllActiveSpells[i].mine = from_tux; |
490 | if (SpellSkillMap[skill_index].hurt_humans && SpellSkillMap[skill_index].hurt_bots) |
491 | AllActiveSpells[i].hit_type = ATTACK_HIT_ALL; |
492 | else if (SpellSkillMap[skill_index].hurt_humans) |
493 | AllActiveSpells[i].hit_type = ATTACK_HIT_HUMANS; |
494 | else |
495 | AllActiveSpells[i].hit_type = ATTACK_HIT_BOTS; |
496 | |
497 | for (j = 0; j < RADIAL_SPELL_DIRECTIONS16; j++) { |
498 | AllActiveSpells[i].active_directions[j] = TRUE(1); |
499 | } |
500 | |
501 | AllActiveSpells[i].freeze_duration = strcmp(SpellSkillMap[skill_index].effect, "slowdown")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("slowdown") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("slowdown"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("slowdown") && ((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "slowdown") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("slowdown"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("slowdown" ) && ((size_t)(const void *)(("slowdown") + 1) - (size_t )(const void *)("slowdown") == 1) && (__s2_len = strlen ("slowdown"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("slowdown"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("slowdown"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("slowdown"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("slowdown"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "slowdown")))); }) ? 0 : effdur; |
502 | AllActiveSpells[i].poison_duration = strcmp(SpellSkillMap[skill_index].effect, "poison")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("poison") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("poison"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("poison") && ((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("poison"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("poison" ) && ((size_t)(const void *)(("poison") + 1) - (size_t )(const void *)("poison") == 1) && (__s2_len = strlen ("poison"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "poison") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("poison"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("poison"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" )))); }) ? 0 : effdur; |
503 | AllActiveSpells[i].poison_dmg = strcmp(SpellSkillMap[skill_index].effect, "poison")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("poison") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("poison"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("poison") && ((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("poison"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("poison" ) && ((size_t)(const void *)(("poison") + 1) - (size_t )(const void *)("poison") == 1) && (__s2_len = strlen ("poison"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "poison") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [skill_index].effect); int __result = (((const unsigned char * ) (const char *) ("poison"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("poison"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("poison"))[3] - __s2[3]); } } __result; } )))) : __builtin_strcmp (SpellSkillMap[skill_index].effect, "poison" )))); }) ? 0 : hitdmg; |
504 | AllActiveSpells[i].paralyze_duration = strcmp(SpellSkillMap[skill_index].effect, "paralyze")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[skill_index].effect) && __builtin_constant_p ("paralyze") && (__s1_len = strlen (SpellSkillMap[skill_index ].effect), __s2_len = strlen ("paralyze"), (!((size_t)(const void *)((SpellSkillMap[skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze" ) : (__builtin_constant_p (SpellSkillMap[skill_index].effect) && ((size_t)(const void *)((SpellSkillMap[skill_index ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[skill_index ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ skill_index].effect), __s1_len < 4) ? (__builtin_constant_p ("paralyze") && ((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) ? __builtin_strcmp (SpellSkillMap[skill_index].effect, "paralyze") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("paralyze"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[skill_index].effect))[0] - __s2 [0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[skill_index].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect))[ 3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("paralyze" ) && ((size_t)(const void *)(("paralyze") + 1) - (size_t )(const void *)("paralyze") == 1) && (__s2_len = strlen ("paralyze"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [skill_index].effect) && ((size_t)(const void *)((SpellSkillMap [skill_index].effect) + 1) - (size_t)(const void *)(SpellSkillMap [skill_index].effect) == 1) ? __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[skill_index].effect); int __result = (((const unsigned char *) (const char *) ("paralyze"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = ( ((const unsigned char *) (const char *) ("paralyze"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("paralyze"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("paralyze"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [skill_index].effect, "paralyze")))); }) ? 0 : effdur; |
505 | AllActiveSpells[i].damage = hitdmg; |
506 | } |
507 | |
508 | /** |
509 | * This function checks if a given screen position lies within the |
510 | * one of the skill icons and returns the number of that skill icon. |
511 | */ |
512 | int CursorIsOnWhichSkillButton(int x, int y) |
513 | { |
514 | // First we check if the cursor is in at least horizontally |
515 | // in the row of the skill items |
516 | // |
517 | if (x > SkillScreenRect.x + 16 + 64) |
518 | return (-1); |
519 | if (x < SkillScreenRect.x + 16) |
520 | return (-1); |
521 | |
522 | // Now we can check on which skill rectangle exactly the cursor |
523 | // is hovering, since we know that it is hitting, horizontally |
524 | // at least, the row of skill icons. |
525 | // |
526 | if (y < SkillScreenRect.y + 16 + 0 * 64) |
527 | return (-1); |
528 | if (y < SkillScreenRect.y + 16 + 1 * 64) |
529 | return (0); |
530 | |
531 | if (y < SkillScreenRect.y + 16 + 1 * 64 + 16) |
532 | return (-1); |
533 | if (y < SkillScreenRect.y + 16 + 2 * 64 + 16) |
534 | return (1); |
535 | |
536 | if (y < SkillScreenRect.y + 16 + 2 * 64 + 2 * 16) |
537 | return (-1); |
538 | if (y < SkillScreenRect.y + 16 + 3 * 64 + 2 * 16) |
539 | return (2); |
540 | |
541 | if (y < SkillScreenRect.y + 16 + 3 * 64 + 3 * 16) |
542 | return (-1); |
543 | if (y < SkillScreenRect.y + 16 + 4 * 64 + 3 * 16) |
544 | return (3); |
545 | |
546 | if (y < SkillScreenRect.y + 16 + 4 * 64 + 4 * 16) |
547 | return (-1); |
548 | if (y < SkillScreenRect.y + 16 + 5 * 64 + 4 * 16) |
549 | return (4); |
550 | |
551 | return (-1); |
552 | }; // int CursorIsOnWhichSkillButton( int x , int y ) |
553 | |
554 | /** |
555 | * This function checks if a given screen position lies within |
556 | * one of the spell level buttons and returns the number of that |
557 | * spell level button. |
558 | */ |
559 | static int CursorIsOnWhichSpellPageButton(int x, int y) |
560 | { |
561 | int i; |
562 | |
563 | // First we check if the cursor is in at least horizontally |
564 | // and vertically in the line with the spell level buttons. |
565 | // |
566 | if (x < SkillScreenRect.x + SPELL_LEVEL_BUTTONS_X60) |
567 | return (-1); |
568 | if (y > SkillScreenRect.y + SPELL_LEVEL_BUTTONS_Y423 + SPELL_LEVEL_BUTTON_HEIGHT30) |
569 | return (-1); |
570 | if (y < SkillScreenRect.y + SPELL_LEVEL_BUTTONS_Y423) |
571 | return (-1); |
572 | |
573 | // Now we can check on which skill rectangle exactly the cursor |
574 | // is hovering, since we know that it is hitting, horizontally |
575 | // at least, the row of skill icons. |
576 | // |
577 | for (i = 0; i < NUMBER_OF_SKILL_PAGES8; i++) { |
578 | if (x < SkillScreenRect.x + (2.0 * ((float)GameConfig.screen_width / 640.0)) + SPELL_LEVEL_BUTTONS_X60 + (i + 1) * SPELL_LEVEL_BUTTON_WIDTH30) |
579 | return i; |
580 | } |
581 | |
582 | return -1; |
583 | } |
584 | |
585 | /** |
586 | * |
587 | * |
588 | */ |
589 | static void ShowSkillsExplanationScreen(void) |
590 | { |
591 | int ICON_OFFSET_X = 20; |
592 | int ICON_OFFSET_Y = 20; |
593 | int TEXT_OFFSET_X = 15; |
594 | SDL_Rect TargetSkillRect; |
595 | spell_skill_spec *spec = &SpellSkillMap[Me.readied_skill];; |
596 | |
597 | // This should draw the background... |
598 | // |
599 | blit_background("SkillExplanationScreen.png"); |
600 | |
601 | // Draws the skill icon at the correct position |
602 | // |
603 | TargetSkillRect.x = ICON_OFFSET_X; |
604 | TargetSkillRect.y = ICON_OFFSET_Y; |
605 | |
606 | load_skill_icon_if_needed(spec); |
607 | display_image_on_screen(&spec->icon_surface, |
608 | TargetSkillRect.x, TargetSkillRect.y, IMAGE_NO_TRANSFOset_image_transformation(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0)); |
609 | |
610 | // Draws the explanation text |
611 | // |
612 | TargetSkillRect.x = TEXT_OFFSET_X; |
613 | TargetSkillRect.w = 320 - 2 * TEXT_OFFSET_X; |
614 | TargetSkillRect.h = 480 - 15; |
615 | SetCurrentFont(FPS_Display_BFont); |
616 | display_text(D_(spec->description)(spec->description[0]!='\0'?dcgettext ("freedroidrpg-data" , spec->description, 5):""), 16, 16 + 64 + 16, &TargetSkillRect); |
617 | } |
618 | |
619 | /** |
620 | * We will draw only those skills to the skills inventory, that are |
621 | * already present in the Tux. That way the game remains open for new |
622 | * skills to the player and he doesn't now in advance which skills there |
623 | * are, which is more interesting than complete control and overview. |
624 | * |
625 | * Any skills not in use will be marked as -1. |
626 | * |
627 | * The first few entries will be filled with internal skill index numbers |
628 | * for reference. |
629 | * |
630 | */ |
631 | static void establish_skill_subset_map(int *SkillSubsetMap) |
632 | { |
633 | int i; |
634 | int NextPosition = 0; |
635 | for (i = 0; i < number_of_skills; i++) { |
636 | SkillSubsetMap[i] = (-1); |
637 | } |
638 | for (i = 0; i < number_of_skills; i++) { |
639 | if (Me.skill_level[i] > 0) { |
640 | SkillSubsetMap[NextPosition] = i; |
641 | NextPosition++; |
642 | } |
643 | } |
644 | }; // void establish_skill_subset_map ( int *SkillSubsetMap ); |
645 | |
646 | /** Activate nth skill from all skills. |
647 | * @param skill_num is a index into all skills array. |
648 | * It must points an aquired skill. |
649 | * |
650 | */ |
651 | void activate_nth_skill(int skill_num) |
652 | { |
653 | |
654 | // If the n-th skill does exist, we activate the n-th skill, |
655 | // otherwise we leave the last readied skill. |
656 | // |
657 | if (Me.skill_level[skill_num] > 0) { |
658 | Me.readied_skill = skill_num; |
659 | } else { |
660 | error_message(__FUNCTION__, |
661 | "Tried to activate skill number %d which was not acquired yet.", |
662 | PLEASE_INFORM, skill_num); |
663 | } |
664 | |
665 | }; // void activate_nth_skill ( int skill_num ) |
666 | |
667 | /** Set quick skill to the skill on which is mouse cursor |
668 | * @param quick_skill Index of quick skill slot |
669 | */ |
670 | void set_nth_quick_skill(int quick_skill) |
671 | { |
672 | int ski = |
673 | CursorIsOnWhichSkillButton(GetMousePos_x(), |
674 | GetMousePos_y()) + |
675 | NUMBER_OF_SKILLS_PER_SKILL_PAGE5 * GameConfig.spell_level_visible; |
676 | |
677 | // Variable number is an index into already aquired skills. |
678 | // We change it into index into array of all skills. |
679 | int SkillSubsetMap[number_of_skills]; |
680 | establish_skill_subset_map(&(SkillSubsetMap[0])); |
681 | ski = SkillSubsetMap[ski]; |
682 | |
683 | if (Me.skill_level[ski] <= 0) { |
684 | // Invalid skill was selected |
685 | error_message(__FUNCTION__, |
686 | "Tried to set skill number %d in quick skills. Skill was not acquired yet.", |
687 | PLEASE_INFORM, ski); |
688 | return; |
689 | } |
690 | int i; |
691 | |
692 | for (i = 0; i < 10; i++) { |
693 | if (Me.program_shortcuts[i] == ski && i != quick_skill) |
694 | Me.program_shortcuts[i] = -1; |
695 | } |
696 | |
697 | Me.program_shortcuts[quick_skill] = ski; |
698 | }; // void set_nth_quick_skill(int quick_skill) |
699 | |
700 | |
701 | void load_skill_icon_if_needed(spell_skill_spec *spec) |
702 | { |
703 | if (!image_loaded(&spec->icon_surface)) { |
704 | char filename[1000]; |
705 | sprintf(filename, "skill_icons/%s", spec->icon_name); |
706 | load_image(&spec->icon_surface, filename, FALSE(0)); |
707 | } |
708 | } |
709 | |
710 | /** |
711 | * This function loads the image containing the different buttons for the |
712 | * different skills in the skill book of the Tux. |
713 | */ |
714 | static void load_skill_level_images_if_needed(void) |
715 | { |
716 | #define SKILL_LEVEL_BUTTON_FILE"mouse_buttons/skill_buttons.png" "mouse_buttons/skill_buttons.png" |
717 | int i = 0; |
718 | struct image img = EMPTY_IMAGE{ .surface = ((void*)0) , .offset_x = 0 , .offset_y = 0 , .texture_has_been_created = 0 , .cached_transformation = { ((void*)0), 0.0, 0.0, { 0.0 , 0.0, 0.0, 0.0}, 0 } }; |
719 | SDL_Rect src; |
720 | |
721 | if (image_loaded(&skill_level_images[0])) |
722 | return; |
723 | |
724 | // Load the image |
725 | load_image(&img, SKILL_LEVEL_BUTTON_FILE"mouse_buttons/skill_buttons.png", FALSE(0)); |
726 | |
727 | // Create the subimages |
728 | for (i = 0; i < NUMBER_OF_SKILL_PAGES8; i++) { |
729 | src.x = i * (SKILL_LEVEL_BUTTON_WIDTH30); |
730 | src.y = 0; |
731 | src.w = SKILL_LEVEL_BUTTON_WIDTH30; |
732 | src.h = SKILL_LEVEL_BUTTON_HEIGHT32; |
733 | create_subimage(&img, &skill_level_images[i], &src); |
734 | } |
735 | |
736 | // Delete the big image |
737 | free_image_surface(&img); |
738 | } |
739 | |
740 | |
741 | /** |
742 | * This function displays the SKILLS SCREEN. This is NOT the same as the |
743 | * CHARACTER SCREEN. In the skills screen you can see what skills/spells |
744 | * you currenlty have availabe and you can select a new readied skill by |
745 | * clicking on it with the mouse. |
746 | */ |
747 | void ShowSkillsScreen(void) |
748 | { |
749 | #define INTER_SKILLRECT_DIST17 17 |
750 | #define FIRST_SKILLRECT_Y16 16 |
751 | |
752 | static SDL_Rect ButtonRect; |
753 | char CharText[1000]; |
754 | point CurPos; |
755 | int i; |
756 | SDL_Rect SpellLevelRect; |
757 | int SkillSubsetMap[number_of_skills]; |
758 | int SkillOfThisSlot; |
759 | point SkillRectLocations[NUMBER_OF_SKILLS_PER_SKILL_PAGE5]; |
760 | |
761 | DebugPrintf(2, "\n%s(): Function call confirmed.", __FUNCTION__); |
762 | |
763 | SkillScreenRect.x = CHARACTERRECT_X(GameConfig.screen_width - 320); |
764 | SkillScreenRect.y = 0; |
765 | SkillScreenRect.w = CHARACTERRECT_W(320); |
766 | SkillScreenRect.h = CHARACTERRECT_H(480); |
767 | |
768 | for (i = 0; i < NUMBER_OF_SKILLS_PER_SKILL_PAGE5; i++) { |
769 | SkillRectLocations[i].x = SkillScreenRect.x + 20; |
770 | SkillRectLocations[i].y = SkillScreenRect.y + FIRST_SKILLRECT_Y16 + i * (64 + INTER_SKILLRECT_DIST17) + 3; |
771 | } |
772 | |
773 | // If the log is not set to visible right now, we do not need to |
774 | // do anything more, but to restore the usual user rectangle size |
775 | // back to normal and to return... |
776 | // |
777 | if (GameConfig.SkillScreen_Visible == FALSE(0)) |
778 | return; |
779 | |
780 | // We will use the FPS display font, cause the small one isn't |
781 | // very well readable on the silver background |
782 | // |
783 | SetCurrentFont(FPS_Display_BFont); |
784 | |
785 | load_skill_level_images_if_needed(); |
786 | |
787 | // We will need the current mouse position on several spots... |
788 | // |
789 | CurPos.x = GetMousePos_x(); |
790 | CurPos.y = GetMousePos_y(); |
791 | |
792 | // We will draw only those skills to the skills inventory, that are |
793 | // already present in the Tux. That way the game remains open for new |
794 | // skills to the player and he doesn't now in advance which skills there |
795 | // are, which is more interesting than complete control and overview. |
796 | // |
797 | establish_skill_subset_map(SkillSubsetMap); |
798 | |
799 | // At this point we know, that the skill screen is desired and must be |
800 | // displayed in-game: |
801 | // |
802 | blit_background("SkillScreen.png"); |
803 | |
804 | if (GameConfig.skill_explanation_screen_visible) |
805 | ShowSkillsExplanationScreen(); |
806 | |
807 | // According to the page in the spell book currently opened, |
808 | // we draw a 'button' or activation mark over the appropriate spot |
809 | // |
810 | SpellLevelRect.x = SkillScreenRect.x + SPELL_LEVEL_BUTTONS_X60 + SPELL_LEVEL_BUTTON_WIDTH30 * GameConfig.spell_level_visible; |
811 | SpellLevelRect.y = SkillScreenRect.y + SPELL_LEVEL_BUTTONS_Y423; |
812 | display_image_on_screen(&skill_level_images[GameConfig.spell_level_visible], SpellLevelRect.x, SpellLevelRect.y, IMAGE_NO_TRANSFOset_image_transformation(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0)); |
813 | |
814 | // Now we fill in the skills available to this bot. ( For now, these skills |
815 | // are not class-specific, like in diablo or something, but this is our first |
816 | // approach to the topic after all.... :) |
817 | // |
818 | for (i = 0; i < NUMBER_OF_SKILLS_PER_SKILL_PAGE5; i++) { |
819 | ButtonRect.x = SkillRectLocations[i].x; |
820 | ButtonRect.y = SkillRectLocations[i].y; |
821 | ButtonRect.w = 64; |
822 | ButtonRect.h = 64; |
823 | |
824 | if (i + NUMBER_OF_SKILLS_PER_SKILL_PAGE5 * GameConfig.spell_level_visible >= number_of_skills) |
825 | break; |
826 | SkillOfThisSlot = SkillSubsetMap[i + NUMBER_OF_SKILLS_PER_SKILL_PAGE5 * GameConfig.spell_level_visible]; |
827 | if (SkillOfThisSlot < 0) |
828 | continue; |
829 | |
830 | load_skill_icon_if_needed(&SpellSkillMap[SkillOfThisSlot]); |
831 | |
832 | display_image_on_screen(&SpellSkillMap[SkillOfThisSlot].icon_surface, ButtonRect.x, ButtonRect.y, IMAGE_NO_TRANSFOset_image_transformation(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0)); |
833 | |
834 | SetCurrentFont(FPS_Display_BFont); |
835 | |
836 | // Program shortcut |
837 | int sci; |
838 | for (sci = 0; sci < 10; sci++) { |
839 | if (Me.program_shortcuts[sci] == SkillOfThisSlot) |
840 | break; |
841 | } |
842 | |
843 | if (sci != 10) { |
844 | // print the quick key number |
845 | char str[10]; |
846 | sprintf(str, "F%d\n", 5 + sci); |
847 | display_text(str, ButtonRect.x + ButtonRect.w - 2 - text_width(GetCurrentFont(), str), ButtonRect.y, &SkillScreenRect); |
848 | } |
849 | // Name of the skill |
850 | |
851 | display_text(D_(SpellSkillMap[SkillOfThisSlot].name)(SpellSkillMap[SkillOfThisSlot].name[0]!='\0'?dcgettext ("freedroidrpg-data" , SpellSkillMap[SkillOfThisSlot].name, 5):""), |
852 | 16 + 64 + 16 + SkillScreenRect.x, |
853 | FIRST_SKILLRECT_Y16 - 6 + i * (64 + INTER_SKILLRECT_DIST17) + SkillScreenRect.y, &SkillScreenRect); |
854 | |
855 | SetCurrentFont(Messagestat_BFont); |
856 | int tmp, tmp2; |
857 | int nextypos = |
858 | FIRST_SKILLRECT_Y16 - 8 + i * (64 + INTER_SKILLRECT_DIST17) + SkillScreenRect.y + 2 * FontHeight(GetCurrentFont()); |
859 | |
860 | // Program revision |
861 | sprintf(CharText, _("Program revision: %c%d%c ")("Program revision: %c%d%c "[0]!='\0'?dcgettext (((void*)0), "Program revision: %c%d%c " , 5):""), font_switchto_msgvar[0], Me.skill_level[SkillOfThisSlot], |
862 | font_switchto_msgstat[0]); |
863 | display_text(CharText, 16 + 64 + 16 + SkillScreenRect.x, nextypos, &SkillScreenRect); |
864 | nextypos += FontHeight(GetCurrentFont()); |
865 | |
866 | // Heat cost/cooling |
867 | tmp = calculate_program_heat_cost(SkillOfThisSlot); |
868 | if (tmp != 0) { |
869 | if (tmp > 0) |
870 | sprintf(CharText, _("Heat produced: %c%d%c ")("Heat produced: %c%d%c "[0]!='\0'?dcgettext (((void*)0), "Heat produced: %c%d%c " , 5):""), font_switchto_msgvar[0], tmp, font_switchto_msgstat[0]); |
871 | else |
872 | sprintf(CharText, _("Cooling: %c%d%c ")("Cooling: %c%d%c "[0]!='\0'?dcgettext (((void*)0), "Cooling: %c%d%c " , 5):""), font_switchto_msgvar[0], -tmp, font_switchto_msgstat[0]); |
873 | display_text(CharText, 16 + 64 + 16 + SkillScreenRect.x, nextypos, &SkillScreenRect); |
874 | nextypos += FontHeight(GetCurrentFont()); |
875 | } |
876 | // Damage/healing |
877 | tmp = calculate_program_hit_damage_low(SkillOfThisSlot); |
878 | tmp2 = calculate_program_hit_damage_high(SkillOfThisSlot); |
879 | if (tmp != 0) { |
880 | if (tmp > 0) { |
881 | if (tmp == tmp2) |
882 | sprintf(CharText, _("Damage: %c%d%c ")("Damage: %c%d%c "[0]!='\0'?dcgettext (((void*)0), "Damage: %c%d%c " , 5):""), font_switchto_msgvar[0], tmp, font_switchto_msgstat[0]); |
883 | else |
884 | sprintf(CharText, _("Damage: %c%d-%d%c ")("Damage: %c%d-%d%c "[0]!='\0'?dcgettext (((void*)0), "Damage: %c%d-%d%c " , 5):""), font_switchto_msgvar[0], tmp, tmp2, |
885 | font_switchto_msgstat[0]); |
886 | } else { |
887 | if (tmp == tmp2) |
888 | sprintf(CharText, _("Healing: %c%d%c ")("Healing: %c%d%c "[0]!='\0'?dcgettext (((void*)0), "Healing: %c%d%c " , 5):""), font_switchto_msgvar[0], -tmp, font_switchto_msgstat[0]); |
889 | else |
890 | sprintf(CharText, _("Healing: %c%d-%d%c ")("Healing: %c%d-%d%c "[0]!='\0'?dcgettext (((void*)0), "Healing: %c%d-%d%c " , 5):""), font_switchto_msgvar[0], -tmp, -tmp2, |
891 | font_switchto_msgstat[0]); |
892 | } |
893 | display_text(CharText, 16 + 64 + 16 + SkillScreenRect.x, nextypos, &SkillScreenRect); |
894 | nextypos += FontHeight(GetCurrentFont()); |
895 | } |
896 | // Special effect and duration |
897 | if (strcmp(SpellSkillMap[SkillOfThisSlot].effect, "none")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("none") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("none"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("none") + 1) - (size_t)(const void *)("none") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "none" ) : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect ) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("none") && ((size_t)(const void *)(("none") + 1) - ( size_t)(const void *)("none") == 1) ? __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "none") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("none") ; int __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[1 ] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("none" ) && ((size_t)(const void *)(("none") + 1) - (size_t) (const void *)("none") == 1) && (__s2_len = strlen ("none" ), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot ].effect, "none") : (- (__extension__ ({ const unsigned char * __s2 = (const unsigned char *) (const char *) (SpellSkillMap[ SkillOfThisSlot].effect); int __result = (((const unsigned char *) (const char *) ("none"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("none"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("none"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("none"))[3] - __s2[3]); } } __result; })) )) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "none")))); })) { |
898 | if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "paralyze")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("paralyze") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("paralyze"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "paralyze") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("paralyze") && ((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "paralyze") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("paralyze"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "paralyze") && ((size_t)(const void *)(("paralyze") + 1) - (size_t)(const void *)("paralyze") == 1) && (__s2_len = strlen ("paralyze"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "paralyze") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect); int __result = (((const unsigned char *) (const char *) ("paralyze"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("paralyze"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("paralyze"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("paralyze"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "paralyze")))); })) |
899 | sprintf(CharText, _("Paralyze")("Paralyze"[0]!='\0'?dcgettext (((void*)0), "Paralyze", 5):"" )); |
900 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "slowdown")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("slowdown") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("slowdown"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "slowdown") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("slowdown") && ((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "slowdown") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("slowdown"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "slowdown") && ((size_t)(const void *)(("slowdown") + 1) - (size_t)(const void *)("slowdown") == 1) && (__s2_len = strlen ("slowdown"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "slowdown") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect); int __result = (((const unsigned char *) (const char *) ("slowdown"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("slowdown"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("slowdown"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("slowdown"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "slowdown")))); })) |
901 | sprintf(CharText, _("Slow down")("Slow down"[0]!='\0'?dcgettext (((void*)0), "Slow down", 5): "")); |
902 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "invisibility")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("invisibility") && (__s1_len = strlen (SpellSkillMap [SkillOfThisSlot].effect), __s2_len = strlen ("invisibility") , (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect ) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("invisibility") + 1) - (size_t)(const void *)("invisibility" ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "invisibility") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s1_len < 4) ? (__builtin_constant_p ("invisibility" ) && ((size_t)(const void *)(("invisibility") + 1) - ( size_t)(const void *)("invisibility") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "invisibility") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("invisibility"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0 ] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[2 ] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("invisibility") && ((size_t)(const void *)(("invisibility" ) + 1) - (size_t)(const void *)("invisibility") == 1) && (__s2_len = strlen ("invisibility"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "invisibility") : (- (__extension__ ({ const unsigned char * __s2 = (const unsigned char *) (const char *) (SpellSkillMap[ SkillOfThisSlot].effect); int __result = (((const unsigned char *) (const char *) ("invisibility"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("invisibility"))[1] - __s2[1]); if ( __s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("invisibility"))[2] - __s2[ 2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("invisibility"))[3 ] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "invisibility")))); })) |
903 | sprintf(CharText, _("Invisible")("Invisible"[0]!='\0'?dcgettext (((void*)0), "Invisible", 5): "")); |
904 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "poison")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("poison") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("poison"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "poison") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("poison") && ((size_t)(const void *)(("poison") + 1 ) - (size_t)(const void *)("poison") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "poison") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("poison"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "poison") && ((size_t)(const void *)(("poison") + 1) - (size_t)(const void *)("poison") == 1) && (__s2_len = strlen ("poison"), __s2_len < 4) ? (__builtin_constant_p ( SpellSkillMap[SkillOfThisSlot].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t )(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "poison" ) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ); int __result = (((const unsigned char *) (const char *) ("poison" ))[0] - __s2[0]); if (__s2_len > 0 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("poison" ))[1] - __s2[1]); if (__s2_len > 1 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("poison" ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) ("poison" ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "poison")))); })) |
905 | sprintf(CharText, _("Poison")("Poison"[0]!='\0'?dcgettext (((void*)0), "Poison", 5):"")); |
906 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "takeover")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("takeover") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("takeover"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("takeover") + 1) - (size_t)(const void *)("takeover") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "takeover") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("takeover") && ((size_t)(const void *)(("takeover") + 1) - (size_t)(const void *)("takeover") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "takeover") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("takeover"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "takeover") && ((size_t)(const void *)(("takeover") + 1) - (size_t)(const void *)("takeover") == 1) && (__s2_len = strlen ("takeover"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "takeover") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect); int __result = (((const unsigned char *) (const char *) ("takeover"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("takeover"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("takeover"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("takeover"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "takeover")))); })) { |
907 | tmp = Me.skill_level[SkillOfThisSlot] + 2; |
908 | sprintf(CharText, _("Takeover charges: %c%d%c ")("Takeover charges: %c%d%c "[0]!='\0'?dcgettext (((void*)0), "Takeover charges: %c%d%c " , 5):""), font_switchto_msgvar[0], tmp, font_switchto_msgstat[0]); |
909 | } else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "teleport_home")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("teleport_home") && (__s1_len = strlen (SpellSkillMap [SkillOfThisSlot].effect), __s2_len = strlen ("teleport_home" ), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot]. effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("teleport_home") + 1) - (size_t)(const void *)("teleport_home" ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "teleport_home") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s1_len < 4) ? (__builtin_constant_p ("teleport_home" ) && ((size_t)(const void *)(("teleport_home") + 1) - (size_t)(const void *)("teleport_home") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "teleport_home") : ( __extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("teleport_home"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[2] - __s2[2]); if (__s1_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("teleport_home") && ((size_t) (const void *)(("teleport_home") + 1) - (size_t)(const void * )("teleport_home") == 1) && (__s2_len = strlen ("teleport_home" ), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot ].effect, "teleport_home") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect); int __result = (((const unsigned char *) (const char *) ("teleport_home"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("teleport_home"))[1] - __s2[1]); if ( __s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("teleport_home"))[2] - __s2 [2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("teleport_home"))[ 3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "teleport_home")))); })) |
910 | sprintf(CharText, _("Escape")("Escape"[0]!='\0'?dcgettext (((void*)0), "Escape", 5):"")); |
911 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "passive")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("passive") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("passive"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("passive") + 1 ) - (size_t)(const void *)("passive") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "passive") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("passive") && ((size_t)(const void *)(("passive") + 1) - (size_t)(const void *)("passive") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "passive") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("passive"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "passive") && ((size_t)(const void *)(("passive") + 1 ) - (size_t)(const void *)("passive") == 1) && (__s2_len = strlen ("passive"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "passive") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect); int __result = (((const unsigned char *) (const char *) ("passive"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("passive"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("passive"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("passive"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "passive")))); })) |
912 | sprintf(CharText, _("Passive")("Passive"[0]!='\0'?dcgettext (((void*)0), "Passive", 5):"")); |
913 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "identify")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("identify") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("identify"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("identify") + 1) - (size_t)(const void *)("identify") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "identify") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("identify") && ((size_t)(const void *)(("identify") + 1) - (size_t)(const void *)("identify") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "identify") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("identify"); int __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "identify") && ((size_t)(const void *)(("identify") + 1) - (size_t)(const void *)("identify") == 1) && (__s2_len = strlen ("identify"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && ((size_t) (const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect ) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect , "identify") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect); int __result = (((const unsigned char *) (const char *) ("identify"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("identify"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("identify"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("identify"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "identify")))); })) |
914 | sprintf(CharText, " "); |
915 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "weapon")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("weapon") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("weapon"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("weapon") + 1 ) - (size_t)(const void *)("weapon") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "weapon") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("weapon") && ((size_t)(const void *)(("weapon") + 1 ) - (size_t)(const void *)("weapon") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "weapon") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("weapon"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "weapon") && ((size_t)(const void *)(("weapon") + 1) - (size_t)(const void *)("weapon") == 1) && (__s2_len = strlen ("weapon"), __s2_len < 4) ? (__builtin_constant_p ( SpellSkillMap[SkillOfThisSlot].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t )(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "weapon" ) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ); int __result = (((const unsigned char *) (const char *) ("weapon" ))[0] - __s2[0]); if (__s2_len > 0 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("weapon" ))[1] - __s2[1]); if (__s2_len > 1 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("weapon" ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) ("weapon" ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "weapon")))); })) |
916 | sprintf(CharText, " "); |
917 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "repair")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("repair") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("repair"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("repair") + 1 ) - (size_t)(const void *)("repair") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "repair") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("repair") && ((size_t)(const void *)(("repair") + 1 ) - (size_t)(const void *)("repair") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "repair") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("repair"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "repair") && ((size_t)(const void *)(("repair") + 1) - (size_t)(const void *)("repair") == 1) && (__s2_len = strlen ("repair"), __s2_len < 4) ? (__builtin_constant_p ( SpellSkillMap[SkillOfThisSlot].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t )(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "repair" ) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ); int __result = (((const unsigned char *) (const char *) ("repair" ))[0] - __s2[0]); if (__s2_len > 0 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("repair" ))[1] - __s2[1]); if (__s2_len > 1 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("repair" ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) ("repair" ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "repair")))); })) |
918 | sprintf(CharText, _("Repair items, degrading them a bit")("Repair items, degrading them a bit"[0]!='\0'?dcgettext (((void *)0), "Repair items, degrading them a bit", 5):"")); |
919 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "nmap")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("nmap") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("nmap"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("nmap") + 1) - (size_t)(const void *)("nmap") == 1) || __s2_len >= 4)) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "nmap" ) : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect ) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("nmap") && ((size_t)(const void *)(("nmap") + 1) - ( size_t)(const void *)("nmap") == 1) ? __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "nmap") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("nmap") ; int __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[1 ] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("nmap" ) && ((size_t)(const void *)(("nmap") + 1) - (size_t) (const void *)("nmap") == 1) && (__s2_len = strlen ("nmap" ), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot ].effect, "nmap") : (- (__extension__ ({ const unsigned char * __s2 = (const unsigned char *) (const char *) (SpellSkillMap[ SkillOfThisSlot].effect); int __result = (((const unsigned char *) (const char *) ("nmap"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("nmap"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("nmap"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("nmap"))[3] - __s2[3]); } } __result; })) )) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "nmap")))); })) |
920 | sprintf(CharText, _("Detect enemies")("Detect enemies"[0]!='\0'?dcgettext (((void*)0), "Detect enemies" , 5):"")); |
921 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "light")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("light") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("light"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("light") + 1) - (size_t)(const void *)("light") == 1) || __s2_len >= 4) ) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "light" ) : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect ) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("light") && ((size_t)(const void *)(("light") + 1) - (size_t)(const void *)("light") == 1) ? __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "light") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("light" ); int __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[1 ] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap [SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char * ) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("light" ) && ((size_t)(const void *)(("light") + 1) - (size_t )(const void *)("light") == 1) && (__s2_len = strlen ( "light"), __s2_len < 4) ? (__builtin_constant_p (SpellSkillMap [SkillOfThisSlot].effect) && ((size_t)(const void *)( (SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "light") : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect); int __result = (((const unsigned char *) (const char *) ("light"))[0] - __s2 [0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("light"))[1] - __s2 [1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("light"))[2] - __s2 [2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("light"))[3] - __s2 [3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap[SkillOfThisSlot ].effect, "light")))); })) |
922 | sprintf(CharText, _("Lighten area")("Lighten area"[0]!='\0'?dcgettext (((void*)0), "Lighten area" , 5):"")); |
923 | else if (!strcmp(SpellSkillMap[SkillOfThisSlot].effect, "burnup")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot].effect) && __builtin_constant_p ("burnup") && (__s1_len = strlen (SpellSkillMap[SkillOfThisSlot ].effect), __s2_len = strlen ("burnup"), (!((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("burnup") + 1 ) - (size_t)(const void *)("burnup") == 1) || __s2_len >= 4 )) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "burnup") : (__builtin_constant_p (SpellSkillMap[SkillOfThisSlot ].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot ].effect) + 1) - (size_t)(const void *)(SpellSkillMap[SkillOfThisSlot ].effect) == 1) && (__s1_len = strlen (SpellSkillMap[ SkillOfThisSlot].effect), __s1_len < 4) ? (__builtin_constant_p ("burnup") && ((size_t)(const void *)(("burnup") + 1 ) - (size_t)(const void *)("burnup") == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "burnup") : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ("burnup"); int __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot ].effect))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ( SpellSkillMap[SkillOfThisSlot].effect))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ( "burnup") && ((size_t)(const void *)(("burnup") + 1) - (size_t)(const void *)("burnup") == 1) && (__s2_len = strlen ("burnup"), __s2_len < 4) ? (__builtin_constant_p ( SpellSkillMap[SkillOfThisSlot].effect) && ((size_t)(const void *)((SpellSkillMap[SkillOfThisSlot].effect) + 1) - (size_t )(const void *)(SpellSkillMap[SkillOfThisSlot].effect) == 1) ? __builtin_strcmp (SpellSkillMap[SkillOfThisSlot].effect, "burnup" ) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (SpellSkillMap[SkillOfThisSlot].effect ); int __result = (((const unsigned char *) (const char *) ("burnup" ))[0] - __s2[0]); if (__s2_len > 0 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("burnup" ))[1] - __s2[1]); if (__s2_len > 1 && __result == 0 ) { __result = (((const unsigned char *) (const char *) ("burnup" ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0 ) __result = (((const unsigned char *) (const char *) ("burnup" ))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (SpellSkillMap [SkillOfThisSlot].effect, "burnup")))); })) |
924 | sprintf(CharText, " "); |
925 | |
926 | float dur = calculate_program_effect_duration(SkillOfThisSlot); |
927 | if (dur > 0) |
928 | sprintf(CharText + strlen(CharText), _(" for %c%.1f%c seconds")(" for %c%.1f%c seconds"[0]!='\0'?dcgettext (((void*)0), " for %c%.1f%c seconds" , 5):""), font_switchto_msgvar[0], dur, |
929 | font_switchto_msgstat[0]); |
930 | |
931 | display_text(CharText, 16 + 64 + 16 + SkillScreenRect.x, nextypos, &SkillScreenRect); |
932 | nextypos += FontHeight(GetCurrentFont()); |
Value stored to 'nextypos' is never read | |
933 | } |
934 | } |
935 | |
936 | if (!world_frozen()) { |
937 | // Now we see if perhaps the player has just clicked on one of the skills |
938 | // available to this class. In this case of course we must set a different |
939 | // skill/spell as the currently activated skill/spell. |
940 | // |
941 | if ((CursorIsOnWhichSkillButton(CurPos.x, CurPos.y) != (-1)) && MouseLeftClicked()) { |
942 | if (CursorIsOnWhichSkillButton(CurPos.x, CurPos.y) + |
943 | NUMBER_OF_SKILLS_PER_SKILL_PAGE5 * GameConfig.spell_level_visible < number_of_skills) |
944 | if (SkillSubsetMap[CursorIsOnWhichSkillButton(CurPos.x, CurPos.y) + |
945 | NUMBER_OF_SKILLS_PER_SKILL_PAGE5 * GameConfig.spell_level_visible] >= 0) |
946 | Me.readied_skill = SkillSubsetMap[CursorIsOnWhichSkillButton(CurPos.x, CurPos.y) + |
947 | NUMBER_OF_SKILLS_PER_SKILL_PAGE5 * GameConfig.spell_level_visible]; |
948 | } |
949 | |
950 | if (MouseCursorIsOnButton(OPEN_CLOSE_SKILL_EXPLANATION_BUTTON, CurPos.x, CurPos.y) && MouseLeftClicked()) { |
951 | toggle_game_config_screen_visibility(GAME_CONFIG_SCREEN_VISIBLE_SKILL_EXPLANATION); |
952 | while (MouseLeftPressed()) |
953 | SDL_Delay(1); |
954 | } |
955 | |
956 | // Handle clicks on page numbers |
957 | if ((CursorIsOnWhichSpellPageButton(CurPos.x, CurPos.y) != (-1)) && MouseLeftClicked()) { |
958 | GameConfig.spell_level_visible = CursorIsOnWhichSpellPageButton(CurPos.x, CurPos.y); |
959 | } |
960 | } |
961 | } |
962 | |
963 | #undef _skills_c |