Blindfold removal fix
[slashemextended.git] / src / sit.c
blob3f2c1ddf824590ea46d88777fce0a4e893440574
1 /* SCCS Id: @(#)sit.c 3.4 2002/09/21 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
5 #include "hack.h"
6 #include "artifact.h"
8 static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0};
9 static const char allnoncount[] = { ALL_CLASSES, 0};
11 void
12 take_gold()
14 #ifndef GOLDOBJ
15 if (u.ugold <= 0) {
16 You_feel("a strange sensation.");
17 } else {
18 You("notice you have no gold!");
19 u.bankcashamount += u.ugold; /* even if you don't have the bank trap effect --Amy */
20 u.ugold = 0;
21 flags.botl = 1;
23 #else
24 struct obj *otmp, *nobj;
25 int lost_money = 0;
26 for (otmp = invent; otmp; otmp = nobj) {
27 nobj = otmp->nobj;
28 if (otmp->oclass == COIN_CLASS) {
29 lost_money = 1;
30 delobj(otmp);
33 if (!lost_money) {
34 You_feel("a strange sensation.");
35 } else {
36 You("notice you have no money!");
37 flags.botl = 1;
39 #endif
42 int
43 dosit()
46 register struct obj *otmp;
48 if (MenuIsBugged) {
49 pline("The sit command is currently unavailable!");
50 if (flags.moreforced && !MessagesSuppressed) display_nhwindow(WIN_MESSAGE, TRUE); /* --More-- */
51 return 0;
54 static const char sit_message[] = "sit on the %s.";
55 register struct trap *trap;
56 register int typ = levl[u.ux][u.uy].typ;
59 if (u.usteed) {
60 You("are already sitting on %s.", mon_nam(u.usteed));
61 return (0);
64 if(!can_reach_floor()) {
65 if (Levitation)
66 You("tumble in place.");
67 else
68 You("are sitting on air.");
69 return 0;
70 } else if (is_waterypool(u.ux, u.uy) && !Underwater) { /* water walking */
71 goto in_water;
74 if(OBJ_AT(u.ux, u.uy)) {
75 register struct obj *obj;
77 obj = level.objects[u.ux][u.uy];
78 You("sit on %s.", the(xname(obj)));
79 if (!(Is_box(obj) || objects[obj->otyp].oc_material == MT_CLOTH || objects[obj->otyp].oc_material == MT_SILK || objects[obj->otyp].oc_material == MT_INKA))
80 pline("It's not very comfortable...");
82 } else if ((trap = t_at(u.ux, u.uy)) != 0 ||
83 (u.utrap && (u.utraptype >= TT_LAVA))) {
85 if (u.utrap) {
86 exercise(A_WIS, FALSE); /* you're getting stuck longer */
87 if(u.utraptype == TT_BEARTRAP) {
88 You_cant("sit down with your %s in the bear trap.", body_part(FOOT));
89 u.utrap++;
90 } else if(u.utraptype == TT_PIT) {
91 if(trap->ttyp == SPIKED_PIT) {
92 You("sit down on a spike. Ouch!");
93 losehp(1, "sitting on an iron spike", KILLED_BY);
94 exercise(A_STR, FALSE);
95 } else
96 You("sit down in the pit.");
97 u.utrap += rn2(5);
98 } else if(u.utraptype == TT_WEB) {
99 You("sit in the spider web and get entangled further!");
100 u.utrap += rn1(10, 5);
101 } else if(u.utraptype == TT_GLUE) {
102 You("immerse yourself with glue!");
103 u.utrap += rn1(10, 5);
104 } else if(u.utraptype == TT_LAVA) {
105 /* Must have fire resistance or they'd be dead already */
106 You("sit in the lava!");
107 u.utrap += rnd(4);
108 losehp(d(2,10), "sitting in lava", KILLED_BY);
109 } else if(u.utraptype == TT_INFLOOR) {
110 You_cant("maneuver to sit!");
111 u.utrap++;
113 } else {
114 You("sit down.");
115 dotrap(trap, 0);
117 } else if(Underwater || Is_waterlevel(&u.uz)) {
118 if (Is_waterlevel(&u.uz))
119 There("are no cushions floating nearby.");
120 else
121 You("sit down on the muddy bottom.");
122 } else if(is_waterypool(u.ux, u.uy)) {
123 in_water:
124 You("sit in the water.");
125 if (!rn2(10) && uarm)
126 (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst);
127 else if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS)
128 (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst);
129 } else if(IS_SINK(typ)) {
131 You(sit_message, defsyms[S_sink].explanation);
132 Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside");
133 } else if(IS_TOILET(typ)) {
134 You(sit_message, defsyms[S_toilet].explanation);
135 if ((!Sick || !issoviet) && (u.uhs > 0)) You("don't have to go...");
136 else {
137 u.cnd_toiletamount++; /* doesn't count if you don't actually take a crap :P --Amy */
138 if (issoviet && u.uhs > 0) pline("Vy der'mo vedro, vy delayete svoye der'mo iz vozdukha? Nel'zya dazhe der'mo, kak i vy!");
140 use_skill(P_SQUEAKING, 2);
141 if (uarmu && uarmu->oartifact == ART_KATIA_S_SOFT_COTTON) {
142 You("produce very erotic noises.");
143 if (!rn2(10)) adjattrib(rn2(A_CHA), 1, -1, TRUE);
145 else if (Role_if(PM_BARBARIAN) || Role_if(PM_NOOB_MODE_BARB) || Role_if(PM_CAVEMAN)) You("miss...");
146 else You("grunt.");
148 if (practicantterror) {
149 pline("%s booms: 'There's a fee of 100 zorkmids for using the toilet.'", noroelaname());
150 fineforpracticant(100, 0, 0);
151 if (Role_if(PM_BARBARIAN) || Role_if(PM_NOOB_MODE_BARB) || Role_if(PM_CAVEMAN)) {
152 pline("%s thunders: 'People like you are the reason for that usage fee! You pay 5000 zorkmids extra for smutching the toilet!'", noroelaname());
153 fineforpracticant(5000, 0, 0);
157 if (uarmf && uarmf->oartifact == ART_LUDGERA_S_SECRET_COURSE) {
158 pline("That felt good.");
159 incr_itimeout(&HFast, rn1(250, 250));
162 /* Based on real life experience (urgh) this doesn't always instantly cure sickness. --Amy */
163 if (Sick && !rn2(3) ) make_sick(0L, (char *)0, TRUE, SICK_VOMITABLE);
164 else if (Sick && !rn2(10) ) make_sick(0L, (char *)0, TRUE, SICK_ALL);
165 if (u.uhs == 0) morehungry(rn2(400)+200);
167 } else if(IS_ALTAR(typ)) {
169 You(sit_message, defsyms[S_altar].explanation);
170 altar_wrath(u.ux, u.uy);
172 } else if(IS_GRAVE(typ)) {
174 You(sit_message, defsyms[S_grave].explanation);
176 } else if(typ == STAIRS) {
178 You(sit_message, "stairs");
180 } else if(typ == LADDER) {
182 You(sit_message, "ladder");
184 } else if (is_lava(u.ux, u.uy)) {
186 /* must be WWalking */
187 You(sit_message, "lava");
188 burn_away_slime();
189 if (likes_lava(youmonst.data) || (uarmf && itemhasappearance(uarmf, APP_HOT_BOOTS) ) || (uamul && uamul->otyp == AMULET_OF_D_TYPE_EQUIPMENT) || FireImmunity || (powerfulimplants() && uimplant && uimplant->oartifact == ART_RUBBER_SHOALS) || Race_if(PM_PLAYER_SALAMANDER) || (uwep && uwep->oartifact == ART_EVERYTHING_MUST_BURN) || (uwep && uwep->oartifact == ART_MANUELA_S_PRACTICANT_TERRO) || (uarm && uarm->oartifact == ART_LAURA_CROFT_S_BATTLEWEAR) || (uarm && uarm->oartifact == ART_D_TYPE_EQUIPMENT) || (uarmc && uarmc->oartifact == ART_SCOOBA_COOBA) || (uarmf && uarmf->oartifact == ART_JOHANNA_S_RED_CHARM) ) {
190 pline_The("lava feels warm.");
191 return 1;
193 pline_The("lava burns you!");
194 if (Slimed) {
195 pline("The slime is burned away!");
196 Slimed = 0;
198 losehp(d((StrongFire_resistance ? 1 : Fire_resistance ? 2 : 10), 10),
199 "sitting on lava", KILLED_BY);
201 } else if (is_ice(u.ux, u.uy)) {
203 You(sit_message, defsyms[S_ice].explanation);
204 if (!Cold_resistance) pline_The("ice feels cold.");
206 } else if (typ == DRAWBRIDGE_DOWN) {
208 You(sit_message, "drawbridge");
210 } else if(IS_WOODENTABLE(typ)) {
211 pline("Sitting on a table isn't very fruitful.");
213 } else if(IS_FARMLAND(typ)) {
214 pline("Your ass gets dirty from the earthy farmland.");
216 } else if(IS_MOUNTAIN(typ)) {
217 pline("You enjoy the romantic view from the mountaintop.");
219 } else if(IS_WELL(typ)) {
220 pline("You sit down beside the well.");
222 } else if(IS_SNOW(typ)) {
223 pline("You sit on the fluffy snow.");
225 } else if(IS_SAND(typ)) {
226 pline("You sit on the soft sand.");
228 } else if(IS_GRASSLAND(typ)) {
229 pline("You sit on the soft grass.");
231 } else if(IS_BUBBLES(typ)) {
232 pline("You sit on a fleecy bubble.");
234 } else if(IS_POISONEDWELL(typ)) {
235 pline("You sit down beside the poisoned well.");
237 } else if(IS_FOUNTAIN(typ)) {
238 if (youmonst.data->mlet == S_BAD_COINS) { /* by GoldenIvy */
239 You("toss yourself into the fountain.");
240 if (rn2(2)) pline("Heads!"); /* this is purely cosmetical */
241 else pline("Tails!");
242 } else You(sit_message, "fountain");
244 } else if(IS_PENTAGRAM(typ)) {
245 You(sit_message, "pentagram");
246 pline("Nothing happens. In order to interact with the pentagram, use #invoke.");
248 } else if(IS_WAGON(typ)) {
249 You("sit down beside the wagon and try to hide.");
250 u.uundetected = TRUE;
252 } else if(IS_STRAWMATTRESS(typ)) {
253 You(sit_message, "mattress");
254 pline("If for some weird reason you want to fall asleep, stay on the mattress tile for a while. But beware that this will not be a very pleasant sleep and monsters might try to mug you.");
256 } else if(IS_CARVEDBED(typ)) {
258 if (Sleep_resistance) {
260 pline(FunnyHallu ? "It seems you drank too much coffee and therefore cannot sleep." : "You can't seem to fall asleep.");
262 } else if (!Sleep_resistance && (moves < u.bedsleeping)) {
264 You("don't feel sleepy yet.");
266 } else if (!Sleep_resistance && (moves >= u.bedsleeping)) {
268 u.cnd_bedamount++;
269 u.bedsleeping = moves + 100;
270 You("go to bed.");
271 if (FunnyHallu) pline("Sleep-bundle-wing!");
272 fall_asleep(-rnd(20), TRUE);
273 more_experienced(u.ulevel * 5 * (deepest_lev_reached(FALSE) + 1), 0);
274 newexplevel();
275 upnivel(FALSE);
276 if (!rn2(5)) {
277 int i, ii, lim;
278 i = rn2(A_MAX);
279 for (ii = 0; ii < A_MAX; ii++) {
280 lim = AMAX(i);
281 if (i == A_STR && u.uhs >= 3) --lim; /* WEAK */
282 if (ABASE(i) < lim) {
283 ABASE(i) = lim;
284 flags.botl = 1;
285 break;
287 if(++i >= A_MAX) i = 0;
291 if (uarmf && uarmf->oartifact == ART_LARISSA_S_GENTLE_SLEEP) {
292 pline((Role_if(PM_SAMURAI) || Role_if(PM_NINJA)) ? "Jikan ga teishi shimashita." : "Time has stopped.");
293 TimeStopped += rnd(30);
298 } else if(IS_THRONE(typ)) {
300 You(sit_message, defsyms[S_throne].explanation);
301 u.cnd_throneamount++;
302 if (!rn2(2)) {
304 if (uarmg && uarmg->oartifact == ART_FUMBLEFINGERS_QUEST) {
306 {register int cnt = rnd(10);
307 int randmonstforspawn = rnd(68);
308 if (randmonstforspawn == 35) randmonstforspawn = 53;
310 if (Aggravate_monster) {
311 u.aggravation = 1;
312 reset_rndmonst(NON_PM);
315 while(cnt--)
316 (void) makemon(mkclass(randmonstforspawn,0), u.ux, u.uy, NO_MM_FLAGS);
318 u.aggravation = 0;
320 pline("A voice echoes:");
321 verbalize("Oh, please help me! A horrible %s stole my sword! I'm nothing without it.", monexplain[randmonstforspawn]);
324 } else if (uarmg && uarmg->oartifact == ART_PRINCESS_BITCH) {
326 {register int cnt = rnd(10);
327 struct permonst *randmonstforspawn = rndmonst();
329 if (Aggravate_monster) {
330 u.aggravation = 1;
331 reset_rndmonst(NON_PM);
334 while(cnt--)
335 (void) makemon(randmonstforspawn, u.ux, u.uy, NO_MM_FLAGS);
337 u.aggravation = 0;
339 pline("A voice echoes:");
340 verbalize("Leave me alone, stupid %s", randmonstforspawn->mname);
343 } else
345 switch (rnd(32)) {
346 case 1:
347 (void) adjattrib(rn2(A_MAX), -rno(5), FALSE, TRUE);
348 losehp(rnd(10), "cursed throne", KILLED_BY_AN);
349 break;
350 case 2:
351 (void) adjattrib(rn2(A_MAX), 1, FALSE, TRUE);
352 break;
353 case 3:
354 pline("A%s electric shock shoots through your body!",
355 (Shock_resistance) ? "n" : " massive");
356 if (!ShockImmunity) losehp(StrongShock_resistance ? rnd(2) : Shock_resistance ? rnd(6) : rnd(30),
357 "electric chair", KILLED_BY_AN);
358 exercise(A_CON, FALSE);
359 break;
360 case 4:
361 You_feel("much, much better!");
362 if (Upolyd) {
363 if (u.mh >= (u.mhmax - 5)) u.mhmax += 4;
364 u.mh = u.mhmax;
366 if(u.uhp >= (u.uhpmax - 5)) u.uhpmax += 4;
367 u.uhp = u.uhpmax;
368 if (uinsymbiosis) {
369 u.usymbiote.mhpmax += 4;
370 maybe_evolve_symbiote();
371 if (u.usymbiote.mhpmax > 500) u.usymbiote.mhpmax = 500;
373 make_blinded(0L,TRUE);
374 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
375 heal_legs();
376 flags.botl = 1;
377 break;
378 case 5:
379 take_gold();
380 break;
381 case 6:
382 /* ------------===========STEPHEN WHITE'S NEW CODE============------------ */
384 if (u.ulevel < 5) {
385 You_feel("as if a stroke of good luck passed by.");
386 break;
389 if (!rn2(4)) {
391 if(u.uluck < 7) {
392 You_feel("your luck is changing.");
393 if (PlayerHearsSoundEffects) pline(issoviet ? "Kha, vy ne poluchite zhelaniye, potomu chto eto Sovetskaya Rossiya, gde kazhdyy poluchayet odinakovoye kolichestvo zhelaniy! I vy uzhe boleye chem dostatochno, teper' ochered' drugikh personazhey'!" : "DSCHUEueUEueUEueUEueUEue...");
394 change_luck(5);
395 } else makewish(evilfriday ? FALSE : TRUE);
396 } else {
397 othergreateffect();
400 break;
401 case 7:
403 register int cnt = rnd(10);
405 if (Aggravate_monster) {
406 u.aggravation = 1;
407 reset_rndmonst(NON_PM);
410 pline("A voice echoes:");
411 verbalize("Thy audience hath been summoned, %s!",
412 flags.female ? "Dame" : "Sire");
413 while(cnt--)
414 (void) makemon(courtmon(), u.ux, u.uy, NO_MM_FLAGS);
416 u.aggravation = 0;
418 break;
420 case 8:
421 pline("A voice echoes:");
422 verbalize("By thy Imperious order, %s...",
423 flags.female ? "Dame" : "Sire");
424 do_genocide(5); /* REALLY|ONTHRONE, see do_genocide() */
425 break;
426 case 9:
427 pline("A voice echoes:");
428 verbalize("A curse upon thee for sitting upon this most holy throne!");
429 if (Luck > 0) {
430 make_blinded(Blinded + rn1(100,250),TRUE);
431 } else rndcurse();
432 break;
433 case 10:
434 if (Luck < 0 || (HSee_invisible & INTRINSIC)) {
435 if (level.flags.nommap) {
436 pline(
437 "A terrible drone fills your head!");
438 make_confused(HConfusion + rnd(30),
439 FALSE);
440 } else {
441 pline("An image forms in your mind.");
442 do_mapping();
444 } else {
445 Your("vision becomes clear.");
446 HSee_invisible |= FROMOUTSIDE;
447 newsym(u.ux, u.uy);
449 break;
450 case 11:
451 if (Luck < 0) {
452 You_feel("threatened.");
453 aggravate();
454 } else {
456 You_feel("a wrenching sensation.");
457 if (PlayerHearsSoundEffects) pline(issoviet ? "Tam net nikakoy zashchity. Tam net nikakoy nadezhdy. Yedinstvennoye, chto yest'? Uverennost' v tom, chto vy, igrok, budet umeret' uzhasnoy i muchitel'noy smert'yu." : "SCHRING!");
458 tele(); /* teleport him */
460 break;
461 case 12:
462 You("are granted an insight!");
463 if (invent) {
464 /* rn2(5) agrees w/seffects() */
465 identify_pack(rn2(5), 0, 0);
467 break;
468 case 13:
469 Your("mind turns into a pretzel!");
470 make_confused(HConfusion + rn1(7,16),FALSE);
471 break;
472 case 14:
473 You("are granted some new skills!"); /* new effect that unrestricts skills --Amy */
474 unrestrictskillchoice();
475 break;
476 case 15:
477 /* occasionally get extremely lucky --Amy */
478 if (!rn2(50)) {
479 u.weapon_slots++;
480 You("feel very skillful, and gain an extra skill slot!");
481 break;
483 pline("A voice echoes:");
484 verbalize("Thou be cursed!");
485 attrcurse();
486 break;
487 case 16:
488 pline("A voice echoes:");
489 verbalize("Thou shall be punished!");
490 punishx();
491 break;
492 case 17:
493 You_feel("like someone has touched your forehead...");
495 int skillimprove = randomgoodskill();
497 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
498 unrestrict_weapon_skill(skillimprove);
499 pline("You can now learn the %s skill.", wpskillname(skillimprove));
500 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
501 unrestrict_weapon_skill(skillimprove);
502 P_MAX_SKILL(skillimprove) = P_BASIC;
503 pline("You can now learn the %s skill.", wpskillname(skillimprove));
504 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
505 P_MAX_SKILL(skillimprove) = P_SKILLED;
506 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
507 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
508 P_MAX_SKILL(skillimprove) = P_EXPERT;
509 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
510 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
511 P_MAX_SKILL(skillimprove) = P_MASTER;
512 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
513 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
514 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
515 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
516 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
517 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
518 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
519 } else gainlevelmaybe();
521 if (Race_if(PM_RUSMOT)) {
522 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
523 unrestrict_weapon_skill(skillimprove);
524 pline("You can now learn the %s skill.", wpskillname(skillimprove));
525 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
526 unrestrict_weapon_skill(skillimprove);
527 P_MAX_SKILL(skillimprove) = P_BASIC;
528 pline("You can now learn the %s skill.", wpskillname(skillimprove));
529 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
530 P_MAX_SKILL(skillimprove) = P_SKILLED;
531 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
532 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
533 P_MAX_SKILL(skillimprove) = P_EXPERT;
534 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
535 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
536 P_MAX_SKILL(skillimprove) = P_MASTER;
537 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
538 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
539 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
540 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
541 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
542 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
543 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
547 gainlevelmaybe();
549 break;
550 case 18:
551 {register int cnt = rnd(10);
552 struct permonst *randmonstforspawn = rndmonst();
554 if (Aggravate_monster) {
555 u.aggravation = 1;
556 reset_rndmonst(NON_PM);
559 while(cnt--)
560 (void) makemon(randmonstforspawn, u.ux, u.uy, NO_MM_FLAGS);
562 u.aggravation = 0;
564 pline("A voice echoes:");
565 verbalize("Leave me alone, stupid %s", randmonstforspawn->mname);
566 break;
568 case 19:
569 {register int cnt = rnd(10);
570 int randmonstforspawn = rnd(68);
571 if (randmonstforspawn == 35) randmonstforspawn = 53;
573 if (Aggravate_monster) {
574 u.aggravation = 1;
575 reset_rndmonst(NON_PM);
578 while(cnt--)
579 (void) makemon(mkclass(randmonstforspawn,0), u.ux, u.uy, NO_MM_FLAGS);
581 u.aggravation = 0;
583 pline("A voice echoes:");
584 verbalize("Oh, please help me! A horrible %s stole my sword! I'm nothing without it.", monexplain[randmonstforspawn]);
585 break;
587 case 20:
589 if (CannotSelectItemsInPrompts) break;
590 pline("You may fully identify an object!");
592 secureidchoice:
593 otmp = getobj(allnoncount, "secure identify");
595 if (!otmp) {
596 if (yn("Really exit with no object selected?") == 'y')
597 pline("You just wasted the opportunity to secure identify your objects.");
598 else goto secureidchoice;
599 pline("A feeling of loss comes over you.");
600 break;
602 if (otmp) {
603 makeknown(otmp->otyp);
604 if (otmp->oartifact) discover_artifact((int)otmp->oartifact);
605 otmp->known = otmp->dknown = otmp->bknown = otmp->rknown = 1;
606 if (otmp->otyp == EGG && otmp->corpsenm != NON_PM)
607 learn_egg_type(otmp->corpsenm);
608 prinv((char *)0, otmp, 0L);
611 break;
612 case 21:
614 int nastytrapdur = (Role_if(PM_GRADUATE) ? 6 : Role_if(PM_GEEK) ? 12 : 24);
615 if (!nastytrapdur) nastytrapdur = 24; /* fail safe */
616 int blackngdur = (Role_if(PM_GRADUATE) ? 2000 : Role_if(PM_GEEK) ? 1000 : 500);
617 if (!blackngdur ) blackngdur = 500; /* fail safe */
618 randomnastytrapeffect(rnz(nastytrapdur * (monster_difficulty() + 1)), (blackngdur - (monster_difficulty() * 3)));
619 You_feel("uncomfortable.");
621 break;
622 case 22:
623 morehungry(500);
624 pline("Whoops... suddenly you feel hungry.");
625 break;
626 case 23:
627 pline("Suddenly you feel a healing touch!");
628 reducesanity(100);
629 break;
630 case 24:
631 poisoned("throne", rn2(6) /* A_STR ... A_CHA*/, "poisoned throne", 30);
632 break;
633 case 25:
635 int thronegold = rnd(200);
636 u.ugold += thronegold;
637 pline("Some coins come loose! You pick up %d zorkmids.", thronegold);
639 break;
640 case 26:
643 if (Aggravate_monster) {
644 u.aggravation = 1;
645 reset_rndmonst(NON_PM);
648 pline("A voice echoes:");
649 verbalize("Thou hath been summoned to appear before royalty, %s!", playeraliasname);
650 (void) makemon(specialtensmon(rn2(2) ? 105 : 106), u.ux, u.uy, MM_ANGRY); /* M2_LORD, M2_PRINCE */
652 u.aggravation = 0;
655 break;
656 case 27:
657 badeffect();
658 break;
659 case 28:
660 u.uhp++;
661 u.uhpmax++;
662 if (u.uhp > u.uhpmax) u.uhp = u.uhpmax;
663 You_feel("a health boost!");
664 break;
665 case 29:
666 pline("A pretty ethereal woman appears and offers: 'For only 10000 zorkmids, I will give you a very rare trinket!");
667 if (u.ugold < 10000) {
668 pline("But you don't have enough money! Frustrated, she places a terrible curse on you and disappears.");
669 randomfeminismtrap(rnz( (level_difficulty() + 2) * rnd(50)));
671 else {
672 char femhandlebuf[BUFSZ];
673 getlin ("Do you want to buy her goods? [y/yes/no]",femhandlebuf);
674 (void) lcase (femhandlebuf);
675 if (!(strcmp (femhandlebuf, "yes")) || !(strcmp (femhandlebuf, "y")) || !(strcmp (femhandlebuf, "ye")) || !(strcmp (femhandlebuf, "ys"))) {
676 u.ugold -= 10000;
677 register struct obj *acqo;
678 acqo = mksobj(makegreatitem(), TRUE, TRUE, FALSE);
679 if (acqo) {
680 dropy(acqo);
681 verbalize("Thanks a lot! You'll find your prize on the ground.");
682 } else {
683 verbalize("Oh sorry, I must have misplaced it. Here you have your money back. Maybe next time I'll have something for you.");
684 u.ugold += 10000;
686 } else {
687 verbalize("You will regret that decision!");
688 randomfeminismtrap(rnz( (level_difficulty() + 2) * rnd(50)));
692 break;
693 case 30:
694 pline("A shady merchant appears and offers: 'Sale! Sale! I'm selling you this useful item for 2000 zorkmids!");
695 if (u.ugold < 2000) {
696 pline("But you don't have enough money! The merchant disappears.");
698 else {
699 char femhandlebuf[BUFSZ];
700 getlin ("Do you want to buy his item? [y/yes/no]",femhandlebuf);
701 (void) lcase (femhandlebuf);
702 if (!(strcmp (femhandlebuf, "yes")) || !(strcmp (femhandlebuf, "y")) || !(strcmp (femhandlebuf, "ye")) || !(strcmp (femhandlebuf, "ys"))) {
703 u.ugold -= 2000;
704 register struct obj *acqo;
705 acqo = mksobj(usefulitem(), TRUE, TRUE, FALSE);
706 if (acqo) {
707 dropy(acqo);
708 verbalize("Thank you! I've dropped the item at your feet.");
709 } else {
710 verbalize("Nyah-nyah, thanks for the money, sucker!");
712 } else {
713 verbalize("Are you sure? Well, it's your decision. I'll find someone else to sell it to, then.");
716 break;
717 case 31:
719 struct obj *stupidstone;
720 stupidstone = mksobj_at(rnd_class(RIGHT_MOUSE_BUTTON_STONE,NASTY_STONE), u.ux, u.uy, TRUE, FALSE, FALSE);
721 if (stupidstone) {
722 stupidstone->quan = 1L;
723 stupidstone->owt = weight(stupidstone);
724 if (!Blind) stupidstone->dknown = 1;
725 if (stupidstone) {
726 pline("%s lands in your knapsack!", Doname2(stupidstone));
727 (void) pickup_object(stupidstone, 1L, TRUE, TRUE);
731 break;
732 case 32:
733 (void) mksobj_at(rnd_class(DILITHIUM_CRYSTAL, ROCK), u.ux, u.uy, TRUE, TRUE, FALSE);
734 pline("Some stones come loose!");
735 break;
737 default: impossible("throne effect");
738 break;
740 } else {
741 if (is_prince(youmonst.data))
742 You_feel("very comfortable here.");
743 else
744 You_feel("somehow out of place...");
747 if (u.ualign.type == A_CHAOTIC) adjalign(1);
749 if (!rn2(6) && IS_THRONE(levl[u.ux][u.uy].typ)) {
751 boolean thronewillvanish = TRUE;
753 if (wizard) {
754 if (yn("Make the throne vanish?") == 'n')
755 thronewillvanish = FALSE;
758 /* may have teleported */
760 if (thronewillvanish) {
762 levl[u.ux][u.uy].typ = ROOM;
763 pline_The("throne vanishes in a puff of logic.");
764 newsym(u.ux,u.uy);
768 } else if (lays_eggs(youmonst.data)) {
769 struct obj *uegg;
771 if (monsndx(youmonst.data) >= NUMMONS) {
772 You("can't lay eggs as a missingno because they would crash the game!");
773 return 0;
776 if (!flags.female) {
777 pline(FunnyHallu ? "You try to lay an egg, but instead you... okay let's not go there." : "Males can't lay eggs!");
778 return 0;
781 if (u.uhunger < (int)objects[EGG].oc_nutrition) {
782 You("don't have enough energy to lay an egg.");
783 return 0;
786 if (u.egglayingtimeout) {
787 pline("You need to wait %d turns to lay another egg!", u.egglayingtimeout);
788 return 0;
791 uegg = mksobj(EGG, FALSE, FALSE, FALSE);
792 if (uegg) {
793 uegg->spe = 1;
794 uegg->quan = 1;
795 uegg->owt = weight(uegg);
796 uegg->corpsenm = egg_type_from_parent(u.umonnum, FALSE);
797 uegg->known = uegg->dknown = 1;
798 attach_egg_hatch_timeout(uegg);
799 You("lay an egg.");
800 dropy(uegg);
801 stackobj(uegg);
802 morehungry((int)objects[EGG].oc_nutrition);
803 u.egglayingtimeout = rnz(1000);
804 if (!PlayerCannotUseSkills) {
805 switch (P_SKILL(P_SQUEAKING)) {
806 case P_BASIC: u.egglayingtimeout *= 9; u.egglayingtimeout /= 10; break;
807 case P_SKILLED: u.egglayingtimeout *= 8; u.egglayingtimeout /= 10; break;
808 case P_EXPERT: u.egglayingtimeout *= 7; u.egglayingtimeout /= 10; break;
809 case P_MASTER: u.egglayingtimeout *= 6; u.egglayingtimeout /= 10; break;
810 case P_GRAND_MASTER: u.egglayingtimeout *= 5; u.egglayingtimeout /= 10; break;
811 case P_SUPREME_MASTER: u.egglayingtimeout *= 4; u.egglayingtimeout /= 10; break;
812 default: break;
816 pline("You will be able to lay another egg in %d turns.", u.egglayingtimeout);
817 use_skill(P_SQUEAKING, rnd(20));
819 } else if (u.uswallow)
820 There("are no seats in here!");
821 else
822 pline("Having fun sitting on the %s?", surface(u.ux,u.uy));
823 return(1);
826 /* the cap of a skill has been changed: now make sure the skill level isn't higher than the cap --Amy */
827 void
828 skill_sanity_check(skilltocheck)
829 int skilltocheck;
831 int tryct = 2000;
832 int i = 0;
834 /* if you have spent skill points, undo them until the skill in question isn't higher than the cap anymore */
835 while (u.skills_advanced && tryct && ((P_SKILL(skilltocheck) > P_MAX_SKILL(skilltocheck)) || (P_SKILL(skilltocheck) >= P_BASIC && P_ADVANCE(skilltocheck) < (practice_needed_to_advance_nonmax(P_SKILL(skilltocheck) - 1, skilltocheck)) )) ) {
837 lose_last_spent_skill();
838 i++;
839 tryct--;
842 /* refund the skill slots */
843 while (i) {
844 if (evilfriday && !u.evilvarhack) {
845 pline("This is the evil variant. Your skill point is lost forever.");
846 u.evilvarhack = TRUE;
847 } else u.weapon_slots++; /* because every skill up costs one slot --Amy */
848 i--;
851 /* did a skill become restricted? then being unskilled should result in becoming restricted */
852 if (P_SKILL(skilltocheck) == P_UNSKILLED && P_MAX_SKILL(skilltocheck) == P_ISRESTRICTED) {
853 P_SKILL(skilltocheck) = P_ISRESTRICTED;
856 /* still higher than the cap? that probably means you started with some knowledge of the skill... */
857 if ((P_SKILL(skilltocheck) > P_MAX_SKILL(skilltocheck)) || (P_SKILL(skilltocheck) >= P_BASIC && P_ADVANCE(skilltocheck) < (practice_needed_to_advance_nonmax(P_SKILL(skilltocheck) - 1, skilltocheck)) ) ) {
859 int skillamount = 0;
860 while ((P_SKILL(skilltocheck) > P_MAX_SKILL(skilltocheck)) || (P_SKILL(skilltocheck) >= P_BASIC && P_ADVANCE(skilltocheck) < (practice_needed_to_advance_nonmax(P_SKILL(skilltocheck) - 1, skilltocheck)) ) ) {
861 if (P_SKILL(skilltocheck) == P_UNSKILLED && P_MAX_SKILL(skilltocheck) == P_ISRESTRICTED) {
862 P_SKILL(skilltocheck) = P_ISRESTRICTED;
863 } else {
864 P_SKILL(skilltocheck) -= 1;
865 skillamount++;
869 while (skillamount > 0) {
870 skillamount--;
871 if (evilfriday && !u.evilvarhack) {
872 pline("This is the evil variant. Your skill point is lost forever.");
873 u.evilvarhack = TRUE;
874 } else u.weapon_slots++;
880 void
881 skillcaploss()
884 int skilltoreduce = randomgoodskill();
886 if (P_RESTRICTED(skilltoreduce)) return; /* nothing to do */
888 if (P_MAX_SKILL(skilltoreduce) == P_BASIC) {
889 P_MAX_SKILL(skilltoreduce) = P_ISRESTRICTED;
890 pline("You lose all knowledge of the %s skill!", wpskillname(skilltoreduce));
891 P_ADVANCE(skilltoreduce) = 0;
892 } else if (!rn2(2) && P_MAX_SKILL(skilltoreduce) == P_SKILLED) {
893 P_MAX_SKILL(skilltoreduce) = P_BASIC;
894 pline("You lose some knowledge of the %s skill!", wpskillname(skilltoreduce));
895 } else if (!rn2(4) && P_MAX_SKILL(skilltoreduce) == P_EXPERT) {
896 P_MAX_SKILL(skilltoreduce) = P_SKILLED;
897 pline("You lose some knowledge of the %s skill!", wpskillname(skilltoreduce));
898 } else if (!rn2(10) && P_MAX_SKILL(skilltoreduce) == P_MASTER) {
899 P_MAX_SKILL(skilltoreduce) = P_EXPERT;
900 pline("You lose some knowledge of the %s skill!", wpskillname(skilltoreduce));
901 } else if (!rn2(100) && P_MAX_SKILL(skilltoreduce) == P_GRAND_MASTER) {
902 P_MAX_SKILL(skilltoreduce) = P_MASTER;
903 pline("You lose some knowledge of the %s skill!", wpskillname(skilltoreduce));
904 } else if (!rn2(200) && P_MAX_SKILL(skilltoreduce) == P_SUPREME_MASTER) {
905 P_MAX_SKILL(skilltoreduce) = P_GRAND_MASTER;
906 pline("You lose some knowledge of the %s skill!", wpskillname(skilltoreduce));
909 skill_sanity_check(skilltoreduce);
911 return;
915 void
916 skillcaploss_specific(skilltoreduce)
917 int skilltoreduce;
920 if (P_RESTRICTED(skilltoreduce)) return; /* nothing to do */
922 if (P_MAX_SKILL(skilltoreduce) >= P_BASIC) {
923 P_MAX_SKILL(skilltoreduce) = P_ISRESTRICTED;
926 skill_sanity_check(skilltoreduce);
928 P_SKILL(skilltoreduce) = P_ISRESTRICTED;
930 return;
934 /* skill cap loss trap: slowly but steadily reduces training of all skills --Amy */
935 void
936 skillcaploss_severe()
938 int skilltoreduce;
939 int tryct, tryct2;
940 int lossamount;
942 skilltoreduce = P_DAGGER;
944 severelossagain:
946 if (skilltoreduce < 0) return; /* fail safe, should never happen */
948 int i = 0;
950 /* 1 in 1000 chance per skill to be selected; if they do get selected, 1 in 1000 chance to lose all knowledge */
951 if (rn2(1000)) {
952 skilltoreduce++;
953 if (skilltoreduce >= P_NUM_SKILLS) return;
954 else goto severelossagain;
955 } else if (rn2(1000)) lossamount = 1;
956 else lossamount = 9999999;
958 if ((P_ADVANCE(skilltoreduce)) < lossamount) P_ADVANCE(skilltoreduce) = 0;
959 else P_ADVANCE(skilltoreduce) -= lossamount;
961 if (!P_RESTRICTED(skilltoreduce)) {
963 skill_sanity_check(skilltoreduce);
967 skilltoreduce++;
968 if (skilltoreduce >= P_NUM_SKILLS) return;
969 else goto severelossagain;
973 void
974 rndcurse() /* curse a few inventory items at random! */
976 int nobj = 0;
977 int cnt, onum;
978 struct obj *otmp;
979 static const char mal_aura[] = "feel a malignant aura surround %s.";
981 int verymanyitems;
982 int nobjtempvar;
984 if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) {
985 You(mal_aura, "the magic-absorbing blade");
986 return;
989 if (!rn2(5) && uarmh && itemhasappearance(uarmh, APP_SAGES_HELMET) ) {
990 pline("A malignant aura surrounds you but is absorbed by the sages helmet!");
991 return;
994 if (Versus_curses && rn2(StrongVersus_curses ? 20 : 4)) { /* curse resistance, by Chris_ANG */
995 pline("A malignant aura surrounds you but is absorbed by your magical shield!");
996 return;
999 if(u.ukinghill && rn2(20)){
1000 You(mal_aura, "the cursed treasure chest");
1001 otmp = 0;
1002 for(otmp = invent; otmp; otmp=otmp->nobj)
1003 if(otmp->oartifact == ART_TREASURY_OF_PROTEUS)
1004 break;
1005 if(!otmp) pline("Treasury not actually in inventory??");
1006 else if(otmp->blessed)
1007 unbless(otmp);
1008 else
1009 curse(otmp);
1010 update_inventory();
1011 return;
1014 u.cnd_curseitemsamount++;
1016 if(Antimagic) {
1017 shieldeff(u.ux, u.uy);
1018 You(mal_aura, "you");
1019 if (PlayerHearsSoundEffects) pline(issoviet ? "Ne vse blagopoluchno ot zlosloviya, i vy poluchite dopolnitel'noye soobshcheniye bespoleznuyu nazlo vam!" : "Due-due-duennn-nnnnn!");
1022 for (otmp = invent; otmp; otmp = otmp->nobj) {
1023 #ifdef GOLDOBJ
1024 /* gold isn't subject to being cursed or blessed */
1025 if (otmp->oclass == COIN_CLASS) continue;
1026 #endif
1027 nobj++;
1030 /* it's lame if you split 200 rocks to catch curses... gotta put a stop to that --Amy */
1031 verymanyitems = 6;
1032 nobjtempvar = 0;
1033 if (nobj > 50) {
1034 nobjtempvar = nobj;
1035 while (nobjtempvar > 50) {
1036 verymanyitems++;
1037 nobjtempvar -= 10;
1041 if (uinsymbiosis) {
1042 int symcurchance = 5;
1043 if (Antimagic) symcurchance += 2;
1044 if (StrongAntimagic) symcurchance += 2;
1045 if (Half_spell_damage) symcurchance += 3;
1046 if (StrongHalf_spell_damage) symcurchance += 3;
1047 if (isfriday) symcurchance /= 2;
1049 if (!rn2(symcurchance)) {
1050 cursesymbiote();
1051 pline(FunnyHallu ? "You feel like you have a heart attack!" : "Your symbiote feels deathly cold!");
1055 if (isfriday) verymanyitems *= 2;
1056 if (StrongAntimagic && verymanyitems > 1) verymanyitems /= 2;
1057 if (StrongHalf_spell_damage && verymanyitems > 1) verymanyitems /= 2;
1059 if (nobj) {
1060 for (cnt = rnd(verymanyitems/((!!Antimagic) + (!!Half_spell_damage) + 1));
1061 cnt > 0; cnt--) {
1062 onum = rnd(nobj);
1063 for (otmp = invent; otmp; otmp = otmp->nobj) {
1064 #ifdef GOLDOBJ
1065 /* as above */
1066 if (otmp->oclass == COIN_CLASS) continue;
1067 #endif
1068 if (--onum == 0) break; /* found the target */
1070 /* the !otmp case should never happen; picking an already
1071 cursed item happens--avoid "resists" message in that case
1072 Amy edit: only prime cursed items can't be cursed further
1073 edit again: now they can, since we have even more severe curses */
1074 if (!otmp) continue; /* next target */
1076 if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) &&
1077 rn2(10) < 8) {
1078 pline("%s!", Tobjnam(otmp, "resist"));
1079 continue;
1082 /* materials overhaul: gold resists curses --Amy */
1083 if (objects[otmp->otyp].oc_material == MT_GOLD && rn2(2)) {
1084 pline("%s!", Tobjnam(otmp, "resist"));
1085 continue;
1088 if (!stack_too_big(otmp)) {
1089 if(otmp->blessed)
1090 unbless(otmp);
1091 else
1092 curse(otmp);
1095 update_inventory();
1098 /* treat steed's saddle as extended part of hero's inventory */
1099 if (u.usteed && !rn2(50) &&
1100 (otmp = which_armor(u.usteed, W_SADDLE)) != 0) {
1101 if (otmp->blessed)
1102 unbless(otmp);
1103 else
1104 curse(otmp);
1105 if (!Blind) {
1106 pline("%s %s %s.",
1107 s_suffix(upstart(y_monnam(u.usteed))),
1108 aobjnam(otmp, "glow"),
1109 hcolor(otmp->cursed ? NH_BLACK : (const char *)"brown"));
1110 otmp->bknown = TRUE;
1115 void
1116 attrcurse() /* remove a random INTRINSIC ability */
1118 if (chitinprotection() && !rn2(3)) {
1119 You("resist the intrinsic loss!");
1120 return;
1122 if (MysteryResist && !rn2(3)) {
1123 You("resist the intrinsic loss!");
1124 return;
1126 if (StrongMysteryResist && !rn2(3)) {
1127 You("resist the intrinsic loss!");
1128 return;
1131 switch(rnd(265)) {
1132 case 1:
1133 case 2:
1134 case 3:
1135 case 4:
1136 case 5:
1137 case 6:
1138 case 7:
1139 case 8:
1140 case 9:
1141 case 10:
1142 case 11:
1143 case 12:
1144 case 13:
1145 case 14:
1146 case 15: if (HFire_resistance & INTRINSIC) {
1147 HFire_resistance &= ~INTRINSIC;
1148 You_feel("warmer.");
1149 u.cnd_intrinsiclosscount++;
1151 if (HFire_resistance & TIMEOUT) {
1152 HFire_resistance &= ~TIMEOUT;
1153 You_feel("warmer.");
1154 u.cnd_intrinsiclosscount++;
1156 break;
1157 case 16:
1158 case 17:
1159 case 18:
1160 case 19:
1161 case 20:
1162 case 21:
1163 case 22:
1164 case 23: if (HTeleportation & INTRINSIC) {
1165 HTeleportation &= ~INTRINSIC;
1166 You_feel("less jumpy.");
1167 u.cnd_intrinsiclosscount++;
1169 if (HTeleportation & TIMEOUT) {
1170 HTeleportation &= ~TIMEOUT;
1171 You_feel("less jumpy.");
1172 u.cnd_intrinsiclosscount++;
1174 break;
1175 case 24:
1176 case 25:
1177 case 26:
1178 case 27:
1179 case 28:
1180 case 29:
1181 case 30:
1182 case 31:
1183 case 32:
1184 case 33:
1185 case 34:
1186 case 35:
1187 case 36:
1188 case 37:
1189 case 38: if (HPoison_resistance & INTRINSIC) {
1190 HPoison_resistance &= ~INTRINSIC;
1191 You_feel("a little sick!");
1192 u.cnd_intrinsiclosscount++;
1194 if (HPoison_resistance & TIMEOUT) {
1195 HPoison_resistance &= ~TIMEOUT;
1196 You_feel("a little sick!");
1197 u.cnd_intrinsiclosscount++;
1199 break;
1200 case 39:
1201 case 40:
1202 case 41:
1203 case 42:
1204 case 43:
1205 case 44:
1206 case 45:
1207 case 46:
1208 case 47:
1209 case 48: if (HTelepat & INTRINSIC) {
1210 HTelepat &= ~INTRINSIC;
1211 if (Blind && !Blind_telepat)
1212 see_monsters(); /* Can't sense mons anymore! */
1213 Your("senses fail!");
1214 u.cnd_intrinsiclosscount++;
1216 if (HTelepat & TIMEOUT) {
1217 HTelepat &= ~TIMEOUT;
1218 if (Blind && !Blind_telepat)
1219 see_monsters(); /* Can't sense mons anymore! */
1220 Your("senses fail!");
1221 u.cnd_intrinsiclosscount++;
1223 break;
1224 case 49:
1225 case 50:
1226 case 51:
1227 case 52:
1228 case 53:
1229 case 54:
1230 case 55:
1231 case 56:
1232 case 57:
1233 case 58:
1234 case 59:
1235 case 60:
1236 case 61:
1237 case 62:
1238 case 63: if (HCold_resistance & INTRINSIC) {
1239 HCold_resistance &= ~INTRINSIC;
1240 You_feel("cooler.");
1241 u.cnd_intrinsiclosscount++;
1243 if (HCold_resistance & TIMEOUT) {
1244 HCold_resistance &= ~TIMEOUT;
1245 You_feel("cooler.");
1246 u.cnd_intrinsiclosscount++;
1248 break;
1249 case 64:
1250 case 65:
1251 case 66:
1252 case 67:
1253 case 68:
1254 case 69:
1255 case 70:
1256 case 71:
1257 case 72:
1258 case 73: if (HInvis & INTRINSIC) {
1259 HInvis &= ~INTRINSIC;
1260 You_feel("paranoid.");
1261 u.cnd_intrinsiclosscount++;
1263 if (HInvis & TIMEOUT) {
1264 HInvis &= ~TIMEOUT;
1265 You_feel("paranoid.");
1266 u.cnd_intrinsiclosscount++;
1268 break;
1269 case 74:
1270 case 75:
1271 case 76:
1272 case 77:
1273 case 78:
1274 case 79:
1275 case 80:
1276 case 81:
1277 case 82:
1278 case 83: if (HSee_invisible & INTRINSIC) {
1279 HSee_invisible &= ~INTRINSIC;
1280 You("%s!", FunnyHallu ? "tawt you taw a puttie tat" : "thought you saw something");
1281 u.cnd_intrinsiclosscount++;
1283 if (HSee_invisible & TIMEOUT) {
1284 HSee_invisible &= ~TIMEOUT;
1285 You("%s!", FunnyHallu ? "tawt you taw a puttie tat" : "thought you saw something");
1286 u.cnd_intrinsiclosscount++;
1288 break;
1289 case 84:
1290 case 85:
1291 case 86:
1292 case 87:
1293 case 88:
1294 case 89:
1295 case 90:
1296 case 91:
1297 case 92:
1298 case 93: if (HFast & INTRINSIC) {
1299 HFast &= ~INTRINSIC;
1300 You_feel("slower.");
1301 u.cnd_intrinsiclosscount++;
1303 if (HFast & TIMEOUT) {
1304 HFast &= ~TIMEOUT;
1305 You_feel("slower.");
1306 u.cnd_intrinsiclosscount++;
1308 break;
1309 case 94:
1310 case 95:
1311 case 96:
1312 case 97:
1313 case 98:
1314 case 99:
1315 case 100:
1316 case 101:
1317 case 102:
1318 case 103: if (HStealth & INTRINSIC) {
1319 HStealth &= ~INTRINSIC;
1320 You_feel("clumsy.");
1321 u.cnd_intrinsiclosscount++;
1323 if (HStealth & TIMEOUT) {
1324 HStealth &= ~TIMEOUT;
1325 You_feel("clumsy.");
1326 u.cnd_intrinsiclosscount++;
1328 break;
1329 case 104: if (HProtection & INTRINSIC) {
1330 HProtection &= ~INTRINSIC;
1331 You_feel("vulnerable.");
1332 u.cnd_intrinsiclosscount++;
1334 if (HProtection & TIMEOUT) {
1335 HProtection &= ~TIMEOUT;
1336 You_feel("vulnerable.");
1337 u.cnd_intrinsiclosscount++;
1339 break;
1340 case 105:
1341 case 106:
1342 case 107:
1343 case 108:
1344 case 109:
1345 case 110:
1346 case 111:
1347 case 112: if (HAggravate_monster & INTRINSIC) {
1348 HAggravate_monster &= ~INTRINSIC;
1349 You_feel("less attractive.");
1350 u.cnd_intrinsiclosscount++;
1352 if (HAggravate_monster & TIMEOUT) {
1353 HAggravate_monster &= ~TIMEOUT;
1354 You_feel("less attractive.");
1355 u.cnd_intrinsiclosscount++;
1357 break;
1358 case 113:
1359 case 114:
1360 case 115:
1361 case 116:
1362 case 117:
1363 case 118:
1364 case 119:
1365 case 120:
1366 case 121:
1367 case 122:
1368 case 123:
1369 case 124:
1370 case 125:
1371 case 126:
1372 case 127: if (HSleep_resistance & INTRINSIC) {
1373 HSleep_resistance &= ~INTRINSIC;
1374 You_feel("tired all of a sudden.");
1375 u.cnd_intrinsiclosscount++;
1377 if (HSleep_resistance & TIMEOUT) {
1378 HSleep_resistance &= ~TIMEOUT;
1379 You_feel("tired all of a sudden.");
1380 u.cnd_intrinsiclosscount++;
1382 break;
1383 case 128:
1384 case 129:
1385 case 130:
1386 case 131:
1387 case 132:
1388 case 133:
1389 case 134:
1390 case 135:
1391 case 136:
1392 case 137: if (HDisint_resistance & INTRINSIC) {
1393 HDisint_resistance &= ~INTRINSIC;
1394 You_feel("like you're going to break apart.");
1395 u.cnd_intrinsiclosscount++;
1397 if (HDisint_resistance & TIMEOUT) {
1398 HDisint_resistance &= ~TIMEOUT;
1399 You_feel("like you're going to break apart.");
1400 u.cnd_intrinsiclosscount++;
1402 break;
1403 case 138:
1404 case 139:
1405 case 140:
1406 case 141:
1407 case 142:
1408 case 143:
1409 case 144:
1410 case 145:
1411 case 146:
1412 case 147:
1413 case 148:
1414 case 149:
1415 case 150:
1416 case 151:
1417 case 152: if (HShock_resistance & INTRINSIC) {
1418 HShock_resistance &= ~INTRINSIC;
1419 You_feel("like someone has zapped you.");
1420 u.cnd_intrinsiclosscount++;
1422 if (HShock_resistance & TIMEOUT) {
1423 HShock_resistance &= ~TIMEOUT;
1424 You_feel("like someone has zapped you.");
1425 u.cnd_intrinsiclosscount++;
1427 break;
1428 case 153: if (HDrain_resistance & INTRINSIC) {
1429 HDrain_resistance &= ~INTRINSIC;
1430 You_feel("like someone is sucking out your life-force.");
1431 u.cnd_intrinsiclosscount++;
1433 if (HDrain_resistance & TIMEOUT) {
1434 HDrain_resistance &= ~TIMEOUT;
1435 You_feel("like someone is sucking out your life-force.");
1436 u.cnd_intrinsiclosscount++;
1438 break;
1439 case 154: if (HSick_resistance & INTRINSIC) {
1440 HSick_resistance &= ~INTRINSIC;
1441 You_feel("no longer immune to diseases!");
1442 u.cnd_intrinsiclosscount++;
1444 if (HSick_resistance & TIMEOUT) {
1445 HSick_resistance &= ~TIMEOUT;
1446 You_feel("no longer immune to diseases!");
1447 u.cnd_intrinsiclosscount++;
1449 break;
1450 case 155:
1451 case 156:
1452 case 157: if (HWarning & INTRINSIC) {
1453 HWarning &= ~INTRINSIC;
1454 You_feel("that your radar has just stopped working!");
1455 u.cnd_intrinsiclosscount++;
1457 if (HWarning & TIMEOUT) {
1458 HWarning &= ~TIMEOUT;
1459 You_feel("that your radar has just stopped working!");
1460 u.cnd_intrinsiclosscount++;
1462 break;
1463 case 158:
1464 case 159:
1465 case 160:
1466 case 161:
1467 case 162:
1468 case 163:
1469 case 164: if (HSearching & INTRINSIC) {
1470 HSearching &= ~INTRINSIC;
1471 You_feel("unable to find something you lost!");
1472 u.cnd_intrinsiclosscount++;
1474 if (HSearching & TIMEOUT) {
1475 HSearching &= ~TIMEOUT;
1476 You_feel("unable to find something you lost!");
1477 u.cnd_intrinsiclosscount++;
1479 break;
1480 case 165: if (HClairvoyant & INTRINSIC) {
1481 HClairvoyant &= ~INTRINSIC;
1482 You_feel("a loss of mental capabilities!");
1483 u.cnd_intrinsiclosscount++;
1485 if (HClairvoyant & TIMEOUT) {
1486 HClairvoyant &= ~TIMEOUT;
1487 You_feel("a loss of mental capabilities!");
1488 u.cnd_intrinsiclosscount++;
1490 break;
1491 case 166: if (HInfravision & INTRINSIC) {
1492 HInfravision &= ~INTRINSIC;
1493 You_feel("shrouded in darkness.");
1494 u.cnd_intrinsiclosscount++;
1496 if (HInfravision & TIMEOUT) {
1497 HInfravision &= ~TIMEOUT;
1498 You_feel("shrouded in darkness.");
1499 u.cnd_intrinsiclosscount++;
1501 break;
1502 case 167: if (HDetect_monsters & INTRINSIC) {
1503 HDetect_monsters &= ~INTRINSIC;
1504 You_feel("that you can no longer sense monsters.");
1505 u.cnd_intrinsiclosscount++;
1507 if (HDetect_monsters & TIMEOUT) {
1508 HDetect_monsters &= ~TIMEOUT;
1509 You_feel("that you can no longer sense monsters.");
1510 u.cnd_intrinsiclosscount++;
1512 break;
1513 case 168: if (HJumping & INTRINSIC) {
1514 HJumping &= ~INTRINSIC;
1515 You_feel("your legs shrinking.");
1516 u.cnd_intrinsiclosscount++;
1518 if (HJumping & TIMEOUT) {
1519 HJumping &= ~TIMEOUT;
1520 You_feel("your legs shrinking.");
1521 u.cnd_intrinsiclosscount++;
1523 break;
1524 case 169:
1525 case 170:
1526 case 171:
1527 case 172:
1528 case 173:
1529 case 174:
1530 case 175:
1531 case 176:
1532 case 177:
1533 case 178: if (HTeleport_control & INTRINSIC) {
1534 HTeleport_control &= ~INTRINSIC;
1535 You_feel("unable to control where you're going.");
1536 u.cnd_intrinsiclosscount++;
1538 if (HTeleport_control & TIMEOUT) {
1539 HTeleport_control &= ~TIMEOUT;
1540 You_feel("unable to control where you're going.");
1541 u.cnd_intrinsiclosscount++;
1543 break;
1544 case 179: if (HMagical_breathing & INTRINSIC) {
1545 HMagical_breathing &= ~INTRINSIC;
1546 You_feel("you suddenly need to breathe!");
1547 u.cnd_intrinsiclosscount++;
1549 if (HMagical_breathing & TIMEOUT) {
1550 HMagical_breathing &= ~TIMEOUT;
1551 You_feel("you suddenly need to breathe!");
1552 u.cnd_intrinsiclosscount++;
1554 break;
1555 case 180: if (HRegeneration & INTRINSIC) {
1556 HRegeneration &= ~INTRINSIC;
1557 You_feel("your wounds are healing slower!");
1558 u.cnd_intrinsiclosscount++;
1560 if (HRegeneration & TIMEOUT) {
1561 HRegeneration &= ~TIMEOUT;
1562 You_feel("your wounds are healing slower!");
1563 u.cnd_intrinsiclosscount++;
1565 break;
1566 case 181: if (HEnergy_regeneration & INTRINSIC) {
1567 HEnergy_regeneration &= ~INTRINSIC;
1568 You_feel("a loss of mystic power!");
1569 u.cnd_intrinsiclosscount++;
1571 if (HEnergy_regeneration & TIMEOUT) {
1572 HEnergy_regeneration &= ~TIMEOUT;
1573 You_feel("a loss of mystic power!");
1574 u.cnd_intrinsiclosscount++;
1576 break;
1577 case 182: if (HPolymorph & INTRINSIC) {
1578 HPolymorph &= ~INTRINSIC;
1579 You_feel("unable to change form!");
1580 u.cnd_intrinsiclosscount++;
1582 if (HPolymorph & TIMEOUT) {
1583 HPolymorph &= ~TIMEOUT;
1584 You_feel("unable to change form!");
1585 u.cnd_intrinsiclosscount++;
1587 break;
1588 case 183: if (HPolymorph_control & INTRINSIC) {
1589 HPolymorph_control &= ~INTRINSIC;
1590 You_feel("less control over your own body.");
1591 u.cnd_intrinsiclosscount++;
1593 if (HPolymorph_control & TIMEOUT) {
1594 HPolymorph_control &= ~TIMEOUT;
1595 You_feel("less control over your own body.");
1596 u.cnd_intrinsiclosscount++;
1598 break;
1599 case 184 :
1600 case 185 :
1601 case 186 :
1602 case 187: if (HAcid_resistance & INTRINSIC) {
1603 HAcid_resistance &= ~INTRINSIC;
1604 You_feel("worried about corrosion!");
1605 u.cnd_intrinsiclosscount++;
1607 if (HAcid_resistance & TIMEOUT) {
1608 HAcid_resistance &= ~TIMEOUT;
1609 You_feel("worried about corrosion!");
1610 u.cnd_intrinsiclosscount++;
1612 break;
1613 case 188: if (HFumbling & INTRINSIC) {
1614 HFumbling &= ~INTRINSIC;
1615 You_feel("less clumsy.");
1616 u.cnd_intrinsiclosscount++;
1618 if (HFumbling & TIMEOUT) {
1619 HFumbling &= ~TIMEOUT;
1620 You_feel("less clumsy.");
1621 u.cnd_intrinsiclosscount++;
1623 break;
1624 case 189: if (HSleeping & INTRINSIC) {
1625 HSleeping &= ~INTRINSIC;
1626 You_feel("like you just had some coffee.");
1627 u.cnd_intrinsiclosscount++;
1629 if (HSleeping & TIMEOUT) {
1630 HSleeping &= ~TIMEOUT;
1631 You_feel("like you just had some coffee.");
1632 u.cnd_intrinsiclosscount++;
1634 break;
1635 case 190: if (HHunger & INTRINSIC) {
1636 HHunger &= ~INTRINSIC;
1637 You_feel("like you just ate a chunk of meat.");
1638 u.cnd_intrinsiclosscount++;
1640 if (HHunger & TIMEOUT) {
1641 HHunger &= ~TIMEOUT;
1642 You_feel("like you just ate a chunk of meat.");
1643 u.cnd_intrinsiclosscount++;
1645 break;
1646 case 191: if (HConflict & INTRINSIC) {
1647 HConflict &= ~INTRINSIC;
1648 You_feel("more acceptable.");
1649 u.cnd_intrinsiclosscount++;
1651 if (HConflict & TIMEOUT) {
1652 HConflict &= ~TIMEOUT;
1653 You_feel("more acceptable.");
1654 u.cnd_intrinsiclosscount++;
1656 break;
1657 case 192: if (HSlow_digestion & INTRINSIC) {
1658 HSlow_digestion &= ~INTRINSIC;
1659 You_feel("like you're burning calories faster.");
1660 u.cnd_intrinsiclosscount++;
1662 if (HSlow_digestion & TIMEOUT) {
1663 HSlow_digestion &= ~TIMEOUT;
1664 You_feel("like you're burning calories faster.");
1665 u.cnd_intrinsiclosscount++;
1667 break;
1668 case 193: if (HFlying & INTRINSIC) {
1669 HFlying &= ~INTRINSIC;
1670 You_feel("like you just lost your wings!");
1671 u.cnd_intrinsiclosscount++;
1673 if (HFlying & TIMEOUT) {
1674 HFlying &= ~TIMEOUT;
1675 You_feel("like you just lost your wings!");
1676 u.cnd_intrinsiclosscount++;
1678 break;
1679 case 194: if (HPasses_walls & INTRINSIC) {
1680 HPasses_walls &= ~INTRINSIC;
1681 You_feel("less ethereal!");
1682 u.cnd_intrinsiclosscount++;
1684 if (HPasses_walls & TIMEOUT) {
1685 HPasses_walls &= ~TIMEOUT;
1686 You_feel("less ethereal!");
1687 u.cnd_intrinsiclosscount++;
1689 break;
1690 case 195: if (HAntimagic & INTRINSIC) {
1691 HAntimagic &= ~INTRINSIC;
1692 You_feel("less protected from magic!");
1693 u.cnd_intrinsiclosscount++;
1695 if (HAntimagic & TIMEOUT) {
1696 HAntimagic &= ~TIMEOUT;
1697 You_feel("less protected from magic!");
1698 u.cnd_intrinsiclosscount++;
1700 break;
1701 case 196: if (HReflecting & INTRINSIC) {
1702 HReflecting &= ~INTRINSIC;
1703 You_feel("less reflexive!");
1704 u.cnd_intrinsiclosscount++;
1706 if (HReflecting & TIMEOUT) {
1707 HReflecting &= ~TIMEOUT;
1708 You_feel("less reflexive!");
1709 u.cnd_intrinsiclosscount++;
1711 break;
1712 case 197: if (Blinded & INTRINSIC) {
1713 Blinded &= ~INTRINSIC;
1714 You_feel("visually clear!");
1715 u.cnd_intrinsiclosscount++;
1717 if (Blinded & TIMEOUT) {
1718 Blinded &= ~TIMEOUT;
1719 You_feel("visually clear!");
1720 u.cnd_intrinsiclosscount++;
1722 break;
1723 case 198: if (Glib & INTRINSIC) {
1724 Glib &= ~INTRINSIC;
1725 You_feel("heavy-handed!");
1726 u.cnd_intrinsiclosscount++;
1728 if (Glib & TIMEOUT) {
1729 Glib &= ~TIMEOUT;
1730 You_feel("heavy-handed!");
1731 u.cnd_intrinsiclosscount++;
1733 break;
1734 case 199: if (HSwimming & INTRINSIC) {
1735 HSwimming &= ~INTRINSIC;
1736 You_feel("less aquatic!");
1737 u.cnd_intrinsiclosscount++;
1739 if (HSwimming & TIMEOUT) {
1740 HSwimming &= ~TIMEOUT;
1741 You_feel("less aquatic!");
1742 u.cnd_intrinsiclosscount++;
1744 break;
1745 case 200: if (HNumbed & INTRINSIC) {
1746 HNumbed &= ~INTRINSIC;
1747 You_feel("your body parts relax.");
1748 u.cnd_intrinsiclosscount++;
1750 if (HNumbed & TIMEOUT) {
1751 HNumbed &= ~TIMEOUT;
1752 You_feel("your body parts relax.");
1753 u.cnd_intrinsiclosscount++;
1755 break;
1756 case 201: if (HFree_action & INTRINSIC) {
1757 HFree_action &= ~INTRINSIC;
1758 You_feel("a loss of freedom!");
1759 u.cnd_intrinsiclosscount++;
1761 if (HFree_action & TIMEOUT) {
1762 HFree_action &= ~TIMEOUT;
1763 You_feel("a loss of freedom!");
1764 u.cnd_intrinsiclosscount++;
1766 break;
1767 case 202: if (HFeared & INTRINSIC) {
1768 HFeared &= ~INTRINSIC;
1769 You_feel("less afraid.");
1770 u.cnd_intrinsiclosscount++;
1772 if (HFeared & TIMEOUT) {
1773 HFeared &= ~TIMEOUT;
1774 You_feel("less afraid.");
1775 u.cnd_intrinsiclosscount++;
1777 break;
1778 case 203: if (HFear_resistance & INTRINSIC) {
1779 HFear_resistance &= ~INTRINSIC;
1780 You_feel("a little anxious!");
1781 u.cnd_intrinsiclosscount++;
1783 if (HFear_resistance & TIMEOUT) {
1784 HFear_resistance &= ~TIMEOUT;
1785 You_feel("a little anxious!");
1786 u.cnd_intrinsiclosscount++;
1788 break;
1789 case 204: if (u.uhitincxtra != 0) {
1790 u.uhitinc -= u.uhitincxtra;
1791 u.uhitincxtra = 0;
1792 You_feel("your to-hit rating changing!");
1793 u.cnd_intrinsiclosscount++;
1795 break;
1796 case 205: if (u.udamincxtra != 0) {
1797 u.udaminc -= u.udamincxtra;
1798 u.udamincxtra = 0;
1799 You_feel("your damage rating changing!");
1800 u.cnd_intrinsiclosscount++;
1802 break;
1803 case 206: if (HKeen_memory & INTRINSIC) {
1804 HKeen_memory &= ~INTRINSIC;
1805 You_feel("a case of selective amnesia...");
1806 u.cnd_intrinsiclosscount++;
1808 if (HKeen_memory & TIMEOUT) {
1809 HKeen_memory &= ~TIMEOUT;
1810 You_feel("a case of selective amnesia...");
1811 u.cnd_intrinsiclosscount++;
1813 break;
1814 case 207: if (HVersus_curses & INTRINSIC) {
1815 HVersus_curses &= ~INTRINSIC;
1816 You_feel("cursed!");
1817 u.cnd_intrinsiclosscount++;
1819 if (HVersus_curses & TIMEOUT) {
1820 HVersus_curses &= ~TIMEOUT;
1821 You_feel("cursed!");
1822 u.cnd_intrinsiclosscount++;
1824 break;
1825 case 208: if (HStun_resist & INTRINSIC) {
1826 HStun_resist &= ~INTRINSIC;
1827 You_feel("a little stunned!");
1828 u.cnd_intrinsiclosscount++;
1830 if (HStun_resist & TIMEOUT) {
1831 HStun_resist &= ~TIMEOUT;
1832 You_feel("a little stunned!");
1833 u.cnd_intrinsiclosscount++;
1835 break;
1836 case 209: if (HConf_resist & INTRINSIC) {
1837 HConf_resist &= ~INTRINSIC;
1838 You_feel("a little confused!");
1839 u.cnd_intrinsiclosscount++;
1841 if (HConf_resist & TIMEOUT) {
1842 HConf_resist &= ~TIMEOUT;
1843 You_feel("a little confused!");
1844 u.cnd_intrinsiclosscount++;
1846 break;
1847 case 210: if (HDouble_attack & INTRINSIC) {
1848 HDouble_attack &= ~INTRINSIC;
1849 You_feel("your attacks becoming slower!");
1850 u.cnd_intrinsiclosscount++;
1852 if (HDouble_attack & TIMEOUT) {
1853 HDouble_attack &= ~TIMEOUT;
1854 You_feel("your attacks becoming slower!");
1855 u.cnd_intrinsiclosscount++;
1857 break;
1858 case 211: if (HQuad_attack & INTRINSIC) {
1859 HQuad_attack &= ~INTRINSIC;
1860 You_feel("your attacks becoming a lot slower!");
1861 u.cnd_intrinsiclosscount++;
1863 if (HQuad_attack & TIMEOUT) {
1864 HQuad_attack &= ~TIMEOUT;
1865 You_feel("your attacks becoming a lot slower!");
1866 u.cnd_intrinsiclosscount++;
1868 break;
1869 case 212: if (HExtra_wpn_practice & INTRINSIC) {
1870 HExtra_wpn_practice &= ~INTRINSIC;
1871 You_feel("less able to learn new stuff!");
1872 u.cnd_intrinsiclosscount++;
1874 if (HExtra_wpn_practice & TIMEOUT) {
1875 HExtra_wpn_practice &= ~TIMEOUT;
1876 You_feel("less able to learn new stuff!");
1877 u.cnd_intrinsiclosscount++;
1879 break;
1880 case 213: if (HDeath_resistance & INTRINSIC) {
1881 HDeath_resistance &= ~INTRINSIC;
1882 You_feel("a little dead!");
1883 u.cnd_intrinsiclosscount++;
1885 if (HDeath_resistance & TIMEOUT) {
1886 HDeath_resistance &= ~TIMEOUT;
1887 You_feel("a little dead!");
1888 u.cnd_intrinsiclosscount++;
1890 break;
1891 case 214: if (HDisplaced & INTRINSIC) {
1892 HDisplaced &= ~INTRINSIC;
1893 You_feel("a little exposed!");
1894 u.cnd_intrinsiclosscount++;
1896 if (HDisplaced & TIMEOUT) {
1897 HDisplaced &= ~TIMEOUT;
1898 You_feel("a little exposed!");
1899 u.cnd_intrinsiclosscount++;
1901 break;
1902 case 215: if (HPsi_resist & INTRINSIC) {
1903 HPsi_resist &= ~INTRINSIC;
1904 You_feel("empty-minded!");
1905 u.cnd_intrinsiclosscount++;
1907 if (HPsi_resist & TIMEOUT) {
1908 HPsi_resist &= ~TIMEOUT;
1909 You_feel("empty-minded!");
1910 u.cnd_intrinsiclosscount++;
1912 break;
1913 case 216: if (HSight_bonus & INTRINSIC) {
1914 HSight_bonus &= ~INTRINSIC;
1915 You_feel("less perceptive!");
1916 u.cnd_intrinsiclosscount++;
1918 if (HSight_bonus & TIMEOUT) {
1919 HSight_bonus &= ~TIMEOUT;
1920 You_feel("less perceptive!");
1921 u.cnd_intrinsiclosscount++;
1923 break;
1924 case 217:
1925 case 218: if (HManaleech & INTRINSIC) {
1926 HManaleech &= ~INTRINSIC;
1927 You_feel("less magically attuned!");
1928 u.cnd_intrinsiclosscount++;
1930 if (HManaleech & TIMEOUT) {
1931 HManaleech &= ~TIMEOUT;
1932 You_feel("less magically attuned!");
1933 u.cnd_intrinsiclosscount++;
1935 break;
1936 case 219:
1937 case 220: if (HMap_amnesia & INTRINSIC) {
1938 HMap_amnesia &= ~INTRINSIC;
1939 You_feel("less forgetful!");
1940 u.cnd_intrinsiclosscount++;
1942 if (HMap_amnesia & TIMEOUT) {
1943 HMap_amnesia &= ~TIMEOUT;
1944 You_feel("less forgetful!");
1945 u.cnd_intrinsiclosscount++;
1947 break;
1948 case 221: if (HPeacevision & INTRINSIC) {
1949 HPeacevision &= ~INTRINSIC;
1950 You_feel("less peaceful!");
1951 u.cnd_intrinsiclosscount++;
1953 if (HPeacevision & TIMEOUT) {
1954 HPeacevision &= ~TIMEOUT;
1955 You_feel("less peaceful!");
1956 u.cnd_intrinsiclosscount++;
1958 break;
1959 case 222: if (HHallu_party & INTRINSIC) {
1960 HHallu_party &= ~INTRINSIC;
1961 You_feel("that the party is over!");
1962 u.cnd_intrinsiclosscount++;
1964 if (HHallu_party & TIMEOUT) {
1965 HHallu_party &= ~TIMEOUT;
1966 You_feel("that the party is over!");
1967 u.cnd_intrinsiclosscount++;
1969 break;
1970 case 223: if (HDrunken_boxing & INTRINSIC) {
1971 HDrunken_boxing &= ~INTRINSIC;
1972 You_feel("a little drunk!");
1973 u.cnd_intrinsiclosscount++;
1975 if (HDrunken_boxing & TIMEOUT) {
1976 HDrunken_boxing &= ~TIMEOUT;
1977 You_feel("a little drunk!");
1978 u.cnd_intrinsiclosscount++;
1980 break;
1981 case 224: if (HStunnopathy & INTRINSIC) {
1982 HStunnopathy &= ~INTRINSIC;
1983 You_feel("an uncontrolled stunning!");
1984 u.cnd_intrinsiclosscount++;
1986 if (HStunnopathy & TIMEOUT) {
1987 HStunnopathy &= ~TIMEOUT;
1988 You_feel("an uncontrolled stunning!");
1989 u.cnd_intrinsiclosscount++;
1991 break;
1992 case 225: if (HNumbopathy & INTRINSIC) {
1993 HNumbopathy &= ~INTRINSIC;
1994 You_feel("numbness spreading through your body!");
1995 u.cnd_intrinsiclosscount++;
1997 if (HNumbopathy & TIMEOUT) {
1998 HNumbopathy &= ~TIMEOUT;
1999 You_feel("numbness spreading through your body!");
2000 u.cnd_intrinsiclosscount++;
2002 break;
2003 case 226: if (HDimmopathy & INTRINSIC) {
2004 HDimmopathy &= ~INTRINSIC;
2005 You_feel(FunnyHallu ? "that your marriage is no longer safe..." : "worried about the future!");
2006 u.cnd_intrinsiclosscount++;
2008 if (HDimmopathy & TIMEOUT) {
2009 HDimmopathy &= ~TIMEOUT;
2010 You_feel(FunnyHallu ? "that your marriage is no longer safe..." : "worried about the future!");
2011 u.cnd_intrinsiclosscount++;
2013 break;
2014 case 227: if (HFreezopathy & INTRINSIC) {
2015 HFreezopathy &= ~INTRINSIC;
2016 You_feel("ice-cold!");
2017 u.cnd_intrinsiclosscount++;
2019 if (HFreezopathy & TIMEOUT) {
2020 HFreezopathy &= ~TIMEOUT;
2021 You_feel("ice-cold!");
2022 u.cnd_intrinsiclosscount++;
2024 break;
2025 case 228: if (HStoned_chiller & INTRINSIC) {
2026 HStoned_chiller &= ~INTRINSIC;
2027 You_feel("that you ain't gonna get time for relaxing anymore!");
2028 u.cnd_intrinsiclosscount++;
2030 if (HStoned_chiller & TIMEOUT) {
2031 HStoned_chiller &= ~TIMEOUT;
2032 You_feel("that you ain't gonna get time for relaxing anymore!");
2033 u.cnd_intrinsiclosscount++;
2035 break;
2036 case 229: if (HCorrosivity & INTRINSIC) {
2037 HCorrosivity &= ~INTRINSIC;
2038 You_feel("the protective layer on your skin disappearing!");
2039 u.cnd_intrinsiclosscount++;
2041 if (HCorrosivity & TIMEOUT) {
2042 HCorrosivity &= ~TIMEOUT;
2043 You_feel("the protective layer on your skin disappearing!");
2044 u.cnd_intrinsiclosscount++;
2046 break;
2047 case 230: if (HFear_factor & INTRINSIC) {
2048 HFear_factor &= ~INTRINSIC;
2049 You_feel("fearful!");
2050 u.cnd_intrinsiclosscount++;
2052 if (HFear_factor & TIMEOUT) {
2053 HFear_factor &= ~TIMEOUT;
2054 You_feel("fearful!");
2055 u.cnd_intrinsiclosscount++;
2057 break;
2058 case 231: if (HBurnopathy & INTRINSIC) {
2059 HBurnopathy &= ~INTRINSIC;
2060 You_feel("red-hot!");
2061 u.cnd_intrinsiclosscount++;
2063 if (HBurnopathy & TIMEOUT) {
2064 HBurnopathy &= ~TIMEOUT;
2065 You_feel("red-hot!");
2066 u.cnd_intrinsiclosscount++;
2068 break;
2069 case 232: if (HSickopathy & INTRINSIC) {
2070 HSickopathy &= ~INTRINSIC;
2071 You_feel("a loss of medical knowledge!");
2072 u.cnd_intrinsiclosscount++;
2074 if (HSickopathy & TIMEOUT) {
2075 HSickopathy &= ~TIMEOUT;
2076 You_feel("a loss of medical knowledge!");
2077 u.cnd_intrinsiclosscount++;
2079 break;
2080 case 233: if (HWonderlegs & INTRINSIC) {
2081 HWonderlegs &= ~INTRINSIC;
2082 You_feel("that all girls and women will scratch bloody wounds on your legs with their high heels!");
2083 u.cnd_intrinsiclosscount++;
2085 if (HWonderlegs & TIMEOUT) {
2086 HWonderlegs &= ~TIMEOUT;
2087 You_feel("that all girls and women will scratch bloody wounds on your legs with their high heels!");
2088 u.cnd_intrinsiclosscount++;
2090 break;
2091 case 234: if (HGlib_combat & INTRINSIC) {
2092 HGlib_combat &= ~INTRINSIC;
2093 You_feel("fliction in your %s!", makeplural(body_part(HAND)));
2094 u.cnd_intrinsiclosscount++;
2096 if (HGlib_combat & TIMEOUT) {
2097 HGlib_combat &= ~TIMEOUT;
2098 You_feel("fliction in your %s!", makeplural(body_part(HAND)));
2099 u.cnd_intrinsiclosscount++;
2101 break;
2102 case 235:
2103 case 236:
2104 case 237: if (HStone_resistance & INTRINSIC) {
2105 HStone_resistance &= ~INTRINSIC;
2106 You_feel("less solid!");
2107 u.cnd_intrinsiclosscount++;
2109 if (HStone_resistance & TIMEOUT) {
2110 HStone_resistance &= ~TIMEOUT;
2111 You_feel("less solid!");
2112 u.cnd_intrinsiclosscount++;
2114 break;
2115 case 238: if (HCont_resist & INTRINSIC) {
2116 HCont_resist &= ~INTRINSIC;
2117 You_feel("less resistant to contamination!");
2118 u.cnd_intrinsiclosscount++;
2120 if (HCont_resist & TIMEOUT) {
2121 HCont_resist &= ~TIMEOUT;
2122 You_feel("less resistant to contamination!");
2123 u.cnd_intrinsiclosscount++;
2125 break;
2126 case 239: if (HDiscount_action & INTRINSIC) {
2127 HDiscount_action &= ~INTRINSIC;
2128 You_feel("less resistant to paralysis!");
2129 u.cnd_intrinsiclosscount++;
2131 if (HDiscount_action & TIMEOUT) {
2132 HDiscount_action &= ~TIMEOUT;
2133 You_feel("less resistant to paralysis!");
2134 u.cnd_intrinsiclosscount++;
2136 break;
2137 case 240: if (HFull_nutrient & INTRINSIC) {
2138 HFull_nutrient &= ~INTRINSIC;
2139 You_feel("a hole in your %s!", body_part(STOMACH));
2140 u.cnd_intrinsiclosscount++;
2142 if (HFull_nutrient & TIMEOUT) {
2143 HFull_nutrient &= ~TIMEOUT;
2144 You_feel("a hole in your %s!", body_part(STOMACH));
2145 u.cnd_intrinsiclosscount++;
2147 break;
2148 case 241: if (HTechnicality & INTRINSIC) {
2149 HTechnicality &= ~INTRINSIC;
2150 You_feel("less capable of using your techniques...");
2151 u.cnd_intrinsiclosscount++;
2153 if (HTechnicality & TIMEOUT) {
2154 HTechnicality &= ~TIMEOUT;
2155 You_feel("less capable of using your techniques...");
2156 u.cnd_intrinsiclosscount++;
2158 break;
2159 case 242: if (HHalf_spell_damage & INTRINSIC) {
2160 HHalf_spell_damage &= ~INTRINSIC;
2161 You_feel("vulnerable to spells!");
2162 u.cnd_intrinsiclosscount++;
2164 if (HHalf_spell_damage & TIMEOUT) {
2165 HHalf_spell_damage &= ~TIMEOUT;
2166 You_feel("vulnerable to spells!");
2167 u.cnd_intrinsiclosscount++;
2169 break;
2170 case 243: if (HHalf_physical_damage & INTRINSIC) {
2171 HHalf_physical_damage &= ~INTRINSIC;
2172 You_feel("vulnerable to damage!");
2173 u.cnd_intrinsiclosscount++;
2175 if (HHalf_physical_damage & TIMEOUT) {
2176 HHalf_physical_damage &= ~TIMEOUT;
2177 You_feel("vulnerable to damage!");
2178 u.cnd_intrinsiclosscount++;
2180 break;
2181 case 244: if (HUseTheForce & INTRINSIC) {
2182 HUseTheForce &= ~INTRINSIC;
2183 You_feel("that you lost your jedi powers!");
2184 u.cnd_intrinsiclosscount++;
2186 if (HUseTheForce & TIMEOUT) {
2187 HUseTheForce &= ~TIMEOUT;
2188 You_feel("that you lost your jedi powers!");
2189 u.cnd_intrinsiclosscount++;
2191 break;
2192 case 245: if (HScentView & INTRINSIC) {
2193 HScentView &= ~INTRINSIC;
2194 You_feel("unable to smell things!");
2195 u.cnd_intrinsiclosscount++;
2197 if (HScentView & TIMEOUT) {
2198 HScentView &= ~TIMEOUT;
2199 You_feel("unable to smell things!");
2200 u.cnd_intrinsiclosscount++;
2202 break;
2203 case 246: if (HDiminishedBleeding & INTRINSIC) {
2204 HDiminishedBleeding &= ~INTRINSIC;
2205 You_feel("your %s coagulants failing!", body_part(BLOOD));
2206 u.cnd_intrinsiclosscount++;
2208 if (HDiminishedBleeding & TIMEOUT) {
2209 HDiminishedBleeding &= ~TIMEOUT;
2210 You_feel("your %s coagulants failing!", body_part(BLOOD));
2211 u.cnd_intrinsiclosscount++;
2213 break;
2214 case 247: if (HControlMagic & INTRINSIC) {
2215 HControlMagic &= ~INTRINSIC;
2216 You_feel("unable to control your magic!");
2217 u.cnd_intrinsiclosscount++;
2219 if (HControlMagic & TIMEOUT) {
2220 HControlMagic &= ~TIMEOUT;
2221 You_feel("unable to control your magic!");
2222 u.cnd_intrinsiclosscount++;
2224 break;
2225 case 248: if (HExpBoost & INTRINSIC) {
2226 HExpBoost &= ~INTRINSIC;
2227 You_feel("a loss of experience!");
2228 u.cnd_intrinsiclosscount++;
2230 if (HExpBoost & TIMEOUT) {
2231 HExpBoost &= ~TIMEOUT;
2232 You_feel("a loss of experience!");
2233 u.cnd_intrinsiclosscount++;
2235 break;
2236 case 249: if (HPainSense & INTRINSIC) {
2237 HPainSense &= ~INTRINSIC;
2238 You_feel("unable to sense pain!");
2239 u.cnd_intrinsiclosscount++;
2241 if (HPainSense & TIMEOUT) {
2242 HPainSense &= ~TIMEOUT;
2243 You_feel("unable to sense pain!");
2244 u.cnd_intrinsiclosscount++;
2246 break;
2247 case 250:
2248 case 251:
2249 case 252: if (HInvertedState & INTRINSIC) {
2250 HInvertedState &= ~INTRINSIC;
2251 You_feel("back on your %s!", makeplural(body_part(FOOT)));
2252 u.cnd_intrinsiclosscount++;
2254 if (HInvertedState & TIMEOUT) {
2255 HInvertedState &= ~TIMEOUT;
2256 You_feel("back on your %s!", makeplural(body_part(FOOT)));
2257 u.cnd_intrinsiclosscount++;
2259 break;
2260 case 253:
2261 case 254:
2262 case 255: if (HWinceState & INTRINSIC) {
2263 HWinceState &= ~INTRINSIC;
2264 You_feel("relieved!");
2265 u.cnd_intrinsiclosscount++;
2267 if (HWinceState & TIMEOUT) {
2268 HWinceState &= ~TIMEOUT;
2269 You_feel("relieved!");
2270 u.cnd_intrinsiclosscount++;
2272 break;
2273 case 256: if (HDefusing & INTRINSIC) {
2274 HDefusing &= ~INTRINSIC;
2275 You_feel("unable to defuse traps!");
2276 u.cnd_intrinsiclosscount++;
2278 if (HDefusing & TIMEOUT) {
2279 HDefusing &= ~TIMEOUT;
2280 You_feel("unable to defuse traps!");
2281 u.cnd_intrinsiclosscount++;
2283 break;
2284 case 257:
2285 case 258: if (HBurdenedState & INTRINSIC) {
2286 HBurdenedState &= ~INTRINSIC;
2287 You_feel("lighter");
2288 u.cnd_intrinsiclosscount++;
2290 if (HBurdenedState & TIMEOUT) {
2291 HBurdenedState &= ~TIMEOUT;
2292 You_feel("lighter");
2293 u.cnd_intrinsiclosscount++;
2295 break;
2296 case 259:
2297 case 260: if (HMagicVacuum & INTRINSIC) {
2298 HMagicVacuum &= ~INTRINSIC;
2299 You_feel("capable of casting magic effectively again!");
2300 u.cnd_intrinsiclosscount++;
2302 if (HMagicVacuum & TIMEOUT) {
2303 HMagicVacuum &= ~TIMEOUT;
2304 You_feel("capable of casting magic effectively again!");
2305 u.cnd_intrinsiclosscount++;
2307 break;
2308 case 261: if (HResistancePiercing & INTRINSIC) {
2309 HResistancePiercing &= ~INTRINSIC;
2310 You_feel("unable to damage immune opponents!");
2311 u.cnd_intrinsiclosscount++;
2313 if (HResistancePiercing & TIMEOUT) {
2314 HResistancePiercing &= ~TIMEOUT;
2315 You_feel("unable to damage immune opponents!");
2316 u.cnd_intrinsiclosscount++;
2318 break;
2319 case 262: if (HFuckOverEffect & INTRINSIC) {
2320 HFuckOverEffect &= ~INTRINSIC;
2321 You_feel("that you're no longer being fucked over!");
2322 u.cnd_intrinsiclosscount++;
2324 if (HFuckOverEffect & TIMEOUT) {
2325 HFuckOverEffect &= ~TIMEOUT;
2326 You_feel("that you're no longer being fucked over!");
2327 u.cnd_intrinsiclosscount++;
2329 break;
2330 case 263: if (HMysteryResist & INTRINSIC) {
2331 HMysteryResist &= ~INTRINSIC;
2332 You_feel("less resistant to mystery attacks!");
2333 u.cnd_intrinsiclosscount++;
2335 if (HMysteryResist & TIMEOUT) {
2336 HMysteryResist &= ~TIMEOUT;
2337 You_feel("less resistant to mystery attacks!");
2338 u.cnd_intrinsiclosscount++;
2340 break;
2341 case 264: if (HMagicFindBonus & INTRINSIC) {
2342 HMagicFindBonus &= ~INTRINSIC;
2343 You_feel("less likely to find magical items!");
2344 u.cnd_intrinsiclosscount++;
2346 if (HMagicFindBonus & TIMEOUT) {
2347 HMagicFindBonus &= ~TIMEOUT;
2348 You_feel("less likely to find magical items!");
2349 u.cnd_intrinsiclosscount++;
2351 break;
2352 case 265: if (HSpellboost & INTRINSIC) {
2353 HSpellboost &= ~INTRINSIC;
2354 You_feel("your spell power waning!");
2355 u.cnd_intrinsiclosscount++;
2357 if (HSpellboost & TIMEOUT) {
2358 HSpellboost &= ~TIMEOUT;
2359 You_feel("your spell power waning!");
2360 u.cnd_intrinsiclosscount++;
2362 break;
2363 default: break;
2367 /*sit.c*/