Blindfold removal fix
[slashemextended.git] / src / tech.c
blob22fc6c1fb93ec642c6a7e4152d7d1d176ae31774
1 /* SCCS Id: @(#)tech.c 3.2 98/Oct/30 */
2 /* Original Code by Warren Cheung (Basis: spell.c, attrib.c) */
3 /* Copyright (c) M. Stephenson 1988 */
4 /* NetHack may be freely redistributed. See license for details. */
6 /* All of the techs from cmd.c are ported here */
8 #include "hack.h"
9 #include "artilist.h"
11 /* #define DEBUG */ /* turn on for diagnostics */
13 static boolean gettech(int *);
14 static boolean dotechmenu(int, int *);
15 static void doblitzlist(void);
16 static int techeffects(int);
17 static int mon_to_zombie(int);
18 STATIC_PTR int tinker(void);
19 STATIC_PTR int charge_saber(void);
20 STATIC_PTR int draw_energy(void);
21 static const struct innate_tech * role_tech(void);
22 static const struct innate_tech * race_tech(void);
23 static int doblitz(void);
24 static int blitz_chi_strike(void);
25 static int blitz_e_fist(void);
26 static int blitz_pummel(void);
27 static int blitz_g_slam(void);
28 static int blitz_dash(void);
29 static int blitz_power_surge(void);
30 static int blitz_spirit_bomb(void);
31 static int blitz_combo_strike(void);
32 static int blitz_draining_punch(void);
33 static void maybe_tameX(struct monst *);
35 static NEARDATA schar delay; /* moves left for tinker/energy draw */
36 static NEARDATA const char revivables[] = { ALLOW_FLOOROBJ, FOOD_CLASS, 0 };
37 static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
38 static const char allnoncount[] = { ALL_CLASSES, 0 };
39 static NEARDATA const char recharge_type[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
41 /*
42 * Do try to keep the names <= 25 chars long, or else the
43 * menu will look bad :B WAC
46 STATIC_OVL NEARDATA const char *tech_names[] = {
47 "no technique",
48 "berserk",
49 "kiii",
50 "research",
51 "surgery",
52 "reinforce memory",
53 "missile flurry",
54 "weapon practice",
55 "eviscerate",
56 "healing hands",
57 "calm steed",
58 "turn undead",
59 "vanish",
60 "cutthroat",
61 "blessing",
62 "elemental fist",
63 "primal roar",
64 "liquid leap",
65 "critical strike",
66 "sigil of control",
67 "sigil of tempest",
68 "sigil of discharge",
69 "raise zombies",
70 "revivification",
71 "ward against flame",
72 "ward against ice",
73 "ward against lightning",
74 "tinker",
75 "rage eruption",
76 "blink",
77 "chi strike",
78 "draw energy",
79 "chi healing",
80 "disarm",
81 "dazzle",
82 "chained blitz",
83 "pummel",
84 "ground slam",
85 "air dash",
86 "power surge",
87 "spirit bomb",
88 "draw blood",
89 "world fall",
90 "create ammo",
91 "poke ball",
92 "attire charm",
93 "summon team ant",
94 "appraisal",
95 "egg bomb",
96 "booze",
97 "invoke deity",
98 "double trouble",
99 "phase door",
100 "secure identify",
101 "iron skin",
102 "polyform",
103 "concentrating",
104 "summon pet",
105 "double thrownage",
106 "shield bash",
107 "recharge",
108 "spirituality check",
109 "eddy wind",
110 "blood ritual",
111 "ent's potion",
112 "lucky gamble",
113 "panic digging",
114 "decontaminate",
115 "wonderspell",
116 "reset technique",
117 "silent ocean",
118 "glowhorn",
119 "intrinsic roulette",
120 "spectral sword",
121 "reverse identify",
122 "detect traps",
123 "directive",
124 "remove implant",
125 "reroll implant",
126 "time stop",
127 "stat resist",
128 "swap weapon",
129 "milden curse",
130 "force field",
131 "pointiness",
132 "bug spray",
133 "whirlstaff",
134 "deliberate curse",
135 "acquire steed",
136 "saddling",
137 "shopping queen",
138 "beauty charm",
139 "asian kick",
140 "legscratch attack",
141 "ground stomp",
142 "athletic combat",
143 "praying success",
144 "over-ray",
145 "enchanterang",
146 "batman arsenal",
147 "jokerbane",
148 "call the police",
149 "dominate",
150 "incarnation",
151 "combo strike",
152 "fungoism",
153 "become undead",
154 "jiu-jitsu",
155 "blade anger",
156 "re-taming",
157 "uncurse saber",
158 "energy conservation",
159 "enchant robe",
160 "wild slashing",
161 "absorber shield",
162 "psycho force",
163 "intensive training",
164 "surrender or die",
165 "perilous whirl",
166 "summon shoe",
167 "kick in the nuts",
168 "disarming kick",
169 "inlay warfare",
170 "diamond barrier",
171 "steady hand",
172 "force filling",
173 "jedi tailoring",
174 "intrinsic sacrifice",
175 "beamsword",
176 "energy transfer",
177 "soften target",
178 "protect weapon",
179 "powerful aura",
180 "boostaff",
181 "clone javelin",
182 "refuge",
183 "draining punch",
184 "escrobism",
185 "pirate brothering",
186 "nuts and bolts",
187 "decapability",
188 "no-hands curse",
189 "high-heeled sneakers",
190 "form choice",
191 "star digging",
192 "starwars friends",
193 "use the force luke",
194 "wonder yonder",
195 "zap em",
196 "card trick",
197 "skillomorph",
198 "shotty blast",
199 "ammo upgrade",
200 "laser power",
201 "big daddy",
202 "shut that bitch up",
203 "s-pressing",
204 "meltee",
205 "woman noises",
206 "extra long squeak",
207 "sexual hug",
208 "sex change",
209 "even more ammo",
210 "doubleself",
211 "polyfix",
212 "squeaky repair",
213 "bulletreuse",
214 "extracharge",
215 "terrain cleanup",
216 "symbiosis",
217 "adjust symbiote",
218 "heal symbiote",
219 "boost symbiote",
220 "powerbiosis",
221 "implanted symbiosis",
222 "assume symbiote",
223 "generate offspring",
224 "undertow",
225 "definalize",
226 "anti inertia",
227 "grenades of course",
228 "preaching",
229 "on the same team",
230 "permamorph",
231 "pacify",
232 "afterburner",
233 "buggard",
234 "thunderstorm",
235 "autokill",
236 "chain thunderbolt",
237 "flashing mischief",
238 "kamehameha",
239 "shadow mantle",
240 "vacuum star",
241 "blade shield",
242 "green weapon",
243 "ballsliff",
244 "pole melee",
245 "chop chop",
246 "banishment",
247 "participation loss",
248 "weapon blocker",
249 "extra memory",
250 "grap swap",
251 "diabolic minion",
252 "cure amnesia",
253 "elemental imbue",
254 "hidden power",
255 "sword art",
256 "firm cudgel",
257 "lighter balls",
258 "venom mixing",
259 "javelin forging",
260 "coronation/culmination",
261 "restore life levels",
262 "make a wish",
263 "toilet visit",
264 "rock-to-poison",
265 "injection",
266 "super poison",
267 "green missile",
268 "big'n'veiny",
269 "plant terror",
270 "poison pen letter",
271 "unarmed focus",
272 "spell spam",
273 "drop boulder",
274 "earthshake",
275 "martial style",
276 "sprint",
277 "skull crush",
278 "female combo",
279 "docklock",
280 "bitch posing",
281 "sexy stand",
282 "marathon",
283 "perfume stride",
284 "naughty heelot",
285 "extreme sturdiness",
286 "butt protection",
287 "profiling",
288 "star heel swap",
289 "heel stab",
290 "hardcore alienization",
291 "jedi jump",
292 "charge saber",
293 "telekinesis",
297 static const struct innate_tech
298 /* Roles */
299 arc_tech[] = { { 1, T_RESEARCH, 1},
300 { 0, 0, 0} },
301 ass_tech[] = { { 1, T_CUTTHROAT, 1},
302 { 25, T_BLOOD_RITUAL, 1},
303 { 0, 0, 0} },
304 lad_tech[] = { { 1, T_ATTIRE_CHARM, 1},
305 { 0, 0, 0} },
306 gee_tech[] = { { 15, T_ZAP_EM, 1},
307 { 0, 0, 0} },
308 fnc_tech[] = { { 1, T_CRIT_STRIKE, 1},
309 { 1, T_EDDY_WIND, 1},
310 { 0, 0, 0} },
311 fig_tech[] = { { 1, T_BERSERK, 1},
312 { 4, T_CONCENTRATING, 1},
313 { 8, T_IRON_SKIN, 1},
314 { 10, T_SHIELD_BASH, 1},
315 { 18, T_ZAP_EM, 1},
316 { 0, 0, 0} },
317 sex_tech[] = { { 1, T_ATTIRE_CHARM, 1},
318 { 1, T_POKE_BALL, 1},
319 { 26, T_SUMMON_PET, 1},
320 { 0, 0, 0} },
321 zoo_tech[] = { { 12, T_SUMMON_PET, 1},
322 { 0, 0, 0} },
323 jes_tech[] = { { 10, T_CARD_TRICK, 1},
324 { 30, T_EGG_BOMB, 1},
325 { 0, 0, 0} },
326 stu_tech[] = { { 1, T_LIQUID_LEAP, 1},
327 { 1, T_JEDI_JUMP, 1},
328 { 5, T_POLYFORM, 1},
329 { 15, T_EDDY_WIND, 1},
330 { 0, 0, 0} },
331 gun_tech[] = { { 1, T_CREATE_AMMO, 1},
332 { 1, T_SURGERY, 1},
333 { 0, 0, 0} },
334 mar_tech[] = { { 1, T_CREATE_AMMO, 1},
335 { 0, 0, 0} },
336 cli_tech[] = { { 16, T_SURGERY, 1},
337 { 0, 0, 0} },
338 wom_tech[] = { { 20, T_ATTIRE_CHARM, 1},
339 { 26, T_CARD_TRICK, 1},
340 { 0, 0, 0} },
341 ana_tech[] = { { 1, T_CREATE_AMMO, 1},
342 { 1, T_DECONTAMINATE, 1},
343 { 10, T_SKILLOMORPH, 1},
344 { 20, T_TERRAIN_CLEANUP, 1},
345 { 0, 0, 0} },
346 lib_tech[] = { { 1, T_RESEARCH, 1},
347 { 14, T_SPELL_SPAM, 1},
348 { 20, T_RECHARGE, 1},
349 { 20, T_WONDERSPELL, 1},
350 { 0, 0, 0} },
351 med_tech[] = { { 1, T_TELEKINESIS, 1},
352 { 1, T_ON_THE_SAME_TEAM, 1},
353 { 10, T_POLYFORM, 1},
354 { 15, T_SPIRITUALITY_CHECK, 1},
355 { 0, 0, 0} },
356 dol_tech[] = { { 1, T_ATTIRE_CHARM, 1},
357 { 7, T_RESEARCH, 1},
358 { 10, T_POKE_BALL, 1},
359 { 20, T_SUMMON_PET, 1},
360 { 25, T_CARD_TRICK, 1},
361 { 0, 0, 0} },
362 ama_tech[] = { { 1, T_FLURRY, 1},
363 { 1, T_PRACTICE, 1},
364 { 5, T_CRIT_STRIKE, 1},
365 { 15, T_VANISH, 1},
366 { 18, T_CONCENTRATING, 1},
367 { 20, T_SKILLOMORPH, 1},
368 { 25, T_ATTIRE_CHARM, 1},
369 { 0, 0, 0} },
370 art_tech[] = { { 10, T_DIAMOND_BARRIER, 1},
371 { 15, T_TERRAIN_CLEANUP, 1},
372 { 18, T_POLYFORM, 1},
373 { 20, T_BLOOD_RITUAL, 1},
374 { 0, 0, 0} },
375 rin_tech[] = { { 1, T_BLINK, 1},
376 { 1, T_LUCKY_GAMBLE, 1},
377 { 0, 0, 0} },
379 bos_tech[] = { { 1, T_FLURRY, 1},
380 { 1, T_DOUBLE_THROWNAGE, 1},
381 { 5, T_VANISH, 1},
382 { 10, T_ENT_S_POTION, 1},
383 { 15, T_BLINK, 1},
384 { 30, T_TELEKINESIS, 1},
385 { 0, 0, 0} },
387 bul_tech[] = { { 6, T_IRON_SKIN, 1},
388 { 0, 0, 0} },
390 sta_tech[] = { { 4, T_SKILLOMORPH, 1},
391 { 12, T_DECONTAMINATE, 1},
392 { 16, T_DIAMOND_BARRIER, 1},
393 { 20, T_ZAP_EM, 1},
394 { 26, T_SPELL_SPAM, 1},
395 { 0, 0, 0} },
397 ord_tech[] = { { 1, T_PRACTICE, 1},
398 { 1, T_TURN_UNDEAD, 1},
399 { 5, T_CONCENTRATING, 1},
400 { 8, T_DOUBLE_THROWNAGE, 1},
401 { 10, T_TINKER, 1},
402 { 12, T_EDDY_WIND, 1},
403 { 0, 0, 0} },
405 dun_tech[] = { { 1, T_CUTTHROAT, 1},
406 { 5, T_CONCENTRATING, 1},
407 { 10, T_CRIT_STRIKE, 1},
408 { 15, T_SHIELD_BASH, 1},
409 { 20, T_RAISE_ZOMBIES, 1},
410 { 25, T_BLOOD_RITUAL, 1},
411 { 0, 0, 0} },
413 alt_tech[] = { { 1, T_BLESSING, 1},
414 { 1, T_SIGIL_CONTROL, 1},
415 { 1, T_SIGIL_TEMPEST, 1},
416 { 1, T_SIGIL_DISCHARGE, 1},
417 { 1, T_DRAW_ENERGY, 1},
418 { 1, T_POWER_SURGE, 1},
419 { 10, T_E_FIST, 1},
420 { 10, T_CHI_STRIKE, 1},
421 { 15, T_WONDERSPELL, 1},
422 { 20, T_BLITZ, 1},
423 { 25, T_REVIVE, 1},
424 { 0, 0, 0} },
426 tha_tech[] = { { 5, T_DAZZLE, 1},
427 { 10, T_WARD_FIRE, 1},
428 { 10, T_DRAW_ENERGY, 1},
429 { 10, T_IRON_SKIN, 1},
430 { 15, T_LIQUID_LEAP, 1},
431 { 15, T_WARD_ELEC, 1},
432 { 20, T_WARD_COLD, 1},
433 { 20, T_POWER_SURGE, 1},
434 { 20, T_EDDY_WIND, 1},
435 { 27, T_SPELL_SPAM, 1},
436 { 0, 0, 0} },
438 gof_tech[] = { { 1, T_DRAW_BLOOD, 1},
439 { 1, T_CALM_STEED, 1},
440 { 1, T_DAZZLE, 1},
441 { 1, T_TURN_UNDEAD, 1},
442 { 1, T_CREATE_AMMO, 1},
443 { 1, T_ATTIRE_CHARM, 1},
444 { 1, T_BLOOD_RITUAL, 1},
445 { 5, T_VANISH, 1},
446 { 10, T_FLURRY, 1},
447 { 15, T_REVIVE, 1},
448 { 20, T_RAISE_ZOMBIES, 1},
449 { 25, T_BOOZE, 1},
450 { 30, T_TELEKINESIS, 1},
451 { 0, 0, 0} },
452 dru_tech[] = { { 1, T_BOOZE, 1}, /* drunk */
453 { 20, T_ENT_S_POTION, 1},
454 { 0, 0, 0} },
455 drd_tech[] = { { 7, T_ENT_S_POTION, 1},
456 { 18, T_SPELL_SPAM, 1},
457 { 28, T_ON_THE_SAME_TEAM, 1},
458 { 0, 0, 0} },
459 sof_tech[] = { { 5, T_ZAP_EM, 1},
460 { 10, T_TINKER, 1},
461 { 0, 0, 0} },
462 jan_tech[] = { { 1, T_IRON_SKIN, 1},
463 { 1, T_CONCENTRATING, 1},
464 { 1, T_TERRAIN_CLEANUP, 1},
465 { 20, T_ZAP_EM, 1},
466 { 0, 0, 0} },
467 sma_tech[] = { { 1, T_CREATE_AMMO, 1},
468 { 10, T_PRACTICE, 1},
469 { 12, T_ZAP_EM, 1},
470 { 15, T_CHARGE_SABER, 1},
471 { 0, 0, 0} },
472 sto_tech[] = { { 1, T_BERSERK, 1},
473 { 1, T_ZAP_EM, 1},
474 { 5, T_SKILLOMORPH, 1},
475 { 10, T_KIII, 1},
476 { 12, T_DOUBLE_THROWNAGE, 1},
477 { 15, T_VANISH, 1},
478 { 20, T_SIGIL_TEMPEST, 1},
479 { 24, T_EDDY_WIND, 1},
480 { 0, 0, 0} },
481 cra_tech[] = { { 1, T_ZAP_EM, 1},
482 { 10, T_CARD_TRICK, 1},
483 { 15, T_RESEARCH, 1},
484 { 20, T_RECHARGE, 1},
485 { 30, T_DOUBLE_TROUBLE, 1},
486 { 0, 0, 0} },
487 fir_tech[] = { { 12, T_RECHARGE, 1},
488 { 0, 0, 0} },
489 yau_tech[] = { { 2, T_BLOOD_RITUAL, 1},
490 { 8, T_CRIT_STRIKE, 1},
491 { 10, T_SIGIL_DISCHARGE, 1},
492 { 12, T_CHI_HEALING, 1},
493 { 15, T_ZAP_EM, 1},
494 { 18, T_DRAW_ENERGY, 1},
495 { 25, T_TELEKINESIS, 1},
496 { 0, 0, 0} },
497 gam_tech[] = { { 1, T_CONCENTRATING, 1},
498 { 13, T_LUCKY_GAMBLE, 1},
499 { 20, T_SUMMON_PET, 1},
500 { 30, T_RESET_TECHNIQUE, 1},
501 { 0, 0, 0} },
502 joc_tech[] = { { 1, T_CALM_STEED, 1},
503 { 5, T_DASH, 1},
504 { 0, 0, 0} },
505 gla_tech[] = { { 5, T_SHIELD_BASH, 1},
506 { 10, T_IRON_SKIN, 1},
507 { 0, 0, 0} },
508 bar_tech[] = { { 1, T_BERSERK, 1},
509 { 8, T_DOUBLE_THROWNAGE, 1},
510 { 10, T_CONCENTRATING, 1},
511 { 10, T_IRON_SKIN, 1},
512 { 20, T_EDDY_WIND, 1},
513 { 0, 0, 0} },
514 noo_tech[] = { { 1, T_BERSERK, 1},
515 { 8, T_DOUBLE_THROWNAGE, 1},
516 { 10, T_CONCENTRATING, 1},
517 { 10, T_IRON_SKIN, 1},
518 { 20, T_EDDY_WIND, 1},
519 { 0, 0, 0} },
520 blo_tech[] = { { 1, T_EDDY_WIND, 1},
521 { 10, T_BLOOD_RITUAL, 1},
522 { 0, 0, 0} },
523 gol_tech[] = { { 1, T_VANISH, 1},
524 { 7, T_TINKER, 1},
525 { 0, 0, 0} },
526 ble_tech[] = { { 1, T_SURGERY, 1},
527 { 1, T_HEAL_HANDS, 1},
528 { 1, T_DRAW_BLOOD, 1},
529 { 10, T_CHI_HEALING, 1},
530 { 20, T_REVIVE, 1},
531 { 30, T_BLOOD_RITUAL, 1},
532 { 0, 0, 0} },
533 mid_tech[] = { { 1, T_RAGE, 1},
534 { 0, 0, 0} },
535 psy_tech[] = { { 1, T_ZAP_EM, 1},
536 { 2, T_TURN_UNDEAD, 1},
537 { 7, T_REINFORCE, 1},
538 { 12, T_E_FIST, 1},
539 { 12, T_SIGIL_CONTROL, 1},
540 { 15, T_SPIRITUALITY_CHECK, 1},
541 { 18, T_DRAW_ENERGY, 1},
542 { 18, T_SPELL_SPAM, 1},
543 { 20, T_SPIRIT_BOMB, 1},
544 { 24, T_BLESSING, 1},
545 { 28, T_SUMMON_PET, 1},
546 { 0, 0, 0} },
547 sag_tech[] = { { 4, T_SPELL_SPAM, 1},
548 { 0, 0, 0} },
549 spa_tech[] = { { 1, T_REINFORCE, 1},
550 { 5, T_RESEARCH, 1},
551 { 6, T_RECHARGE, 1},
552 { 8, T_WARD_FIRE, 1},
553 { 10, T_CHARGE_SABER, 1},
554 { 11, T_WARD_COLD, 1},
555 { 14, T_WARD_ELEC, 1},
556 { 20, T_DRAW_ENERGY, 1},
557 { 0, 0, 0} },
558 cam_tech[] = { { 12, T_CREATE_AMMO, 1},
559 { 26, T_RECHARGE, 1},
560 { 0, 0, 0} },
561 qua_tech[] = { { 12, T_ZAP_EM, 1},
562 { 0, 0, 0} },
563 gan_tech[] = { { 1, T_CREATE_AMMO, 1},
564 { 1, T_LUCKY_GAMBLE, 1},
565 { 0, 0, 0} },
566 emp_tech[] = { { 1, T_SURGERY, 1},
567 { 1, T_REINFORCE, 1},
568 { 1, T_HEAL_HANDS, 1},
569 { 1, T_CALM_STEED, 1},
570 { 3, T_CHI_HEALING, 1},
571 { 5, T_TURN_UNDEAD, 1},
572 { 7, T_DRAW_BLOOD, 1},
573 { 8, T_ZAP_EM, 1},
574 { 10, T_DRAW_ENERGY, 1},
575 { 15, T_SPIRITUALITY_CHECK, 1},
576 { 18, T_PREACHING, 1},
577 { 20, T_ATTIRE_CHARM, 1},
578 { 20, T_ENT_S_POTION, 1},
579 { 25, T_REVIVE, 1},
580 { 30, T_WONDERSPELL, 1},
581 { 0, 0, 0} },
582 nuc_tech[] = { { 1, T_DECONTAMINATE, 1},
583 { 14, T_PERMAMORPH, 1},
584 { 0, 0, 0} },
585 for_tech[] = { { 20, T_PERMAMORPH, 1},
586 { 0, 0, 0} },
587 gen_tech[] = { { 12, T_PREACHING, 1},
588 { 0, 0, 0} },
589 mam_tech[] = { { 1, T_REINFORCE, 1},
590 { 1, T_RESEARCH, 1},
591 { 1, T_ZAP_EM, 1},
592 { 1, T_SPELL_SPAM, 1},
593 { 10, T_CONCENTRATING, 1},
594 { 10, T_POWER_SURGE, 1},
595 { 15, T_WONDERSPELL, 1},
596 { 18, T_TELEKINESIS, 1},
597 { 0, 0, 0} },
598 sco_tech[] = { { 25, T_DIAMOND_BARRIER, 1},
599 { 0, 0, 0} },
600 wal_tech[] = { { 1, T_DIAMOND_BARRIER, 1},
601 { 0, 0, 0} },
602 off_tech[] = { { 10, T_ON_THE_SAME_TEAM, 1},
603 { 0, 0, 0} },
604 wei_tech[] = { { 2, T_POLYFORM, 1},
605 { 3, T_SIGIL_DISCHARGE, 1},
606 { 4, T_G_SLAM, 1},
607 { 7, T_FLURRY, 1},
608 { 8, T_LUCKY_GAMBLE, 1},
609 { 9, T_SUMMON_TEAM_ANT, 1},
610 { 10, T_CARD_TRICK, 1},
611 { 11, T_CALM_STEED, 1},
612 { 14, T_HARDCORE_ALIENIZATION, 1},
613 { 17, T_RAISE_ZOMBIES, 1},
614 { 18, T_DIAMOND_BARRIER, 1},
615 { 19, T_CHI_STRIKE, 1},
616 { 20, T_PREACHING, 1},
617 { 22, T_ZAP_EM, 1},
618 { 23, T_BLITZ, 1},
619 { 24, T_EVISCERATE, 1},
620 { 29, T_WORLD_FALL, 1},
621 { 30, T_TURN_UNDEAD, 1},
622 { 0, 0, 0} },
623 loc_tech[] = { { 15, T_DIAMOND_BARRIER, 1},
624 { 0, 0, 0} },
625 roc_tech[] = { { 1, T_EGG_BOMB, 1},
626 { 1, T_FLURRY, 1},
627 { 0, 0, 0} },
628 cel_tech[] = { { 6, T_SPELL_SPAM, 1},
629 { 10, T_TERRAIN_CLEANUP, 1},
630 { 24, T_PERMAMORPH, 1},
631 { 0, 0, 0} },
632 ast_tech[] = { { 5, T_FLURRY, 1},
633 { 6, T_SIGIL_CONTROL, 1},
634 { 8, T_SHIELD_BASH, 1},
635 { 10, T_REINFORCE, 1},
636 { 10, T_ZAP_EM, 1},
637 { 12, T_RESEARCH, 1},
638 { 18, T_SIGIL_TEMPEST, 1},
639 { 18, T_CHARGE_SABER, 1},
640 { 20, T_TINKER, 1},
641 { 20, T_WORLD_FALL, 1},
642 { 24, T_DECONTAMINATE, 1},
643 { 24, T_SURGERY, 1},
644 { 24, T_DRAW_ENERGY, 1},
645 { 25, T_SIGIL_DISCHARGE, 1},
646 { 25, T_SKILLOMORPH, 1},
647 { 28, T_TERRAIN_CLEANUP, 1},
648 { 29, T_BLINK, 1},
649 { 30, T_LIQUID_LEAP, 1},
650 { 0, 0, 0} },
651 dea_tech[] = { { 1, T_WORLD_FALL, 1},
652 { 1, T_RECHARGE, 1},
653 { 1, T_BLOOD_RITUAL, 1},
654 { 18, T_SPELL_SPAM, 1},
655 { 0, 0, 0} },
656 div_tech[] = { { 15, T_POLYFORM, 1},
657 { 0, 0, 0} },
658 cav_tech[] = { { 1, T_PRIMAL_ROAR, 1},
659 { 10, T_SHIELD_BASH, 1},
660 { 20, T_POLYFORM, 1},
661 { 0, 0, 0} },
662 dem_tech[] = { { 1, T_PRIMAL_ROAR, 1},
663 { 25, T_PREACHING, 1},
664 { 0, 0, 0} },
665 sli_tech[] = { { 1, T_LIQUID_LEAP, 1},
666 { 4, T_SPIRITUALITY_CHECK, 1},
667 { 6, T_HEAL_HANDS, 1},
668 { 10, T_LUCKY_GAMBLE, 1},
669 { 12, T_WORLD_FALL, 1},
670 { 15, T_TELEKINESIS, 1},
671 { 18, T_IRON_SKIN, 1},
672 { 19, T_SUMMON_TEAM_ANT, 1},
673 { 21, T_DECONTAMINATE, 1},
674 { 23, T_RECHARGE, 1},
675 { 25, T_VANISH, 1},
676 { 26, T_ROCK_TO_POISON, 1},
677 { 28, T_POLYFORM, 1},
678 { 30, T_EGG_BOMB, 1},
679 { 0, 0, 0} },
680 erd_tech[] = { { 1, T_CRIT_STRIKE, 1},
681 { 10, T_PRACTICE, 1},
682 { 20, T_ATTIRE_CHARM, 1},
683 { 0, 0, 0} },
684 brd_tech[] = { { 1, T_PRIMAL_ROAR, 1},
685 { 10, T_BOOZE, 1},
686 { 15, T_ON_THE_SAME_TEAM, 1},
687 { 20, T_RAGE, 1},
688 { 0, 0, 0} },
689 hus_tech[] = { { 20, T_ROCK_TO_POISON, 1},
690 { 0, 0, 0} },
691 aci_tech[] = { { 1, T_REINFORCE, 1},
692 { 3, T_POWER_SURGE, 1},
693 { 5, T_DRAW_ENERGY, 1},
694 { 7, T_SIGIL_CONTROL, 1},
695 { 10, T_SIGIL_TEMPEST, 1},
696 { 10, T_SPELL_SPAM, 1},
697 { 18, T_ROCK_TO_POISON, 1},
698 { 20, T_SIGIL_DISCHARGE, 1},
699 { 0, 0, 0} },
700 fla_tech[] = { { 1, T_REINFORCE, 1},
701 { 3, T_POWER_SURGE, 1},
702 { 5, T_DRAW_ENERGY, 1},
703 { 8, T_SPELL_SPAM, 1},
704 { 10, T_SIGIL_TEMPEST, 1},
705 { 20, T_SIGIL_DISCHARGE, 1},
706 { 0, 0, 0} },
707 ele_tech[] = { { 1, T_REINFORCE, 1},
708 { 3, T_POWER_SURGE, 1},
709 { 5, T_DRAW_ENERGY, 1},
710 { 7, T_SIGIL_CONTROL, 1},
711 { 10, T_SPELL_SPAM, 1},
712 { 10, T_SIGIL_TEMPEST, 1},
713 { 20, T_SIGIL_DISCHARGE, 1},
714 { 0, 0, 0} },
715 psn_tech[] = { { 1, T_REINFORCE, 1},
716 { 1, T_SIGIL_CONTROL, 1},
717 { 1, T_SIGIL_TEMPEST, 1},
718 { 1, T_SIGIL_DISCHARGE, 1},
719 { 1, T_ROCK_TO_POISON, 1},
720 { 3, T_POWER_SURGE, 1},
721 { 5, T_DRAW_ENERGY, 1},
722 { 7, T_RECHARGE, 1},
723 { 14, T_SPELL_SPAM, 1},
724 { 0, 0, 0} },
725 hea_tech[] = { { 1, T_SURGERY, 1},
726 { 10, T_ENT_S_POTION, 1},
727 { 20, T_REVIVE, 1},
728 { 30, T_ON_THE_SAME_TEAM, 1},
729 { 0, 0, 0} },
730 ice_tech[] = { { 1, T_REINFORCE, 1},
731 { 5, T_DRAW_ENERGY, 1},
732 { 8, T_SPELL_SPAM, 1},
733 { 10, T_SIGIL_TEMPEST, 1},
734 { 12, T_POWER_SURGE, 1},
735 { 20, T_SIGIL_DISCHARGE, 1},
736 { 0, 0, 0} },
737 jed_tech[] = { { 1, T_JEDI_JUMP, 1},
738 { 5, T_CHARGE_SABER, 1},
739 { 8, T_TELEKINESIS, 1},
740 { 15, T_SHIELD_BASH, 1},
741 { 25, T_SPIRITUALITY_CHECK, 1},
742 { 0, 0, 0,} },
743 kni_tech[] = { { 1, T_TURN_UNDEAD, 1},
744 { 1, T_HEAL_HANDS, 1},
745 { 1, T_SHIELD_BASH, 1},
746 { 26, T_SPELL_SPAM, 1},
747 { 0, 0, 0} },
749 car_tech[] = { { 1, T_CARD_TRICK, 1},
750 { 15, T_LUCKY_GAMBLE, 1},
751 { 0, 0, 0} },
753 dra_tech[] = { { 10, T_PRIMAL_ROAR, 1},
754 { 15, T_ON_THE_SAME_TEAM, 1},
755 { 20, T_CALM_STEED, 1},
756 { 30, T_SUMMON_PET, 1},
757 { 0, 0, 0} },
759 com_tech[] = { { 2, T_SHIELD_BASH, 1},
760 { 11, T_KIII, 1},
761 { 15, T_CONCENTRATING, 1},
762 { 20, T_G_SLAM, 1},
763 { 25, T_SPIRIT_BOMB, 1},
764 { 0, 0, 0} },
766 fjo_tech[] = { { 5, T_SURGERY, 1},
767 { 10, T_LIQUID_LEAP, 1},
768 { 20, T_REINFORCE, 1},
769 { 25, T_BOOZE, 1},
770 { 0, 0, 0} },
772 pra_tech[] = { { 1, T_RESEARCH, 1},
773 { 14, T_ON_THE_SAME_TEAM, 1},
774 { 15, T_VANISH, 1},
775 { 25, T_RECHARGE, 1},
776 { 0, 0, 0} },
778 eme_tech[] = { { 10, T_RAGE, 1},
779 { 0, 0, 0} },
781 sym_tech[] = { { 12, T_TERRAIN_CLEANUP, 1},
782 { 0, 0, 0} },
784 but_tech[] = { { 15, T_SUMMON_PET, 1},
785 { 20, T_ATTIRE_CHARM, 1},
786 { 0, 0, 0} },
788 dan_tech[] = { { 1, T_BLITZ, 1},
789 { 1, T_E_FIST, 1},
790 { 3, T_IRON_SKIN, 1},
791 { 5, T_DASH, 1},
792 { 7, T_SHIELD_BASH, 1},
793 { 9, T_DIAMOND_BARRIER, 1},
794 { 11, T_SIGIL_DISCHARGE, 1},
795 { 13, T_SPIRIT_BOMB, 1},
796 { 15, T_PUMMEL, 1},
797 { 18, T_G_SLAM, 1},
798 { 20, T_ATTIRE_CHARM, 1},
799 { 22, T_TERRAIN_CLEANUP, 1},
800 { 25, T_CHI_STRIKE, 1},
801 { 27, T_JEDI_JUMP, 1},
802 { 30, T_CHI_HEALING, 1},
803 { 0, 0, 0} },
805 kor_tech[] = { { 1, T_DOUBLE_THROWNAGE, 1},
806 { 0, 0, 0} },
808 pre_tech[] = { { 1, T_TERRAIN_CLEANUP, 1},
809 { 0, 0, 0} },
811 sec_tech[] = { { 1, T_RECHARGE, 1},
812 { 8, T_VANISH, 1},
813 { 10, T_CHARGE_SABER, 1},
814 { 12, T_REINFORCE, 1},
815 { 20, T_RESEARCH, 1},
816 { 20, T_BOOZE, 1},
817 { 24, T_CREATE_AMMO, 1},
818 { 25, T_SURGERY, 1},
819 { 28, T_POLYFORM, 1},
820 { 30, T_BLOOD_RITUAL, 1},
821 { 0, 0, 0} },
823 dia_tech[] = { { 1, T_REINFORCE, 1},
824 { 1, T_CRIT_STRIKE, 1},
825 { 1, T_SHIELD_BASH, 1},
826 { 6, T_WARD_FIRE, 1},
827 { 6, T_TELEKINESIS, 1},
828 { 10, T_PRACTICE, 1},
829 { 12, T_WARD_COLD, 1},
830 { 12, T_DOUBLE_THROWNAGE, 1},
831 { 18, T_FLURRY, 1},
832 { 18, T_WARD_ELEC, 1},
833 { 18, T_VANISH, 1},
834 { 18, T_IRON_SKIN, 1},
835 { 18, T_CONCENTRATING, 1},
836 { 20, T_SPELL_SPAM, 1},
837 { 24, T_TURN_UNDEAD, 1},
838 { 30, T_BERSERK, 1},
839 { 30, T_PRIMAL_ROAR, 1},
840 { 30, T_REVIVE, 1},
841 { 30, T_EDDY_WIND, 1},
842 { 0, 0, 0} },
844 occ_tech[] = { { 1, T_SIGIL_DISCHARGE, 1},
845 { 8, T_RECHARGE, 1},
846 { 12, T_REINFORCE, 1},
847 { 15, T_SPELL_SPAM, 1},
848 { 16, T_RESEARCH, 1},
849 { 18, T_SPIRITUALITY_CHECK, 1},
850 { 20, T_BLOOD_RITUAL, 1},
851 { 24, T_POWER_SURGE, 1},
852 { 0, 0, 0} },
854 emn_tech[] = { { 1, T_E_FIST, 1},
855 { 1, T_SIGIL_CONTROL, 1},
856 { 5, T_WARD_COLD, 1},
857 { 8, T_REINFORCE, 1},
858 { 8, T_SPELL_SPAM, 1},
859 { 10, T_WARD_ELEC, 1},
860 { 12, T_TERRAIN_CLEANUP, 1},
861 { 15, T_WARD_FIRE, 1},
862 { 20, T_ENT_S_POTION, 1},
863 { 0, 0, 0} },
865 cha_tech[] = { { 1, T_SIGIL_TEMPEST, 1},
866 { 4, T_REINFORCE, 1},
867 { 10, T_LUCKY_GAMBLE, 1},
868 { 12, T_PERMAMORPH, 1},
869 { 18, T_EDDY_WIND, 1},
870 { 20, T_WORLD_FALL, 1},
871 { 22, T_EVISCERATE, 1},
872 { 24, T_SPIRIT_BOMB, 1},
873 { 0, 0, 0} },
875 jus_tech[] = { { 1, T_PREACHING, 1},
876 { 8, T_ZAP_EM, 1},
877 { 12, T_CONCENTRATING, 1},
878 { 16, T_SHIELD_BASH, 1},
879 { 19, T_SPELL_SPAM, 1},
880 { 0, 0, 0} },
882 pal_tech[] = { { 1, T_TURN_UNDEAD, 1},
883 { 1, T_HEAL_HANDS, 1},
884 { 1, T_SHIELD_BASH, 1},
885 { 1, T_SPIRITUALITY_CHECK, 1},
886 { 1, T_PREACHING, 1},
887 { 18, T_CONCENTRATING, 1},
888 { 0, 0, 0} },
890 wan_tech[] = { { 1, T_RECHARGE, 1},
891 { 30, T_WORLD_FALL, 1},
892 { 0, 0, 0} },
894 war_tech[] = { { 1, T_CONCENTRATING, 1},
895 { 10, T_SHIELD_BASH, 1},
896 { 24, T_IRON_SKIN, 1},
897 { 0, 0, 0} },
899 sci_tech[] = { { 1, T_RESEARCH, 1},
900 { 1, T_TINKER, 1},
901 { 10, T_SURGERY, 1},
902 { 20, T_SUMMON_TEAM_ANT, 1},
903 { 25, T_DRAW_ENERGY, 1},
904 { 30, T_EGG_BOMB, 1},
905 { 0, 0, 0} },
906 sha_tech[] = { { 1, T_LIQUID_LEAP, 1},
907 { 15, T_POLYFORM, 1},
908 { 0, 0, 0} },
910 sla_tech[] = { { 1, T_SUMMON_PET, 1},
911 { 12, T_LUCKY_GAMBLE, 1},
912 { 0, 0, 0} },
914 mon_tech[] = { { 1, T_PUMMEL, 1},
915 { 1, T_DASH, 1},
916 { 1, T_BLITZ, 1},
917 { 2, T_CHI_STRIKE, 1},
918 { 4, T_CHI_HEALING, 1},
919 { 5, T_PREACHING, 1},
920 { 6, T_E_FIST, 1},
921 { 8, T_DRAW_ENERGY, 1},
922 { 10, T_G_SLAM, 1},
923 { 11, T_WARD_FIRE, 1},
924 { 13, T_WARD_COLD, 1},
925 { 15, T_WARD_ELEC, 1},
926 { 17, T_SPIRIT_BOMB, 1},
927 { 20, T_POWER_SURGE, 1},
928 { 0, 0, 0} },
930 sup_tech[] = { { 18, T_PUMMEL, 1},
931 { 18, T_DASH, 1},
932 { 18, T_BLITZ, 1},
933 { 18, T_CHI_STRIKE, 1},
934 { 18, T_CHI_HEALING, 1},
935 { 18, T_E_FIST, 1},
936 { 18, T_G_SLAM, 1},
937 { 18, T_SPIRIT_BOMB, 1},
938 { 18, T_IRON_SKIN, 1},
939 { 18, T_CONCENTRATING, 1},
940 { 18, T_DOUBLE_THROWNAGE, 1},
941 { 18, T_SHIELD_BASH, 1},
942 { 0, 0, 0} },
944 sai_tech[] = { { 1, T_PUMMEL, 1},
945 { 1, T_DASH, 1},
946 { 1, T_BLITZ, 1},
947 { 2, T_CHI_STRIKE, 1},
948 { 4, T_CHI_HEALING, 1},
949 { 6, T_E_FIST, 1},
950 { 8, T_DRAW_ENERGY, 1},
951 { 8, T_CONCENTRATING, 1},
952 { 10, T_G_SLAM, 1},
953 { 11, T_WARD_FIRE, 1},
954 { 13, T_WARD_COLD, 1},
955 { 15, T_WARD_ELEC, 1},
956 { 17, T_SPIRIT_BOMB, 1},
957 { 20, T_POWER_SURGE, 1},
958 { 24, T_EDDY_WIND, 1},
959 { 0, 0, 0} },
961 psi_tech[] = { { 1, T_PUMMEL, 1},
962 { 1, T_DASH, 1},
963 { 2, T_CHI_STRIKE, 1},
964 { 4, T_CHI_HEALING, 1},
965 { 6, T_E_FIST, 1},
966 { 7, T_SPELL_SPAM, 1},
967 { 8, T_DRAW_ENERGY, 1},
968 { 8, T_TELEKINESIS, 1},
969 { 10, T_G_SLAM, 1},
970 { 11, T_WARD_FIRE, 1},
971 { 13, T_WARD_COLD, 1},
972 { 15, T_WARD_ELEC, 1},
973 { 15, T_ATTIRE_CHARM, 1},
974 { 17, T_SPIRIT_BOMB, 1},
975 { 20, T_POWER_SURGE, 1},
976 { 30, T_PERMAMORPH, 1},
977 { 0, 0, 0} },
978 pok_tech[] = { { 1, T_POKE_BALL, 1},
979 { 2, T_PUMMEL, 1},
980 { 3, T_SPIRITUALITY_CHECK, 1},
981 { 4, T_DASH, 1},
982 { 5, T_WARD_FIRE, 1},
983 { 7, T_SHIELD_BASH, 1},
984 { 8, T_BLITZ, 1},
985 { 9, T_WARD_COLD, 1},
986 { 10, T_RAISE_ZOMBIES, 1},
987 { 11, T_LUCKY_GAMBLE, 1},
988 { 12, T_ZAP_EM, 1},
989 { 13, T_WARD_ELEC, 1},
990 { 15, T_CREATE_AMMO, 1},
991 { 16, T_E_FIST, 1},
992 { 17, T_EGG_BOMB, 1},
993 { 18, T_WORLD_FALL, 1},
994 { 19, T_SPELL_SPAM, 1},
995 { 20, T_DRAW_ENERGY, 1},
996 { 21, T_RECHARGE, 1},
997 { 22, T_RESEARCH, 1},
998 { 23, T_POLYFORM, 1},
999 { 24, T_EDDY_WIND, 1},
1000 { 25, T_G_SLAM, 1},
1001 { 26, T_SUMMON_TEAM_ANT, 1},
1002 { 27, T_BLESSING, 1},
1003 { 28, T_REVIVE, 1},
1004 { 29, T_SPIRIT_BOMB, 1},
1005 { 30, T_POWER_SURGE, 1},
1006 { 0, 0, 0} },
1007 nec_tech[] = { { 1, T_REINFORCE, 1},
1008 { 1, T_RAISE_ZOMBIES, 1},
1009 { 10, T_POWER_SURGE, 1},
1010 { 15, T_SIGIL_TEMPEST, 1},
1011 { 25, T_BLOOD_RITUAL, 1},
1012 { 0, 0, 0} },
1013 abu_tech[] = { { 1, T_CONCENTRATING, 1},
1014 { 1, T_IRON_SKIN, 1},
1015 { 0, 0, 0} },
1016 pri_tech[] = { { 1, T_TURN_UNDEAD, 1},
1017 { 1, T_BLESSING, 1},
1018 { 1, T_PREACHING, 1},
1019 { 1, T_SPIRITUALITY_CHECK, 1},
1020 { 22, T_SPELL_SPAM, 1},
1021 { 24, T_BLOOD_RITUAL, 1},
1022 { 0, 0, 0} },
1023 che_tech[] = { { 1, T_TURN_UNDEAD, 1},
1024 { 1, T_BLESSING, 1},
1025 { 1, T_HEAL_HANDS, 1},
1026 { 1, T_SPIRITUALITY_CHECK, 1},
1027 { 1, T_PREACHING, 1},
1028 { 0, 0, 0} },
1029 ran_tech[] = { { 1, T_FLURRY, 1},
1030 { 0, 0, 0} },
1031 aug_tech[] = { { 1, T_TELEKINESIS, 1},
1032 { 1, T_SPELL_SPAM, 1},
1033 { 5, T_WONDERSPELL, 1},
1034 { 10, T_SPIRITUALITY_CHECK, 1},
1035 { 15, T_CARD_TRICK, 1},
1036 { 20, T_DIAMOND_BARRIER, 1},
1037 { 0, 0, 0} },
1038 elp_tech[] = { { 1, T_FLURRY, 1},
1039 { 0, 0, 0} },
1040 rog_tech[] = { { 1, T_CRIT_STRIKE, 1},
1041 { 15, T_CUTTHROAT, 1},
1042 { 0, 0, 0} },
1043 sam_tech[] = { { 1, T_KIII, 1},
1044 { 6, T_SHIELD_BASH, 1},
1045 { 18, T_IRON_SKIN, 1},
1046 { 18, T_CONCENTRATING, 1},
1047 { 30, T_BLOOD_RITUAL, 1},
1048 { 0, 0, 0} },
1049 cyb_tech[] = { { 1, T_KIII, 1},
1050 { 5, T_ZAP_EM, 1},
1051 { 6, T_SHIELD_BASH, 1},
1052 { 8, T_CUTTHROAT, 1},
1053 { 10, T_CHARGE_SABER, 1},
1054 { 12, T_CRIT_STRIKE, 1},
1055 { 18, T_IRON_SKIN, 1},
1056 { 18, T_CONCENTRATING, 1},
1057 { 30, T_BLOOD_RITUAL, 1},
1058 { 0, 0, 0} },
1059 gro_tech[] = { { 1, T_KIII, 1},
1060 { 1, T_CREATE_AMMO, 1},
1061 { 6, T_SHIELD_BASH, 1},
1062 { 18, T_IRON_SKIN, 1},
1063 { 18, T_CONCENTRATING, 1},
1064 { 30, T_BLOOD_RITUAL, 1},
1065 { 0, 0, 0} },
1066 nin_tech[] = { { 5, T_DOUBLE_THROWNAGE, 1},
1067 { 25, T_EDDY_WIND, 1},
1068 { 0, 0, 0} },
1069 tou_tech[] = { /* Put Tech here */
1070 { 0, 0, 0} },
1071 tra_tech[] = { { 1, T_ATTIRE_CHARM, 1},
1072 { 17, T_SUMMON_PET, 1},
1073 { 0, 0, 0} },
1074 kur_tech[] = { { 1, T_ATTIRE_CHARM, 1}, /* also used for prostitute */
1075 { 0, 0, 0} },
1076 dis_tech[] = { { 5, T_BERSERK, 1},
1077 { 8, T_DAZZLE, 1},
1078 { 10, T_RAGE, 1},
1079 { 15, T_ZAP_EM, 1},
1080 { 22, T_ON_THE_SAME_TEAM, 1},
1081 { 0, 0, 0} },
1082 mas_tech[] = { { 1, T_DIAMOND_BARRIER, 1}, /* mason */
1083 { 0, 0, 0} },
1084 xel_tech[] = { { 4, T_SPELL_SPAM, 1},
1085 { 6, T_EVISCERATE, 1},
1086 { 8, T_CRIT_STRIKE, 1},
1087 { 9, T_DASH, 1},
1088 { 10, T_ZAP_EM, 1},
1089 { 10, T_BLOOD_RITUAL, 1},
1090 { 12, T_RESEARCH, 1},
1091 { 16, T_ROCK_TO_POISON, 1},
1092 { 18, T_TELEKINESIS, 1},
1093 { 20, T_REINFORCE, 1},
1094 { 24, T_POLYFORM, 1},
1095 { 25, T_EGG_BOMB, 1},
1096 { 26, T_PERMAMORPH, 1},
1097 { 30, T_SKILLOMORPH, 1},
1098 { 0, 0, 0} },
1099 trs_tech[] = { { 1, T_ATTIRE_CHARM, 1},
1100 { 17, T_SUMMON_PET, 1},
1101 { 0, 0, 0} },
1102 act_tech[] = { { 1, T_REINFORCE, 1},
1103 { 5, T_VANISH, 1},
1104 { 8, T_ON_THE_SAME_TEAM, 1},
1105 { 10, T_DAZZLE, 1},
1106 { 10, T_PREACHING, 1},
1107 { 25, T_TERRAIN_CLEANUP, 1},
1108 { 0, 0, 0} },
1109 top_tech[] = { { 1, T_ATTIRE_CHARM, 1},
1110 { 10, T_CREATE_AMMO, 1},
1111 { 20, T_LIQUID_LEAP, 1},
1112 { 30, T_POLYFORM, 1},
1113 { 0, 0, 0} },
1114 fai_tech[] = { { 1, T_ATTIRE_CHARM, 1},
1115 { 29, T_CREATE_AMMO, 1},
1116 { 0, 0, 0} },
1117 und_tech[] = { { 1, T_TURN_UNDEAD, 1},
1118 { 1, T_PRACTICE, 1},
1119 { 10, T_IRON_SKIN, 1},
1120 { 0, 0, 0} },
1121 unb_tech[] = { { 1, T_TURN_UNDEAD, 1},
1122 { 1, T_PRACTICE, 1},
1123 { 3, T_SHIELD_BASH, 1},
1124 { 6, T_IRON_SKIN, 1},
1125 { 6, T_CONCENTRATING, 1},
1126 { 12, T_DOUBLE_THROWNAGE, 1},
1127 { 15, T_RECHARGE, 1},
1128 { 18, T_EDDY_WIND, 1},
1129 { 20, T_DECONTAMINATE, 1},
1130 { 0, 0, 0} },
1131 unt_tech[] = { { 1, T_TURN_UNDEAD, 1},
1132 { 5, T_BLOOD_RITUAL, 1},
1133 { 14, T_SPIRITUALITY_CHECK, 1},
1134 { 0, 0, 0} },
1135 val_tech[] = { { 1, T_PRACTICE, 1},
1136 { 9, T_CONCENTRATING, 1},
1137 { 14, T_RECHARGE, 1},
1138 { 20, T_IRON_SKIN, 1},
1139 { 0, 0, 0} },
1140 lun_tech[] = { { 1, T_EVISCERATE, 1},
1141 { 10, T_BERSERK, 1},
1142 { 0, 0, 0} },
1143 yeo_tech[] = {
1144 { 1, T_CALM_STEED, 1},
1145 { 8, T_IRON_SKIN, 1},
1146 { 17, T_EDDY_WIND, 1},
1147 { 25, T_SUMMON_PET, 1},
1148 { 0, 0, 0} },
1149 wiz_tech[] = { { 1, T_REINFORCE, 1},
1150 { 3, T_DRAW_ENERGY, 1},
1151 { 5, T_POWER_SURGE, 1},
1152 { 7, T_SIGIL_CONTROL, 1},
1153 { 14, T_SIGIL_TEMPEST, 1},
1154 { 20, T_SIGIL_DISCHARGE, 1},
1155 { 0, 0, 0} },
1156 /* Races */
1158 /* dummy, for copypasting into new races --Amy */
1160 dummy_tech[] = { { 1, T_APPRAISAL, 1},
1161 { 1, T_PANIC_DIGGING, 1},
1162 { 1, T_PHASE_DOOR, 1},
1163 { 1, T_INVOKE_DEITY, 1},
1164 { 15, T_SECURE_IDENTIFY, 1},
1165 { 0, 0, 0} },
1168 red_tech[] = { { 1, T_APPRAISAL, 1},
1169 { 1, T_PANIC_DIGGING, 1},
1170 { 1, T_PHASE_DOOR, 1},
1171 { 1, T_INVOKE_DEITY, 1},
1172 { 15, T_SECURE_IDENTIFY, 1},
1173 { 18, T_HARDCORE_ALIENIZATION, 1},
1174 { 0, 0, 0} },
1176 sdi_tech[] = { { 1, T_APPRAISAL, 1},
1177 { 1, T_PANIC_DIGGING, 1},
1178 { 1, T_PHASE_DOOR, 1},
1179 { 1, T_INVOKE_DEITY, 1},
1180 { 1, T_BLITZ, 1},
1181 { 1, T_PUMMEL, 1},
1182 { 10, T_DASH, 1},
1183 { 12, T_G_SLAM, 1},
1184 { 15, T_SECURE_IDENTIFY, 1},
1185 { 20, T_DRAW_ENERGY, 1},
1186 { 25, T_SPIRIT_BOMB, 1},
1187 { 0, 0, 0} },
1189 she_tech[] = { { 1, T_APPRAISAL, 1},
1190 { 1, T_PANIC_DIGGING, 1},
1191 { 1, T_PHASE_DOOR, 1},
1192 { 1, T_INVOKE_DEITY, 1},
1193 { 15, T_SECURE_IDENTIFY, 1},
1194 { 20, T_SPELL_SPAM, 1},
1195 { 0, 0, 0} },
1197 mzi_tech[] = { { 1, T_APPRAISAL, 1},
1198 { 1, T_PANIC_DIGGING, 1},
1199 { 1, T_PHASE_DOOR, 1},
1200 { 1, T_INVOKE_DEITY, 1},
1201 { 10, T_SPELL_SPAM, 1},
1202 { 15, T_SECURE_IDENTIFY, 1},
1203 { 0, 0, 0} },
1205 bre_tech[] = { { 1, T_APPRAISAL, 1},
1206 { 1, T_PANIC_DIGGING, 1},
1207 { 1, T_PHASE_DOOR, 1},
1208 { 1, T_INVOKE_DEITY, 1},
1209 { 15, T_SECURE_IDENTIFY, 1},
1210 { 20, T_SPELL_SPAM, 1},
1211 { 0, 0, 0} },
1213 arg_tech[] = { { 1, T_HEAL_HANDS, 1},
1214 { 1, T_PANIC_DIGGING, 1},
1215 { 1, T_APPRAISAL, 1},
1216 { 1, T_PHASE_DOOR, 1},
1217 { 1, T_INVOKE_DEITY, 1},
1218 { 15, T_SECURE_IDENTIFY, 1},
1219 { 0, 0, 0} },
1220 coc_tech[] = { { 1, T_EGG_BOMB, 1},
1221 { 1, T_APPRAISAL, 1},
1222 { 1, T_PANIC_DIGGING, 1},
1223 { 1, T_PHASE_DOOR, 1},
1224 { 1, T_INVOKE_DEITY, 1},
1225 { 15, T_SECURE_IDENTIFY, 1},
1226 { 0, 0, 0} },
1227 hca_tech[] = { { 1, T_APPRAISAL, 1},
1228 { 1, T_PANIC_DIGGING, 1},
1229 { 1, T_PHASE_DOOR, 1},
1230 { 1, T_INVOKE_DEITY, 1},
1231 { 1, T_PREACHING, 1},
1232 { 15, T_SECURE_IDENTIFY, 1},
1233 { 20, T_HARDCORE_ALIENIZATION, 1},
1234 { 0, 0, 0} },
1235 sly_tech[] = { { 1, T_APPRAISAL, 1},
1236 { 1, T_PANIC_DIGGING, 1},
1237 { 1, T_PHASE_DOOR, 1},
1238 { 1, T_INVOKE_DEITY, 1},
1239 { 1, T_PREACHING, 1},
1240 { 1, T_HARDCORE_ALIENIZATION, 1},
1241 { 15, T_SECURE_IDENTIFY, 1},
1242 { 0, 0, 0} },
1243 azt_tech[] = { { 1, T_APPRAISAL, 1},
1244 { 1, T_PANIC_DIGGING, 1},
1245 { 1, T_PHASE_DOOR, 1},
1246 { 1, T_INVOKE_DEITY, 1},
1247 { 1, T_PREACHING, 1},
1248 { 15, T_SECURE_IDENTIFY, 1},
1249 { 0, 0, 0} },
1250 dop_tech[] = { { 1, T_LIQUID_LEAP, 1},
1251 { 1, T_APPRAISAL, 1},
1252 { 1, T_PANIC_DIGGING, 1},
1253 { 1, T_PHASE_DOOR, 1},
1254 { 1, T_INVOKE_DEITY, 1},
1255 { 15, T_SECURE_IDENTIFY, 1},
1256 { 0, 0, 0} },
1257 dwa_tech[] = { { 1, T_RAGE, 1},
1258 { 1, T_APPRAISAL, 1},
1259 { 1, T_PANIC_DIGGING, 1},
1260 { 1, T_PHASE_DOOR, 1},
1261 { 1, T_INVOKE_DEITY, 1},
1262 { 15, T_SECURE_IDENTIFY, 1},
1263 { 0, 0, 0} },
1264 cur_tech[] = { /* Put Tech here */
1265 { 1, T_BLESSING, 1},
1266 { 1, T_APPRAISAL, 1},
1267 { 1, T_PANIC_DIGGING, 1},
1268 { 1, T_PHASE_DOOR, 1},
1269 { 1, T_INVOKE_DEITY, 1},
1270 { 15, T_SECURE_IDENTIFY, 1},
1271 { 0, 0, 0} },
1272 imp_tech[] = { { 1, T_APPRAISAL, 1},
1273 { 1, T_PANIC_DIGGING, 1},
1274 { 1, T_PHASE_DOOR, 1},
1275 { 1, T_INVOKE_DEITY, 1},
1276 { 10, T_PREACHING, 1},
1277 { 15, T_SECURE_IDENTIFY, 1},
1278 { 0, 0, 0} },
1279 swi_tech[] = { { 1, T_APPRAISAL, 1},
1280 { 1, T_PANIC_DIGGING, 1},
1281 { 1, T_PHASE_DOOR, 1},
1282 { 1, T_INVOKE_DEITY, 1},
1283 { 1, T_CREATE_AMMO, 1},
1284 { 15, T_SECURE_IDENTIFY, 1},
1285 { 20, T_TINKER, 1},
1286 { 0, 0, 0} },
1287 tay_tech[] = { { 1, T_APPRAISAL, 1},
1288 { 1, T_PANIC_DIGGING, 1},
1289 { 1, T_PHASE_DOOR, 1},
1290 { 1, T_INVOKE_DEITY, 1},
1291 { 1, T_KIII, 1},
1292 { 1, T_BLITZ, 1},
1293 { 12, T_G_SLAM, 1},
1294 { 15, T_SECURE_IDENTIFY, 1},
1295 { 20, T_PUMMEL, 1},
1296 { 0, 0, 0} },
1297 spd_tech[] = { { 1, T_APPRAISAL, 1},
1298 { 1, T_PANIC_DIGGING, 1},
1299 { 1, T_PHASE_DOOR, 1},
1300 { 1, T_INVOKE_DEITY, 1},
1301 { 12, T_PREACHING, 1},
1302 { 15, T_SECURE_IDENTIFY, 1},
1303 { 0, 0, 0} },
1304 elf_tech[] = { /* Put Tech here */
1305 { 1, T_APPRAISAL, 1},
1306 { 1, T_PANIC_DIGGING, 1},
1307 { 1, T_PHASE_DOOR, 1},
1308 { 1, T_INVOKE_DEITY, 1},
1309 { 15, T_SECURE_IDENTIFY, 1},
1310 { 0, 0, 0} },
1311 kop_tech[] = { { 1, T_APPRAISAL, 1},
1312 { 1, T_PANIC_DIGGING, 1},
1313 { 1, T_PHASE_DOOR, 1},
1314 { 1, T_INVOKE_DEITY, 1},
1315 { 10, T_ON_THE_SAME_TEAM, 1},
1316 { 15, T_SECURE_IDENTIFY, 1},
1317 { 0, 0, 0} },
1318 gno_tech[] = { { 1, T_VANISH, 1},
1319 { 1, T_APPRAISAL, 1},
1320 { 1, T_PANIC_DIGGING, 1},
1321 { 1, T_PHASE_DOOR, 1},
1322 { 1, T_INVOKE_DEITY, 1},
1323 { 7, T_TINKER, 1},
1324 { 15, T_SECURE_IDENTIFY, 1},
1325 { 0, 0, 0} },
1326 anc_tech[] = { { 1, T_APPRAISAL, 1},
1327 { 1, T_PANIC_DIGGING, 1},
1328 { 1, T_PHASE_DOOR, 1},
1329 { 1, T_INVOKE_DEITY, 1},
1330 { 11, T_CONCENTRATING, 1},
1331 { 15, T_SECURE_IDENTIFY, 1},
1332 { 0, 0, 0} },
1333 dee_tech[] = { { 1, T_APPRAISAL, 1},
1334 { 1, T_PANIC_DIGGING, 1},
1335 { 1, T_PHASE_DOOR, 1},
1336 { 1, T_INVOKE_DEITY, 1},
1337 { 10, T_BLOOD_RITUAL, 1},
1338 { 15, T_SECURE_IDENTIFY, 1},
1339 { 0, 0, 0} },
1340 nea_tech[] = { { 1, T_APPRAISAL, 1},
1341 { 1, T_PANIC_DIGGING, 1},
1342 { 1, T_PHASE_DOOR, 1},
1343 { 1, T_INVOKE_DEITY, 1},
1344 { 1, T_TINKER, 1},
1345 { 15, T_SECURE_IDENTIFY, 1},
1346 { 0, 0, 0} },
1347 and_tech[] = { { 1, T_APPRAISAL, 1},
1348 { 1, T_PANIC_DIGGING, 1},
1349 { 1, T_PHASE_DOOR, 1},
1350 { 1, T_INVOKE_DEITY, 1},
1351 { 10, T_CREATE_AMMO, 1},
1352 { 15, T_SKILLOMORPH, 1},
1353 { 15, T_SECURE_IDENTIFY, 1},
1354 { 20, T_CHARGE_SABER, 1},
1355 { 0, 0, 0} },
1356 sho_tech[] = { { 1, T_APPRAISAL, 1},
1357 { 1, T_PANIC_DIGGING, 1},
1358 { 1, T_PHASE_DOOR, 1},
1359 { 1, T_INVOKE_DEITY, 1},
1360 { 8, T_ON_THE_SAME_TEAM, 1},
1361 { 15, T_SECURE_IDENTIFY, 1},
1362 { 0, 0, 0} },
1363 bga_tech[] = { { 1, T_APPRAISAL, 1},
1364 { 1, T_PANIC_DIGGING, 1},
1365 { 1, T_PHASE_DOOR, 1},
1366 { 1, T_INVOKE_DEITY, 1},
1367 { 15, T_SECURE_IDENTIFY, 1},
1368 { 15, T_CONCENTRATING, 1},
1369 { 20, T_TERRAIN_CLEANUP, 1},
1370 { 0, 0, 0} },
1371 dvp_tech[] = { { 1, T_APPRAISAL, 1},
1372 { 1, T_PANIC_DIGGING, 1},
1373 { 1, T_PHASE_DOOR, 1},
1374 { 1, T_INVOKE_DEITY, 1},
1375 { 1, T_RESET_TECHNIQUE, 1},
1376 { 1, T_SKILLOMORPH, 1},
1377 { 1, T_TERRAIN_CLEANUP, 1},
1378 { 5, T_RESEARCH, 1},
1379 { 10, T_DIAMOND_BARRIER, 1},
1380 { 15, T_SECURE_IDENTIFY, 1},
1381 { 20, T_TURN_UNDEAD, 1},
1382 { 20, T_WORLD_FALL, 1},
1383 { 0, 0, 0} },
1384 bur_tech[] = { { 1, T_APPRAISAL, 1},
1385 { 1, T_PANIC_DIGGING, 1},
1386 { 1, T_PHASE_DOOR, 1},
1387 { 1, T_INVOKE_DEITY, 1},
1388 { 10, T_WARD_FIRE, 1},
1389 { 15, T_SECURE_IDENTIFY, 1},
1390 { 20, T_SPIRIT_BOMB, 1},
1391 { 0, 0, 0} },
1392 gre_tech[] = { { 1, T_APPRAISAL, 1},
1393 { 1, T_PANIC_DIGGING, 1},
1394 { 1, T_PHASE_DOOR, 1},
1395 { 1, T_INVOKE_DEITY, 1},
1396 { 1, T_DAZZLE, 1},
1397 { 15, T_SECURE_IDENTIFY, 1},
1398 { 0, 0, 0} },
1399 sti_tech[] = { { 1, T_APPRAISAL, 1},
1400 { 1, T_PANIC_DIGGING, 1},
1401 { 1, T_PHASE_DOOR, 1},
1402 { 1, T_INVOKE_DEITY, 1},
1403 { 1, T_RECHARGE, 1},
1404 { 15, T_SECURE_IDENTIFY, 1},
1405 { 0, 0, 0} },
1406 thu_tech[] = { { 1, T_APPRAISAL, 1},
1407 { 1, T_PANIC_DIGGING, 1},
1408 { 1, T_PHASE_DOOR, 1},
1409 { 1, T_INVOKE_DEITY, 1},
1410 { 1, T_WARD_ELEC, 1},
1411 { 15, T_SECURE_IDENTIFY, 1},
1412 { 0, 0, 0} },
1413 jav_tech[] = { { 1, T_APPRAISAL, 1},
1414 { 1, T_PANIC_DIGGING, 1},
1415 { 1, T_PHASE_DOOR, 1},
1416 { 1, T_INVOKE_DEITY, 1},
1417 { 1, T_DOUBLE_THROWNAGE, 1},
1418 { 15, T_SECURE_IDENTIFY, 1},
1419 { 0, 0, 0} },
1420 wis_tech[] = { { 1, T_APPRAISAL, 1},
1421 { 1, T_PANIC_DIGGING, 1},
1422 { 1, T_PHASE_DOOR, 1},
1423 { 1, T_INVOKE_DEITY, 1},
1424 { 1, T_DOUBLE_THROWNAGE, 1},
1425 { 14, T_VANISH, 1},
1426 { 15, T_SECURE_IDENTIFY, 1},
1427 { 15, T_WONDERSPELL, 1},
1428 { 22, T_POLYFORM, 1},
1429 { 0, 0, 0} },
1430 roh_tech[] = { { 1, T_APPRAISAL, 1},
1431 { 1, T_PANIC_DIGGING, 1},
1432 { 1, T_PHASE_DOOR, 1},
1433 { 1, T_INVOKE_DEITY, 1},
1434 { 1, T_BLINK, 1},
1435 { 15, T_SECURE_IDENTIFY, 1},
1436 { 20, T_IRON_SKIN, 1},
1437 { 0, 0, 0} },
1438 sal_tech[] = { { 1, T_APPRAISAL, 1},
1439 { 1, T_PANIC_DIGGING, 1},
1440 { 1, T_PHASE_DOOR, 1},
1441 { 1, T_INVOKE_DEITY, 1},
1442 { 1, T_DAZZLE, 1},
1443 { 15, T_SECURE_IDENTIFY, 1},
1444 { 0, 0, 0} },
1445 din_tech[] = { { 1, T_APPRAISAL, 1},
1446 { 1, T_PANIC_DIGGING, 1},
1447 { 1, T_PHASE_DOOR, 1},
1448 { 1, T_INVOKE_DEITY, 1},
1449 { 1, T_BERSERK, 1},
1450 { 15, T_SECURE_IDENTIFY, 1},
1451 { 16, T_EDDY_WIND, 1},
1452 { 0, 0, 0} },
1453 faw_tech[] = { { 1, T_APPRAISAL, 1},
1454 { 1, T_PANIC_DIGGING, 1},
1455 { 1, T_PHASE_DOOR, 1},
1456 { 1, T_INVOKE_DEITY, 1},
1457 { 5, T_REINFORCE, 1},
1458 { 15, T_SECURE_IDENTIFY, 1},
1459 { 15, T_ENT_S_POTION, 1},
1460 { 16, T_SPIRITUALITY_CHECK, 1},
1461 { 27, T_LIQUID_LEAP, 1},
1462 { 0, 0, 0} },
1463 sat_tech[] = { { 1, T_APPRAISAL, 1},
1464 { 1, T_PANIC_DIGGING, 1},
1465 { 1, T_PHASE_DOOR, 1},
1466 { 1, T_INVOKE_DEITY, 1},
1467 { 1, T_REINFORCE, 1},
1468 { 1, T_ON_THE_SAME_TEAM, 1},
1469 { 13, T_HEAL_HANDS, 1},
1470 { 15, T_VANISH, 1},
1471 { 15, T_SECURE_IDENTIFY, 1},
1472 { 20, T_CALM_STEED, 1},
1473 { 20, T_DRAW_ENERGY, 1},
1474 { 21, T_LIQUID_LEAP, 1},
1475 { 22, T_SUMMON_TEAM_ANT, 1},
1476 { 24, T_TELEKINESIS, 1},
1477 { 30, T_SUMMON_PET, 1},
1478 { 0, 0, 0} },
1479 clk_tech[] = { { 1, T_FLURRY, 1},
1480 { 1, T_VANISH, 1},
1481 { 1, T_APPRAISAL, 1},
1482 { 1, T_PANIC_DIGGING, 1},
1483 { 1, T_PHASE_DOOR, 1},
1484 { 1, T_INVOKE_DEITY, 1},
1485 { 1, T_BOOZE, 1},
1486 { 2, T_SPIRITUALITY_CHECK, 1},
1487 { 4, T_DOUBLE_THROWNAGE, 1},
1488 { 5, T_TINKER, 1},
1489 { 6, T_SHIELD_BASH, 1},
1490 { 7, T_SIGIL_DISCHARGE, 1},
1491 { 8, T_IRON_SKIN, 1},
1492 { 10, T_BLINK, 1},
1493 { 11, T_POLYFORM, 1},
1494 { 12, T_DRAW_ENERGY, 1},
1495 { 13, T_CONCENTRATING, 1},
1496 { 15, T_SIGIL_TEMPEST, 1},
1497 { 15, T_SECURE_IDENTIFY, 1},
1498 { 20, T_RECHARGE, 1},
1499 { 20, T_ENT_S_POTION, 1},
1500 { 23, T_SIGIL_CONTROL, 1},
1501 { 25, T_EDDY_WIND, 1},
1502 { 28, T_DECONTAMINATE, 1},
1503 { 0, 0, 0} },
1504 ogr_tech[] = { { 1, T_FLURRY, 1},
1505 { 1, T_APPRAISAL, 1},
1506 { 1, T_PANIC_DIGGING, 1},
1507 { 1, T_PHASE_DOOR, 1},
1508 { 1, T_INVOKE_DEITY, 1},
1509 { 10, T_BERSERK, 1},
1510 { 15, T_PRIMAL_ROAR, 1},
1511 { 15, T_SECURE_IDENTIFY, 1},
1512 { 20, T_CRIT_STRIKE, 1},
1513 { 0, 0, 0} },
1514 fay_tech[] = { { 1, T_APPRAISAL, 1},
1515 { 1, T_PANIC_DIGGING, 1},
1516 { 1, T_PHASE_DOOR, 1},
1517 { 1, T_INVOKE_DEITY, 1},
1518 { 10, T_BLINK, 1},
1519 { 15, T_SECURE_IDENTIFY, 1},
1520 { 16, T_SPELL_SPAM, 1},
1521 { 20, T_DRAW_ENERGY, 1},
1522 { 0, 0, 0} },
1523 alc_tech[] = { { 1, T_RESEARCH, 1},
1524 { 1, T_TINKER, 1},
1525 { 1, T_APPRAISAL, 1},
1526 { 1, T_PANIC_DIGGING, 1},
1527 { 1, T_PHASE_DOOR, 1},
1528 { 1, T_INVOKE_DEITY, 1},
1529 { 10, T_SURGERY, 1},
1530 { 15, T_SECURE_IDENTIFY, 1},
1531 { 20, T_SUMMON_TEAM_ANT, 1},
1532 { 25, T_DRAW_ENERGY, 1},
1533 { 30, T_EGG_BOMB, 1},
1534 { 0, 0, 0} },
1535 ung_tech[] = { { 1, T_WORLD_FALL, 1},
1536 { 1, T_APPRAISAL, 1},
1537 { 1, T_PANIC_DIGGING, 1},
1538 { 1, T_PHASE_DOOR, 1},
1539 { 1, T_INVOKE_DEITY, 1},
1540 { 1, T_POKE_BALL, 1},
1541 { 1, T_RESEARCH, 1},
1542 { 1, T_PRACTICE, 1},
1543 { 1, T_CALM_STEED, 1},
1544 { 1, T_TURN_UNDEAD, 1},
1545 { 1, T_BLESSING, 1},
1546 { 1, T_DRAW_BLOOD, 1},
1547 { 1, T_SURGERY, 1},
1548 { 1, T_DOUBLE_THROWNAGE, 1},
1549 { 1, T_EDDY_WIND, 1},
1550 { 15, T_SECURE_IDENTIFY, 1},
1551 { 16, T_SPIRITUALITY_CHECK, 1},
1552 { 24, T_POLYFORM, 1},
1553 { 0, 0, 0} },
1554 mou_tech[] = { { 1, T_APPRAISAL, 1},
1555 { 1, T_PANIC_DIGGING, 1},
1556 { 1, T_PHASE_DOOR, 1},
1557 { 1, T_INVOKE_DEITY, 1},
1558 { 10, T_POLYFORM, 1},
1559 { 15, T_SECURE_IDENTIFY, 1},
1560 { 0, 0, 0} },
1561 oct_tech[] = { { 1, T_APPRAISAL, 1},
1562 { 1, T_PANIC_DIGGING, 1},
1563 { 1, T_PHASE_DOOR, 1},
1564 { 1, T_INVOKE_DEITY, 1},
1565 { 1, T_LIQUID_LEAP, 1},
1566 { 1, T_DAZZLE, 1},
1567 { 15, T_SECURE_IDENTIFY, 1},
1568 { 20, T_ENT_S_POTION, 1},
1569 { 0, 0, 0} },
1570 ink_tech[] = { { 1, T_APPRAISAL, 1},
1571 { 1, T_PANIC_DIGGING, 1},
1572 { 1, T_PHASE_DOOR, 1},
1573 { 1, T_INVOKE_DEITY, 1},
1574 { 5, T_ENT_S_POTION, 1},
1575 { 10, T_RESEARCH, 1},
1576 { 12, T_ON_THE_SAME_TEAM, 1},
1577 { 15, T_SECURE_IDENTIFY, 1},
1578 { 15, T_SPIRITUALITY_CHECK, 1},
1579 { 20, T_HEAL_HANDS, 1},
1580 { 30, T_SUMMON_PET, 1},
1581 { 0, 0, 0} },
1582 hob_tech[] = { { 1, T_BLINK, 1},
1583 { 1, T_APPRAISAL, 1},
1584 { 1, T_PANIC_DIGGING, 1},
1585 { 1, T_LUCKY_GAMBLE, 1},
1586 { 1, T_PHASE_DOOR, 1},
1587 { 1, T_INVOKE_DEITY, 1},
1588 { 15, T_SECURE_IDENTIFY, 1},
1589 { 0, 0, 0} },
1591 fen_tech[] = { { 1, T_EVISCERATE, 1},
1592 { 1, T_APPRAISAL, 1},
1593 { 1, T_PANIC_DIGGING, 1},
1594 { 1, T_DISARM, 1},
1595 { 1, T_PHASE_DOOR, 1},
1596 { 1, T_INVOKE_DEITY, 1},
1597 { 10, T_VANISH, 1},
1598 { 15, T_SECURE_IDENTIFY, 1},
1599 { 20, T_SUMMON_PET, 1},
1600 { 0, 0, 0} },
1602 ent_tech[] = { { 1, T_ENT_S_POTION, 1},
1603 { 1, T_APPRAISAL, 1},
1604 { 1, T_PANIC_DIGGING, 1},
1605 { 1, T_PHASE_DOOR, 1},
1606 { 1, T_INVOKE_DEITY, 1},
1607 { 15, T_SECURE_IDENTIFY, 1},
1608 { 0, 0, 0} },
1610 alb_tech[] = { { 1, T_DAZZLE, 1},
1611 { 1, T_PRACTICE, 1},
1612 { 1, T_APPRAISAL, 1},
1613 { 1, T_PANIC_DIGGING, 1},
1614 { 1, T_PHASE_DOOR, 1},
1615 { 1, T_INVOKE_DEITY, 1},
1616 { 1, T_BLOOD_RITUAL, 1},
1617 { 5, T_CHARGE_SABER, 1},
1618 { 10, T_CRIT_STRIKE, 1},
1619 { 15, T_TELEKINESIS, 1},
1620 { 15, T_SECURE_IDENTIFY, 1},
1621 { 20, T_BLINK, 1},
1622 { 25, T_JEDI_JUMP, 1},
1623 { 0, 0, 0} },
1625 ret_tech[] = { { 1, T_REINFORCE, 1},
1626 { 1, T_APPRAISAL, 1},
1627 { 1, T_PANIC_DIGGING, 1},
1628 { 1, T_PHASE_DOOR, 1},
1629 { 1, T_INVOKE_DEITY, 1},
1630 { 5, T_RESEARCH, 1},
1631 { 10, T_ZAP_EM, 1},
1632 { 10, T_CONCENTRATING, 1},
1633 { 15, T_SECURE_IDENTIFY, 1},
1634 { 20, T_POWER_SURGE, 1},
1635 { 25, T_WONDERSPELL, 1},
1636 { 30, T_TELEKINESIS, 1},
1637 { 0, 0, 0} },
1639 nor_tech[] = { { 1, T_BERSERK, 1},
1640 { 1, T_APPRAISAL, 1},
1641 { 1, T_PANIC_DIGGING, 1},
1642 { 1, T_PHASE_DOOR, 1},
1643 { 1, T_INVOKE_DEITY, 1},
1644 { 8, T_CONCENTRATING, 1},
1645 { 10, T_RAGE, 1},
1646 { 15, T_SECURE_IDENTIFY, 1},
1647 { 0, 0, 0} },
1649 lic_tech[] = { { 1, T_BLOOD_RITUAL, 1},
1650 { 1, T_APPRAISAL, 1},
1651 { 1, T_PANIC_DIGGING, 1},
1652 { 1, T_PHASE_DOOR, 1},
1653 { 1, T_INVOKE_DEITY, 1},
1654 { 15, T_SECURE_IDENTIFY, 1},
1655 { 0, 0, 0} },
1657 ins_tech[] = { { 1, T_SUMMON_TEAM_ANT, 1},
1658 { 1, T_APPRAISAL, 1},
1659 { 1, T_PANIC_DIGGING, 1},
1660 { 1, T_PHASE_DOOR, 1},
1661 { 1, T_INVOKE_DEITY, 1},
1662 { 12, T_DOUBLE_THROWNAGE, 1},
1663 { 15, T_SECURE_IDENTIFY, 1},
1664 { 0, 0, 0} },
1665 kla_tech[] = { { 1, T_SUMMON_TEAM_ANT, 1},
1666 { 1, T_APPRAISAL, 1},
1667 { 1, T_PANIC_DIGGING, 1},
1668 { 1, T_PHASE_DOOR, 1},
1669 { 1, T_INVOKE_DEITY, 1},
1670 { 15, T_SECURE_IDENTIFY, 1},
1671 { 15, T_CRIT_STRIKE, 1},
1672 { 20, T_TELEKINESIS, 1},
1673 { 25, T_SPIRIT_BOMB, 1},
1674 { 0, 0, 0} },
1675 kob_tech[] = { { 1, T_APPRAISAL, 1},
1676 { 1, T_PANIC_DIGGING, 1},
1677 { 1, T_PHASE_DOOR, 1},
1678 { 1, T_INVOKE_DEITY, 1},
1679 { 3, T_DOUBLE_THROWNAGE, 1},
1680 { 10, T_TINKER, 1},
1681 { 15, T_SECURE_IDENTIFY, 1},
1682 { 0, 0, 0} },
1683 kha_tech[] = { { 1, T_EVISCERATE, 1},
1684 { 1, T_APPRAISAL, 1},
1685 { 1, T_PANIC_DIGGING, 1},
1686 { 1, T_PHASE_DOOR, 1},
1687 { 1, T_INVOKE_DEITY, 1},
1688 { 15, T_SECURE_IDENTIFY, 1},
1689 { 0, 0, 0} },
1690 gel_tech[] = { { 1, T_LIQUID_LEAP, 1},
1691 { 1, T_APPRAISAL, 1},
1692 { 1, T_PANIC_DIGGING, 1},
1693 { 1, T_PHASE_DOOR, 1},
1694 { 1, T_INVOKE_DEITY, 1},
1695 { 15, T_SECURE_IDENTIFY, 1},
1696 { 0, 0, 0} },
1697 ton_tech[] = { { 1, T_DASH, 1},
1698 { 1, T_APPRAISAL, 1},
1699 { 1, T_PANIC_DIGGING, 1},
1700 { 1, T_PHASE_DOOR, 1},
1701 { 1, T_INVOKE_DEITY, 1},
1702 { 6, T_SHIELD_BASH, 1},
1703 { 10, T_IRON_SKIN, 1},
1704 { 10, T_ON_THE_SAME_TEAM, 1},
1705 { 15, T_SECURE_IDENTIFY, 1},
1706 { 20, T_POKE_BALL, 1},
1707 { 0, 0, 0} },
1708 hmo_tech[] = { { 1, T_BERSERK, 1},
1709 { 1, T_APPRAISAL, 1},
1710 { 1, T_PANIC_DIGGING, 1},
1711 { 1, T_PHASE_DOOR, 1},
1712 { 1, T_INVOKE_DEITY, 1},
1713 { 15, T_SECURE_IDENTIFY, 1},
1714 { 0, 0, 0} },
1715 zru_tech[] = { { 1, T_BERSERK, 1},
1716 { 1, T_PUMMEL, 1},
1717 { 1, T_APPRAISAL, 1},
1718 { 1, T_PANIC_DIGGING, 1},
1719 { 1, T_PHASE_DOOR, 1},
1720 { 1, T_INVOKE_DEITY, 1},
1721 { 10, T_PRIMAL_ROAR, 1},
1722 { 15, T_SECURE_IDENTIFY, 1},
1723 { 20, T_RAGE, 1},
1724 { 0, 0, 0} },
1725 lyc_tech[] = { { 1, T_EVISCERATE, 1},
1726 { 1, T_APPRAISAL, 1},
1727 { 1, T_PANIC_DIGGING, 1},
1728 { 1, T_PHASE_DOOR, 1},
1729 { 1, T_INVOKE_DEITY, 1},
1730 { 10, T_BERSERK, 1},
1731 { 15, T_SECURE_IDENTIFY, 1},
1732 { 0, 0, 0} },
1733 vam_tech[] = { { 1, T_DAZZLE, 1},
1734 { 1, T_APPRAISAL, 1},
1735 { 1, T_PANIC_DIGGING, 1},
1736 { 1, T_PHASE_DOOR, 1},
1737 { 1, T_INVOKE_DEITY, 1},
1738 { 1, T_DRAW_BLOOD, 1},
1739 { 15, T_SECURE_IDENTIFY, 1},
1740 { 0, 0, 0} },
1741 lev_tech[] = { { 1, T_DAZZLE, 1},
1742 { 1, T_VANISH, 1},
1743 { 1, T_TELEKINESIS, 1},
1744 { 1, T_APPRAISAL, 1},
1745 { 1, T_PANIC_DIGGING, 1},
1746 { 1, T_PHASE_DOOR, 1},
1747 { 1, T_INVOKE_DEITY, 1},
1748 { 4, T_SPIRITUALITY_CHECK, 1},
1749 { 5, T_ATTIRE_CHARM, 1},
1750 { 8, T_ENT_S_POTION, 1},
1751 { 10, T_BLINK, 1},
1752 { 13, T_RECHARGE, 1},
1753 { 15, T_BLESSING, 1},
1754 { 15, T_SECURE_IDENTIFY, 1},
1755 { 18, T_POLYFORM, 1},
1756 { 20, T_LIQUID_LEAP, 1},
1757 { 22, T_LUCKY_GAMBLE, 1},
1758 { 25, T_DRAW_ENERGY, 1},
1759 { 30, T_SUMMON_TEAM_ANT, 1},
1760 { 0, 0, 0} },
1761 ang_tech[] = { { 1, T_DAZZLE, 1},
1762 { 1, T_APPRAISAL, 1},
1763 { 1, T_PANIC_DIGGING, 1},
1764 { 1, T_PHASE_DOOR, 1},
1765 { 1, T_TURN_UNDEAD, 1},
1766 { 1, T_INVOKE_DEITY, 1},
1767 { 15, T_SECURE_IDENTIFY, 1},
1768 { 0, 0, 0} },
1769 hrb_tech[] = { { 1, T_SURGERY, 1},
1770 { 1, T_APPRAISAL, 1},
1771 { 1, T_PANIC_DIGGING, 1},
1772 { 1, T_PHASE_DOOR, 1},
1773 { 1, T_INVOKE_DEITY, 1},
1774 { 15, T_SECURE_IDENTIFY, 1},
1775 { 20, T_REVIVE, 1},
1776 { 0, 0, 0} },
1777 mum_tech[] = { { 1, T_RAISE_ZOMBIES, 1},
1778 { 1, T_APPRAISAL, 1},
1779 { 1, T_PANIC_DIGGING, 1},
1780 { 1, T_PHASE_DOOR, 1},
1781 { 1, T_INVOKE_DEITY, 1},
1782 { 15, T_SECURE_IDENTIFY, 1},
1783 { 0, 0, 0} },
1784 vor_tech[] = { { 1, T_APPRAISAL, 1},
1785 { 1, T_PANIC_DIGGING, 1},
1786 { 1, T_PHASE_DOOR, 1},
1787 { 1, T_INVOKE_DEITY, 1},
1788 { 1, T_VANISH, 1},
1789 { 5, T_SPIRITUALITY_CHECK, 1},
1790 { 10, T_TELEKINESIS, 1},
1791 { 15, T_EGG_BOMB, 1},
1792 { 15, T_SECURE_IDENTIFY, 1},
1793 { 20, T_WORLD_FALL, 1},
1794 { 25, T_RECHARGE, 1},
1795 { 0, 0, 0} },
1796 cor_tech[] = { { 1, T_APPRAISAL, 1},
1797 { 1, T_PANIC_DIGGING, 1},
1798 { 1, T_PHASE_DOOR, 1},
1799 { 1, T_INVOKE_DEITY, 1},
1800 { 1, T_VANISH, 1},
1801 { 1, T_EGG_BOMB, 1},
1802 { 5, T_SPIRITUALITY_CHECK, 1},
1803 { 10, T_TELEKINESIS, 1},
1804 { 15, T_SECURE_IDENTIFY, 1},
1805 { 20, T_WORLD_FALL, 1},
1806 { 25, T_RECHARGE, 1},
1807 { 0, 0, 0} },
1808 bor_tech[] = { { 3, T_JEDI_JUMP, 1},
1809 { 10, T_CHARGE_SABER, 1},
1810 { 15, T_SECURE_IDENTIFY, 1},
1811 { 20, T_TELEKINESIS, 1},
1812 { 1, T_PHASE_DOOR, 1},
1813 { 1, T_INVOKE_DEITY, 1},
1814 { 1, T_APPRAISAL, 1},
1815 { 1, T_PANIC_DIGGING, 1},
1816 { 0, 0, 0,} },
1818 woo_tech[] = { { 12, T_JEDI_JUMP, 1},
1819 { 20, T_CHARGE_SABER, 1},
1820 { 15, T_SECURE_IDENTIFY, 1},
1821 { 1, T_PHASE_DOOR, 1},
1822 { 1, T_INVOKE_DEITY, 1},
1823 { 1, T_APPRAISAL, 1},
1824 { 1, T_PANIC_DIGGING, 1},
1825 { 0, 0, 0,} },
1827 bat_tech[] = { { 1, T_APPRAISAL, 1},
1828 { 1, T_PANIC_DIGGING, 1},
1829 { 1, T_PHASE_DOOR, 1},
1830 { 1, T_INVOKE_DEITY, 1},
1831 { 1, T_PRACTICE, 1},
1832 { 1, T_ON_THE_SAME_TEAM, 1},
1833 { 1, T_DRAW_BLOOD, 1},
1834 { 15, T_SECURE_IDENTIFY, 1},
1835 { 20, T_POLYFORM, 1},
1836 { 0, 0, 0} },
1837 cen_tech[] = { { 1, T_INVOKE_DEITY, 1},
1838 { 1, T_APPRAISAL, 1},
1839 { 1, T_PANIC_DIGGING, 1},
1840 { 1, T_PHASE_DOOR, 1},
1841 { 7, T_SHIELD_BASH, 1},
1842 { 15, T_SECURE_IDENTIFY, 1},
1843 { 0, 0, 0} },
1844 rod_tech[] = { { 1, T_APPRAISAL, 1},
1845 { 1, T_PANIC_DIGGING, 1},
1846 { 1, T_PHASE_DOOR, 1},
1847 { 1, T_INVOKE_DEITY, 1},
1848 { 5, T_CARD_TRICK, 1},
1849 { 10, T_DOUBLE_TROUBLE, 1},
1850 { 15, T_SECURE_IDENTIFY, 1},
1851 { 20, T_WONDERSPELL, 1},
1852 { 25, T_SPELL_SPAM, 1},
1853 { 30, T_RESET_TECHNIQUE, 1},
1854 { 0, 0, 0} },
1856 man_tech[] = { { 1, T_APPRAISAL, 1},
1857 { 1, T_PANIC_DIGGING, 1},
1858 { 1, T_PHASE_DOOR, 1},
1859 { 1, T_INVOKE_DEITY, 1},
1860 { 10, T_SKILLOMORPH, 1},
1861 { 0, 0, 0} },
1863 jel_tech[] = { { 1, T_DRAW_ENERGY, 1},
1864 { 1, T_LIQUID_LEAP, 1},
1865 { 1, T_PHASE_DOOR, 1},
1866 { 1, T_INVOKE_DEITY, 1},
1867 { 1, T_APPRAISAL, 1},
1868 { 1, T_PANIC_DIGGING, 1},
1869 { 1, T_SPIRITUALITY_CHECK, 1},
1870 { 12, T_RECHARGE, 1},
1871 { 15, T_SECURE_IDENTIFY, 1},
1872 { 22, T_POLYFORM, 1},
1873 { 0, 0, 0} },
1875 dry_tech[] = { { 1, T_IRON_SKIN, 1},
1876 { 1, T_INVOKE_DEITY, 1},
1877 { 1, T_APPRAISAL, 1},
1878 { 1, T_PANIC_DIGGING, 1},
1879 { 1, T_PHASE_DOOR, 1},
1880 { 15, T_SECURE_IDENTIFY, 1},
1881 { 0, 0, 0} },
1883 tur_tech[] = { { 1, T_PUMMEL, 1},
1884 { 1, T_APPRAISAL, 1},
1885 { 1, T_PANIC_DIGGING, 1},
1886 { 1, T_PHASE_DOOR, 1},
1887 { 1, T_INVOKE_DEITY, 1},
1888 { 1, T_DASH, 1},
1889 { 1, T_BLITZ, 1},
1890 { 2, T_CHI_STRIKE, 1},
1891 { 4, T_CHI_HEALING, 1},
1892 { 5, T_DOUBLE_THROWNAGE, 1},
1893 { 6, T_E_FIST, 1},
1894 { 8, T_DRAW_ENERGY, 1},
1895 { 10, T_G_SLAM, 1},
1896 { 11, T_WARD_FIRE, 1},
1897 { 13, T_WARD_COLD, 1},
1898 { 15, T_WARD_ELEC, 1},
1899 { 15, T_SECURE_IDENTIFY, 1},
1900 { 17, T_SPIRIT_BOMB, 1},
1901 { 20, T_POWER_SURGE, 1},
1902 { 25, T_EDDY_WIND, 1},
1903 { 0, 0, 0} },
1905 gri_tech[] = { { 1, T_APPRAISAL, 1},
1906 { 1, T_PANIC_DIGGING, 1},
1907 { 1, T_PHASE_DOOR, 1},
1908 { 1, T_INVOKE_DEITY, 1},
1909 { 10, T_RECHARGE, 1},
1910 { 15, T_SECURE_IDENTIFY, 1},
1911 { 0, 0, 0} },
1913 tme_tech[] = { { 1, T_APPRAISAL, 1},
1914 { 1, T_PANIC_DIGGING, 1},
1915 { 1, T_PHASE_DOOR, 1},
1916 { 1, T_INVOKE_DEITY, 1},
1917 { 1, T_CREATE_AMMO, 1},
1918 { 12, T_HARDCORE_ALIENIZATION, 1},
1919 { 15, T_SECURE_IDENTIFY, 1},
1920 { 0, 0, 0} },
1922 inc_tech[] = { { 1, T_APPRAISAL, 1},
1923 { 1, T_PANIC_DIGGING, 1},
1924 { 1, T_PHASE_DOOR, 1},
1925 { 1, T_INVOKE_DEITY, 1},
1926 { 15, T_SECURE_IDENTIFY, 1},
1927 { 20, T_RECHARGE, 1},
1928 { 0, 0, 0} },
1930 mim_tech[] = { { 1, T_APPRAISAL, 1},
1931 { 1, T_PANIC_DIGGING, 1},
1932 { 1, T_PHASE_DOOR, 1},
1933 { 1, T_INVOKE_DEITY, 1},
1934 { 10, T_POLYFORM, 1},
1935 { 15, T_SECURE_IDENTIFY, 1},
1936 { 0, 0, 0} },
1938 mis_tech[] = { { 1, T_APPRAISAL, 1},
1939 { 1, T_PANIC_DIGGING, 1},
1940 { 1, T_PHASE_DOOR, 1},
1941 { 1, T_INVOKE_DEITY, 1},
1942 { 1, T_RECHARGE, 1},
1943 { 12, T_TERRAIN_CLEANUP, 1},
1944 { 15, T_SECURE_IDENTIFY, 1},
1945 { 0, 0, 0} },
1947 nav_tech[] = { { 1, T_APPRAISAL, 1},
1948 { 1, T_PANIC_DIGGING, 1},
1949 { 1, T_PHASE_DOOR, 1},
1950 { 1, T_INVOKE_DEITY, 1},
1951 { 15, T_SECURE_IDENTIFY, 1},
1952 { 18, T_CONCENTRATING, 1},
1953 { 0, 0, 0} },
1955 spi_tech[] = { { 1, T_APPRAISAL, 1},
1956 { 1, T_PANIC_DIGGING, 1},
1957 { 1, T_PHASE_DOOR, 1},
1958 { 1, T_INVOKE_DEITY, 1},
1959 { 15, T_SECURE_IDENTIFY, 1},
1960 { 15, T_EDDY_WIND, 1},
1961 { 0, 0, 0} },
1963 ven_tech[] = { { 1, T_APPRAISAL, 1},
1964 { 1, T_PANIC_DIGGING, 1},
1965 { 1, T_PHASE_DOOR, 1},
1966 { 1, T_INVOKE_DEITY, 1},
1967 { 1, T_LUCKY_GAMBLE, 1},
1968 { 15, T_SECURE_IDENTIFY, 1},
1969 { 0, 0, 0} },
1971 spr_tech[] = { { 1, T_APPRAISAL, 1},
1972 { 1, T_PANIC_DIGGING, 1},
1973 { 1, T_PHASE_DOOR, 1},
1974 { 1, T_INVOKE_DEITY, 1},
1975 { 6, T_IRON_SKIN, 1},
1976 { 15, T_SECURE_IDENTIFY, 1},
1977 { 0, 0, 0} },
1979 trf_tech[] = { { 1, T_APPRAISAL, 1},
1980 { 1, T_PANIC_DIGGING, 1},
1981 { 1, T_PHASE_DOOR, 1},
1982 { 1, T_INVOKE_DEITY, 1},
1983 { 5, T_POLYFORM, 1},
1984 { 15, T_SECURE_IDENTIFY, 1},
1985 { 0, 0, 0} },
1987 out_tech[] = { { 1, T_APPRAISAL, 1},
1988 { 1, T_PANIC_DIGGING, 1},
1989 { 1, T_PHASE_DOOR, 1},
1990 { 1, T_INVOKE_DEITY, 1},
1991 { 6, T_EVISCERATE, 1},
1992 { 10, T_ZAP_EM, 1},
1993 { 12, T_CRIT_STRIKE, 1},
1994 { 15, T_DASH, 1},
1995 { 15, T_SECURE_IDENTIFY, 1},
1996 { 18, T_TELEKINESIS, 1},
1997 { 20, T_RESEARCH, 1},
1998 { 20, T_REINFORCE, 1},
1999 { 30, T_SKILLOMORPH, 1},
2000 { 0, 0, 0} },
2002 trp_tech[] = { { 1, T_APPRAISAL, 1},
2003 { 1, T_PANIC_DIGGING, 1},
2004 { 1, T_PHASE_DOOR, 1},
2005 { 1, T_INVOKE_DEITY, 1},
2006 { 11, T_RECHARGE, 1},
2007 { 15, T_SECURE_IDENTIFY, 1},
2008 { 28, T_SPIRITUALITY_CHECK, 1},
2009 { 0, 0, 0} },
2011 ira_tech[] = { { 1, T_APPRAISAL, 1},
2012 { 1, T_PANIC_DIGGING, 1},
2013 { 1, T_PHASE_DOOR, 1},
2014 { 1, T_INVOKE_DEITY, 1},
2015 { 4, T_HARDCORE_ALIENIZATION, 1},
2016 { 5, T_ROCK_TO_POISON, 1},
2017 { 12, T_CREATE_AMMO, 1},
2018 { 15, T_SECURE_IDENTIFY, 1},
2019 { 0, 0, 0} },
2021 una_tech[] = { { 1, T_APPRAISAL, 1},
2022 { 1, T_PANIC_DIGGING, 1},
2023 { 1, T_PHASE_DOOR, 1},
2024 { 1, T_INVOKE_DEITY, 1},
2025 { 3, T_SHIELD_BASH, 1},
2026 { 6, T_IRON_SKIN, 1},
2027 { 8, T_DOUBLE_THROWNAGE, 1},
2028 { 10, T_CONCENTRATING, 1},
2029 { 12, T_SPIRITUALITY_CHECK, 1},
2030 { 15, T_SECURE_IDENTIFY, 1},
2031 { 18, T_POLYFORM, 1},
2032 { 21, T_EDDY_WIND, 1},
2033 { 24, T_RECHARGE, 1},
2034 { 27, T_SUMMON_PET, 1},
2035 { 0, 0, 0} },
2037 uni_tech[] = { { 1, T_APPRAISAL, 1},
2038 { 1, T_PANIC_DIGGING, 1},
2039 { 1, T_PHASE_DOOR, 1},
2040 { 1, T_INVOKE_DEITY, 1},
2041 { 1, T_LUCKY_GAMBLE, 1},
2042 { 10, T_SUMMON_PET, 1},
2043 { 15, T_SECURE_IDENTIFY, 1},
2044 { 0, 0, 0} },
2046 unm_tech[] = { { 1, T_APPRAISAL, 1},
2047 { 1, T_PANIC_DIGGING, 1},
2048 { 1, T_PHASE_DOOR, 1},
2049 { 1, T_INVOKE_DEITY, 1},
2050 { 10, T_RECHARGE, 1},
2051 { 15, T_SECURE_IDENTIFY, 1},
2052 { 0, 0, 0} },
2054 vee_tech[] = { { 1, T_APPRAISAL, 1},
2055 { 1, T_PANIC_DIGGING, 1},
2056 { 1, T_PHASE_DOOR, 1},
2057 { 1, T_INVOKE_DEITY, 1},
2058 { 1, T_SPIRITUALITY_CHECK, 1},
2059 { 15, T_SECURE_IDENTIFY, 1},
2060 { 17, T_SPELL_SPAM, 1},
2061 { 0, 0, 0} },
2063 wrp_tech[] = { { 1, T_APPRAISAL, 1},
2064 { 1, T_PANIC_DIGGING, 1},
2065 { 1, T_PHASE_DOOR, 1},
2066 { 1, T_INVOKE_DEITY, 1},
2067 { 1, T_POLYFORM, 1},
2068 { 15, T_SECURE_IDENTIFY, 1},
2069 { 0, 0, 0} },
2071 egy_tech[] = { { 1, T_APPRAISAL, 1},
2072 { 1, T_PANIC_DIGGING, 1},
2073 { 1, T_PHASE_DOOR, 1},
2074 { 1, T_INVOKE_DEITY, 1},
2075 { 1, T_ZAP_EM, 1},
2076 { 1, T_PREACHING, 1},
2077 { 15, T_SECURE_IDENTIFY, 1},
2078 { 25, T_HARDCORE_ALIENIZATION, 1},
2079 { 0, 0, 0} },
2081 nem_tech[] = { { 1, T_APPRAISAL, 1},
2082 { 1, T_PANIC_DIGGING, 1},
2083 { 1, T_PHASE_DOOR, 1},
2084 { 1, T_INVOKE_DEITY, 1},
2085 { 15, T_SECURE_IDENTIFY, 1},
2086 { 20, T_WORLD_FALL, 1},
2087 { 0, 0, 0} },
2089 cup_tech[] = { { 1, T_APPRAISAL, 1},
2090 { 1, T_PANIC_DIGGING, 1},
2091 { 1, T_PHASE_DOOR, 1},
2092 { 1, T_INVOKE_DEITY, 1},
2093 { 10, T_ATTIRE_CHARM, 1},
2094 { 15, T_SECURE_IDENTIFY, 1},
2095 { 0, 0, 0} },
2097 urg_tech[] = { { 1, T_APPRAISAL, 1},
2098 { 1, T_PANIC_DIGGING, 1},
2099 { 1, T_PHASE_DOOR, 1},
2100 { 1, T_INVOKE_DEITY, 1},
2101 { 1, T_BERSERK, 1},
2102 { 10, T_PRIMAL_ROAR, 1},
2103 { 15, T_SECURE_IDENTIFY, 1},
2104 { 0, 0, 0} },
2106 thr_tech[] = { { 1, T_APPRAISAL, 1},
2107 { 1, T_PANIC_DIGGING, 1},
2108 { 1, T_PHASE_DOOR, 1},
2109 { 1, T_INVOKE_DEITY, 1},
2110 { 15, T_SECURE_IDENTIFY, 1},
2111 { 22, T_VANISH, 1},
2112 { 25, T_BOOZE, 1},
2113 { 0, 0, 0} },
2115 zau_tech[] = { { 1, T_APPRAISAL, 1},
2116 { 1, T_PANIC_DIGGING, 1},
2117 { 1, T_PHASE_DOOR, 1},
2118 { 1, T_INVOKE_DEITY, 1},
2119 { 12, T_EVISCERATE, 1},
2120 { 15, T_SECURE_IDENTIFY, 1},
2121 { 16, T_IRON_SKIN, 1},
2122 { 20, T_CRIT_STRIKE, 1},
2123 { 0, 0, 0} },
2125 wyl_tech[] = { { 1, T_APPRAISAL, 1},
2126 { 1, T_PANIC_DIGGING, 1},
2127 { 1, T_PHASE_DOOR, 1},
2128 { 1, T_INVOKE_DEITY, 1},
2129 { 6, T_SPELL_SPAM, 1},
2130 { 15, T_SECURE_IDENTIFY, 1},
2131 { 25, T_REINFORCE, 1},
2132 { 0, 0, 0} },
2134 bac_tech[] = { { 1, T_APPRAISAL, 1},
2135 { 1, T_PANIC_DIGGING, 1},
2136 { 1, T_PHASE_DOOR, 1},
2137 { 1, T_INVOKE_DEITY, 1},
2138 { 15, T_SECURE_IDENTIFY, 1},
2139 { 15, T_WORLD_FALL, 1},
2140 { 18, T_PERMAMORPH, 1},
2141 { 20, T_POKE_BALL, 1},
2142 { 25, T_DECONTAMINATE, 1},
2143 { 0, 0, 0} },
2145 cer_tech[] = { { 1, T_APPRAISAL, 1},
2146 { 1, T_PANIC_DIGGING, 1},
2147 { 1, T_PHASE_DOOR, 1},
2148 { 1, T_INVOKE_DEITY, 1},
2149 { 5, T_PRIMAL_ROAR, 1},
2150 { 15, T_SECURE_IDENTIFY, 1},
2151 { 0, 0, 0} },
2153 kst_tech[] = { { 1, T_APPRAISAL, 1},
2154 { 1, T_PANIC_DIGGING, 1},
2155 { 1, T_PHASE_DOOR, 1},
2156 { 1, T_INVOKE_DEITY, 1},
2157 { 6, T_FLURRY, 1},
2158 { 15, T_SECURE_IDENTIFY, 1},
2159 { 16, T_TERRAIN_CLEANUP, 1},
2160 { 22, T_DIAMOND_BARRIER, 1},
2161 { 0, 0, 0} },
2163 vie_tech[] = { { 1, T_APPRAISAL, 1},
2164 { 1, T_PANIC_DIGGING, 1},
2165 { 1, T_PHASE_DOOR, 1},
2166 { 1, T_INVOKE_DEITY, 1},
2167 { 15, T_CREATE_AMMO, 1},
2168 { 15, T_SECURE_IDENTIFY, 1},
2169 { 20, T_SPIRIT_BOMB, 1},
2170 { 0, 0, 0} },
2172 mog_tech[] = { { 1, T_APPRAISAL, 1},
2173 { 1, T_PANIC_DIGGING, 1},
2174 { 1, T_PHASE_DOOR, 1},
2175 { 1, T_INVOKE_DEITY, 1},
2176 { 1, T_BERSERK, 1},
2177 { 5, T_DOUBLE_THROWNAGE, 1},
2178 { 10, T_FLURRY, 1},
2179 { 15, T_SECURE_IDENTIFY, 1},
2180 { 20, T_EDDY_WIND, 1},
2181 { 25, T_BLOOD_RITUAL, 1},
2182 { 0, 0, 0} },
2184 per_tech[] = { { 1, T_APPRAISAL, 1},
2185 { 1, T_PANIC_DIGGING, 1},
2186 { 1, T_PHASE_DOOR, 1},
2187 { 1, T_INVOKE_DEITY, 1},
2188 { 1, T_CALM_STEED, 1},
2189 { 1, T_HARDCORE_ALIENIZATION, 1},
2190 { 5, T_WARD_FIRE, 1},
2191 { 15, T_SECURE_IDENTIFY, 1},
2192 { 20, T_SPIRITUALITY_CHECK, 1},
2193 { 25, T_PREACHING, 1},
2194 { 0, 0, 0} },
2196 bov_tech[] = { { 1, T_APPRAISAL, 1},
2197 { 1, T_PANIC_DIGGING, 1},
2198 { 1, T_PHASE_DOOR, 1},
2199 { 1, T_INVOKE_DEITY, 1},
2200 { 14, T_SUMMON_PET, 1},
2201 { 15, T_SECURE_IDENTIFY, 1},
2202 { 28, T_BLOOD_RITUAL, 1},
2203 { 0, 0, 0} },
2205 han_tech[] = { { 1, T_APPRAISAL, 1},
2206 { 1, T_PANIC_DIGGING, 1},
2207 { 1, T_PHASE_DOOR, 1},
2208 { 1, T_INVOKE_DEITY, 1},
2209 { 8, T_E_FIST, 1},
2210 { 10, T_EVISCERATE, 1},
2211 { 15, T_SECURE_IDENTIFY, 1},
2212 { 15, T_TELEKINESIS, 1},
2213 { 20, T_HEAL_HANDS, 1},
2214 { 25, T_CALM_STEED, 1},
2215 { 0, 0, 0} },
2217 mac_tech[] = { { 1, T_APPRAISAL, 1},
2218 { 1, T_PANIC_DIGGING, 1},
2219 { 1, T_PHASE_DOOR, 1},
2220 { 1, T_INVOKE_DEITY, 1},
2221 { 12, T_CALM_STEED, 1},
2222 { 15, T_SECURE_IDENTIFY, 1},
2223 { 0, 0, 0} },
2225 crt_tech[] = { { 1, T_APPRAISAL, 1},
2226 { 1, T_PANIC_DIGGING, 1},
2227 { 1, T_PHASE_DOOR, 1},
2228 { 1, T_INVOKE_DEITY, 1},
2229 { 1, T_CALM_STEED, 1},
2230 { 15, T_SECURE_IDENTIFY, 1},
2231 { 20, T_TERRAIN_CLEANUP, 1},
2232 { 24, T_HARDCORE_ALIENIZATION, 1},
2233 { 0, 0, 0} },
2235 rus_tech[] = { { 1, T_APPRAISAL, 1},
2236 { 1, T_PANIC_DIGGING, 1},
2237 { 1, T_PHASE_DOOR, 1},
2238 { 1, T_INVOKE_DEITY, 1},
2239 { 10, T_SKILLOMORPH, 1},
2240 { 10, T_CONCENTRATING, 1},
2241 { 15, T_SECURE_IDENTIFY, 1},
2242 { 18, T_BOOZE, 1},
2243 { 0, 0, 0} },
2245 pic_tech[] = { { 1, T_APPRAISAL, 1},
2246 { 1, T_PANIC_DIGGING, 1},
2247 { 1, T_PHASE_DOOR, 1},
2248 { 1, T_INVOKE_DEITY, 1},
2249 { 15, T_SECURE_IDENTIFY, 1},
2250 { 20, T_TERRAIN_CLEANUP, 1},
2251 { 0, 0, 0} },
2253 bab_tech[] = { { 1, T_APPRAISAL, 1},
2254 { 1, T_PANIC_DIGGING, 1},
2255 { 1, T_PHASE_DOOR, 1},
2256 { 1, T_INVOKE_DEITY, 1},
2257 { 1, T_IRON_SKIN, 1},
2258 { 15, T_SECURE_IDENTIFY, 1},
2259 { 0, 0, 0} },
2261 ger_tech[] = { { 1, T_APPRAISAL, 1},
2262 { 1, T_PANIC_DIGGING, 1},
2263 { 1, T_PHASE_DOOR, 1},
2264 { 1, T_INVOKE_DEITY, 1},
2265 { 10, T_ROCK_TO_POISON, 1},
2266 { 15, T_SECURE_IDENTIFY, 1},
2267 { 0, 0, 0} },
2269 poi_tech[] = { { 1, T_APPRAISAL, 1},
2270 { 1, T_PANIC_DIGGING, 1},
2271 { 1, T_PHASE_DOOR, 1},
2272 { 1, T_INVOKE_DEITY, 1},
2273 { 15, T_SECURE_IDENTIFY, 1},
2274 { 20, T_ROCK_TO_POISON, 1},
2275 { 0, 0, 0} },
2277 def_tech[] = { { 1, T_APPRAISAL, 1}, /* everyone is supposed to get this --Amy */
2278 { 1, T_PANIC_DIGGING, 1},
2279 { 1, T_PHASE_DOOR, 1},
2280 { 1, T_INVOKE_DEITY, 1},
2281 { 15, T_SECURE_IDENTIFY, 1},
2282 { 0, 0, 0} };
2283 /* Orc */
2285 /* Local Macros
2286 * these give you direct access to the player's list of techs.
2287 * Are you sure you don't want to use tech_inuse, which is the
2288 * extern function for checking whether a fcn is inuse
2291 #define techt_inuse(tech) tech_list[tech].t_inuse
2292 #define techtout(tech) tech_list[tech].t_tout
2293 #define techlev(tech) (u.ulevel - tech_list[tech].t_lev)
2294 #define techid(tech) tech_list[tech].t_id
2295 #define techname(tech) (tech_names[techid(tech)])
2296 #define techlet(tech) \
2297 ((char)((tech < 26) ? ('a' + tech) : ('A' + tech - 26)))
2299 /* A simple pseudorandom number generator
2301 * This should generate fairly random numbers that will be
2302 * mod LP_HPMOD from 2 to 9, with 0 mod LP_HPMOD
2303 * but can't use the normal RNG since can_limitbreak() must
2304 * return the same state on the same turn.
2305 * This also has to depend on things that do NOT change during
2306 * save and restore, and also should only change between turns
2308 #if 0 /* Probably overkill */
2309 #define LB_CYCLE 259993L /* number of turns before the pattern repeats */
2310 #define LB_BASE1 ((long) (monstermoves + u.uhpmax + 300L))
2311 #define LB_BASE2 ((long) (moves + u.uenmax + u.ulevel + 300L))
2312 #define LB_STRIP 6 /* Remove the last few bits as they tend to be less random */
2313 #endif
2315 #define LB_CYCLE 101L /* number of turns before the pattern repeats */
2316 #define LB_BASE1 ((long) (monstermoves + u.uhpmax + 10L))
2317 #define LB_BASE2 ((long) (moves + u.uenmax + u.ulevel + 10L))
2318 #define LB_STRIP 3 /* Remove the last few bits as they tend to be less random */
2320 #define LB_HPMOD ((long) ((u.uhp * 10 / u.uhpmax > 2) ? \
2321 (u.uhp * 10 / u.uhpmax) : 2))
2323 #define can_limitbreak() (!Upolyd && (u.uhp*10 < u.uhpmax) && \
2324 (u.uhp == 1 || (!((((LB_BASE1 * \
2325 LB_BASE2) % LB_CYCLE) >> LB_STRIP) \
2326 % LB_HPMOD))))
2328 /* Whether you know the tech */
2329 boolean
2330 tech_known(tech)
2331 short tech;
2333 int i;
2334 for (i = 0; i < MAXTECH; i++) {
2335 if (techid(i) == tech)
2336 return TRUE;
2338 return FALSE;
2341 STATIC_PTR void
2342 undo_lockfloodP(x, y, roomcnt)
2343 int x, y;
2344 void * roomcnt;
2346 if (levl[x][y].typ < STONE || levl[x][y].typ > ROCKWALL)
2347 return;
2348 if (((levl[x][y].wall_info & W_NONDIGGABLE) != 0) && levl[x][y].typ != ROCKWALL)
2349 return;
2351 if (*in_rooms(x,y,SHOPBASE)) return;
2353 (*(int *)roomcnt)++;
2355 /* Get rid of stone at x, y */
2356 levl[x][y].typ = CORR;
2357 blockorunblock_point(x,y);
2358 if (!(levl[x][y].wall_info & W_HARDGROWTH)) levl[x][y].wall_info |= W_EASYGROWTH;
2359 newsym(x,y);
2362 STATIC_PTR void
2363 terraincleanup(x, y, roomcnt)
2364 int x, y;
2365 void * roomcnt;
2367 if (Is_waterlevel(&u.uz)) return;
2369 if (levl[x][y].typ < GRAVEWALL)
2370 return;
2371 if (levl[x][y].typ >= SDOOR && levl[x][y].typ <= SCORR)
2372 return;
2373 if ((levl[x][y].wall_info & W_NONDIGGABLE) != 0)
2374 return;
2375 if (levl[x][y].typ == DRAWBRIDGE_UP || levl[x][y].typ == DRAWBRIDGE_DOWN)
2376 return;
2377 if (levl[x][y].typ >= DOOR && levl[x][y].typ <= STRAWMATTRESS)
2378 return;
2380 (*(int *)roomcnt)++;
2382 /* Get rid of stone at x, y */
2383 levl[x][y].typ = CORR;
2384 blockorunblock_point(x,y);
2385 if (!(levl[x][y].wall_info & W_HARDGROWTH)) levl[x][y].wall_info |= W_EASYGROWTH;
2386 newsym(x,y);
2389 /* Called to prematurely stop a technique */
2390 void
2391 aborttech(tech)
2392 int tech;
2394 int i;
2396 i = get_tech_no(tech);
2398 if (tech_list[i].t_inuse) {
2399 switch (tech_list[i].t_id) {
2400 case T_RAGE:
2401 u.uhpmax -= tech_list[i].t_inuse - 1;
2402 if (u.uhpmax < 1)
2403 u.uhpmax = 1;
2404 u.uhp -= tech_list[i].t_inuse - 1;
2405 if (u.uhp < 1)
2406 u.uhp = 1;
2407 break;
2408 case T_POWER_SURGE:
2409 u.uenmax -= tech_list[i].t_inuse - 1;
2410 if (u.uenmax < 1)
2411 u.uenmax = 0;
2412 u.uen -= tech_list[i].t_inuse - 1;
2413 if (u.uen < 0)
2414 u.uen = 0;
2415 break;
2417 tech_list[i].t_inuse = 0;
2421 void
2422 learntech_or_leveltech(tech, mask, tlevel)
2423 short tech;
2424 long mask;
2425 int tlevel;
2427 int i;
2428 i = get_tech_no(tech);
2429 if (tech_list[i].t_intrinsic & mask) {
2430 techlevelspecific(tech_list[i].t_id);
2431 } else {
2432 learntech(tech, mask, tlevel);
2437 /* Called to teach a new tech. Level is starting tech level */
2438 void
2439 learntech(tech, mask, tlevel)
2440 short tech;
2441 long mask;
2442 int tlevel;
2444 int i;
2445 const struct innate_tech *tp;
2447 if (istechless && tlevel >= 0) return; /* tough luck... --Amy */
2449 i = get_tech_no(tech);
2450 /* Amy note: some techs are given only if you're the correct alignment when leveling up
2451 * diablist for alignment-specific techs goes here */
2452 if (tlevel > 0) {
2453 if (tech == T_PREACHING && mask != FROMOUTSIDE && u.ualign.type != A_LAWFUL) return;
2454 if (tech == T_ON_THE_SAME_TEAM && mask != FROMOUTSIDE && u.ualign.type != A_NEUTRAL) return;
2455 if (tech == T_PERMAMORPH && mask != FROMOUTSIDE && u.ualign.type != A_CHAOTIC) return;
2458 if (tlevel > 0) {
2459 if (i < 0) {
2460 i = get_tech_no(NO_TECH);
2461 if (i < 0) {
2462 impossible("No room for new technique?");
2463 return;
2466 tlevel = u.ulevel ? u.ulevel - tlevel : 0;
2467 if (tech_list[i].t_id == NO_TECH) {
2468 tech_list[i].t_id = tech;
2469 tech_list[i].t_lev = tlevel;
2470 tech_list[i].t_inuse = 0; /* not in use */
2471 tech_list[i].t_intrinsic = 0;
2473 else if (tech_list[i].t_intrinsic & mask) {
2474 pline("Tech already known."); /* can happen with recursion --Amy */
2475 return;
2477 if (mask == FROMOUTSIDE) {
2478 tech_list[i].t_intrinsic &= ~OUTSIDE_LEVEL;
2479 tech_list[i].t_intrinsic |= tlevel & OUTSIDE_LEVEL;
2481 if (tlevel < tech_list[i].t_lev)
2482 tech_list[i].t_lev = tlevel;
2483 tech_list[i].t_intrinsic |= mask;
2484 /*tech_list[i].t_tout = 0;*/ /* Can use immediately*/
2485 /* should be initialized as 0 if you newly learn it, but be saved as the earlier timeout if you level-drained
2486 * yourself and thereby lost knowledge of the tech. This is to prevent drain-for-gain exploits at XL15 - players
2487 * would certainly find out that you can use secure identify indefinitely that way... --Amy */
2489 else if (tlevel < 0) {
2491 if (i < 0 || !(tech_list[i].t_intrinsic & mask)) {
2492 pline("Tech not known."); /* can happen with recursion --Amy */
2493 return;
2495 if (techlev(i) < 1) {
2496 tech_list[i].t_intrinsic &= ~mask;
2497 if (!(tech_list[i].t_intrinsic & INTRINSIC)) {
2498 if (tech_list[i].t_inuse)
2499 aborttech(tech);
2500 tech_list[i].t_id = NO_TECH;
2501 return;
2503 /* Re-calculate lowest t_lev */
2504 if (tech_list[i].t_intrinsic & FROMOUTSIDE)
2505 tlevel = tech_list[i].t_intrinsic & OUTSIDE_LEVEL;
2506 if (tech_list[i].t_intrinsic & FROMEXPER) {
2507 for(tp = role_tech(); tp->tech_id; tp++)
2508 if (tp->tech_id == tech)
2509 break;
2510 if (!tp->tech_id)
2511 impossible("No inate technique for role?");
2512 else if (tlevel < 0 || tp->ulevel - tp->tech_lev < tlevel)
2513 tlevel = tp->ulevel - tp->tech_lev;
2515 if (tech_list[i].t_intrinsic & FROMRACE) {
2516 for(tp = race_tech(); tp->tech_id; tp++)
2517 if (tp->tech_id == tech)
2518 break;
2519 if (!tp->tech_id)
2520 impossible("No inate technique for race?");
2521 else if (tlevel < 0 || tp->ulevel - tp->tech_lev < tlevel)
2522 tlevel = tp->ulevel - tp->tech_lev;
2524 tech_list[i].t_lev = tlevel;
2527 else
2528 impossible("Invalid Tech Level!");
2532 * Return TRUE if a tech was picked, with the tech index in the return
2533 * parameter. Otherwise return FALSE.
2535 static boolean
2536 gettech(tech_no)
2537 int *tech_no;
2539 int i, ntechs, idx;
2540 char ilet, lets[BUFSZ], qbuf[QBUFSZ];
2542 for (ntechs = i = 0; i < MAXTECH; i++)
2543 if (techid(i) != NO_TECH) ntechs++;
2545 /* display the menu anyway, because of vibrating square stuff --Amy */
2546 /* if (ntechs == 0) {
2547 You("don't know any techniques right now.");
2548 return FALSE;
2550 if (flags.menu_style == MENU_TRADITIONAL) {
2551 if (ntechs == 1) strcpy(lets, "a");
2552 else if (ntechs < 27) sprintf(lets, "a-%c", 'a' + ntechs - 1);
2553 else if (ntechs == 27) sprintf(lets, "a-z A");
2554 else sprintf(lets, "a-z A-%c", 'A' + ntechs - 27);
2556 for(;;) {
2557 sprintf(qbuf, "Perform which technique? [%s ?]", lets);
2558 if ((ilet = yn_function(qbuf, (char *)0, '\0')) == '?')
2559 break;
2561 if (index(quitchars, ilet))
2562 return FALSE;
2564 if (letter(ilet) && ilet != '@') {
2565 /* in a-zA-Z, convert back to an index */
2566 if (lowc(ilet) == ilet) /* lower case */
2567 idx = ilet - 'a';
2568 else
2569 idx = ilet - 'A' + 26;
2571 if (idx < ntechs)
2572 for(i = 0; i < MAXTECH; i++)
2573 if (techid(i) != NO_TECH) {
2574 if (idx-- == 0) {
2575 *tech_no = i;
2576 return TRUE;
2580 You("don't know that technique.");
2583 return dotechmenu(PICK_ONE, tech_no);
2586 static boolean
2587 dotechmenu(how, tech_no)
2588 int how;
2589 int *tech_no;
2591 winid tmpwin;
2592 int i, n, len, longest, techs_useable, tlevel;
2593 char buf[BUFSZ], let = 'a';
2594 const char *prefix;
2595 menu_item *selected;
2596 anything any;
2598 tmpwin = create_nhwindow(NHW_MENU);
2599 start_menu(tmpwin);
2600 any.a_void = 0; /* zero out all bits */
2602 techs_useable = 0;
2604 if (!iflags.menu_tab_sep) {
2605 /* find the length of the longest tech */
2606 for (longest = 0, i = 0; i < MAXTECH; i++) {
2607 if (techid(i) == NO_TECH) continue;
2608 if ((len = strlen(techname(i))) > longest)
2609 longest = len;
2611 sprintf(buf, " %-*s Level Status", longest, "Name");
2612 } else
2613 sprintf(buf, "Name\tLevel\tStatus");
2615 add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
2617 for (i = 0; i < MAXTECH; i++) {
2618 if (techid(i) == NO_TECH)
2619 continue;
2620 tlevel = techlev(i);
2621 if (TechLossEffect || u.uprops[TECH_LOSS_EFFECT].extrinsic || have_techlossstone()) {
2622 techs_useable++;
2623 prefix = "";
2624 any.a_int = i + 1;
2625 } else if (tlevel > 0 && (wizard || !techtout(i)) ) {
2626 /* Ready to use */
2627 techs_useable++;
2628 prefix = "";
2629 any.a_int = i + 1;
2630 } else {
2631 prefix = " ";
2632 any.a_int = 0;
2634 #ifdef WIZARD
2635 if (wizard || (RngeTechInsight && !(TechLossEffect || u.uprops[TECH_LOSS_EFFECT].extrinsic || have_techlossstone()) ) )
2636 if (!iflags.menu_tab_sep)
2637 sprintf(buf, "%s%-*s %2d%c%c%c%c %s(%i)",
2638 prefix, longest, techname(i), tlevel, ((techtout(i) || (tlevel <= 0)) ? '*' : ' '),
2639 tech_list[i].t_intrinsic & FROMEXPER ? 'X' : ' ',
2640 tech_list[i].t_intrinsic & FROMRACE ? 'R' : ' ',
2641 tech_list[i].t_intrinsic & FROMOUTSIDE ? 'O' : ' ',
2642 tech_inuse(techid(i)) ? "Active" :
2643 tlevel <= 0 ? "Beyond recall" :
2644 can_limitbreak() ? "LIMIT" :
2645 !techtout(i) ? "Prepared" :
2646 techtout(i) > 10000 ? "Huge timeout" :
2647 techtout(i) > 1000 ? "Not Ready" :
2648 techtout(i) > 100 ? "Reloading" : "Soon",
2649 techtout(i));
2650 else
2651 sprintf(buf, "%s%s\t%2d%c%c%c%c\t%s(%i)",
2652 prefix, techname(i), tlevel, ((techtout(i) || (tlevel <= 0)) ? '*' : ' '),
2653 tech_list[i].t_intrinsic & FROMEXPER ? 'X' : ' ',
2654 tech_list[i].t_intrinsic & FROMRACE ? 'R' : ' ',
2655 tech_list[i].t_intrinsic & FROMOUTSIDE ? 'O' : ' ',
2656 tech_inuse(techid(i)) ? "Active" :
2657 tlevel <= 0 ? "Beyond recall" :
2658 can_limitbreak() ? "LIMIT" :
2659 !techtout(i) ? "Prepared" :
2660 techtout(i) > 10000 ? "Huge timeout" :
2661 techtout(i) > 1000 ? "Not Ready" :
2662 techtout(i) > 100 ? "Reloading" : "Soon",
2663 techtout(i));
2664 else
2665 #endif
2666 if (TechLossEffect || u.uprops[TECH_LOSS_EFFECT].extrinsic || have_techlossstone()) {
2667 sprintf(buf, " ");
2668 } else if (!iflags.menu_tab_sep) {
2669 sprintf(buf, "%s%-*s %5d%c %s",
2670 prefix, longest, techname(i), tlevel, ((techtout(i) || (tlevel <= 0)) ? '*' : ' '),
2671 tech_inuse(techid(i)) ? "Active" :
2672 tlevel <= 0 ? "Beyond recall" :
2673 can_limitbreak() ? "LIMIT" :
2674 !techtout(i) ? "Prepared" :
2675 techtout(i) > 10000 ? "Huge timeout" :
2676 techtout(i) > 1000 ? "Not Ready" :
2677 techtout(i) > 100 ? "Reloading" : "Soon");
2678 } else
2679 sprintf(buf, "%s%s\t%5d%c\t%s",
2680 prefix, techname(i), tlevel, ((techtout(i) || (tlevel <= 0)) ? '*' : ' '),
2681 tech_inuse(techid(i)) ? "Active" :
2682 tlevel <= 0 ? "Beyond recall" :
2683 can_limitbreak() ? "LIMIT" :
2684 !techtout(i) ? "Prepared" :
2685 techtout(i) > 10000 ? "Huge timeout" :
2686 techtout(i) > 1000 ? "Not Ready" :
2687 techtout(i) > 100 ? "Reloading" : "Soon");
2689 add_menu(tmpwin, NO_GLYPH, &any,
2690 (tlevel <= 0) ? 0 : (techtout(i) && !(TechLossEffect || u.uprops[TECH_LOSS_EFFECT].extrinsic || have_techlossstone()) && !wizard) ? 0 : let, 0, ATR_NONE, buf, MENU_UNSELECTED);
2691 if (let++ == 'z') let = 'A';
2692 if (let == 'Z') let = 'a';
2695 if (!techs_useable)
2696 how = PICK_NONE;
2698 /* Amy addition: if you are on the vibrating square, print a special message. The reason for it being that
2699 * #technique is one of the commands that ALWAYS works, no matter which nasty traps you have. Yes, there is a trap
2700 * that prevents the techniques from actually working, but the menu can be accessed anyway, and therefore it's
2701 * always possible in theory (he he) to find the VS no matter which, or how many(!!!), interface screws are active */
2702 end_menu(tmpwin, (isok(u.ux, u.uy) && invocation_pos(u.ux, u.uy)) ? "You're standing on the vibrating square." : how == PICK_ONE ? "Choose a technique" :
2703 "Currently known techniques");
2705 n = select_menu(tmpwin, how, &selected);
2706 destroy_nhwindow(tmpwin);
2707 if (n > 0) {
2708 int selection = selected[0].item.a_int - 1;
2709 if (selection < 0) { /* shouldn't happen, but according to amateurhour it can... so he fixed it --Amy */
2710 free((void *)selected);
2711 return FALSE;
2713 *tech_no = selection;
2714 free((void *)selected);
2715 return TRUE;
2717 return FALSE;
2720 #ifdef DUMP_LOG
2721 void
2722 dump_techniques()
2725 winid tmpwin;
2726 int i, n, len, tlevel;
2727 char buf[BUFSZ];
2728 const char *prefix;
2730 if (techid(0) == NO_TECH) {
2731 dump("", "You didn't know any techniques.");
2732 dump("", "");
2733 return;
2735 dump("", "Techniques known in the end");
2737 sprintf(buf, " %-17s Level Status", "Name");
2738 dump(" ",buf);
2739 for (i = 0; i < MAXTECH; i++) {
2740 if (techid(i) == NO_TECH)
2741 continue;
2742 tlevel = techlev(i);
2743 if (!techtout(i) && tlevel > 0) {
2744 /* Ready to use */
2745 prefix = "";
2746 } else {
2747 prefix = " ";
2749 if (!iflags.menu_tab_sep) {
2750 sprintf(buf, "%s%-20s %2d%c%c%c %s(%i)",
2751 prefix, techname(i), tlevel,
2752 tech_list[i].t_intrinsic & FROMEXPER ? 'X' : ' ',
2753 tech_list[i].t_intrinsic & FROMRACE ? 'R' : ' ',
2754 tech_list[i].t_intrinsic & FROMOUTSIDE ? 'O' : ' ',
2755 tech_inuse(techid(i)) ? "Active" :
2756 tlevel <= 0 ? "Beyond recall" :
2757 can_limitbreak() ? "LIMIT" :
2758 !techtout(i) ? "Prepared" :
2759 techtout(i) > 10000 ? "Huge timeout" :
2760 techtout(i) > 1000 ? "Not Ready" :
2761 techtout(i) > 100 ? "Reloading" : "Soon",
2762 techtout(i));
2763 dump(" ", buf);
2764 } else {
2765 sprintf(buf, "%s%s\t%2d%c%c%c\t%s(%i)",
2766 prefix, techname(i), tlevel,
2767 tech_list[i].t_intrinsic & FROMEXPER ? 'X' : ' ',
2768 tech_list[i].t_intrinsic & FROMRACE ? 'R' : ' ',
2769 tech_list[i].t_intrinsic & FROMOUTSIDE ? 'O' : ' ',
2770 tech_inuse(techid(i)) ? "Active" :
2771 tlevel <= 0 ? "Beyond recall" :
2772 can_limitbreak() ? "LIMIT" :
2773 !techtout(i) ? "Prepared" :
2774 techtout(i) > 10000 ? "Huge timeout" :
2775 techtout(i) > 1000 ? "Not Ready" :
2776 techtout(i) > 100 ? "Reloading" : "Soon",
2777 techtout(i));
2778 dump(" ", buf);
2781 dump("", "");
2783 } /* dump_techniques */
2784 #endif
2787 get_tech_no(tech)
2788 int tech;
2790 int i;
2792 for (i = 0; i < MAXTECH; i++) {
2793 if (techid(i) == tech) {
2794 return(i);
2797 return (-1);
2803 dotechwiz()
2805 int i;
2807 for (i = 0; i < MAXTECH; i++) {
2808 if (techid(i) == NO_TECH)
2809 continue;
2810 if (techtout(i)) techtout(i) = 0;
2812 pline("The timeout on all your techniques has been set to zero.");
2814 return dotech();
2818 void
2819 datadeletetechs()
2821 int i;
2823 for (i = 0; i < MAXTECH; i++) {
2824 if (techid(i) == NO_TECH)
2825 continue;
2826 if (!rn2(5)) techtout(i) += 1000000;
2831 void
2832 resettechs()
2834 int i;
2836 for (i = 0; i < MAXTECH; i++) {
2837 if (techid(i) == NO_TECH)
2838 continue;
2839 techtout(i) += rnz(100000);
2845 dotech()
2847 int tech_no;
2849 if (flags.tech_description && !(TechLossEffect || u.uprops[TECH_LOSS_EFFECT].extrinsic || have_techlossstone()) ) {
2851 if (gettech(&tech_no)) {
2853 switch (techid(tech_no)) {
2855 case T_RESEARCH:
2856 pline("This technique sometimes allow you to identify some of your items. Higher intelligence and wisdom increase the chance of success, higher technique levels increase the average amount of stuff identified.");
2857 break;
2859 case T_EVISCERATE:
2860 pline("You can only use this technique while bare-handed and not polymorphed. If you do, your unarmed attacks do more damage for a while; the technique's level determines the duration of this effect.");
2861 break;
2863 case T_BERSERK:
2864 pline("This technique allows you to do stronger attacks for a while; the technique's level determines the duration of this effect.");
2865 break;
2867 case T_REINFORCE:
2868 pline("Using this technique allows you to reinforce your memory of an almost-forgotten spell, or increase the memory of a moderately memorized spell up to 110%%.");
2869 break;
2871 case T_FLURRY:
2872 pline("A technique that can be used to get a multishot bonus with bows and certain other weapons, the duration of which depends on the technique's level.");
2873 break;
2875 case T_INVOKE_DEITY:
2876 pline("Invoke your deity for healing. If successful, some or all of your hit point damage will be restored, but there may be negative outcomes depending on certain circumstances.");
2877 break;
2879 case T_DOUBLE_TROUBLE:
2880 pline("Create a clone of yourself with this technique. At higher technique levels you might summon some familiars too.");
2881 break;
2883 case T_APPRAISAL:
2884 pline("This technique allows you to determine the enchantment value of your currently wielded weapon. If you use it while wielding a non-weapon (e.g. a wand), the timeout of this technique will be much longer.");
2885 break;
2887 case T_PANIC_DIGGING:
2888 pline("In situations where there is no other way forward, you can use this technique to transform walls on the eight squares surrounding you into open floor. Of course it only works if those squares are diggable, and it also paralyzes you for up to 20 turns, so be careful about using it when monsters are around!");
2889 break;
2891 case T_SECURE_IDENTIFY:
2892 pline("Everyone learns this technique at experience level 15, and it allows the player to identify an item in open inventory without fail.");
2893 break;
2895 case T_PHASE_DOOR:
2896 pline("If you need to get out of trouble, you can use this tech for a short-range teleport. It will teleport you over an euclidean distance of at least 3 but no more than 100. Of course it doesn't work if teleportation is prohibited on the current dungeon level.");
2897 break;
2899 case T_PRACTICE:
2900 pline("With this technique, you can practice with your currently wielded weapon, sometimes determining the enchantment value. Also, it gets you closer to increasing your skill level, but monsters may interrupt you.");
2901 break;
2903 case T_SURGERY:
2904 pline("A technique that can be used to cure a variety of afflictions, but you should have either a scalpel or a medical kit filled with bandages for it to work.");
2905 break;
2907 case T_HEAL_HANDS:
2908 pline("Using this technique can cure sliming or sickness, or heal a techlevel-dependant amount of hit points.");
2909 break;
2911 case T_KIII:
2912 pline("If you use this technique, your melee attacks do much more damage for a period of time, the length of which depends on the technique's level.");
2913 break;
2915 case T_CALM_STEED:
2916 pline("You need to be riding in order to use this technique. If you do, your steed's tameness will increase; higher technique levels increase the average amount of tameness points gained.");
2917 break;
2919 case T_TURN_UNDEAD:
2920 pline("Turn undead is the act of causing nearby undead creatures to flee; weak undead might even be killed outright by this effect.");
2921 break;
2923 case T_VANISH:
2924 pline("By using this technique, you will become invisible and fast for some time. Higher technique levels give a longer effect.");
2925 break;
2927 case T_CRIT_STRIKE:
2928 pline("This technique allows you to perform a powerful attack against a monster close by, the strength of which depends on the technique's level.");
2929 break;
2931 case T_CUTTHROAT:
2932 pline("You need a blade to use this technique. Doing so allows you to severely hurt an adjacent non-headless monster; high technique levels sometimes even allow you to instakill the monster, but only if the monster's level isn't too high relative to the technique's level.");
2933 break;
2935 case T_BLESSING:
2936 pline("Using this technique allows you to uncurse a cursed item or bless an uncursed one.");
2937 break;
2939 case T_E_FIST:
2940 pline("This technique enhances your melee attacks with elemental powers for a techlevel-dependant amount of turns.");
2941 break;
2943 case T_PRIMAL_ROAR:
2944 pline("A technique that temporarily promotes your pets to their grown-up form, but after a techlevel-dependent time they will revert.");
2945 break;
2947 case T_LIQUID_LEAP:
2948 pline("This allows you to jump in a direction of your choice, passing through monsters, iron bars and similar stuff. The technique's level affects the damage done to monsters you jump through.");
2949 break;
2951 case T_SIGIL_TEMPEST:
2952 pline("This technique costs quite some mana, but if used, your ray spells will create 3x3 explosions around you as long as the technique is in effect. The duration increases with the technique's level. Combine it with sigil of control to control the explosions.");
2953 break;
2955 case T_SIGIL_CONTROL:
2956 pline("This technique costs quite some mana, but if used, you can control the direction of your ray spells' rebounds for a while. The duration increases with the technique's level.");
2957 break;
2959 case T_SIGIL_DISCHARGE:
2960 pline("This technique costs quite some mana, but if used, your ray spells will create huge explosions that can hit lots of monsters in a single shot as long as it's active. The duration increases with the technique's level.");
2961 break;
2963 case T_RAISE_ZOMBIES:
2964 pline("This technique searches the squares adjacent to you for corpses, trying to make tame zombies out of them.");
2965 break;
2967 case T_REVIVE:
2968 pline("Allows you to revive a corpse from the floor or your inventory, but at the cost of health. This cost is reduced by increasing the technique's level.");
2969 break;
2971 case T_WARD_FIRE:
2972 pline("Using this technique makes you resistant to fire for a while (longer with higher technique levels).");
2973 break;
2975 case T_WARD_COLD:
2976 pline("Using this technique makes you resistant to cold for a while (longer with higher technique levels).");
2977 break;
2979 case T_WARD_ELEC:
2980 pline("Using this technique makes you resistant to shock for a while (longer with higher technique levels).");
2981 break;
2983 case T_TINKER:
2984 pline("You must hold an item in your hand that can be upgraded if you want to use this technique effectively. Also, it takes a very long time to upgrade an object; the duration is decreased slightly if the technique's level is lower, but monsters are still likely to interrupt you. And if that happens, the technique will be on timeout anyway, so better lock yourself in a closet first.");
2985 break;
2987 case T_RAGE:
2988 pline("Temporarily increases your maximum hit points by a techlevel-dependant amount, but your HP will slowly bleed out until they reach their previous value, so be careful.");
2989 break;
2991 case T_BLINK:
2992 pline("Using this technique allows you to move super-fast for a period of time, the length of which increases with the technique's level.");
2993 break;
2995 case T_CHI_STRIKE:
2996 pline("A technique that uses your mana in order to enhance your melee attacks.");
2997 break;
2999 case T_DRAW_ENERGY:
3000 pline("Draws energy (mana) from your surroundings for 15 turns; if altars, thrones or similar stuff are on the squares adjacent to you, the effect will be stronger. However, if a monster interrupts you, you'll get nothing at all.");
3001 break;
3003 case T_CHI_HEALING:
3004 pline("Your mana will be converted to health for a period of time if you use this technique.");
3005 break;
3007 case T_DISARM:
3008 pline("Tries to disarm a monster (read: knock their weapon away); you need to be holding a weapon you're at least skilled with, though. Also the weapon needs to be at least +1 and if it's successful, the weapon loses a point of enchantment.");
3009 break;
3011 case T_DAZZLE:
3012 pline("A technique that can stun a monster and cause it to flee; it is much more likely to succeed if the target monster's level is lower than the technique's level.");
3013 break;
3015 case T_BLITZ:
3016 pline("Allows you to input several successive commands that will be converted into moves. You can always do at least 2 moves; 3 at techlevel 10 or higher, 4 at techlevel 20 or higher, and 5 at techlevel 30.");
3017 break;
3019 case T_PUMMEL:
3020 pline("This technique can be used to rapidly strike an adjacent monster using your fists.");
3021 break;
3023 case T_G_SLAM:
3024 pline("A technique that can be used to slam an adjacent monster into the ground, creating a pit and doing lots of damage.");
3025 break;
3027 case T_DASH:
3028 pline("You can use this technique to move by several squares in a single turn, but only in a straight line.");
3029 break;
3031 case T_POWER_SURGE:
3032 pline("A very powerful technique that temporarily increases your maximum mana to a very high amount, but it slowly bleeds off to its original value.");
3033 break;
3035 case T_SPIRIT_BOMB:
3036 pline("This technique allows you to do a 'kamehameha' attack against a monster, causing it to explode while also damaging other monsters nearby. According to Nethackwiki, you can't hit yourself or your pets with this attack either (and the page is even still there, because it's a SLASH'EM technique; certain evil people wiped all SLEX-specific info). But in-game experience says otherwise, i.e. pets can very well still be hit, sadly.");
3037 break;
3039 case T_DRAW_BLOOD:
3040 pline("A nearly useless technique that will use a medical kit to drain your experience for a single potion of blood.");
3041 break;
3043 case T_JEDI_JUMP:
3044 pline("Uses mana to jump. Higher technique levels allow you to jump farther.");
3045 break;
3047 case T_POKE_BALL:
3048 pline("This technique allows you to throw a poke ball, trying to catch any adjacent non-unique monster. Higher technique levels give a greater chance of success and sometimes allow you to catch several monsters in a single turn. Actual pokemon are more likely to be caught, and 'petty' monsters are guaranteed to be caught.");
3049 break;
3051 case T_SUMMON_TEAM_ANT:
3052 pline("A technique that summons tame Team Ant members (monsters represented by the letter a). Higher technique levels are more likely to summon several of them at once.");
3053 break;
3055 case T_ATTIRE_CHARM:
3056 pline("With this technique, you can attempt to tame adjacent intelligent human(oid) monsters, but you need to be wearing high heels for it to work. A higher level of this technique sometimes tames several monsters at once.");
3057 break;
3059 case T_WORLD_FALL:
3060 pline("A very powerful technique that will instakill all non-unique monsters on the current dungeon level whose monster level is lower than half the technique's level. Sometimes it will also kill higher-level monsters.");
3061 break;
3063 case T_CREATE_AMMO:
3064 pline("Creates a techlevel-dependant amount of bullets.");
3065 break;
3067 case T_EGG_BOMB:
3068 pline("This technique creates stoning grenades at your feet. Higher techlevels create more of them at once on average.");
3069 break;
3071 case T_BOOZE:
3072 pline("Using this technique is very similar to quaffing a potion of booze, but it will also create some potions of booze out of thin air. The technique's level determines the average amount of potions created.");
3073 break;
3075 case T_TELEKINESIS:
3076 pline("A technique that can be used to interact with dungeon features from far away.");
3077 break;
3079 case T_IRON_SKIN:
3080 pline("Using this technique will improve your armor class for a short period of time.");
3081 break;
3083 case T_POLYFORM:
3084 pline("You can use this technique for an uncontrolled random polymorph. It can turn you into monsters that are normally not a valid polymorph form, but you cannot make those polymorphs permanent via an amulet of unchanging because that would be too easy.");
3085 break;
3087 case T_CONCENTRATING:
3088 pline("With this technique active, your melee attacks will almost never miss; however, it only lasts for a short time.");
3089 break;
3091 case T_SUMMON_PET:
3092 pline("A technique that summons a tame monster.");
3093 break;
3095 case T_DOUBLE_THROWNAGE:
3096 pline("Use this technique just before you start throwing darts, daggers or similar throwing weapons, and you can throw many more projectiles per turn!");
3097 break;
3099 case T_SHIELD_BASH:
3100 pline("If you use this technique, your one-handed melee attacks will deal more damage as long as you have a shield equipped. The damage bonus depends on the shield's enchantment value.");
3101 break;
3103 case T_RECHARGE:
3104 pline("A very useful technique that allows you to recharge wands, tools and similar items. However, blessed scrolls of charging are still better, so you should probably not use this technique on a wand of wishing.");
3105 break;
3107 case T_SPIRITUALITY_CHECK:
3108 pline("If you're unsure whether you can safely pray, you can use this technique to communicate with your god. There are no negative effects - it simply tells you whether it's safe to pray now.");
3109 break;
3111 case T_EDDY_WIND:
3112 pline("You can invoke this technique to walk right through monsters for a short time. Remember: if you want to attack them in melee, you'll need to prefix your movements with the F command. If you are wielding two weapons at the same time and attack a monster while having the technique active, you will deal extra damage with every hit.");
3113 break;
3115 case T_BLOOD_RITUAL:
3116 pline("Requires an athame in your open inventory. If you use this technique, you sacrifice up to 200 max HP and Pw, and all of your stats are reduced by up to 2, but you will be granted a wish, an acquirement, a random artifact or a random powerful item.");
3117 break;
3119 case T_ENT_S_POTION:
3120 pline("Restores some of your health and also fixes blindness, stunning, confusion, hallucination, numbness, fear, freezing, dimness and burns.");
3121 break;
3123 case T_LUCKY_GAMBLE:
3124 pline("Randomly increases or decreases your base luck by one, with equal probability.");
3125 break;
3127 case T_DECONTAMINATE:
3128 pline("Greatly reduces your contamination when used.");
3129 break;
3131 case T_SWAP_WEAPON:
3132 pline("Allows you to set a different secondary weapon, but only if you're not currently dual-wielding. If you're a master at dual-wielding, this even lets you skip potential bad effects that wielding the weapon would give you.");
3133 break;
3135 case T_WONDERSPELL:
3136 pline("Teaches a random spell when used.");
3137 break;
3139 case T_RESET_TECHNIQUE:
3140 pline("Allows you to select a technique that's currently on timeout, which will become usable again.");
3141 break;
3143 case T_SILENT_OCEAN:
3144 pline("Using this technique will try to cancel all ; and I monsters in a rather large area around you. Also, while the technique is active, you have swimming and magical breathing, plus your items are protected from water damage and drowning attacks cannot harm you. If the technique is about to run out, you get a message so you can get out of the water. However, you also cannot cast spells or chat while it's active.");
3145 break;
3147 case T_GLOWHORN:
3148 pline("If you use this technique, you will get the effect of applying a noncursed unicorn horn every turn for a period of time, even if you don't actually have a unicorn horn.");
3149 break;
3151 case T_INTRINSIC_ROULETTE:
3152 pline("This technique can give or remove a random intrinsic, which can be good or bad.");
3153 break;
3155 case T_SPECTRAL_SWORD:
3156 pline("Adds elemental damage to your melee weapon for a period of time.");
3157 break;
3159 case T_REVERSE_IDENTIFY:
3160 pline("Allows you to identify an item based on random appearance, or input the name of an unknown item which will then be identified. It can also randomly identify some other unknown items.");
3161 break;
3163 case T_DETECT_TRAPS:
3164 pline("Reveals some of the traps on the current dungeon level when used.");
3165 break;
3167 case T_DIRECTIVE:
3168 pline("Very useful for petmasters, this technique lets you give orders to your pets. The higher your petkeeping skill, the more things you can change about your pets' behavior.");
3169 break;
3171 case T_REMOVE_IMPLANT:
3172 pline("Allows you to take off a worn implant, even if it's a cursed one.");
3173 break;
3175 case T_REROLL_IMPLANT:
3176 pline("This technique targets a worn implant and will reroll its base stats.");
3177 break;
3179 case T_MILDEN_CURSE:
3180 pline("Use this technique to turn a sticky/heavily/prime cursed item into a regularly cursed one. If you use it on an item that has the black breath, topi ylinen or ancient morgothian curses, there is only a 10%% chance of turning them into a regularly cursed one.");
3181 break;
3183 case T_FORCE_FIELD:
3184 pline("Activates a temporary force field that makes monsters with ranged weapons or beam wands much less likely to hit you.");
3185 break;
3187 case T_POINTINESS:
3188 pline("This technique requires you to wield a polearm or lance. If it's a negatively enchanted one, it gains a random amount of enchantment (not past +0), otherwise it can gain an additional point of enchantment, but the chance is lower the more enchantment your weapon has. Maximum that can be reached is +25.");
3189 break;
3191 case T_BUG_SPRAY:
3192 pline("Allows you to place a stinking cloud that deals poison damage to enemies, and also to you should you happen to walk into it.");
3193 break;
3195 case T_WHIRLSTAFF:
3196 pline("After using this technique, for a certain period of time your quarterstaff can attack several times in a single turn. The higher your quarterstaff skill, the more extra attacks you get.");
3197 break;
3199 case T_DELIBERATE_CURSE:
3200 pline("This technique replicates the effect of a potion of unholy water, allowing you to curse an item. Take note that even blessed items go straight to cursed when using this technique, unlike unholy water which would only unbless them.");
3201 break;
3203 case T_ACQUIRE_STEED:
3204 pline("Tries to tame an adjacent monster of a 'rideable' class. Of course this is SLEX, you can theoretically ride any monster, but this technique specifically tames the following glyphs: q, u, A, C, D, J, z. Only one monster can be tamed per use, however there's a chance for monsters to resist so if you surround yourself with several potential pets, there's a better chance that not all of them will resist.");
3205 break;
3207 case T_SADDLING:
3208 pline("Creates a saddle out of thin air.");
3209 break;
3211 case T_SHOPPING_QUEEN:
3212 pline("Every woman's wet dream, this technique lets you shop for shoes! Depending on your high heels skill, there's a certain amount of shoes that you can pick from. You can only pick one pair from the list, which will be placed on the floor. So choose wisely and become the prettiest woman in the dungeon by donning your favorite high heels! (Disclaimer: You don't need to pay money; the technique is basically the voucher that you redeem to get your shoes.)");
3213 break;
3215 case T_BEAUTY_CHARM:
3216 pline("This technique requires you to be wearing high heels, and paralyzes you for 10 turns, so be careful when using it. During those turns, it repeatedly tries to pacify humanoids and animals in a 7x7 radius around you, hoping that they fall in love with your beautiful high heels and decide to stop fighting you. However, monsters may resist the attempt and attack you anyway.");
3217 break;
3219 case T_ASIAN_KICK:
3220 pline("If you want to use this technique, you must be wearing stiletto heels. Then it lasts for 50 turns, and once you kick a male humanoid or animal, you will place a devastating kick between their legs. The enemy's nuts will be pushed out of their original position by your very tender stiletto heels, causing unbearable pain to the monster and knocking it out for possibly hundreds of turns, but this technique immediately ends once you successfully kick something with it. Take note that using this technique puts a timeout on all of the following techniques: asian kick, legscratch attack, ground stomp, athletic combat.");
3221 break;
3223 case T_LEGSCRATCH_ATTACK:
3224 pline("Requires you to wear cone heels. If you use this technique, your kick attack will be able to scratch up and down the enemy's legs for a while, ripping their shins to shreds, and as a result they'll move more slowly. Do it often enough and their legs will be bleeding so badly that all your kicks deal double damage because your beautiful cone heels are so incredibly sharp-edged! Take note that using this technique puts a timeout on all of the following techniques: asian kick, legscratch attack, ground stomp, athletic combat.");
3225 break;
3227 case T_GROUND_STOMP:
3228 pline("In order to use this technique, you must be wearing wedge heels. It will last for a while, and if you kick a paralyzed enemy while the technique is active, you'll not only deal double damage but also increase the time for which the enemy is paralyzed, so you can effectively chain-paralyze them. Gotta kick 'em while they're down, and stomp them with your very lovely, massive wedge heels! Take note that using this technique puts a timeout on all of the following techniques: asian kick, legscratch attack, ground stomp, athletic combat.");
3229 break;
3231 case T_ATHLETIC_COMBAT:
3232 pline("Only characters in block heels can use this technique. It lasts for a generous amount of time, and while it's active, you can place a high kick with your block heels at the enemy's belly, shoulder or even their head. The elegance of your very feminine block heels will mesmerize them so much that they may spontaneously stop fighting back, allowing you to kick them again and again with your fleecy block heel. Take note that using this technique puts a timeout on all of the following techniques: asian kick, legscratch attack, ground stomp, athletic combat.");
3233 break;
3235 case T_PRAYING_SUCCESS:
3236 pline("This very helpful technique allows you to pray when it would normally not be safe to pray. Please be aware of the fact that your deity is still inaccessible in Gehennom; the gods won't get angry if you use this technique in Gehennom, but they won't be able to help you anyway. Also, there's limits as to what it can do; if your alignment is extremely low or you have a huge prayer timeout, it might still fail, and it won't necessarily work when your god is extremely angry.");
3237 break;
3239 case T_OVER_RAY:
3240 pline("After using this technique, your ray and beam wands and spells have a much greater range than usually. It lasts for a generous amount of time. Diagonally fired rays in particular will sometimes bounce for quite a long time!");
3241 break;
3243 case T_ENCHANTERANG:
3244 pline("A technique that can only be used if you're wielding a boomerang, and which will try to enchant it so you'll be more capable of killing the little poison ivies. You can also wield an entire stack, and as long as it's 10 or less boomerangs in it, the entire stack will be enchanted. Trying to enchant greater stacks can fail, more often the bigger the stack is. Also, boomerangs that are already +25 or higher can not be further enchanted with this technique.");
3245 break;
3247 case T_BATMAN_ARSENAL:
3248 pline("If you want to be able to fight Scarecrow, Clayface and the Penguin, you need a lot of batarangs. Using this technique will create one out of thin air!");
3249 break;
3251 case T_JOKERBANE:
3252 pline("Yes, Batman is capable of defeating the Joker, even though he's the biggest villain in all of Gotham City and has three separate ways of instakilling Batman and is also very capable of killing Batman via normal damage. Use this technique and your batarang will be able to paralyze monsters for a while if you throw it!");
3253 break;
3255 case T_CALL_THE_POLICE:
3256 pline("If you need help, use this technique and tame kops will appear to fight your enemies.");
3257 break;
3259 case T_DOMINATE:
3260 pline("Tries to tame an adjacent animal. At low technique levels you'll usually only dominate a single one, while with higher levels it may occasionally tame several animals in one use.");
3261 break;
3263 case T_INCARNATION:
3264 pline("Allows you to select an adjacent monster and try to polymorph into it. But beware, there's a one in three chance that you polymorph into something completely random instead.");
3265 break;
3267 case T_COMBO_STRIKE:
3268 pline("This technique can be used with chained blitz if you have that, and if you do so, every hit deals 10 extra damage compared to the previous one. Using it 'normally' gives a different effect: for a period of time, every melee hit you land will deal one more point of damage compared to the previous one, but it instantly terminates if you try to use chained blitz while having combo strike active, and it also terminates if you spend a turn doing something other than hitting a monster in melee, so you have to keep attacking things to maximize the effect.");
3269 break;
3271 case T_FUNGOISM:
3272 pline("With this technique, you will polymorph into a random F-class monster. Beware, polymorph control doesn't let you choose what you become. Since most fungi aren't capable of wearing armor or wielding weapons, this is a way to shake off cursed ones. However, most fungi also lack limbs and generally make poor fighting forms.");
3273 break;
3275 case T_BECOME_UNDEAD:
3276 pline("Unlike the turn undead technique, this one actually allows you to become an undead creature! This is done by polymorphing you, but the one you turn into is random, even if you have polymorph control.");
3277 break;
3279 case T_JIU_JITSU:
3280 pline("A bare-handed combat technique that lasts for a very long time. While it's active, your fists will deal more damage the better a monster's armor class is, but it doesn't increase your to-hit to match, so you'd better be good enough to actually hit the monsters :D");
3281 break;
3283 case T_BLADE_ANGER:
3284 pline("While this technique is active, throwing shuriken will additionally shoot invisible beams at the enemy that may hit several of them at once, but these beams require 10 mana each.");
3285 break;
3287 case T_RE_TAMING:
3288 pline("Use this technique while standing next to a monster that used to be your pet, and if the monster was peaceful it'll become tame again. Using it on a former pet that actually became hostile only has a 1 in 3 chance of working, and using it on a former pet that became frenzied will never work.");
3289 break;
3291 case T_TIME_STOP:
3292 pline("Using this technique stops time for 6-11 turns.");
3293 break;
3295 case T_STAT_RESIST:
3296 pline("Provides temporary resistance to sickness, stun, confusion, blindness, hallucination and fear.");
3297 break;
3299 case T_CHARGE_SABER:
3300 pline("This technique will use up all of your current mana and convert it into lightsaber energy. If the techlevel is at least 10, you can also win the jackpot. However, monsters may interrupt you, preventing your lightsaber from actually being charged.");
3301 break;
3303 case T_UNCURSE_SABER:
3304 pline("Use this technique while wielding a cursed lightsaber and it will be uncursed! If it's heavily cursed or worse, it gets the usual chance of resisting, of course.");
3305 break;
3307 case T_ENERGY_CONSERVATION:
3308 pline("It lasts for a very long time, and reduces the rate at which your lightsaber will use up power. The higher your Makashi skill, the better the reduction.");
3309 break;
3311 case T_ENCHANT_ROBE:
3312 pline("This technique requires you to wear a robe, which will receive a random enchantment. If your robe already has an enchantment, it will lose the one it has and get a new random one. And if your Soresu skill is at Grand Master or better, the technique can also occasionally increase the enchantment of your robe up to a maximum of +7; this will never vaporize the robe because SLEX adheres to the 'enhancing your skills should never have detrimental side effects' principle.");
3313 break;
3315 case T_WILD_SLASHING:
3316 pline("While this technique is active, your dual-wielded lightsabers will attack more quickly but have reduced to-hit. Beware: you can't just cheat by running a to-hit-increasing technique at the same time, those won't give you any to-hit bonuses while wild slashing is active.");
3317 break;
3319 case T_ABSORBER_SHIELD:
3320 pline("A technique that will last for a while, and as long as it's active, blocking a projectile with your lightsaber will add some saber power.");
3321 break;
3323 case T_PSYCHO_FORCE:
3324 pline("Allows you to select a monster that you can see, which will take damage and be paralyzed for a while.");
3325 break;
3327 case T_INTENSIVE_TRAINING:
3328 pline("Every time you use this technique, a random stat will be increased by 1.");
3329 break;
3331 case T_SURRENDER_OR_DIE:
3332 pline("This technique lasts for a few hundred turns and allows your lightsaber attacks to occasionally pacify the opponent, or sometimes your lightsaber will gain enchantment, or the lightsaber gains additional power. But it only triggers if you manage to smash apart an enemy's held weapon.");
3333 break;
3335 case T_PERILOUS_WHIRL:
3336 pline("If you use a lit double lightsaber while having this technique active, your attacks may occasionally drain the enemy's levels.");
3337 break;
3339 case T_SUMMON_SHOE:
3340 pline("Well, guess :D It summons a tame shoe that will kick monsters!");
3341 break;
3343 case T_KICK_IN_THE_NUTS:
3344 pline("Requires you to wear sexy flats, and can only be used on a male monster, which will deal a lot of damage to it and also prevent the target from fighting back for a while.");
3345 break;
3347 case T_DISARMING_KICK:
3348 pline("This technique can only be used if you wear sexy flats, and will disarm an adjacent monster. If successful, its weapon will land at your feet. Unlike the disarm technique, this works even if the target is holding a cursed weapon.");
3349 break;
3351 case T_INLAY_WARFARE:
3352 pline("Using this technique requires sexy flats to be worn, and if you do use it, you'll create a stinking cloud at your position and may confuse and paralyze nearby monsters. You will also be confused for a while and need to wait for 2 turns before you can act again, meaning you'll probably be affected by the cloud too.");
3353 break;
3355 case T_DIAMOND_BARRIER:
3356 pline("Creates grave walls on the eight squares surrounding you, as long as those squares are open floor tiles.");
3357 break;
3359 case T_STEADY_HAND:
3360 pline("This technique increases your to-hit by a flat 5 points for a period of time.");
3361 break;
3363 case T_FORCE_FILLING:
3364 pline("If you use this technique, you restore a bit of mana.");
3365 break;
3367 case T_JEDI_TAILORING:
3368 pline("Creates a random robe that you can use.");
3369 break;
3371 case T_INTRINSIC_SACRIFICE:
3372 pline("If you use this technique, you may lose an intrinsic. But it will add a lot of energy to both of your lightsabers. Oh, almost forgot to mention this: it can only be used if you're wielding two lightsabers at once.");
3373 break;
3375 case T_BEAMSWORD:
3376 pline("When using this technique, your thrown lightsaber will be able to fire invisible beams for a while.");
3377 break;
3379 case T_ENERGY_TRANSFER:
3380 pline("While this technique is active, casting spells while wielding a lit lightsaber will add energy to the saber.");
3381 break;
3383 case T_SOFTEN_TARGET:
3384 pline("Allows you to target a single monster next to you, which will lose an experience level even if it resists level drain.");
3385 break;
3387 case T_PROTECT_WEAPON:
3388 pline("Can only be used while wielding a two-handed weapon, which will be erosionproofed.");
3389 break;
3391 case T_POWERFUL_AURA:
3392 pline("This technique temporarily grants magic resistance, reflection and free action.");
3393 break;
3395 case T_BOOSTAFF:
3396 pline("Using this technique requires you to wield a staff, and will try to enchant it (up to a maximum of +8, although the chance of enchanting it decreases with higher enchantment). Can also uncurse a cursed staff.");
3397 break;
3399 case T_CLONE_JAVELIN:
3400 pline("Requires you to wield a javelin, which will receive an extra ammo. Yes, you can multiply artifact javelins that way; this is not a bug.");
3401 break;
3403 case T_REFUGE:
3404 pline("While having this technique active, undead creatures that are near you will continuously take damage and may also be scared.");
3405 break;
3407 case T_DRAINING_PUNCH:
3408 pline("This martial arts move can be chained, and it may drain levels from monsters if they fail to resist. It requires you to be bare-handed.");
3409 break;
3411 case T_ESCROBISM:
3412 pline("A technique that lasts for a period of time and requires a robe to be worn, in which case it increases your bare-handed or lightsaber melee damage.");
3413 break;
3415 case T_PIRATE_BROTHERING:
3416 pline("Requires you to dual-wield with a lightsaber in your primary hand and a scimitar in your off-hand, and the lightsaber must be lit. While the technique is active, the lightsaber will not consume energy, and every time the scimitar hits something your lightsaber is recharged a bit.");
3417 break;
3419 case T_NUTS_AND_BOLTS:
3420 pline("Using this technique creates some crossbow bolts and increases your nutrition.");
3421 break;
3423 case T_DECAPABILITY:
3424 pline("While this technique is active, your polearm may sometimes put monsters to sleep if you apply it at them, and if your lightsaber destroys an enemy's weapon, the enemy in question is also put to sleep.");
3425 break;
3427 case T_NO_HANDS_CURSE:
3428 pline("Only works if you are wielding a two-handed weapon that is not cursed. The weapon in question will become heavily cursed and get a negative enchantment value, but you gain +1 luck, +100 alignment record, -1 divine anger and -500 prayer timeout. Also, hostile monsters that are next to you have a chance of becoming peaceful.");
3429 break;
3431 case T_HIGH_HEELED_SNEAKERS:
3432 pline("If you use this technique, you can use the high heels and sexy flats skills simultaneously for a while. But this only works if you actually have a pair that qualifies, which means it has to be one that has both a high-heeled randomized appearance and a sexy flats base item type or the other way around.");
3433 break;
3435 case T_FORM_CHOICE:
3436 pline("Requires you to be wielding a lightsaber, and will transform it into a different type of lightsaber that you can choose.");
3437 break;
3439 case T_STAR_DIGGING:
3440 pline("Fires digging rays in all eight directions.");
3441 break;
3443 case T_WONDER_YONDER:
3444 pline("Teaches you a random spell when used, but also causes long-lasting inertia and some random bad effects.");
3445 break;
3447 case T_ZAP_EM:
3448 pline("Tries to tame adjacent evilvariant monsters (use the pokedex to look for the 'Origin: Evil variant' bit). They can try to resist via monster magic resistance though.");
3449 break;
3451 case T_CARD_TRICK:
3452 pline("Inspired by Splicehack, this technique lets you choose a scroll in your open inventory for a chance to duplicate it. The higher the cost of writing the scroll in question with a magic marker, the lower the chance that your duplication attempt works, but higher technique levels will increase the chance of success. Scrolls that cannot be written with a magic marker, e.g. wishing, can never be duplicated with this technique because that would be too powerful, and artifact scrolls are impossible too.");
3453 break;
3455 case T_SKILLOMORPH:
3456 pline("Lets you pick a skill in which you're not restricted, and trains it by a few points. This lets you bypass the RNG limitations that might have made a skill impossible to train, meaning that repeatedly using this technique may allow you to reach skill levels that you can't otherwise reach, but of course you can't go over the cap displayed in the #enhance screen.");
3457 break;
3459 case T_SHOTTY_BLAST:
3460 pline("Creates shotgun shells out of thin air.");
3461 break;
3463 case T_AMMO_UPGRADE:
3464 pline("This technique requires you to wield firearm ammo, which may be enhanced in enchantment value and BUC. Remember that like everything that can affect a stack of items, big stacks of ammo (more than 25 ammos in one stack) have a chance to resist depending on the exact stack size. Ammo that is already highly enchanted is less likely to gain additional enchantment points, and the maximum that you can reach with this technique is +10.");
3465 break;
3467 case T_LASER_POWER:
3468 pline("Creates laser gun ammo out of thin air.");
3469 break;
3471 case T_BIG_DADDY:
3472 pline("This powerful technique creates a rocket launcher with ammo out of thin air.");
3473 break;
3475 case T_SHUT_THAT_BITCH_UP:
3476 pline("A technique that lasts for a couple of turns and allows your firearm ammos to stop time if they hit a female enemy.");
3477 break;
3479 case T_S_PRESSING:
3480 pline("This technique works only if there's no trap on your current location. It also requires 500 points of nutrition. If you fulfill those requirements, you create a trap at your location that can only affect hostile monsters and deals damage relative to your squeaking skill and technique level. However, only monsters that didn't see you create the trap can trigger it and they can also only ever trigger it while they're outside of your line of sight!");
3481 break;
3483 case T_MELTEE:
3484 pline("Shoots acid rays in all directions and may destroy iron bars.");
3485 break;
3487 case T_WOMAN_NOISES:
3488 pline("If you use this technique, hostile monsters in a certain radius around you have to make a saving throw or be affected by several bad effects.");
3489 break;
3491 case T_EXTRA_LONG_SQUEAK:
3492 pline("After using this technique, it will stay active for a while and protect you from farting effects, and additionally all nearby hostile male monsters will have to make a saving throw each turn or take damage.");
3493 break;
3495 case T_SEXUAL_HUG:
3496 pline("This technique tames an adjacent male monster. It has a 1 in 5 chance of taming boss monsters.");
3497 break;
3499 case T_SEX_CHANGE:
3500 pline("Well DUH :D Using it will change your sex from male to female or the other way around!");
3501 break;
3503 case T_EVEN_MORE_AMMO:
3504 pline("You must be wielding firearm ammo to use this technique, and if you do, its stack size will increase.");
3505 break;
3507 case T_DOUBLESELF:
3508 pline("Only player characters that are currently polymorphed into a monster can use this technique, and if you do so, you'll spawn a tame monster of the same type as your current polymorph form.");
3509 break;
3511 case T_POLYFIX:
3512 pline("Using this technique lets you select a hazy item in your open inventory, which will become un-hazy so it won't polymorph back into the original item.");
3513 break;
3515 case T_SQUEAKY_REPAIR:
3516 pline("This technique creates a fart trap on your current location and triggers it, but only if there was no trap on your location. If the trap was successfully made, you then get to repair an item of your choice in your main inventory.");
3517 break;
3519 case T_BULLETREUSE:
3520 pline("Using this technique makes your firearm ammo reusable for a while, i.e. ammos that you shot may drop on the ground and be re-used, although most of the time they'll still be mulched.");
3521 break;
3523 case T_EXTRACHARGE:
3524 pline("This technique lets you pick a wand in your open inventory and add a charge to it without incrementing the recharge counter and without the chance of blowing up the wand, but caution: the wand must be one that can be recharged indefinitely. Using it on one that can only be recharged once (e.g. wand of wishing) will not work.");
3525 break;
3527 case T_STARWARS_FRIENDS:
3528 pline("A technique that tries to tame all adjacent monsters which are from Castle of the Winds or joke monsters, but they get a resistance roll. Also, one tame such monster is generated from thin air.");
3529 break;
3531 case T_USE_THE_FORCE_LUKE:
3532 pline("This technique lasts for a period of time and increases the damage of the #force command while active.");
3533 break;
3535 case T_TERRAIN_CLEANUP:
3536 pline("This powerful technique removes most annoying terrain from the eight squares surrounding you: water, trees, ice, farmland, nether mist and so on... It doesn't raze walls though, and furniture (e.g. wagons or fountains) is unaffected. The general rule of thumb is that if the terrain type can replace walls in maze levels, it will be affected.");
3537 break;
3539 case T_SYMBIOSIS:
3540 pline("The basic symbiosis technique, using this will create a symbiote item out of thin air with which you can then perform symbiosis. It's probably a good idea to use this technique whenever you can, as it allows you to slowly but steadily build up a supply of symbiote items for later use.");
3541 break;
3543 case T_ADJUST_SYMBIOTE:
3544 pline("Adjusts the aggressivity of your symbiotes, which is a global value that persists even if you switch to a different symbiote. Higher aggressivity means that your symbiote's attacks trigger more often, and damage that you would normally take is redirected to the symbiote more often.");
3545 break;
3547 case T_HEAL_SYMBIOTE:
3548 pline("Damages you by half of your current HP and transfers that amount of hit points to your symbiote, but if that causes it to be overhealed, the extra points will just go to waste.");
3549 break;
3551 case T_BOOST_SYMBIOTE:
3552 pline("Whenever you use this technique, your symbiote's maximum health will increase. However, there is a cap of 500 HP for the symbiote.");
3553 break;
3555 case T_POWERBIOSIS:
3556 pline("Activating this technique temporarily allows your symbiote to deal double damage and take half damage.");
3557 break;
3559 case T_UNARMED_FOCUS:
3560 pline("A technique meant to be used by those who really want to focus on bare-handed or martial arts combat. It lasts for a pretty long time, and even longer if you keep wearing a robe of focussing. While it's active, it increases the base damage multiplier of your fists by about 50%%. However, all other active techniques are stopped and while it's active, you cannot use any techniques at all. Also, trying to use a weapon with this technique active gives a hefty to-hit penalty, so you'd better make sure you really want to focus on fighting unarmed!");
3561 break;
3563 case T_UNDERTOW:
3564 pline("Allows you to try to drown a monster. For that to work, either you or the monster needs to be on a water square (can be a pool, moat, watery tunnel or crystal water) and the monster may not be unbreathing of course.");
3565 break;
3567 case T_DEFINALIZE:
3568 pline("If you're annoyed by all the finalized items that you cannot polymorph, blank or cancel, this technique allows you to remove the finalized flag from one item.");
3569 break;
3571 case T_ANTI_INERTIA:
3572 pline("Useful when you're slowed down by inertia, because it reduces the amount of time for which you're slowed.");
3573 break;
3575 case T_GRENADES_OF_COURSE:
3576 pline("Creates frag grenades or gas grenades.");
3577 break;
3579 case T_IMPLANTED_SYMBIOSIS:
3580 pline("This technique lasts for quite a while when you use it. While active, you benefit from the more powerful implant effects as long as you're in symbiosis, and if your implant is positively enchanted, your symbiote will take less damage based on the exact enchantment value.");
3581 break;
3583 case T_ASSUME_SYMBIOTE:
3584 pline("Polymorphs you into the base monster type of your current symbiote. Doing that causes your symbiote to persist, so don't worry about it dying from this tech - it just makes it so that both you and your symbiote are of the same species. What's more, you will be able to move around as long as you still have the symbiote, even though symbiotes are characterized by the fact that they're nonmoving monsters.");
3585 break;
3587 case T_GENERATE_OFFSPRING:
3588 pline("If you use this technique while having a symbiote, you will lay an egg of the symbiote's monster type that will hatch tame after a while.");
3589 break;
3591 case T_PREACHING:
3592 pline("Using this technique breaks the atheist conduct and slightly increases your alignment record, but not above the current maximum.");
3593 break;
3595 case T_ON_THE_SAME_TEAM:
3596 pline("Tries to pacify hostile neutral-aligned monsters next to you, but they get a resistance roll.");
3597 break;
3599 case T_SPELL_SPAM:
3600 pline("A tech that lasts for a hundred turns or so, and while active, your spells don't lose spell memory over time, cost a bit less mana, and are more effective if they're of a type that scales with skill.");
3601 break;
3603 case T_DROP_BOULDER:
3604 pline("Creates a boulder on your square when used.");
3605 break;
3607 case T_SPRINT:
3608 pline("Requires you to wear stiletto heels, and makes you super fast for a couple of turns when used, but it only affects movement. Other actions still happen at your regular speed.");
3609 break;
3610 case T_SKULL_CRUSH:
3611 pline("This technique can only be used when you're wearing stiletto heels. After using it, you have a couple of turns to find a paralyzed monster that has a head and is not a boss, and then you can kick that monster to kill it instantly! For best results, have a way of paralyzing opponents ready.");
3612 break;
3613 case T_FEMALE_COMBO:
3614 pline("Requires cone heels to be worn, and once activated, you have to kick a monster every turn or the technique will end. Every kick that hits an enemy while the female combo is active will deal more damage than the previous one.");
3615 break;
3616 case T_DOCKLOCK:
3617 pline("Creates a sexy leather pump with positive enchantment, which is a hammer-class weapon that you can wield and bash enemies with. While this technique is active, the sexy leather pump will do bonus damage against enemies who have a head and can also occasionally paralyze them.");
3618 break;
3619 case T_BITCH_POSING:
3620 pline("This technique works only while you're wearing block heels. If they're negatively enchanted, they lose some negative enchantment, otherwise there's a chance for the heels to gain a point of enchantment up to a maximum of +7. Additionally, monsters who are at most 3 squares away from you have to make saving throws or be turned peaceful.");
3621 break;
3622 case T_SEXY_STAND:
3623 pline("Lasts for a while, but works only if you wear block heels. While active, you have intrinsic free action and if you still get paralyzed, the paralysis will time out very quickly.");
3624 break;
3625 case T_MARATHON:
3626 pline("This technique lasts for quite a while, but doesn't do anything unless you're wearing wedge heels. If you are, your movement is faster than normal.");
3627 break;
3628 case T_PERFUME_STRIDE:
3629 pline("Requires you to be wearing wedge heels, which become sticky heavily cursed upon using this technique, and a tame perfume monster is summoned. The technique then lasts for a while and as long as it's still active, you cannot take your heels off, even if you manage to uncurse them.");
3630 break;
3631 case T_NAUGHTY_HEELOT:
3632 pline("This technique lasts for quite a while. When active, a pair of shoes that has a randomized appearance counting as cone heels and a base type counting as stiletto heels (or the other way around) allows you to use both of those skills at the same time. You'd have to get pretty lucky to find such a pair of shoes, though.");
3633 break;
3634 case T_EXTREME_STURDINESS:
3635 pline("Works while you're wearing either block or wedge heels, lasts for a bunch of turns, and gives you a 50%% chance of not taking damage whenever something tries to damage you.");
3636 break;
3637 case T_BUTT_PROTECTION:
3638 pline("If you're wearing cone heels, this technique will last for a while and as long as it's active, any male monster that hits you in melee takes some damage in return, provided it has legs that can be scratched by your heels. The more often such a monster is hit by that damage, the higher the amount of damage that it takes.");
3639 break;
3640 case T_PROFILING:
3641 pline("Allows you to enchant a pair of block-heeled boots that you're wearing, up to a maximum of +5, but you can't just use it an infinite amount of times on the same pair. Eventually, it'll stop working for a particular pair of boots, although you can still use it on others.");
3642 break;
3643 case T_STAR_HEEL_SWAP:
3644 pline("You must be wearing a pair of wedge heels and have a morning star wielded in your main hand if you want to use this technique. Then, what happens is that these two items swap their enchantment value and BUC.");
3645 break;
3646 case T_HEEL_STAB:
3647 pline("You can only use this technique if you're wearing a pair of stiletto heels and wielding a knife. Then, it'll last a while, and your knife will gain a +5 damage bonus, plus the enchantment value of your boots if that's higher than 0.");
3648 break;
3650 case T_EARTHSHAKE:
3651 pline("This technique mimics the scroll of earth, dropping boulders on your square and the eight squares surrounding you, but minus the effect of boulders hitting monsters.");
3652 break;
3654 case T_MARTIAL_STYLE:
3655 pline("A must have for martial arts users, this technique lets you switch to different martial arts styles. Depending on your skill levels, certain ones are available, plus brawling, which is the default. All other styles have upsides and downsides, so choose wisely, because the only way to switch is by using this tech again! Also, most of these styles work only if you're fighting bare-handed.");
3656 break;
3658 case T_PERMAMORPH:
3659 pline("This powerful technique lets you target an adjacent monster and tries to polymorph it, although it can resist via monster magic resistance and those that have player-style magic resistance are outright immune. If you're successful in polymorphing it, the monster's polymorph will be semi-permanent.");
3660 break;
3662 case T_HARDCORE_ALIENIZATION:
3663 pline("Creates a shemagh out of thin air and forces you to wear it, unequipping any other helmet-slot item you may be wearing.");
3664 break;
3666 case T_PACIFY:
3667 pline("Targets an adjacent humanoid monster and tries to turn it peaceful, although it can also resist. Shopkeepers, guards, temple priests and unique monsters are immune.");
3668 break;
3670 case T_AFTERBURNER:
3671 pline("For a few turns after using this technique, it shoots fire bolts in the direction you came from.");
3672 break;
3674 case T_BUGGARD:
3675 pline("Deals cold damage and tries to slow targets in a 5x5 area near you, although it doesn't always hit. This technique lasts for a few turns before it ends.");
3676 break;
3678 case T_THUNDERSTORM:
3679 pline("Lasts for a while and periodically deals lightning damage to nearby monsters.");
3680 break;
3682 case T_AUTOKILL:
3683 pline("Shoots highly damaging lightning bolts in all eight directions. This technique sets a timeout for all of the following techniques: autokill, chain thunderbolt and flashing mischief.");
3684 break;
3686 case T_CHAIN_THUNDERBOLT:
3687 pline("Shoots an invisible globe in a direction of your choosing, which will travel for 8 squares or until it hits a terrain obstacle. At the target destination, it shoots highly damaging lightning bolts in all eight directions. This technique sets a timeout for all of the following techniques: autokill, chain thunderbolt and flashing mischief.");
3688 break;
3690 case T_FLASHING_MISCHIEF:
3691 pline("Shoots an invisible globe in a direction of your choosing, which will travel for 8 squares or until it hits a terrain obstacle. For each square it travels, the globe shoots a highly damaging lightning bolt in a random direction. This technique sets a timeout for all of the following techniques: autokill, chain thunderbolt and flashing mischief.");
3692 break;
3694 case T_KAMEHAMEHA:
3695 pline("A single-target ranged attack that travels in the chosen direction for 8 squares, but not through terrain obstacles, and deals damage to the first monster it hits.");
3696 break;
3698 case T_SHADOW_MANTLE:
3699 pline("Darkens the area and blinds nearby monsters.");
3700 break;
3702 case T_VACUUM_STAR:
3703 pline("Creates throwing stars out of thin air.");
3704 break;
3706 case T_BLADE_SHIELD:
3707 pline("This technique lasts for a while and periodically deals damage to hostile monsters adjacent to you.");
3708 break;
3710 case T_GREEN_WEAPON:
3711 pline("Requires you to be wielding a claw, which will be badly poisoned, making it less likely to lose its poisoning compared to regular poisoned weapons.");
3712 break;
3714 case T_LIGHTER_BALLS:
3715 pline("Lasts for quite a while, and reduces the weight of your wielded heavy iron ball by half while active.");
3716 break;
3718 case T_BALLSLIFF:
3719 pline("This technique only works if you're wielding a heavy iron ball, or another type of heavy ball as a weapon, and repairs a bit of damage on the ball.");
3720 break;
3722 case T_JAVELIN_FORGING:
3723 pline("Creates a random javelin when used.");
3724 break;
3726 case T_VENOM_MIXING:
3727 pline("An arcane technique that allows you to create venom out of thin air.");
3728 break;
3730 case T_ROCK_TO_POISON:
3731 pline("Allows you to target a stack of regular rocks, which may not be an artifact, and attempts to turn them into acid venoms. The standard rules for manipulating a stack apply, so in most cases, attempting to target a stack of more than 25 rocks may fail.");
3732 break;
3734 case T_INJECTION:
3735 pline("Targets an adjacent monster and hits it with nerve poison, damaging and paralyzing it as long as it doesn't resist.");
3736 break;
3738 case T_SUPER_POISON:
3739 pline("Requires you to wield a stack of venoms, and tries to add some enchantment value to it. This works only if the venom's enchantment is less than +25.");
3740 break;
3742 case T_GREEN_MISSILE:
3743 pline("Lasts for a couple of turns, and as long as it's active, throwing venoms will additionally launch poison blasts at the enemy.");
3744 break;
3746 case T_BIG_N_VEINY:
3747 pline("Activating this technique means that monsters who hit you in melee are hit with poison for a while.");
3748 break;
3750 case T_PLANT_TERROR:
3751 pline("Transforms you into a meshera plant for a couple dozen turns. That's an immobile monster, so be aware that you cannot run away once transformed. In addition, a few tame little poison ivies are summoned who will help you plant new trees in Gotham Forest. You can only hope that Batsy, that old bat, won't come to try and stop you with his batarangs, though.");
3752 break;
3754 case T_POISON_PEN_LETTER:
3755 pline("Doesn't last very long at all, but while it does last, you can engrave with venoms. Doing so releases a stinking cloud at your location, which is bigger the more letters you engrave at once.");
3756 break;
3758 case T_CORONATION_CULMINATION:
3759 pline("Infects you with covid-19 and gives a random good effect when used.");
3760 break;
3762 case T_RESTORE_LIFE_LEVELS:
3763 pline("When using this technique after you got your levels drained, they will be restored. No effect if your level wasn't drained.");
3764 break;
3766 case T_MAKE_A_WISH:
3767 pline("Using this technique requires you to guess an item. If you guess correctly, you get the item in question, otherwise you're forced to equip a bad item.");
3768 break;
3770 case T_TOILET_VISIT:
3771 pline("If you want to play the antje trap 2 minigame where you visit the public toilet, you can use this technique. You will also gain maximum health and cure sickness when doing so.");
3772 break;
3774 case T_POLE_MELEE:
3775 pline("For a while, your polearms and lances are effective at close range after you've used this technique.");
3776 break;
3778 case T_CHOP_CHOP:
3779 pline("In order to use this technique, you have to be wielding an axe, which will hit all adjacent monsters. Be careful, it can also hit peaceful targets!");
3780 break;
3782 case T_BANISHMENT:
3783 pline("Allows you to banish an adjacent monster, sending it to a random dungeon level. Careful: if the demigod event has already been triggered, it only teleports the monster on the current level!");
3784 break;
3786 case T_PARTICIPATION_LOSS:
3787 pline("This extremely powerful technique lets you delete an adjacent monster from the game, but it doesn't work against bosses, shopkeepers or temple priests. Be aware that the monster's inventory is deleted with it (macguffins will drop to the floor to prevent the game from becoming unwinnable).");
3788 break;
3790 case T_WEAPON_BLOCKER:
3791 pline("A technique that lasts for a while, but requires you to be dual-wielding. While active, you have a chance of using your weapons to block melee attacks and projectiles.");
3792 break;
3794 case T_EXTRA_MEMORY:
3795 pline("You can select a spell and increase its memory with this technique. It has a minuscule chance of working on a forgotten spell, allowing you to cast it again, but most of the time, using it on a forgotten spell will simply fail.");
3796 break;
3798 case T_GRAP_SWAP:
3799 pline("Temporarily makes your grinder work like a lance and your lance will work like a grinder. Or if that sounds like Chinese to you, it means that you can joust with a grinder and grind with a lance.");
3800 break;
3802 case T_DIABOLIC_MINION:
3803 pline("If you use this technique, a random tame Diablo monster is summoned.");
3804 break;
3806 case T_CURE_AMNESIA:
3807 pline("A useful technique that removes the 'map amnesia' intrinsic. Be aware that if you're e.g. playing the amnesiac race, you'll still have map amnesia. It's useful especially when you triggered a lasting amnesia trap.");
3808 break;
3810 case T_ELEMENTAL_IMBUE:
3811 pline("This technique transforms your currently wielded weapon into an elemental-branded artifact. It works only if the weapon in question is neither a real nor fake artifact, and only if it's actually listed under 'weapons' in your inventory. Plus, it obviously doesn't work on a stack.");
3812 break;
3814 case T_HIDDEN_POWER:
3815 pline("Using this technique creates a specific item, the identity of which depends on the skill you used for unlocking the technique.");
3816 break;
3818 case T_SWORD_ART:
3819 pline("Requires you to wield a weapon that uses one of the following skills: short sword, broad sword, long sword or two-handed sword. The weapon in question will gain one level of enchantment, but not beyond +7.");
3820 break;
3822 case T_FIRM_CUDGEL:
3823 pline("Requires you to wield a weapon that uses one of the following skills: mace, flail, club or hammer. The weapon in question will be erosionproofed and all erosion damage is repaired.");
3824 break;
3827 default:
3828 pline("This technique doesn't have a description yet, but it might get one in future. --Amy");
3829 break;
3832 if (yn("Use this technique?") == 'y') return techeffects(tech_no);
3835 return 0;
3837 } else if (gettech(&tech_no)) {
3838 return techeffects(tech_no);
3840 return 0;
3844 static NEARDATA const char kits[] = { TOOL_CLASS, 0 };
3846 static struct obj *
3847 use_medical_kit(type, feedback, verb)
3848 int type;
3849 boolean feedback;
3850 char *verb;
3852 struct obj *obj, *otmp;
3853 makeknown(MEDICAL_KIT);
3854 if (!(obj = carrying(MEDICAL_KIT))) {
3855 if (feedback) You("need a medical kit to do that.");
3856 return (struct obj *)0;
3858 for (otmp = invent; otmp; otmp = otmp->nobj)
3859 if (otmp->otyp == MEDICAL_KIT && otmp != obj)
3860 break;
3861 if (otmp) { /* More than one medical kit */
3862 obj = getobj(kits, verb);
3863 if (!obj)
3864 return (struct obj *)0;
3866 for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
3867 if (otmp->otyp == type)
3868 break;
3869 if (!otmp) {
3870 if (feedback)
3871 You_cant("find any more %s in %s.",
3872 makeplural(simple_typename(type)), yname(obj));
3873 return (struct obj *)0;
3875 return otmp;
3878 /* gettech is reworked getspell */
3879 /* reworked class special effects code */
3880 /* adapted from specialpower in cmd.c */
3881 static int
3882 techeffects(tech_no)
3883 int tech_no;
3885 /* These variables are used in various techs */
3886 struct obj *obj, *otmp;
3887 const char *str;
3888 struct monst *mtmp;
3889 int num;
3890 char Your_buf[BUFSZ];
3891 char allowall[2];
3892 int i, j, t_timeout = 0;
3894 boolean maybeleveltech = FALSE;
3896 /* check timeout */
3897 if (tech_inuse(techid(tech_no))) {
3898 pline("This technique is already active!");
3899 return (0);
3901 if (techtout(tech_no) /*&& !can_limitbreak()*/) {
3902 You("have to wait %s before using your technique again.",
3903 (techtout(tech_no) > 100) ?
3904 "for a while" : "a little longer");
3905 #ifdef WIZARD
3906 if (!wizard || (yn("Use technique anyways?") == 'n'))
3907 #endif
3908 return(0);
3911 if ((TechTrapEffect || u.uprops[TECHBUG].extrinsic || have_techniquestone()) && (rn2(10) || TechBugXtra ) ) {
3913 pline("Unfortunately, nothing happens.");
3914 techtout(tech_no) = rnz(5000);
3915 if (ishaxor && techtout(tech_no) > 1) techtout(tech_no) /= 2;
3916 /*By default, action should take a turn*/
3917 return(1);
3921 if (uarmc && uarmc->oartifact == ART_ARTIFICIAL_FAKE_DIFFICULTY && !rn2(6)) {
3923 pline("Unfortunately, nothing happens.");
3924 techtout(tech_no) = rnz(1000);
3925 if (ishaxor && techtout(tech_no) > 1) techtout(tech_no) /= 2;
3926 /*By default, action should take a turn*/
3927 return(1);
3931 if (Role_if(PM_FAILED_EXISTENCE) && rn2(2)) {
3933 pline("Unfortunately, nothing happens.");
3934 techtout(tech_no) = rnz(1000);
3935 if (ishaxor && techtout(tech_no) > 1) techtout(tech_no) /= 2;
3936 /*By default, action should take a turn*/
3937 return(1);
3941 if (tech_inuse(T_UNARMED_FOCUS)) {
3943 pline("While you're focussing on unarmed combat, you cannot use any techniques. Sorry!");
3944 return(0);
3948 /* switch to the tech and do stuff */
3949 switch (techid(tech_no)) {
3950 case T_RESEARCH:
3951 /* WAC stolen from the spellcasters...'A' can identify from
3952 historical research*/
3953 if(Hallucination || (Stunned && !Stun_resist) || (Confusion && !Conf_resist) ) {
3954 You("can't concentrate right now!");
3955 return(0);
3956 } else if((ACURR(A_INT) + ACURR(A_WIS)) < rnd(60)) {
3957 pline("Nothing in your pack looks familiar.");
3958 t_timeout = rnz(2000);
3959 break;
3960 } else if(invent) {
3961 You("examine your possessions.");
3962 identify_pack((int) ((techlevX(tech_no) / 10) + 1), 0, 0);
3963 } else {
3964 /* KMH -- fixed non-compliant string */
3965 You("are already quite familiar with the contents of your pack.");
3966 break;
3968 t_timeout = rnz(5000);
3969 break;
3970 case T_EVISCERATE:
3971 /* only when empty handed, in human form */
3972 if (Upolyd || uwep || uarmg) {
3973 You_cant("do this while %s!", Upolyd ? "polymorphed" :
3974 uwep ? "holding a weapon" : "wearing gloves");
3975 return 0;
3977 Your("fingernails extend into claws!");
3978 aggravate();
3979 techt_inuse(tech_no) = d(2,4) + techlevX(tech_no)/2 + 2;
3980 t_timeout = rnz(2000);
3981 break;
3982 case T_BERSERK:
3983 You("fly into a berserk rage!");
3984 techt_inuse(tech_no) = d(2,8) +
3985 (techlevX(tech_no)/2) + 2;
3986 incr_itimeout(&HFast, techt_inuse(tech_no));
3987 t_timeout = rnz(1500);
3988 break;
3989 case T_REINFORCE:
3990 /* WAC spell-users can study their known spells*/
3991 if(Hallucination || (Stunned && !Stun_resist) || (Confusion && !Conf_resist) ) {
3992 You("can't concentrate right now!");
3993 break;
3994 } else {
3995 You("concentrate...");
3996 if (studyspell()) t_timeout = rnz(1500); /*in spell.c*/
3998 break;
3999 case T_FLURRY:
4000 Your("%s %s become blurs as they reach for your quiver!",
4001 uarmg ? "gloved" : "bare", /* Del Lamb */
4002 makeplural(body_part(HAND)));
4003 techt_inuse(tech_no) = rnd((int) (techlevX(tech_no)/6 + 1)) + 2;
4004 t_timeout = rnz(1500);
4005 break;
4006 case T_INVOKE_DEITY: /* ask for healing if your alignment record is positive --Amy */
4008 if (Race_if(PM_MACTHEIST)) {
4009 pline("As an atheist, you cannot use such a technique.");
4010 return 0;
4013 if (u.ualign.record < 0) {
4015 if ( (Inhell && !Race_if(PM_HERETIC) ) || flags.gehenna ) {
4016 pline("%s is inaccessible, and %s decides to smite you!",u_gname(), Role_if(PM_GANG_SCHOLAR) ? "Anna" : Role_if(PM_WALSCHOLAR) ? "Anna" : "Moloch" );
4017 u.ublesscnt += rnz(-u.ualign.record);
4018 if (Role_if(PM_GANG_SCHOLAR)) losehp(rnz(-u.ualign.record), "annoying Anna", KILLED_BY);
4019 else if (Role_if(PM_WALSCHOLAR)) losehp(rnz(-u.ualign.record), "annoying Anna", KILLED_BY);
4020 else losehp(rnz(-u.ualign.record), "annoying Moloch", KILLED_BY);
4021 } else {
4022 pline("%s smites you for your sins!",u_gname() );
4023 u.ublesscnt += rnz(-u.ualign.record);
4024 losehp(rnz(-u.ualign.record), "disturbing their deity", KILLED_BY);
4026 /* If your deity feels annoyed, they will damage you and increase your prayer timeout. They won't get angry though. */
4029 else if (Race_if(PM_IMPERIAL)) {
4030 pline("%s hates you and decides you need to be punished!",u_gname() );
4031 u.ublesscnt += rnz(monster_difficulty() + 1 );
4032 losehp(rnz(monster_difficulty() + 1 ), "being a pesky heretic", KILLED_BY);
4033 /* Imperials cannot use this technique successfully. */
4036 else if ( (Inhell && !Race_if(PM_HERETIC) ) || flags.gehenna ) {
4037 pline("%s is inaccessible, and %s decides to smite you!",u_gname(), Role_if(PM_GANG_SCHOLAR) ? "Anna" : Role_if(PM_WALSCHOLAR) ? "Anna" : "Moloch" );
4038 u.ublesscnt += rnz(monster_difficulty() + 1 );
4039 losehp(rnz(monster_difficulty() + 1 ), "trying to contact their deity in Gehennom", KILLED_BY);
4040 /* Trying to invoke a deity in Gehennom is never a good idea... */
4043 else if (u.ualign.record > 0) {
4044 pline("%s commends your efforts and grants you a boon.",u_gname() );
4045 u.ublesscnt -= rnz(u.ualign.record + techlevX(tech_no) );
4046 if(u.ublesscnt < 0) u.ublesscnt = 0;
4047 healup( rnz(u.ualign.record + techlevX(tech_no)) , 0, FALSE, FALSE);
4048 /* If your deity is pleased with you, heal some damage and decrease your prayer timeout. */
4051 else { /* alignment record exactly 0, do nothing */
4052 pline("%s ignores your pleadings.",u_gname() );
4055 u.uconduct.gnostic++; /* you just tried to access your god */
4056 if (Race_if(PM_MAGYAR)) {
4057 You_feel("bad about breaking the atheist conduct.");
4058 badeffect();
4060 use_skill(P_SPIRITUALITY, Role_if(PM_PRIEST) ? 10 : 2);
4061 t_timeout = rnz(3000);
4062 break;
4063 case T_APPRAISAL:
4064 if(!uwep) {
4065 You("are not wielding anything!");
4066 return(0);
4067 } else if (weapon_type(uwep) == P_NONE) {
4068 You("examine %s.", doname(uwep));
4069 uwep->known = TRUE;
4070 You("discover it is %s",doname(uwep));
4071 if (u.enchantrecskill < 100 || !rn2(u.enchantrecskill)) {
4072 u.enchantrecskill++;
4073 if (u.enchantrecskill > 250) u.enchantrecskill = 250;
4075 if (uwep && uwep->oartifact == ART_KAMAHEWA && uwep->spe < 7) {
4076 uwep->spe++;
4077 Your("gauntlets seem more effective.");
4079 t_timeout = rnz(2000);
4080 } else {
4081 You("examine %s.", doname(uwep));
4082 uwep->known = TRUE;
4083 You("discover it is %s",doname(uwep));
4084 if (u.weapchantrecskill < 100 || !rn2(u.weapchantrecskill)) {
4085 u.weapchantrecskill++;
4086 if (u.weapchantrecskill > 250) u.weapchantrecskill = 250;
4089 if (Race_if(PM_GERTEUT) && is_poisonable(uwep) && !stack_too_big(uwep)) {
4090 Your("%s is poisoned.", doname(uwep));
4091 uwep->opoisoned = TRUE;
4093 if (uwep && uwep->oartifact == ART_KAMAHEWA && uwep->spe < 7) {
4094 uwep->spe++;
4095 Your("gauntlets seem more effective.");
4097 if (!(uarmc && uarmc->oartifact == ART_PINEAPPLE_TYCOON_S_FINISH) || !rn2(4)) {
4098 t_timeout = rnz(200);
4101 break;
4103 case T_PHASE_DOOR:
4104 phase_door(0);
4105 if (!Role_if(PM_CAMPERSTRIKER) || !rn2(4)) t_timeout = rnz(1000);
4106 break;
4108 case T_PANIC_DIGGING:
4109 pline("You perform the panic digging ritual and are paralyzed for a while.");
4110 int maderoom = 0;
4112 do_clear_areaX(u.ux, u.uy, 1, undo_lockfloodP, (void *)&maderoom);
4114 if (maderoom) pline("Some solid rock is pulverized!");
4115 else pline("There was nothing to dig out...");
4117 if (isstunfish) nomul(-rnz(20), "panic digging", TRUE);
4118 else nomul(-rn1(10, 10), "panic digging", TRUE);
4119 if (!PlayerCannotUseSkills && P_SKILL(P_PICK_AXE) >= P_SUPREME_MASTER) t_timeout = rnz(500);
4120 else if (!PlayerCannotUseSkills && P_SKILL(P_PICK_AXE) >= P_GRAND_MASTER) t_timeout = rnz(1500);
4121 else if (!PlayerCannotUseSkills && P_SKILL(P_PICK_AXE) >= P_MASTER) t_timeout = rnz(2500);
4122 else t_timeout = rnz(5000);
4123 break;
4125 case T_SECURE_IDENTIFY:
4127 if (CannotSelectItemsInPrompts) break;
4128 pline("Choose an item for secure identification.");
4130 secureidchoice:
4132 otmp = getobj(allnoncount, "secure identify");
4134 if (!otmp) {
4135 if (yn("Really exit with no object selected?") == 'y')
4136 pline("You just wasted the opportunity to secure identify your objects.");
4137 else goto secureidchoice;
4138 pline("A feeling of loss comes over you.");
4139 break;
4141 if (otmp) {
4142 makeknown(otmp->otyp);
4143 if (otmp->oartifact) discover_artifact((int)otmp->oartifact);
4144 otmp->known = otmp->dknown = otmp->bknown = otmp->rknown = 1;
4145 if (otmp->otyp == EGG && otmp->corpsenm != NON_PM)
4146 learn_egg_type(otmp->corpsenm);
4147 prinv((char *)0, otmp, 0L);
4152 if (u.glassgolemdown) t_timeout = rnz(10000);
4153 else t_timeout = rnz(20000);
4154 break;
4156 case T_PRACTICE:
4157 if(!uwep || (weapon_type(uwep) == P_NONE)) {
4158 You("are not wielding a weapon!");
4159 return(0);
4160 } else if(uwep->known == TRUE) {
4161 practice_weapon();
4162 } else {
4163 if (not_fully_identified(uwep)) {
4164 You("examine %s.", doname(uwep));
4165 if (rnd(15) <= ACURR(A_INT)) {
4166 makeknown(uwep->otyp);
4167 uwep->known = TRUE;
4168 if (u.weapchantrecskill < 100 || !rn2(u.weapchantrecskill)) {
4169 u.weapchantrecskill++;
4170 if (u.weapchantrecskill > 250) u.weapchantrecskill = 250;
4172 You("discover it is %s",doname(uwep));
4173 } else
4174 pline("Unfortunately, you didn't learn anything new.");
4176 /*WAC Added practicing code - in weapon.c*/
4177 practice_weapon();
4179 t_timeout = rnz(1000);
4180 break;
4181 case T_SURGERY:
4182 if (Hallucination || (Stunned && !Stun_resist) || (Confusion && !Conf_resist) ) {
4183 You("are in no condition to perform surgery!");
4184 break;
4186 if (Sick || Slimed) {
4187 if (carrying(SCALPEL)) {
4188 pline("Using your scalpel (ow!), you cure your infection!");
4189 make_sick(0L, (char *)0, TRUE, SICK_ALL);
4190 Slimed = 0;
4191 if (Upolyd) {
4192 u.mh -= 5;
4193 if (u.mh < 1)
4194 rehumanize();
4195 } else if (u.uhp > 6)
4196 u.uhp -= 5;
4197 else
4198 u.uhp = 1;
4199 t_timeout = rnz(1000);
4200 flags.botl = TRUE;
4201 break;
4202 } else pline("If only you had a scalpel...");
4204 if (Upolyd ? u.mh < u.mhmax : u.uhp < u.uhpmax) {
4205 otmp = use_medical_kit(BANDAGE, FALSE,
4206 "dress your wounds with");
4207 if (otmp) {
4208 check_unpaid(otmp);
4209 if (otmp->quan > 1L) {
4210 otmp->quan--;
4211 otmp->ocontainer->owt = weight(otmp->ocontainer);
4212 } else {
4213 obj_extract_self(otmp);
4214 obfree(otmp, (struct obj *)0);
4217 use_skill(P_DEVICES,1);
4218 if (Race_if(PM_FAWN)) {
4219 use_skill(P_DEVICES,1);
4221 if (Race_if(PM_SATRE)) {
4222 use_skill(P_DEVICES,1);
4223 use_skill(P_DEVICES,1);
4226 pline("Using a bandage, you dress your wounds."); /* read after free fix by Demo */
4227 healup(techlevX(tech_no) * (rnd(2)+1) + (rn1(5,5) * techlevX(tech_no)),
4228 0, FALSE, FALSE);
4229 } else {
4230 You("strap your wounds as best you can.");
4231 healup(techlevX(tech_no) + rn1(5,5), 0, FALSE, FALSE);
4233 t_timeout = rnz(1500);
4234 flags.botl = TRUE;
4235 } else You("don't need your healing powers!");
4236 break;
4237 case T_HEAL_HANDS:
4238 if (Slimed) {
4239 Your("body is on fire!");
4240 burn_away_slime();
4241 t_timeout = rnz(3000);
4242 } else if (Sick) {
4243 You("lay your hands on the foul sickness...");
4244 make_sick(0L, (char*)0, TRUE, SICK_ALL);
4245 t_timeout = rnz(3000);
4246 } else if (Upolyd ? u.mh < u.mhmax : u.uhp < u.uhpmax) {
4247 pline("A warm glow spreads through your body!");
4248 healup(techlevX(tech_no) * 4, 0, FALSE, FALSE);
4249 t_timeout = rnz(3000);
4250 } else {
4251 pline("%s", nothing_happens);
4252 if (FailureEffects || u.uprops[FAILURE_EFFECTS].extrinsic || have_failurestone()) {
4253 pline("Oh wait, actually something bad happens...");
4254 badeffect();
4257 break;
4258 case T_KIII:
4259 You("scream \"KIIILLL!\"");
4260 aggravate();
4261 techt_inuse(tech_no) = rnd((int) (techlevX(tech_no)/2 + 1)) + 2;
4262 t_timeout = rnz(1500);
4263 break;
4264 case T_CALM_STEED:
4266 if (u.usteed) pline("You calm your steed.");
4267 int calmedX;
4268 calmedX = 0;
4270 if (u.usteed) {
4273 pline("%s gets tamer.", Monnam(u.usteed));
4274 tamedog(u.usteed, (struct obj *) 0, FALSE); /* caveat: you might be riding a non-tame monster */
4276 while (calmedX == 0) { /* remove the stupid bug that caused this tech to do nothing --Amy */
4278 if (u.usteed && u.usteed->mtame < 20) u.usteed->mtame++;
4280 if (techlevX(tech_no) < rnd(50)) calmedX++; /* high level tech has high chance of extra tameness */
4284 t_timeout = rnz(1500);
4285 } else
4286 Your("technique is only effective when riding a monster.");
4287 break;
4288 case T_TURN_UNDEAD:
4289 if (!turn_undead()) t_timeout = rnz(10);
4290 else t_timeout = rnz(50);
4291 break;
4292 case T_VANISH:
4293 if (Invisible && Fast) {
4294 You("are already quite nimble and undetectable.");
4296 techt_inuse(tech_no) = rn1(10,10) + (techlevX(tech_no) * 2);
4297 if (!Invisible) pline("In a puff of smoke, you disappear!");
4298 if (!Fast) You_feel("more nimble!");
4299 incr_itimeout(&HInvis, techt_inuse(tech_no));
4300 incr_itimeout(&HFast, techt_inuse(tech_no));
4301 newsym(u.ux,u.uy); /* update position */
4302 t_timeout = rnz(1500);
4303 break;
4304 case T_CRIT_STRIKE:
4305 if (!getdir((char *)0)) return(0);
4306 if (!u.dx && !u.dy) {
4307 /* Hopefully a mistake ;B */
4308 You("decide against that idea.");
4309 return(0);
4311 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
4312 pline("Invalid target location.");
4313 return 0;
4315 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
4316 if (!mtmp) {
4317 You("perform a flashy twirl!");
4318 t_timeout = rnz(1500);
4319 } else {
4320 int oldhp = mtmp->mhp;
4321 int tmp;
4323 if (!attack(mtmp)) return(0);
4324 if (!DEADMONSTER(mtmp) && mtmp->mhp < oldhp &&
4325 !noncorporeal(mtmp->data) && !unsolid(mtmp->data)) {
4326 You("strike %s vital organs!", s_suffix(mon_nam(mtmp)));
4327 /* Base damage is always something, though it may be
4328 * reduced to zero if the hero is hampered. However,
4329 * since techlev will never be zero, stiking vital
4330 * organs will always do _some_ damage.
4332 tmp = mtmp->mhp > 1 ? mtmp->mhp / 2 : 1;
4333 if (!humanoid(mtmp->data) || is_golem(mtmp->data) ||
4334 mtmp->data->mlet == S_CENTAUR) {
4335 You("are hampered by the differences in anatomy.");
4336 tmp /= 2;
4338 tmp += techlevX(tech_no);
4339 t_timeout = rnz(1500);
4340 hurtmon(mtmp, tmp);
4343 break;
4344 case T_CUTTHROAT:
4345 if (!uwep) {
4346 You("obviously can't perform that without a weapon.");
4347 return 0;
4349 if (!is_blade(uwep)) {
4350 You("need a blade to perform cutthroat!");
4351 return 0;
4353 if (!getdir((char *)0)) return 0;
4354 if (!u.dx && !u.dy) {
4355 /* Hopefully a mistake ;B */
4356 pline("Things may be going badly, but that's extreme.");
4357 return 0;
4359 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
4360 pline("Invalid target location.");
4361 return 0;
4363 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
4364 if (!mtmp) {
4365 You("attack...nothing!");
4366 t_timeout = rnz(6000);
4367 } else {
4368 int oldhp = mtmp->mhp;
4370 if (!attack(mtmp)) return 0;
4371 if (!DEADMONSTER(mtmp) && mtmp->mhp < oldhp) {
4372 if (!has_head(mtmp->data) || u.uswallow)
4373 You_cant("perform cutthroat on %s!", mon_nam(mtmp));
4374 else {
4375 int tmp = 0;
4376 int severlevel = techlevX(tech_no) * 2;
4377 if (severlevel < 1) severlevel = 1; /* fail safe */
4379 if ((rn2(8) < (techlevX(tech_no)/10 + 1)) && (mtmp->m_lev <= rnd(severlevel)) ) {
4380 You("sever %s head!", s_suffix(mon_nam(mtmp)));
4381 tmp = mtmp->mhp;
4382 } else {
4383 You("hurt %s badly!", s_suffix(mon_nam(mtmp)));
4384 tmp = mtmp->mhp / 2;
4386 tmp += techlevX(tech_no);
4387 t_timeout = rnz(6000);
4388 hurtmon(mtmp, tmp);
4392 break;
4393 case T_BLESSING:
4394 allowall[0] = ALL_CLASSES; allowall[1] = '\0';
4396 if (CannotSelectItemsInPrompts) break;
4397 if ( !(obj = getobj(allowall, "bless"))) return(0);
4398 pline("An aura of holiness surrounds your hands!");
4399 if (!Blind) (void) Shk_Your(Your_buf, obj);
4400 if (obj->cursed) {
4401 if (!Blind)
4402 pline("%s %s %s.",Your_buf,
4403 aobjnam(obj, "softly glow"),
4404 hcolor(NH_AMBER));
4405 if (!stack_too_big(obj)) uncurse(obj, FALSE);
4406 else pline("But it failed! The stack was too big...");
4407 obj->bknown=1;
4408 } else if(!obj->blessed) {
4409 if (!Blind) {
4410 str = hcolor(NH_LIGHT_BLUE);
4411 pline("%s %s with a%s %s aura.",
4412 Your_buf,
4413 aobjnam(obj, "softly glow"),
4414 index(vowels, *str) ? "n" : "", str);
4416 if (!stack_too_big(obj)) bless(obj);
4417 else pline("But it failed! The stack was too big...");
4418 obj->bknown=1;
4419 } else {
4420 if (obj->bknown) {
4421 pline ("That object is already blessed!");
4422 return(0);
4424 obj->bknown=1;
4425 pline("The aura fades.");
4427 t_timeout = rnz(7500);
4428 if (uarmc && uarmc->oartifact == ART_PRIESTEST_BLESS) t_timeout = rnz(6000);
4429 break;
4430 case T_E_FIST:
4431 blitz_e_fist();
4432 #if 0
4433 str = makeplural(body_part(HAND));
4434 You("focus the powers of the elements into your %s", str);
4435 techt_inuse(tech_no) = rnd((int) (techlevX(tech_no)/3 + 1)) + d(1,4) + 2;
4436 #endif
4437 t_timeout = rnz(1500);
4438 break;
4439 case T_PRIMAL_ROAR:
4440 You("let out a bloodcurdling roar!");
4441 aggravate();
4443 techt_inuse(tech_no) = d(2,6) + (techlevX(tech_no) * rnd(4)) + 2;
4445 incr_itimeout(&HFast, techt_inuse(tech_no));
4447 for(i = -5; i <= 5; i++) for(j = -5; j <= 5; j++)
4448 if(isok(u.ux+i, u.uy+j) && (mtmp = m_at(u.ux+i, u.uy+j))) {
4449 if (mtmp->mtame != 0 && !mtmp->isspell) {
4450 struct permonst *ptr = mtmp->data;
4451 struct monst *mtmp2;
4452 int ttime = techt_inuse(tech_no);
4453 int type = little_to_big(monsndx(ptr));
4455 mtmp2 = tamedog(mtmp, (struct obj *) 0, TRUE);
4456 if (mtmp2)
4457 mtmp = mtmp2;
4459 if (type && type != monsndx(ptr)) {
4460 ptr = &mons[type];
4461 mon_spec_poly(mtmp, ptr, ttime, FALSE,
4462 canseemon(mtmp), FALSE, TRUE);
4466 t_timeout = rnz(1500);
4467 break;
4468 case T_LIQUID_LEAP: {
4469 coord cc;
4470 int dx, dy, sx, sy, range;
4472 pline("Where do you want to leap to?");
4473 cc.x = sx = u.ux;
4474 cc.y = sy = u.uy;
4476 getpos(&cc, TRUE, "the desired position");
4477 if (cc.x == -10) return 0; /* user pressed esc */
4479 dx = cc.x - u.ux;
4480 dy = cc.y - u.uy;
4481 /* allow diagonals */
4482 if (dx && dy && dx != dy && dx != -dy) {
4483 You("can only leap in straight lines!");
4484 return 0;
4485 } else if (distu(cc.x, cc.y) > 19 + techlevX(tech_no)) {
4486 pline("Too far!");
4487 return 0;
4488 } else if (m_at(cc.x, cc.y) || !isok(cc.x, cc.y) ||
4489 IS_ROCK(levl[cc.x][cc.y].typ) ||
4490 sobj_at(BOULDER, cc.x, cc.y) ||
4491 closed_door(cc.x, cc.y)) {
4492 You_cant("flow there!"); /* MAR */
4493 return 0;
4494 } else {
4495 You("liquify!");
4496 if (Stoned) fix_petrification(); /* basically, you become an acid beam, and while I have absolutely no idea why acid would fix petrification in the first place, at least I'll make it consistent throughout the game. --Amy */
4497 if (Punished && !u.repunishcounter) {
4498 You("slip out of the iron chain.");
4499 unpunish();
4501 if(u.utrap) {
4502 switch(u.utraptype) {
4503 case TT_BEARTRAP:
4504 You("slide out of the bear trap.");
4505 break;
4506 case TT_PIT:
4507 You("leap from the pit!");
4508 break;
4509 case TT_WEB:
4510 You("flow through the web!");
4511 break;
4512 case TT_GLUE:
4513 You("get rid of the sticky glue!");
4514 break;
4515 case TT_LAVA:
4516 You("separate from the lava!");
4517 u.utrap = 0;
4518 break;
4519 case TT_INFLOOR:
4520 u.utrap = 0;
4521 You("ooze out of the floor!");
4523 u.utrap = 0;
4525 /* Fry the things in the path ;B */
4526 if (dx) range = dx;
4527 else range = dy;
4528 if (range < 0) range = -range;
4530 dx = sgn(dx);
4531 dy = sgn(dy);
4533 while (range-- > 0) {
4534 int tmp_invul = 0;
4536 if (!Invulnerable) Invulnerable = tmp_invul = 1;
4537 sx += dx; sy += dy;
4538 tmp_at(DISP_BEAM, zapdir_to_glyph(dx, dy, AD_ACID-1));
4539 tmp_at(sx,sy);
4540 delay_output(); /* wait a little */
4541 if ((mtmp = m_at(sx, sy)) != 0) {
4542 int chance;
4544 chance = rn2(20);
4545 if (!chance || (3 - chance) > AC_VALUE(find_mac(mtmp)))
4546 break;
4547 setmangry(mtmp);
4548 You("catch %s in your acid trail!", mon_nam(mtmp));
4549 if (!resists_acid(mtmp) || player_will_pierce_resistance()) {
4550 int tmp = 1;
4551 /* Need to add a to-hit */
4552 tmp += d(2,4);
4553 tmp += rn2((int) (techlevX(tech_no) + 1));
4554 if (!Blind) pline_The("acid burns %s!", mon_nam(mtmp));
4555 hurtmon(mtmp, tmp);
4556 } else if (!Blind) pline_The("acid doesn't affect %s!", mon_nam(mtmp));
4558 /* Clean up */
4559 tmp_at(DISP_END,0);
4560 if (tmp_invul) Invulnerable = 0;
4563 /* A little Sokoban guilt... */
4564 if (In_sokoban(&u.uz) && !playercancheatinsoko()) {
4565 change_luck(-1);
4566 pline("You cheater!");
4567 if (evilfriday) u.ugangr++;
4569 You("reform!");
4570 teleds(cc.x, cc.y, FALSE);
4571 nomul(-1, "liquid leaping", TRUE);
4572 nomovemsg = "";
4574 t_timeout = rnz(1500);
4575 break;
4577 case T_SIGIL_TEMPEST:
4578 /* Have enough power? */
4579 num = 50 - techlevX(tech_no);
4580 if (num < 10) num = 10;
4581 if (u.uen < num) {
4582 You("don't have enough power to invoke the sigil! You need at least %d!",num);
4583 return (0);
4585 u.uen -= num;
4587 /* Invoke */
4588 You("invoke the sigil of tempest!");
4589 techt_inuse(tech_no) = d(1,6) + rnd(techlevX(tech_no)/2 + 1) + 2;
4590 u_wipe_engr(2);
4591 t_timeout = rnz(50);
4592 return(0);
4593 break;
4594 case T_SIGIL_CONTROL:
4595 /* Have enough power? */
4596 num = 30 - techlevX(tech_no)/2;
4597 if (num < 10) num = 10;
4598 if (u.uen < num) {
4599 You("don't have enough power to invoke the sigil! You need at least %d!",num);
4600 return (0);
4602 u.uen -= num;
4604 /* Invoke */
4605 You("invoke the sigil of control!");
4606 techt_inuse(tech_no) = d(1,4) + rnd(techlevX(tech_no)/2 + 1) + 2;
4607 u_wipe_engr(2);
4608 t_timeout = rnz(50);
4609 return(0);
4610 break;
4611 case T_SIGIL_DISCHARGE:
4612 /* Have enough power? */
4613 num = 100 - techlevX(tech_no)*2;
4614 if (num < 10) num = 10;
4615 if (u.uen < num) {
4616 You("don't have enough power to invoke the sigil! You need at least %d!",num);
4617 return (0);
4619 u.uen -= num;
4621 /* Invoke */
4622 You("invoke the sigil of discharge!");
4623 techt_inuse(tech_no) = d(1,4) + rnd(techlevX(tech_no)/2 + 1) + 2;
4624 u_wipe_engr(2);
4625 t_timeout = rnz(50);
4626 return(0);
4627 break;
4628 case T_RAISE_ZOMBIES:
4629 You("chant the ancient curse...");
4630 for(i = -1; i <= 1; i++) for(j = -1; j <= 1; j++) {
4631 int corpsenm;
4633 if (!isok(u.ux+i, u.uy+j)) continue;
4634 for (obj = level.objects[u.ux+i][u.uy+j]; obj; obj = otmp) {
4635 otmp = obj->nexthere;
4637 if (obj->otyp != CORPSE) continue;
4638 /* Only generate undead */
4639 corpsenm = mon_to_zombie(obj->corpsenm);
4640 if (corpsenm != -1 && !cant_create(&corpsenm, TRUE) &&
4641 (!obj->oxlth || obj->oattached != OATTACHED_MONST)) {
4642 /* Maintain approx. proportion of oeaten to cnutrit
4643 * so that the zombie's HP relate roughly to how
4644 * much of the original corpse was left.
4646 if (obj->oeaten)
4647 obj->oeaten =
4648 eaten_stat(mons[corpsenm].cnutrit, obj);
4649 obj->corpsenm = corpsenm;
4650 mtmp = revive(obj);
4651 if (mtmp) {
4652 if (!resist(mtmp, SPBOOK_CLASS, 0, TELL) || ((rnd(30 - ACURR(A_CHA))) < 4) ) {
4653 mtmp = tamedog(mtmp, (struct obj *) 0, FALSE);
4654 You("dominate %s!", mon_nam(mtmp));
4655 } else setmangry(mtmp);
4660 nomul(-2, "recovering from an attempt to raise zombies", TRUE); /* You need to recover */
4661 nomovemsg = 0;
4662 t_timeout = rnz(1500);
4663 break;
4664 case T_REVIVE:
4666 if (CannotSelectItemsInPrompts) break;
4667 if (u.uswallow) {
4668 You("%s", no_elbow_room);
4669 return 0;
4671 num = 100 - techlevX(tech_no); /* WAC make this depend on mon? */
4672 if (num < 25) num = 25;
4673 if ((Upolyd && u.mh <= num) || (!Upolyd && u.uhp <= num)){
4674 You("don't have the strength to perform revivification!");
4675 return 0;
4678 obj = getobj((const char *)revivables, "revive");
4679 if (!obj) return (0);
4680 mtmp = revive(obj);
4681 if (mtmp) {
4682 if (Is_blackmarket(&u.uz))
4683 setmangry(mtmp);
4684 else
4685 if (mtmp->isshk)
4686 make_happy_shk(mtmp, FALSE);
4687 else if (!resist(mtmp, SPBOOK_CLASS, 0, NOTELL) || (((rnd(30 - ACURR(A_CHA))) < 4) && !resist(mtmp, SPBOOK_CLASS, 0, TELL) ) || (((rnd(30 - ACURR(A_CHA))) < 4) && !resist(mtmp, SPBOOK_CLASS, 0, TELL) ) )
4688 (void) tamedog(mtmp, (struct obj *) 0, FALSE);
4690 if (Upolyd) u.mh -= num;
4691 else u.uhp -= num;
4692 t_timeout = rnz(5000);
4693 break;
4694 case T_WARD_FIRE:
4695 /* Already have it intrinsically? */
4696 if (HFire_resistance & FROMOUTSIDE) {
4697 You("are already fire resistant.");
4698 return (0);
4701 You("invoke the ward against flame!");
4702 HFire_resistance += rn1(100,50);
4703 HFire_resistance += techlevX(tech_no);
4704 t_timeout = rnz(1500);
4706 break;
4707 case T_WARD_COLD:
4708 /* Already have it intrinsically? */
4709 if (HCold_resistance & FROMOUTSIDE) {
4710 You("are already cold resistant.");
4711 return (0);
4714 You("invoke the ward against ice!");
4715 HCold_resistance += rn1(100,50);
4716 HCold_resistance += techlevX(tech_no);
4717 t_timeout = rnz(1500);
4719 break;
4720 case T_WARD_ELEC:
4721 /* Already have it intrinsically? */
4722 if (HShock_resistance & FROMOUTSIDE) {
4723 You("are already shock resistant.");
4724 return (0);
4727 You("invoke the ward against lightning!");
4728 HShock_resistance += rn1(100,50);
4729 HShock_resistance += techlevX(tech_no);
4730 t_timeout = rnz(1500);
4732 break;
4733 case T_TINKER:
4734 if (Blind) {
4735 You("can't do any tinkering if you can't see!");
4736 return (0);
4738 if (!uwep) {
4739 You("aren't holding an object to work on!");
4740 return (0);
4742 You("are holding %s.", doname(uwep));
4743 if (yn("Start tinkering on this?") != 'y') return(0);
4744 You("start working on %s",doname(uwep));
4745 delay = -150 + techlevX(tech_no);
4746 if (delay > -100) delay = -100;
4747 set_occupation(tinker, "tinkering", 0);
4748 t_timeout = rnz(200);
4749 break;
4750 case T_RAGE:
4751 /*if (Upolyd) {
4752 You("cannot focus your anger!");
4753 return(0);
4755 You_feel("the anger inside you erupt!");
4756 num = 50 + (4 * techlevX(tech_no));
4757 techt_inuse(tech_no) = num + 1;
4758 if (Upolyd) {
4759 u.mhmax += num;
4760 u.mh += num;
4762 u.uhpmax += num;
4763 u.uhp += num;
4764 t_timeout = rnz(5000);
4765 break;
4766 case T_BLINK:
4767 You_feel("the flow of time slow down.");
4768 techt_inuse(tech_no) = rnd(techlevX(tech_no) + 1) + 2;
4769 t_timeout = rnz(1500);
4770 break;
4771 case T_CHI_STRIKE:
4772 if (!blitz_chi_strike()) return(0);
4773 t_timeout = rnz(1500);
4774 break;
4775 case T_DRAW_ENERGY:
4776 if (u.uen == u.uenmax) {
4777 if (Hallucination) You("are fully charged!");
4778 else You("cannot hold any more energy!");
4779 return(0);
4781 You("begin drawing energy from your surroundings!");
4782 delay=-15;
4783 set_occupation(draw_energy, "drawing energy", 0);
4784 t_timeout = rnz(1500);
4785 break;
4786 case T_CHI_HEALING:
4787 if (u.uen < 1) {
4788 You("are too weak to attempt this! You need at least one point of mana!");
4789 return(0);
4791 You("direct your internal energy to restoring your body!");
4792 techt_inuse(tech_no) = techlevX(tech_no)*10 + 4;
4793 t_timeout = rnz(1500);
4794 break;
4795 case T_DISARM:
4796 if (!uwep) {
4797 You("aren't wielding a weapon!");
4798 return(0);
4801 if (P_SKILL(weapon_type(uwep)) == P_NONE) {
4802 You("aren't wielding a proper weapon!");
4803 return(0);
4805 if ((P_SKILL(weapon_type(uwep)) < P_SKILLED) || PlayerCannotUseSkills || (Blind)) {
4806 You("aren't capable of doing this!");
4807 return(0);
4810 if (uwep && uwep->spe < 1) {
4811 Your("weapon isn't strong enough for that!");
4812 /* could be unidentified, in which case we give a timeout --Amy */
4813 if (!(uwep->known)) t_timeout = rnz(500);
4814 break;
4817 if (u.uswallow) {
4818 pline("What do you think %s is? A sword swallower?",
4819 mon_nam(u.ustuck));
4820 return(0);
4823 if (!getdir((char *)0)) return(0);
4824 if (!u.dx && !u.dy) {
4825 /* Hopefully a mistake ;B */
4826 pline("Why don't you try wielding something else instead.");
4827 return(0);
4829 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
4830 pline("Invalid target location.");
4831 return 0;
4833 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
4834 if (!mtmp || !canspotmon(mtmp)) {
4835 if (memory_is_invisible(u.ux + u.dx, u.uy + u.dy))
4836 You("don't know where to aim for!");
4837 else
4838 You("don't see anything there!");
4839 return (0);
4841 obj = MON_WEP(mtmp); /* can be null */
4842 if (!obj) {
4843 You_cant("disarm an unarmed foe!");
4844 return(0);
4846 /* Blindness dealt with above */
4847 if (!mon_visible(mtmp)
4848 || (obj->oinvis && !See_invisible) || obj->oinvisreal
4850 You_cant("see %s weapon!", s_suffix(mon_nam(mtmp)));
4851 return(0);
4853 num = ((rn2(techlevX(tech_no) + 15))
4854 * (P_SKILL(weapon_type(uwep)) - P_SKILLED + 1)) / 10;
4856 if (uarmf && uarmf->oartifact == ART_CORINA_S_SNOWY_TREAD) {
4857 if (num < 0) num = 0;
4858 num += 20;
4861 You("attempt to disarm %s...",mon_nam(mtmp));
4862 /* WAC can't yank out cursed items */
4863 if (num > 0 && (!Fumbling || !rn2(10)) && !obj->cursed) {
4864 int roll;
4865 obj_extract_self(obj);
4866 possibly_unwield(mtmp, FALSE);
4867 setmnotwielded(mtmp, obj);
4868 roll = rn2(num + 1);
4869 if (roll > 3) roll = 3;
4871 if (obj && obj->mstartinventB && !(obj->oartifact) && !(obj->fakeartifact && timebasedlowerchance()) && (!rn2(4) || (rn2(100) < u.equipmentremovechance) || !timebasedlowerchance() ) ) {
4872 uwep->spe--;
4873 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
4874 delobj(obj);
4875 t_timeout = rnz(5000);
4876 break;
4878 if (obj && obj->mstartinventC && !(obj->oartifact) && !(obj->fakeartifact && !rn2(10)) && rn2(10) ) {
4879 uwep->spe--;
4880 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
4881 delobj(obj);
4882 t_timeout = rnz(5000);
4883 break;
4886 if (obj && obj->mstartinventE && !(obj->oartifact) && !(obj->fakeartifact && !rn2(20)) && rn2(20) ) {
4887 uwep->spe--;
4888 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
4889 delobj(obj);
4890 t_timeout = rnz(5000);
4891 break;
4894 if (obj && obj->mstartinventD && !(obj->oartifact) && !(obj->fakeartifact && !rn2(4)) && rn2(4) ) {
4895 uwep->spe--;
4896 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
4897 delobj(obj);
4898 t_timeout = rnz(5000);
4899 break;
4902 if (obj && obj->mstartinventX) {
4903 uwep->spe--;
4904 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
4905 delobj(obj);
4906 t_timeout = rnz(5000);
4907 break;
4910 switch (roll) {
4911 case 2:
4912 default:
4913 /* to floor near you */
4914 You("knock %s %s to the %s!",
4915 s_suffix(mon_nam(mtmp)), xname(obj), surface(u.ux, u.uy));
4916 if (obj->otyp == CRYSKNIFE &&
4917 (!obj->oerodeproof || !rn2(10))) {
4918 obj->otyp = WORM_TOOTH;
4919 obj->oerodeproof = 0;
4921 uwep->spe--;
4922 place_object(obj, u.ux, u.uy);
4923 stackobj(obj);
4924 break;
4925 case 3:
4926 /* right into your inventory */
4927 uwep->spe--;
4928 You("snatch %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
4929 if (obj->otyp == CORPSE &&
4930 touch_petrifies(&mons[obj->corpsenm]) &&
4931 (!uarmg || FingerlessGloves) && (!Stone_resistance || (!IntStone_resistance && !rn2(20)) ) &&
4932 !(poly_when_stoned(youmonst.data) &&
4933 polymon(PM_STONE_GOLEM))) {
4934 static char kbuf[BUFSZ];
4936 sprintf(kbuf, "snatching a petrifying corpse");
4937 pline("Snatching this type of corpse is a fatal mistake.");
4938 instapetrify(kbuf);
4940 obj = hold_another_object(obj, "You drop %s!",
4941 doname(obj), (const char *)0);
4942 break;
4944 } else if (mtmp->mcanmove && !mtmp->msleeping)
4945 pline("%s evades your attack.", Monnam(mtmp));
4946 else
4947 You("fail to dislodge %s %s.", s_suffix(mon_nam(mtmp)), xname(obj));
4948 wakeup(mtmp);
4949 if (!mtmp->mcanmove && !rn2(10)) {
4950 mtmp->masleep = 0;
4951 mtmp->mcanmove = 1;
4952 mtmp->mfrozen = 0;
4954 t_timeout = rnz(5000);
4955 break;
4956 case T_DAZZLE:
4957 /* Short range stun attack */
4958 if (Blind) {
4959 You("can't see anything!");
4960 return(0);
4962 if (!getdir((char *)0)) return(0);
4963 if (!u.dx && !u.dy) {
4964 /* Hopefully a mistake ;B */
4965 You("can't see yourself!");
4966 return(0);
4968 for(i = 0; (i <= ((techlevX(tech_no) / 8) + 1)
4969 && isok(u.ux + (i*u.dx), u.uy + (i*u.dy))); i++) {
4970 mtmp = m_at(u.ux + (i*u.dx), u.uy + (i*u.dy));
4971 if (mtmp && canseemon(mtmp)) break;
4973 if (!mtmp || !canseemon(mtmp)) {
4974 You("fail to make eye contact with anything!");
4975 /* regular SLASH'EM would allow you to scan for the presence of monsters until there is one...
4976 * But this isn't regular SLASH'EM. If you use the technique, you get a timeout, period. --Amy */
4977 t_timeout = rnz(75);
4978 break;
4980 You("stare at %s.", mon_nam(mtmp));
4981 if (!haseyes(mtmp->data))
4982 pline("..but %s has no eyes!", mon_nam(mtmp));
4983 else if (!mtmp->mcansee)
4984 pline("..but %s cannot see you!", mon_nam(mtmp));
4985 else if ((rn2(6) + rn2(6) + (techlevX(tech_no) - mtmp->m_lev)) > rnd(10)) {
4987 if (!rn2(10)) goto breakstare;
4988 if (mtmp->mfrenzied && !rn2(5)) goto breakstare;
4990 You("dazzle %s!", mon_nam(mtmp));
4991 mtmp->mcanmove = 0;
4992 mtmp->mfrozen = rnd(10);
4993 } else {
4994 breakstare:
4995 pline("%s breaks the stare!", Monnam(mtmp));
4996 if (!mtmp->mtame && !mtmp->mpeaceful && !mtmp->mfrenzied && !rn2(5)) {
4997 mtmp->mfrenzied = 1;
4998 pline("Now %s is really angry at you.", mon_nam(mtmp));
5001 t_timeout = rnz(750);
5002 break;
5003 case T_BLITZ:
5004 if (!canuseunarmedtechs()) {
5005 You("can't do this while wielding a weapon!");
5006 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5007 return(0);
5008 } else if (uarms) {
5009 You("can't do this while holding a shield!");
5010 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5011 return(0);
5013 if (!doblitz()) return (0);
5014 u.combostrike = 0;
5015 u.comboactive = FALSE;
5016 t_timeout = rnz(5000);
5017 break;
5018 case T_PUMMEL:
5019 if (!canuseunarmedtechs()) {
5020 You("can't do this while wielding a weapon!");
5021 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5022 return(0);
5023 } else if (uarms) {
5024 You("can't do this while holding a shield!");
5025 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5026 return(0);
5028 if (!getdir((char *)0)) return(0);
5029 if (!u.dx && !u.dy) {
5030 You("flex your muscles.");
5031 return(0);
5033 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
5034 pline("Invalid target location.");
5035 return 0;
5037 if (!blitz_pummel()) return(0);
5038 t_timeout = rnz(2000);
5039 break;
5040 case T_G_SLAM:
5041 if (!canuseunarmedtechs()) {
5042 You("can't do this while wielding a weapon!");
5043 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5044 return(0);
5045 } else if (uarms) {
5046 You("can't do this while holding a shield!");
5047 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5048 return(0);
5050 if (!getdir((char *)0)) return(0);
5051 if (!u.dx && !u.dy) {
5052 You("flex your muscles.");
5053 return(0);
5055 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
5056 pline("Invalid target location.");
5057 return 0;
5059 if (!blitz_g_slam()) return(0);
5060 t_timeout = rnz(1500);
5061 break;
5062 case T_DASH:
5063 if (!getdir((char *)0)) return(0);
5064 if (!u.dx && !u.dy) {
5065 You("stretch.");
5066 return(0);
5068 if (!blitz_dash()) return(0);
5069 t_timeout = rnz(500);
5070 break;
5071 case T_POWER_SURGE:
5072 if (!blitz_power_surge()) return(0);
5073 t_timeout = rnz(issoviet ? 1500 : 5000);
5074 if (issoviet) pline("Sovetskaya nichego ne znayet o balansirovaniya ne ponimayet i poetomu khochet etu tekhniku, kotoraya uzhe slishkom sil'na, chtoby byt' yeshche sil'neye.");
5075 break;
5076 case T_SPIRIT_BOMB:
5077 if (!canuseunarmedtechs()) {
5078 You("can't do this while wielding a weapon!");
5079 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5080 return(0);
5081 } else if (uarms) {
5082 You("can't do this while holding a shield!");
5083 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5084 return(0);
5086 if (!getdir((char *)0)) return(0);
5087 if (!blitz_spirit_bomb()) return(0);
5088 t_timeout = rnz(1500);
5089 break;
5090 case T_DRAW_BLOOD:
5091 /*if (!maybe_polyd(is_vampire(youmonst.data),
5092 Race_if(PM_VAMPIRE)) && !Race_if(PM_UNGENOMOLD) ) {*/
5093 /* ALI
5094 * Otherwise we get problems with what we create:
5095 * potions of vampire blood would no longer be
5096 * appropriate.
5097 * Note by Amy: Ungenomolds will be able to use this anyway. They may polymorph into a vampire,
5098 * which would make the potions useful for them. Even if they don't, they can still dilute them.
5099 * another note by Amy: who cares? If they can't use it in their current form, too bad. It's still
5100 * better than simply disabling the tech altogether.
5102 /*You("must be in your natural form to draw blood.");
5103 return(0);
5105 obj = use_medical_kit(PHIAL, TRUE, "draw blood with");
5106 if (!obj)
5107 return 0;
5108 if (u.ulevel <= 1) {
5109 You_cant("seem to find a vein.");
5110 return 0;
5112 check_unpaid(obj);
5113 if (obj->quan > 1L)
5114 obj->quan--;
5115 else {
5116 obj_extract_self(obj);
5117 obfree(obj, (struct obj *)0);
5120 use_skill(P_DEVICES,1);
5121 if (Race_if(PM_FAWN)) {
5122 use_skill(P_DEVICES,1);
5124 if (Race_if(PM_SATRE)) {
5125 use_skill(P_DEVICES,1);
5126 use_skill(P_DEVICES,1);
5129 pline("Using your medical kit, you draw off a phial of your blood.");
5130 /* Amy edit: let's make this much more useful by having the level drain only occur 1 out of 3 times. */
5131 if (!rn2(3)) {losexp("drawing blood", TRUE, FALSE);
5132 if (u.uexp > 0)
5133 u.uexp = newuexp(u.ulevel - 1);
5135 otmp = mksobj(POT_VAMPIRE_BLOOD, FALSE, FALSE, FALSE);
5136 if (otmp) {
5137 otmp->cursed = obj->cursed;
5138 otmp->blessed = obj->blessed;
5139 (void) hold_another_object(otmp,
5140 "You fill, but have to drop, %s!", doname(otmp),
5141 (const char *)0);
5143 t_timeout = rnz(1500);
5144 break;
5145 case T_JEDI_JUMP:
5146 if (u.uen < 25){
5147 You("can't channel the force around you. Jedi jumps require 25 points of mana!");
5148 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
5149 return(0);
5151 if (!jump((techlevX(tech_no)/5)+1)) return 0;
5152 u.uen -= 25;
5153 t_timeout = rnz(500);
5154 break;
5155 case T_POKE_BALL:
5157 if (u.uswallow) {
5158 You("don't have enough free space to throw the ball!");
5159 return 0;
5162 int i, j, caught, catchrate;
5163 struct monst *mtmp;
5164 register struct monst *mtmp2;
5165 caught = 0;
5166 pline("%s used Poke Ball!", playeraliasname);
5168 for (i = -1; i <= 1; i++) for(j = -1; j <= 1; j++) {
5169 if (!isok(u.ux + i, u.uy + j)) continue;
5170 if ( ((mtmp = m_at(u.ux + i, u.uy + j)) != 0) && mtmp->mtame == 0
5171 && mtmp->mnum != quest_info(MS_NEMESIS) && !(mtmp->data->geno & G_UNIQ) && caught == 0)
5173 /* using the M3_PETTY attribute now --Amy */
5177 if (is_petty(mtmp->data) || mtmp->egotype_petty)
5180 /*maybe_tameX(mtmp);*/
5181 pline("Gotcha! %s was caught!", mon_nam(mtmp));
5182 (void) tamedog(mtmp, (struct obj *) 0, TRUE);
5183 caught++;
5184 t_timeout = rnz(3000);
5187 else if ( (mtmp->m_lev > (2 * techlevX(tech_no)) || rn2(4) ) && mtmp->m_lev > techlevX(tech_no) && caught == 0 && ( (!is_pokemon(mtmp->data) && (!mtmp->egotype_pokemon) ) || rn2(2) ) )
5189 pline("You missed the Pokemon!");
5192 else if (caught == 0) /* other monster that can be caught */
5195 /* If catchrate is a higher numeric value, the chance of catching the monster is lower. */
5197 catchrate = (60 + mtmp->m_lev - techlevX(tech_no));
5198 if (!rn2(4)) catchrate -= ACURR(A_CHA);
5199 if (!rn2(4)) catchrate -= techlevX(tech_no);
5200 if (is_pokemon(mtmp->data) || mtmp->egotype_pokemon) catchrate = (catchrate / 2);
5201 if (catchrate < 3) catchrate = 3;
5202 if (rnd(100) < catchrate) pline("Oh, no! The Pokemon broke free!");
5203 else if (rnd(100) < catchrate) pline("Aww! It appeared to be caught!");
5204 else if (rnd(100) < catchrate) pline("Arrgh! Almost had it!");
5205 else if (rnd(100) < catchrate) pline("Shit! It was so close too!");
5206 else {
5207 /*maybe_tameX(mtmp);*/
5208 pline("Gotcha! %s was caught!", mon_nam(mtmp));
5209 (void) tamedog(mtmp, (struct obj *) 0, TRUE);
5210 caught++;
5211 t_timeout = rnz(3000);
5216 } /* monster is catchable loop */
5217 } /* for loop */
5219 if (caught == 0) pline("The ball expodes in midair!");
5220 /* This is an intentional typo, derived from another roguelike. Do you know which one it is? --Amy*/
5222 t_timeout = rnz(3000);
5223 break;
5224 case T_SUMMON_TEAM_ANT:
5227 int maxchance = techlevX(tech_no);
5228 if (maxchance > 50) maxchance = 50;
5229 pline("Go Team Ant!");
5231 int caughtY;
5232 caughtY = 0;
5234 while (caughtY == 0) {
5235 /*mtmp = make_helper(S_ANT, u.ux, u.uy); */
5236 mtmp = makemon(mkclass(S_ANT,0), u.ux, u.uy, NO_MM_FLAGS);
5237 if (!mtmp) break;
5238 /*mtmp->mtame = 10;*/
5239 /*maybe_tameX(mtmp);*/
5240 (void) tamedog(mtmp, (struct obj *) 0, TRUE);
5241 if (maxchance < rnd(75)) caughtY++;
5244 /* A high level Insectoid character can create quite the army of insects sometimes. --Amy */
5248 t_timeout = rnz(5000);
5249 break;
5251 case T_DOUBLE_TROUBLE: /* inspired by Khor */
5254 int maxchance = techlevX(tech_no);
5255 if (maxchance > 45) maxchance = 45;
5257 pline("Double Trouble...");
5259 int familiardone;
5260 familiardone = 0;
5262 if (!rn2(5)) mtmp = makemon(&mons[urace.malenum], u.ux, u.uy, NO_MM_FLAGS);
5263 else if (Upolyd) mtmp = makemon(&mons[u.umonnum], u.ux, u.uy, NO_MM_FLAGS);
5264 else mtmp = makemon(&mons[urole.malenum], u.ux, u.uy, NO_MM_FLAGS);
5265 if (mtmp) (void) tamedog(mtmp, (struct obj *) 0, TRUE);
5267 if ((techlevX(tech_no)) < rnd(50)) familiardone = 1;
5268 else pline("Sent in some familiars too.");
5270 while (familiardone == 0) {
5272 mtmp = makemon((struct permonst *)0, u.ux, u.uy, NO_MM_FLAGS);
5273 if (mtmp) (void) tamedog(mtmp, (struct obj *) 0, TRUE);
5275 if (maxchance < rnd(50)) familiardone = 1;
5280 t_timeout = rnz(10000);
5281 break;
5283 case T_ATTIRE_CHARM:
5285 if (u.uswallow) {
5286 pline("The monster can't see its inside anyway!");
5287 return 0;
5290 if (!PlayerInHighHeels) {
5291 pline("You must be wearing high heels for that.");
5292 return 0;
5295 int k, l, caughtX;
5296 struct monst *mtmp3;
5297 caughtX = 0;
5298 pline("You strike a sexy pose with your heels!");
5299 if (uarmf && uarmf->oartifact == ART_PRECURSOR_TO_THE___) adjattrib(A_CHA, 1, -1, TRUE);
5301 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
5302 if (!isok(u.ux + k, u.uy + l)) continue;
5303 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
5304 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(mtmp3->data->geno & G_UNIQ) && caughtX == 0)
5306 /* gotta write a huge function for this now --Amy */
5310 if ( humanoid(mtmp3->data) || mtmp3->data->mlet == S_HUMAN) {
5311 /*maybe_tameX(mtmp3);*/
5312 pline("%s is charmed, and wants to be your friend!", mon_nam(mtmp3));
5313 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
5314 if (techlevX(tech_no) < rnd(100)) caughtX++;
5315 t_timeout = rnz(5000);
5318 else pline("%s is too stupid to fully appreciate you!", mon_nam(mtmp3));
5320 } /* monster is catchable loop */
5321 } /* for loop */
5323 /* signature technique of some roles, but too OP for others --Amy */
5324 if (Role_if(PM_TRANSVESTITE) || Role_if(PM_TOPMODEL) || Role_if(PM_TRANSSYLVANIAN) || Role_if(PM_FAILED_EXISTENCE)) t_timeout = rnz(5000);
5325 else t_timeout = rnz(25000);
5326 break;
5328 case T_WORLD_FALL:
5330 You("scream \"EYGOORTS-TOGAAL, JEZEHH!\"");
5331 /* Actually, it's "To win the game you must kill me, John Romero" recorded backwards.
5332 * When I was little, I always thought it said "Eygoorts-togaal, jezehh". --Amy */
5334 int wflvl = ((techlevX(tech_no)) / 2);
5335 if (wflvl < 1) wflvl = 1;
5337 register struct monst *mtmp, *mtmp2;
5339 num = 0;
5341 for (mtmp = fmon; mtmp; mtmp = mtmp2) {
5342 mtmp2 = mtmp->nmon;
5343 if ( ((mtmp->m_lev < wflvl) || (!rn2(4) && mtmp->m_lev < (2 * wflvl))) && mtmp->mnum != quest_info(MS_NEMESIS) && !(mtmp->data->geno & G_UNIQ) ) {
5344 mondead(mtmp);
5345 num++;
5348 pline("Eliminated %d monster%s.", num, plur(num));
5351 t_timeout = rnz(100000);
5352 break;
5354 case T_CREATE_AMMO:
5357 boolean canbfg = FALSE;
5358 boolean canrocket = FALSE;
5359 boolean canshotty = FALSE;
5360 boolean canblaster = FALSE;
5362 int ammotype;
5363 ammotype = 1; /* bullets */
5364 if (Role_if(PM_DOOM_MARINE)) {
5366 if (techlevX(tech_no) >= 25) {
5368 canbfg = TRUE;
5369 canrocket = TRUE;
5370 canshotty = TRUE;
5371 canblaster = TRUE;
5375 else if (techlevX(tech_no) >= 20) {
5377 canrocket = TRUE;
5378 canshotty = TRUE;
5379 canblaster = TRUE;
5382 else if (techlevX(tech_no) >= 15) {
5384 canshotty = TRUE;
5385 canblaster = TRUE;
5388 else if (techlevX(tech_no) >= 10) {
5390 canblaster = TRUE;
5395 if (Role_if(PM_SPACE_MARINE)) {
5396 canblaster = TRUE;
5399 if (Race_if(PM_TURMENE)) {
5400 canshotty = TRUE;
5403 if (!Role_if(PM_GRENADONIN)) {
5404 boolean haschosen = FALSE;
5405 pline("Pick an ammo type that you want to create. The prompt will loop until you actually make a choice.");
5406 while (!haschosen) {
5407 if (yn("Do you want to create pistol bullets?") == 'y') {
5408 haschosen = TRUE;
5409 ammotype = 1;
5411 else if (yn("Do you want to create five-seven bullets?") == 'y') {
5412 haschosen = TRUE;
5413 ammotype = 16;
5415 else if (yn("Do you want to create SMG bullets?") == 'y') {
5416 haschosen = TRUE;
5417 ammotype = 6;
5419 else if (yn("Do you want to create rifle bullets?") == 'y') {
5420 haschosen = TRUE;
5421 ammotype = 7;
5423 else if (yn("Do you want to create sniper bullets?") == 'y') {
5424 haschosen = TRUE;
5425 ammotype = 8;
5427 else if (yn("Do you want to create MG bullets?") == 'y') {
5428 haschosen = TRUE;
5429 ammotype = 9;
5431 else if (yn("Do you want to create assault rifle bullets?") == 'y') {
5432 haschosen = TRUE;
5433 ammotype = 10;
5435 else if (canshotty && yn("Do you want to create shotgun shells?") == 'y') {
5436 haschosen = TRUE;
5437 ammotype = 3;
5439 else if (canshotty && yn("Do you want to create auto shotgun shells?") == 'y') {
5440 haschosen = TRUE;
5441 ammotype = 11;
5443 else if (canrocket && yn("Do you want to create rockets?") == 'y') {
5444 haschosen = TRUE;
5445 ammotype = 4;
5447 else if (canbfg && yn("Do you want to create BFG ammo?") == 'y') {
5448 haschosen = TRUE;
5449 ammotype = 5;
5451 else if (canblaster && yn("Do you want to create blaster bolts?") == 'y') {
5452 haschosen = TRUE;
5453 ammotype = 2;
5455 else if (canblaster && yn("Do you want to create heavy blaster bolts?") == 'y') {
5456 haschosen = TRUE;
5457 ammotype = 12;
5459 else if (canblaster && yn("Do you want to create raygun bolts?") == 'y') {
5460 haschosen = TRUE;
5461 ammotype = 13;
5463 else if (canblaster && yn("Do you want to create laser beams?") == 'y') {
5464 haschosen = TRUE;
5465 ammotype = 14;
5467 else if (canblaster && yn("Do you want to create radios?") == 'y') {
5468 haschosen = TRUE;
5469 ammotype = 15;
5471 else if (canblaster && yn("Do you want to create carcosan bolts?") == 'y') {
5472 haschosen = TRUE;
5473 ammotype = 17;
5479 if (Role_if(PM_GRENADONIN)) ammotype = 666; /* grenades */
5481 You("make some ammo for your gun.");
5483 struct obj *uammo;
5485 if (ammotype == 666) uammo = mksobj(rn2(2) ? GAS_GRENADE : FRAG_GRENADE, TRUE, FALSE, FALSE);
5486 else if (ammotype == 5) uammo = mksobj(BFG_AMMO, TRUE, FALSE, FALSE);
5487 else if (ammotype == 4) uammo = mksobj(ROCKET, TRUE, FALSE, FALSE);
5488 else if (ammotype == 3) uammo = mksobj(SHOTGUN_SHELL, TRUE, FALSE, FALSE);
5489 else if (ammotype == 2) uammo = mksobj(BLASTER_BOLT, TRUE, FALSE, FALSE);
5490 else if (ammotype == 6) uammo = mksobj(SMG_BULLET, TRUE, FALSE, FALSE);
5491 else if (ammotype == 7) uammo = mksobj(RIFLE_BULLET, TRUE, FALSE, FALSE);
5492 else if (ammotype == 8) uammo = mksobj(SNIPER_BULLET, TRUE, FALSE, FALSE);
5493 else if (ammotype == 9) uammo = mksobj(MG_BULLET, TRUE, FALSE, FALSE);
5494 else if (ammotype == 10) uammo = mksobj(ASSAULT_RIFLE_BULLET, TRUE, FALSE, FALSE);
5495 else if (ammotype == 11) uammo = mksobj(AUTO_SHOTGUN_SHELL, TRUE, FALSE, FALSE);
5496 else if (ammotype == 12) uammo = mksobj(HEAVY_BLASTER_BOLT, TRUE, FALSE, FALSE);
5497 else if (ammotype == 13) uammo = mksobj(RAYGUN_BOLT, TRUE, FALSE, FALSE);
5498 else if (ammotype == 14) uammo = mksobj(LASER_BEAM, TRUE, FALSE, FALSE);
5499 else if (ammotype == 15) uammo = mksobj(RADIO, TRUE, FALSE, FALSE);
5500 else if (ammotype == 16) uammo = mksobj(FIVE_SEVEN_BULLET, TRUE, FALSE, FALSE);
5501 else if (ammotype == 17) uammo = mksobj(CARCOSAN_BOLT, TRUE, FALSE, FALSE);
5502 else uammo = mksobj(PISTOL_BULLET, TRUE, FALSE, FALSE);
5503 if (uammo) {
5504 uammo->quan = techlevX(tech_no);
5505 /* gunner really specializes in ranged weapons, so needs a big bonus --Amy */
5506 if (Role_if(PM_GUNNER)) uammo->quan *= 1 + rnd(2);
5507 if (uarmf && uarmf->oartifact == ART_ZERDROY_GUNNING) {
5508 uammo->quan *= 3;
5509 if (uarmf) curse(uarmf);
5511 if (uammo && ammotype == 1 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5512 if (uammo && ammotype == 6 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5513 if (uammo && ammotype == 7 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5514 if (uammo && ammotype == 8 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5515 if (uammo && ammotype == 9 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5516 if (uammo && ammotype == 10 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5517 if (uammo && ammotype == 16 && uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) uammo->quan *= 2;
5518 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
5519 if (ammotype == 5) uammo->quan *= 4;
5520 if (ammotype == 4) uammo->quan /= 10;
5521 if (uammo->quan < 0) uammo->quan = 1; /* fail safe */
5522 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
5523 uammo->owt = weight(uammo);
5524 dropy(uammo);
5525 stackobj(uammo);
5528 if (Role_if(PM_GRENADONIN) && u.ulevel >= 10) {
5530 if (!u.grenadoninlauncher && !rn2(5)) {
5531 u.grenadoninlauncher = TRUE;
5532 uammo = mksobj(GRENADE_LAUNCHER, TRUE, FALSE, FALSE);
5533 if (uammo) {
5534 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
5535 dropy(uammo);
5536 stackobj(uammo);
5537 pline("There's your grenade launcher!");
5541 if (!rn2(10)) {
5542 uammo = mksobj(STICK_OF_DYNAMITE, TRUE, FALSE, FALSE);
5543 if (uammo) {
5544 uammo->quan = techlevX(tech_no) - 9;
5545 if (uammo->quan < 1) uammo->quan = 1;
5546 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
5547 uammo->quan /= 3;
5548 if (uammo->quan < 1) uammo->quan = 1; /* fail safe */
5549 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
5550 uammo->owt = weight(uammo);
5551 dropy(uammo);
5552 stackobj(uammo);
5559 if (uarmh && uarmh->oartifact == ART_TURKISH_EMPIRE) {
5560 uammo = mksobj(ROCKET, TRUE, FALSE, FALSE);
5561 if (uammo) {
5562 uammo->quan = techlevX(tech_no);
5563 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
5564 uammo->quan /= 10;
5565 if (uammo->quan < 1) uammo->quan = 1; /* fail safe */
5566 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
5567 uammo->owt = weight(uammo);
5568 dropy(uammo);
5569 stackobj(uammo);
5574 if (Role_if(PM_DOOM_MARINE) || Role_if(PM_GUNNER)) t_timeout = rnz(500);
5575 else t_timeout = rnz(2500);
5576 break;
5580 case T_EGG_BOMB:
5582 You("create some stoning grenades.");
5584 int caughtZ;
5585 caughtZ = 0;
5586 struct obj *uegg;
5588 while (caughtZ == 0) {
5590 uegg = mksobj(EGG, FALSE, FALSE, FALSE);
5591 if (uegg) {
5592 uegg->spe = 0;
5593 uegg->quan = 1;
5594 uegg->owt = weight(uegg);
5595 uegg->corpsenm = egg_type_from_parent(PM_COCKATRICE, FALSE);
5596 uegg->known = uegg->dknown = 1;
5597 attach_egg_hatch_timeout(uegg);
5598 kill_egg(uegg); /* make sure they're stale --Amy */
5599 dropy(uegg);
5600 stackobj(uegg);
5602 if (techlevX(tech_no) < rnd(500)) caughtZ++;
5606 t_timeout = rnz(10000);
5607 break;
5609 case T_BOOZE:
5612 int maxchance = techlevX(tech_no);
5613 if (maxchance > 50) maxchance = 50;
5615 You("procure some refreshing drinks.");
5617 make_confused(HConfusion + d(3,8), FALSE);
5618 healup(Role_if(PM_DRUNK) ? rnz(20 + u.ulevel) : 1, 0, FALSE, FALSE);
5619 u.uhunger += 20;
5620 if (Race_if(PM_CLOCKWORK_AUTOMATON)) u.uhunger += 200;
5621 if (Race_if(PM_RUSMOT)) u.uhunger += 100;
5622 if (Role_if(PM_DRUNK)) u.uhunger += 100;
5623 newuhs(FALSE);
5624 exercise(A_WIS, FALSE);
5626 int caughtW;
5627 caughtW = 0;
5628 struct obj *udrink;
5630 while (caughtW == 0) {
5632 udrink = mksobj(POT_BOOZE, TRUE, FALSE, FALSE);
5633 if (udrink) {
5634 udrink->known = udrink->dknown = 1;
5635 udrink->finalcancel = 1; /* goddamn it, these aren't supposed to be free holy water... */
5636 dropy(udrink);
5637 stackobj(udrink);
5639 if (maxchance < rnd(75)) caughtW++;
5640 if (!rn2(10) && caughtW > 0) caughtW = 0;
5646 t_timeout = rnz(2000);
5647 break;
5649 case T_IRON_SKIN:
5650 num = 9 + techlevX(tech_no);
5651 techt_inuse(tech_no) = num + 1;
5652 pline("Your skin becomes harder.");
5654 t_timeout = rnz(2000);
5655 break;
5657 case T_POLYFORM:
5659 pline("You feel polyform.");
5660 techt_inuse(tech_no) = 1;
5661 polyself(FALSE);
5662 techt_inuse(tech_no) = 0;
5663 t_timeout = rnz(10000);
5664 break;
5666 case T_CONCENTRATING:
5667 num = 1 + (techlevX(tech_no) / 2);
5668 techt_inuse(tech_no) = num + 1;
5670 pline("You start concentrating.");
5671 t_timeout = rnz(2500);
5672 break;
5674 case T_SUMMON_PET:
5675 pline("You summon a pet.");
5677 if (Role_if(PM_BUTT_LOVER)) {
5678 register struct monst *buttpet;
5680 struct permonst *pm = 0;
5681 int attempts = 0;
5683 buttpetmarker:
5684 do {
5685 pm = rndmonst();
5686 attempts++;
5687 if (attempts && (attempts % 10000 == 0)) u.mondiffhack++;
5688 if (!rn2(2000)) reset_rndmonst(NON_PM);
5690 } while ( (!pm || (pm && !(pm->msound == MS_FART_NORMAL) && !(pm->msound == MS_FART_LOUD) && !(pm->msound == MS_FART_QUIET))) && attempts < 50000);
5692 if (!pm && rn2(50) ) {
5693 attempts = 0;
5694 goto buttpetmarker;
5696 if (pm && !(pm->msound == MS_FART_NORMAL) && !(pm->msound == MS_FART_LOUD) && !(pm->msound == MS_FART_QUIET) && rn2(50) ) {
5697 attempts = 0;
5698 goto buttpetmarker;
5701 if (pm) (buttpet = makemon(pm, u.ux, u.uy, NO_MM_FLAGS));
5703 if (buttpet) {
5704 tamedog(buttpet, (struct obj *) 0, TRUE);
5705 pline("Suddenly, you gain a new sexy pet!");
5708 u.mondiffhack = 0;
5710 } else {
5711 (void) make_familiar((struct obj *)0, u.ux, u.uy, FALSE, FALSE);
5714 t_timeout = rnz(10000);
5715 break;
5717 case T_DOUBLE_THROWNAGE:
5719 Your("%s %s become blurs as they reach for your throwing weapons!", uarmg ? "gloved" : "bare", makeplural(body_part(HAND)));
5720 techt_inuse(tech_no) = rnd((int) (techlevX(tech_no)/6 + 1)) + 2;
5721 t_timeout = rnz(1500);
5723 break;
5725 case T_SHIELD_BASH:
5726 if (!uarms) {
5727 pline("You aren't wearing a shield!");
5728 return(0);
5730 num = 1 + techlevX(tech_no);
5731 techt_inuse(tech_no) = num + 1;
5732 pline("You ready your shield as an additional weapon.");
5734 t_timeout = rnz(2000);
5736 break;
5738 case T_RECHARGE:
5740 if (CannotSelectItemsInPrompts) break;
5741 chargingchoice:
5743 struct obj *otmpC = getobj(recharge_type, "charge");
5744 if (!otmpC) {
5745 if (yn("Really exit with no object selected?") == 'y')
5746 pline("You just wasted the opportunity to charge your items.");
5747 else goto chargingchoice;
5748 return(0);
5750 recharge(otmpC, 0);
5752 t_timeout = rnz(15000);
5753 break;
5756 case T_SPIRITUALITY_CHECK:
5758 if (Race_if(PM_MACTHEIST)) {
5759 pline("As an atheist, you cannot use such a technique.");
5760 return 0;
5763 if (can_pray(FALSE) && !u.ugangr) pline("You can safely pray!");
5764 else {
5765 pline("You can not safely pray.");
5766 if (u.ugangr) pline("The gods are angry with you.");
5767 if (u.ublesscnt > 0) pline("Your prayer timeout isn't zero.");
5768 if ((int)Luck < 0) pline("Your luck is negative.");
5769 if (u.ualign.record < 0) pline("Your alignment record is negative.");
5771 u.uconduct.gnostic++; /* you just communicated with your god */
5772 if (Race_if(PM_MAGYAR)) {
5773 You_feel("bad about breaking the atheist conduct.");
5774 badeffect();
5776 use_skill(P_SPIRITUALITY, Role_if(PM_PRIEST) ? 25 : 5);
5778 t_timeout = rnz(2000);
5779 break;
5781 case T_BLOOD_RITUAL:
5783 if (!(carrying(ATHAME) || carrying(MERCURIAL_ATHAME)) ) {
5784 pline("You need an athame to conduct the ritual!");
5785 return(0);
5787 if (u.uhpmax < 201) {
5788 pline("You don't have enough health to conduct the ritual!");
5789 return(0);
5791 if (Upolyd && u.mhmax < 201) {
5792 pline("You don't have enough health to conduct the ritual!");
5793 return(0);
5795 if (u.uenmax < 201) {
5796 pline("You don't have enough mana to conduct the ritual!");
5797 return(0);
5799 pline("Using your athame, you mutilate your own body. Don't ask me, I know nothing about those heretical rituals, apart from the fact they exist...");
5801 u.uhpmax -= rno(200);
5802 if (u.uhp > u.uhpmax) u.uhp = u.uhpmax;
5803 if (Upolyd) {
5804 u.mhmax -= rno(200);
5805 if (u.mh > u.mhmax) u.mh = u.mhmax;
5807 u.uenmax -= rno(200);
5808 if (u.uen > u.uenmax) u.uen = u.uenmax;
5810 ABASE(A_STR) -= rno(2);
5811 if (ABASE(A_STR) < ATTRABSMIN(A_STR)) ABASE(A_STR) = ATTRABSMIN(A_STR);
5812 AMAX(A_STR) = ABASE(A_STR);
5814 ABASE(A_DEX) -= rno(2);
5815 if (ABASE(A_DEX) < ATTRABSMIN(A_DEX)) ABASE(A_DEX) = ATTRABSMIN(A_DEX);
5816 AMAX(A_DEX) = ABASE(A_DEX);
5818 ABASE(A_INT) -= rno(2);
5819 if (ABASE(A_INT) < ATTRABSMIN(A_INT)) ABASE(A_INT) = ATTRABSMIN(A_INT);
5820 AMAX(A_INT) = ABASE(A_INT);
5822 ABASE(A_WIS) -= rno(2);
5823 if (ABASE(A_WIS) < ATTRABSMIN(A_WIS)) ABASE(A_WIS) = ATTRABSMIN(A_WIS);
5824 AMAX(A_WIS) = ABASE(A_WIS);
5826 ABASE(A_CON) -= rno(2);
5827 if (ABASE(A_CON) < ATTRABSMIN(A_CON)) ABASE(A_CON) = ATTRABSMIN(A_CON);
5828 AMAX(A_CON) = ABASE(A_CON);
5830 ABASE(A_CHA) -= rno(2);
5831 if (ABASE(A_CHA) < ATTRABSMIN(A_CHA)) ABASE(A_CHA) = ATTRABSMIN(A_CHA);
5832 AMAX(A_CHA) = ABASE(A_CHA);
5834 if (!rn2(4)) makewish(TRUE);
5835 else othergreateffect();
5837 t_timeout = rnz(25000);
5838 break;
5840 case T_ENT_S_POTION:
5841 pline("You feel very good.");
5842 healup(techlevX(tech_no) * 10, 0, FALSE, FALSE);
5843 make_blinded(0L,FALSE);
5844 make_stunned(0L,TRUE);
5845 make_confused(0L,TRUE);
5846 (void) make_hallucinated(0L,FALSE,0L);
5847 make_numbed(0L,TRUE);
5848 make_feared(0L,TRUE);
5849 make_frozen(0L,TRUE);
5850 make_burned(0L,TRUE);
5851 make_dimmed(0L,TRUE);
5852 u.uhunger += techlevX(tech_no) * 10;
5854 t_timeout = rnz(10000);
5855 break;
5857 case T_LUCKY_GAMBLE:
5859 if (rn2(2)) {
5860 change_luck(1);
5861 You_feel("lucky.");
5862 } else {
5863 change_luck(-1);
5864 You_feel("unlucky.");
5867 t_timeout = rnz(2000);
5868 break;
5870 case T_DECONTAMINATE:
5871 /* divide player's contamination by half, but don't reduce it by more than 1000 --Amy */
5873 if (!u.contamination) {
5874 t_timeout = rnz(200);
5875 You("were not contaminated to begin with.");
5876 pline("Nothing happens.");
5877 if (FailureEffects || u.uprops[FAILURE_EFFECTS].extrinsic || have_failurestone()) {
5878 pline("Oh wait, actually something bad happens...");
5879 badeffect();
5881 break;
5884 pline("Your contamination is cured greatly.");
5886 if (u.contamination < 2000) decontaminate(u.contamination / 2);
5887 else decontaminate(1000);
5888 t_timeout = rnz(4000);
5890 break;
5892 case T_WONDERSPELL:
5893 wonderspell(-1);
5894 t_timeout = rnz(10000);
5895 break;
5897 case T_SWAP_WEAPON:
5898 if (u.twoweap) {
5899 pline("Sorry, you can only swap your secondary weapon while not dual-wielding.");
5900 return(0);
5902 swaptech();
5903 t_timeout = rnz(500);
5904 break;
5906 case T_RESET_TECHNIQUE:
5908 int numtechs;
5909 pline("Choose a technique to reset. The prompt will loop until you actually make a choice. You can also opt to reset no technique at all, in which case there will be no timeout.");
5910 resetretrying:
5911 for (numtechs = 0; numtechs < MAXTECH && techid(numtechs) != NO_TECH; numtechs++) {
5912 if (techid(numtechs) == T_RESET_TECHNIQUE) continue;
5913 if (techtout(numtechs) > 0) {
5914 pline("Your %s technique is currently on timeout.", techname(numtechs));
5915 if (yn("Make this technique usable again?") == 'y') {
5916 techtout(numtechs) = 0;
5917 pline("The timeout on your %s technique has been set to zero.", techname(numtechs));
5918 t_timeout = rnz(Race_if(PM_DEVELOPER) ? 50000 : 200000);
5919 goto resettechdone;
5923 pline("If you don't feel like resetting a technique right now, you can choose to reset none at all.");
5924 if (yn("Do you want to reset no technique at all?") == 'y') {
5925 goto resettechdone;
5927 goto resetretrying;
5930 resettechdone:
5931 break;
5933 case T_SILENT_OCEAN:
5937 pline("The ocean becomes silent. You can freely swim in the water without your equipment becoming wet, and are protected from wrap attacks, but you're also silenced.");
5939 register struct monst *nexusmon, *nextmon;
5940 register int silentoceandist = 60 + (techlevX(tech_no) * 3);
5942 for(nexusmon = fmon; nexusmon; nexusmon = nextmon) {
5943 nextmon = nexusmon->nmon;
5944 if (DEADMONSTER(nexusmon)) continue;
5945 if (resist(nexusmon, SPBOOK_CLASS, 0, NOTELL)) continue;
5946 if ((distu(nexusmon->mx, nexusmon->my)) > silentoceandist) continue;
5947 nexusmon->mcan = 1; /* don't cancel egotypes */
5950 num = 10 + (techlevX(tech_no) * 5);
5951 techt_inuse(tech_no) = num + 1;
5952 t_timeout = rnz(5000);
5956 break;
5958 case T_GLOWHORN:
5959 pline("Suddenly, a glowing unicorn horn appears above your %s!", body_part(HEAD));
5960 num = 10 + (techlevX(tech_no) / 2);
5961 techt_inuse(tech_no) = num + 1;
5962 t_timeout = rnz(2000);
5963 break;
5965 case T_MILDEN_CURSE:
5967 if (CannotSelectItemsInPrompts) break;
5969 allowall[0] = ALL_CLASSES; allowall[1] = '\0';
5971 if ( !(obj = getobj(allowall, "milden"))) return(0);
5972 if (!obj->cursed) {
5973 if (obj->bknown) {
5974 pline("That object wasn't cursed to begin with.");
5975 return 0;
5976 } else {
5977 obj->bknown = TRUE;
5978 pline("It seems that object wasn't cursed to begin with.");
5980 } else if (obj->cursed && !obj->hvycurse && !obj->prmcurse && !obj->morgcurse && !obj->evilcurse && !obj->bbrcurse && !obj->stckcurse ) {
5981 if (obj->bknown) {
5982 pline("That object didn't have any kind of curse that could be mildened. It is still cursed.");
5983 return 0;
5984 } else {
5985 obj->bknown = TRUE;
5986 pline("It seems that object didn't have any kind of curse that could be mildened. It is still cursed.");
5988 } else if (obj->cursed && !obj->morgcurse && !obj->evilcurse && !obj->bbrcurse) {
5989 obj->bknown = TRUE;
5991 if (stack_too_big(obj)) {
5992 pline("The stack was too big! Nothing happens.");
5993 t_timeout = rnz(7500);
5994 break;
5997 if (obj->stckcurse) {
5998 obj->stckcurse = FALSE;
5999 pline("The sticky curse is broken!");
6001 if (obj->prmcurse) {
6002 obj->prmcurse = obj->hvycurse = FALSE;
6003 pline("The prime curse is broken!");
6005 if (obj->hvycurse) {
6006 obj->hvycurse = FALSE;
6007 pline("The heavy curse is broken!");
6009 } else if (obj->cursed && (obj->morgcurse || obj->evilcurse || obj->bbrcurse)) {
6010 obj->bknown = TRUE;
6012 if (stack_too_big(obj)) {
6013 pline("The stack was too big! Nothing happens.");
6014 t_timeout = rnz(7500);
6015 break;
6018 if (rn2(10)) {
6019 pline("Unfortunately, you failed to break the curse.");
6020 t_timeout = rnz(7500);
6021 break;
6023 if (obj->stckcurse) {
6024 obj->stckcurse = FALSE;
6025 pline("The sticky curse is broken!");
6027 if (obj->morgcurse) {
6028 obj->morgcurse = obj->prmcurse = obj->hvycurse = FALSE;
6029 pline("The ancient morgothian curse is broken!");
6031 if (obj->evilcurse) {
6032 obj->evilcurse = obj->prmcurse = obj->hvycurse = FALSE;
6033 pline("The topi ylinen curse is broken!");
6035 if (obj->bbrcurse) {
6036 obj->bbrcurse = obj->prmcurse = obj->hvycurse = FALSE;
6037 pline("The black breath curse is broken!");
6040 t_timeout = rnz(7500);
6041 break;
6043 case T_FORCE_FIELD:
6045 pline("Force field activated!");
6046 num = 50 + (techlevX(tech_no) * 3);
6047 if (Race_if(PM_PLAYER_ATLANTEAN)) num *= 2;
6048 techt_inuse(tech_no) = num + 1;
6049 t_timeout = rnz(4000);
6050 break;
6052 case T_POINTINESS:
6054 if (!uwep) {
6055 pline("That doesn't work without a weapon!");
6056 return 0;
6058 if (uwep && weapon_type(uwep) != P_POLEARMS && weapon_type(uwep) != P_LANCE) {
6059 pline("That only works if your wielded weapon is a polearm or lance, and currently it's not!");
6060 return 0;
6063 if (uwep && uwep->spe < 0) {
6064 uwep->spe += rnd(abs(uwep->spe));
6065 if (uwep->spe > 0) uwep->spe = 0; /* fail safe */
6066 pline("Your stick seems slightly sharp now.");
6067 } else if (uwep && uwep->spe < 2) {
6068 uwep->spe++;
6069 pline("Your stick seems sharper now.");
6070 } else if (uwep && uwep->spe < 25 && !rn2(uwep->spe) ) {
6071 uwep->spe++;
6072 pline("Your stick seems very sharp now.");
6073 } else pline("Your stick seems as sharp as it was before.");
6075 t_timeout = rnz(7500);
6076 break;
6078 case T_BUG_SPRAY:
6080 coord cc;
6082 pline("You may place a stinking cloud on the map.");
6083 pline("Where do you want to center the cloud?");
6084 cc.x = u.ux;
6085 cc.y = u.uy;
6086 if (getpos(&cc, TRUE, "the desired position") < 0) {
6087 pline("%s", Never_mind);
6088 if (FailureEffects || u.uprops[FAILURE_EFFECTS].extrinsic || have_failurestone()) {
6089 pline("Oh wait, actually I do mind...");
6090 badeffect();
6092 return 0;
6094 if (!cansee(cc.x, cc.y) || distu(cc.x, cc.y) >= 32) {
6095 You("smell rotten eggs.");
6096 return 0;
6098 if (!PlayerCannotUseSkills && P_SKILL(P_PADDLE) >= P_GRAND_MASTER)
6099 (void) create_gas_cloud(cc.x, cc.y, 4, 12);
6100 else
6101 (void) create_gas_cloud(cc.x, cc.y, 3, 8);
6105 t_timeout = rnz(2000);
6106 break;
6108 case T_WHIRLSTAFF:
6110 if (!uwep) {
6111 pline("That doesn't work without a weapon!");
6112 return 0;
6114 if (uwep && weapon_type(uwep) != P_QUARTERSTAFF) {
6115 pline("That only works if your wielded weapon is a quarterstaff, and currently it's not!");
6116 return 0;
6119 You("start whirling like mad with your quarterstaff!");
6120 num = 20 + techlevX(tech_no);
6121 techt_inuse(tech_no) = num + 1;
6122 t_timeout = rnz(2500);
6123 break;
6125 case T_DELIBERATE_CURSE:
6127 if (CannotSelectItemsInPrompts) break;
6128 allowall[0] = ALL_CLASSES; allowall[1] = '\0';
6129 if ( !(obj = getobj(allowall, "curse"))) return(0);
6130 obj->bknown = TRUE;
6132 if (stack_too_big(obj)) {
6133 pline("The stack was too big! Nothing happens.");
6134 t_timeout = rnz(5000);
6135 break;
6138 curse(obj);
6139 pline("Okay, that object is cursed now.");
6141 t_timeout = rnz(5000);
6142 break;
6144 case T_ACQUIRE_STEED:
6148 if (u.uswallow) {
6149 pline("Engulfing steeds can't see you, and therefore the taming attempt fails.");
6150 return 0;
6153 int k, l, caughtX;
6154 struct monst *mtmp3;
6155 caughtX = 0;
6156 pline("You try to acquire a steed!");
6158 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
6159 if (!isok(u.ux + k, u.uy + l)) continue;
6160 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
6161 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(mtmp3->data->geno & G_UNIQ) && caughtX == 0)
6165 if (mtmp3->data->mlet == S_QUADRUPED || mtmp3->data->mlet == S_UNICORN || mtmp3->data->mlet == S_ANGEL || mtmp3->data->mlet == S_CENTAUR || mtmp3->data->mlet == S_DRAGON || mtmp3->data->mlet == S_JABBERWOCK || mtmp3->data->mlet == S_ZOUTHERN) {
6166 if (!(resist(mtmp3, RING_CLASS, 0, NOTELL) && resist(mtmp3, RING_CLASS, 0, NOTELL) && resist(mtmp3, RING_CLASS, 0, NOTELL))) {
6167 pline("%s is successfully tamed!", mon_nam(mtmp3));
6168 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
6169 if (techlevX(tech_no) < rnd(100)) caughtX++;
6170 t_timeout = rnz(5000);
6171 } else if ( ((rnd(30 - ACURR(A_CHA))) < 4) && (!resist(mtmp3, RING_CLASS, 0, NOTELL) || !resist(mtmp3, RING_CLASS, 0, NOTELL) || !resist(mtmp3, RING_CLASS, 0, NOTELL)) ) {
6172 pline("%s is successfully tamed!", mon_nam(mtmp3));
6173 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
6174 if (techlevX(tech_no) < rnd(100)) caughtX++;
6175 t_timeout = rnz(5000);
6176 } else {
6177 pline("%s resists the taming attempt!", mon_nam(mtmp3));
6179 } else pline("%s cannot be tamed by this method!", mon_nam(mtmp3));
6181 } /* monster is catchable loop */
6182 } /* for loop */
6185 t_timeout = rnz(5000);
6187 break;
6189 case T_SADDLING:
6192 struct obj *usaddling;
6194 pline("A saddle is created!");
6195 usaddling = mksobj(rnd_class(LEATHER_SADDLE, INKA_SADDLE), TRUE, FALSE, FALSE);
6196 if (usaddling) {
6197 usaddling->quan = 1;
6198 usaddling->known = usaddling->dknown = usaddling->bknown = usaddling->rknown = 1;
6199 usaddling->owt = weight(usaddling);
6200 dropy(usaddling);
6201 stackobj(usaddling);
6206 t_timeout = rnz(10000);
6207 break;
6209 case T_SHOPPING_QUEEN:
6211 register struct obj *heelses1, *heelses2, *heelses3, *heelses4, *heelses5, *heelses6, *heelses7, *heelses8, *heelses9, *heelses10;
6212 register int heelsamount;
6213 int heelidentity;
6214 int trycnt = 0;
6215 if (PlayerCannotUseSkills || (P_SKILL(P_HIGH_HEELS) <= P_EXPERT)) heelsamount = 1;
6216 else if (P_SKILL(P_HIGH_HEELS) <= P_MASTER) heelsamount = 3;
6217 else if (P_SKILL(P_HIGH_HEELS) <= P_GRAND_MASTER) heelsamount = 5;
6218 else if (P_SKILL(P_HIGH_HEELS) <= P_SUPREME_MASTER) heelsamount = 10;
6219 else heelsamount = 1; /* should never happen; fail safe */
6221 pline("Wow! You can get a pair of shoes from a list!");
6223 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6224 trycnt = 0;
6226 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6227 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6228 trycnt++;
6230 heelses1 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6231 if (heelses1) {
6232 heelses1->quan = 1;
6233 heelses1->known = heelses1->dknown = heelses1->bknown = heelses1->rknown = 1;
6234 heelses1->owt = weight(heelses1);
6237 if (heelsamount >= 3) {
6239 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6240 trycnt = 0;
6242 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6243 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6244 trycnt++;
6246 heelses2 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6247 if (heelses2) {
6248 heelses2->quan = 1;
6249 heelses2->known = heelses2->dknown = heelses2->bknown = heelses2->rknown = 1;
6250 heelses2->owt = weight(heelses2);
6253 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6254 trycnt = 0;
6256 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6257 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6258 trycnt++;
6260 heelses3 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6261 if (heelses3) {
6262 heelses3->quan = 1;
6263 heelses3->known = heelses3->dknown = heelses3->bknown = heelses3->rknown = 1;
6264 heelses3->owt = weight(heelses3);
6269 if (heelsamount >= 5) {
6271 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6272 trycnt = 0;
6274 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6275 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6276 trycnt++;
6278 heelses4 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6279 if (heelses4) {
6280 heelses4->quan = 1;
6281 heelses4->known = heelses4->dknown = heelses4->bknown = heelses4->rknown = 1;
6282 heelses4->owt = weight(heelses4);
6285 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6286 trycnt = 0;
6288 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6289 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6290 trycnt++;
6292 heelses5 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6293 if (heelses5) {
6294 heelses5->quan = 1;
6295 heelses5->known = heelses5->dknown = heelses5->bknown = heelses5->rknown = 1;
6296 heelses5->owt = weight(heelses5);
6301 if (heelsamount >= 10) {
6303 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6304 trycnt = 0;
6306 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6307 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6308 trycnt++;
6310 heelses6 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6311 if (heelses6) {
6312 heelses6->quan = 1;
6313 heelses6->known = heelses6->dknown = heelses6->bknown = heelses6->rknown = 1;
6314 heelses6->owt = weight(heelses6);
6317 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6318 trycnt = 0;
6320 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6321 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6322 trycnt++;
6324 heelses7 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6325 if (heelses7) {
6326 heelses7->quan = 1;
6327 heelses7->known = heelses7->dknown = heelses7->bknown = heelses7->rknown = 1;
6328 heelses7->owt = weight(heelses7);
6331 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6332 trycnt = 0;
6334 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6335 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6336 trycnt++;
6338 heelses8 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6339 if (heelses8) {
6340 heelses8->quan = 1;
6341 heelses8->known = heelses8->dknown = heelses8->bknown = heelses8->rknown = 1;
6342 heelses8->owt = weight(heelses8);
6345 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6346 trycnt = 0;
6348 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6349 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6350 trycnt++;
6352 heelses9 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6353 if (heelses9) {
6354 heelses9->quan = 1;
6355 heelses9->known = heelses9->dknown = heelses9->bknown = heelses9->rknown = 1;
6356 heelses9->owt = weight(heelses9);
6359 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6360 trycnt = 0;
6362 while (trycnt < 5000 && !ishighheeledb(heelidentity) ) {
6363 heelidentity = (PLASTEEL_BOOTS + rn2(LEVITATION_BOOTS - PLASTEEL_BOOTS + 1) );
6364 trycnt++;
6366 heelses10 = mksobj(heelidentity, TRUE, FALSE, FALSE);
6367 if (heelses10) {
6368 heelses10->quan = 1;
6369 heelses10->known = heelses10->dknown = heelses10->bknown = heelses10->rknown = 1;
6370 heelses10->owt = weight(heelses10);
6375 pline("Pick a pair of heels to acquire. The prompt will loop until you actually make a choice.");
6376 heelschoice:
6377 if (heelses1) {
6378 pline("You can get %s.", doname(heelses1));
6379 if (yn("Do you want them?") == 'y') {
6380 dropy(heelses1);
6381 stackobj(heelses1);
6382 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6383 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6384 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6385 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6386 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6387 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6388 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6389 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6390 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6391 goto heelschosen;
6395 if (heelses2 && heelsamount >= 3) {
6396 pline("You can get %s.", doname(heelses2));
6397 if (yn("Do you want them?") == 'y') {
6398 dropy(heelses2);
6399 stackobj(heelses2);
6400 if (heelses1) dealloc_obj(heelses1);
6401 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6402 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6403 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6404 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6405 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6406 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6407 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6408 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6409 goto heelschosen;
6413 if (heelses3 && heelsamount >= 3) {
6414 pline("You can get %s.", doname(heelses3));
6415 if (yn("Do you want them?") == 'y') {
6416 dropy(heelses3);
6417 stackobj(heelses3);
6418 if (heelses1) dealloc_obj(heelses1);
6419 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6420 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6421 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6422 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6423 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6424 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6425 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6426 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6427 goto heelschosen;
6431 if (heelses4 && heelsamount >= 5) {
6432 pline("You can get %s.", doname(heelses4));
6433 if (yn("Do you want them?") == 'y') {
6434 dropy(heelses4);
6435 stackobj(heelses4);
6436 if (heelses1) dealloc_obj(heelses1);
6437 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6438 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6439 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6440 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6441 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6442 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6443 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6444 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6445 goto heelschosen;
6449 if (heelses5 && heelsamount >= 5) {
6450 pline("You can get %s.", doname(heelses5));
6451 if (yn("Do you want them?") == 'y') {
6452 dropy(heelses5);
6453 stackobj(heelses5);
6454 if (heelses1) dealloc_obj(heelses1);
6455 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6456 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6457 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6458 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6459 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6460 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6461 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6462 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6463 goto heelschosen;
6467 if (heelses6 && heelsamount >= 10) {
6468 pline("You can get %s.", doname(heelses6));
6469 if (yn("Do you want them?") == 'y') {
6470 dropy(heelses6);
6471 stackobj(heelses6);
6472 if (heelses1) dealloc_obj(heelses1);
6473 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6474 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6475 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6476 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6477 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6478 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6479 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6480 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6481 goto heelschosen;
6485 if (heelses7 && heelsamount >= 10) {
6486 pline("You can get %s.", doname(heelses7));
6487 if (yn("Do you want them?") == 'y') {
6488 dropy(heelses7);
6489 stackobj(heelses7);
6490 if (heelses1) dealloc_obj(heelses1);
6491 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6492 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6493 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6494 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6495 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6496 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6497 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6498 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6499 goto heelschosen;
6503 if (heelses8 && heelsamount >= 10) {
6504 pline("You can get %s.", doname(heelses8));
6505 if (yn("Do you want them?") == 'y') {
6506 dropy(heelses8);
6507 stackobj(heelses8);
6508 if (heelses1) dealloc_obj(heelses1);
6509 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6510 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6511 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6512 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6513 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6514 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6515 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6516 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6517 goto heelschosen;
6521 if (heelses9 && heelsamount >= 10) {
6522 pline("You can get %s.", doname(heelses9));
6523 if (yn("Do you want them?") == 'y') {
6524 dropy(heelses9);
6525 stackobj(heelses9);
6526 if (heelses1) dealloc_obj(heelses1);
6527 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6528 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6529 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6530 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6531 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6532 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6533 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6534 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6535 goto heelschosen;
6539 if (heelses10 && heelsamount >= 10) {
6540 pline("You can get %s.", doname(heelses10));
6541 if (yn("Do you want them?") == 'y') {
6542 dropy(heelses10);
6543 stackobj(heelses10);
6544 if (heelses1) dealloc_obj(heelses1);
6545 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6546 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6547 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6548 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6549 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6550 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6551 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6552 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6553 goto heelschosen;
6557 pline("There's nothing else left on the list.");
6558 if (yn("Do you choose to get no heels at all?") == 'y') {
6560 if (heelses1) dealloc_obj(heelses1);
6561 if (heelses2 && heelsamount >= 3) dealloc_obj(heelses2);
6562 if (heelses3 && heelsamount >= 3) dealloc_obj(heelses3);
6563 if (heelses4 && heelsamount >= 5) dealloc_obj(heelses4);
6564 if (heelses5 && heelsamount >= 5) dealloc_obj(heelses5);
6565 if (heelses6 && heelsamount >= 10) dealloc_obj(heelses6);
6566 if (heelses7 && heelsamount >= 10) dealloc_obj(heelses7);
6567 if (heelses8 && heelsamount >= 10) dealloc_obj(heelses8);
6568 if (heelses9 && heelsamount >= 10) dealloc_obj(heelses9);
6569 if (heelses10 && heelsamount >= 10) dealloc_obj(heelses10);
6570 goto heelschosen;
6573 goto heelschoice;
6576 heelschosen:
6577 pline("There might be something waiting for you on the %s...", surface(u.ux, u.uy));
6578 t_timeout = rnz(7500);
6579 break;
6581 case T_BEAUTY_CHARM:
6583 if (!PlayerInHighHeels) {
6584 pline("You must be wearing high heels for that.");
6585 return 0;
6588 techt_inuse(tech_no) = 11;
6589 nomul(-11, "posing sexily", FALSE);
6590 pline("You start posing sexily with your high heels, hoping to charm the bystanders.");
6591 if (uarmf && uarmf->oartifact == ART_PRECURSOR_TO_THE___) adjattrib(A_CHA, 1, -1, TRUE);
6593 t_timeout = rnz(2000);
6594 break;
6596 case T_ASIAN_KICK:
6598 if (!PlayerInStilettoHeels) {
6599 pline("Only heroes wearing stiletto heels can use this technique!");
6600 return 0;
6603 techt_inuse(tech_no) = 51;
6604 pline("Your stiletto heels are ready. Quick! Find someone with nuts and kick him for a devastating effect!");
6605 t_timeout = rnz(2500);
6606 break;
6608 case T_LEGSCRATCH_ATTACK:
6610 if (!PlayerInConeHeels) {
6611 pline("Only heroes wearing cone heels can use this technique!");
6612 return 0;
6615 num = 50 + (techlevX(tech_no) * 2);
6616 techt_inuse(tech_no) = num + 1;
6617 pline("Your cone heels are eager to scratch up and down hostile legs. Make sure you kick everyone that crosses your path!");
6619 t_timeout = rnz(3000);
6620 break;
6622 case T_GROUND_STOMP:
6624 if (!PlayerInWedgeHeels) {
6625 pline("Only heroes wearing wedge heels can use this technique!");
6626 return 0;
6629 num = 25 + (techlevX(tech_no) * 2);
6630 techt_inuse(tech_no) = num + 1;
6631 pline("Your wedge heels absolutely want to stomp enemies, so you should try to kick monsters with them now!");
6633 t_timeout = rnz(4000);
6634 break;
6636 case T_ATHLETIC_COMBAT:
6638 if (!PlayerInBlockHeels) {
6639 pline("Only heroes wearing block heels can use this technique!");
6640 return 0;
6643 num = 50 + (techlevX(tech_no) * 3);
6644 techt_inuse(tech_no) = num + 1;
6645 pline("Your block heels expect you to repeatedly kick enemies now, hoping to bludgeon them.");
6647 t_timeout = rnz(2500);
6648 break;
6650 case T_PRAYING_SUCCESS:
6652 techt_inuse(tech_no) = 1;
6653 dopray();
6654 t_timeout = rnz(30000);
6655 break;
6657 case T_OVER_RAY:
6659 num = 100 + (techlevX(tech_no) * 5);
6660 techt_inuse(tech_no) = num + 1;
6661 pline("For a while, all your rays have extended range!");
6663 t_timeout = rnz(5000);
6664 break;
6666 case T_ENCHANTERANG:
6668 if (!uwep) {
6669 pline("That doesn't work without a weapon!");
6670 return 0;
6672 if (uwep && weapon_type(uwep) != P_BOOMERANG && weapon_type(uwep) != -P_BOOMERANG) {
6673 pline("That only works if your wielded weapon is a boomerang, and currently it's not!");
6674 return 0;
6677 if (uwep && stack_too_big(uwep)) {
6678 pline("You were trying to enchant too many boomerangs at once and therefore they barely received any enchantment bonus.");
6679 } else if (uwep && uwep->spe < 0) {
6680 uwep->spe += rnd(abs(uwep->spe));
6681 if (uwep->spe > 0) uwep->spe = 0; /* fail safe */
6682 } else if (uwep && uwep->spe < 2) {
6683 uwep->spe++;
6684 } else if (uwep && uwep->spe < 25 && !rn2(uwep->spe) ) {
6685 uwep->spe++;
6688 if (uwep && stack_too_big(uwep)) {
6689 pline("You were trying to enchant too many boomerangs at once and therefore they barely received any enchantment bonus.");
6690 } else if (uwep && uwep->spe < 2) {
6691 uwep->spe++;
6692 } else if (uwep && uwep->spe < 25 && !rn2(uwep->spe) ) {
6693 uwep->spe++;
6696 if (uwep && stack_too_big(uwep)) {
6697 pline("You were trying to enchant too many boomerangs at once and therefore they barely received any enchantment bonus.");
6698 } else if (uwep && uwep->spe < 2) {
6699 uwep->spe++;
6700 pline("Your boomerang is barely enchanted.");
6701 } else if (uwep && uwep->spe < 25 && !rn2(uwep->spe) ) {
6702 uwep->spe++;
6703 pline("Your boomerang is well-enchanted.");
6704 } else pline("Your boomerang is moderately enchanted.");
6706 t_timeout = rnz(10000);
6707 break;
6709 case T_BATMAN_ARSENAL:
6712 struct obj *uboomerang;
6714 pline("A boomerang is created!");
6715 uboomerang = mksobj(rn2(3) ? BOOMERANG : !rn2(4) ? ALU_BOOMERANG : !rn2(3) ? BATARANG : rn2(2) ? DARK_BATARANG : SILVER_CHAKRAM, TRUE, FALSE, FALSE);
6716 if (uboomerang) {
6717 uboomerang->quan = 1;
6718 uboomerang->known = uboomerang->dknown = uboomerang->bknown = uboomerang->rknown = 1;
6719 uboomerang->owt = weight(uboomerang);
6720 dropy(uboomerang);
6721 stackobj(uboomerang);
6726 t_timeout = rnz(5000);
6727 break;
6729 case T_JOKERBANE:
6731 num = 100 + (techlevX(tech_no) * 5);
6732 techt_inuse(tech_no) = num + 1;
6733 pline("Your batarang is capable of paralyzing monsters for a while.");
6734 t_timeout = rnz(8000);
6736 break;
6738 case T_CALL_THE_POLICE:
6740 pline("You call the kops!");
6744 int caughtY;
6745 caughtY = 0;
6747 while (caughtY == 0) {
6748 mtmp = makemon(mkclass(S_KOP,0), u.ux, u.uy, NO_MM_FLAGS);
6749 if (!mtmp) break;
6750 (void) tamedog(mtmp, (struct obj *) 0, TRUE);
6751 if (techlevX(tech_no) < rnd(80)) caughtY++;
6756 t_timeout = rnz(10000);
6757 break;
6759 case T_DOMINATE:
6761 if (u.uswallow) {
6762 pline("Domination doesn't work while you're engulfed!");
6763 return 0;
6768 int k, l, caughtX;
6769 struct monst *mtmp3;
6770 caughtX = 0;
6771 pline("You try to dominate monsters!");
6773 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
6774 if (!isok(u.ux + k, u.uy + l)) continue;
6775 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
6776 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(mtmp3->data->geno & G_UNIQ) && caughtX == 0)
6780 if ( is_animal(mtmp3->data)) {
6781 pline("%s is dominated!", mon_nam(mtmp3));
6782 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
6783 if (techlevX(tech_no) < rnd(100)) caughtX++;
6784 t_timeout = rnz(10000);
6787 else pline("%s can't be dominated with this method!", mon_nam(mtmp3));
6789 } /* monster is catchable loop */
6790 } /* for loop */
6792 t_timeout = rnz(10000);
6796 break;
6798 case T_INCARNATION:
6802 int k, l, polymorphnumber;
6803 struct monst *mtmp3;
6805 pline("Pick a monster to incarnate into. The prompt will loop until you actually make a choice.");
6807 incarnationselect:
6808 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
6809 if (!isok(u.ux + k, u.uy + l)) continue;
6810 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0)) {
6811 polymorphnumber = mtmp3->mnum;
6812 pline("You can incarnate into %s.", mtmp3->data->mname);
6813 if (yn("Do it?") == 'y') {
6814 u.wormpolymorph = polymorphnumber;
6815 goto incarnationfinish;
6820 pline("You can also choose to not incarnate at all, although that would be a waste.");
6821 if (yn("Do it?") == 'y') {
6822 pline("Well, if you really want to waste such a powerful technique...");
6823 t_timeout = rnz(25000);
6824 break;
6826 goto incarnationselect;
6828 incarnationfinish:
6829 if (!rn2(3)) {
6830 u.wormpolymorph = rn2(NUMMONS);
6831 pline("Your incarnation attempt goes out of control!");
6833 polyself(FALSE);
6837 t_timeout = rnz(25000);
6839 break;
6841 case T_COMBO_STRIKE:
6843 if (!canuseunarmedtechs()) {
6844 You("can't do that while wielding a weapon!");
6845 return 0;
6848 num = 30 + (techlevX(tech_no) * 2);
6849 techt_inuse(tech_no) = num + 1;
6850 pline("You're starting your combo!");
6851 u.combostrike = 1;
6852 u.comboactive = TRUE;
6853 t_timeout = rnz(5000);
6855 break;
6857 case T_FUNGOISM:
6859 pline("You feel fungal.");
6860 techt_inuse(tech_no) = 1;
6861 polyself(FALSE);
6862 techt_inuse(tech_no) = 0;
6863 t_timeout = rnz(8000);
6864 break;
6866 case T_BECOME_UNDEAD:
6868 pline("You feel dead.");
6869 techt_inuse(tech_no) = 1;
6870 polyself(FALSE);
6871 techt_inuse(tech_no) = 0;
6872 t_timeout = rnz(8000);
6873 break;
6875 case T_JIU_JITSU:
6877 num = 1000 + (techlevX(tech_no) * 10);
6878 techt_inuse(tech_no) = num + 1;
6879 pline("You start doing jiu-jitsu!");
6880 t_timeout = rnz(10000);
6881 break;
6883 case T_BLADE_ANGER:
6885 num = 100 + (techlevX(tech_no) * 3);
6886 techt_inuse(tech_no) = num + 1;
6887 pline("Your shuriken can fire beams now!");
6889 t_timeout = rnz(7500);
6890 break;
6892 case T_RE_TAMING:
6894 pline("You try to tame your former pet...");
6897 int k, l;
6898 struct monst *mtmp3;
6900 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
6901 if (!isok(u.ux + k, u.uy + l)) continue;
6902 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !mtmp3->mfrenzied && (mtmp3->mpeaceful || !rn2(3) || ((rnd(30 - ACURR(A_CHA))) < 4) ) && mtmp3->mtame == 0 && mtmp3->wastame) {
6904 pline("%s wants to be your pet again!", mon_nam(mtmp3));
6905 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
6906 t_timeout = rnz(1500);
6907 break;
6914 t_timeout = rnz(1500);
6916 break;
6918 case T_INTRINSIC_ROULETTE:
6919 You("spin the roulette wheel...");
6920 intrinsicgainorloss(0);
6921 t_timeout = rnz(10000);
6922 break;
6924 case T_SPECTRAL_SWORD:
6925 You("focus the powers of the elements into your weapon.");
6926 techt_inuse(tech_no) = rnd((int) (techlevX(tech_no)/3 + 1)) + d(1,4) + 2;
6927 t_timeout = rnz(1500);
6928 break;
6930 case T_REVERSE_IDENTIFY:
6932 int j;
6933 long oldgold;
6934 char buf[BUFSZ];
6936 for (j = 0; j <= 5; j++) {
6937 if (j >= 5) {
6938 pline("%s", thats_enough_tries);
6939 goto revid_end;
6941 getlin("What do you want to identify?", buf);
6942 if (buf[0] == 0) continue;
6943 oldgold = u.ugold;
6944 otmp = readobjnam(buf, (struct obj *)0, TRUE, FALSE);
6945 if (u.ugold != oldgold) {
6946 pline("Don't you date cheat me again! -- Your fault!");
6947 /* Make them pay */
6948 u.ugold = oldgold / 2;
6949 continue;
6951 if (otmp == &zeroobj || otmp == (struct obj *) 0) {
6952 pline("That doesn't exist.");
6953 continue;
6955 break;
6957 strcpy(buf,xname(otmp));
6958 makeknown(otmp->otyp);
6959 pline("The %s is a %s.",buf,xname(otmp));
6960 if (Has_contents(otmp))
6961 delete_contents(otmp);
6962 obfree(otmp,(struct obj *) 0);
6964 revid_end:
6965 pline("You also learn the identity of some other objects:");
6966 for (i = 0; i < 5; i++) {
6967 j = rn2(NUM_OBJECTS);
6968 while (objects[j].oc_prob < 1) j = rn2(NUM_OBJECTS);
6969 makeknown(j);
6970 pline("%s (%s).", obj_descr[j].oc_name, obj_descr[j].oc_descr);
6972 t_timeout = rnz(20000);
6974 break;
6976 case T_DETECT_TRAPS:
6977 trap_detect((struct obj *)0);
6978 t_timeout = rnz(20000);
6979 break;
6981 case T_DIRECTIVE:
6982 if (PlayerCannotUseSkills) {
6983 pline("Unfortunately, no one seems to follow any directives you're giving.");
6984 t_timeout = rnz(200);
6985 break;
6987 if (P_SKILL(P_PETKEEPING) < P_SKILLED && P_SKILL(P_RIDING) < P_SKILLED) {
6988 pline("Unfortunately, no one seems to follow any directives you're giving.");
6989 t_timeout = rnz(200);
6990 break;
6993 if (P_SKILL(P_RIDING) >= P_SKILLED) {
6995 pline("Currently your steed has %d%% chance of being targetted by monsters.", u.steedhitchance);
6996 if (yn("Change it?") == 'y') {
6998 int lowerbound, higherbound;
6999 lowerbound = 25;
7000 higherbound = 25;
7002 switch (P_SKILL(P_RIDING)) {
7003 case P_SKILLED:
7004 lowerbound = 20;
7005 higherbound = 33;
7006 break;
7007 case P_EXPERT:
7008 lowerbound = 10;
7009 higherbound = 50;
7010 break;
7011 case P_MASTER:
7012 lowerbound = 5;
7013 higherbound = 75;
7014 break;
7015 case P_GRAND_MASTER:
7016 lowerbound = 3;
7017 higherbound = 90;
7018 break;
7019 case P_SUPREME_MASTER:
7020 lowerbound = 1;
7021 higherbound = 100;
7022 break;
7023 default:
7024 lowerbound = 25;
7025 higherbound = 25;
7026 break;
7029 pline("You can set the chance to values between %d%% and %d%% (inclusive).", lowerbound, higherbound);
7030 if (lowerbound <= 1 && yn("Set the chance to 1%%?") == 'y') {
7031 u.steedhitchance = 1;
7032 pline("The chance that attacks target your steed is 1%% now.");
7033 } else if (lowerbound <= 3 && yn("Set the chance to 3%%?") == 'y') {
7034 u.steedhitchance = 3;
7035 pline("The chance that attacks target your steed is 3%% now.");
7036 } else if (lowerbound <= 5 && yn("Set the chance to 5%%?") == 'y') {
7037 u.steedhitchance = 5;
7038 pline("The chance that attacks target your steed is 5%% now.");
7039 } else if (lowerbound <= 10 && yn("Set the chance to 10%%?") == 'y') {
7040 u.steedhitchance = 10;
7041 pline("The chance that attacks target your steed is 10%% now.");
7042 } else if (lowerbound <= 20 && yn("Set the chance to 20%%?") == 'y') {
7043 u.steedhitchance = 20;
7044 pline("The chance that attacks target your steed is 20%% now.");
7045 } else if (yn("Set the chance to 25%%?") == 'y') {
7046 u.steedhitchance = 25;
7047 pline("The chance that attacks target your steed is 25%% now.");
7048 } else if (higherbound >= 33 && yn("Set the chance to 33%%?") == 'y') {
7049 u.steedhitchance = 33;
7050 pline("The chance that attacks target your steed is 33%% now.");
7051 } else if (higherbound >= 50 && yn("Set the chance to 50%%?") == 'y') {
7052 u.steedhitchance = 50;
7053 pline("The chance that attacks target your steed is 50%% now.");
7054 } else if (higherbound >= 75 && yn("Set the chance to 75%%?") == 'y') {
7055 u.steedhitchance = 75;
7056 pline("The chance that attacks target your steed is 75%% now.");
7057 } else if (higherbound >= 90 && yn("Set the chance to 90%%?") == 'y') {
7058 u.steedhitchance = 90;
7059 pline("The chance that attacks target your steed is 90%% now.");
7060 } else if (higherbound >= 100 && yn("Set the chance to 100%%?") == 'y') {
7061 u.steedhitchance = 100;
7062 pline("The chance that attacks target your steed is 100%% now.");
7063 } else pline("The chance that attacks target your steed remains %d%%.", u.steedhitchance);
7069 if (P_SKILL(P_PETKEEPING) >= P_SKILLED) {
7070 pline("Currently your pets can%s pick up items.", u.petcollectitems ? "" : "'t");
7071 if (yn("Change it?") == 'y') {
7072 if (u.petcollectitems) u.petcollectitems = 0;
7073 else u.petcollectitems = 1;
7074 pline("Your pets can%s pick up items now.", u.petcollectitems ? "" : "'t");
7078 if (P_SKILL(P_PETKEEPING) >= P_EXPERT) {
7079 pline("Currently your pets can%s attack%s monsters.", (u.petattackenemies > 0) ? "" : "'t", u.petattackenemies == 2 ? " both hostile and peaceful" : u.petattackenemies == 1 ? " only hostile" : u.petattackenemies == -1 ? " or be attacked by" : "");
7080 if (yn("Change it?") == 'y') {
7081 pline("You got the following options: make the pet attack everything, make it attack only hostile monsters, or prevent it from attacking anything (with the choice that it may or may not still be attacked by hostiles).");
7082 if (yn("Do you want your pets to attack everything?") == 'y') {
7083 u.petattackenemies = 2;
7084 pline("Your pets can attack all monsters now.");
7085 } else if (yn("Do you want your pets to only attack hostile creatures?") == 'y') {
7086 u.petattackenemies = 1;
7087 pline("Your pets can attack hostile monsters now, but will leave peaceful ones alone.");
7088 } else if (yn("Do you want your pets to not attack any monsters?") == 'y') {
7089 u.petattackenemies = 0;
7090 pline("Your pets can't attack monsters now.");
7091 } else if (yn("Do you want your pets to not attack any monsters, and also not be attacked by them anymore?") == 'y') {
7092 u.petattackenemies = -1;
7093 pline("Your pets can't attack monsters now and also won't be attacked by monsters.");
7098 if (P_SKILL(P_PETKEEPING) >= P_MASTER) {
7099 pline("Currently your pets can%s eat food off the floor.", u.petcaneat ? "" : "'t");
7100 if (yn("Change it?") == 'y') {
7101 if (u.petcaneat) u.petcaneat = 0;
7102 else u.petcaneat = 1;
7103 pline("Your pets can%s eat food off the floor now.", u.petcaneat ? "" : "'t");
7107 if (P_SKILL(P_PETKEEPING) >= P_GRAND_MASTER) {
7108 pline("Currently your pets can%s try to follow you.", u.petcanfollow ? "" : "'t");
7109 if (yn("Change it?") == 'y') {
7110 if (u.petcanfollow) u.petcanfollow = 0;
7111 else u.petcanfollow = 1;
7112 pline("Your pets can%s try to follow you now.", u.petcanfollow ? "" : "'t");
7116 t_timeout = rnz(P_SKILL(P_PETKEEPING) >= P_SUPREME_MASTER ? 50 : 200);
7117 break;
7119 case T_REMOVE_IMPLANT:
7121 if (!uimplant) {
7122 pline("There is no implant that could be removed!");
7123 return 0;
7125 pline("Your implant is removed.");
7126 Implant_off();
7128 t_timeout = rnz(20000);
7129 break;
7131 case T_REROLL_IMPLANT:
7133 if (!uimplant) {
7134 pline("You're not wearing any implant!");
7135 return 0;
7139 register struct obj *wearimplant;
7140 long savewornmask;
7142 wearimplant = uimplant;
7143 if (!wearimplant) {
7144 pline("Somehow the implant went missing...");
7145 break;
7148 savewornmask = wearimplant->owornmask;
7149 setworn((struct obj *)0, wearimplant->owornmask);
7151 if (wearimplant->otyp >= IMPLANT_OF_ABSORPTION && wearimplant->otyp <= IMPLANT_OF_PROSPERITY) {
7152 objects[wearimplant->otyp].a_ac = rnd(10);
7154 if (wearimplant->otyp >= IMPLANT_OF_QUEEB_BUTT && wearimplant->otyp <= IMPLANT_OF_FINGER_POINTING) {
7155 objects[wearimplant->otyp].a_ac = rnd(10);
7158 if (wearimplant->otyp >= IMPLANT_OF_QUICKENING && wearimplant->otyp <= IMPLANT_OF_BLITZEN) {
7159 objects[wearimplant->otyp].a_ac = rnd(8);
7160 objects[wearimplant->otyp].oc_oprop = randnastyenchantment();
7162 if (wearimplant->otyp >= IMPLANT_OF_TOTAL_NONSENSE && wearimplant->otyp <= IMPLANT_OF_GALVANIZATION) {
7163 objects[wearimplant->otyp].a_ac = rnd(8);
7164 objects[wearimplant->otyp].oc_oprop = randnastyenchantment();
7167 if (wearimplant->otyp >= IMPLANT_OF_SERENITY && wearimplant->otyp <= IMPLANT_OF_CARNAGE) {
7168 objects[wearimplant->otyp].a_ac = rnd(9);
7169 objects[wearimplant->otyp].oc_oprop = randfemienchantment();
7171 if (wearimplant->otyp >= IMPLANT_OF_LEGEND && wearimplant->otyp <= IMPLANT_OF_VIRTUE) {
7172 objects[wearimplant->otyp].a_ac = rnd(9);
7173 objects[wearimplant->otyp].oc_oprop = randfemienchantment();
7176 if (wearimplant->otyp >= IMPLANT_OF_IRE && wearimplant->otyp <= IMPLANT_OF_FREEDOM) {
7177 objects[wearimplant->otyp].a_ac = rnd(5);
7178 objects[wearimplant->otyp].oc_oprop = !rn2(10) ? randnastyenchantment() : randenchantment();
7180 if (wearimplant->otyp >= IMPLANT_OF_TEN_THOUSAND_THINGS && wearimplant->otyp <= IMPLANT_OF_VIRTUE) {
7181 objects[wearimplant->otyp].a_ac = rnd(5);
7182 objects[wearimplant->otyp].oc_oprop = !rn2(10) ? randnastyenchantment() : randenchantment();
7184 wearimplant->shirtmessage = rnd(1000000);
7186 setworn(wearimplant, savewornmask);
7187 pline("All done - your implant got re-initialized! Its base AC value got rerolled, and if it was a type that had a random enchantment, that was re-randomized as well. The bonus you'll get from wearing it while in a form without hands has also been changed.");
7190 t_timeout = rnz(10000);
7191 break;
7193 case T_TIME_STOP:
7195 pline((Role_if(PM_SAMURAI) || Role_if(PM_NINJA)) ? "Jikan ga teishi shimashita." : "Time has stopped.");
7196 TimeStopped += (5 + rnd(6));
7197 t_timeout = rnz(25000);
7198 break;
7200 case T_STAT_RESIST:
7201 num = 50 + (techlevX(tech_no) * 10);
7202 techt_inuse(tech_no) = num + 1;
7203 t_timeout = rnz(3000);
7204 break;
7206 case T_UNCURSE_SABER:
7207 if (!uwep) {
7208 pline("That doesn't work without a weapon!");
7209 break;
7211 if (uwep && !(is_lightsaber(uwep))) {
7212 pline("Trying to cheat, huh? Nope. This technique can only uncurse lightsabers.");
7213 break;
7215 if (uwep && !(uwep->cursed)) {
7216 uwep->bknown = TRUE;
7217 pline("Your lightsaber wasn't cursed to begin with, and therefore nothing happens.");
7218 t_timeout = rnz(5000);
7219 break;
7221 t_timeout = rnz(5000);
7222 if (uwep) {
7223 pline("Your lightsaber is surrounded by a holy aura.");
7224 uncurse(uwep, TRUE);
7226 break;
7228 case T_ENERGY_CONSERVATION:
7229 if (!uwep || (uwep && !is_lightsaber(uwep))) {
7230 pline("You're not holding a lightsaber!");
7231 break;
7233 num = 1000 + (techlevX(tech_no) * 10);
7234 techt_inuse(tech_no) = num + 1;
7235 pline("The energy consumption rate of your lightsaber slows down!");
7236 t_timeout = rnz(6000);
7237 break;
7239 case T_UNARMED_FOCUS:
7241 if (!canuseunarmedtechs()) {
7242 pline("That requires you to be fighting without a weapon!");
7243 break;
7245 docalm(); /* stop all other techs that might be active --Amy */
7247 num = 1000 + (techlevX(tech_no) * 10);
7248 techt_inuse(tech_no) = num + 1;
7249 pline("You're focussing on fighting unarmed!");
7250 t_timeout = rnz(6000);
7251 break;
7253 case T_ENCHANT_ROBE:
7255 register struct obj *wearrobe;
7256 long savewornmask;
7258 if (!uarm) {
7259 pline("Without armor, that technique won't do anything.");
7260 break;
7262 if (uarm && !(uarm->otyp >= ROBE && uarm->otyp <= ROBE_OF_WEAKNESS)) {
7263 pline("Nope, that won't work. Wear a robe!");
7264 break;
7266 wearrobe = uarm;
7267 if (!wearrobe) {
7268 pline("Somehow the robe is missing...");
7269 break;
7271 savewornmask = wearrobe->owornmask;
7272 setworn((struct obj *)0, wearrobe->owornmask);
7273 t_timeout = rnz(10000);
7275 wearrobe->enchantment = randenchantment();
7276 pline("Your robe's special enchantment was randomized.");
7277 if (!PlayerCannotUseSkills && P_SKILL(P_SORESU) >= P_GRAND_MASTER) {
7278 if (wearrobe && wearrobe->spe < 0) {
7279 wearrobe->spe += rnd(abs(wearrobe->spe));
7280 if (wearrobe->spe > 0) wearrobe->spe = 0; /* fail safe */
7281 pline("Your robe's negative enchantment value is remedied.");
7282 } else if (wearrobe && wearrobe->spe < 2) {
7283 wearrobe->spe++;
7284 pline("Your robe gained a positive enchantment value.");
7285 } else if (wearrobe && wearrobe->spe < 7 && !rn2(wearrobe->spe) ) {
7286 wearrobe->spe++;
7287 pline("Your robe has a high positive enchantment value now.");
7288 } else pline("Your robe's enchantment value unfortunately didn't increase.");
7291 setworn(wearrobe, savewornmask);
7293 break;
7295 case T_WILD_SLASHING:
7296 if (!(uwep && is_lightsaber(uwep) && uwep->lamplit && u.twoweap && uswapwep && is_lightsaber(uswapwep) && uswapwep->lamplit)) {
7297 pline("You must be dual-wielding lit lightsabers for that!");
7298 break;
7300 num = 20 + (techlevX(tech_no) * 3);
7301 techt_inuse(tech_no) = num + 1;
7302 t_timeout = rnz(3000);
7303 pline("Your lightsabers start attacking rapidly at the cost of accuracy.");
7304 break;
7306 case T_ABSORBER_SHIELD:
7307 if (!uwep || (uwep && !is_lightsaber(uwep))) {
7308 pline("You're not holding a lightsaber!");
7309 break;
7311 num = 200 + (techlevX(tech_no) * 7);
7312 techt_inuse(tech_no) = num + 1;
7313 t_timeout = rnz(2500);
7314 pline("Your lightsaber becomes capable of absorbing enemy projectiles to gain energy.");
7315 break;
7317 case T_PSYCHO_FORCE:
7319 int forcedamage;
7320 coord cc;
7321 struct monst *psychmonst;
7322 pline("Select a monster to use psycho force");
7323 cc.x = u.ux;
7324 cc.y = u.uy;
7325 getpos(&cc, TRUE, "the spot to attack");
7326 if (cc.x == -10) return (0); /* user pressed esc */
7327 psychmonst = m_at(cc.x, cc.y);
7329 if (!psychmonst || (!canseemon(psychmonst) && !canspotmon(psychmonst))) {
7330 You("don't see a monster there!");
7331 return (0);
7334 if (psychmonst) {
7336 forcedamage = u.ulevel + techlevX(tech_no);
7337 if (!PlayerCannotUseSkills) {
7339 switch (P_SKILL(P_DJEM_SO)) {
7340 case P_MASTER: forcedamage *= 3; forcedamage /= 2; break;
7341 case P_GRAND_MASTER: forcedamage *= 2; break;
7342 case P_SUPREME_MASTER: forcedamage *= 5; forcedamage /= 2; break;
7346 psychmonst->mcanmove = 0;
7347 psychmonst->mstrategy &= ~STRAT_WAITFORU;
7349 if (forcedamage < 31) psychmonst->mfrozen = 3;
7350 else psychmonst->mfrozen = (forcedamage / 10);
7352 pline("%s sputters at the forced hold!", Monnam(psychmonst));
7353 psychmonst->mhp -= forcedamage;
7354 if (psychmonst->mhp < 1) {
7355 pline("%s dies!", Monnam(psychmonst));
7356 xkilled(psychmonst,0);
7357 } else wakeup(psychmonst); /* monster becomes hostile */
7362 t_timeout = rnz(2000);
7363 break;
7365 case T_INTENSIVE_TRAINING:
7367 pline("You train your attributes...");
7368 adjattrib(rn2(A_MAX), 1, -1, TRUE);
7369 t_timeout = rnz(7500);
7370 break;
7372 case T_SURRENDER_OR_DIE:
7373 if (!uwep || (uwep && !is_lightsaber(uwep))) {
7374 pline("You're not holding a lightsaber!");
7375 break;
7377 num = 200 + (techlevX(tech_no) * 20);
7378 techt_inuse(tech_no) = num + 1;
7379 t_timeout = rnz(5000);
7380 pline("Your lightsaber gains the ability to pacify monsters when breaking their weapon!");
7381 break;
7383 case T_PERILOUS_WHIRL:
7384 if (!uwep || (uwep && !is_lightsaber(uwep)) || (uwep && !bimanual(uwep)) ) {
7385 pline("You're not holding a double lightsaber!");
7386 break;
7388 num = 100 + (techlevX(tech_no) * 6);
7389 techt_inuse(tech_no) = num + 1;
7390 t_timeout = rnz(2500);
7391 pline("Your lightsaber can drain the life of opponents for a while!");
7392 break;
7394 case T_SUMMON_SHOE:
7395 t_timeout = rnz(10000);
7398 struct permonst *shoe = 0;
7399 int attempts = 0;
7400 struct monst *shoemonst;
7402 do {
7403 shoe = rndmonst();
7404 attempts++;
7405 if (attempts && (attempts % 10000 == 0)) u.mondiffhack++;
7406 if (!rn2(2000)) reset_rndmonst(NON_PM);
7408 } while ( (!shoe || (shoe && !(shoe->msound == MS_SHOE))) && attempts < 50000);
7410 if (shoe && (shoe->msound == MS_SHOE) ) {
7411 pline("A shoe appears from nowhere!");
7412 shoemonst = makemon(shoe, u.ux, u.uy, NO_MM_FLAGS);
7413 if (shoemonst) (void) tamedog(shoemonst, (struct obj *) 0, TRUE);
7414 } else if (shoe) {
7415 pline("Hmm... you expected a shoe, but some other monster appeared instead!");
7416 shoemonst = makemon(shoe, u.ux, u.uy, NO_MM_FLAGS);
7417 if (shoemonst) (void) tamedog(shoemonst, (struct obj *) 0, TRUE);
7418 } else pline("Somehow, it failed... :(");
7420 u.mondiffhack = 0;
7424 break;
7426 case T_EDDY_WIND:
7427 num = 1 + techlevX(tech_no);
7428 techt_inuse(tech_no) = num + 1;
7429 pline("You prepare a powerful axe-and-sword-mill!");
7431 t_timeout = rnz(3500);
7432 break;
7434 case T_KICK_IN_THE_NUTS:
7436 if (!PlayerInSexyFlats) {
7437 pline("You must be wearing sexy flats for that!");
7438 return 0;
7441 if (!getdir((char *)0)) return 0;
7442 if (!u.dx && !u.dy) {
7443 /* Hopefully a mistake ;B */
7444 pline(flags.female ? "Since you don't have nuts, you cannot try to smash them with your feet either." : "For a moment, you feel the itch to ram your footwear into your own nuts, but then remember that you have a task to complete, and therefore decide against the idea.");
7445 return 0;
7447 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
7448 pline("Invalid target location.");
7449 return 0;
7451 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
7452 if (!mtmp) {
7453 You("perform a powerful kick, and listen to very sexy air current noises as your %s whirls through thin air.", body_part(FOOT));
7454 } else if (mtmp->female || is_neuter(mtmp->data)) {
7455 pline("%s has no nuts to kick and is therefore unaffected!", Monnam(mtmp));
7456 } else {
7457 pline("%s moans in agony as his nuts are squashed by your sexy footwear!", Monnam(mtmp));
7458 mtmp->mcanmove = 0;
7459 mtmp->mfrozen = 10 + rnd(techlevX(tech_no));
7460 mtmp->mstrategy &= ~STRAT_WAITFORU;
7461 int tmp = 50 + rnd(techlevX(tech_no) * 4);
7462 hurtmon(mtmp, tmp);
7464 if (mtmp && !DEADMONSTER(mtmp) && mtmp->mpeaceful && !mtmp->mtame) mtmp->mpeaceful = 0; /* monster becomes hostile */
7466 t_timeout = rnz(2500);
7468 break;
7470 case T_DISARMING_KICK:
7472 if (!PlayerInSexyFlats) {
7473 pline("You must be wearing sexy flats for that!");
7474 return 0;
7477 if (u.uswallow) {
7478 pline("Kicking an engulfer's weapon from the inside would be quite the feat.");
7479 return(0);
7482 if (!getdir((char *)0)) return(0);
7483 if (!u.dx && !u.dy) {
7484 /* Hopefully a mistake ;B */
7485 pline("Why don't you try wielding something else instead.");
7486 return(0);
7488 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
7489 pline("Invalid target location.");
7490 return 0;
7492 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
7493 if (!mtmp || !canspotmon(mtmp)) {
7494 if (memory_is_invisible(u.ux + u.dx, u.uy + u.dy))
7495 You("don't know where to aim for!");
7496 else
7497 You("don't see anything there!");
7498 return (0);
7500 obj = MON_WEP(mtmp); /* can be null */
7501 if (!obj) {
7502 You_cant("disarm an unarmed foe!");
7503 return(0);
7506 You("kick %s in the %s with your sexy footwear...", mon_nam(mtmp), mbodypart(mtmp, HAND));
7508 obj_extract_self(obj);
7509 possibly_unwield(mtmp, FALSE);
7510 setmnotwielded(mtmp, obj);
7512 if (obj && obj->mstartinventB && !(obj->oartifact) && !(obj->fakeartifact && timebasedlowerchance()) && (!rn2(4) || (rn2(100) < u.equipmentremovechance) || !timebasedlowerchance() ) ) {
7513 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
7514 delobj(obj);
7515 t_timeout = rnz(1000);
7516 break;
7517 } else if (obj && obj->mstartinventC && !(obj->oartifact) && !(obj->fakeartifact && !rn2(10)) && rn2(10) ) {
7518 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
7519 delobj(obj);
7520 t_timeout = rnz(1000);
7521 break;
7522 } else if (obj && obj->mstartinventE && !(obj->oartifact) && !(obj->fakeartifact && !rn2(20)) && rn2(20) ) {
7523 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
7524 delobj(obj);
7525 t_timeout = rnz(1000);
7526 break;
7527 } else if (obj && obj->mstartinventD && !(obj->oartifact) && !(obj->fakeartifact && !rn2(4)) && rn2(4) ) {
7528 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
7529 delobj(obj);
7530 t_timeout = rnz(1000);
7531 break;
7532 } else if (obj && obj->mstartinventX) {
7533 You("vaporize %s %s!", s_suffix(mon_nam(mtmp)), xname(obj));
7534 delobj(obj);
7535 t_timeout = rnz(1000);
7536 break;
7538 else if (obj) {
7539 You("knock %s %s to the %s!", s_suffix(mon_nam(mtmp)), xname(obj), surface(u.ux, u.uy));
7540 if (obj->otyp == CRYSKNIFE && (!obj->oerodeproof || !rn2(10))) {
7541 obj->otyp = WORM_TOOTH;
7542 obj->oerodeproof = 0;
7544 place_object(obj, u.ux, u.uy);
7545 stackobj(obj);
7547 t_timeout = rnz(1000);
7549 break;
7551 case T_INLAY_WARFARE:
7553 if (!PlayerInSexyFlats) {
7554 pline("You must be wearing sexy flats for that!");
7555 return 0;
7558 nomul(-2, "inhaling their own smelly inlay", FALSE);
7559 make_confused(HConfusion + rnz(10), FALSE);
7560 set_itimeout(&HeavyConfusion, HConfusion);
7564 int inlayradius = rnd(5);
7565 int mondistance = 0;
7566 struct monst *mtmp3;
7567 int k, l;
7569 for (k = -inlayradius; k <= inlayradius; k++) for(l = -inlayradius; l <= inlayradius; l++) {
7570 if (!isok(u.ux + k, u.uy + l)) continue;
7572 mondistance = 1;
7573 if (k > 1) mondistance = k;
7574 if (k < -1) mondistance = -k;
7576 if (l > 1 && l > mondistance) mondistance = l;
7577 if (l < -1 && (-l > mondistance)) mondistance = -l;
7579 if ( (mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) {
7580 mtmp3->mcanmove = 0;
7581 mtmp3->mfrozen = (16 - (mondistance * 2));
7582 mtmp3->mstrategy &= ~STRAT_WAITFORU;
7583 mtmp3->mconf = TRUE;
7584 pline("%s becomes dizzy from the smell!", Monnam(mtmp3));
7585 if (mtmp3->mpeaceful && !mtmp3->mtame) mtmp3->mpeaceful = 0; /* monster becomes hostile */
7589 if (!PlayerCannotUseSkills && P_SKILL(P_SEXY_FLATS) >= P_SUPREME_MASTER)
7590 (void) create_gas_cloud(u.ux, u.uy, 4, 12);
7591 else
7592 (void) create_gas_cloud(u.ux, u.uy, 3, 8);
7595 t_timeout = rnz(4000);
7597 break;
7599 case T_DIAMOND_BARRIER:
7601 pline("You try to erect barriers!");
7603 if (Role_if(PM_WALSCHOLAR)) {
7604 register struct obj *waldiamond;
7606 waldiamond = carrying(DIAMOND);
7608 if (!waldiamond) {
7609 pline("But you don't have a diamond to create them...");
7610 break;
7613 if (waldiamond) {
7614 if (waldiamond->quan > 1) {
7615 waldiamond->quan--;
7616 waldiamond->owt = weight(waldiamond);
7618 else useup(waldiamond);
7619 You("use a diamond to create the barriers.");
7626 int diamondradius = 1;
7628 if (Role_if(PM_WALSCHOLAR)) diamondradius = 3; /* can't reduce, unlike mason */
7630 if (Role_if(PM_MASON)) {
7632 diamondradius = rounddiv(techlevX(tech_no), 5);
7633 if ((techlevX(tech_no), 5) > 4) diamondradius++; /* fix off-by-one error --Amy */
7634 if (diamondradius < 1) diamondradius = 1;
7636 if (diamondradius > 1) pline("The maximum possible radius for the diamond barrier is %d, but you may opt to choose a smaller radius if you want.", diamondradius);
7638 while (diamondradius > 1) {
7639 pline("Current diamond barrier radius is %d.", diamondradius);
7641 if (yn("Reduce the radius by one?") == 'y') diamondradius--;
7642 else break;
7645 pline("Using radius %d for the diamond barrier.", diamondradius);
7649 int k, l;
7651 for (k = -diamondradius; k <= diamondradius; k++) for(l = -diamondradius; l <= diamondradius; l++) {
7652 if (!isok(u.ux + k, u.uy + l)) continue;
7653 if (k == 0 && l == 0) continue; /* don't place wall on your own position --Amy */
7655 if (isok(u.ux + k, u.uy + l) && (levl[u.ux + k][u.uy + l].typ == ROOM || levl[u.ux + k][u.uy + l].typ == CORR || (levl[u.ux + k][u.uy + l].typ == DOOR && levl[u.ux + k][u.uy + l].doormask == D_NODOOR) ) ) {
7657 if (levl[u.ux + k][u.uy + l].typ != DOOR) levl[u.ux + k][u.uy + l].typ = GRAVEWALL;
7658 else doorlockX(u.ux + k, u.uy + l, TRUE);
7659 blockorunblock_point(u.ux + k, u.uy + l);
7660 newsym(u.ux + k, u.uy + l);
7667 vision_recalc(0);
7669 if (Role_if(PM_WALSCHOLAR)) {
7670 u.walscholarpass += (rnd(50) + rnd(techlevX(tech_no) * 5) );
7671 pline("For a while, you can freely pass through grave walls!");
7674 t_timeout = Role_if(PM_MASON) ? rnz(1000) : rnz(5000);
7676 break;
7678 case T_STEADY_HAND:
7679 num = 100 + (techlevX(tech_no) * 5);
7680 techt_inuse(tech_no) = num + 1;
7681 pline("Your %s become steady.", makeplural(body_part(HAND)));
7683 t_timeout = rnz(2000);
7684 break;
7686 case T_FORCE_FILLING:
7688 You_feel("full of mystic power!");
7690 if (!rn2(20)) u.uen += (400 + rnz(techlevX(tech_no)));
7691 else if (!rn2(5)) u.uen += (d(6,8) + rnz(techlevX(tech_no)));
7692 else u.uen += (d(5,6) + rnz(techlevX(tech_no)));
7693 if (u.uen > u.uenmax) u.uen = u.uenmax;
7695 t_timeout = rnz(1000);
7696 break;
7698 case T_JEDI_TAILORING:
7702 struct obj *uroub;
7704 uroub = mksobj(rnd_class(ROBE, ROBE_OF_WEAKNESS), TRUE, FALSE, FALSE);
7706 if (uroub) {
7707 dropy(uroub);
7708 stackobj(uroub);
7709 pline("A robe appeared at your %s!", makeplural(body_part(FOOT)));
7710 } else pline("For some unknown reason, the tailoring attempt failed.");
7714 t_timeout = rnz(15000);
7715 break;
7717 case T_INTRINSIC_SACRIFICE:
7719 if (!(uwep && is_lightsaber(uwep) && u.twoweap && uswapwep && is_lightsaber(uswapwep))) {
7720 pline("That only works if you are dual-wielding lightsabers!");
7721 break;
7724 attrcurse();
7726 if (uwep && is_lightsaber(uwep)) {
7727 uwep->age += 1000;
7728 if (uwep->otyp == ORANGE_LIGHTSABER) uwep->age += (1000 * rnd(2));
7729 if (uwep->oartifact == ART_DESANN_S_WRATH) uwep->age += (1000 * rnd(2));
7731 if (uswapwep && is_lightsaber(uswapwep)) {
7732 uswapwep->age += 1000;
7733 if (uswapwep->otyp == ORANGE_LIGHTSABER) uswapwep->age += (1000 * rnd(2));
7734 if (uswapwep->oartifact == ART_DESANN_S_WRATH) uswapwep->age += (1000 * rnd(2));
7737 pline("Lightsaber energy replenished. Did it cost you an important intrinsic?");
7739 t_timeout = rnz(10000);
7740 break;
7742 case T_BEAMSWORD:
7743 num = 100 + (techlevX(tech_no) * 3);
7744 techt_inuse(tech_no) = num + 1;
7745 pline("Your lightsaber can fire beams now!");
7747 t_timeout = rnz(2500);
7748 break;
7750 case T_ENERGY_TRANSFER:
7751 num = 200 + (techlevX(tech_no) * 5);
7752 techt_inuse(tech_no) = num + 1;
7753 pline("For a while, casting spells will recharge your lightsaber (but it must be lit).");
7755 t_timeout = rnz(5000);
7756 break;
7758 case T_SOFTEN_TARGET:
7760 if (u.uswallow) {
7761 pline("Softening an engulfer unfortunately doesn't work.");
7762 return(0);
7765 if (!getdir((char *)0)) return(0);
7766 if (!u.dx && !u.dy) {
7767 /* Hopefully a mistake ;B */
7768 pline("You can't soften yourself!");
7769 return(0);
7771 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
7772 pline("Invalid target location.");
7773 return 0;
7775 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
7776 if (!mtmp || !canspotmon(mtmp)) {
7777 if (memory_is_invisible(u.ux + u.dx, u.uy + u.dy))
7778 pline("Can't soften what you can't see!");
7779 else
7780 You("don't see anything there!");
7781 return (0);
7785 int xtmp = d(2,6);
7786 pline("%s suddenly seems weaker!", Monnam(mtmp));
7787 mtmp->mhpmax -= xtmp;
7788 #ifdef SHOW_DMG
7789 if (xtmp < mtmp->mhp) showdmg(xtmp);
7790 #endif
7791 if ((mtmp->mhp -= xtmp) <= 0 || !mtmp->m_lev) {
7792 pline("%s dies!", Monnam(mtmp));
7793 xkilled(mtmp,0);
7794 } else {
7795 mtmp->m_lev--;
7796 wakeup(mtmp); /* monster becomes hostile */
7800 t_timeout = rnz(10000);
7801 break;
7803 case T_PROTECT_WEAPON:
7804 if (!uwep || !bimanual(uwep)) {
7805 pline("This requires you to wield a bimanual weapon, which you currently don't.");
7806 break;
7808 uwep->oerodeproof = 1;
7809 uwep->rknown = 1;
7810 pline("Alright - your weapon is erosionproof now.");
7812 t_timeout = rnz(10000);
7813 break;
7815 case T_POWERFUL_AURA:
7816 num = 40 + (techlevX(tech_no) * 3);
7817 techt_inuse(tech_no) = num + 1;
7818 pline("A powerful aura surrounds you!");
7820 t_timeout = rnz(3000);
7821 break;
7823 case T_BOOSTAFF:
7824 if (!uwep || weapon_type(uwep) != P_QUARTERSTAFF) {
7825 pline("How are you going to boost your staff if you don't wield it?");
7826 break;
7828 pline("Your staff is surrounded by a shimmering aura.");
7829 uncurse(uwep, TRUE);
7831 if (uwep && uwep->spe < 2) {
7832 uwep->spe++;
7833 } else if (uwep && uwep->spe < 8 && !rn2(uwep->spe) ) {
7834 uwep->spe++;
7837 t_timeout = rnz(6000);
7838 break;
7840 case T_CLONE_JAVELIN:
7841 if (!uwep || weapon_type(uwep) != P_JAVELIN) {
7842 pline("This requires you to actually wield the javelin that you want to clone.");
7843 break;
7845 uwep->quan++;
7846 uwep->owt = weight(uwep);
7847 pline("A new javelin is created out of thin air!");
7848 t_timeout = rnz(7000);
7849 break;
7851 case T_REFUGE:
7852 num = 20 + techlevX(tech_no);
7853 techt_inuse(tech_no) = num + 1;
7854 pline("Refuge activated!");
7856 t_timeout = rnz(2400);
7857 break;
7859 case T_DRAINING_PUNCH:
7861 if (!canuseunarmedtechs()) {
7862 You("can't do this while wielding a weapon!");
7863 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
7864 return(0);
7866 /* used to be impossible with a shield but that was dumb --Amy */
7867 if (!getdir((char *)0)) return(0);
7868 if (!u.dx && !u.dy) {
7869 You("flex your muscles.");
7870 return(0);
7872 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
7873 pline("Invalid target location.");
7874 return 0;
7877 if (!blitz_draining_punch()) return(0);
7879 t_timeout = rnz(2000);
7880 break;
7882 case T_ESCROBISM:
7884 if (!uarm) {
7885 pline("Without armor, that technique won't do anything.");
7886 break;
7888 if (uarm && !(uarm->otyp >= ROBE && uarm->otyp <= ROBE_OF_WEAKNESS)) {
7889 pline("That technique won't work if your worn armor isn't a robe!");
7890 break;
7893 num = 50 + (techlevX(tech_no) * 3);
7894 techt_inuse(tech_no) = num + 1;
7895 pline("Escrobism started - your bare hands or lightsaber will temporarily deal extra damage while you are wearing a robe.");
7897 t_timeout = rnz(4000);
7898 break;
7900 case T_PIRATE_BROTHERING:
7902 if (!u.twoweap) {
7903 pline("This won't work if you don't dual-wield!");
7904 break;
7906 if (uwep && !is_lightsaber(uwep)) {
7907 pline("Your primary weapon isn't a lightsaber, and therefore this technique won't work!");
7908 break;
7910 if (uswapwep && weapon_type(uswapwep) != P_SCIMITAR) {
7911 pline("Your secondary weapon isn't a scimitar, and therefore this technique won't work!");
7912 break;
7914 if (!uwep || !uswapwep) {
7915 pline("At least one of your hands isn't wielding any weapon, and therefore this technique won't work!");
7916 break;
7919 num = 250 + (techlevX(tech_no) * 10);
7920 techt_inuse(tech_no) = num + 1;
7921 pline("Alright, your lightsaber loses no energy and can be recharged by hitting things with the scimitar.");
7923 t_timeout = rnz(5000);
7924 break;
7926 case T_NUTS_AND_BOLTS:
7928 You("make crossbow ammo and increase your satiation.");
7930 struct obj *uammo;
7932 uammo = mksobj(CROSSBOW_BOLT, TRUE, FALSE, FALSE);
7933 if (uammo) {
7934 uammo->quan = rnd(20 + (2 * techlevX(tech_no)));
7935 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
7936 uammo->owt = weight(uammo);
7937 dropy(uammo);
7938 stackobj(uammo);
7941 lesshungry(200);
7943 t_timeout = rnz(4000);
7944 break;
7946 case T_WONDER_YONDER:
7949 int inerduration = rnz(1000);
7950 int nastyfects = rnd(5);
7951 if (!inertiaprotection()) {
7952 u.uprops[DEAC_FAST].intrinsic += inerduration;
7953 u.inertia += inerduration;
7954 You_feel("lethargic...");
7956 while (nastyfects > 0) {
7957 nastyfects--;
7958 badeffect();
7962 wonderspell(-1);
7963 t_timeout = rnz(15000);
7964 break;
7966 case T_CARD_TRICK:
7968 if (CannotSelectItemsInPrompts) break;
7969 cardtrickchoice:
7970 otmp = getobj(allnoncount, "duplicate");
7971 if (!otmp) {
7972 if (yn("Really exit with no object selected?") == 'y')
7973 pline("You just wasted the opportunity to duplicate a scroll.");
7974 else goto cardtrickchoice;
7975 pline("A feeling of loss comes over you.");
7976 break;
7979 if (otmp) {
7980 if (otmp->oclass != SCROLL_CLASS) {
7981 pline("That isn't a scroll, and therefore the card trick was wasted.");
7982 t_timeout = rnz(10000);
7983 break;
7985 if (otmp->oartifact) {
7986 pline("Artifact scrolls cannot be duplicated, and therefore the card trick was wasted.");
7987 t_timeout = rnz(10000);
7988 break;
7991 int cardpotency = 50 + techlevX(tech_no);
7992 if (rnd(cardpotency) > writecost(otmp)) {
7993 pline("Success! You managed to duplicate the scroll.");
7994 otmp->quan++;
7995 otmp->owt = weight(otmp);
7996 } else {
7997 pline("Unfortunately your attempt to duplicate the scroll failed.");
8001 t_timeout = rnz(10000);
8002 break;
8004 case T_SKILLOMORPH:
8006 additionalskilltraining(rnd(10));
8007 t_timeout = rnz(10000);
8008 break;
8010 case T_SHOTTY_BLAST:
8013 int ammotype;
8015 pline("You can choose from these kinds of ammo: shotgun shells or auto shotgun shells.");
8017 boolean haschosen = FALSE;
8018 pline("Pick an ammo type that you want to create. The prompt will loop until you actually make a choice.");
8019 while (!haschosen) {
8020 if (yn("Do you want to create shotgun shells?") == 'y') {
8021 haschosen = TRUE;
8022 ammotype = 2;
8024 else if (yn("Do you want to create auto shotgun shells?") == 'y') {
8025 haschosen = TRUE;
8026 ammotype = 1;
8030 You("make some shotgun shells.");
8034 struct obj *uammo;
8036 if (ammotype == 1) uammo = mksobj(AUTO_SHOTGUN_SHELL, TRUE, FALSE, FALSE);
8037 else uammo = mksobj(SHOTGUN_SHELL, TRUE, FALSE, FALSE);
8038 if (uammo) {
8039 uammo->quan = 5 + (techlevX(tech_no) / 3);
8040 if (uammo->quan < 1) uammo->quan = 1;
8041 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
8042 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
8043 uammo->owt = weight(uammo);
8044 dropy(uammo);
8045 stackobj(uammo);
8050 t_timeout = rnz(5000);
8051 break;
8054 case T_AMMO_UPGRADE:
8056 if (!uwep) {
8057 pline("You're not wielding anything!");
8058 break;
8060 if (uwep && !is_bullet(uwep)) {
8061 pline("You're not wielding firearm ammo!");
8062 break;
8064 if (uwep && is_bullet(uwep)) {
8065 You("try to upgrade your ammo.");
8066 if (stack_too_big(uwep)) {
8067 t_timeout = rnz(4000);
8068 pline("But the stack size was too big, and therefore it failed.");
8069 break;
8071 } else {
8072 if (uwep->cursed) uncurse(uwep, TRUE);
8073 else if (!uwep->cursed && !uwep->blessed) bless(uwep);
8074 if (uwep->spe < 2) uwep->spe++;
8075 else if (uwep->spe < 10 && uwep->spe > 1 && !rn2(uwep->spe)) uwep->spe++;
8079 t_timeout = rnz(10000);
8080 break;
8082 case T_LASER_POWER:
8084 int ammotype;
8086 pline("You can choose from these kinds of ammo: blaster bolts, heavy blaster bolts, laser beams, raygun bolts or radios.");
8088 boolean haschosen = FALSE;
8089 pline("Pick an ammo type that you want to create. The prompt will loop until you actually make a choice.");
8090 while (!haschosen) {
8091 if (yn("Do you want to create blaster bolts?") == 'y') {
8092 haschosen = TRUE;
8093 ammotype = 5;
8095 else if (yn("Do you want to create heavy blaster bolts?") == 'y') {
8096 haschosen = TRUE;
8097 ammotype = 4;
8099 else if (yn("Do you want to create laser beams?") == 'y') {
8100 haschosen = TRUE;
8101 ammotype = 3;
8103 else if (yn("Do you want to create raygun bolts?") == 'y') {
8104 haschosen = TRUE;
8105 ammotype = 2;
8107 else if (yn("Do you want to create radios?") == 'y') {
8108 haschosen = TRUE;
8109 ammotype = 1;
8111 else if (yn("Do you want to create carcosan bolts?") == 'y') {
8112 haschosen = TRUE;
8113 ammotype = 6;
8117 You("make some laser ammo.");
8121 struct obj *uammo;
8123 if (ammotype == 5) uammo = mksobj(BLASTER_BOLT, TRUE, FALSE, FALSE);
8124 else if (ammotype == 4) uammo = mksobj(HEAVY_BLASTER_BOLT, TRUE, FALSE, FALSE);
8125 else if (ammotype == 3) uammo = mksobj(LASER_BEAM, TRUE, FALSE, FALSE);
8126 else if (ammotype == 2) uammo = mksobj(RAYGUN_BOLT, TRUE, FALSE, FALSE);
8127 else if (ammotype == 6) uammo = mksobj(CARCOSAN_BOLT, TRUE, FALSE, FALSE);
8128 else uammo = mksobj(RADIO, TRUE, FALSE, FALSE);
8130 if (uammo) {
8131 uammo->quan = 10 + techlevX(tech_no);
8132 if (uammo->quan < 1) uammo->quan = 1;
8133 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
8134 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
8135 uammo->owt = weight(uammo);
8136 dropy(uammo);
8137 stackobj(uammo);
8142 t_timeout = rnz(7500);
8143 break;
8146 case T_BIG_DADDY:
8148 You("make a rocket launcher.");
8152 struct obj *uammo;
8154 uammo = mksobj(ROCKET_LAUNCHER, TRUE, FALSE, FALSE);
8155 if (uammo) {
8156 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
8157 dropy(uammo);
8158 stackobj(uammo);
8161 uammo = mksobj(ROCKET, TRUE, FALSE, FALSE);
8162 if (uammo) {
8163 uammo->quan = 5 + (techlevX(tech_no) / 3);
8164 if (uammo->quan < 1) uammo->quan = 1;
8165 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
8166 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
8167 uammo->owt = weight(uammo);
8168 dropy(uammo);
8169 stackobj(uammo);
8174 t_timeout = rnz(25000);
8175 break;
8177 case T_SHUT_THAT_BITCH_UP:
8179 num = 20 + (techlevX(tech_no) * 3);
8180 techt_inuse(tech_no) = num + 1;
8181 pline("Your firearms can temporarily shut up bitches upon hitting them.");
8183 t_timeout = rnz(15000);
8184 break;
8186 case T_S_PRESSING:
8188 if (t_at(u.ux, u.uy)) {
8189 pline("There is a trap at your location, and therefore the attempt fails!");
8190 t_timeout = rnz(2000);
8191 break;
8193 if (u.uhunger < 500) {
8194 You("don't have enough nutrition, and therefore the attempt fails!");
8195 t_timeout = rnz(2000);
8196 break;
8199 struct trap *ttrap;
8200 ttrap = maketrap(u.ux, u.uy, S_PRESSING_TRAP, 0, FALSE);
8201 if (ttrap && !ttrap->hiddentrap) {
8202 ttrap->tseen = 1;
8203 ttrap->madeby_u = 1;
8206 /* launch_otyp is set in trap.c and controls the trap's strength --Amy */
8207 You("laid a trap.");
8208 u.uhunger -= 500; /* not "morehungry", not affected by full nutrients */
8210 if (practicantterror) {
8211 pline("%s thunders: 'You shitty practicant lass! Your act of shitting up my laboratory will not be tolerated! Now you pay 5000 zorkmids and clean away your shit, got it?'", noroelaname());
8212 fineforpracticant(5000, 0, 0);
8217 register struct monst *nexusmon, *nextmon;
8219 for(nexusmon = fmon; nexusmon; nexusmon = nextmon) {
8220 nextmon = nexusmon->nmon;
8221 if (DEADMONSTER(nexusmon)) continue;
8222 if (canseemon(nexusmon)) nexusmon->spressingseen = TRUE;
8226 use_skill(P_SQUEAKING, rnd(20));
8228 t_timeout = rnz(2000);
8229 break;
8231 case T_MELTEE:
8234 int melteestrength = 1;
8235 if (techlevX(tech_no) > 9) melteestrength += (techlevX(tech_no) / 10);
8237 if (practicantterror) {
8238 pline("%s thunders: 'What do you think you're doing here, peeing in my laboratory? That makes 10000 zorkmids, and your mirror is confiscated too to make you hopefully repent your deeds!'", noroelaname());
8239 fineforpracticant(10000, 0, 0);
8240 u.uprops[DEAC_REFLECTING].intrinsic += 10000;
8243 techt_inuse(tech_no) = 1;
8244 buzz(17, melteestrength, u.ux, u.uy, -1, 0);
8245 buzz(17, melteestrength, u.ux, u.uy, 1, 0);
8246 buzz(17, melteestrength, u.ux, u.uy, -1, 1);
8247 buzz(17, melteestrength, u.ux, u.uy, 1, 1);
8248 buzz(17, melteestrength, u.ux, u.uy, 0, 1);
8249 buzz(17, melteestrength, u.ux, u.uy, -1, -1);
8250 buzz(17, melteestrength, u.ux, u.uy, 1, -1);
8251 buzz(17, melteestrength, u.ux, u.uy, 0, -1);
8252 techt_inuse(tech_no) = 0;
8256 use_skill(P_SQUEAKING, rnd(50));
8257 t_timeout = rnz(5000);
8258 break;
8260 case T_WOMAN_NOISES:
8262 You("make very female noises!");
8264 register struct monst *nexusmon, *nextmon;
8266 for(nexusmon = fmon; nexusmon; nexusmon = nextmon) {
8267 nextmon = nexusmon->nmon; /* trap might kill mon */
8268 if (DEADMONSTER(nexusmon)) continue;
8269 if (nexusmon->mpeaceful || nexusmon->mtame) continue;
8270 if (resist(nexusmon, SPBOOK_CLASS, 0, NOTELL)) continue;
8271 if (resist(nexusmon, SPBOOK_CLASS, 0, NOTELL)) continue;
8273 if (distu(nexusmon->mx, nexusmon->my) > rnd(50)) continue;
8275 /* doesn't anger peaceful ones - not a bug --Amy */
8276 pline("%s cannot resist!", Monnam(nexusmon));
8277 monflee(nexusmon, rnd(20), FALSE, TRUE);
8278 if (nexusmon->mblinded < 100) nexusmon->mblinded += 20;
8279 nexusmon->mcansee = 0;
8280 nexusmon->mstun = TRUE;
8281 nexusmon->mconf = TRUE;
8283 if (!resists_drain(nexusmon) && !resist(nexusmon, SPBOOK_CLASS, 0, NOTELL)) {
8284 pline("%s shudders in dread!", Monnam(nexusmon));
8285 nexusmon->mhpmax -= rnd(10);
8286 if (nexusmon->mhpmax < 1) nexusmon->mhpmax = 1;
8287 if (nexusmon->mhp > nexusmon->mhpmax) nexusmon->mhp = nexusmon->mhpmax;
8288 nexusmon->m_enmax -= rnd(10);
8289 if (nexusmon->m_enmax < 0) nexusmon->m_enmax = 0;
8290 if (nexusmon->m_en > nexusmon->m_enmax) nexusmon->m_en = nexusmon->m_enmax;
8291 if (nexusmon->m_lev > 0) nexusmon->m_lev--;
8292 if (nexusmon->m_lev > 0 && !rn2(4)) nexusmon->m_lev--;
8298 if (practicantterror) {
8299 pline("%s rings out: 'Your irritating noises are disturbing the other practicants, so here's a warning for you to not do that again and I also receive 50 zorkmids from you.'", noroelaname());
8300 fineforpracticant(50, 0, 0);
8303 use_skill(P_SQUEAKING, rnd(50));
8304 t_timeout = rnz(5000);
8305 break;
8307 case T_EXTRA_LONG_SQUEAK:
8309 num = 20 + techlevX(tech_no);
8310 techt_inuse(tech_no) = num + 1;
8311 pline("Your butt starts squeaking.");
8312 use_skill(P_SQUEAKING, rnd(50));
8313 t_timeout = rnz(5000);
8314 break;
8316 case T_SEXUAL_HUG:
8318 if (u.uswallow) {
8319 pline("Did you seriously expect to be able to hug a monster that has engulfed you?");
8320 return 0;
8325 int k, l, caughtX;
8326 struct monst *mtmp3;
8327 caughtX = 0;
8328 pline("You try to hug the monsters next to you!");
8330 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
8331 if (!isok(u.ux + k, u.uy + l)) continue;
8332 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0 && !is_rider(mtmp3->data) && !is_deadlysin(mtmp3->data)
8333 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(rn2(5) && mtmp3->data->geno & G_UNIQ) && caughtX == 0)
8337 if (humanoid(mtmp3->data) && !mtmp3->female) {
8338 pline("%s is infatuated with you and asks to become your slave!", mon_nam(mtmp3));
8339 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
8340 if (techlevX(tech_no) < rnd(100)) caughtX++;
8341 t_timeout = rnz(20000);
8344 else pline("%s brushes you away.", mon_nam(mtmp3));
8346 } /* monster is catchable loop */
8347 } /* for loop */
8351 if (practicantterror) {
8352 pline("%s thunders: 'You've molested the male practicants! That's 5000 zorkmids on the spot and I told all of them that you're a mean sexual predator. Do that again and you'll receive hall exclusion.'", noroelaname());
8353 fineforpracticant(5000, 0, 0);
8354 HateTrapEffect += 10000;
8357 t_timeout = rnz(20000);
8358 break;
8360 case T_SEX_CHANGE:
8362 Your("gender is changed!");
8363 change_sex();
8365 if (practicantterror) {
8366 pline("%s thunders: 'That type of surgery is dangerous! You've practiced it without adhering to standard safety precautions, meaning there's now a fine of 20000 zorkmids and I'll also collect any money you gain from now on to teach you a lesson!'", noroelaname());
8367 fineforpracticant(20000, 0, 0);
8368 BankTrapEffect |= FROMOUTSIDE;
8371 t_timeout = rnz(10000);
8372 break;
8374 case T_EVEN_MORE_AMMO:
8376 if (!uwep) {
8377 pline("You're not wielding anything!");
8378 break;
8380 if (uwep && !is_bullet(uwep)) {
8381 pline("You're not wielding firearm ammo!");
8382 break;
8384 if (uwep && is_bullet(uwep)) {
8385 if (uwep->otyp == SMG_BULLET || uwep->otyp == ANTIMATTER_SMG_BULLET || uwep->otyp == MG_BULLET || uwep->otyp == ANTIMATTER_MG_BULLET || uwep->otyp == RIFLE_BULLET || uwep->otyp == ANTIMATTER_RIFLE_BULLET || uwep->otyp == SNIPER_BULLET || uwep->otyp == ANTIMATTER_SNIPER_BULLET || uwep->otyp == ASSAULT_RIFLE_BULLET || uwep->otyp == LOWRATE_ASSAULT_RIFLE_BULLET || uwep->otyp == ANTIMATTER_ASSAULT_RIFLE_BULLE || uwep->otyp == PISTOL_BULLET || uwep->otyp == SILVER_PISTOL_BULLET || uwep->otyp == LEAD_PISTOL_BULLET || uwep->otyp == FIVE_SEVEN_BULLET || uwep->otyp == SHADOW_FIVE_SEVEN_BULLET || uwep->otyp == LEAD_FIVE_SEVEN_BULLET || uwep->otyp == LEAD_SMG_BULLET || uwep->otyp == BRONZE_SMG_BULLET || uwep->otyp == LEAD_RIFLE_BULLET || uwep->otyp == COPPER_RIFLE_BULLET || uwep->otyp == LEAD_MG_BULLET || uwep->otyp == HOLLOW_POINT_MG_BULLET || uwep->otyp == LEAD_SNIPER_BULLET || uwep->otyp == PLATINUM_SNIPER_BULLET || uwep->otyp == LEAD_ASSAULT_RIFLE_BULLET || uwep->otyp == ANTIMATTER_PISTOL_BULLET || uwep->otyp == ANTIMATTER_FIVE_SEVEN_BULLET || uwep->otyp == BLASTER_BOLT || uwep->otyp == RAYGUN_BOLT || uwep->otyp == RADIO || uwep->otyp == HEAVY_BLASTER_BOLT || uwep->otyp == LASER_BEAM) {
8386 uwep->quan += (20 + techlevX(tech_no));
8387 pline("The amount of ammo was increased!");
8388 } else if (uwep->otyp == BFG_AMMO || uwep->otyp == CARCOSAN_BOLT) {
8389 uwep->quan += (80 + (techlevX(tech_no) * 5));
8390 pline("The amount of ammo was increased!");
8391 } else if (uwep->otyp == SHOTGUN_SHELL || uwep->otyp == CHROME_PELLET || uwep->otyp == AUTO_SHOTGUN_SHELL || uwep->otyp == LEAD_SHOT || uwep->otyp == AUTO_LEAD_SHOT || uwep->otyp == COATED_AUTO_SHELL) {
8392 uwep->quan += (10 + (techlevX(tech_no) / 2));
8393 pline("The amount of ammo was increased!");
8394 } else if (uwep->otyp == ROCKET) {
8395 uwep->quan += (1 + (techlevX(tech_no) / 5));
8396 pline("The amount of ammo was increased!");
8397 } else {
8398 pline("The ammo you're wielding cannot be duplicated. Sorry. Please try some other type of ammo.");
8399 break;
8402 t_timeout = rnz(8000);
8403 break;
8405 case T_DOUBLESELF:
8407 if (!Upolyd) {
8408 pline("That doesn't work if you're not polymorphed.");
8409 break;
8411 You("try to clone yourself!");
8412 cloneu();
8413 t_timeout = rnz(20000);
8414 break;
8416 case T_POLYFIX:
8418 if (CannotSelectItemsInPrompts) break;
8419 polyfixchoice:
8420 otmp = getobj(allnoncount, "polyfix");
8421 if (!otmp) {
8422 if (yn("Really exit with no object selected?") == 'y')
8423 pline("You just wasted the opportunity to polyfix an item.");
8424 else goto polyfixchoice;
8425 pline("A feeling of loss comes over you.");
8426 break;
8429 if (otmp) {
8430 if (!is_hazy(otmp)) {
8431 pline("That item wasn't hazy, and therefore nothing happens.");
8432 } else if (!stack_too_big(otmp)) {
8433 stop_timer(UNPOLY_OBJ, (void *) otmp);
8434 otmp->oldtyp = STRANGE_OBJECT;
8435 pline("%s is no longer hazy.", Yname2(otmp));
8436 if (otmp && objects[(otmp)->otyp].oc_material == MT_CELESTIUM && !stack_too_big(otmp)) {
8437 if (!otmp->cursed) bless(otmp);
8438 else uncurse(otmp, FALSE);
8440 } else pline("The stack was too big, and therefore nothing happens.");
8444 t_timeout = rnz(5000);
8445 break;
8447 case T_SQUEAKY_REPAIR:
8449 if (CannotSelectItemsInPrompts) break;
8450 if (t_at(u.ux, u.uy)) {
8451 pline("There is a trap at your location, and therefore the attempt fails!");
8452 t_timeout = rnz(8000);
8453 break;
8456 struct trap *ttrap;
8457 ttrap = maketrap(u.ux, u.uy, FART_TRAP, 0, TRUE);
8458 if (ttrap) {
8459 dotrap(ttrap, 0);
8461 pline("You may repair a damaged item.");
8462 repairitemchoice:
8463 otmp = getobj(allnoncount, "magically repair");
8464 if (!otmp) {
8465 if (yn("Really exit with no object selected?") == 'y')
8466 pline("You just wasted the opportunity to repair your items.");
8467 else goto repairitemchoice;
8468 pline("A feeling of loss comes over you.");
8469 t_timeout = rnz(8000);
8470 break;
8471 } else if (stack_too_big(otmp)) {
8472 pline("The stack was too big, and therefore the attempt failed.");
8473 } else if (otmp && greatest_erosion(otmp) > 0) {
8474 pline("Your %s is in perfect condition again!", xname(otmp));
8475 if (otmp->oeroded > 0) { otmp->oeroded = 0; }
8476 if (otmp->oeroded2 > 0) { otmp->oeroded2 = 0; }
8477 if (otmp && objects[(otmp)->otyp].oc_material == MT_CELESTIUM && !stack_too_big(otmp)) {
8478 if (!otmp->cursed) bless(otmp);
8479 else uncurse(otmp, FALSE);
8482 } else pline("Your %s is still as undamaged as ever.", xname(otmp));
8484 } else pline("For some unknown reason, the attempt failed.");
8486 use_skill(P_SQUEAKING, rnd(80));
8487 t_timeout = rnz(8000);
8488 break;
8490 case T_BULLETREUSE:
8492 num = 100 + (techlevX(tech_no) * 5);
8493 techt_inuse(tech_no) = num + 1;
8494 pline("Your ammo can temporarily be reused.");
8495 t_timeout = rnz(10000);
8496 break;
8498 case T_TERRAIN_CLEANUP:
8500 pline("You try to clean up annoying terrain.");
8501 int maderoomX = 0;
8503 do_clear_areaX(u.ux, u.uy, 1, terraincleanup, (void *)&maderoomX);
8505 if (maderoomX) pline("Some annoying terrain was cleaned up!");
8506 else pline("There was nothing to clean up...");
8508 t_timeout = rnz(8000);
8510 break;
8512 case T_SYMBIOSIS:
8516 /* symbiant and goauld can use it more often... but they're too different, and therefore
8517 * being a goauld symbiant doesn't reduce the timeout by more :P --Amy */
8519 int symbiotimer = 20000;
8521 if (!PlayerCannotUseSkills) {
8522 switch (P_SKILL(P_SYMBIOSIS)) {
8523 default: break;
8524 case P_BASIC:
8525 symbiotimer = 18000;
8526 break;
8527 case P_SKILLED:
8528 symbiotimer = 16000;
8529 break;
8530 case P_EXPERT:
8531 symbiotimer = 14000;
8532 break;
8533 case P_MASTER:
8534 symbiotimer = 12000;
8535 break;
8536 case P_GRAND_MASTER:
8537 symbiotimer = 10000;
8538 break;
8539 case P_SUPREME_MASTER:
8540 symbiotimer = 8000;
8541 break;
8546 if (Role_if(PM_SYMBIANT) || Race_if(PM_GOAULD)) symbiotimer /= 2;
8548 struct obj *usymbioteitem;
8550 pline("A symbiote is created!");
8551 usymbioteitem = mksobj(SYMBIOTE, TRUE, FALSE, FALSE);
8552 if (usymbioteitem) {
8553 usymbioteitem->quan = 1;
8554 usymbioteitem->known = usymbioteitem->dknown = usymbioteitem->bknown = usymbioteitem->rknown = 1;
8555 usymbioteitem->owt = weight(usymbioteitem);
8556 usymbioteitem->finalcancel = TRUE; /* no polymorphing exploits, sorry --Amy */
8557 dropy(usymbioteitem);
8558 stackobj(usymbioteitem);
8561 t_timeout = rnz(symbiotimer);
8565 break;
8567 case T_ADJUST_SYMBIOTE:
8569 /* intentional that you can use this even while not having a symbiote --Amy */
8570 if (!PlayerCannotUseSkills && (P_SKILL(P_SYMBIOSIS) >= P_SKILLED)) {
8572 pline("Currently your symbiote's aggressiveness is %d%%.", u.symbioteaggressivity);
8574 int lowerbound, higherbound;
8575 lowerbound = 25;
8576 higherbound = 25;
8578 switch (P_SKILL(P_SYMBIOSIS)) {
8579 case P_SKILLED:
8580 lowerbound = 20;
8581 higherbound = 33;
8582 break;
8583 case P_EXPERT:
8584 lowerbound = 15;
8585 higherbound = 40;
8586 break;
8587 case P_MASTER:
8588 lowerbound = 12;
8589 higherbound = 50;
8590 break;
8591 case P_GRAND_MASTER:
8592 lowerbound = 10;
8593 higherbound = 60;
8594 break;
8595 case P_SUPREME_MASTER:
8596 lowerbound = 5;
8597 higherbound = 75;
8598 break;
8599 default:
8600 lowerbound = 25;
8601 higherbound = 25;
8602 break;
8605 pline("You can set the aggressivity to values between %d%% and %d%% (inclusive).", lowerbound, higherbound);
8606 if (lowerbound <= 5 && yn("Set the aggressivity to 5%%?") == 'y') {
8607 u.symbioteaggressivity = 5;
8608 pline("Your symbiote's aggressivity is 5%% now.");
8609 } else if (lowerbound <= 10 && yn("Set the aggressivity to 10%%?") == 'y') {
8610 u.symbioteaggressivity = 10;
8611 pline("Your symbiote's aggressivity is 10%% now.");
8612 } else if (lowerbound <= 12 && yn("Set the aggressivity to 12%%?") == 'y') {
8613 u.symbioteaggressivity = 12;
8614 pline("Your symbiote's aggressivity is 12%% now.");
8615 } else if (lowerbound <= 15 && yn("Set the aggressivity to 15%%?") == 'y') {
8616 u.symbioteaggressivity = 15;
8617 pline("Your symbiote's aggressivity is 15%% now.");
8618 } else if (lowerbound <= 20 && yn("Set the aggressivity to 20%%?") == 'y') {
8619 u.symbioteaggressivity = 20;
8620 pline("Your symbiote's aggressivity is 20%% now.");
8621 } else if (yn("Set the aggressivity to 25%%?") == 'y') {
8622 u.symbioteaggressivity = 25;
8623 pline("Your symbiote's aggressivity is 25%% now.");
8624 } else if (higherbound >= 33 && yn("Set the aggressivity to 33%%?") == 'y') {
8625 u.symbioteaggressivity = 33;
8626 pline("Your symbiote's aggressivity is 33%% now.");
8627 } else if (higherbound >= 40 && yn("Set the aggressivity to 40%%?") == 'y') {
8628 u.symbioteaggressivity = 40;
8629 pline("Your symbiote's aggressivity is 40%% now.");
8630 } else if (higherbound >= 50 && yn("Set the aggressivity to 50%%?") == 'y') {
8631 u.symbioteaggressivity = 50;
8632 pline("Your symbiote's aggressivity is 50%% now.");
8633 } else if (higherbound >= 60 && yn("Set the aggressivity to 60%%?") == 'y') {
8634 u.symbioteaggressivity = 60;
8635 pline("Your symbiote's aggressivity is 60%% now.");
8636 } else if (higherbound >= 75 && yn("Set the aggressivity to 75%%?") == 'y') {
8637 u.symbioteaggressivity = 75;
8638 pline("Your symbiote's aggressivity is 75%% now.");
8639 } else pline("Your symbiote's aggressivity remains %d%%.", u.symbioteaggressivity);
8641 } else pline("Unfortunately your symbiosis skill is too low to use this ability.");
8643 t_timeout = rnz(500);
8645 break;
8647 case T_HEAL_SYMBIOTE:
8649 if (!uinsymbiosis) {
8650 pline("You don't have a symbiote, so you can't heal it either!");
8651 break;
8653 if (u.uhp < ((u.uhpmax / 2) + 1)) {
8654 pline("Your health is too low!");
8655 break;
8657 if (u.uhpmax < 5) { /* arbitrary */
8658 pline("Your health is too low!");
8659 break;
8661 u.uhp -= (u.uhpmax / 2);
8662 u.usymbiote.mhp += (u.uhpmax / 2);
8663 if (u.usymbiote.mhp > u.usymbiote.mhpmax) u.usymbiote.mhp = u.usymbiote.mhpmax;
8664 flags.botl = TRUE;
8665 You("sap some of your health, and transfer it to your symbiote!");
8667 t_timeout = rnz(2000);
8668 break;
8670 case T_BOOST_SYMBIOTE:
8672 if (!uinsymbiosis) {
8673 pline("You can't boost a nonexistant symbiote!");
8674 break;
8677 u.usymbiote.mhpmax += rnd(8);
8678 maybe_evolve_symbiote();
8679 if (u.usymbiote.mhpmax > 500) u.usymbiote.mhpmax = 500;
8680 if (flags.showsymbiotehp) flags.botl = TRUE;
8681 Your("symbiote's health is improved!");
8683 t_timeout = rnz(4000);
8684 break;
8686 case T_GRENADES_OF_COURSE:
8688 You("make some grenades.");
8692 struct obj *uammo;
8694 if (!rn2(2)) uammo = mksobj(FRAG_GRENADE, TRUE, FALSE, FALSE);
8695 else uammo = mksobj(GAS_GRENADE, TRUE, FALSE, FALSE);
8696 if (uammo) {
8697 uammo->quan = 5 + (techlevX(tech_no) / 5);
8698 if (Role_if(PM_GRENADONIN)) uammo->quan *= 5;
8699 if (uammo->quan < 1) uammo->quan = 1;
8700 if (uarmc && uarmc->oartifact == ART_ARABELLA_S_WEAPON_STORAGE) uammo->quan *= 2;
8701 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
8702 uammo->owt = weight(uammo);
8703 dropy(uammo);
8704 stackobj(uammo);
8709 t_timeout = rnz(20000);
8710 break;
8712 case T_PREACHING:
8713 if (Race_if(PM_MACTHEIST)) {
8714 pline("As an atheist, you cannot use such a technique.");
8715 return 0;
8718 u.uconduct.gnostic++; /* you just communicated with your god */
8719 if (Race_if(PM_MAGYAR)) {
8720 You_feel("bad about breaking the atheist conduct.");
8721 badeffect();
8723 use_skill(P_SPIRITUALITY, Role_if(PM_PRIEST) ? 5 : 1);
8724 adjalign(5 + techlevX(tech_no) / 3);
8725 You_feel("pious.");
8726 t_timeout = rnz(4000);
8727 break;
8729 case T_ON_THE_SAME_TEAM:
8731 if (u.uswallow) {
8732 pline("That doesn't work while you're engulfed!");
8733 return 0;
8738 int k, l;
8739 struct monst *mtmp3;
8740 pline("You try to pacify monsters!");
8742 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
8743 if (!isok(u.ux + k, u.uy + l)) continue;
8744 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->mpeaceful == 0 && mtmp3->mfrenzied == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
8745 && mtmp3->mnum != quest_info(MS_NEMESIS) && !resist(mtmp3, RING_CLASS, 0, NOTELL) && !(mtmp3->data->geno & G_UNIQ) )
8749 if (mtmp3->data->maligntyp == 0) {
8750 pline("%s looks calmer.", mon_nam(mtmp3));
8751 mtmp3->mpeaceful = 1;
8754 else pline("%s can't be pacified with this method!", mon_nam(mtmp3));
8756 } /* monster is catchable loop */
8757 } /* for loop */
8759 } /* variable definition bracket */
8761 t_timeout = rnz(6000);
8762 break;
8764 case T_CURE_AMNESIA:
8766 You("decide to cure your amnesia.");
8768 if (HMap_amnesia & INTRINSIC) {
8769 HMap_amnesia &= ~INTRINSIC;
8770 You_feel("less forgetful!");
8772 if (HMap_amnesia & TIMEOUT) {
8773 HMap_amnesia &= ~TIMEOUT;
8774 You_feel("less forgetful!");
8777 t_timeout = rnz(50000);
8778 break;
8780 case T_ELEMENTAL_IMBUE:
8782 int randomelement = rnd(3);
8784 if (!uwep) {
8785 pline("Without a weapon, this technique won't work!");
8786 return 0;
8789 if (uwep && (uwep->quan > 1)) {
8790 pline("You're wielding a stack of weapons! Drop all but one!");
8791 return 0;
8794 if (uwep && (uwep->oartifact || uwep->fakeartifact)) {
8795 pline("Transforming a weapon into an artifact doesn't work on weapons that are already artifacts.");
8796 return 0;
8799 if (uwep && (uwep->oclass != WEAPON_CLASS)) {
8800 pline("That's not a proper weapon, and therefore cannot be transformed into an artifact!");
8801 return 0;
8804 if (uwep) {
8805 switch (randomelement) {
8806 case 1:
8807 elemental_imbue(1); /* see artifact.c */
8808 uwep = onameX(uwep, artiname(ART_FIRE_SWING));
8809 break;
8810 case 2:
8811 elemental_imbue(2);
8812 uwep = onameX(uwep, artiname(ART_FROST_SWING));
8813 break;
8814 case 3:
8815 elemental_imbue(3);
8816 uwep = onameX(uwep, artiname(ART_SHOCK_SWING));
8817 break;
8820 update_inventory();
8821 Your("weapon transforms, and is now imbued with elemental power!");
8824 t_timeout = rnz(20000);
8826 break;
8830 case T_SPELL_SPAM:
8832 num = 100 + (techlevX(tech_no) * 2);
8833 techt_inuse(tech_no) = num + 1;
8834 pline("Your spells are more powerful for a while.");
8835 t_timeout = rnz(12000);
8837 break;
8839 case T_DROP_BOULDER:
8841 if (Is_rogue_level(&u.uz) || (In_endgame(&u.uz) && !Is_earthlevel(&u.uz))) {
8842 pline("That doesn't work in this area.");
8843 break;
8846 if (In_sokoban(&u.uz) && !playercancheatinsoko()) {
8847 change_luck(-1);
8848 pline("You cheater!");
8849 if (evilfriday) u.ugangr++;
8853 struct obj *otmp2;
8854 if (isok(u.ux, u.uy)) {
8855 otmp2 = mksobj(BOULDER, FALSE, FALSE, FALSE);
8856 if (otmp2) {
8857 if (!flooreffects(otmp2, u.ux, u.uy, "fall")) {
8858 place_object(otmp2, u.ux, u.uy);
8859 stackobj(otmp2);
8860 newsym(u.ux, u.uy); /* map the rock */
8864 pline("Klonk!");
8867 t_timeout = rnz(20000);
8869 break;
8871 case T_MARTIAL_STYLE:
8874 boolean madechoice = 0;
8876 if (Race_if(PM_SAMEDI)) {
8877 u.martialstyle = MARTIALSTYLE_CAPOEIRA;
8878 pline("The Sons of Samedi are permanently locked into the capoeira martial arts style!");
8879 return 0;
8882 if (PlayerCannotUseSkills) {
8883 t_timeout = rnz(8000);
8884 pline("Somehow, nothing happens.");
8885 break;
8888 pline("Your current martial arts style is %s.", currentmartialstyle());
8890 pline("Choose a martial arts style. The prompt will loop until you actually make a choice.");
8892 while (madechoice == 0) {
8894 if (yn("Switch to the 'brawling' style (default martial arts style, no special effects)?")=='y') {
8895 madechoice = 1; u.martialstyle = MARTIALSTYLE_BRAWLING;
8896 } else if (P_SKILL(P_MARTIAL_ARTS) >= P_BASIC && yn("Switch to the 'judo' style (break holding attacks, boosts dexterity, more frequency for special martial arts strikes, reduces your damage output)?")=='y') {
8897 madechoice = 1; u.martialstyle = MARTIALSTYLE_JUDO;
8898 } else if (P_SKILL(P_MARTIAL_ARTS) >= P_SKILLED && yn("Switch to the 'taekwondo' style (powers up your kick attack, can block projectiles if both of your hands are free, can also be used while wielding a weapon, your melee attacks have reduced to-hit)?")=='y') {
8899 madechoice = 1; u.martialstyle = MARTIALSTYLE_TAEKWONDO;
8900 } else if (P_SKILL(P_MARTIAL_ARTS) >= P_EXPERT && yn("Switch to the 'muay thai' style (speeds you up, boosts unarmed damage, makes your AC worse, your spells fail more often and are more expensive, your ranged weapons have reduced to-hit)?")=='y') {
8901 madechoice = 1; u.martialstyle = MARTIALSTYLE_MUAYTHAI;
8902 } else if (P_SKILL(P_MARTIAL_ARTS) >= P_MASTER && yn("Switch to the 'silat' style (boosts unarmed to-hit, unarmed attacks can sometimes stun opponents, improves your AC, makes your inventory weigh more and slows you down slightly)?")=='y') {
8903 madechoice = 1; u.martialstyle = MARTIALSTYLE_SILAT;
8904 } else if (P_SKILL(P_MARTIAL_ARTS) >= P_GRAND_MASTER && yn("Switch to the 'krav maga' style (greatly boosts unarmed damage, causes aggravate monster, reduces your regeneration rate and can send enemies into a frenzy)?")=='y') {
8905 madechoice = 1; u.martialstyle = MARTIALSTYLE_KRAVMAGA;
8906 } else if (P_SKILL(P_QUARTERSTAFF) >= P_MASTER && yn("Switch to the 'bojutsu' style (requires quarterstaff, allows you to block projectiles with the staff, boosts your AC and allows you to sometimes evade rays, reduces your melee damage output)?")=='y') {
8907 madechoice = 1; u.martialstyle = MARTIALSTYLE_BOJUTSU;
8908 } else if (P_SKILL(P_MARTIAL_ARTS) >= P_EXPERT && P_SKILL(P_BARE_HANDED_COMBAT) >= P_EXPERT && yn("Switch to the 'kung fu' style (slightly improves your unarmed and kick damage and boosts unarmed to-hit, kick hits enemies more often, your weapons are less effective)?")=='y') {
8909 madechoice = 1; u.martialstyle = MARTIALSTYLE_KUNGFU;
8910 } else if (uwep && uwep->otyp == JEONTU_GEOM && yn("Switch to the 'haidong gumdo' style (requires jeontu geom, boosts melee damage and to-hit and allows you to use martial arts techniques while wielding a jeontu geom, reduces your melee to-hit whenever you're not wielding a jeontu geom)?")=='y') {
8911 madechoice = 1; u.martialstyle = MARTIALSTYLE_HAIDONGGUMDO;
8912 } else if (yn("Do you choose to not switch your style after all?")=='y') {
8913 madechoice = 1;
8915 /* capoeira cannot be selected, this is on purpose --Amy */
8919 pline("Your new martial arts style is %s.", currentmartialstyle());
8922 t_timeout = rnz(8000);
8924 break;
8926 case T_SPRINT:
8927 if (!PlayerInStilettoHeels) {
8928 pline("That doesn't work without stiletto heels!");
8929 break;
8932 num = 50 + (techlevX(tech_no) * 2);
8933 techt_inuse(tech_no) = num + 1;
8934 pline("You start sprinting with your heels.");
8936 t_timeout = rnz(10000);
8937 break;
8938 case T_SKULL_CRUSH:
8939 if (!PlayerInStilettoHeels) {
8940 pline("That doesn't work without stiletto heels!");
8941 break;
8944 num = 20;
8945 techt_inuse(tech_no) = num + 1;
8946 pline("Quick! Paralyze an opponent and then kick him to death! You have 20 turns to do so!");
8948 t_timeout = rnz(50000);
8949 break;
8950 case T_FEMALE_COMBO:
8951 if (!PlayerInConeHeels) {
8952 pline("That doesn't work without cone heels!");
8953 break;
8956 num = 50 + (techlevX(tech_no));
8957 techt_inuse(tech_no) = num + 1;
8958 pline("You start your female combo. Now make sure you kick an enemy every turn to keep the combo going!");
8960 u.femcombostrike = 2;
8961 u.femcomboactive = TRUE;
8963 t_timeout = rnz(5000);
8964 break;
8965 case T_DOCKLOCK:
8967 struct obj *uammo;
8969 num = 100 + (techlevX(tech_no) * 3);
8970 techt_inuse(tech_no) = num + 1;
8971 pline("Yay, now you can bash enemies with a sexy leather pump! (Be sure to pick it up from the floor.)");
8973 uammo = mksobj(SEXY_LEATHER_PUMP, TRUE, FALSE, FALSE);
8974 if (uammo) {
8975 uammo->quan = 1;
8976 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
8977 uammo->spe = rnd(7);
8978 uammo->cursed = uammo->hvycurse = uammo->stckcurse = uammo->prmcurse = uammo->bbrcurse = uammo->morgcurse = uammo->evilcurse = FALSE;
8979 uammo->owt = weight(uammo);
8980 dropy(uammo);
8981 stackobj(uammo);
8984 t_timeout = rnz(20000);
8986 break;
8987 case T_BITCH_POSING:
8988 if (!PlayerInBlockHeels) {
8989 pline("That doesn't work without block heels!");
8990 break;
8993 if (uarmf->spe < 0) {
8994 int sperepair = abs(uarmf->spe);
8995 sperepair = rnd(sperepair);
8996 uarmf->spe += sperepair;
8997 Your("heels got repaired!");
8998 } else {
8999 if (uarmf && uarmf->spe < 2) {
9000 uarmf->spe++;
9001 } else if (uarmf && uarmf->spe < 8 && !rn2(uarmf->spe) ) {
9002 uarmf->spe++;
9004 Your("heels shine for a moment.");
9008 int i, j;
9009 struct monst *rainedmon;
9011 for (i = -3; i <= 3; i++) for(j = -3; j <= 3; j++) {
9012 if (!isok(u.ux + i, u.uy + j)) continue;
9014 if ( (rainedmon = m_at(u.ux + i, u.uy + j)) != 0) {
9015 if (rainedmon->mpeaceful || rainedmon->mtame || rainedmon->mfrenzied) continue;
9016 if (resist(rainedmon, WEAPON_CLASS, 0, NOTELL) && resist(rainedmon, WEAPON_CLASS, 0, NOTELL) && resist(rainedmon, WEAPON_CLASS, 0, NOTELL) ) continue;
9017 rainedmon->mpeaceful = TRUE;
9018 pline("%s cannot resist your sexy pose and is charmed!", Monnam(rainedmon));
9025 t_timeout = rnz(8000);
9026 break;
9027 case T_SEXY_STAND:
9028 if (!PlayerInBlockHeels) {
9029 pline("That doesn't work without block heels!");
9030 break;
9033 num = 200 + (techlevX(tech_no) * 10);
9034 techt_inuse(tech_no) = num + 1;
9035 pline("You perform a sexy stand.");
9037 t_timeout = rnz(20000);
9038 break;
9039 case T_MARATHON:
9040 if (!PlayerInWedgeHeels) {
9041 pline("That doesn't work without wedge heels!");
9042 break;
9045 num = 1000 + (techlevX(tech_no) * 10);
9046 techt_inuse(tech_no) = num + 1;
9047 pline("You're starting to run a marathon.");
9049 t_timeout = rnz(30000);
9050 break;
9051 case T_PERFUME_STRIDE:
9052 if (!PlayerInWedgeHeels) {
9053 pline("That doesn't work without wedge heels!");
9054 break;
9056 if (!uarmf) {
9057 pline("Where the hell are your shoes???"); /* shouldn't happen, but just making sure --Amy */
9058 break;
9061 num = 500 - (techlevX(tech_no) * 5);
9062 if (num < 50) num = 50;
9063 techt_inuse(tech_no) = num + 1;
9064 pline("A perfume companion starts to follow you, but now you're obligated to wear your heels for a while.");
9066 curse(uarmf);
9067 uarmf->hvycurse = uarmf->stckcurse = TRUE;
9070 int attempts = 0;
9071 register struct permonst *ptrZ;
9072 register struct monst *bossmon;
9074 perfumestriding:
9076 do {
9078 ptrZ = rndmonst();
9079 attempts++;
9080 if (attempts && (attempts % 10000 == 0)) u.mondiffhack++;
9081 if (!rn2(2000)) reset_rndmonst(NON_PM);
9083 } while ( (!ptrZ || (ptrZ && !(ptrZ->msound == MS_STENCH))) && attempts < 50000);
9085 if (ptrZ && ptrZ->msound == MS_STENCH) {
9086 bossmon = makemon(ptrZ, u.ux, u.uy, NO_MM_FLAGS);
9088 else if (rn2(50)) {
9089 attempts = 0;
9090 goto perfumestriding;
9093 if (bossmon) {
9094 tamedog(bossmon, (struct obj *) 0, TRUE);
9096 u.mondiffhack = 0;
9100 t_timeout = rnz(16000);
9101 break;
9102 case T_NAUGHTY_HEELOT:
9104 num = 1000 + (techlevX(tech_no) * 10);
9105 techt_inuse(tech_no) = num + 1;
9106 pline("You become the naughty heelot.");
9108 if (!PlayerInConeHeels && !PlayerInStilettoHeels) pline("But without the proper shoes, that won't do jack squat.");
9109 else if (!PlayerInConeHeels || !PlayerInStilettoHeels) pline("Seems like your current footwear isn't eligible for that, though, so you'd better find the right pair, fast.");
9110 /* still allows the player to use the tech, this is not a mistake --Amy */
9112 t_timeout = rnz(10000);
9113 break;
9114 case T_EXTREME_STURDINESS:
9115 if (!PlayerInWedgeHeels && !PlayerInBlockHeels) {
9116 pline("You need to either wear wedge or block heels for that!");
9117 break;
9120 num = 50 + (techlevX(tech_no));
9121 techt_inuse(tech_no) = num + 1;
9122 pline("You become extremely sturdy!");
9124 t_timeout = rnz(20000);
9125 break;
9126 case T_BUTT_PROTECTION:
9127 if (!PlayerInConeHeels) {
9128 pline("That doesn't work without cone heels!");
9129 break;
9132 num = 50 + (techlevX(tech_no) * 2);
9133 techt_inuse(tech_no) = num + 1;
9134 pline("Your butt is protected now.");
9136 t_timeout = rnz(10000);
9137 break;
9138 case T_PROFILING:
9139 if (!PlayerInBlockHeels) {
9140 pline("That doesn't work without block heels!");
9141 break;
9143 if (!uarmf) {
9144 pline("Where the hell are your shoes???"); /* shouldn't happen, but just making sure --Amy */
9145 break;
9148 if (uarmf->obrittle >= 3 || uarmf->obrittle2 >= 3) {
9149 pline("Your pair of heels is maximally profiled already! Any more and you'd risk breaking them!");
9150 break;
9152 if (uarmf->spe >= 5) {
9153 pline("It wouldn't make sense to add more profiling to this pair of boots.");
9154 break;
9156 uarmf->spe++;
9157 if (rn2(2)) uarmf->obrittle++;
9158 else uarmf->obrittle2++;
9159 pline("You added some profiling to your boots.");
9161 t_timeout = rnz(8000);
9162 break;
9163 case T_STAR_HEEL_SWAP:
9164 if (!PlayerInWedgeHeels) {
9165 pline("That doesn't work without wedge heels!");
9166 break;
9168 if (!uarmf) {
9169 pline("Where the hell are your shoes???"); /* shouldn't happen, but just making sure --Amy */
9170 break;
9172 if (!uwep) {
9173 pline("That doesn't work without a weapon!");
9174 return 0;
9176 if (uwep && weapon_type(uwep) != P_MORNING_STAR) {
9177 pline("That only works if your wielded weapon is a morning star, and currently it's not!");
9178 return 0;
9182 int knifeenchant = uwep->spe;
9183 int heelsenchant = uarmf->spe;
9184 int knifebuc = 0;
9185 int heelsbuc = 0;
9187 /* now for a system that will make every C programmer's skin crawl... :-P --Amy */
9188 if (uwep->blessed) knifebuc = 1;
9189 if (uwep->cursed) knifebuc = 2;
9190 if (uwep->hvycurse) knifebuc = 3;
9191 if (uwep->prmcurse) knifebuc = 4;
9192 if (uwep->stckcurse) knifebuc += 10;
9193 if (uwep->bbrcurse) knifebuc += 100;
9194 if (uwep->morgcurse) knifebuc += 1000;
9195 if (uwep->evilcurse) knifebuc += 10000;
9197 if (uarmf->blessed) heelsbuc = 1;
9198 if (uarmf->cursed) heelsbuc = 2;
9199 if (uarmf->hvycurse) heelsbuc = 3;
9200 if (uarmf->prmcurse) heelsbuc = 4;
9201 if (uarmf->stckcurse) heelsbuc += 10;
9202 if (uarmf->bbrcurse) heelsbuc += 100;
9203 if (uarmf->morgcurse) heelsbuc += 1000;
9204 if (uarmf->evilcurse) heelsbuc += 10000;
9206 uwep->spe = heelsenchant;
9207 uarmf->spe = knifeenchant;
9209 uwep->blessed = uwep->cursed = uwep->hvycurse = uwep->prmcurse = uwep->stckcurse = uwep->morgcurse = uwep->bbrcurse = uwep->evilcurse = 0;
9210 uarmf->blessed = uarmf->cursed = uarmf->hvycurse = uarmf->prmcurse = uarmf->stckcurse = uarmf->morgcurse = uarmf->bbrcurse = uarmf->evilcurse = 0;
9212 if (knifebuc == 1) uarmf->blessed = TRUE;
9213 else {
9214 if (knifebuc >= 10000) {
9215 knifebuc -= 10000;
9216 uarmf->cursed = uarmf->hvycurse = uarmf->prmcurse = uarmf->evilcurse = TRUE;
9218 if (knifebuc >= 1000) {
9219 knifebuc -= 1000;
9220 uarmf->cursed = uarmf->hvycurse = uarmf->prmcurse = uarmf->morgcurse = TRUE;
9222 if (knifebuc >= 100) {
9223 knifebuc -= 100;
9224 uarmf->cursed = uarmf->hvycurse = uarmf->prmcurse = uarmf->bbrcurse = TRUE;
9226 if (knifebuc >= 10) {
9227 knifebuc -= 10;
9228 uarmf->cursed = uarmf->stckcurse = TRUE;
9230 if (knifebuc >= 2) {
9231 uarmf->cursed = TRUE;
9232 if (knifebuc >= 3) uarmf->hvycurse = TRUE;
9233 if (knifebuc >= 4) uarmf->prmcurse = TRUE;
9237 if (heelsbuc == 1) uwep->blessed = TRUE;
9238 else {
9239 if (heelsbuc >= 10000) {
9240 heelsbuc -= 10000;
9241 uwep->cursed = uwep->hvycurse = uwep->prmcurse = uwep->evilcurse = TRUE;
9243 if (heelsbuc >= 1000) {
9244 heelsbuc -= 1000;
9245 uwep->cursed = uwep->hvycurse = uwep->prmcurse = uwep->morgcurse = TRUE;
9247 if (heelsbuc >= 100) {
9248 heelsbuc -= 100;
9249 uwep->cursed = uwep->hvycurse = uwep->prmcurse = uwep->bbrcurse = TRUE;
9251 if (heelsbuc >= 10) {
9252 heelsbuc -= 10;
9253 uwep->cursed = uwep->stckcurse = TRUE;
9255 if (heelsbuc >= 2) {
9256 uwep->cursed = TRUE;
9257 if (heelsbuc >= 3) uwep->hvycurse = TRUE;
9258 if (heelsbuc >= 4) uwep->prmcurse = TRUE;
9262 pline("Enchantments and BUC of your knife and heels have been swapped.");
9266 t_timeout = rnz(9000);
9267 break;
9268 case T_HEEL_STAB:
9269 if (!PlayerInStilettoHeels) {
9270 pline("That doesn't work without stiletto heels!");
9271 break;
9273 if (!uwep) {
9274 pline("That doesn't work without a weapon!");
9275 return 0;
9277 if (uwep && weapon_type(uwep) != P_KNIFE) {
9278 pline("That only works if your wielded weapon is a knife, and currently it's not!");
9279 return 0;
9282 num = 100 + (techlevX(tech_no) * 2);
9283 techt_inuse(tech_no) = num + 1;
9284 pline("Your heel-shaped knife can stab enemies much more effectively now.");
9286 t_timeout = rnz(6000);
9287 break;
9289 case T_EARTHSHAKE:
9291 if (Is_rogue_level(&u.uz) || (In_endgame(&u.uz) && !Is_earthlevel(&u.uz))) {
9292 pline("That doesn't work in this area.");
9293 break;
9296 if (In_sokoban(&u.uz) && !playercancheatinsoko()) {
9297 change_luck(-1);
9298 pline("You cheater!");
9299 if (evilfriday) u.ugangr++;
9303 register int x, y;
9304 struct obj *otmp2;
9306 int earthradius = 1;
9308 for (x = u.ux-earthradius; x <= u.ux+earthradius; x++) {
9309 for (y = u.uy-earthradius; y <= u.uy+earthradius; y++) {
9310 if (isok(x, y) && !IS_ROCK(levl[x][y].typ)) {
9311 otmp2 = mksobj(BOULDER, FALSE, FALSE, FALSE);
9312 if (otmp2) {
9313 if (!flooreffects(otmp2, x, y, "fall")) {
9314 place_object(otmp2, x, y);
9315 stackobj(otmp2);
9316 newsym(x, y); /* map the rock */
9323 pline("Several boulders fall.");
9326 t_timeout = rnz(40000);
9328 break;
9330 case T_HARDCORE_ALIENIZATION:
9332 register struct obj *shemagh;
9334 if ((find_shemagh()) != -1) {
9335 shemagh = mksobj(find_shemagh(), TRUE, FALSE, FALSE);
9337 if (shemagh) {
9339 (void) pickup_object(shemagh, shemagh->quan, TRUE, TRUE);
9341 if (shemagh) {
9343 if (is_helmet(shemagh)) {
9344 if (uarmh) remove_worn_item(uarmh, TRUE);
9345 setworn(shemagh, W_ARMH);
9346 Helmet_on();
9347 if (shemagh) curse(shemagh);
9348 You("are wearing a shemagh now.");
9349 } else {
9350 pline("Somehow, no shemagh was created!");
9353 } else pline("Somehow, it failed.");
9354 } else pline("Something has gone wrong...");
9359 t_timeout = rnz(20000);
9361 break;
9363 case T_PERMAMORPH:
9365 if (!getdir((char *)0)) return 0;
9366 if (!u.dx && !u.dy) {
9367 pline("This technique is for polymorphing monsters, not yourself.");
9368 return 0;
9370 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
9371 pline("Invalid target location.");
9372 return 0;
9374 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
9375 if (!mtmp) {
9376 You("were such a noob and wasted this powerful technique by aiming it at thin air! Why didn't you target a monster instead?");
9377 } else if (!is_infrastructure_monster(mtmp) && mtmp->isminion == 0 && mtmp->isgyp == 0
9378 && mtmp->mnum != quest_info(MS_NEMESIS) && !(mtmp->data->geno & G_UNIQ) ) {
9379 if (!resist(mtmp, WAND_CLASS, 0, NOTELL)) {
9380 (void) mon_spec_polyX(mtmp, (struct permonst *)0, 0L, FALSE, TRUE, FALSE, FALSE);
9381 } else {
9382 pline("%s resists! Hahahahahahaha! Now you can wait for an eternity before the technique becomes available again.", Monnam(mtmp));
9384 } else {
9385 pline("What a shame - you apparently targetted a monster that is immune, and therefore nothing happens.");
9388 t_timeout = rnz(75000);
9390 break;
9392 case T_PACIFY:
9393 if (!getdir((char *)0)) return 0;
9394 if (!u.dx && !u.dy) {
9395 pline("You cannot pacify yourself.");
9396 return 0;
9398 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
9399 pline("Invalid target location.");
9400 return 0;
9402 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
9403 if (!mtmp) {
9404 pline("There is no monster in that direction. Nothing happens.");
9405 } else if (mtmp->mtame == 0 && !is_infrastructure_monster(mtmp) && mtmp->mpeaceful == 0 && mtmp->mfrenzied == 0 && mtmp->isminion == 0 && mtmp->isgyp == 0
9406 && mtmp->mnum != quest_info(MS_NEMESIS) && !(mtmp->data->geno & G_UNIQ) ) {
9407 if (!resist(mtmp, WAND_CLASS, 0, NOTELL)) {
9408 int pacifychance = 10;
9409 if (!PlayerCannotUseSkills) {
9410 switch (P_SKILL(P_ORB)) {
9411 default: break;
9412 case P_BASIC:
9413 pacifychance += 5;
9414 break;
9415 case P_SKILLED:
9416 pacifychance += 10;
9417 break;
9418 case P_EXPERT:
9419 pacifychance += 15;
9420 break;
9421 case P_MASTER:
9422 pacifychance += 20;
9423 break;
9424 case P_GRAND_MASTER:
9425 pacifychance += 25;
9426 break;
9427 case P_SUPREME_MASTER:
9428 pacifychance += 30;
9429 break;
9432 if (u.ualign.record < -20) pacifychance -= 50;
9433 else if (u.ualign.record < -10) pacifychance -= 20;
9434 else if (u.ualign.record < 0) pacifychance -= 10;
9435 else if (u.ualign.record > 4 && u.ualign.record < 10) pacifychance += 5;
9436 else if (u.ualign.record > 9 && u.ualign.record < 14) pacifychance += 10;
9437 else if (u.ualign.record > 14 && u.ualign.record < 20) pacifychance += 15;
9438 else if (u.ualign.record > 19 && u.ualign.record < 40) pacifychance += 20;
9439 else if (u.ualign.record > 39 && u.ualign.record < 60) pacifychance += 30;
9440 else if (u.ualign.record > 59 && u.ualign.record < 80) pacifychance += 40;
9441 else if (u.ualign.record > 79 && u.ualign.record < 100) pacifychance += 50;
9442 else if (u.ualign.record > 99 && u.ualign.record < 120) pacifychance += 60;
9443 else if (u.ualign.record > 119 && u.ualign.record < 140) pacifychance += 70;
9444 else if (u.ualign.record > 139) pacifychance += 80;
9446 if (rn2(100) < pacifychance) {
9447 mtmp->mpeaceful = 1;
9448 pline("%s looks calmer.", mon_nam(mtmp));
9449 } else {
9450 pline("%s resists the attempt.", Monnam(mtmp));
9453 } else {
9454 pline("%s is as angry as before.", Monnam(mtmp));
9456 } else {
9457 pline("That monster is immune.");
9460 t_timeout = rnz(5000);
9461 break;
9463 case T_AFTERBURNER:
9464 num = 5 + (techlevX(tech_no) / 5);
9465 techt_inuse(tech_no) = num + 1;
9466 pline("You've activated your afterburner.");
9467 t_timeout = rnz(6000);
9468 break;
9470 case T_BUGGARD:
9471 num = 20 + techlevX(tech_no);
9472 techt_inuse(tech_no) = num + 1;
9473 pline("You've summoned a blizzard!");
9474 t_timeout = rnz(8000);
9475 break;
9477 case T_THUNDERSTORM:
9478 num = 60 + (techlevX(tech_no) * 20);
9479 techt_inuse(tech_no) = num + 1;
9480 pline("You've conjured a thunderstorm!");
9481 t_timeout = rnz(12000);
9482 break;
9484 case T_AUTOKILL:
9487 int melteestrength = 5 + (techlevX(tech_no) / 4);
9489 buzz(15, melteestrength, u.ux, u.uy, -1, 0);
9490 buzz(15, melteestrength, u.ux, u.uy, 1, 0);
9491 buzz(15, melteestrength, u.ux, u.uy, -1, 1);
9492 buzz(15, melteestrength, u.ux, u.uy, 1, 1);
9493 buzz(15, melteestrength, u.ux, u.uy, 0, 1);
9494 buzz(15, melteestrength, u.ux, u.uy, -1, -1);
9495 buzz(15, melteestrength, u.ux, u.uy, 1, -1);
9496 buzz(15, melteestrength, u.ux, u.uy, 0, -1);
9499 t_timeout = rnz(10000);
9501 break;
9503 case T_CHAIN_THUNDERBOLT:
9506 int melteestrength = 5 + (techlevX(tech_no) / 4);
9507 int ctx, cty;
9508 ctx = u.ux, cty = u.uy;
9510 if (!getdir((char *)0)) return(0);
9511 if (!u.dx && !u.dy) {
9512 You("really shouldn't be aiming that at yourself.");
9513 return(0);
9515 for(i = 0; i < 8; i++) {
9516 if (!isok(ctx + u.dx, cty + u.dy)) break;
9517 if (levl[ctx + u.dx][cty + u.dy].typ < POOL) break;
9519 ctx += u.dx;
9520 cty += u.dy;
9523 if (ctx == u.ux && cty == u.uy) {
9524 pline("The effect dissipated because you didn't aim properly!");
9525 return(0);
9527 if (!isok(ctx, cty)) { /* shouldn't happen */
9528 pline("The effect dissipated because it travelled off the map.");
9529 return(0);
9532 buzz(15, melteestrength, ctx, cty, -1, 0);
9533 buzz(15, melteestrength, ctx, cty, 1, 0);
9534 buzz(15, melteestrength, ctx, cty, -1, 1);
9535 buzz(15, melteestrength, ctx, cty, 1, 1);
9536 buzz(15, melteestrength, ctx, cty, 0, 1);
9537 buzz(15, melteestrength, ctx, cty, -1, -1);
9538 buzz(15, melteestrength, ctx, cty, 1, -1);
9539 buzz(15, melteestrength, ctx, cty, 0, -1);
9542 t_timeout = rnz(10000);
9543 break;
9545 case T_FLASHING_MISCHIEF:
9548 int melteestrength = 5 + (techlevX(tech_no) / 4);
9549 int ctx, cty;
9550 ctx = u.ux, cty = u.uy;
9552 if (!getdir((char *)0)) return(0);
9553 if (!u.dx && !u.dy) {
9554 You("really shouldn't be aiming that at yourself.");
9555 return(0);
9557 for(i = 0; i < 8; i++) {
9558 if (!isok(ctx + u.dx, cty + u.dy)) break;
9559 if (levl[ctx + u.dx][cty + u.dy].typ < POOL) break;
9561 ctx += u.dx;
9562 cty += u.dy;
9564 if (isok(ctx, cty)) {
9565 switch (rnd(8)) {
9566 case 1:
9567 buzz(15, melteestrength, ctx, cty, -1, 0);
9568 break;
9569 case 2:
9570 buzz(15, melteestrength, ctx, cty, 1, 0);
9571 break;
9572 case 3:
9573 buzz(15, melteestrength, ctx, cty, -1, 1);
9574 break;
9575 case 4:
9576 buzz(15, melteestrength, ctx, cty, 1, 1);
9577 break;
9578 case 5:
9579 buzz(15, melteestrength, ctx, cty, 0, 1);
9580 break;
9581 case 6:
9582 buzz(15, melteestrength, ctx, cty, -1, -1);
9583 break;
9584 case 7:
9585 buzz(15, melteestrength, ctx, cty, 1, -1);
9586 break;
9587 case 8:
9588 buzz(15, melteestrength, ctx, cty, 0, -1);
9589 break;
9597 t_timeout = rnz(10000);
9598 break;
9600 case T_SWORD_ART:
9601 if (!uwep) {
9602 pline("That requires you to wield a weapon!");
9603 return 0;
9607 if (uwep && weapon_type(uwep) != P_SHORT_SWORD && weapon_type(uwep) != P_BROAD_SWORD && weapon_type(uwep) != P_LONG_SWORD && weapon_type(uwep) != P_TWO_HANDED_SWORD) {
9608 pline("That only works if your wielded weapon is a short, broad, long or two-handed sword, and currently it's not!");
9609 return 0;
9612 if (uwep && uwep->spe < 7) {
9613 uwep->spe++;
9614 pline("Your weapon glows %s.", hcolor(NH_LIGHT_BLUE));
9615 } else pline("Your currently wielded weapon can't be enchanted any further with this technique, and therefore nothing happens.");
9617 t_timeout = rnz(20000);
9618 break;
9620 case T_FIRM_CUDGEL:
9622 if (!uwep) {
9623 pline("That requires you to wield a weapon!");
9624 return 0;
9628 if (uwep && weapon_type(uwep) != P_MACE && weapon_type(uwep) != P_FLAIL && weapon_type(uwep) != P_CLUB && weapon_type(uwep) != P_HAMMER) {
9629 pline("That only works if your wielded weapon is a mace, flail, club or hammer, and currently it's not!");
9630 return 0;
9633 if (uwep) {
9634 uwep->oerodeproof = uwep->rknown = TRUE;
9635 uwep->oeroded = uwep->oeroded2 = 0;
9636 Your("weapon is surrounded by a shimmering shield!");
9639 t_timeout = rnz(30000);
9640 break;
9642 case T_KAMEHAMEHA:
9645 int melteestrength = rnd(20 + techlevX(tech_no));
9646 if (uwep && uwep->oartifact == ART_CAMOHAMEHA) melteestrength *= 2;
9647 int ctx, cty;
9648 ctx = u.ux, cty = u.uy;
9650 if (!getdir((char *)0)) return(0);
9651 if (!u.dx && !u.dy) {
9652 You("can't direct that at yourself.");
9653 return(0);
9655 verbalize("Kamehameha!");
9657 for(i = 0; i < ((uwep && uwep->oartifact == ART_CAMOHAMEHA) ? 13 : 8); i++) {
9658 if (!isok(ctx + u.dx, cty + u.dy)) break;
9659 if (levl[ctx + u.dx][cty + u.dy].typ < POOL) break;
9661 ctx += u.dx;
9662 cty += u.dy;
9664 mtmp = m_at(ctx, cty);
9666 if (mtmp) {
9667 pline("The projectile hits %s!", mon_nam(mtmp));
9668 wakeup(mtmp); /* turn the monster hostile */
9669 hurtmon(mtmp, melteestrength);
9670 break;
9677 t_timeout = rnz(2000);
9678 break;
9680 case T_SHADOW_MANTLE:
9682 litroomlite(FALSE);
9686 int i, j, bd = 2;
9687 struct monst *mtmp;
9689 for(i = -bd; i <= bd; i++) for(j = -bd; j <= bd; j++) {
9690 if (!isok(u.ux + i, u.uy + j)) continue;
9691 if ((mtmp = m_at(u.ux + i, u.uy + j)) != 0) {
9692 wakeup(mtmp); /* monster becomes hostile */
9693 mtmp->mcansee = 0;
9694 mtmp->mblinded = rnd(20 + techlevX(tech_no));
9695 pline("%s is blinded!", Monnam(mtmp));
9702 t_timeout = rnz(5000);
9704 break;
9706 case T_VACUUM_STAR:
9708 You("create throwing stars.");
9710 struct obj *uammo;
9712 uammo = mksobj(SHURIKEN, TRUE, FALSE, FALSE);
9713 if (uammo) {
9714 uammo->quan = rnd(40 + (3 * techlevX(tech_no)));
9715 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
9716 uammo->owt = weight(uammo);
9717 dropy(uammo);
9718 stackobj(uammo);
9723 t_timeout = rnz(12000);
9725 break;
9727 case T_BLADE_SHIELD:
9728 num = 20 + techlevX(tech_no);
9729 techt_inuse(tech_no) = num + 1;
9730 pline("Blade shield activated.");
9731 t_timeout = rnz(3000);
9732 break;
9734 case T_GREEN_WEAPON:
9736 if (!uwep) {
9737 You("can't use this technique without a weapon!");
9738 return(0);
9741 if (uwep && weapon_type(uwep) != P_CLAW) {
9742 pline("That only works if your wielded weapon is a claw, and currently it's not!");
9743 return 0;
9746 uwep->opoisoned = TRUE;
9747 uwep->superpoison = TRUE;
9748 Your("claw became green.");
9750 t_timeout = rnz(10000);
9751 break;
9753 case T_HIDDEN_POWER:
9756 struct obj *hiddenpwitem;
9757 int hiddenpowertype;
9759 hiddenpowertype = POT_HEALING; /* fail safe */
9761 switch (u.hiddenpowerskill) {
9762 case P_DAGGER:
9763 hiddenpowertype = WAN_INERTIA; break;
9764 case P_KNIFE:
9765 hiddenpowertype = WAN_STONING; break;
9766 case P_AXE:
9767 hiddenpowertype = SCR_TAMING; break;
9768 case P_PICK_AXE:
9769 hiddenpowertype = WAN_DISINTEGRATION; break;
9770 case P_SHORT_SWORD:
9771 hiddenpowertype = POT_BENEFICIAL_EFFECT; break;
9772 case P_BROAD_SWORD:
9773 hiddenpowertype = POT_GAIN_LEVEL; break;
9774 case P_LONG_SWORD:
9775 hiddenpowertype = WAN_THUNDER; break;
9776 case P_TWO_HANDED_SWORD:
9777 hiddenpowertype = MAGIC_HARP; break;
9778 case P_SCIMITAR:
9779 hiddenpowertype = WAN_INCREASE_MAX_HITPOINTS; break;
9780 case P_SABER:
9781 hiddenpowertype = WAN_REMOVE_CURSE; break;
9782 case P_CLUB:
9783 hiddenpowertype = POT_HEROISM; break;
9784 case P_PADDLE:
9785 hiddenpowertype = WAN_TIME; break;
9786 case P_MACE:
9787 hiddenpowertype = WAN_NETHER_BEAM; break;
9788 case P_MORNING_STAR:
9789 hiddenpowertype = POT_RESTORE_ABILITY; break;
9790 case P_FLAIL:
9791 hiddenpowertype = WAN_INFERNO; break;
9792 case P_HAMMER:
9793 hiddenpowertype = WAN_GRAVITY_BEAM; break;
9794 case P_QUARTERSTAFF:
9795 hiddenpowertype = SCR_POWER_CHARGING; break;
9796 case P_ORB:
9797 hiddenpowertype = POT_RECOVERY; break;
9798 case P_CLAW:
9799 hiddenpowertype = WAN_TRAP_DISARMING; break;
9800 case P_GRINDER:
9801 hiddenpowertype = SCR_REPAIR_ITEM; break;
9802 case P_POLEARMS:
9803 hiddenpowertype = WAN_PARALYSIS; break;
9804 case P_SPEAR:
9805 hiddenpowertype = WAN_ICE_BEAM; break;
9806 case P_JAVELIN:
9807 hiddenpowertype = POT_WATER; break;
9808 case P_TRIDENT:
9809 hiddenpowertype = WAN_DISINTEGRATION_BEAM; break;
9810 case P_LANCE:
9811 hiddenpowertype = POT_GAIN_HEALTH; break;
9812 case P_BOW:
9813 hiddenpowertype = SCR_RANDOM_ENCHANTMENT; break;
9814 case P_SLING:
9815 hiddenpowertype = SCR_REGULAR_MATERIAL; break;
9816 case P_FIREARM:
9817 hiddenpowertype = SCR_TRAP_DISARMING; break;
9818 case P_CROSSBOW:
9819 hiddenpowertype = SCR_GREATER_ENCHANT_WEAPON; break;
9820 case P_DART:
9821 hiddenpowertype = EXPENSIVE_CAMERA; break;
9822 case P_SHURIKEN:
9823 hiddenpowertype = WAN_CHROMATIC_BEAM; break;
9824 case P_BOOMERANG:
9825 hiddenpowertype = SCR_CREATE_FAMILIAR; break;
9826 case P_WHIP:
9827 hiddenpowertype = SCR_CURE; break;
9828 case P_UNICORN_HORN:
9829 hiddenpowertype = SCR_TERRAFORMING; break;
9830 case P_LIGHTSABER:
9831 hiddenpowertype = SCR_SECURE_CURSE_REMOVAL; break;
9832 case P_ATTACK_SPELL:
9833 hiddenpowertype = SCR_SKILL_GROWTH; break;
9834 case P_HEALING_SPELL:
9835 hiddenpowertype = POT_FULL_HEALING; break;
9836 case P_DIVINATION_SPELL:
9837 hiddenpowertype = SCR_SECURE_IDENTIFY; break;
9838 case P_ENCHANTMENT_SPELL:
9839 hiddenpowertype = WAN_HYPER_BEAM; break;
9840 case P_PROTECTION_SPELL:
9841 hiddenpowertype = SCR_EBB_TIDE; break;
9842 case P_BODY_SPELL:
9843 hiddenpowertype = WAN_TOXIC; break;
9844 case P_OCCULT_SPELL:
9845 hiddenpowertype = WAN_IDENTIFY; break;
9846 case P_ELEMENTAL_SPELL:
9847 hiddenpowertype = SCR_SUPERIOR_MATERIAL; break;
9848 case P_CHAOS_SPELL:
9849 hiddenpowertype = TINNING_KIT; break;
9850 case P_MATTER_SPELL:
9851 hiddenpowertype = WAN_SLUDGE; break;
9852 case P_BARE_HANDED_COMBAT:
9853 hiddenpowertype = SCR_SKILL_UP; break;
9854 case P_HIGH_HEELS:
9855 hiddenpowertype = TWELVE_COURSE_DINNER; break;
9856 case P_GENERAL_COMBAT:
9857 hiddenpowertype = CRYSTAL_BALL; break;
9858 case P_SHIELD:
9859 hiddenpowertype = SCR_REVERSE_IDENTIFY; break;
9860 case P_BODY_ARMOR:
9861 hiddenpowertype = SCR_GREATER_ENCHANT_ARMOR; break;
9862 case P_TWO_HANDED_WEAPON:
9863 hiddenpowertype = CAN_OF_GREASE; break;
9864 case P_POLYMORPHING:
9865 hiddenpowertype = SCR_HYBRIDIZATION; break;
9866 case P_DEVICES:
9867 hiddenpowertype = SCR_INVENTORY_ID; break;
9868 case P_SEARCHING:
9869 hiddenpowertype = STETHOSCOPE; break;
9870 case P_SPIRITUALITY:
9871 hiddenpowertype = SCR_CONSECRATION; break;
9872 case P_PETKEEPING:
9873 hiddenpowertype = DARK_MAGIC_WHISTLE; break;
9874 case P_MISSILE_WEAPONS:
9875 hiddenpowertype = WAN_ENTRAPPING; break;
9876 case P_TECHNIQUES:
9877 hiddenpowertype = HUGE_CHUNK_OF_MEAT; break;
9878 case P_IMPLANTS:
9879 hiddenpowertype = SCR_ARMOR_SPECIALIZATION; break;
9880 case P_SEXY_FLATS:
9881 hiddenpowertype = POT_TRAINING; break;
9882 case P_MEMORIZATION:
9883 hiddenpowertype = SCR_GAIN_MANA; break;
9884 case P_GUN_CONTROL:
9885 hiddenpowertype = WAN_DEATH; break;
9886 case P_SQUEAKING:
9887 hiddenpowertype = SHADOW_HORN; break;
9888 case P_SYMBIOSIS:
9889 hiddenpowertype = SCR_SYMBIOSIS; break;
9890 case P_SHII_CHO:
9891 hiddenpowertype = POT_RANDOM_INTRINSIC; break;
9892 case P_MAKASHI:
9893 hiddenpowertype = CHOCOLATE; break;
9894 case P_SORESU:
9895 hiddenpowertype = WAN_AURORA_BEAM; break;
9896 case P_ATARU:
9897 hiddenpowertype = WAN_BANISHMENT; break;
9898 case P_SHIEN:
9899 hiddenpowertype = WAN_TIME_STOP; break;
9900 case P_DJEM_SO:
9901 hiddenpowertype = POT_CURE_INSANITY; break;
9902 case P_NIMAN:
9903 hiddenpowertype = POT_DOWN_LEVEL; break;
9904 case P_JUYO:
9905 hiddenpowertype = SCR_ERASURE; break;
9906 case P_VAAPAD:
9907 hiddenpowertype = SCR_ARTIFACT_CREATION; break;
9908 case P_WEDI:
9909 hiddenpowertype = WAN_CLONE_MONSTER; break;
9910 case P_STILETTO_HEELS:
9911 hiddenpowertype = WAN_STERILIZE; break;
9912 case P_CONE_HEELS:
9913 hiddenpowertype = POT_INVULNERABILITY; break;
9914 case P_BLOCK_HEELS:
9915 hiddenpowertype = SCR_WONDER; break;
9916 case P_WEDGE_HEELS:
9917 hiddenpowertype = SCR_RETURN; break;
9918 case P_BOULDER_THROWING:
9919 hiddenpowertype = SCR_BOSS_COMPANION; break;
9920 case P_MARTIAL_ARTS:
9921 hiddenpowertype = WAN_CHARGING; break;
9922 case P_TWO_WEAPON_COMBAT:
9923 hiddenpowertype = POT_TECH_LEVEL_UP; break;
9924 case P_RIDING:
9925 hiddenpowertype = WAN_FULL_HEALING; break;
9926 case P_VENOM:
9927 hiddenpowertype = WAN_VENOM_SCATTERING; break;
9930 pline("A hidden item is created!");
9931 hiddenpwitem = mksobj(hiddenpowertype, TRUE, FALSE, FALSE);
9932 if (hiddenpwitem) {
9933 hiddenpwitem->quan = 1;
9934 hiddenpwitem->known = hiddenpwitem->dknown = hiddenpwitem->bknown = hiddenpwitem->rknown = 1;
9935 hiddenpwitem->owt = weight(hiddenpwitem);
9936 dropy(hiddenpwitem);
9937 stackobj(hiddenpwitem);
9943 t_timeout = rnz(50000);
9944 break;
9946 case T_LIGHTER_BALLS:
9948 if (!uwep) {
9949 You("can't use this technique without a weapon!");
9950 return(0);
9953 if (uwep && uwep->oclass != BALL_CLASS) {
9954 You("aren't wielding a ball!");
9955 return(0);
9958 num = 1000 + (techlevX(tech_no) * 10);
9959 techt_inuse(tech_no) = num + 1;
9960 Your("balls get lighter.");
9961 if (FunnyHallu) pline("Shame, now no girl will want to kick them because it wouldn't hurt you anymore.");
9963 t_timeout = rnz(50000);
9964 break;
9966 case T_ROCK_TO_POISON:
9968 if (CannotSelectItemsInPrompts) break;
9969 rockpoisonchoice:
9970 otmp = getobj(allnoncount, "turn into poison");
9971 if (!otmp) {
9972 if (yn("Really exit with no object selected?") == 'y')
9973 pline("You just wasted the opportunity to definalize an item.");
9974 else goto rockpoisonchoice;
9975 pline("A feeling of loss comes over you.");
9976 break;
9979 if (otmp) {
9980 if (otmp->otyp != ROCK) {
9981 pline("That's not a rock, and therefore nothing happens.");
9982 } else if (otmp->oartifact) {
9983 pline("You knew that this wasn't gonna work on an artifact, so why do you try anyway?");
9984 } else if (!stack_too_big(otmp)) {
9985 otmp->otyp = ACID_VENOM;
9986 otmp->oclass = VENOM_CLASS;
9987 pline("Success! You've concocted some venom.");
9988 } else pline("The stack was too big, and therefore nothing happens.");
9991 t_timeout = rnz(25000);
9993 break;
9995 case T_INJECTION:
9997 if (u.uswallow) {
9998 pline("Not enough room. Get out of the swallowing monster first.");
9999 return(0);
10002 if (!getdir((char *)0)) return(0);
10003 if (!u.dx && !u.dy) {
10004 /* Hopefully a mistake ;B */
10005 pline("Nah, you're not gonna do that, it'd be too painful.");
10006 return(0);
10008 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
10009 pline("Invalid target location.");
10010 return 0;
10012 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
10013 if (!mtmp) {
10014 pline("There was no monster at that location, and therefore your poisoned injection goes to waste!");
10015 t_timeout = rnz(2500);
10016 break;
10019 You("inject the poison into %s's %s...", mon_nam(mtmp), mbodypart(mtmp, BLOOD));
10021 int injectiondmg = rn1(10, 6);
10022 injectiondmg += techlevX(tech_no);
10023 if (!resist(mtmp, VENOM_CLASS, 0, NOTELL)) {
10024 pline("%s's nerves are poisoned!", Monnam(mtmp));
10025 if (!dmgtype(mtmp->data, AD_PLYS)) {
10026 mtmp->mcanmove = 0;
10027 mtmp->mfrozen = rnd(4);
10028 mtmp->mstrategy &= ~STRAT_WAITFORU;
10031 if (!resists_poison(mtmp) || player_will_pierce_resistance()) {
10032 if (!rn2(500) && !resists_poison(mtmp) ) {
10033 Your("poison was deadly...");
10034 injectiondmg = (mtmp->mhp * 10);
10036 if (injectiondmg > 0) {
10037 pline("%s is green now!", Monnam(mtmp));
10038 (void) resist(mtmp, VENOM_CLASS, injectiondmg, NOTELL);
10040 } else pline("%s resisted the poison.", Monnam(mtmp));
10043 t_timeout = rnz(2500);
10044 break;
10046 case T_SUPER_POISON:
10048 if (!uwep) {
10049 pline("That doesn't work without a weapon!");
10050 return 0;
10052 if (uwep && uwep->oclass != VENOM_CLASS) {
10053 pline("That only works if your wielded weapon is a venom, and currently it's not!");
10054 return 0;
10057 if (uwep && stack_too_big(uwep)) {
10058 pline("You were trying to enchant too many venoms at once and therefore it failed.");
10059 } else if (uwep && uwep->spe < 25) {
10060 uwep->spe += rnd(4);
10061 pline("The venoms have been enchanted.");
10062 } else {
10063 pline("Unfortunately the venoms cannot be enchanted beyond the current enchantment level.");
10066 t_timeout = rnz(10000);
10067 break;
10069 case T_GREEN_MISSILE:
10071 num = 10 + (techlevX(tech_no) / 3);
10072 techt_inuse(tech_no) = num + 1;
10073 pline("You've readied your special wood that you can make into poisoned missiles. Launch them by throwing venoms.");
10075 t_timeout = rnz(5000);
10076 break;
10078 case T_BIG_N_VEINY:
10080 num = 100 + (techlevX(tech_no));
10081 techt_inuse(tech_no) = num + 1;
10082 pline("Now your body is particularly poisonous!");
10084 t_timeout = rnz(8000);
10085 break;
10087 case T_PLANT_TERROR:
10089 u.wormpolymorph = PM_ORIGINAL_MESHERA_PLANT;
10090 polyself(FALSE);
10091 if (u.mtimedone && (u.umonnum == PM_ORIGINAL_MESHERA_PLANT) ) {
10092 u.mtimedone = 100 + (techlevX(tech_no));
10093 pline("The Human World does not care about the Plant World. So you'll teach them.");
10095 mtmp = makemon(&mons[rn2(5) ? PM_LITTLE_POISON_IVY : PM_SWEET_ASIAN_POISON_IVY], u.ux, u.uy, MM_ADJACENTOK);
10096 if (mtmp) (void) tamedog(mtmp, (struct obj *) 0, TRUE);
10097 mtmp = makemon(&mons[rn2(5) ? PM_LITTLE_POISON_IVY : PM_SWEET_ASIAN_POISON_IVY], u.ux, u.uy, MM_ADJACENTOK);
10098 if (mtmp) (void) tamedog(mtmp, (struct obj *) 0, TRUE);
10099 if (!rn2(2)) {
10100 mtmp = makemon(&mons[rn2(5) ? PM_LITTLE_POISON_IVY : PM_SWEET_ASIAN_POISON_IVY], u.ux, u.uy, MM_ADJACENTOK);
10101 if (mtmp) (void) tamedog(mtmp, (struct obj *) 0, TRUE);
10102 if (!rn2(2)) {
10103 mtmp = makemon(&mons[rn2(5) ? PM_LITTLE_POISON_IVY : PM_SWEET_ASIAN_POISON_IVY], u.ux, u.uy, MM_ADJACENTOK);
10104 if (mtmp) (void) tamedog(mtmp, (struct obj *) 0, TRUE);
10108 } else pline("Somehow, you failed to transform into a plant. Maybe you can't polymorph?");
10110 t_timeout = rnz(50000);
10111 break;
10113 case T_POISON_PEN_LETTER:
10115 num = 20 + (techlevX(tech_no) / 2);
10116 techt_inuse(tech_no) = num + 1;
10117 pline("You're planning to write poison pen letters.");
10119 t_timeout = rnz(8000);
10120 break;
10122 case T_CORONATION_CULMINATION:
10123 nivellate();
10124 goodeffect();
10125 t_timeout = rnz(15000);
10126 break;
10128 case T_RESTORE_LIFE_LEVELS:
10130 if (u.ulevel < u.ulevelmax) {
10131 int attempts = 0;
10132 while ((u.ulevel < u.ulevelmax) && (attempts++ < 10000)) {
10133 gainlevelmaybe();
10135 Your("level has been restored.");
10136 } else {
10137 pline("Whoops! Apparently your experience level hasn't been drained, and therefore it can't be restored to its previous value either. Too bad.");
10140 t_timeout = rnz(20000);
10141 break;
10143 case T_TOILET_VISIT:
10145 antjeminigame();
10146 u.uhpmax++;
10147 if (Upolyd) u.mhmax++;
10148 Your("health is increased by one.");
10149 make_sick(0L, (char *) 0, TRUE, SICK_ALL);
10150 flags.botl = TRUE;
10152 t_timeout = rnz(5000);
10153 break;
10155 case T_MAKE_A_WISH:
10158 struct obj *uammo;
10159 struct obj *yourobj;
10160 uammo = mkobj(RANDOM_CLASS, TRUE, FALSE);
10161 char buf[BUFSZ];
10162 int attempts;
10163 long oldgold;
10165 if (!uammo) {
10166 pline("Something must have gone wrong. Sorry!");
10167 t_timeout = rnz(100000);
10168 break;
10171 You("have to take a guess! What's the item that was generated?");
10173 for (attempts = 0; attempts <= 5; attempts++) {
10175 if (attempts >= 5) {
10176 pline("%s", thats_enough_tries);
10177 goto mkwsh_end;
10180 getlin("Your guess:", buf);
10182 if (buf[0] == 0) continue;
10183 oldgold = u.ugold;
10184 yourobj = readobjnam(buf, (struct obj *)0, TRUE, FALSE);
10185 if (u.ugold != oldgold) {
10186 pline("Don't you date cheat me again! -- Your fault!");
10187 /* Make them pay */
10188 u.ugold = oldgold / 2;
10189 continue;
10191 if (yourobj == &zeroobj || yourobj == (struct obj *) 0) {
10192 pline("That doesn't exist.");
10193 continue;
10196 if (yourobj && (yourobj->otyp == uammo->otyp)) {
10197 uammo->owt = weight(uammo);
10198 dropy(uammo);
10199 stackobj(uammo);
10200 pline("Yes!!! You successfully guessed the object! It can now be found on the ground.");
10201 break;
10202 } else if (yourobj && (yourobj->oclass == uammo->oclass)) {
10203 bad_artifact();
10204 pline("Sorry, you had the right item class but not the right type. The item we were looking for was %s.", xname(uammo));
10205 delobj(uammo);
10206 break;
10208 } else {
10209 bad_equipment(0);
10210 pline("Sorry, your guess was completely wrong. The item we were looking for was %s.", xname(uammo));
10211 delobj(uammo);
10212 break;
10218 mkwsh_end:
10219 t_timeout = rnz(100000);
10220 break;
10222 case T_VENOM_MIXING:
10226 struct obj *uammo;
10227 uammo = mksobj(rn2(2) ? BLINDING_VENOM : ACID_VENOM, TRUE, FALSE, FALSE);
10228 if (uammo) {
10229 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
10230 uammo->quan = 30 + techlevX(tech_no);
10231 uammo->owt = weight(uammo);
10232 dropy(uammo);
10233 stackobj(uammo);
10234 pline("A stack of venoms has been dropped on the ground.");
10239 t_timeout = rnz(15000);
10240 break;
10242 case T_JAVELIN_FORGING:
10246 struct obj *uammo;
10247 uammo = mksobj(rnd_class(JAVELIN, STACK_JAVELIN), TRUE, FALSE, FALSE);
10248 if (uammo) {
10249 uammo->known = uammo->dknown = uammo->bknown = uammo->rknown = 1;
10250 dropy(uammo);
10251 stackobj(uammo);
10252 pline("A javelin was forged!");
10257 t_timeout = rnz(10000);
10258 break;
10260 case T_BALLSLIFF:
10262 if (!uwep) {
10263 You("can't use this technique without a weapon!");
10264 return(0);
10267 if (uwep && uwep->oclass != BALL_CLASS) {
10268 You("aren't wielding a ball!");
10269 return(0);
10272 You("try to repair your ball...");
10273 if (!uwep->oeroded && !uwep->oeroded2) pline("But it wasn't damaged to begin with.");
10275 if (uwep->oeroded > 0) {
10276 uwep->oeroded--;
10278 if (uwep->oeroded2 > 0) {
10279 uwep->oeroded2--;
10282 t_timeout = rnz(20000);
10284 break;
10286 case T_POLE_MELEE:
10287 num = 100 + (techlevX(tech_no) * 5);
10288 if (Race_if(PM_HUMANOID_CENTAUR)) num *= 10;
10289 techt_inuse(tech_no) = num + 1;
10290 pline("For a while, your polearms and lances are effective in melee range.");
10291 t_timeout = rnz(5000);
10292 break;
10294 case T_CHOP_CHOP:
10296 if (!uwep) {
10297 You("can't use this technique without a weapon!");
10298 return(0);
10301 if (uwep && weapon_type(uwep) != P_AXE) {
10302 pline("That only works if your wielded weapon is an axe, and currently it's not!");
10303 return 0;
10307 register struct monst *nexusmon, *nextmon;
10309 for(nexusmon = fmon; nexusmon; nexusmon = nextmon) {
10310 nextmon = nexusmon->nmon; /* trap might kill mon */
10311 if (DEADMONSTER(nexusmon)) continue;
10313 if (!monnear(nexusmon, u.ux, u.uy)) continue;
10314 You("chop %s!", mon_nam(nexusmon));
10315 wakeup(nexusmon); /* monster becomes hostile */
10316 if (bigmonst(nexusmon->data)) hurtmon(nexusmon, (objects[uwep->otyp].oc_wldam) + ((uwep->spe > 0) ? uwep->spe : 0));
10317 else hurtmon(nexusmon, (objects[uwep->otyp].oc_wsdam) + ((uwep->spe > 0) ? uwep->spe : 0));
10321 t_timeout = rnz(7500);
10322 break;
10324 case T_BANISHMENT:
10325 if (!getdir((char *)0)) return 0;
10326 if (!u.dx && !u.dy) {
10327 pline("Nah. You can't use that on yourself. You'll have to target a monster instead.");
10328 return 0;
10330 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
10331 pline("Invalid target location.");
10332 return 0;
10334 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
10335 if (!mtmp) {
10336 pline("That was a waste, man. The target square didn't contain a monster!");
10337 } else {
10338 u_teleport_monB(mtmp, TRUE);
10341 t_timeout = rnz(50000);
10343 break;
10345 case T_PARTICIPATION_LOSS:
10347 if (!getdir((char *)0)) return 0;
10348 if (!u.dx && !u.dy) {
10349 char buf[BUFSZ];
10350 pline("Do you REALLY want to do that???");
10351 getlin ("If you answer yes now, you lose the game! [yes/no]",buf);
10352 (void) lcase (buf);
10353 if (!(strcmp (buf, "yes"))) {
10354 u.youaredead = 1;
10355 u.youarereallydead = 1;
10356 killer = "being wiped from existence";
10357 killer_format = KILLED_BY;
10358 done(DIED);
10359 pline("Unfortunately, you still don't exist anymore.");
10360 done(DIED);
10361 done(ESCAPED); /* you don't get to escape from this death! --Amy */
10366 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
10367 pline("Invalid target location.");
10368 return 0;
10370 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
10371 if (!mtmp) {
10372 pline("That was a waste, man. The target square didn't contain a monster!");
10373 } else if (mtmp->isminion == 0 && !is_infrastructure_monster(mtmp) && mtmp->isgyp == 0
10374 && mtmp->mnum != quest_info(MS_NEMESIS) && !(mtmp->data->geno & G_UNIQ) ) {
10375 mongone(mtmp);
10376 pline("*poof*");
10377 } else {
10378 pline("Dude you're such a noob who apparently doesn't read descriptions or you'd have known that this particular monster is immune.");
10381 t_timeout = rnz(250000);
10383 break;
10385 case T_WEAPON_BLOCKER:
10386 if (!u.twoweap || !uwep || !uswapwep) {
10387 pline("You need to be wielding two weapons at the same time for that!");
10388 return(0);
10391 num = 100 + (techlevX(tech_no) * 5);
10392 techt_inuse(tech_no) = num + 1;
10393 pline("Your weapons become capable of blocking attacks.");
10394 t_timeout = rnz(3000);
10395 break;
10397 case T_EXTRA_MEMORY:
10399 extramemory(); /* spell.c */
10400 t_timeout = rnz(20000);
10401 break;
10403 case T_GRAP_SWAP:
10404 num = 1000 + (techlevX(tech_no) * 50);
10405 techt_inuse(tech_no) = num + 1;
10406 pline("For a while, your grinders will work like lances while your lances will work like grinders.");
10407 t_timeout = rnz(7000);
10408 break;
10410 case T_DIABOLIC_MINION:
10411 t_timeout = rnz(10000);
10414 struct permonst *shoe = 0;
10415 int attempts = 0;
10416 struct monst *shoemonst;
10418 do {
10419 shoe = rndmonst();
10420 attempts++;
10421 if (attempts && (attempts % 10000 == 0)) u.mondiffhack++;
10422 if (!rn2(2000)) reset_rndmonst(NON_PM);
10424 } while ( (!shoe || (shoe && !is_diablomonster(shoe))) && attempts < 50000);
10426 if (shoe && is_diablomonster(shoe) ) {
10427 pline("You summoned some diabolic monster!");
10428 shoemonst = makemon(shoe, u.ux, u.uy, NO_MM_FLAGS);
10429 if (shoemonst) (void) tamedog(shoemonst, (struct obj *) 0, TRUE);
10430 } else if (shoe) {
10431 pline("Some weirdness caused a different monster to appear. It's not what you expected.");
10432 shoemonst = makemon(shoe, u.ux, u.uy, NO_MM_FLAGS);
10433 if (shoemonst) (void) tamedog(shoemonst, (struct obj *) 0, TRUE);
10434 } else pline("It seems that the world of Sanctuary has run out of monsters.");
10436 u.mondiffhack = 0;
10438 break;
10440 case T_UNDERTOW:
10441 if (!getdir((char *)0)) return 0;
10442 if (u.uswallow) {
10443 pline("You're way too busy right now!");
10444 return (0);
10446 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
10447 pline("It seems that you're in a location where you're not allowed to be...");
10448 return (0);
10450 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
10451 pline("You try to drown an invisible barrier, which fails (predictably).");
10452 /* make the player pay for the attempt --Amy */
10453 t_timeout = rnz(8000);
10454 break;
10456 if (levl[u.ux][u.uy].typ != POOL && levl[u.ux][u.uy].typ != MOAT && levl[u.ux][u.uy].typ != WATER && levl[u.ux][u.uy].typ != WATERTUNNEL && levl[u.ux][u.uy].typ != CRYSTALWATER && levl[u.ux + u.dx][u.uy + u.dy].typ != POOL && levl[u.ux + u.dx][u.uy + u.dy].typ != MOAT && levl[u.ux + u.dx][u.uy + u.dy].typ != WATER && levl[u.ux + u.dx][u.uy + u.dy].typ != WATERTUNNEL && levl[u.ux + u.dx][u.uy + u.dy].typ != CRYSTALWATER) {
10457 pline("You can't drown someone here!");
10458 return (0);
10461 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
10462 if (!mtmp) {
10463 You("grasp at nothing.");
10464 /* splicehack would return 0 here, but I won't let you use the tech to
10465 * scan the area for monsters --Amy */
10466 t_timeout = rnz(8000);
10467 break;
10469 if (!sticks(mtmp->data)) {
10470 u.ustuck = mtmp;
10471 pline("You wrap up %s with your tail and pull him/her/them/it into the depths with you!", Monnam(mtmp));
10472 if (!is_swimmer(mtmp->data) && !amphibious(mtmp->data)) {
10473 You("attempt to drown %s...", mon_nam(mtmp));
10474 hurtmon(mtmp, (!rn2(5) && (techlevX(tech_no) > mtmp->m_lev) && (techlevX(tech_no) >= 10)) ? mtmp->mhp : (rnd(techlevX(tech_no)) * 5) );
10475 } else {
10476 pline("%s does not drown!", Monnam(mtmp));
10478 if (mtmp && !DEADMONSTER(mtmp)) wakeup(mtmp); /* monster becomes hostile */
10479 } else {
10480 You("cannot get a grip on %s!", mon_nam(mtmp));
10483 t_timeout = rnz(8000);
10484 break;
10486 case T_DEFINALIZE:
10488 if (CannotSelectItemsInPrompts) break;
10489 definalizechoice:
10490 otmp = getobj(allnoncount, "definalize");
10491 if (!otmp) {
10492 if (yn("Really exit with no object selected?") == 'y')
10493 pline("You just wasted the opportunity to definalize an item.");
10494 else goto definalizechoice;
10495 pline("A feeling of loss comes over you.");
10496 break;
10499 if (otmp) {
10500 if (!otmp->finalcancel) {
10501 pline("That item wasn't finalized, and therefore nothing happens.");
10502 } else if (!stack_too_big(otmp)) {
10503 otmp->finalcancel = FALSE;
10504 pline("%s is no longer finalized.", Yname2(otmp));
10505 if (otmp && objects[(otmp)->otyp].oc_material == MT_CELESTIUM && !stack_too_big(otmp)) {
10506 if (!otmp->cursed) bless(otmp);
10507 else uncurse(otmp, FALSE);
10509 } else pline("The stack was too big, and therefore nothing happens.");
10513 t_timeout = rnz(50000);
10514 break;
10516 case T_ANTI_INERTIA:
10517 if (!u.inertia) You("weren't slowed by inertia and therefore nothing happens.");
10518 else {
10519 if (u.inertia < 200) {
10520 u.inertia -= 100;
10521 if (u.inertia < 0) u.inertia = 0;
10522 Your("inertia counter was reduced by 100.");
10523 if (!u.inertia) pline("You've been cured of inertia.");
10524 } else if (u.inertia < 1000) {
10525 u.inertia /= 2;
10526 Your("inertia counter was reduced, and amounts to %d turns now.", u.inertia);
10527 } else {
10528 u.inertia -= 500;
10529 Your("inertia counter was reduced by 500.");
10532 if (u.inertia < 0) u.inertia = 0; /* fail safe */
10534 t_timeout = rnz(5000);
10535 break;
10537 case T_POWERBIOSIS:
10539 if (!uactivesymbiosis) {
10540 pline("Without a symbiote, this technique won't do anything.");
10541 break;
10544 num = 50 + (techlevX(tech_no) * 2);
10545 techt_inuse(tech_no) = num + 1;
10546 pline("Your symbiote becomes super-powerful for a while!");
10548 t_timeout = rnz(6000);
10549 break;
10551 case T_IMPLANTED_SYMBIOSIS:
10553 if (!uactivesymbiosis && !uimplant) {
10554 pline("You know that this technique requires both an implant and a symbiote. You currently have neither, and therefore very obviously nothing happens!");
10555 break;
10557 if (!uactivesymbiosis) {
10558 pline("While you do have an implant, you lack a symbiote! Get one first if you want to use this technique!");
10559 break;
10561 if (!uimplant) {
10562 pline("No implant found! You must equip one if you want to use this technique!");
10563 break;
10566 num = 1000 + (techlevX(tech_no) * 50);
10567 techt_inuse(tech_no) = num + 1;
10568 pline("Your implant boosts your symbiote!");
10570 t_timeout = rnz(7500);
10571 break;
10573 case T_ASSUME_SYMBIOTE:
10575 if (!uactivesymbiosis) {
10576 pline("What are you trying to do, polymorph into your symbiote while not actually having one?");
10577 if (FunnyHallu) pline("If you thought this would turn you into a missingno, bad luck - the dev team thinks of everything.");
10578 break;
10581 You_feel("one with your symbiote.");
10582 u.wormpolymorph = u.usymbiote.mnum;
10584 polyself(FALSE);
10586 t_timeout = rnz(10000);
10587 break;
10589 case T_GENERATE_OFFSPRING:
10591 if (!uactivesymbiosis) {
10592 pline("This requires a symbiote.");
10593 break;
10597 struct obj *uegg;
10599 You("lay a symbiote egg.");
10600 uegg = mksobj(EGG, FALSE, FALSE, FALSE);
10601 if (uegg) {
10602 uegg->spe = 1; /* "laid by you" */
10603 uegg->quan = 1;
10604 uegg->owt = weight(uegg);
10605 uegg->corpsenm = egg_type_from_parent(u.usymbiote.mnum, FALSE);
10606 uegg->known = uegg->dknown = 1;
10607 attach_egg_hatch_timeout(uegg);
10608 dropy(uegg);
10609 stackobj(uegg);
10613 t_timeout = rnz(10000);
10615 break;
10617 case T_EXTRACHARGE:
10619 if (CannotSelectItemsInPrompts) break;
10620 extrachargechoice:
10621 otmp = getobj(allnoncount, "extracharge");
10622 if (!otmp) {
10623 if (yn("Really exit with no object selected?") == 'y')
10624 pline("You just wasted the opportunity to extracharge a wand.");
10625 else goto extrachargechoice;
10626 pline("A feeling of loss comes over you.");
10627 t_timeout = rnz(20000);
10628 break;
10630 if (otmp) {
10631 if (otmp->oclass != WAND_CLASS) {
10632 pline("You selected something that isn't a wand, and therefore the charge dissipates.");
10633 t_timeout = rnz(20000);
10634 break;
10635 } else {
10636 switch (otmp->otyp) {
10638 case WAN_WISHING:
10639 case WAN_CHARGING:
10640 case WAN_ACQUIREMENT:
10641 case WAN_GAIN_LEVEL:
10642 case WAN_INCREASE_MAX_HITPOINTS:
10643 pline("That wand is too powerful, and therefore the charge dissipates.");
10644 t_timeout = rnz(20000);
10645 break;
10646 default:
10647 if (otmp->spe > 125) { /* very unlikely to ever happen --Amy */
10648 pline("That wand already has the maximum amount of charges stored.");
10649 } else {
10650 otmp->spe++;
10651 pline("Success! Your wand gained an additional charge.");
10652 if (otmp && objects[(otmp)->otyp].oc_material == MT_CELESTIUM && !stack_too_big(otmp)) {
10653 if (!otmp->cursed) bless(otmp);
10654 else uncurse(otmp, FALSE);
10661 t_timeout = rnz(20000);
10662 break;
10664 case T_ZAP_EM:
10668 if (u.uswallow) {
10669 pline("You can't tame an engulfer with this technique.");
10670 return 0;
10673 int k, l, caughtX;
10674 struct monst *mtmp3;
10675 caughtX = 0;
10676 pline("You try to tame evil monsters!");
10678 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
10679 if (!isok(u.ux + k, u.uy + l)) continue;
10680 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
10681 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(mtmp3->data->geno & G_UNIQ) && caughtX == 0)
10685 if (is_evilpatchmonster(mtmp3->data)) {
10686 if (!(resist(mtmp3, RING_CLASS, 0, NOTELL) && resist(mtmp3, RING_CLASS, 0, NOTELL))) {
10687 pline("%s is successfully tamed!", mon_nam(mtmp3));
10688 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
10689 if (techlevX(tech_no) < rnd(100)) caughtX++;
10690 t_timeout = rnz(4000);
10692 } else if ( ((rnd(30 - ACURR(A_CHA))) < 4) && (!resist(mtmp3, RING_CLASS, 0, NOTELL) || !resist(mtmp3, RING_CLASS, 0, NOTELL)) ) {
10693 pline("%s is successfully tamed!", mon_nam(mtmp3));
10694 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
10695 if (techlevX(tech_no) < rnd(100)) caughtX++;
10696 t_timeout = rnz(4000);
10697 } else {
10698 pline("%s resists the taming attempt!", mon_nam(mtmp3));
10700 } else pline("%s cannot be tamed by this method!", mon_nam(mtmp3));
10702 } /* monster is catchable loop */
10703 } /* for loop */
10707 t_timeout = rnz(4000);
10708 break;
10710 case T_DECAPABILITY:
10711 num = 50 + (techlevX(tech_no) * 3);
10712 techt_inuse(tech_no) = num + 1;
10713 pline("Polearms and lightsabers can temporarily put monsters to sleep.");
10715 t_timeout = rnz(2500);
10716 break;
10718 case T_NO_HANDS_CURSE:
10720 if (!uwep || !bimanual(uwep)) {
10721 pline("That requires you to wield a two-handed weapon.");
10722 break;
10725 if (uwep && uwep->cursed) {
10726 pline("Your weapon is already cursed, and therefore nothing happens!");
10727 uwep->bknown = TRUE;
10728 t_timeout = rnz(600);
10729 break;
10732 if (uwep && uwep->spe < -20) {
10733 pline("Your weapon is in such a bad condition that this technique doesn't work!");
10734 t_timeout = rnz(600);
10735 break;
10738 if (uwep) {
10739 curse(uwep);
10740 uwep->hvycurse = TRUE;
10741 if (uwep->spe > 0) uwep->spe = 0;
10742 uwep->spe -= rne(2);
10743 if (uwep->spe < -120) uwep->spe = -120;
10744 uwep->bknown = TRUE;
10746 pline("Your weapon is heavily cursed, but you receive some benefits.");
10747 change_luck(1);
10748 adjalign(100);
10749 if (u.ugangr > 0) u.ugangr--;
10750 u.ublesscnt -= 500;
10751 if (u.ublesscnt < 0) u.ublesscnt = 0;
10755 struct monst *mtmp3;
10756 int k, l;
10758 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
10759 if (!isok(u.ux + k, u.uy + l)) continue;
10760 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
10761 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(rn2(5) && (mtmp3->data->geno & G_UNIQ))) {
10763 if (mtmp3->mfrenzied) continue;
10764 if (mtmp3->mpeaceful) continue;
10765 if (resist(mtmp3, RING_CLASS, 0, NOTELL) && !(((rnd(30 - ACURR(A_CHA))) < 4) && !resist(mtmp3, RING_CLASS, 0, NOTELL)) ) continue;
10767 pline("%s is pacified!", mon_nam(mtmp3));
10768 mtmp3->mpeaceful = TRUE;
10770 } /* monster is catchable loop */
10775 t_timeout = rnz(6000);
10776 break;
10778 case T_HIGH_HEELED_SNEAKERS:
10779 num = 1000 + (techlevX(tech_no) * 20);
10780 techt_inuse(tech_no) = num + 1;
10781 pline("For a while, you can use high heels and sexy flats at the same time.");
10783 t_timeout = rnz(5000);
10784 break;
10786 case T_FORM_CHOICE:
10788 if (!uwep || !is_lightsaber(uwep)) {
10789 pline("You can only change the form of a wielded lightsaber.");
10790 break;
10794 boolean madechoice = 0;
10795 int sabertype = -1;
10797 pline("Pick the desired lightsaber form. The prompt will loop until you actually make a choice.");
10799 while (madechoice == 0 || sabertype < 0) {
10801 if (yn("Do you want to switch to a one-handed lightsaber?")=='y') {
10802 madechoice = 1; sabertype = 1; }
10803 else if (yn("Do you want to switch to a two-handed lightsaber?")=='y') {
10804 madechoice = 1; sabertype = 2; }
10805 else if (yn("Do you want to switch to a laser swatter?")=='y') {
10806 madechoice = 1; sabertype = 3; }
10807 else if (yn("Do you want to switch to a nano hammer?")=='y') {
10808 madechoice = 1; sabertype = 4; }
10809 else if (yn("Do you want to switch to a lightwhip?")=='y') {
10810 madechoice = 1; sabertype = 5; }
10811 else if (yn("Do you want to switch to an electric cigarette?")=='y') {
10812 madechoice = 1; sabertype = 6; }
10813 else if (yn("Do you want to switch to a laserdent?")=='y') {
10814 madechoice = 1; sabertype = 7; }
10815 else if (yn("Do you want to switch to a laser sword?")=='y') {
10816 madechoice = 1; sabertype = 8; }
10817 else if (yn("Do you want to switch to a sith staff?")=='y') {
10818 madechoice = 1; sabertype = 9; }
10819 else if (yn("Do you want to switch to a laser pole?")=='y') {
10820 madechoice = 1; sabertype = 10; }
10821 else if (yn("Do you want to switch to a starwars mace?")=='y') {
10822 madechoice = 1; sabertype = 11; }
10823 else if (yn("Do you want to switch to a beamsword?")=='y') {
10824 madechoice = 1; sabertype = 12; }
10825 else if (yn("Do you want to switch to a laserxbow?")=='y') {
10826 madechoice = 1; sabertype = 13; }
10827 else if (yn("Do you want to switch to a heavy laser ball?")=='y') {
10828 madechoice = 1; sabertype = 14; }
10829 else if (yn("Do you want to switch to a laser chain?")=='y') {
10830 madechoice = 1; sabertype = 15; }
10831 else if (yn("Do you want to switch to a laserfist?")=='y') {
10832 madechoice = 1; sabertype = 16; }
10833 else if (yn("Do you want to switch to a laser tin opener?")=='y') {
10834 madechoice = 1; sabertype = 17; }
10835 else if (yn("Do you want to switch to a kliusling?")=='y') {
10836 madechoice = 1; sabertype = 18; }
10837 else if (yn("Do you want to switch to a lighttorch?")=='y') {
10838 madechoice = 1; sabertype = 19; }
10839 else if (yn("Do you want to switch to a pink lightsword?")=='y') {
10840 madechoice = 1; sabertype = 20; }
10841 else if (yn("Do you want to switch to a laser flyaxe?")=='y') {
10842 madechoice = 1; sabertype = 21; }
10843 else if (yn("Do you want to switch to a pink double lightsword?")=='y') {
10844 madechoice = 1; sabertype = 22; }
10848 if (sabertype == 2 && (uarms || u.twoweap)) {
10849 pline("Something is blocking your second %s!", body_part(HAND));
10850 break;
10852 if (sabertype == 7 && (uarms || u.twoweap)) {
10853 pline("Something is blocking your second %s!", body_part(HAND));
10854 break;
10856 if (sabertype == 9 && (uarms || u.twoweap)) {
10857 pline("Something is blocking your second %s!", body_part(HAND));
10858 break;
10860 if (sabertype == 10 && (uarms || u.twoweap)) {
10861 pline("Something is blocking your second %s!", body_part(HAND));
10862 break;
10864 if (sabertype == 13 && (uarms || u.twoweap)) {
10865 pline("Something is blocking your second %s!", body_part(HAND));
10866 break;
10868 if (sabertype == 21 && (uarms || u.twoweap)) {
10869 pline("Something is blocking your second %s!", body_part(HAND));
10870 break;
10872 if (sabertype == 22 && (uarms || u.twoweap)) {
10873 pline("Something is blocking your second %s!", body_part(HAND));
10874 break;
10877 if (sabertype == 1) {
10878 switch (rnd(11)) {
10879 case 1: uwep->otyp = GREEN_LIGHTSABER; break;
10880 case 2: uwep->otyp = BLUE_LIGHTSABER; break;
10881 case 3: uwep->otyp = RED_LIGHTSABER; break;
10882 case 4: uwep->otyp = YELLOW_LIGHTSABER; break;
10883 case 5: uwep->otyp = VIOLET_LIGHTSABER; break;
10884 case 6: uwep->otyp = WHITE_LIGHTSABER; break;
10885 case 7: uwep->otyp = MYSTERY_LIGHTSABER; break;
10886 case 8: uwep->otyp = ORANGE_LIGHTSABER; break;
10887 case 9: uwep->otyp = BLACK_LIGHTSABER; break;
10888 case 10: uwep->otyp = RAINBOW_LIGHTSABER; break;
10889 case 11: uwep->otyp = DARK_LIGHTSABER; break;
10891 } else if (sabertype == 2) {
10892 uwep->otyp = !rn2(3) ? CYAN_DOUBLE_LIGHTSABER : rn2(2) ? RED_DOUBLE_LIGHTSABER : WHITE_DOUBLE_LIGHTSABER;
10893 } else if (sabertype == 3) {
10894 uwep->otyp = LASER_SWATTER;
10895 } else if (sabertype == 4) {
10896 uwep->otyp = NANO_HAMMER;
10897 } else if (sabertype == 5) {
10898 uwep->otyp = LIGHTWHIP;
10899 } else if (sabertype == 6) {
10900 uwep->otyp = ELECTRIC_CIGARETTE;
10901 } else if (sabertype == 7) {
10902 uwep->otyp = LASERDENT;
10903 } else if (sabertype == 8) {
10904 uwep->otyp = LASER_SWORD;
10905 } else if (sabertype == 9) {
10906 uwep->otyp = SITH_STAFF;
10907 } else if (sabertype == 10) {
10908 uwep->otyp = LASER_POLE;
10909 } else if (sabertype == 11) {
10910 uwep->otyp = STARWARS_MACE;
10911 } else if (sabertype == 12) {
10912 uwep->otyp = BEAMSWORD;
10913 } else if (sabertype == 13) {
10914 uwep->otyp = LASERXBOW;
10915 } else if (sabertype == 14) {
10916 uwep->otyp = HEAVY_LASER_BALL;
10917 } else if (sabertype == 15) {
10918 uwep->otyp = LASER_CHAIN;
10919 } else if (sabertype == 16) {
10920 uwep->otyp = LASERFIST;
10921 } else if (sabertype == 17) {
10922 uwep->otyp = LASER_TIN_OPENER;
10923 } else if (sabertype == 18) {
10924 uwep->otyp = KLIUSLING;
10925 } else if (sabertype == 19) {
10926 uwep->otyp = LIGHTTORCH;
10927 } else if (sabertype == 20) {
10928 uwep->otyp = PINK_LIGHTSWORD;
10929 } else if (sabertype == 21) {
10930 uwep->otyp = LASER_FLYAXE;
10931 } else /* sabertype == 22 */
10932 uwep->otyp = PINK_DOUBLE_LIGHTSWORD;
10934 pline("Your lightsaber warps, and changes into a different one!");
10935 /* known problem: you can pick the form that your lightsaber already has */
10938 t_timeout = rnz(2000);
10939 break;
10941 case T_STAR_DIGGING:
10942 stardigging();
10943 pline("Digging complete!");
10945 t_timeout = rnz(10000);
10946 break;
10948 case T_STARWARS_FRIENDS:
10952 if (u.uswallow) {
10953 pline("That won't work while engulfed.");
10954 return 0;
10957 int k, l, caughtX;
10958 struct monst *mtmp3;
10959 pline("You try to tame monsters!");
10961 for (k = -1; k <= 1; k++) for(l = -1; l <= 1; l++) {
10962 if (!isok(u.ux + k, u.uy + l)) continue;
10963 if ( ((mtmp3 = m_at(u.ux + k, u.uy + l)) != 0) && !is_infrastructure_monster(mtmp3) && mtmp3->mtame == 0 && mtmp3->isminion == 0 && mtmp3->isgyp == 0
10964 && mtmp3->mnum != quest_info(MS_NEMESIS) && !(mtmp3->data->geno & G_UNIQ) )
10968 if (mtmp3->data->mflags5 & M5_SPACEWARS || mtmp3->data->mflags5 & M5_JOKE) {
10969 if (!(resist(mtmp3, RING_CLASS, 0, NOTELL) && !(((rnd(30 - ACURR(A_CHA))) < 4) ) )) {
10970 pline("%s is successfully tamed!", mon_nam(mtmp3));
10971 (void) tamedog(mtmp3, (struct obj *) 0, TRUE);
10972 } else {
10973 pline("%s resists the taming attempt!", mon_nam(mtmp3));
10975 } else pline("%s cannot be tamed by this method!", mon_nam(mtmp3));
10977 } /* monster is catchable loop */
10978 } /* for loop */
10983 struct permonst *shoe = 0;
10984 int attempts = 0;
10985 struct monst *shoemonst;
10987 do {
10988 shoe = rndmonst();
10989 attempts++;
10990 if (attempts && (attempts % 10000 == 0)) u.mondiffhack++;
10991 if (!rn2(2000)) reset_rndmonst(NON_PM);
10993 } while ( (!shoe || (shoe && !(shoe->mflags5 & M5_SPACEWARS) && !(shoe->mflags5 & M5_JOKE))) && attempts < 50000);
10995 if (shoe) {
10996 shoemonst = makemon(shoe, u.ux, u.uy, NO_MM_FLAGS);
10997 if (shoemonst) (void) tamedog(shoemonst, (struct obj *) 0, TRUE);
10999 u.mondiffhack = 0;
11002 t_timeout = rnz(5000);
11003 break;
11005 case T_USE_THE_FORCE_LUKE:
11006 num = 200 + (techlevX(tech_no) * 5);
11007 techt_inuse(tech_no) = num + 1;
11008 pline("Alright Luke, you can use the force powerfully for a while now!");
11010 t_timeout = rnz(2500);
11011 break;
11013 case T_TELEKINESIS:
11015 coord cc;
11016 struct trap *ttrap;
11017 cc.x=u.ux;
11018 cc.y=u.uy;
11019 pline("Where do you want to apply telekinesis?");
11020 if (getpos(&cc, TRUE, "apply telekinesis where") < 0)
11021 return(0);
11022 if (!cansee(cc.x, cc.y)){
11023 You("can't see what's there!");
11024 return(0);
11026 if ((ttrap=t_at(cc.x, cc.y)) && ttrap->tseen &&
11027 yn("Handle the trap here?") == 'y'){
11028 if (yn("Disarm the trap?") == 'y'){
11029 techt_inuse(tech_no) = 1;
11030 /* copied from trap.c */
11031 switch(ttrap->ttyp) {
11032 case BEAR_TRAP:
11033 case WEB:
11034 t_timeout = rnz(250);
11035 return disarm_holdingtrap(ttrap);
11036 case LANDMINE:
11037 t_timeout = rnz(250);
11038 return disarm_landmine(ttrap);
11039 case SQKY_BOARD:
11040 t_timeout = rnz(250);
11041 return disarm_squeaky_board(ttrap);
11042 case DART_TRAP:
11043 t_timeout = rnz(250);
11044 return disarm_shooting_trap(ttrap, DART);
11045 case ARROW_TRAP:
11046 t_timeout = rnz(250);
11047 return disarm_shooting_trap(ttrap, ARROW);
11048 case RUST_TRAP:
11049 t_timeout = rnz(250);
11050 return disarm_rust_trap(ttrap);
11051 case FIRE_TRAP:
11052 t_timeout = rnz(250);
11053 return disarm_fire_trap(ttrap);
11054 default:
11055 You("cannot disable %s trap.", (u.dx || u.dy) ? "that" : "this");
11056 return 1;
11058 } else if(yn("Spring this trap?")=='y') {
11059 switch(ttrap->ttyp) {
11060 case LANDMINE:
11061 You("trigger the landmine.");
11062 pline("KABLAAAM!");
11063 blow_up_landmine(ttrap);
11064 fill_pit(cc.x, cc.y);
11065 newsym(cc.x, cc.y);
11066 t_timeout = rnz(250);
11067 break;
11068 case ROLLING_BOULDER_TRAP:
11070 int style = ROLL | (ttrap->tseen ? LAUNCH_KNOWN : 0);
11071 You("trigger the trap!");
11072 if(!launch_obj(BOULDER, ttrap->launch.x, ttrap->launch.y, ttrap->launch2.x, ttrap->launch2.y, style)){
11073 deltrap(ttrap);
11074 newsym(cc.x, cc.y);
11075 pline("But no boulder was released.");
11077 t_timeout = rnz(250);
11079 default:
11080 You("can't spring this trap.");
11081 return(0);
11084 } else if ((otmp = level.objects[cc.x][cc.y]) != 0) {
11085 char buf[BUFSZ];
11086 sprintf(buf, "Pick up %s?", the(xname(otmp)));
11087 if (yn(buf) == 'n')
11088 return(0);
11090 /* Shop items will interact incorrectly and maybe even segfault. Since I'm way too lazy to make it work
11091 * correctly, I'm simply 'sealing' this error by making such items off-limits for telekinesis --Amy */
11092 if (costly_spot(cc.x, cc.y)) {
11093 pline("This item is inside a telekinesis-proof shop. Your attempt to pick it up fails.");
11094 t_timeout = rnz(250);
11095 return(1);
11098 You("pick up an object from the %s.", surface(cc.x,cc.y));
11099 (void) pickup_object(otmp, Race_if(PM_LEVITATOR) ? otmp->quan : 1L, TRUE, FALSE);
11100 newsym(cc.x, cc.y);
11101 t_timeout = rnz(250);
11102 } else {
11103 You("can't do anything there");
11104 return(0);
11106 break;
11108 case T_CHARGE_SABER:
11109 if (!uwep || !is_lightsaber(uwep)){
11110 You("are not holding a lightsaber!");
11111 return(0);
11113 if (uwep && uwep->otyp == LIGHTTORCH) {
11114 pline("The lighttorch cannot be recharged that way!");
11115 return(0);
11117 if (u.uen < 5){
11118 You("lack the concentration to charge %s. You need at least 5 points of mana!", the(xname(uwep)));
11119 return(0);
11121 You("start charging %s.", the(xname(uwep)));
11122 delay=-10;
11123 set_occupation(charge_saber, "charging", 0);
11124 t_timeout = rnz(2500);
11125 break;
11126 default:
11127 pline ("Error! No such effect (%i)", tech_no);
11128 return(0);
11130 if (t_timeout >= 1) {
11131 register int timeoutamount = t_timeout;
11132 while (timeoutamount >= 1000) {
11133 timeoutamount -= 1000;
11134 use_skill(P_TECHNIQUES, 1);
11136 if (timeoutamount >= 1 && (timeoutamount > rn2(1000))) use_skill(P_TECHNIQUES, 1);
11137 u.cnd_techcount++;
11139 if (rn2(4) && (t_timeout > rnd(StrongExtra_wpn_practice ? 15000 : Extra_wpn_practice ? 25000 : 50000)) ) {
11140 maybeleveltech = TRUE;
11145 if (!PlayerCannotUseSkills) {
11147 switch (P_SKILL(P_TECHNIQUES)) {
11148 default: break;
11149 case P_BASIC:
11150 t_timeout *= 9;
11151 t_timeout /= 10;
11152 break;
11153 case P_SKILLED:
11154 t_timeout *= 8;
11155 t_timeout /= 10;
11156 break;
11157 case P_EXPERT:
11158 t_timeout *= 7;
11159 t_timeout /= 10;
11160 break;
11161 case P_MASTER:
11162 t_timeout *= 6;
11163 t_timeout /= 10;
11164 break;
11165 case P_GRAND_MASTER:
11166 t_timeout *= 5;
11167 t_timeout /= 10;
11168 break;
11169 case P_SUPREME_MASTER:
11170 t_timeout *= 4;
11171 t_timeout /= 10;
11172 break;
11176 if (!can_limitbreak())
11177 techtout(tech_no) = (t_timeout * (100 - min(techlevX(tech_no), 50)) / 100);
11178 else if (!rn2(3))
11179 techtout(tech_no) = (t_timeout * (100 - min(techlevX(tech_no), 50)) / 300);
11180 else if (!rn2(2))
11181 techtout(tech_no) = (t_timeout * (100 - min(techlevX(tech_no), 50)) / 1000);
11182 /* limit break can be used for endless exploits, so this fix was urgently necessary... --Amy */
11184 if (ishaxor && techtout(tech_no) > 1) techtout(tech_no) /= 2;
11186 if (RngeTechReuse && techtout(tech_no) > 1) { /* 10% reduction --Amy */
11187 techtout(tech_no) *= 9;
11188 techtout(tech_no) /= 10;
11191 if (u.emynluincomplete && techtout(tech_no) > 99) { /* 2% reduction --Amy */
11192 techtout(tech_no) *= 49;
11193 techtout(tech_no) /= 50;
11196 if (irisartiboost()) {
11197 techtout(tech_no) *= (100 - (irisartiboost() * 5));
11198 techtout(tech_no) /= 100;
11201 if (uamul && uamul->oartifact == ART_TYRANITAR_S_QUEST && !rn2(2)) techtout(tech_no) = 0;
11203 if (powerfulimplants() && uimplant && uimplant->oartifact == ART_NO_ABNORMAL_FUTURE) techtout(tech_no) /= 4;
11205 if (techid(tech_no) == T_ASIAN_KICK) {
11207 for (i = 0; i < MAXTECH; i++) {
11208 if (techid(i) == T_LEGSCRATCH_ATTACK || techid(i) == T_GROUND_STOMP || techid(i) == T_ATHLETIC_COMBAT )
11209 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11214 if (techid(tech_no) == T_LEGSCRATCH_ATTACK) {
11216 for (i = 0; i < MAXTECH; i++) {
11217 if (techid(i) == T_ASIAN_KICK || techid(i) == T_GROUND_STOMP || techid(i) == T_ATHLETIC_COMBAT )
11218 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11223 if (techid(tech_no) == T_GROUND_STOMP) {
11225 for (i = 0; i < MAXTECH; i++) {
11226 if (techid(i) == T_LEGSCRATCH_ATTACK || techid(i) == T_ASIAN_KICK || techid(i) == T_ATHLETIC_COMBAT )
11227 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11232 if (techid(tech_no) == T_ATHLETIC_COMBAT) {
11234 for (i = 0; i < MAXTECH; i++) {
11235 if (techid(i) == T_LEGSCRATCH_ATTACK || techid(i) == T_GROUND_STOMP || techid(i) == T_ASIAN_KICK )
11236 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11241 if (techid(tech_no) == T_AUTOKILL) {
11243 for (i = 0; i < MAXTECH; i++) {
11244 if (techid(i) == T_CHAIN_THUNDERBOLT || techid(i) == T_FLASHING_MISCHIEF )
11245 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11250 if (techid(tech_no) == T_CHAIN_THUNDERBOLT) {
11252 for (i = 0; i < MAXTECH; i++) {
11253 if (techid(i) == T_AUTOKILL || techid(i) == T_FLASHING_MISCHIEF )
11254 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11259 if (techid(tech_no) == T_FLASHING_MISCHIEF) {
11261 for (i = 0; i < MAXTECH; i++) {
11262 if (techid(i) == T_CHAIN_THUNDERBOLT || techid(i) == T_AUTOKILL )
11263 if (techtout(tech_no) > 10) techtout(i) += rn2(3) ? rnz(techtout(tech_no)) : rnd(techtout(tech_no));
11268 if (maybeleveltech) {
11269 if (tech_list[tech_no].t_lev > 0) {
11270 tech_list[tech_no].t_lev -= 1;
11271 pline("Your %s technique leveled up to level %d!", techname(tech_no), techlev(tech_no));
11275 /*By default, action should take a turn*/
11276 if (techid(tech_no) == T_DIRECTIVE) return 0;
11277 return(1);
11280 /* Whether or not a tech is in use.
11281 * 0 if not in use, turns left if in use. Tech is done when techinuse == 1
11284 tech_inuse(tech_id)
11285 int tech_id;
11287 int i;
11289 if (tech_id < 1 || tech_id > MAXTECH) {
11290 impossible ("invalid tech: %d", tech_id);
11291 return(0);
11293 for (i = 0; i < MAXTECH; i++) {
11294 if (techid(i) == tech_id) {
11295 return (techt_inuse(i));
11298 return (0);
11301 static void
11302 maybe_tameX(mtmp)
11303 struct monst *mtmp;
11305 (void) tamedog(mtmp, (struct obj *) 0, TRUE);
11309 void
11310 tech_timeout()
11312 int i;
11314 for (i = 0; i < MAXTECH; i++) {
11315 if (techid(i) == NO_TECH)
11316 continue;
11318 if (techid(i) == T_SILENT_OCEAN) {
11319 if (techt_inuse(i) == 10) pline("Attention: The effect of Silent Ocean will only last for 10 more turns. If you can't exist in water without it, consider heading to the nearest shore.");
11320 if (techt_inuse(i) == 2) pline("Caution! Silent Ocean will end in 2 turns! If you're currently in the water and can't exist in water without the effect of Silent Ocean, you should get back on dry land quickly in order to prevent drowning!");
11323 if (techt_inuse(i) && !(techid(i) == T_UNARMED_FOCUS && !rn2(4) && !uwep && !(u.twoweap && uswapwep) && uarm && uarm->otyp == ROBE_OF_FOCUSSING ) ) {
11324 /* Check if technique is done */
11325 if (!(--techt_inuse(i)))
11326 switch (techid(i)) {
11327 case T_EVISCERATE:
11328 You("retract your claws.");
11329 /* You're using bare hands now, so new msg for next attack */
11330 unweapon=TRUE;
11331 /* Lose berserk status */
11332 repeat_hit = 0;
11333 break;
11334 case T_BERSERK:
11335 The("red haze in your mind clears.");
11336 break;
11337 case T_KIII:
11338 You("calm down.");
11339 break;
11340 case T_FLURRY:
11341 You("relax.");
11342 break;
11343 case T_DOUBLE_THROWNAGE:
11344 You("relax.");
11345 break;
11346 case T_E_FIST:
11347 You_feel("the power dissipate.");
11348 break;
11349 case T_SPECTRAL_SWORD:
11350 You_feel("your weapon losing its elemental power.");
11351 break;
11352 case T_SIGIL_TEMPEST:
11353 pline_The("sigil of tempest fades.");
11354 break;
11355 case T_SIGIL_CONTROL:
11356 pline_The("sigil of control fades.");
11357 break;
11358 case T_SIGIL_DISCHARGE:
11359 pline_The("sigil of discharge fades.");
11360 break;
11361 case T_RAGE:
11362 Your("anger cools.");
11363 break;
11364 case T_SHUT_THAT_BITCH_UP:
11365 You("can no longer shut up bitches.");
11366 break;
11367 case T_EXTRA_LONG_SQUEAK:
11368 pline("Your butt has stopped squeaking.");
11369 break;
11370 case T_BULLETREUSE:
11371 pline("Your ammo can no longer be reused.");
11372 break;
11373 case T_CONCENTRATING:
11374 You("stop concentrating.");
11375 break;
11376 case T_SHIELD_BASH:
11377 You("pull back your shield.");
11378 break;
11379 case T_EDDY_WIND:
11380 You("stop whirling.");
11381 break;
11382 case T_IRON_SKIN:
11383 Your("skin is no longer hard as iron.");
11384 break;
11385 case T_POWER_SURGE:
11386 pline_The("awesome power within you fades.");
11387 break;
11388 case T_BLINK:
11389 You("sense the flow of time returning to normal.");
11390 break;
11391 case T_CHI_STRIKE:
11392 You_feel("the power in your hands dissipate.");
11393 break;
11394 case T_SPELL_SPAM:
11395 You_feel("that the spell spam power has timed out.");
11396 break;
11397 case T_CHI_HEALING:
11398 You_feel("the healing power dissipate.");
11399 break;
11400 case T_SILENT_OCEAN:
11401 pline("The effect of Silent Ocean ends.");
11402 break;
11403 case T_GLOWHORN:
11404 pline("The glowing unicorn horn disappears.");
11405 break;
11406 case T_ENERGY_CONSERVATION:
11407 pline("Your lightsaber consumes energy at the normal rate again.");
11408 break;
11409 case T_UNARMED_FOCUS:
11410 pline("You're no longer focussing on unarmed combat.");
11411 break;
11412 case T_WILD_SLASHING:
11413 pline("You stop your wild slashing.");
11414 break;
11415 case T_ABSORBER_SHIELD:
11416 pline("The absorber shield dissipates.");
11417 break;
11418 case T_STEADY_HAND:
11419 pline("Your %s are less steady.", makeplural(body_part(HAND)));
11420 break;
11421 case T_BEAMSWORD:
11422 pline("Your lightsaber can no longer fire beams.");
11423 break;
11424 case T_ENERGY_TRANSFER:
11425 pline("The energy transfer has stopped.");
11426 break;
11427 case T_POWERFUL_AURA:
11428 pline("You're no longer surrounded by the powerful aura.");
11429 break;
11430 case T_REFUGE:
11431 pline("The refuge effect has ended.");
11432 break;
11433 case T_ESCROBISM:
11434 pline("Escrobism is no longer active.");
11435 break;
11436 case T_GREEN_MISSILE:
11437 pline("You ran out of wood for your poisonous missiles.");
11438 break;
11439 case T_BIG_N_VEINY:
11440 pline("Your body is no longer poisonous.");
11441 break;
11442 case T_POISON_PEN_LETTER:
11443 pline("You're done writing your poison pen letters, gotta conserve the ink after all.");
11444 break;
11445 case T_AFTERBURNER:
11446 pline("Your afterburner is depleted.");
11447 break;
11448 case T_BUGGARD:
11449 pline("Damn, the buggard effect has ended already! Curse those developers that made its duration so short relative to its long timer!");
11450 break;
11451 case T_THUNDERSTORM:
11452 pline("Your thunderstorm flashes for one last time and ceases.");
11453 break;
11454 case T_BLADE_SHIELD:
11455 pline("Blade shield effect has ended. At least now it no longer disrupts your attacks.");
11456 break;
11457 case T_POLE_MELEE:
11458 pline("Your polearms and lances are no longer effective at close range.");
11459 break;
11460 case T_WEAPON_BLOCKER:
11461 pline("Thankfully, weapon blocker is temporary here and has just ended. You got very annoyed by the block lock effect anyway.");
11462 break;
11463 case T_GRAP_SWAP:
11464 pline("The effects of your grinders and lances are no longer swapped.");
11465 break;
11466 case T_LIGHTER_BALLS:
11467 Your("balls are heavy again.");
11468 if (FunnyHallu) pline("Now's the time to present them to a sweet girl, who can kick them to test your pain threshold.");
11469 break;
11470 case T_POWERBIOSIS:
11471 pline("Your symbiote's awesome power fades.");
11472 break;
11473 case T_IMPLANTED_SYMBIOSIS:
11474 pline("The boost granted to your symbiote by your implant has been used up.");
11475 break;
11476 case T_PIRATE_BROTHERING:
11477 pline("Your pirate brothering ability deactivates.");
11478 break;
11479 case T_DECAPABILITY:
11480 pline("Your weapons are no longer capable of decapability.");
11481 break;
11482 case T_HIGH_HEELED_SNEAKERS:
11483 pline("You can no longer use the sexy flats skill while wearing high heels.");
11484 break;
11485 case T_SPRINT:
11486 pline("Your sprint ends.");
11487 break;
11488 case T_SKULL_CRUSH:
11489 pline("You waited too long, and can no longer crush an opponent's skull!");
11490 break;
11491 case T_FEMALE_COMBO:
11492 pline("Your female combo has ended.");
11493 break;
11494 case T_DOCKLOCK:
11495 pline("You're done bashing enemies' heads with your heels.");
11496 break;
11497 case T_SEXY_STAND:
11498 pline("You've finished your sexy stand.");
11499 break;
11500 case T_MARATHON:
11501 pline("You've been running for far too long, and decide that you need a rest.");
11502 break;
11503 case T_PERFUME_STRIDE:
11504 pline("Finally, you can take your heels off again. Beware that unless you uncursed them, you probably still can't.");
11505 break;
11506 case T_NAUGHTY_HEELOT:
11507 pline("You're done playing the naughty heelot.");
11508 break;
11509 case T_EXTREME_STURDINESS:
11510 pline("Your GOI has expired. Or, in human-readable terms, your extreme sturdiness ends and you need to be more careful again.");
11511 break;
11512 case T_BUTT_PROTECTION:
11513 pline("Your butt is no longer protected.");
11514 break;
11515 case T_HEEL_STAB:
11516 pline("You can no longer stab enemies with your heel.");
11517 break;
11518 case T_USE_THE_FORCE_LUKE:
11519 pline("Sorry Luke, but you can no longer use the force with extra effectivity.");
11520 break;
11521 case T_SURRENDER_OR_DIE:
11522 pline("Cutting an opponent's weapon no longer has special effects.");
11523 break;
11524 case T_PERILOUS_WHIRL:
11525 pline("Your double lightsaber no longer drains life.");
11526 break;
11527 case T_STAT_RESIST:
11528 pline("You no longer resist status effects.");
11529 break;
11530 case T_FORCE_FIELD:
11531 pline("The force field dissipates.");
11532 break;
11533 case T_WHIRLSTAFF:
11534 pline("Your staff no longer attacks as quickly as before.");
11535 break;
11536 case T_BEAUTY_CHARM:
11537 pline("You're done posing with your heels.");
11538 break;
11539 case T_ASIAN_KICK:
11540 pline("You waited too long and now the opportunity to smash an enemy's nuts with your stilettos is no longer there... :(");
11541 break;
11542 case T_LEGSCRATCH_ATTACK:
11543 pline("Your sexy cone heels are done scratching hostile shins. They sure drew a lot of blood, and you feel that they're very pleased!");
11544 break;
11545 case T_GROUND_STOMP:
11546 pline("Your wedge heels are done stomping defenseless enemies. It was a lot of fun, and your heels love you for using them as deadly weapons!");
11547 break;
11548 case T_ATHLETIC_COMBAT:
11549 pline("Wow, you're so athletic, it's amazing watching you aim high kicks at your enemies' heads with your block heels. But now it's time to relax. I'm fairly sure your fleecy block heels like you even more now!");
11550 break;
11551 case T_OVER_RAY:
11552 pline("Your rays have the normal range again.");
11553 break;
11554 case T_JOKERBANE:
11555 pline("Your boomerangs are no longer capable of paralyzing enemies.");
11556 break;
11557 case T_COMBO_STRIKE:
11558 pline("Your combo has ended.");
11559 break;
11560 case T_JIU_JITSU:
11561 pline("You stop using jiu-jitsu.");
11562 break;
11563 case T_BLADE_ANGER:
11564 pline("Your shuriken are no longer capable of piercing.");
11565 break;
11566 default:
11567 break;
11568 } else switch (techid(i)) {
11569 /* During the technique */
11570 case T_RAGE:
11571 /* Bleed but don't kill */
11572 if (u.uhpmax > 1) u.uhpmax--;
11573 if (u.uhp > 1) u.uhp--;
11574 if (Upolyd) {
11575 if (u.mhmax > 1) u.uhpmax--;
11576 if (u.mh > 1) u.uhp--;
11578 break;
11579 case T_POWER_SURGE:
11580 /* Bleed off power. Can go to zero as 0 power is not fatal */
11581 if (u.uenmax > 1) u.uenmax--;
11582 if (u.uen > 0) u.uen--;
11583 break;
11584 default:
11585 break;
11587 } /* technique active check */
11589 if (techtout(i) == 1) pline("Your %s technique is ready to be used!", techname(i));
11590 if (techtout(i) > 0) {
11591 if (!(uarmf && uarmf->oartifact == ART_THICKER_THAN_THE_HEAD && rn2(2) && (techtout(i) > 1) ) )
11592 techtout(i)--;
11594 if (uarmc && uarmc->oartifact == ART_ARTIFICIAL_FAKE_DIFFICULTY && techtout(i) > 0) {
11595 if (techtout(i) == 1) pline("Your %s technique is ready to be used!", techname(i));
11596 techtout(i)--;
11599 if (techtout(i) < 0) techtout(i) = 0; /* fail safe */
11603 void
11604 docalm()
11606 int i, tech, n = 0;
11608 for (i = 0; i < MAXTECH; i++) {
11609 tech = techid(i);
11610 if (tech != NO_TECH && techt_inuse(i)) {
11611 aborttech(tech);
11612 n++;
11615 if (n)
11616 You("calm down.");
11619 /* occasionally things will cause certain techs to end prematurely --Amy */
11620 void
11621 stopsingletechnique(whichtech)
11622 int whichtech;
11624 int i, tech;
11626 for (i = 0; i < MAXTECH; i++) {
11627 tech = techid(i);
11628 if (tech != NO_TECH && techt_inuse(i) && tech == whichtech) {
11629 aborttech(tech);
11635 void
11636 hurtmon(mtmp, tmp)
11637 struct monst *mtmp;
11638 int tmp;
11640 mtmp->mhp -= tmp;
11641 if (mtmp->mhp < 1) killed (mtmp);
11642 #ifdef SHOW_DMG
11643 else showdmg(tmp);
11644 #endif
11647 static const struct innate_tech *
11648 role_tech()
11650 if (Race_if(PM_YUGGER)) return ((struct innate_tech *) 0); /* none */
11652 switch (Role_switch) {
11653 case PM_ARCHEOLOGIST: return (arc_tech);
11654 case PM_GOFF: return (gof_tech);
11655 case PM_DRUID: return (drd_tech);
11656 case PM_SOFTWARE_ENGINEER: return (sof_tech);
11657 case PM_CRACKER: return (cra_tech);
11658 case PM_STORMBOY: return (sto_tech);
11659 case PM_SPACE_MARINE: return (sma_tech);
11660 case PM_JANITOR: return (jan_tech);
11661 case PM_FIREFIGHTER: return (fir_tech);
11662 case PM_YAUTJA: return (yau_tech);
11663 case PM_JOCKEY: return (joc_tech);
11664 case PM_GAMER: return (gam_tech);
11665 case PM_GLADIATOR: return (gla_tech);
11666 case PM_AMAZON: return (ama_tech);
11667 case PM_ARTIST: return (art_tech);
11668 case PM_ALTMER: return (alt_tech);
11669 case PM_BOSMER: return (bos_tech);
11670 case PM_BULLY: return (bul_tech);
11671 case PM_DUNMER: return (dun_tech);
11672 case PM_STAND_USER: return (sta_tech);
11673 case PM_ORDINATOR: return (ord_tech);
11674 case PM_THALMOR: return (tha_tech);
11675 case PM_DRUNK: return (dru_tech);
11676 case PM_BARBARIAN: return (bar_tech);
11677 case PM_NOOB_MODE_BARB: return (noo_tech);
11678 case PM_BLOODSEEKER: return (blo_tech);
11679 case PM_BLEEDER: return (ble_tech);
11680 case PM_CAVEMAN: return (cav_tech);
11681 case PM_DEMAGOGUE: return (dem_tech);
11682 case PM_DQ_SLIME: return (sli_tech);
11683 case PM_ERDRICK: return (erd_tech);
11684 case PM_BARD: return (brd_tech);
11685 case PM_FLAME_MAGE: return (fla_tech);
11686 case PM_ACID_MAGE: return (aci_tech);
11687 case PM_HUSSY: return (hus_tech);
11688 case PM_TRANSVESTITE: return (tra_tech);
11689 case PM_PROSTITUTE: return (kur_tech);
11690 case PM_KURWA: return (kur_tech);
11691 case PM_DISSIDENT: return (dis_tech);
11692 case PM_MASON: return (mas_tech);
11693 case PM_XELNAGA: return (xel_tech);
11694 case PM_MASTERMIND: return (mam_tech);
11695 case PM_SAGE: return (sag_tech);
11696 case PM_TRANSSYLVANIAN: return (trs_tech);
11697 case PM_TOPMODEL: return (top_tech);
11698 case PM_FAILED_EXISTENCE: return (fai_tech);
11699 case PM_LUNATIC: return (lun_tech);
11700 case PM_ACTIVISTOR: return (act_tech);
11701 case PM_ELECTRIC_MAGE: return (ele_tech);
11702 case PM_POISON_MAGE: return (psn_tech);
11703 case PM_HEALER: return (hea_tech);
11704 case PM_ICE_MAGE: return (ice_tech);
11705 case PM_JEDI: return (jed_tech);
11706 case PM_HEDDERJEDI: return (jed_tech);
11707 case PM_KNIGHT: return (kni_tech);
11708 case PM_KORSAIR: return (kor_tech);
11709 case PM_SECRET_ADVICE_MEMBER: return (sec_tech);
11710 case PM_PREVERSIONER: return (pre_tech);
11711 case PM_DANCER: return (dan_tech);
11712 case PM_DIABLIST: return (dia_tech);
11713 case PM_BUTT_LOVER: return (but_tech);
11714 case PM_JUSTICE_KEEPER: return (jus_tech);
11715 case PM_MONK: return (mon_tech);
11716 case PM_OCCULT_MASTER: return (occ_tech);
11717 case PM_ELEMENTALIST: return (emn_tech);
11718 case PM_CHAOS_SORCEROR: return (cha_tech);
11719 case PM_JESTER: return (jes_tech);
11720 case PM_LADIESMAN: return (lad_tech);
11721 case PM_GEEK: return (gee_tech);
11722 case PM_GRADUATE: return (gee_tech);
11723 case PM_SEXYMATE: return (sex_tech);
11724 case PM_ZOOKEEPER: return (zoo_tech);
11725 case PM_MEDIUM: return (med_tech);
11726 case PM_FENCER: return (fnc_tech);
11727 case PM_FIGHTER: return (fig_tech);
11728 case PM_SUPERMARKET_CASHIER: return (sup_tech);
11729 case PM_WANDKEEPER: return (wan_tech);
11730 case PM_WARRIOR: return (war_tech);
11731 case PM_PALADIN: return (pal_tech);
11732 case PM_FEAT_MASTER: return (stu_tech);
11733 case PM_DOLL_MISTRESS: return (dol_tech);
11734 case PM_MIDGET: return (mid_tech);
11735 case PM_PSYKER: return (psy_tech);
11736 case PM_QUARTERBACK: return (qua_tech);
11737 case PM_GUNNER: return (gun_tech);
11738 case PM_CLIMACTERIAL: return (cli_tech);
11739 case PM_WOMANIZER: return (wom_tech);
11740 case PM_DOOM_MARINE: return (mar_tech);
11741 case PM_ANACHRONIST: return (ana_tech);
11742 case PM_LIBRARIAN: return (lib_tech);
11743 case PM_AUGURER: return (aug_tech);
11744 case PM_SAIYAN: return (sai_tech);
11745 case PM_PSION: return (psi_tech);
11746 case PM_SCIENTIST: return (sci_tech);
11747 case PM_ASTRONAUT: return (ast_tech);
11748 case PM_CELLAR_CHILD: return (cel_tech);
11749 case PM_DEATH_EATER: return (dea_tech);
11750 case PM_DIVER: return (div_tech);
11751 case PM_POKEMON: return (pok_tech);
11752 case PM_NUCLEAR_PHYSICIST: return (nuc_tech);
11753 case PM_FORM_CHANGER: return (for_tech);
11754 case PM_GENDERSTARIST: return (gen_tech);
11755 case PM_EMPATH: return (emp_tech);
11756 case PM_GANGSTER: return (gan_tech);
11757 case PM_ROCKER: return (roc_tech);
11758 case PM_NECROMANCER: return (nec_tech);
11759 case PM_CRUEL_ABUSER: return (abu_tech);
11760 case PM_PRIEST: return (pri_tech);
11761 case PM_GOLDMINER: return (gol_tech);
11762 case PM_CHEVALIER: return (che_tech);
11763 case PM_ASSASSIN: return (ass_tech);
11764 case PM_RANGER: return (ran_tech);
11765 case PM_TWELPH:
11766 case PM_ELPH: return (elp_tech);
11767 case PM_SPACEWARS_FIGHTER: return (spa_tech);
11768 case PM_CAMPERSTRIKER: return (cam_tech);
11769 case PM_LOCKSMITH: return (loc_tech);
11770 case PM_WEIRDBOY: return (wei_tech);
11771 case PM_GANG_SCHOLAR: return (sco_tech);
11772 case PM_WALSCHOLAR: return (wal_tech);
11773 case PM_OFFICER: return (off_tech);
11774 case PM_ROGUE: return (rog_tech);
11775 case PM_SAMURAI: return (sam_tech);
11776 case PM_CYBERNINJA: return (cyb_tech);
11777 case PM_GRENADONIN: return (gro_tech);
11778 case PM_NINJA: return (nin_tech);
11779 case PM_TOURIST: return (tou_tech);
11780 case PM_UNDEAD_SLAYER: return (und_tech);
11781 case PM_UNBELIEVER: return (unb_tech);
11782 case PM_SHAPESHIFTER: return (sha_tech);
11783 case PM_SLAVE_MASTER: return (sla_tech);
11784 case PM_RINGSEEKER: return (rin_tech);
11785 case PM_UNDERTAKER: return (unt_tech);
11786 case PM_VALKYRIE: return (val_tech);
11787 case PM_WIZARD: return (wiz_tech);
11788 case PM_YEOMAN: return (yeo_tech);
11789 case PM_CARTOMANCER: return (car_tech);
11790 case PM_DRAGONMASTER: return (dra_tech);
11791 case PM_COMBATANT: return (com_tech);
11792 case PM_FJORDE: return (fjo_tech);
11793 case PM_PRACTICANT: return (pra_tech);
11794 case PM_EMERA: return (eme_tech);
11795 case PM_SYMBIANT: return (sym_tech);
11796 default: return ((struct innate_tech *) 0);
11800 static const struct innate_tech *
11801 race_tech()
11803 switch (Race_switch) {
11804 case PM_DOPPELGANGER: return (dop_tech);
11805 case PM_AZTPOK: return (azt_tech);
11806 case PM_HC_ALIEN: return (hca_tech);
11807 case PM_SLYER_ALIEN: return (sly_tech);
11808 case PM_DWARF: return (dwa_tech);
11809 case PM_ELF:
11810 case PM_PLAYER_MYRKALFR:
11811 case PM_DROW: return (elf_tech);
11812 case PM_CURSER: return (cur_tech);
11813 case PM_IMPERIAL: return (imp_tech);
11814 case PM_SWIKNI: return (swi_tech);
11815 case PM_TAYIIN: return (tay_tech);
11816 case PM_CLOCKWORK_AUTOMATON: return (clk_tech);
11818 case PM_FENEK: return (fen_tech);
11819 case PM_LOWER_ENT: return (ent_tech);
11820 case PM_NORD: return (nor_tech);
11821 case PM_RETICULAN: return (ret_tech);
11822 case PM_OUTSIDER: return (out_tech);
11823 case PM_LICH_WARRIOR: return (lic_tech);
11824 case PM_ALBAE: return (alb_tech);
11825 case PM_BABYLONIAN: return (bab_tech);
11826 case PM_GERTEUT: return (ger_tech);
11827 case PM_POISONER: return (poi_tech);
11828 case PM_PLAYABLE_NEANDERTHAL: return (nea_tech);
11829 case PM_VORTEX: return (vor_tech);
11830 case PM_CORTEX: return (cor_tech);
11831 case PM_GNOME: return (gno_tech);
11832 case PM_KOP: return (kop_tech);
11833 case PM_ANCIPITAL: return (anc_tech);
11834 case PM_DEEP_ELF: return (dee_tech);
11835 case PM_DEVELOPER: return (dvp_tech);
11836 case PM_SHOE: return (sho_tech);
11837 case PM_BULDOZGAR: return (bga_tech);
11838 case PM_PLAYER_ANDROID: return (and_tech);
11839 case PM_FAWN: return (faw_tech);
11840 case PM_PLAYER_GREMLIN: return (gre_tech);
11841 case PM_STICKER: return (sti_tech);
11842 case PM_THUNDERLORD: return (thu_tech);
11843 case PM_JAVA: return (jav_tech);
11844 case PM_WISP: return (wis_tech);
11845 case PM_ROHIRRIM: return (roh_tech);
11846 case PM_PLAYER_SALAMANDER: return (sal_tech);
11847 case PM_SATRE: return (sat_tech);
11848 case PM_KORONST: return (kst_tech);
11849 case PM_RUSMOT: return (rus_tech);
11850 case PM_PIECE: return (pic_tech);
11851 case PM_CARTHAGE: return (crt_tech);
11852 case PM_MACTHEIST: return (mac_tech);
11853 case PM_BOVER: return (bov_tech);
11854 case PM_HAND: return (han_tech);
11855 case PM_PERVERT: return (per_tech);
11856 case PM_MONGUNG: return (mog_tech);
11857 case PM_VIETIS: return (vie_tech);
11858 case PM_SPARD: return (spd_tech);
11859 case PM_WEAPONIZED_DINOSAUR: return (din_tech);
11860 case PM_BURNINATOR: return (bur_tech);
11861 case PM_KOBOLT: return (kob_tech);
11862 case PM_OGRO: return (ogr_tech);
11863 case PM_PLAYER_FAIRY: return (fay_tech);
11864 case PM_BATMAN: return (bat_tech);
11865 case PM_HUMANOID_CENTAUR: return (cen_tech);
11866 case PM_BORG: return (bor_tech);
11867 case PM_WOOKIE: return (woo_tech);
11868 case PM_RODNEYAN: return (rod_tech);
11869 case PM_TURTLE: return (tur_tech);
11870 case PM_TURMENE: return (tme_tech);
11871 case PM_JELLY: return (jel_tech);
11872 case PM_HUMANOID_DRYAD: return (dry_tech);
11873 case PM_UNGENOMOLD: return (ung_tech);
11874 case PM_PLAYER_UNICORN: return (uni_tech);
11875 case PM_UNMAGIC_FISH: return (unm_tech);
11876 case PM_MOULD: return (mou_tech);
11877 case PM_MANSTER: return (man_tech);
11878 case PM_OCTOPODE: return (oct_tech);
11879 case PM_INKA: return (ink_tech);
11880 case PM_ARGONIAN: return (arg_tech);
11881 case PM_BRETON: return (bre_tech);
11882 case PM_MAZIN: return (mzi_tech);
11883 case PM_PLAYER_SHEEP: return (she_tech);
11884 case PM_SAMEDI: return (sdi_tech);
11885 case PM_REDGUARD: return (red_tech);
11886 case PM_ARMED_COCKATRICE: return (coc_tech);
11887 case PM_INSECTOID: return (ins_tech);
11888 case PM_KLACKON: return (kla_tech);
11889 case PM_MUMMY: return (mum_tech);
11890 case PM_KHAJIIT: return (kha_tech);
11891 case PM_WEAPON_CUBE: return (gel_tech);
11892 case PM_TONBERRY: return (ton_tech);
11893 case PM_HOBBIT: return (hob_tech);
11894 case PM_HUMAN_WEREWOLF: return (lyc_tech);
11895 case PM_HUMAN_MONKEY: return (hmo_tech);
11896 case PM_PLAYER_ZRUTY: return (zru_tech);
11897 case PM_VAMPIRE: return (vam_tech);
11898 case PM_SUCKING_FIEND: return (vam_tech);
11899 case PM_VAMGOYLE: return (vam_tech);
11900 case PM_LEVITATOR: return (lev_tech);
11901 case PM_HERBALIST: return (hrb_tech);
11902 case PM_ALCHEMIST: return (alc_tech);
11903 case PM_WEAPON_BUG: return (gri_tech);
11904 case PM_HUMANOID_ANGEL: return (ang_tech);
11905 case PM_INCANTIFIER: return (inc_tech);
11906 case PM_PLAYER_MIMIC: return (mim_tech);
11907 case PM_MISSINGNO: return (mis_tech);
11908 case PM_NAVI: return (nav_tech);
11909 case PM_SPIDERMAN: return (spi_tech);
11910 case PM_VENTURE_CAPITALIST: return (ven_tech);
11911 case PM_TRANSFORMER: return (trf_tech);
11912 case PM_WEAPON_TRAPPER: return (trp_tech);
11913 case PM_IRAHA: return (ira_tech);
11914 case PM_SPRIGGAN: return (spr_tech);
11915 case PM_VEELA: return (vee_tech);
11916 case PM_WARPER: return (wrp_tech);
11917 case PM_EGYMID: return (egy_tech);
11918 case PM_NEMESIS: return (nem_tech);
11919 case PM_CUPID: return (cup_tech);
11920 case PM_URGOTH: return (urg_tech);
11921 case PM_WYLVAN: return (wyl_tech);
11922 case PM_ZAUR: return (zau_tech);
11923 case PM_THRALL: return (thr_tech);
11924 case PM_PLAYER_CERBERUS: return (cer_tech);
11925 case PM_BACTERIA: return (bac_tech);
11926 case PM_UNALIGNMENT_THING: return (una_tech);
11927 default: /*return ((struct innate_tech *) 0)*/return (def_tech);
11931 void
11932 adjtech(oldlevel,newlevel)
11933 int oldlevel, newlevel;
11935 const struct innate_tech
11936 *tech = role_tech(), *rtech = race_tech();
11937 long mask = FROMEXPER;
11939 while (tech || rtech) {
11940 /* Have we finished with the tech lists? */
11941 if (!tech || !tech->tech_id) {
11942 /* Try the race intrinsics */
11943 if (!rtech || !rtech->tech_id) break;
11944 tech = rtech;
11945 rtech = (struct innate_tech *) 0;
11946 mask = FROMRACE;
11949 for(; tech->tech_id; tech++)
11950 if(oldlevel < tech->ulevel && newlevel >= tech->ulevel) {
11951 if (tech->ulevel != 1 && !tech_known(tech->tech_id))
11952 You("learn how to perform %s!",
11953 tech_names[tech->tech_id]);
11954 learntech(tech->tech_id, mask, tech->tech_lev);
11955 } else if (oldlevel >= tech->ulevel && newlevel < tech->ulevel
11956 && tech->ulevel != 1) {
11957 learntech(tech->tech_id, mask, -1);
11958 if (!tech_known(tech->tech_id))
11959 You("lose the ability to perform %s!",
11960 tech_names[tech->tech_id]);
11966 mon_to_zombie(monnum)
11967 int monnum;
11969 if ((&mons[monnum])->mlet == S_ZOMBIE) return monnum; /* is already zombie */
11970 if ((&mons[monnum])->mlet == S_KOBOLD) return PM_KOBOLD_ZOMBIE;
11971 if ((&mons[monnum])->mlet == S_GNOME) return PM_GNOME_ZOMBIE;
11972 if (is_orc(&mons[monnum])) return PM_ORC_ZOMBIE;
11973 if (is_dwarf(&mons[monnum])) return PM_DWARF_ZOMBIE;
11974 if (is_elf(&mons[monnum])) return PM_ELF_ZOMBIE;
11975 if (is_human(&mons[monnum])) return PM_HUMAN_ZOMBIE;
11976 if (monnum == PM_ETTIN) return PM_ETTIN_ZOMBIE;
11977 if (is_giant(&mons[monnum])) return PM_GIANT_ZOMBIE;
11978 /* Is it humanoid? */
11979 /* Amy edit - what the heck??? No wonder the effing tech never worked! Because NO ONE tells you that! :( */
11980 /* if (!humanoid(&mons[monnum])) return (-1); */
11981 /* Otherwise, return a ghoul or ghast */
11982 /* or a random Z because, well, we have so many monster species, let's give the necro some better undead. --Amy */
11983 if (!rn2(3)) return (pm_mkclass(S_ZOMBIE, 0) );
11984 else if (!rn2(4)) return PM_GHAST;
11985 else return PM_GHOUL;
11988 STATIC_PTR int
11989 charge_saber()
11991 int i, tlevel, yourmana, manamultiply, calchelpvar, effectlevel;
11992 if(delay) {
11993 delay++;
11994 return(1);
11996 for (i = 0; i < MAXTECH; i++) {
11997 if (techid(i) == NO_TECH)
11998 continue;
11999 if (techid(i) != T_CHARGE_SABER)
12000 continue;
12001 tlevel = techlevX(i);
12003 if (tlevel >= 10) {
12005 int jackpotchance = 20; /* 1 in 5 was way too common --Amy */
12007 switch (tlevel) {
12008 default: jackpotchance = 20; if (tlevel >= 50) jackpotchance = 5; break;
12009 case 10:
12010 case 11:
12011 case 12:
12012 case 13:
12013 jackpotchance = 20; break;
12014 case 14:
12015 case 15:
12016 case 16:
12017 jackpotchance = 19; break;
12018 case 17:
12019 case 18:
12020 case 19:
12021 jackpotchance = 18; break;
12022 case 20:
12023 case 21:
12024 case 22:
12025 jackpotchance = 17; break;
12026 case 23:
12027 case 24:
12028 jackpotchance = 16; break;
12029 case 25:
12030 case 26:
12031 case 27:
12032 jackpotchance = 15; break;
12033 case 28:
12034 case 29:
12035 jackpotchance = 14; break;
12036 case 30:
12037 case 31:
12038 case 32:
12039 jackpotchance = 13; break;
12040 case 33:
12041 case 34:
12042 jackpotchance = 12; break;
12043 case 35:
12044 case 36:
12045 jackpotchance = 11; break;
12046 case 37:
12047 case 38:
12048 jackpotchance = 10; break;
12049 case 39:
12050 case 40:
12051 case 41:
12052 jackpotchance = 9; break;
12053 case 42:
12054 case 43:
12055 case 44:
12056 jackpotchance = 8; break;
12057 case 45:
12058 case 46:
12059 case 47:
12060 jackpotchance = 7; break;
12061 case 48:
12062 case 49:
12063 jackpotchance = 6; break;
12064 case 50:
12065 jackpotchance = 5; break;
12068 if (!rn2(jackpotchance)) {
12069 You("manage to channel the force perfectly!");
12070 uwep->age += 1500; // Jackpot!
12071 if (uwep->oartifact == ART_KYLE_S_JACKPOT) uwep->age += (1500 * rnd(2));
12074 } else
12075 You("channel the force into %s.", the(xname(uwep)));
12077 /* it was simply too strong... arbitrarily lower the amount you'll get --Amy */
12078 yourmana = u.uen;
12079 manamultiply = 0;
12080 while (yourmana > 99) {
12081 manamultiply++;
12082 yourmana -= 100;
12084 yourmana = u.uen;
12085 while (manamultiply > 0) {
12086 calchelpvar = (yourmana - (manamultiply * 100));
12087 if (calchelpvar < 1) goto manacalccomplete;
12088 yourmana -= rnd(calchelpvar);
12089 manamultiply--;
12092 manacalccomplete:
12093 if (yourmana < 1) yourmana = 1; /* fail safe, shouldn't happen */
12095 if (techlevX(T_CHARGE_SABER) < 1) {
12096 pline("Your ability to charge the saber is beyond recall, and therefore nothing happens.");
12097 return(0);
12099 effectlevel = rno(techlevX(T_CHARGE_SABER));
12101 /* yes no return above, it's a bonus :) */
12102 uwep->age += (yourmana * (( (effectlevel + rnd(5 + effectlevel) ) / rnd(10)) + rno(3)));
12103 if (uwep->oartifact == ART_KYLE_S_JACKPOT) {
12104 uwep->age += (yourmana * (( (effectlevel + rnd(5 + effectlevel) ) / rnd(10)) + rno(3)));
12105 if (!rn2(2)) uwep->age += (yourmana * (( (effectlevel + rnd(5 + effectlevel) ) / rnd(10)) + rno(3)));
12107 /* improved results by Amy */
12109 u.uen = 0;
12110 flags.botl = 1;
12111 return(0);
12115 techlevX(tech)
12116 int tech;
12118 int finaltechlevel = (u.ulevel - tech_list[tech].t_lev);
12119 if (StrongTechnicality) {
12120 finaltechlevel *= 4;
12121 finaltechlevel /= 3;
12122 finaltechlevel += 10;
12123 } else if (Technicality) {
12124 finaltechlevel *= 4;
12125 finaltechlevel /= 3;
12126 finaltechlevel += 3;
12128 if (uarmh && itemhasappearance(uarmh, APP_TECHNICAL_HELMET)) finaltechlevel++;
12130 finaltechlevel += (boost_power_value() * 2);
12132 if (finaltechlevel > 50) finaltechlevel = 50; /* fail safe */
12133 return finaltechlevel;
12136 /*WAC tinker code*/
12137 STATIC_PTR int
12138 tinker()
12140 int chance;
12141 struct obj *otmp = uwep;
12144 if (delay) { /* not if (delay++), so at end delay == 0 */
12145 delay++;
12146 #if 0
12147 use_skill(P_TINKER, 1); /* Tinker skill */
12148 #endif
12149 /*WAC a bit of practice so even if you're interrupted
12150 you won't be wasting your time ;B*/
12151 return(1); /* still busy */
12154 if (!uwep)
12155 return (0);
12157 You("finish your tinkering.");
12158 chance = 5;
12159 /* chance += PSKILL(P_TINKER); */
12160 if (rnl(10) < chance) {
12161 upgrade_obj(otmp, FALSE);
12162 } else {
12163 /* object downgrade - But for now, nothing :) */
12166 setuwep(otmp, FALSE, TRUE);
12167 You("now hold %s!", doname(otmp));
12168 return(0);
12171 /*WAC draw energy from surrounding objects */
12172 STATIC_PTR int
12173 draw_energy()
12175 int powbonus = 1;
12176 if (delay) { /* not if (delay++), so at end delay == 0 */
12177 delay++;
12178 confdir();
12179 if(isok(u.ux + u.dx, u.uy + u.dy)) {
12180 switch((&levl[u.ux + u.dx][u.uy + u.dy])->typ) {
12181 case ALTAR: /* Divine power */
12182 powbonus = (u.uenmax > 28 ? u.uenmax / 4 : 7);
12183 break;
12184 case THRONE: /* Regal == pseudo divine */
12185 powbonus = (u.uenmax > 36 ? u.uenmax / 6 : 6);
12186 break;
12187 case PENTAGRAM:
12188 powbonus = (u.uenmax > 10 ? u.uenmax / 2 : 4);
12189 break;
12190 case CLOUD: /* Air */
12191 case TREE: /* Earth */
12192 case LAVAPOOL: /* Fire */
12193 case ICE: /* Water - most ordered form */
12194 case STYXRIVER:
12195 case BURNINGWAGON:
12196 case BUBBLES:
12197 powbonus = (u.uenmax > 40 ? u.uenmax / 8 : 5);
12198 break;
12199 case AIR:
12200 case MOAT: /* Doesn't freeze */
12201 case WATER:
12202 case WATERTUNNEL:
12203 case WAGON:
12204 case NETHERMIST:
12205 powbonus = (u.uenmax > 40 ? u.uenmax / 10 : 4);
12206 break;
12207 case CRYSTALWATER:
12208 case CARVEDBED:
12209 case RAINCLOUD:
12210 powbonus = (u.uenmax > 20 ? u.uenmax / 5 : 4);
12211 break;
12212 case POOL: /* Can dry up */
12213 case WOODENTABLE:
12214 case SNOW:
12215 case ASH:
12216 case HIGHWAY:
12217 powbonus = (u.uenmax > 36 ? u.uenmax / 12 : 3);
12218 break;
12219 case STRAWMATTRESS:
12220 case GRASSLAND:
12221 case STALACTITE:
12222 powbonus = (u.uenmax > 50 ? u.uenmax / 20 : 2);
12223 break;
12224 case FOUNTAIN:
12225 case WELL:
12226 case SHIFTINGSAND:
12227 case SAND:
12228 powbonus = (u.uenmax > 30 ? u.uenmax / 15 : 2);
12229 break;
12230 case FARMLAND:
12231 case MOUNTAIN:
12232 case CRYPTFLOOR:
12233 powbonus = (u.uenmax > 20 ? u.uenmax / 10 : 2);
12234 break;
12235 case SINK: /* Cleansing water */
12236 if (!rn2(3)) powbonus = 2;
12237 break;
12238 case TOILET: /* Water Power...but also waste! */
12239 case MOORLAND:
12240 case POISONEDWELL:
12241 if (rn2(100) < 50)
12242 powbonus = 2;
12243 else powbonus = -2;
12244 break;
12245 case GRAVE:
12246 case GRAVEWALL:
12247 powbonus = -4;
12248 break;
12249 case URINELAKE:
12250 powbonus = -10;
12251 break;
12252 default:
12253 break;
12256 u.uen += powbonus;
12257 if (u.uen > u.uenmax) {
12258 delay = 0;
12259 u.uen = u.uenmax;
12261 if (u.uen < 1) u.uen = 0;
12262 flags.botl = 1;
12263 return(1); /* still busy */
12265 You("finish drawing energy from your surroundings.");
12266 return(0);
12269 static const char
12270 *Enter_Blitz = "Enter Blitz Command[. to end]: ";
12272 /* Keep commands that reference the same blitz together
12273 * Keep the BLITZ_START before the BLITZ_CHAIN before the BLITZ_END
12275 static const struct blitz_tab blitzes[] = {
12276 {"LLDDR", 5, blitz_chi_strike, T_CHI_STRIKE, BLITZ_START},
12277 {"LLDDRDR", 7, blitz_chi_strike, T_CHI_STRIKE, BLITZ_START},
12278 {"RR", 2, blitz_dash, T_DASH, BLITZ_START},
12279 {"LL", 2, blitz_dash, T_DASH, BLITZ_START},
12280 {"UURRDDL", 7, blitz_e_fist, T_E_FIST, BLITZ_START},
12281 {"URURRDDLDL", 10, blitz_e_fist, T_E_FIST, BLITZ_START},
12282 {"LDL", 3, blitz_combo_strike, T_COMBO_STRIKE, BLITZ_CHAIN},
12283 {"RUR", 3, blitz_combo_strike, T_COMBO_STRIKE, BLITZ_CHAIN},
12284 {"LDDL", 4, blitz_draining_punch, T_DRAINING_PUNCH, BLITZ_CHAIN},
12285 {"RUUR", 4, blitz_draining_punch, T_DRAINING_PUNCH, BLITZ_CHAIN},
12286 {"LRL", 3, blitz_pummel, T_PUMMEL, BLITZ_CHAIN},
12287 {"RLR", 3, blitz_pummel, T_PUMMEL, BLITZ_CHAIN},
12288 {"DDDD", 4, blitz_g_slam, T_G_SLAM, BLITZ_END},
12289 {"DUDUUDDD", 8, blitz_spirit_bomb, T_SPIRIT_BOMB, BLITZ_END},
12290 {"", 0, (void *)0, 0, BLITZ_END} /* Array terminator */
12293 #define MAX_BLITZ 50
12294 #define MIN_CHAIN 2
12295 #define MAX_CHAIN 5
12297 /* parse blitz input */
12298 static int
12299 doblitz()
12301 int i, j, dx, dy, bdone = 0, tech_no;
12302 char buf[BUFSZ];
12303 char *bp;
12304 int blitz_chain[MAX_CHAIN], blitz_num;
12306 tech_no = (get_tech_no(T_BLITZ));
12308 if (tech_no == -1) {
12309 return(0);
12312 if (u.uen < 10) {
12313 You("are too weak to attempt this! You need at least 10 points of mana!");
12314 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
12315 return(0);
12318 bp = buf;
12320 if (!getdir((char *)0)) return(0);
12321 if (!u.dx && !u.dy) {
12322 return(0);
12324 if (!isok(u.ux + u.dx, u.uy + u.dy)) {
12325 return 0;
12328 dx = u.dx;
12329 dy = u.dy;
12331 doblitzlist();
12333 for (i= 0; i < MAX_BLITZ; i++) {
12334 if (!getdir(Enter_Blitz)) return(0); /* Get directional input */
12335 if (!u.dx && !u.dy && !u.dz) break;
12336 if (u.dx == -1) {
12337 *(bp) = 'L';
12338 bp++;
12339 } else if (u.dx == 1) {
12340 *(bp) = 'R';
12341 bp++;
12343 if (u.dy == -1) {
12344 *(bp) = 'U';
12345 bp++;
12346 } else if (u.dy == 1) {
12347 *(bp) = 'D';
12348 bp++;
12350 if (u.dz == -1) {
12351 *(bp) = '>';
12352 bp++;
12353 } else if (u.dz == 1) {
12354 *(bp) = '<';
12355 bp++;
12358 *(bp) = '.';
12359 bp++;
12360 *(bp) = '\0';
12361 bp = buf;
12363 /* Point of no return - You've entered and terminated a blitz, so... */
12364 u.uen -= 10;
12366 /* parse input */
12367 /* You can't put two of the same blitz in a row */
12368 blitz_num = 0;
12369 while(strncmp(bp, ".", 1)) {
12370 bdone = 0;
12371 for (j = 0; blitzes[j].blitz_len; j++) {
12372 if (blitz_num >= MAX_CHAIN ||
12373 blitz_num >= (MIN_CHAIN + (techlevX(tech_no) / 10)))
12374 break; /* Trying to chain too many blitz commands */
12375 else if (!strncmp(bp, blitzes[j].blitz_cmd, blitzes[j].blitz_len)) {
12376 /* Trying to chain in a command you don't know yet */
12377 if (!tech_known(blitzes[j].blitz_tech))
12378 break;
12379 if (blitz_num) {
12380 /* Check if trying to chain two of the exact same
12381 * commands in a row
12383 if (j == blitz_chain[(blitz_num - 1)])
12384 break;
12385 /* Trying to chain after chain finishing command */
12386 if (blitzes[blitz_chain[(blitz_num - 1)]].blitz_type
12387 == BLITZ_END)
12388 break;
12389 /* Trying to put a chain starter after starting
12390 * a chain
12391 * Note that it's OK to put two chain starters in a
12392 * row
12394 if ((blitzes[j].blitz_type == BLITZ_START) &&
12395 (blitzes[blitz_chain[(blitz_num - 1)]].blitz_type
12396 != BLITZ_START))
12397 break;
12399 bp += blitzes[j].blitz_len;
12400 blitz_chain[blitz_num] = j;
12401 blitz_num++;
12402 bdone = 1;
12403 break;
12406 if (!bdone) {
12407 You("stumble!");
12408 return(1);
12411 for (i = 0; i < blitz_num; i++) {
12412 u.dx = dx;
12413 u.dy = dy;
12414 if (!( (*blitzes[blitz_chain[i]].blitz_funct)() )) break;
12417 /* done */
12418 return(1);
12421 static void
12422 doblitzlist()
12424 winid tmpwin;
12425 int i, n;
12426 char buf[BUFSZ];
12427 menu_item *selected;
12428 anything any;
12430 tmpwin = create_nhwindow(NHW_MENU);
12431 start_menu(tmpwin);
12432 any.a_void = 0; /* zero out all bits */
12434 sprintf(buf, "%16s %10s %-17s", "[LU = Left Up]", "[U = Up]", "[RU = Right Up]");
12435 add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
12436 sprintf(buf, "%16s %10s %-17s", "[L = Left]", "", "[R = Right]");
12437 add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
12438 sprintf(buf, "%16s %10s %-17s", "[LD = Left Down]", "[D = Down]", "[RD = Right Down]");
12439 add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
12441 sprintf(buf, "%-30s %10s %s", "Name", "Type", "Command");
12442 add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
12444 for (i = 0; blitzes[i].blitz_len; i++) {
12445 if (tech_known(blitzes[i].blitz_tech)) {
12446 sprintf(buf, "%-30s %10s %s",
12447 (i && blitzes[i].blitz_tech == blitzes[(i-1)].blitz_tech ?
12448 "" : tech_names[blitzes[i].blitz_tech]),
12449 (blitzes[i].blitz_type == BLITZ_START ?
12450 "starter" :
12451 (blitzes[i].blitz_type == BLITZ_CHAIN ?
12452 "chain" :
12453 (blitzes[i].blitz_type == BLITZ_END ?
12454 "finisher" : "unknown"))),
12455 blitzes[i].blitz_cmd);
12457 add_menu(tmpwin, NO_GLYPH, &any,
12458 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
12461 end_menu(tmpwin, "Currently known blitz manoeuvers");
12463 n = select_menu(tmpwin, PICK_NONE, &selected);
12464 destroy_nhwindow(tmpwin);
12465 return;
12468 static int
12469 blitz_chi_strike()
12471 int tech_no;
12473 tech_no = (get_tech_no(T_CHI_STRIKE));
12475 if (tech_no == -1) {
12476 return(0);
12479 if (u.uen < 1) {
12480 You("are too weak to attempt this! You need at least one point of mana!");
12481 return(0);
12483 You_feel("energy surge through your hands!");
12484 techt_inuse(tech_no) = techlevX(tech_no) + 4;
12485 return(1);
12488 static int
12489 blitz_e_fist()
12491 int tech_no;
12492 const char *str;
12494 tech_no = (get_tech_no(T_E_FIST));
12496 if (tech_no == -1) {
12497 return(0);
12500 str = makeplural(body_part(HAND));
12501 You("focus the powers of the elements into your %s.", str);
12502 techt_inuse(tech_no) = rnd((int) (techlevX(tech_no)/3 + 1)) + d(1,4) + 2;
12503 return 1;
12506 static int
12507 blitz_combo_strike()
12509 struct monst *mtmp;
12511 if (tech_inuse(T_COMBO_STRIKE)) {
12512 u.combostrike = 0;
12513 u.comboactive = FALSE;
12514 stopsingletechnique(T_COMBO_STRIKE);
12517 You("do a combo strike!");
12518 if (u.uswallow)
12519 mtmp = u.ustuck;
12520 else
12521 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
12523 if (!mtmp) {
12524 pline("But there was no target!");
12525 return (0);
12527 if (!attack(mtmp)) return (0);
12528 else u.combostrike += 10;
12529 return(1);
12532 static int
12533 blitz_draining_punch()
12535 struct monst *mtmp;
12537 if (u.uswallow)
12538 mtmp = u.ustuck;
12539 else
12540 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
12541 if (!mtmp) {
12542 You("strike nothing.");
12543 return (0);
12545 if (!attack(mtmp)) return (0);
12547 if (!mtmp) return(0);
12549 if (mtmp && !(DEADMONSTER(mtmp)) && mtmp->mhp > 0 && !resists_drli(mtmp) && !resist(mtmp, WEAPON_CLASS, 0, NOTELL) ) {
12551 int xtmp = d(2,6);
12552 pline("%s suddenly seems weaker!", Monnam(mtmp));
12553 mtmp->mhpmax -= xtmp;
12554 #ifdef SHOW_DMG
12555 if (xtmp < mtmp->mhp) showdmg(xtmp);
12556 #endif
12557 if ((mtmp->mhp -= xtmp) <= 0 || !mtmp->m_lev) {
12558 pline("%s dies!", Monnam(mtmp));
12559 xkilled(mtmp,0);
12560 } else
12561 mtmp->m_lev--;
12563 return(1);
12567 /* Assumes u.dx, u.dy already set up */
12568 static int
12569 blitz_pummel()
12571 int i = 0, tech_no;
12572 struct monst *mtmp;
12573 tech_no = (get_tech_no(T_PUMMEL));
12575 if (tech_no == -1) {
12576 return(0);
12579 You("let loose a barrage of blows!");
12581 if (u.uswallow)
12582 mtmp = u.ustuck;
12583 else
12584 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
12586 if (!mtmp) {
12587 You("strike nothing.");
12588 return (0);
12590 if (!attack(mtmp)) return (0);
12592 /* Perform the extra attacks
12594 for (i = 0; (i < 4); i++) {
12595 if (rn2(90) > (techlevX(tech_no) + 30)) break;
12597 if (u.uswallow)
12598 mtmp = u.ustuck;
12599 else
12600 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
12602 if (!mtmp) return (1);
12603 if (!attack(mtmp)) return (1);
12606 return(1);
12609 /* Assumes u.dx, u.dy already set up */
12610 static int
12611 blitz_g_slam()
12613 int tech_no, tmp, canhitmon, objenchant;
12614 struct monst *mtmp;
12615 struct trap *chasm;
12617 tech_no = (get_tech_no(T_G_SLAM));
12619 if (tech_no == -1) {
12620 return(0);
12623 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
12624 if (!mtmp) {
12625 You("strike nothing.");
12626 return (0);
12628 if (!attack(mtmp)) return (0);
12630 /* Slam the monster into the ground */
12631 mtmp = m_at(u.ux + u.dx, u.uy + u.dy);
12632 if (!mtmp || u.uswallow) return(1);
12634 You("hurl %s downwards...", mon_nam(mtmp));
12635 if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) return(1);
12637 if (need_four(mtmp)) canhitmon = 4;
12638 else if (need_three(mtmp)) canhitmon = 3;
12639 else if (need_two(mtmp)) canhitmon = 2;
12640 else if (need_one(mtmp)) canhitmon = 1;
12641 else canhitmon = 0;
12642 if (uarmf && uarmf->oartifact == ART_KILLCAP) canhitmon = 0;
12644 if (Upolyd) {
12645 if (hit_as_four(&youmonst)) objenchant = 4;
12646 else if (hit_as_three(&youmonst)) objenchant = 3;
12647 else if (hit_as_two(&youmonst)) objenchant = 2;
12648 else if (hit_as_one(&youmonst)) objenchant = 1;
12649 else if (need_four(&youmonst)) objenchant = 4;
12650 else if (need_three(&youmonst)) objenchant = 3;
12651 else if (need_two(&youmonst)) objenchant = 2;
12652 else if (need_one(&youmonst)) objenchant = 1;
12653 else objenchant = 0;
12654 } else
12655 objenchant = GushLevel / 4;
12657 tmp = (5 + rnd(6) + (techlevX(tech_no) / 5));
12659 chasm = maketrap(u.ux + u.dx, u.uy + u.dy, PIT, 0, FALSE);
12660 if (chasm) {
12661 if (!is_flyer(mtmp->data) && (!mtmp->egotype_flying) && !is_clinger(mtmp->data))
12662 mtmp->mtrapped = 1;
12663 if (!chasm->hiddentrap) chasm->tseen = 1;
12664 levl[u.ux + u.dx][u.uy + u.dy].doormask = 0;
12665 pline("%s slams into the ground, creating a crater!", Monnam(mtmp));
12666 tmp *= 2;
12669 mselftouch(mtmp, "Falling, ", TRUE);
12670 if (!DEADMONSTER(mtmp)) {
12671 if (objenchant < canhitmon)
12672 pline("%s doesn't seem to be harmed.", Monnam(mtmp));
12673 else if ((mtmp->mhp -= tmp) <= 0) {
12674 if(!cansee(u.ux + u.dx, u.uy + u.dy))
12675 pline("It is destroyed!");
12676 else {
12677 You("destroy %s!",
12678 mtmp->mtame
12679 ? x_monnam(mtmp, ARTICLE_THE, "poor",
12680 mtmp->mnamelth ? SUPPRESS_SADDLE : 0, FALSE)
12681 : mon_nam(mtmp));
12683 xkilled(mtmp,0);
12687 return(1);
12690 /* Assumes u.dx, u.dy already set up */
12691 static int
12692 blitz_dash()
12694 int tech_no;
12695 tech_no = (get_tech_no(T_DASH));
12697 if (tech_no == -1) {
12698 return(0);
12701 if ((!Punished || carried(uball)) && !u.utrap)
12702 You("dash forwards!");
12703 hurtle(u.dx, u.dy, 2, FALSE);
12704 multi = 0; /* No paralysis with dash */
12705 return 1;
12708 static int
12709 blitz_power_surge()
12711 int tech_no, num;
12713 tech_no = (get_tech_no(T_POWER_SURGE));
12715 if (tech_no == -1) {
12716 return(0);
12719 /* what the heck??? --Amy */
12720 /*if (Upolyd) {
12721 You("cannot tap into your full potential in this form.");
12722 return(0);
12724 You("tap into the full extent of your power!");
12725 num = 50 + (2 * techlevX(tech_no));
12726 techt_inuse(tech_no) = num + 1;
12727 u.uenmax += num;
12728 u.uen += num;
12729 if (u.uen > u.uenmax) u.uen = u.uenmax;
12730 return 1;
12733 /* Assumes u.dx, u.dy already set up */
12734 static int
12735 blitz_spirit_bomb()
12737 int tech_no, num;
12738 int sx = u.ux, sy = u.uy, i;
12740 tech_no = (get_tech_no(T_SPIRIT_BOMB));
12742 if (tech_no == -1) {
12743 return(0);
12746 You("gather your energy...");
12748 if (u.uen < 10) {
12749 pline("But it fizzles out because you have less than 10 points of mana.");
12750 u.uen = 0;
12753 /* the damage was way too low... no wonder players never use finishers as the last chained blitz move,
12754 * because pummel is all-powerful! Therefore I increased the damage --Amy */
12755 num = 10 + (techlevX(tech_no) * 3);
12756 num = (u.uen < num ? u.uen : num);
12758 u.uen -= num;
12760 for( i = 0; i < 2; i++) {
12761 if (!isok(sx,sy) || !cansee(sx,sy) ||
12762 IS_STWALL(levl[sx][sy].typ) || u.uswallow)
12763 break;
12765 /* Display the center of the explosion */
12766 tmp_at(DISP_FLASH, explosion_to_glyph(EXPL_MAGICAL, S_explode5));
12767 tmp_at(sx, sy);
12768 delay_output();
12769 tmp_at(DISP_END, 0);
12771 sx += u.dx;
12772 sy += u.dy;
12774 /* Magical Explosion */
12775 explode(sx, sy, 10, (d(3,6) + num), WAND_CLASS, EXPL_MAGICAL);
12776 return 1;
12779 /* for bad effects: add d50000 turns of timeout to a random tech */
12780 void
12781 eviltechincrease()
12783 int i, thisone, choicenumber;
12785 thisone = -1;
12786 choicenumber = 0;
12788 for (i = 0; i < MAXTECH; i++) {
12790 if (tech_list[i].t_id == NO_TECH) break;
12792 if (!choicenumber || (!rn2(choicenumber + 1))) {
12793 thisone = i;
12795 choicenumber++;
12799 if (choicenumber > 0 && thisone >= 0) {
12800 techtout(thisone) += rnd(50000);
12801 pline("Your %s technique is put on a lengthy timeout!", techname(thisone));
12806 void
12807 techcapincrease(increaseamount)
12808 int increaseamount;
12810 int i, thisone, choicenumber;
12812 thisone = -1;
12813 choicenumber = 0;
12815 for (i = 0; i < MAXTECH; i++) {
12817 if (tech_list[i].t_id == NO_TECH) break;
12819 if (!choicenumber || (!rn2(choicenumber + 1))) {
12820 thisone = i;
12822 choicenumber++;
12826 /* make this effect actually matter --Amy */
12827 if (!rn2(2) && choicenumber > 1) {
12828 increaseamount *= (50 + choicenumber);
12829 increaseamount /= 50;
12831 increaseamount *= rnd(5);
12833 if (choicenumber > 0 && thisone >= 0) {
12834 techtout(thisone) += increaseamount;
12835 pline("Your %s technique's timeout increases!", techname(thisone));
12840 void
12841 techdrain()
12844 int i, thisone, choicenumber, attempts;
12845 attempts = 0;
12847 techdrainnew:
12848 thisone = -1;
12849 choicenumber = 0;
12851 for (i = 0; i < MAXTECH; i++) {
12853 if (tech_list[i].t_id == NO_TECH) break;
12855 if (!choicenumber || (!rn2(choicenumber + 1))) {
12856 thisone = i;
12858 choicenumber++;
12862 if (choicenumber > 0 && thisone >= 0 && attempts < 10000) {
12863 if (tech_list[thisone].t_lev < 130) {
12864 tech_list[thisone].t_lev += 1;
12865 pline("Your %s technique's level is drained to %d!", techname(thisone), techlev(thisone));
12866 } else {
12867 attempts++;
12868 goto techdrainnew;
12874 void
12875 techdrainsevere()
12878 int i, thisone, choicenumber, attempts;
12879 attempts = 0;
12881 techdrainnewS:
12882 thisone = -1;
12883 choicenumber = 0;
12885 for (i = 0; i < MAXTECH; i++) {
12887 if (tech_list[i].t_id == NO_TECH) break;
12889 if (!choicenumber || (!rn2(choicenumber + 1))) {
12890 thisone = i;
12892 choicenumber++;
12896 if (choicenumber > 0 && thisone >= 0 && attempts < 10000) {
12897 if (tech_list[thisone].t_lev < 120) {
12898 tech_list[thisone].t_lev = 130;
12899 pline("Your %s technique becomes permanently unusable!", techname(thisone));
12900 } else {
12901 attempts++;
12902 goto techdrainnewS;
12908 void
12909 techdrainrll()
12911 int i;
12912 for (i = 0; i < MAXTECH; i++) {
12913 if (techid(i) == T_RESTORE_LIFE_LEVELS )
12914 tech_list[i].t_lev = 130;
12919 /* drain all of the player's techniques by one level --Amy */
12920 void
12921 drain_all_techs()
12923 int i;
12924 for (i = 0; i < MAXTECH; i++) {
12926 if (tech_list[i].t_id == NO_TECH) break;
12928 if (tech_list[i].t_lev < 130) {
12929 tech_list[i].t_lev += 1;
12935 void
12936 techlevelup()
12939 int i, thisone, choicenumber, attempts;
12940 attempts = 0;
12942 techlvlupnew:
12943 thisone = -1;
12944 choicenumber = 0;
12946 for (i = 0; i < MAXTECH; i++) {
12948 if (tech_list[i].t_id == NO_TECH) break;
12950 if (!choicenumber || (!rn2(choicenumber + 1))) {
12951 thisone = i;
12953 choicenumber++;
12957 if (choicenumber > 0 && thisone >= 0 && attempts < 10000) {
12958 if (tech_list[thisone].t_lev > 0) {
12959 tech_list[thisone].t_lev -= 1;
12960 pline("Your %s technique leveled up to level %d!", techname(thisone), techlev(thisone));
12961 } else {
12962 attempts++;
12963 goto techlvlupnew;
12969 void
12970 techlevelspecific(technumber)
12971 int technumber;
12974 int i, thisone, choicenumber, attempts;
12975 attempts = 0;
12977 techlvlupnew:
12979 thisone = -1;
12980 boolean foundtech = FALSE;
12982 for (i = 0; i < MAXTECH; i++) {
12984 if (tech_list[i].t_id == NO_TECH) break;
12985 if (tech_list[i].t_id == technumber) {
12986 thisone = i;
12987 foundtech = TRUE;
12992 if (foundtech && thisone >= 0) {
12993 if (tech_list[thisone].t_lev > 0) {
12994 tech_list[thisone].t_lev -= 1;
12995 pline("Your %s technique leveled up to level %d!", techname(thisone), techlev(thisone));
12996 } else {
12997 pline("Your %s technique has reached the maximum level already.", techname(thisone));
13003 /* player learns a random "regular" tech, i.e. one not taught by leveling up skills or some such --Amy */
13004 void
13005 learnrandomregulartech()
13007 switch (rnd(190)) {
13009 case 1:
13010 case 2:
13011 case 3:
13012 learntech_or_leveltech(T_BERSERK, FROMOUTSIDE, 1);
13013 You("learn how to perform berserk!");
13014 break;
13015 case 4:
13016 case 5:
13017 case 6:
13018 learntech_or_leveltech(T_KIII, FROMOUTSIDE, 1);
13019 You("learn how to perform kiii!");
13020 break;
13021 case 7:
13022 case 8:
13023 case 9:
13024 learntech_or_leveltech(T_RESEARCH, FROMOUTSIDE, 1);
13025 You("learn how to perform research!");
13026 break;
13027 case 10:
13028 case 11:
13029 case 12:
13030 learntech_or_leveltech(T_SURGERY, FROMOUTSIDE, 1);
13031 You("learn how to perform surgery!");
13032 break;
13033 case 13:
13034 case 14:
13035 case 15:
13036 learntech_or_leveltech(T_REINFORCE, FROMOUTSIDE, 1);
13037 You("learn how to perform reinforce memory!");
13038 break;
13039 case 16:
13040 case 17:
13041 case 18:
13042 learntech_or_leveltech(T_FLURRY, FROMOUTSIDE, 1);
13043 You("learn how to perform missile flurry!");
13044 break;
13045 case 19:
13046 case 20:
13047 case 21:
13048 learntech_or_leveltech(T_PRACTICE, FROMOUTSIDE, 1);
13049 You("learn how to perform weapon practice!");
13050 break;
13051 case 22:
13052 case 23:
13053 case 24:
13054 learntech_or_leveltech(T_EVISCERATE, FROMOUTSIDE, 1);
13055 You("learn how to perform eviscerate!");
13056 break;
13057 case 25:
13058 case 26:
13059 case 27:
13060 learntech_or_leveltech(T_HEAL_HANDS, FROMOUTSIDE, 1);
13061 You("learn how to perform healing hands!");
13062 break;
13063 case 28:
13064 case 29:
13065 case 30:
13066 learntech_or_leveltech(T_CALM_STEED, FROMOUTSIDE, 1);
13067 You("learn how to perform calm steed!");
13068 break;
13069 case 31:
13070 case 32:
13071 case 33:
13072 learntech_or_leveltech(T_TURN_UNDEAD, FROMOUTSIDE, 1);
13073 You("learn how to perform turn undead!");
13074 break;
13075 case 34:
13076 case 35:
13077 case 36:
13078 learntech_or_leveltech(T_VANISH, FROMOUTSIDE, 1);
13079 You("learn how to perform vanish!");
13080 break;
13081 case 37:
13082 case 38:
13083 case 39:
13084 learntech_or_leveltech(T_CUTTHROAT, FROMOUTSIDE, 1);
13085 You("learn how to perform cutthroat!");
13086 break;
13087 case 40:
13088 case 41:
13089 learntech_or_leveltech(T_BLESSING, FROMOUTSIDE, 1);
13090 You("learn how to perform blessing!");
13091 break;
13092 case 42:
13093 case 43:
13094 case 44:
13095 learntech_or_leveltech(T_E_FIST, FROMOUTSIDE, 1);
13096 You("learn how to perform elemental fist!");
13097 break;
13098 case 45:
13099 case 46:
13100 case 47:
13101 learntech_or_leveltech(T_PRIMAL_ROAR, FROMOUTSIDE, 1);
13102 You("learn how to perform primal roar!");
13103 break;
13104 case 48:
13105 case 49:
13106 learntech_or_leveltech(T_LIQUID_LEAP, FROMOUTSIDE, 1);
13107 You("learn how to perform liquid leap!");
13108 break;
13109 case 50:
13110 case 51:
13111 case 52:
13112 learntech_or_leveltech(T_CRIT_STRIKE, FROMOUTSIDE, 1);
13113 You("learn how to perform critical strike!");
13114 break;
13115 case 53:
13116 case 54:
13117 case 55:
13118 learntech_or_leveltech(T_SIGIL_CONTROL, FROMOUTSIDE, 1);
13119 You("learn how to perform sigil of control!");
13120 break;
13121 case 56:
13122 case 57:
13123 case 58:
13124 learntech_or_leveltech(T_SIGIL_TEMPEST, FROMOUTSIDE, 1);
13125 You("learn how to perform sigil of tempest!");
13126 break;
13127 case 59:
13128 case 60:
13129 case 61:
13130 learntech_or_leveltech(T_SIGIL_DISCHARGE, FROMOUTSIDE, 1);
13131 You("learn how to perform sigil of discharge!");
13132 break;
13133 case 62:
13134 case 63:
13135 case 64:
13136 learntech_or_leveltech(T_RAISE_ZOMBIES, FROMOUTSIDE, 1);
13137 You("learn how to perform raise zombies!");
13138 break;
13139 case 65:
13140 learntech_or_leveltech(T_REVIVE, FROMOUTSIDE, 1);
13141 You("learn how to perform revivification!");
13142 break;
13143 case 66:
13144 case 67:
13145 case 68:
13146 learntech_or_leveltech(T_WARD_FIRE, FROMOUTSIDE, 1);
13147 You("learn how to perform ward against fire!");
13148 break;
13149 case 69:
13150 case 70:
13151 case 71:
13152 learntech_or_leveltech(T_WARD_COLD, FROMOUTSIDE, 1);
13153 You("learn how to perform ward against cold!");
13154 break;
13155 case 72:
13156 case 73:
13157 case 74:
13158 learntech_or_leveltech(T_WARD_ELEC, FROMOUTSIDE, 1);
13159 You("learn how to perform ward against electricity!");
13160 break;
13161 case 75:
13162 case 76:
13163 case 77:
13164 learntech_or_leveltech(T_TINKER, FROMOUTSIDE, 1);
13165 You("learn how to perform tinker!");
13166 break;
13167 case 78:
13168 case 79:
13169 case 80:
13170 learntech_or_leveltech(T_RAGE, FROMOUTSIDE, 1);
13171 You("learn how to perform rage eruption!");
13172 break;
13173 case 81:
13174 case 82:
13175 case 83:
13176 learntech_or_leveltech(T_BLINK, FROMOUTSIDE, 1);
13177 You("learn how to perform blink!");
13178 break;
13179 case 84:
13180 case 85:
13181 case 86:
13182 learntech_or_leveltech(T_CHI_STRIKE, FROMOUTSIDE, 1);
13183 You("learn how to perform chi strike!");
13184 break;
13185 case 87:
13186 case 88:
13187 case 89:
13188 learntech_or_leveltech(T_DRAW_ENERGY, FROMOUTSIDE, 1);
13189 You("learn how to perform draw energy!");
13190 break;
13191 case 90:
13192 case 91:
13193 case 92:
13194 learntech_or_leveltech(T_CHI_HEALING, FROMOUTSIDE, 1);
13195 You("learn how to perform chi healing!");
13196 break;
13197 case 93:
13198 case 94:
13199 case 95:
13200 learntech_or_leveltech(T_DAZZLE, FROMOUTSIDE, 1);
13201 You("learn how to perform dazzle!");
13202 break;
13203 case 96:
13204 case 97:
13205 case 98:
13206 learntech_or_leveltech(T_BLITZ, FROMOUTSIDE, 1);
13207 You("learn how to perform chained blitz!");
13208 break;
13209 case 99:
13210 case 100:
13211 case 101:
13212 learntech_or_leveltech(T_PUMMEL, FROMOUTSIDE, 1);
13213 You("learn how to perform pummel!");
13214 break;
13215 case 102:
13216 case 103:
13217 case 104:
13218 learntech_or_leveltech(T_G_SLAM, FROMOUTSIDE, 1);
13219 You("learn how to perform ground slam!");
13220 break;
13221 case 105:
13222 case 106:
13223 case 107:
13224 learntech_or_leveltech(T_DASH, FROMOUTSIDE, 1);
13225 You("learn how to perform air dash!");
13226 break;
13227 case 108:
13228 case 109:
13229 case 110:
13230 learntech_or_leveltech(T_POWER_SURGE, FROMOUTSIDE, 1);
13231 You("learn how to perform power surge!");
13232 break;
13233 case 111:
13234 case 112:
13235 case 113:
13236 learntech_or_leveltech(T_SPIRIT_BOMB, FROMOUTSIDE, 1);
13237 You("learn how to perform spirit bomb!");
13238 break;
13239 case 114:
13240 case 115:
13241 case 116:
13242 learntech_or_leveltech(T_DRAW_BLOOD, FROMOUTSIDE, 1);
13243 You("learn how to perform draw blood!");
13244 break;
13245 case 117:
13246 learntech_or_leveltech(T_WORLD_FALL, FROMOUTSIDE, 1);
13247 You("learn how to perform world fall!");
13248 break;
13249 case 118:
13250 case 119:
13251 case 120:
13252 learntech_or_leveltech(T_CREATE_AMMO, FROMOUTSIDE, 1);
13253 You("learn how to perform create ammo!");
13254 break;
13255 case 121:
13256 case 122:
13257 case 123:
13258 learntech_or_leveltech(T_POKE_BALL, FROMOUTSIDE, 1);
13259 You("learn how to perform poke ball!");
13260 break;
13261 case 124:
13262 case 125:
13263 case 126:
13264 learntech_or_leveltech(T_ATTIRE_CHARM, FROMOUTSIDE, 1);
13265 You("learn how to perform attire charm!");
13266 break;
13267 case 127:
13268 case 128:
13269 case 129:
13270 learntech_or_leveltech(T_SUMMON_TEAM_ANT, FROMOUTSIDE, 1);
13271 You("learn how to perform summon team ant!");
13272 break;
13273 case 130:
13274 case 131:
13275 case 132:
13276 learntech_or_leveltech(T_JEDI_JUMP, FROMOUTSIDE, 1);
13277 You("learn how to perform jedi jump!");
13278 break;
13279 case 133:
13280 case 134:
13281 case 135:
13282 learntech_or_leveltech(T_CHARGE_SABER, FROMOUTSIDE, 1);
13283 You("learn how to perform charge saber!");
13284 break;
13285 case 136:
13286 case 137:
13287 case 138:
13288 learntech_or_leveltech(T_TELEKINESIS, FROMOUTSIDE, 1);
13289 You("learn how to perform telekinesis!");
13290 break;
13291 case 139:
13292 learntech_or_leveltech(T_EGG_BOMB, FROMOUTSIDE, 1);
13293 You("learn how to perform egg bomb!");
13294 break;
13295 case 140:
13296 case 141:
13297 case 142:
13298 learntech_or_leveltech(T_BOOZE, FROMOUTSIDE, 1);
13299 You("learn how to perform booze!");
13300 break;
13301 case 143:
13302 case 144:
13303 case 145:
13304 learntech_or_leveltech(T_IRON_SKIN, FROMOUTSIDE, 1);
13305 You("learn how to perform iron skin!");
13306 break;
13307 case 146:
13308 learntech_or_leveltech(T_POLYFORM, FROMOUTSIDE, 1);
13309 You("learn how to perform polyform!");
13310 break;
13311 case 147:
13312 case 148:
13313 case 149:
13314 learntech_or_leveltech(T_CONCENTRATING, FROMOUTSIDE, 1);
13315 You("learn how to perform concentrating!");
13316 break;
13317 case 150:
13318 learntech_or_leveltech(T_SUMMON_PET, FROMOUTSIDE, 1);
13319 You("learn how to perform summon pet!");
13320 break;
13321 case 151:
13322 case 152:
13323 learntech_or_leveltech(T_DOUBLE_THROWNAGE, FROMOUTSIDE, 1);
13324 You("learn how to perform double thrownage!");
13325 break;
13326 case 153:
13327 case 154:
13328 case 155:
13329 learntech_or_leveltech(T_SHIELD_BASH, FROMOUTSIDE, 1);
13330 You("learn how to perform shield bash!");
13331 break;
13332 case 156:
13333 case 157:
13334 learntech_or_leveltech(T_RECHARGE, FROMOUTSIDE, 1);
13335 You("learn how to perform recharge!");
13336 break;
13337 case 158:
13338 case 159:
13339 case 160:
13340 learntech_or_leveltech(T_SPIRITUALITY_CHECK, FROMOUTSIDE, 1);
13341 You("learn how to perform spirituality check!");
13342 break;
13343 case 161:
13344 learntech_or_leveltech(T_EDDY_WIND, FROMOUTSIDE, 1);
13345 You("learn how to perform eddy wind!");
13346 break;
13347 case 162:
13348 learntech_or_leveltech(T_BLOOD_RITUAL, FROMOUTSIDE, 1);
13349 You("learn how to perform blood ritual!");
13350 break;
13351 case 163:
13352 learntech_or_leveltech(T_ENT_S_POTION, FROMOUTSIDE, 1);
13353 You("learn how to perform ent's potion!");
13354 break;
13355 case 164:
13356 case 165:
13357 learntech_or_leveltech(T_LUCKY_GAMBLE, FROMOUTSIDE, 1);
13358 You("learn how to perform lucky gamble!");
13359 break;
13360 case 166:
13361 learntech_or_leveltech(T_DECONTAMINATE, FROMOUTSIDE, 1);
13362 You("learn how to perform decontaminate!");
13363 break;
13364 case 167:
13365 learntech_or_leveltech(T_WONDERSPELL, FROMOUTSIDE, 1);
13366 You("learn how to perform wonderspell!");
13367 break;
13368 case 168:
13369 learntech_or_leveltech(T_RESET_TECHNIQUE, FROMOUTSIDE, 1);
13370 You("learn how to perform reset technique!");
13371 break;
13372 case 169:
13373 case 170:
13374 learntech_or_leveltech(T_DIAMOND_BARRIER, FROMOUTSIDE, 1);
13375 You("learn how to perform diamond barrier!");
13376 break;
13377 case 171:
13378 case 172:
13379 case 173:
13380 learntech_or_leveltech(T_ZAP_EM, FROMOUTSIDE, 1);
13381 You("learn how to perform zap em!");
13382 break;
13383 case 174:
13384 case 175:
13385 case 176:
13386 learntech_or_leveltech(T_CARD_TRICK, FROMOUTSIDE, 1);
13387 You("learn how to perform card trick!");
13388 break;
13389 case 177:
13390 learntech_or_leveltech(T_SKILLOMORPH, FROMOUTSIDE, 1);
13391 You("learn how to perform skillomorph!");
13392 break;
13393 case 178:
13394 case 179:
13395 case 180:
13396 learntech_or_leveltech(T_TERRAIN_CLEANUP, FROMOUTSIDE, 1);
13397 You("learn how to perform terrain cleanup!");
13398 break;
13399 case 181:
13400 case 182:
13401 case 183:
13402 learntech_or_leveltech(T_PREACHING, FROMOUTSIDE, 1);
13403 You("learn how to perform preaching!");
13404 break;
13405 case 184:
13406 case 185:
13407 case 186:
13408 learntech_or_leveltech(T_ON_THE_SAME_TEAM, FROMOUTSIDE, 1);
13409 You("learn how to perform on the same team!");
13410 break;
13411 case 187:
13412 learntech_or_leveltech(T_PERMAMORPH, FROMOUTSIDE, 1);
13413 You("learn how to perform permamorph!");
13414 break;
13415 case 188:
13416 learntech_or_leveltech(T_SPELL_SPAM, FROMOUTSIDE, 1);
13417 You("learn how to perform spell spam!");
13418 break;
13419 case 189:
13420 learntech_or_leveltech(T_ROCK_TO_POISON, FROMOUTSIDE, 1);
13421 You("learn how to perform rock-to-poison!");
13422 break;
13423 case 190:
13424 learntech_or_leveltech(T_HARDCORE_ALIENIZATION, FROMOUTSIDE, 1);
13425 You("learn how to perform hardcore alienization!");
13426 break;
13428 default:
13429 break;
13435 /* can you use a martial arts technique? normally you have to be bare-handed, but there may be exceptions --Amy */
13436 boolean
13437 canuseunarmedtechs()
13439 /* dual-wielding prevents it entirely */
13440 if (u.twoweap && uswapwep) return FALSE;
13442 /* godae musul is a special artifact that is suitable for martial arts moves */
13443 if (uwep && uwep->oartifact == ART_GODAE_MUSUL) return TRUE;
13444 /* and so is blammer of doom */
13445 if (uwep && uwep->oartifact == ART_BLAMMER_OF_DOOM) return TRUE;
13447 /* supermarket cashier can use martial arts moves with all tin openers because he knows "tin-fu" */
13448 if (uwep && Role_if(PM_SUPERMARKET_CASHIER) && (uwep->otyp == LASER_TIN_OPENER || uwep->otyp == TIN_OPENER || uwep->otyp == BUDO_NO_SASU || uwep->otyp == JEONTU_GEOM) ) return TRUE;
13450 if (u.martialstyle == MARTIALSTYLE_HAIDONGGUMDO && uwep && uwep->otyp == JEONTU_GEOM) return TRUE;
13452 /* everyone else needs to be bare-handed */
13453 if (uwep) return FALSE;
13455 return TRUE;
13458 void
13459 resettechniqueextra()
13462 int numtechs;
13463 pline("Choose a technique to reset. The prompt will loop until you actually make a choice.");
13464 resetretrying:
13465 for (numtechs = 0; numtechs < MAXTECH && techid(numtechs) != NO_TECH; numtechs++) {
13466 if (techid(numtechs) == T_RESET_TECHNIQUE) continue;
13467 if (techtout(numtechs) > 0) {
13468 pline("Your %s technique is currently on timeout.", techname(numtechs));
13469 if (yn("Make this technique usable again?") == 'y') {
13470 techtout(numtechs) = 0;
13471 pline("The timeout on your %s technique has been set to zero.", techname(numtechs));
13472 goto resettechdone;
13476 pline("If you don't feel like resetting a technique right now, you can choose to reset none at all.");
13477 if (yn("Do you want to reset no technique at all?") == 'y') {
13478 goto resettechdone;
13480 goto resetretrying;
13482 resettechdone:
13483 return;
13486 #ifdef DEBUG
13487 void
13488 wiz_debug_cmd() /* in this case, allow controlled loss of techniques */
13490 int tech_no, id, n = 0;
13491 long mask;
13492 if (gettech(&tech_no)) {
13493 id = techid(tech_no);
13494 if (id == NO_TECH) {
13495 impossible("Unknown technique ([%d])?", tech_no);
13496 return;
13498 mask = tech_list[tech_no].t_intrinsic;
13499 if (mask & FROMOUTSIDE) n++;
13500 if (mask & FROMRACE) n++;
13501 if (mask & FROMEXPER) n++;
13502 if (!n) {
13503 impossible("No intrinsic masks set (0x%lX).", mask);
13504 return;
13506 n = rn2(n);
13507 if (mask & FROMOUTSIDE && !n--) mask = FROMOUTSIDE;
13508 if (mask & FROMRACE && !n--) mask = FROMRACE;
13509 if (mask & FROMEXPER && !n--) mask = FROMEXPER;
13510 learntech(id, mask, -1);
13511 if (!tech_known(id))
13512 You("lose the ability to perform %s.", tech_names[id]);
13515 #endif /* DEBUG */