Blindfold removal fix
[slashemextended.git] / src / exper.c
blob2a980e3ddc2a0431b8c3dfc7311c7c16f9b9c924
1 /* SCCS Id: @(#)exper.c 3.4 2002/11/20 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
5 #include "hack.h"
7 /*STATIC_DCL*/ long newuexp(int);
8 STATIC_DCL int enermod(int);
10 /*STATIC_OVL*/ long
11 newuexp(lev)
12 int lev;
14 /* KMH, balance patch -- changed again! */
15 /*if (lev < 9) return (10L * (1L << lev));
16 if (lev < 13) return (10000L * (1L << (lev - 9)));
17 if (lev == 13) return (150000L);
18 return (50000L * ((long)(lev - 9)));*/
19 /* Old XP routine */
20 /* if (lev < 10) return (10L * (1L << lev)); */
21 /* if (lev < 20) return (10000L * (1L << (lev - 10))); */
22 /* return (10000000L * ((long)(lev - 19))); */
23 /* if (lev == 1) return (75L);
24 if (lev == 2) return (150L);
25 if (lev == 3) return (300L);
26 if (lev == 4) return (600L);
27 if (lev == 5) return (1200L); */
29 /* completely overhauled by Amy */
31 if (!issoviet) {
33 if (lev == 1) return (10L); /* need 20 */
34 if (lev == 2) return (30L); /* need 20 */
35 if (lev == 3) return (70L); /* need 40 */
36 if (lev == 4) return (150L); /* need 80 */
37 if (lev == 5) return (300L); /* need 160 */
38 if (lev == 6) return (600L); /* need 320 */
39 if (lev == 7) return (1200L); /* need 640 */
40 if (lev == 8) return (2500L); /* need 1280 */
41 if (lev == 9) return (5000L); /* need 2440 */
42 if (lev == 10) return (10000L); /* need 5000 */
43 if (lev == 11) return (20000L); /* need 10000 */
44 if (lev == 12) return (40000L); /* need 20000 */
45 if (lev == 13) return (80000L); /* need 40000 */
46 if (lev == 14) return (130000L); /* need 50000 */
47 if (lev == 15) return (200000L); /* need 70000 */
48 if (lev == 16) return (280000L); /* need 80000 */
49 if (lev == 17) return (380000L); /* need 100000 */
50 if (lev == 18) return (500000L); /* need 120000 */
51 if (lev == 19) return (650000L); /* need 150000 */
52 if (lev == 20) return (850000L); /* need 200000 */
53 if (lev == 21) return (1100000L); /* need 250000 */
54 if (lev == 22) return (1400000L); /* need 300000 */
55 if (lev == 23) return (1800000L); /* need 400000 */
56 if (lev == 24) return (2300000L); /* need 500000 */
57 if (lev == 25) return (3000000L); /* need 700000 */
58 if (lev == 26) return (3800000L); /* need 800000 */
59 if (lev == 27) return (4800000L); /* need 1000000 */
60 if (lev == 28) return (6000000L); /* need 1200000 */
61 if (lev == 29) return (8000000L); /* need 2000000 */
62 return (15000000L);
64 } else {
66 if (lev == 1) return (40L);
67 if (lev == 2) return (80L);
68 if (lev == 3) return (160L);
69 if (lev == 4) return (320L);
70 if (lev == 5) return (640L);
71 if (lev == 6) return (1280L);
72 if (lev == 7) return (2560L);
73 if (lev == 8) return (5120L);
74 if (lev == 9) return (10000L);
75 if (lev == 10) return (20000L);
76 if (lev == 11) return (40000L);
77 if (lev == 12) return (80000L);
78 if (lev == 13) return (130000L);
79 if (lev == 14) return (200000L);
80 if (lev == 15) return (280000L);
81 if (lev == 16) return (380000L);
82 if (lev == 17) return (480000L);
83 if (lev == 18) return (580000L);
84 if (lev == 19) return (680000L);
85 if (lev == 20) return (850000L);
86 if (lev == 21) return (1100000L);
87 if (lev == 22) return (1400000L);
88 if (lev == 23) return (1800000L);
89 if (lev == 24) return (2300000L);
90 if (lev == 25) return (3000000L);
91 if (lev == 26) return (3800000L);
92 if (lev == 27) return (4800000L);
93 if (lev == 28) return (6000000L);
94 if (lev == 29) return (8000000L);
95 return (15000000L);
101 STATIC_OVL int
102 enermod(en)
103 int en;
105 switch (Role_switch) {
106 /* WAC 'F' and 'I' get bonus similar to 'W' */
107 case PM_FLAME_MAGE:
108 case PM_ICE_MAGE:
109 case PM_ELECTRIC_MAGE:
110 case PM_POISON_MAGE:
111 case PM_ACID_MAGE:
112 case PM_OCCULT_MASTER:
113 case PM_CHAOS_SORCEROR:
114 case PM_ELEMENTALIST:
115 case PM_PRIEST:
116 case PM_WIZARD:
117 return(2 * en);
118 case PM_HEALER:
119 case PM_KNIGHT:
120 return((3 * en) / 2);
121 case PM_BARBARIAN:
122 case PM_VALKYRIE:
123 case PM_VANILLA_VALK:
124 return((3 * en) / 4);
125 case PM_NOOB_MODE_BARB:
126 return(en / 2);
127 default:
128 return (en);
133 experience(mtmp, nk) /* return # of exp points for mtmp after nk killed */
134 register struct monst *mtmp;
135 register int nk;
136 #if defined(MAC_MPW)
137 # pragma unused(nk)
138 #endif
140 register struct permonst *ptr = mtmp->data;
141 int i, tmp, tmp2;
143 int monlevforexp, monlevdistance;
145 monlevforexp = mtmp->m_lev;
146 monlevdistance = 0;
148 /* overleveled monsters shouldn't give so much bonus; after all, a level 49 church mouse just takes more thwacks
149 * to kill compared to a level 1 one, no need to give millions of experience for that --Amy */
150 if (mtmp->m_lev > mtmp->data->mlevel) {
151 monlevdistance = mtmp->m_lev - mtmp->data->mlevel;
152 if (monlevdistance > 1) monlevdistance /= 2;
154 monlevforexp -= monlevdistance;
156 tmp = 1 + (monlevforexp * monlevforexp);
158 /* For higher ac values, give extra experience */
159 if ((i = find_mac(mtmp)) < 3) tmp += (7 - i) * ((i < 0) ? 2 : 1);
161 /* For very fast monsters, give extra experience */
162 if (ptr->mmove > NORMAL_SPEED)
163 tmp += (ptr->mmove > (3*NORMAL_SPEED/2)) ? 5 : 3;
165 /* For each "special" attack type give extra experience */
166 for(i = 0; i < NATTK; i++) {
167 tmp2 = ptr->mattk[i].aatyp;
168 if(tmp2 > AT_BUTT) {
170 if(tmp2 == AT_WEAP) tmp += 5;
171 else if(tmp2 == AT_MAGC) tmp += 10;
172 else tmp += 3;
176 /* For each "special" damage type give extra experience */
177 for(i = 0; i < NATTK; i++) {
178 tmp2 = ptr->mattk[i].adtyp;
179 if(tmp2 > AD_PHYS && tmp2 < AD_BLND) tmp += 2*monlevforexp;
180 else if((tmp2 == AD_DRLI) || (tmp2 == AD_STON) ||
181 (tmp2 == AD_SLIM)) tmp += 50;
182 else if(tmp != AD_PHYS) tmp += monlevforexp;
183 /* extra heavy damage bonus */
184 if((int)(ptr->mattk[i].damd * ptr->mattk[i].damn) > 23)
185 tmp += monlevforexp;
186 if (tmp2 == AD_WRAP && ptr->mlet == S_EEL) { /* edited by Amy */
187 tmp *= 11;
188 tmp /= 10;
192 /* For certain "extra nasty" monsters, give even more */
193 if (extra_nasty(ptr)) tmp += (rnd(7) * monlevforexp);
195 /* For higher level monsters, an additional bonus is given */
196 if(monlevforexp > 8) tmp += 50;
197 /* Amy edit: high experience levels require lots of XP, but high-level monsters don't give all that much more XP
198 * than low-level ones? gotta fix that... */
199 if(monlevforexp > 10 && monlevdistance < 3) {
200 int hilvlmod = (monlevforexp - 9);
201 tmp += (hilvlmod * hilvlmod);
203 if(monlevforexp > 20 && monlevdistance < 6) {
204 int hilvlmod = (monlevforexp - 19);
205 tmp += (hilvlmod * hilvlmod * rnd(10));
207 if(monlevforexp > 30 && monlevdistance < 9) {
208 int hilvlmod = (monlevforexp - 29);
209 tmp += (hilvlmod * hilvlmod * 10);
211 if(monlevforexp > 40 && monlevdistance < 12) {
212 int hilvlmod = (monlevforexp - 39);
213 tmp += (hilvlmod * hilvlmod * 100);
215 /* Amy edit again: but it's still not enough... */
216 if (monlevforexp > 0 && tmp > 0) {
217 tmp *= (100 + (monlevforexp * 2));
218 tmp /= 100;
221 /* fluidators are meant to make your life hard, not be a ready source of experience points --Amy */
222 if (mtmp->data->msound == MS_FLUIDATOR && tmp > 1) {
223 tmp /= 20;
224 if (tmp < 1) tmp = 1;
226 if (mtmp->data->msound == MS_BULLETATOR && tmp > 1) {
227 tmp /= 20;
228 if (tmp < 1) tmp = 1;
231 #ifdef MAIL
232 /* Mail daemons put up no fight. */
233 if(mtmp->data == &mons[PM_MAIL_DAEMON]) tmp = 1;
234 #endif
236 return(tmp);
239 void
240 more_experienced(exp, rexp)
241 register int exp, rexp;
243 if ( (u.uprops[ANTILEVELING].extrinsic || Antileveling || (uamul && uamul->oartifact == ART_NAZGUL_S_REVENGE) || have_antilevelstone() ) && !(u.ulevel < 10 && !rn2(u.ulevel + 1)) ) return;
245 if ((exp > 0) && Race_if(PM_YEEK)) exp *= 2;
246 if ((exp > 0) && uarmc && uarmc->oartifact == ART_TOO_MANY_AFFIXES) exp *= 2;
247 if (exp > 0) {
248 if (ExpBoost) exp *= (StrongExpBoost ? 3 : 2);
249 if (uarmf && uarmf->oartifact == ART_SYSTEM_OF_SEXUAL_PLEASURE) {
250 exp *= 11;
251 exp /= 10;
253 if (uarm && uarm->oartifact == ART_OH_NO_I_SAVED__AM_I_NEVERT) {
254 exp *= 11;
255 exp /= 10;
258 if (uarmc && uarmc->oartifact == ART_ARTIFICIAL_FAKE_DIFFICULTY && (exp > 1)) exp /= 2;
259 if (Race_if(PM_ETHEREALOID) && (exp > 1)) exp /= 2;
260 if (Race_if(PM_INCORPOREALOID) && (exp > 1)) exp /= 2;
261 if (Race_if(PM_MANSTER) && (exp > 1)) {
262 exp *= 2;
263 exp /= 3;
266 u.uexp += exp;
267 u.urexp += 4*exp + rexp;
268 if (uarm && uarm->oartifact == ART_ARABELLA_S_LIGHTSWITCH) u.urexp += 4*exp + rexp;
269 if(exp || flags.showscore) flags.botl = 1;
270 if (u.urexp >= (Role_if(PM_WIZARD) ? 1000 : 2000))
271 flags.beginner = 0;
274 void
275 losexp(drainer,force,dresistance) /* e.g., hit by drain life attack */
276 const char *drainer; /* cause of death, if drain should be fatal */
277 boolean force; /* Force the loss of an experience level */
278 boolean dresistance; /* level drain resistance can protect you */
280 register int num;
281 int expdrain;
283 #ifdef WIZARD
284 /* explicit wizard mode requests to reduce level are never fatal. */
285 if (drainer && !strcmp(drainer, "#levelchange"))
286 drainer = 0;
287 #endif
289 if (dresistance && Drain_resistance && rn2(StrongDrain_resistance ? 10 : 5) ) return;
291 /* level drain is too strong. Let's nerf it a bit. --Amy */
292 /* In Soviet Russia, level drain will always drain at least one level, because fuck you, stupid player. You're
293 * not supposed to stand a chance in this game. --Amy */
294 if (!force && (u.uexp > 320) && !issoviet && u.ulevel > 1) {
295 expdrain = newuexp(u.ulevel) - newuexp(u.ulevel - 1);
296 expdrain /= (isfriday ? 3 : 5);
297 expdrain = rnz(expdrain);
298 if ((u.uexp - expdrain) > newuexp(u.ulevel - 1)) {
299 /* drain some experience, but not enough to make you lose a level */
300 You_feel("your life draining away!");
301 if (PlayerHearsSoundEffects) pline(issoviet ? "Vy tol'ko chto poteryali odin uroven', skoro vy poteryayete vse urovni i umeret'." : "Due-l-ue-l-ue-l!");
302 u.uexp -= expdrain;
303 return;
305 } else if (!force && (u.uexp > 20) && (u.uexp <= 320) && !issoviet && u.ulevel > 1) {
306 expdrain = newuexp(u.ulevel) - newuexp(u.ulevel - 1);
307 expdrain /= (isfriday ? 3 : 5);
308 expdrain *= 3;
309 expdrain = rnz(expdrain);
310 if ((u.uexp - expdrain) > newuexp(u.ulevel - 1)) {
311 /* drain some experience, but not enough to make you lose a level */
312 You_feel("your life draining away!");
313 if (PlayerHearsSoundEffects) pline(issoviet ? "Vy tol'ko chto poteryali odin uroven', skoro vy poteryayete vse urovni i umeret'." : "Due-l-ue-l-ue-l!");
314 u.uexp -= expdrain;
315 return;
317 } else if (!force && (u.uexp > 10) && !issoviet && u.ulevel == 1) {
318 expdrain = 20;
319 expdrain /= (isfriday ? 3 : 5);
320 expdrain *= 3;
321 expdrain = rnz(expdrain);
322 if ((u.uexp - expdrain) > 0) {
323 /* drain some experience, but not enough to make you lose a level */
324 You_feel("your life draining away!");
325 if (PlayerHearsSoundEffects) pline(issoviet ? "Vy tol'ko chto poteryali odin uroven', skoro vy poteryayete vse urovni i umeret'." : "Due-l-ue-l-ue-l!");
326 u.uexp -= expdrain;
327 return;
331 if (issoviet) pline("BWAR KHAR (gryaznyy smekh) govorit, chto tip bloka l'da!");
333 if (u.ulevel > 1) {
334 pline("%s level %d.", Goodbye(), u.ulevel--);
335 if (PlayerHearsSoundEffects) pline(issoviet ? "Vy tol'ko chto poteryali odin uroven', skoro vy poteryayete vse urovni i umeret'." : "Due-l-ue-l-ue-l!");
336 /* remove intrinsic abilities */
337 adjabil(u.ulevel + 1, u.ulevel);
338 reset_rndmonst(NON_PM); /* new monster selection */
339 } else {
340 if (drainer) {
341 u.youaredead = 1;
342 killer_format = KILLED_BY;
343 killer = drainer;
344 done(DIED);
345 u.youaredead = 0;
347 /* no drainer or lifesaved */
348 u.uexp = 0;
350 num = newhp();
351 u.uhpmax -= num;
352 u.uhpmax -= rn2(3);
353 u.uhpmax -= rnz(2);
354 u.uhpmax -= rnz(3); /* making the drain for gain exploit much harder to perform --Amy */
355 if (u.ulevel >= 19) u.uhpmax -= rnd(2);
356 if (u.ulevel >= 24) u.uhpmax -= rnd(2);
357 if (u.ulevel >= 27) u.uhpmax -= rnd(3);
358 if (u.ulevel >= 29) u.uhpmax -= rnd(10);
359 if (u.uhpmax < 1) u.uhpmax = 1;
360 u.uhp -= num;
361 u.uhp -= rn2(3);
362 u.uhp -= rnz(3);
363 u.uhp -= rnz(2);
364 if (u.ulevel >= 19) u.uhp -= rnd(2);
365 if (u.ulevel >= 24) u.uhp -= rnd(2);
366 if (u.ulevel >= 27) u.uhp -= rnd(3);
367 if (u.ulevel >= 29) u.uhp -= rnd(10);
368 if (u.uhp < 1) u.uhp = 1;
369 else if (u.uhp > u.uhpmax) u.uhp = u.uhpmax;
371 /* screwy vanilla programmers... they were so lazy and forgot to make it so that your polymorph form gets drained! */
372 if (Upolyd) {
373 u.mhmax -= num;
374 u.mhmax -= rn2(3);
375 u.mhmax -= rnz(2);
376 u.mhmax -= rnz(3); /* making the drain for gain exploit much harder to perform --Amy */
377 if (u.ulevel >= 19) u.mhmax -= rnd(2);
378 if (u.ulevel >= 24) u.mhmax -= rnd(2);
379 if (u.ulevel >= 27) u.mhmax -= rnd(3);
380 if (u.ulevel >= 29) u.mhmax -= rnd(10);
381 if (u.mhmax < 1) u.mhmax = 1;
382 u.mh -= num;
383 u.mh -= rn2(3);
384 u.mh -= rnz(3);
385 u.mh -= rnz(2);
386 if (u.ulevel >= 19) u.mh -= rnd(2);
387 if (u.ulevel >= 24) u.mh -= rnd(2);
388 if (u.ulevel >= 27) u.mh -= rnd(3);
389 if (u.ulevel >= 29) u.mh -= rnd(10);
390 if (u.mh < 1) u.mh = 1;
391 else if (u.mh > u.mhmax) u.mh = u.mhmax;
394 if (u.ulevel < urole.xlev)
395 num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.lornd + urace.enadv.lornd,
396 urole.enadv.lofix + urace.enadv.lofix);
397 else
398 num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.hirnd + urace.enadv.hirnd,
399 urole.enadv.hifix + urace.enadv.hifix);
400 num = enermod(num); /* M. Stephenson */
401 u.uenmax -= num;
402 u.uenmax -= rn2(3);
403 u.uenmax -= rnz(3);
404 u.uenmax -= (rn2(3) ? rnz(1) : rnz(2));
405 if (u.uenmax < 0) u.uenmax = 0;
406 u.uen -= num;
407 u.uen -= rn2(3);
408 u.uen -= rnz(3);
409 if (u.uen < 0) u.uen = 0;
410 else if (u.uen > u.uenmax) u.uen = u.uenmax;
412 if (u.uexp > 0)
413 u.uexp = newuexp(u.ulevel) - 1;
414 flags.botl = 1;
418 * Make experience gaining similar to AD&D(tm), whereby you can at most go
419 * up by one level at a time, extra expr possibly helping you along.
420 * After all, how much real experience does one get shooting a wand of death
421 * at a dragon created with a wand of polymorph??
423 void
424 newexplevel()
426 if (u.ulevel < MAXULEV && u.uexp >= newuexp(u.ulevel))
427 pluslvl(TRUE);
428 else if (u.uexp >= (10000000 + (2000000 * u.xtralevelmult))) {
429 You_feel("more experienced.");
430 pluslvl(TRUE); /* will increase the xtralevelmult variable */
431 /* leveling via EXP can keep giving you skill slots --Amy
432 * but now also via gain level, because that requires more and more potions, too
433 * effect moved to pluslvl() function */
437 /* for calculations where stuff is supposed to get better late into the game, so that the char doesn't suck --Amy
438 * "boostmult" is a multiplier that determines how much of an impact the boost value has */
440 boosted_ulevel(boostmult)
441 int boostmult;
443 int boostedlevel = u.ulevel;
445 boostedlevel += (boost_power_value() * boostmult);
447 return boostedlevel;
450 /* if your level is rather high already, gain level effects shouldn't always give you a full level --Amy
451 * important: increase u.uexp value even when you have anti-experience! */
452 void
453 gainlevelmaybe()
455 if (u.ulevel >= MAXULEV && ((u.uexp + 200000) < (10000000 + (2000000 * u.xtralevelmult)) ) ) {
456 u.uexp += 200000;
457 flags.botl = TRUE;
458 You("gain experience.");
459 } else if (u.ulevel < MAXULEV && ((u.uexp + 200000) < newuexp(u.ulevel)) ) {
460 u.uexp += 200000;
461 flags.botl = TRUE;
462 You("gain experience.");
463 } else pluslvl(FALSE);
466 void
467 pluslvl(incr)
468 boolean incr; /* true iff via incremental experience growth */
469 { /* (false for potion of gain level) */
470 register int num;
472 if (!incr) You_feel("more experienced.");
474 if (u.ulevel >= MAXULEV) {
475 u.uexp = 10000000; /* reset counter for gain level */
476 u.xtralevelmult++;
477 u.cnd_overlevelcount++;
478 u.weapon_slots++; /* leveling past 30 can keep giving you skill slots --Amy */
479 techlevelup(); /* and also improve your techniques --Amy */
482 if (u.ulevel < MAXULEV) {
484 if (!((Deprovement || u.uprops[DEPROVEMENT].extrinsic || have_deprovementstone()) && !(u.ulevel < 10 && !rn2(u.ulevel + 1)) && rn2(10) ) ) {
486 /* homicider only gains 50% of the usual amount --Amy */
487 /* a.k.a. "bullshit downside that every fun new race gets" (term coined by Khor) */
489 num = newhp();
490 num += rnz(2);
491 if (num < 0) num = 0;
492 num += rn2(3);
493 if (u.ulevel >= 19) num += rnd(2);
494 if (u.ulevel >= 24) num += rnd(2);
495 if (u.ulevel >= 27) num += rnd(3);
496 if (u.ulevel >= 29) num += rnd(10);
498 if (Race_if(PM_YEEK) || Race_if(PM_DUFFLEPUD) || Race_if(PM_PLAYER_FAIRY)) num /= 2;
499 if (Race_if(PM_PLAYER_DOLGSMAN)) {
500 num *= 3;
501 num /= 4;
504 if (ishomicider && num > 0) {
505 num /= 2;
506 if (num > 0 && !rn2(2)) num--;
508 if (Race_if(PM_SPRIGGAN) && num > 0) {
509 num /= 2;
510 if (num > 0 && !rn2(2)) num--;
513 u.uhpmax += num;
514 u.uhp += num;
516 if ((u.ulevel >= u.urmaxlvlUP && u.ulevel < 30) && !issoviet && (u.uhp < u.uhpmax)) u.uhp = u.uhpmax;
517 if (issoviet) pline("Vy dazhe ne poluchayete polnyye linii, potomu chto sovetskiy ne ponimayet, kak rolevyye igry rabotayut!");
518 /* In Soviet Russia, you don't get full health on leveling up because seriously, who needs that? --Amy */
519 if (Upolyd) {
520 num = rnz(8); /* unfortunately will be lost upon unpolymorphing --Amy */
521 if (num < 0) num = 0;
522 num += rn2(3);
524 if (Race_if(PM_YEEK) || Race_if(PM_DUFFLEPUD) || Race_if(PM_PLAYER_FAIRY)) num /= 2;
525 if (Race_if(PM_PLAYER_DOLGSMAN)) {
526 num *= 3;
527 num /= 4;
530 u.mhmax += num;
531 u.mh += num;
533 if ((u.ulevel >= u.urmaxlvlUP && u.ulevel < 30) && !issoviet && (u.mh < u.mhmax)) u.mh = u.mhmax;
535 if (u.ulevel < urole.xlev)
536 num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.lornd + urace.enadv.lornd,
537 urole.enadv.lofix + urace.enadv.lofix);
538 else
539 num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.hirnd + urace.enadv.hirnd,
540 urole.enadv.hifix + urace.enadv.hifix);
542 num = enermod(num); /* M. Stephenson */
543 num += (rn2(3) ? rnz(1) : rnz(2));
544 if (num < 0) num = 0;
545 num += rn2(3);
547 if (Race_if(PM_YEEK) || Race_if(PM_DUFFLEPUD)) num /= 2;
549 if (ishomicider && num > 0) {
550 num /= 2;
551 if (num > 0 && !rn2(2)) num--;
554 u.uenmax += num;
555 u.uen += num;
556 } /* homicider check */
558 } else { /* u.ulevel > MAXULEV */
560 if (!((Deprovement || u.uprops[DEPROVEMENT].extrinsic || have_deprovementstone()) && !(u.ulevel < 10 && !rn2(u.ulevel + 1)) && rn2(10) ) ) {
562 num = newhp();
563 num += rnz(2);
564 if (num < 0) num = 0;
565 if (num > 1) num /= rnd(12);
566 num += rn2(2);
568 if (Race_if(PM_YEEK) || Race_if(PM_DUFFLEPUD) || Race_if(PM_PLAYER_FAIRY)) num /= 2;
569 if (Race_if(PM_PLAYER_DOLGSMAN)) {
570 num *= 3;
571 num /= 4;
574 if (ishomicider && num > 0) {
575 num /= 2;
576 if (num > 0 && !rn2(2)) num--;
578 if (Race_if(PM_SPRIGGAN) && num > 0) {
579 num /= 2;
580 if (num > 0 && !rn2(2)) num--;
583 u.uhpmax += num;
584 u.uhp += num;
586 if (Upolyd) {
587 num = rnz(8); /* unfortunately will be lost upon unpolymorphing --Amy */
588 if (num < 0) num = 0;
589 if (num > 1) num /= rnd(12);
590 num += rn2(2);
592 if (Race_if(PM_YEEK) || Race_if(PM_DUFFLEPUD) || Race_if(PM_PLAYER_FAIRY)) num /= 2;
593 if (Race_if(PM_PLAYER_DOLGSMAN)) {
594 num *= 3;
595 num /= 4;
598 u.mhmax += num;
599 u.mh += num;
601 if (u.ulevel < urole.xlev)
602 num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.lornd + urace.enadv.lornd,
603 urole.enadv.lofix + urace.enadv.lofix);
604 else
605 num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.hirnd + urace.enadv.hirnd,
606 urole.enadv.hifix + urace.enadv.hifix);
608 num = enermod(num); /* M. Stephenson */
609 num += (rn2(3) ? rnz(1) : rnz(2));
610 if (num < 0) num = 0;
611 if (num > 1) num /= rnd(12);
612 num += rn2(2);
614 if (Race_if(PM_YEEK) || Race_if(PM_DUFFLEPUD)) num /= 2;
616 if (ishomicider && num > 0) {
617 num /= 2;
618 if (num > 0 && !rn2(2)) num--;
621 u.uenmax += num;
622 u.uen += num;
624 } /* homicider check */
626 } /* u.ulevel > or < MAXULEV */
628 if(u.ulevel < MAXULEV) {
629 if (incr) {
630 long tmp = newuexp(u.ulevel + 1);
631 if (u.uexp >= tmp) u.uexp = tmp - 1;
632 } else {
633 u.uexp = newuexp(u.ulevel);
635 ++u.ulevel;
636 if (u.ulevelmax < u.ulevel) u.ulevelmax = u.ulevel;
638 if (Race_if(PM_RELEASIER)) verbalize("Iii-am-debest!");
639 else pline("Welcome to experience level %d.", u.ulevel);
641 adjabil(u.ulevel - 1, u.ulevel); /* give new intrinsics */
642 reset_rndmonst(NON_PM); /* new monster selection */
645 exprecalc();
647 flags.botl = 1;
650 /* compute a random amount of experience points suitable for the hero's
651 experience level: base number of points needed to reach the current
652 level plus a random portion of what it takes to get to the next level */
653 long
654 rndexp(gaining)
655 boolean gaining; /* gaining XP via potion vs setting XP for polyself */
657 long minexp, maxexp, diff, factor, result;
659 minexp = (u.ulevel == 1) ? 0L : newuexp(u.ulevel - 1);
660 maxexp = newuexp(u.ulevel);
661 /* don't make blessed gain level too strong... --Amy */
662 if (gaining && ((newuexp(u.ulevel) - newuexp(u.ulevel - 1)) > 200000)) {
663 maxexp = (newuexp(u.ulevel - 1)) + 200000;
665 diff = maxexp - minexp, factor = 1L;
666 /* make sure that `diff' is an argument which rn2() can handle */
667 while (diff >= (long)LARGEST_INT)
668 diff /= 2L, factor *= 2L;
669 result = minexp + factor * (long)rn2((int)diff);
670 /* 3.4.1: if already at level 30, add to current experience
671 points rather than to threshold needed to reach the current
672 level; otherwise blessed potions of gain level can result
673 in lowering the experience points instead of raising them */
674 if (u.ulevel == MAXULEV && gaining) {
675 result += (u.uexp - minexp);
676 /* avoid wrapping (over 400 blessed potions needed for that...) */
677 if (result < u.uexp) result = u.uexp;
679 return result;
682 void
683 exprecalc(void)
685 register struct obj *acqo;
686 struct obj *ubookz;
688 while (u.ulevel > u.urmaxlvlUP && u.ulevel < 30) {
689 u.urmaxlvlUP++;
691 if ( (Role_if(PM_FEMINIST) || Role_if(PM_GRENADONIN)) && !rn2(5)) {
693 boolean havegifts = u.ugifts;
695 if (!havegifts) u.ugifts++;
697 acqo = mk_artifact((struct obj *)0, !rn2(3) ? A_CHAOTIC : rn2(2) ? A_NEUTRAL : A_LAWFUL, TRUE);
698 if (acqo) {
699 dropy(acqo);
700 int acqoskill = get_obj_skill(acqo, TRUE);
701 if (P_MAX_SKILL(acqoskill) == P_ISRESTRICTED) {
702 unrestrict_weapon_skill(acqoskill);
703 } else if (P_MAX_SKILL(acqoskill) == P_UNSKILLED) {
704 unrestrict_weapon_skill(acqoskill);
705 P_MAX_SKILL(acqoskill) = P_BASIC;
706 } else if (rn2(2) && P_MAX_SKILL(acqoskill) == P_BASIC) {
707 P_MAX_SKILL(acqoskill) = P_SKILLED;
708 } else if (!rn2(4) && P_MAX_SKILL(acqoskill) == P_SKILLED) {
709 P_MAX_SKILL(acqoskill) = P_EXPERT;
710 } else if (!rn2(10) && P_MAX_SKILL(acqoskill) == P_EXPERT) {
711 P_MAX_SKILL(acqoskill) = P_MASTER;
712 } else if (!rn2(100) && P_MAX_SKILL(acqoskill) == P_MASTER) {
713 P_MAX_SKILL(acqoskill) = P_GRAND_MASTER;
714 } else if (!rn2(200) && P_MAX_SKILL(acqoskill) == P_GRAND_MASTER) {
715 P_MAX_SKILL(acqoskill) = P_SUPREME_MASTER;
718 if (Race_if(PM_RUSMOT)) {
719 if (P_MAX_SKILL(acqoskill) == P_ISRESTRICTED) {
720 unrestrict_weapon_skill(acqoskill);
721 } else if (P_MAX_SKILL(acqoskill) == P_UNSKILLED) {
722 unrestrict_weapon_skill(acqoskill);
723 P_MAX_SKILL(acqoskill) = P_BASIC;
724 } else if (rn2(2) && P_MAX_SKILL(acqoskill) == P_BASIC) {
725 P_MAX_SKILL(acqoskill) = P_SKILLED;
726 } else if (!rn2(4) && P_MAX_SKILL(acqoskill) == P_SKILLED) {
727 P_MAX_SKILL(acqoskill) = P_EXPERT;
728 } else if (!rn2(10) && P_MAX_SKILL(acqoskill) == P_EXPERT) {
729 P_MAX_SKILL(acqoskill) = P_MASTER;
730 } else if (!rn2(100) && P_MAX_SKILL(acqoskill) == P_MASTER) {
731 P_MAX_SKILL(acqoskill) = P_GRAND_MASTER;
732 } else if (!rn2(200) && P_MAX_SKILL(acqoskill) == P_GRAND_MASTER) {
733 P_MAX_SKILL(acqoskill) = P_SUPREME_MASTER;
737 discover_artifact(acqo->oartifact);
739 if (!havegifts) u.ugifts--;
740 pline("An artifact appeared beneath you!");
746 if (uarmh && uarmh->oartifact == ART_JESTES_TAKA_KURWA) {
747 if (u.urmaxlvlUP == 4) NotSeenBug |= FROMOUTSIDE;
748 else if (u.urmaxlvlUP == 8) GrayoutBug |= FROMOUTSIDE;
749 else if (u.urmaxlvlUP == 12) DifficultyIncreased |= FROMOUTSIDE;
750 else if (u.urmaxlvlUP == 16) UnfairAttackBug |= FROMOUTSIDE;
751 else if (u.urmaxlvlUP == 20) EnmityBug |= FROMOUTSIDE;
752 else if (u.urmaxlvlUP == 25) ElongationBug |= FROMOUTSIDE;
753 else if (u.urmaxlvlUP == 30) Antileveling |= FROMOUTSIDE;
756 if (Role_if(PM_CLIMACTERIAL) && !rn2(3)) {
758 boolean climintcheck = 0;
759 int whichcheck = u.climauspices3;
760 int displaycheck = 3;
761 switch (u.urmaxlvlUP) {
762 default:
763 whichcheck = 0; displaycheck = 0; goto climdone; break;
764 case 2:
765 whichcheck = u.climauspices3; displaycheck = 3; break;
766 case 5:
767 whichcheck = u.climauspices6; displaycheck = 6; break;
768 case 8:
769 whichcheck = u.climauspices9; displaycheck = 9; break;
770 case 11:
771 whichcheck = u.climauspices12; displaycheck = 12; break;
772 case 14:
773 whichcheck = u.climauspices15; displaycheck = 15; break;
774 case 17:
775 whichcheck = u.climauspices18; displaycheck = 18; break;
776 case 20:
777 whichcheck = u.climauspices21; displaycheck = 21; break;
778 case 23:
779 whichcheck = u.climauspices24; displaycheck = 24; break;
780 case 26:
781 whichcheck = u.climauspices27; displaycheck = 27; break;
782 case 27:
783 whichcheck = u.climauspices30; displaycheck = 30; break;
785 if (rnd(70) < ACURR(A_INT)) climintcheck = 1;
787 if (climintcheck) { /* keyword "marlena" */
788 switch (whichcheck) {
789 case 1:
790 pline("You receive an elaborate auspicious message: At experience level %d, the game will start spawning random fart traps, heel traps and farting monsters.", displaycheck);
791 break;
792 case 2:
793 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters have greatly increased to-hit for their kick attacks.", displaycheck);
794 break;
795 case 3:
796 pline("You receive an elaborate auspicious message: At experience level %d, some glyphs will display in a green color.", displaycheck);
797 break;
798 case 4:
799 pline("You receive an elaborate auspicious message: At experience level %d, random shit traps will start spawning and you trigger them even if you fly.", displaycheck);
800 break;
801 case 5:
802 pline("You receive an elaborate auspicious message: At experience level %d, your constitution is decreased, lashing monsters deal extra damage to you, and monsters with touch attacks can cause you to fart.", displaycheck);
803 break;
804 case 6:
805 pline("You receive an elaborate auspicious message: At experience level %d, you randomly get hit with the aggravate monster effect and the chat command can irritate monsters.", displaycheck);
806 break;
807 case 7:
808 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters have more HP, and their to-hit against you is increased while your to-hit against them is reduced.", displaycheck);
809 break;
810 case 8:
811 pline("You receive an elaborate auspicious message: At experience level %d, farting monsters can fart at you from a distance, and if they find a toilet, they can paralyze you from infinitely far away.", displaycheck);
812 break;
813 case 9:
814 pline("You receive an elaborate auspicious message: At experience level %d, monsters with farting or high heel attacks may use them several times at once.", displaycheck);
815 break;
816 case 10:
817 pline("You receive an elaborate auspicious message: At experience level %d, walking over a toilet can cause you to take a shit, your strength and dexterity are reduced, and monsters can use toilets to paralyze you.", displaycheck);
818 break;
819 case 11:
820 pline("You receive an elaborate auspicious message: At experience level %d, a ghostly girl will start to follow you.", displaycheck);
821 break;
822 case 12:
823 pline("You receive an elaborate auspicious message: At experience level %d, attacking an intelligent female monster causes you to get hit with retribution.", displaycheck);
824 break;
825 case 13:
826 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can attack you with winter stilettos.", displaycheck);
827 break;
828 case 14:
829 pline("You receive an elaborate auspicious message: At experience level %d, you have to dance or get scarred by female toenails.", displaycheck);
830 break;
831 case 15:
832 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can scrape off more and more skin the more often they kick you.", displaycheck);
833 break;
834 case 16:
835 pline("You receive an elaborate auspicious message: At experience level %d, toilets start spawning randomly and walking over one can cause you to take a crap.", displaycheck);
836 break;
837 case 17:
838 pline("You receive an elaborate auspicious message: At experience level %d, you will have to fart randomly.", displaycheck);
839 break;
840 case 18:
841 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can fart at you.", displaycheck);
842 break;
843 case 19:
844 pline("You receive an elaborate auspicious message: At experience level %d, stinking clouds can form randomly.", displaycheck);
845 break;
846 case 20:
847 pline("You receive an elaborate auspicious message: At experience level %d, you may sometimes become heavily confused, and tiles can turn into clouds, occasionally with monsters.", displaycheck);
848 break;
849 case 21:
850 pline("You receive an elaborate auspicious message: At experience level %d, monsters with loud farting attacks spawn over time.", displaycheck);
851 break;
852 case 22:
853 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters deal more damage to you with kick attacks and may request that you clean their shoes.", displaycheck);
854 break;
855 case 23:
856 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters have additional hug attacks.", displaycheck);
857 break;
858 case 24:
859 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters move more quickly.", displaycheck);
860 break;
861 case 25:
862 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can knee you in the nuts repeatedly and occasionally also massage them.", displaycheck);
863 break;
864 case 26:
865 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters with kick attacks can paralyze you.", displaycheck);
866 break;
867 case 27:
868 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can burn you with cigarettes.", displaycheck);
869 break;
870 case 28:
871 pline("You receive an elaborate auspicious message: At experience level %d, monsters with kick attacks can wither your gear.", displaycheck);
872 break;
873 case 29:
874 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can kick the weapon out of your hands.", displaycheck);
875 break;
876 case 30:
877 pline("You receive an elaborate auspicious message: At experience level %d, Julietta will subject you to random punishments.", displaycheck);
878 break;
879 case 31:
880 pline("You receive an elaborate auspicious message: At experience level %d, the master of nasty traps will start constructing traps everywhere.", displaycheck);
881 break;
882 case 32:
883 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters will attack you with random high heels.", displaycheck);
884 break;
885 case 33:
886 pline("You receive an elaborate auspicious message: At experience level %d, perfume monsters will spawn much more frequently, and you trigger shit traps even if you fly.", displaycheck);
887 break;
888 case 34:
889 pline("You receive an elaborate auspicious message: At experience level %d, monsters that use conversion sermon will spawn over time.", displaycheck);
890 break;
891 case 35:
892 pline("You receive an elaborate auspicious message: At experience level %d, monsters with claw attacks spawn more often and can damage your worn boots.", displaycheck);
893 break;
894 case 36:
895 pline("You receive an elaborate auspicious message: At experience level %d, monsters with squeaky farting attacks spawn more often, and all hostile farting monsters are very hard to kill.", displaycheck);
896 break;
897 case 37:
898 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps spawn much more often.", displaycheck);
899 break;
900 case 38:
901 pline("You receive an elaborate auspicious message: At experience level %d, you develop anorexia and have reduced strength and constitution.", displaycheck);
902 break;
903 case 39:
904 pline("You receive an elaborate auspicious message: At experience level %d, random shoe monsters will spawn over time and want you to clean them.", displaycheck);
905 break;
906 case 40:
907 pline("You receive an elaborate auspicious message: At experience level %d, female monsters with kick attacks spawn much more often and are also sometimes forcibly spawned.", displaycheck);
908 break;
909 case 41:
910 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can try to steal your items.", displaycheck);
911 break;
912 case 42:
913 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can scratch you bloodily with their heels.", displaycheck);
914 break;
915 case 43:
916 pline("You receive an elaborate auspicious message: At experience level %d, you sometimes fumble into a heap of shit, even if you fly.", displaycheck);
917 break;
918 case 44:
919 pline("You receive an elaborate auspicious message: At experience level %d, an annoying blonde will start to annoy you to death.", displaycheck);
920 break;
921 case 45:
922 pline("You receive an elaborate auspicious message: At experience level %d, female monsters will just swat your projectiles away.", displaycheck);
923 break;
924 case 46:
925 pline("You receive an elaborate auspicious message: At experience level %d, female socks will attack you constantly and try to paralyze you.", displaycheck);
926 break;
927 case 47:
928 pline("You receive an elaborate auspicious message: At experience level %d, grave walls will start appearing, and they have paralysis traps or hostile women underneath.", displaycheck);
929 break;
930 case 48:
931 pline("You receive an elaborate auspicious message: At experience level %d, female monsters will start constructing paralysis traps for you to stumble into.", displaycheck);
932 break;
933 case 49:
934 pline("You receive an elaborate auspicious message: At experience level %d, female monsters have super regeneration.", displaycheck);
935 break;
936 case 50:
937 pline("You receive an elaborate auspicious message: At experience level %d, female monsters are no longer afraid of you and always know where you are.", displaycheck);
938 break;
939 case 51:
940 pline("You receive an elaborate auspicious message: At experience level %d, women with block-heeled combat boots will be very angry at you and show you who's the boss of this dungeon.", displaycheck);
941 break;
942 case 52:
943 pline("You receive an elaborate auspicious message: At experience level %d, some women will fart you in the face without emitting any kind of sound.", displaycheck);
944 break;
945 case 53:
946 pline("You receive an elaborate auspicious message: At experience level %d, you turn into a thick girl with steel-capped sandals.", displaycheck);
947 break;
948 case 54:
949 pline("You receive an elaborate auspicious message: At experience level %d, you'll start walking the dyke with your extra thick block heels.", displaycheck);
950 break;
951 case 55:
952 pline("You receive an elaborate auspicious message: At experience level %d, you have to go to the toilet together with Antje, and may end up quitting the game because you consider the toilet minigame to be too icky.", displaycheck);
953 break;
954 case 56:
955 pline("You receive an elaborate auspicious message: At experience level %d, female monsters will attack you with block-heeled boots, wooden sandals and soft sneakers.", displaycheck);
956 break;
957 case 57:
958 pline("You receive an elaborate auspicious message: At experience level %d, you have to fight lots of monster shoes, pants and socks.", displaycheck);
959 break;
960 case 58:
961 pline("You receive an elaborate auspicious message: At experience level %d, you have to step into dog shit every once in a while.", displaycheck);
962 break;
963 case 59:
964 pline("You receive an elaborate auspicious message: At experience level %d, you develop 'anorexia' which means that you have to vomit whenever you eat, although that condition is actually called bulimia nervosa.", displaycheck);
965 break;
966 case 60:
967 pline("You receive an elaborate auspicious message: At experience level %d, you start menstruating if you're female, or if you're not, you'll be whacked over the head by female wedge sandals repeatedly (which serves you right if you dare being male, muahahahaha!).", displaycheck);
968 break;
969 case 61:
970 pline("You receive an elaborate auspicious message: At experience level %d, boss bitches will challenge you to a duel.", displaycheck);
971 break;
972 case 62:
973 pline("You receive an elaborate auspicious message: At experience level %d, you'll see what kind of pants the girls are wearing.", displaycheck);
974 break;
975 case 63:
976 pline("You receive an elaborate auspicious message: At experience level %d, you have to watch out because there might be heaps of shit where you don't expect them.", displaycheck);
977 break;
978 case 64:
979 pline("You receive an elaborate auspicious message: At experience level %d, you're not allowed to freely attack women anymore, you sick bastard.", displaycheck);
980 break;
981 case 65:
982 pline("You receive an elaborate auspicious message: At experience level %d, women are surrounded by a dark ball of light (i.e. black light).", displaycheck);
983 break;
984 case 66:
985 pline("You receive an elaborate auspicious message: At experience level %d, monsters will trigger feminism traps for you, hahaha.", displaycheck);
986 break;
987 case 67:
988 pline("You receive an elaborate auspicious message: At experience level %d, you'll have to sniff worn female pants on occasion.", displaycheck);
989 break;
990 case 68:
991 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps will affect you for a loooooong time.", displaycheck);
992 break;
993 case 69:
994 pline("You receive an elaborate auspicious message: At experience level %d, women will powerfully kick you with their platform sandals.", displaycheck);
995 break;
996 case 70:
997 pline("You receive an elaborate auspicious message: At experience level %d, you'll start encountering lots of ladies in elegant cone-heeled pumps.", displaycheck);
998 break;
999 case 71:
1000 pline("You receive an elaborate auspicious message: At experience level %d, thick women can hold you in place so that you can't run away.", displaycheck);
1001 break;
1002 case 72:
1003 pline("You receive an elaborate auspicious message: At experience level %d, some little girl wants to crap loudly to annoy you.", displaycheck);
1004 break;
1005 case 73:
1006 pline("You receive an elaborate auspicious message: At experience level %d, some girl will wait just until you're out of commission, and then she'll move up to you and fart you in the face.", displaycheck);
1007 break;
1008 case 74:
1009 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps will be built for you, and I hope you'll trigger every last one of them because they make the game more exciting.", displaycheck);
1010 break;
1011 case 75:
1012 pline("You receive an elaborate auspicious message: At experience level %d, girls and women will regenerate health a bit more quickly.", displaycheck);
1013 break;
1014 case 76:
1015 pline("You receive an elaborate auspicious message: At experience level %d, you kinda turn into a gang scholar, so you'll have to deal with the Bang Gang and Anna's hussies.", displaycheck);
1016 break;
1017 case 77:
1018 pline("You receive an elaborate auspicious message: At experience level %d, you kinda turn into a shoe fetishist, meaning that you'll encounter lots of shoe monsters and they have some new kick attacks that everyone wants to experience.", displaycheck);
1019 break;
1020 case 78:
1021 pline("You receive an elaborate auspicious message: At experience level %d, ladies will come for you and produce very tender farting noises that you'll find irresistible.", displaycheck);
1022 break;
1023 case 79:
1024 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps will start to behave like nasty traps.", displaycheck);
1025 break;
1026 case 80:
1027 pline("You receive an elaborate auspicious message: At experience level %d, you'll have a harder time fighting women.", displaycheck);
1028 break;
1029 case 81:
1030 pline("You receive an elaborate auspicious message: At experience level %d, female monsters will have additional armor class and resistances.", displaycheck);
1031 break;
1032 case 82:
1033 pline("You receive an elaborate auspicious message: At experience level %d, you'll hear clacking noises whenever someone walks around in high heels.", displaycheck);
1034 break;
1035 case 83:
1036 pline("You receive an elaborate auspicious message: At experience level %d, a nice girl will start following you around and have fun with you.", displaycheck);
1037 break;
1038 case 84:
1039 pline("You receive an elaborate auspicious message: At experience level %d, you can use high heels even without having the skill but cannot have certain properties if you aren't wearing any.", displaycheck);
1040 break;
1041 case 85:
1042 pline("You receive an elaborate auspicious message: At experience level %d, your shoes can turn into artifact missys but the patriarch will try to beat you up.", displaycheck);
1043 break;
1044 case 86:
1045 pline("You receive an elaborate auspicious message: At experience level %d, particularly feminine monsters are unlikely to die for real when they're killed.", displaycheck);
1046 break;
1047 case 87:
1048 pline("You receive an elaborate auspicious message: At experience level %d, monsters might occasionally polymorph into particularly feminine ones.", displaycheck);
1049 break;
1050 case 88:
1051 pline("You receive an elaborate auspicious message: At experience level %d, a little girl starts stealing your stuff and running away on occasion.", displaycheck);
1052 break;
1053 case 89:
1054 pline("You receive an elaborate auspicious message: At experience level %d, monsters with feminism attacks are spawning more often.", displaycheck);
1055 case 90:
1056 pline("You receive an elaborate auspicious message: At experience level %d, covetous shoes will spawn over time and attack you.", displaycheck);
1057 case 91:
1058 pline("You receive an elaborate auspicious message: At experience level %d, shoe monsters spawn more often and occasionally appear in groups.", displaycheck);
1059 case 92:
1060 pline("You receive an elaborate auspicious message: At experience level %d, shoe monsters may appear to attack you and then immediately disappear to another dungeon level.", displaycheck);
1061 case 93:
1062 pline("You receive an elaborate auspicious message: At experience level %d, farting or perfume monsters will be waiting for you on certain dungeon levels.", displaycheck);
1063 case 94:
1064 pline("You receive an elaborate auspicious message: At experience level %d, smaller female monsters are more likely to chase you aggressively.", displaycheck);
1065 case 95:
1066 pline("You receive an elaborate auspicious message: At experience level %d, girls who produce squeaky farting noises want to play with you, but if you treat them badly they'll try to kill you.", displaycheck);
1067 case 96:
1068 pline("You receive an elaborate auspicious message: At experience level %d, the Bang Gang will hunt you, and they have equipment that allows them to block your progress or create traps.", displaycheck);
1069 case 97:
1070 pline("You receive an elaborate auspicious message: At experience level %d, female item-stealing monsters are likely to levelport away with your stuff.", displaycheck);
1071 case 98:
1072 pline("You receive an elaborate auspicious message: At experience level %d, damaging a female monster causes you to be affected with a nastytrap effect.", displaycheck);
1073 break;
1074 case 99:
1075 pline("You receive an elaborate auspicious message: At experience level %d, female sneakers are upper strong.", displaycheck);
1076 break;
1077 case 100:
1078 pline("You receive an elaborate auspicious message: At experience level %d, hitting a female monster may cause aggravation.", displaycheck);
1079 break;
1080 case 101:
1081 pline("You receive an elaborate auspicious message: At experience level %d, perfume monsters shoot red gas bullets at you which emit a horrible stench.", displaycheck);
1082 break;
1083 case 102:
1084 pline("You receive an elaborate auspicious message: At experience level %d, being paralyzed can cause treaded high heels to attack you intermittently.", displaycheck);
1085 break;
1086 case 103:
1087 pline("You receive an elaborate auspicious message: At experience level %d, you're supposed to wear Sabrina's platform boots, and are chased by angry women. If you don't wear the boots, you won't be able to defeat the women, hahaha!", displaycheck);
1088 break;
1090 } else pline("Your auspices say: %d %d", displaycheck, whichcheck);
1093 climdone:
1095 if (Role_if(PM_FEMINIST) && !rn2(3)) {
1097 boolean femintcheck = 0;
1098 if (rnd(70) < ACURR(A_INT)) femintcheck = 1;
1100 if (u.urmaxlvlUP == 3) {
1101 switch (u.femauspices4) {
1102 case 1:
1103 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, your potions will have a chance of not working when quaffed.");
1104 else pline("Your auspices say: 4 1");
1105 break;
1106 case 2:
1107 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, your techniques will stop working.");
1108 else pline("Your auspices say: 4 2");
1109 break;
1110 case 3:
1111 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, Elbereth engravings will no longer work.");
1112 else pline("Your auspices say: 4 3");
1113 break;
1114 case 4:
1115 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, zapping a wand will have a chance to make it explode.");
1116 else pline("Your auspices say: 4 4");
1117 break;
1118 case 5:
1119 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, reading a spellbook is no longer safe.");
1120 else pline("Your auspices say: 4 5");
1121 break;
1122 case 6:
1123 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, your magical effects will always be very low-level.");
1124 else pline("Your auspices say: 4 6");
1125 break;
1126 case 7:
1127 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, you will no longer be able to uncurse your items via scrolls of remove curse, holy water or cancellation.");
1128 else pline("Your auspices say: 4 7");
1129 break;
1130 case 8:
1131 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, the 'never mind' or 'nothing happens' messages will cause bad effects.");
1132 else pline("Your auspices say: 4 8");
1133 break;
1134 case 9:
1135 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, you will repeatedly lose spell memory.");
1136 else pline("Your auspices say: 4 9");
1137 break;
1138 case 10:
1139 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, your skill training will occasionally be reduced.");
1140 else pline("Your auspices say: 4 10");
1141 break;
1142 case 11:
1143 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, your techniques will occasionally receive increased timeouts.");
1144 else pline("Your auspices say: 4 11");
1145 break;
1146 case 12:
1147 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 4, you can no longer use items whose level is higher than yours.");
1148 else pline("Your auspices say: 4 12");
1149 break;
1152 } else if (u.urmaxlvlUP == 5) {
1153 switch (u.femauspices6) {
1154 case 1:
1155 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, your right mouse button will fail.");
1156 else pline("Your auspices say: 6 1");
1157 break;
1158 case 2:
1159 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, your display will fail.");
1160 else pline("Your auspices say: 6 2");
1161 break;
1162 case 3:
1163 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, there will be low local memory.");
1164 else pline("Your auspices say: 6 3");
1165 break;
1166 case 4:
1167 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, you will get BIGscript.");
1168 else pline("Your auspices say: 6 4");
1169 break;
1170 case 5:
1171 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, you will be afflicted with weak sight.");
1172 else pline("Your auspices say: 6 5");
1173 break;
1174 case 6:
1175 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, you will see flicker strips.");
1176 else pline("Your auspices say: 6 6");
1177 break;
1178 case 7:
1179 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, menus will be fleecy-colored.");
1180 else pline("Your auspices say: 6 7");
1181 break;
1182 case 8:
1183 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, you start seeing mojibake glyphs.");
1184 else pline("Your auspices say: 6 8");
1185 break;
1186 case 9:
1187 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, all sanity effects will increase your sanity by much more than usual.");
1188 else pline("Your auspices say: 6 9");
1189 break;
1190 case 10:
1191 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, your techniques won't display anything.");
1192 else pline("Your auspices say: 6 10");
1193 break;
1194 case 11:
1195 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, lowercase monsters display as if they were uppercase.");
1196 else pline("Your auspices say: 6 11");
1197 break;
1198 case 12:
1199 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 6, the skill enhancing menu doesn't display anything.");
1200 else pline("Your auspices say: 6 12");
1201 break;
1204 } else if (u.urmaxlvlUP == 7) {
1205 switch (u.femauspices8) {
1206 case 1:
1207 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, the entire game will display in shades of grey.");
1208 else pline("Your auspices say: 8 1");
1209 break;
1210 case 2:
1211 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, a ROT13 cypher will be activated.");
1212 else pline("Your auspices say: 8 2");
1213 break;
1214 case 3:
1215 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, you will have to solve captchas.");
1216 else pline("Your auspices say: 8 3");
1217 break;
1218 case 4:
1219 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, you will have to take part in the Nethack Quiz.");
1220 else pline("Your auspices say: 8 4");
1221 break;
1222 case 5:
1223 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, there will be sound effects.");
1224 else pline("Your auspices say: 8 5");
1225 break;
1226 case 6:
1227 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, walls will become hyper blue.");
1228 else pline("Your auspices say: 8 6");
1229 break;
1230 case 7:
1231 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, the pokedex will lie to you.");
1232 else pline("Your auspices say: 8 7");
1233 break;
1234 case 8:
1235 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, monsters will make noises.");
1236 else pline("Your auspices say: 8 8");
1237 break;
1238 case 9:
1239 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, increasing stats beyond a certain limit will become much harder.");
1240 else pline("Your auspices say: 8 9");
1241 break;
1242 case 10:
1243 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, the top line displays fleecy-colored messages.");
1244 else pline("Your auspices say: 8 10");
1245 break;
1246 case 11:
1247 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, the game becomes miscolored.");
1248 else pline("Your auspices say: 8 11");
1249 break;
1250 case 12:
1251 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, one specific color becomes fleecy.");
1252 else pline("Your auspices say: 8 12");
1253 break;
1254 case 13:
1255 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 8, matching colors start fleecing back and forth.");
1256 else pline("Your auspices say: 8 13");
1257 break;
1260 } else if (u.urmaxlvlUP == 10) {
1261 switch (u.femauspices11) {
1262 case 1:
1263 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become pink.");
1264 else pline("Your auspices say: 11 1");
1265 break;
1266 case 2:
1267 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become cyan.");
1268 else pline("Your auspices say: 11 2");
1269 break;
1270 case 3:
1271 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become black.");
1272 else pline("Your auspices say: 11 3");
1273 break;
1274 case 4:
1275 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become red.");
1276 else pline("Your auspices say: 11 4");
1277 break;
1278 case 5:
1279 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become green.");
1280 else pline("Your auspices say: 11 5");
1281 break;
1282 case 6:
1283 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become blue.");
1284 else pline("Your auspices say: 11 6");
1285 break;
1286 case 7:
1287 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become completely gray.");
1288 else pline("Your auspices say: 11 7");
1289 break;
1290 case 8:
1291 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become white.");
1292 else pline("Your auspices say: 11 8");
1293 break;
1294 case 9:
1295 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become yellow.");
1296 else pline("Your auspices say: 11 9");
1297 break;
1298 case 10:
1299 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become orange.");
1300 else pline("Your auspices say: 11 10");
1301 break;
1302 case 11:
1303 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become violet.");
1304 else pline("Your auspices say: 11 11");
1305 break;
1306 case 12:
1307 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become brown.");
1308 else pline("Your auspices say: 11 12");
1309 break;
1310 case 13:
1311 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become bright cyan.");
1312 else pline("Your auspices say: 11 13");
1313 break;
1314 case 14:
1315 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become silver.");
1316 else pline("Your auspices say: 11 14");
1317 break;
1318 case 15:
1319 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become metal.");
1320 else pline("Your auspices say: 11 15");
1321 break;
1322 case 16:
1323 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 11, your spells will become platinum.");
1324 else pline("Your auspices say: 11 16");
1325 break;
1328 } else if (u.urmaxlvlUP == 12) {
1329 switch (u.femauspices13) {
1330 case 1:
1331 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, you will be subjected to random intrinsic loss.");
1332 else pline("Your auspices say: 13 1");
1333 break;
1334 case 2:
1335 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, you will start to temporarily lose intrinsics.");
1336 else pline("Your auspices say: 13 2");
1337 break;
1338 case 3:
1339 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, you will start suffering from blood loss.");
1340 else pline("Your auspices say: 13 3");
1341 break;
1342 case 4:
1343 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, all newly spawned monsters will be hostile.");
1344 else pline("Your auspices say: 13 4");
1345 break;
1346 case 5:
1347 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, covetous monsters start using their AI in a smarter way.");
1348 else pline("Your auspices say: 13 5");
1349 break;
1350 case 6:
1351 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, identifying items becomes much more difficult.");
1352 else pline("Your auspices say: 13 6");
1353 break;
1354 case 7:
1355 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, Satan will cause you to lose a turn when entering a new level.");
1356 else pline("Your auspices say: 13 7");
1357 break;
1358 case 8:
1359 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, monsters are generated with movement energy.");
1360 else pline("Your auspices say: 13 8");
1361 break;
1362 case 9:
1363 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, you will be in the bad part.");
1364 else pline("Your auspices say: 13 9");
1365 break;
1366 case 10:
1367 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 13, you will be in the completely bad part.");
1368 else pline("Your auspices say: 13 10");
1369 break;
1372 } else if (u.urmaxlvlUP == 14) {
1373 switch (u.femauspices15) {
1374 case 1:
1375 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, you will get the speed bug.");
1376 else pline("Your auspices say: 15 1");
1377 break;
1378 case 2:
1379 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, your multi-turn actions will be interrupted every turn.");
1380 else pline("Your auspices say: 15 2");
1381 break;
1382 case 3:
1383 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, you can no longer teleport at all.");
1384 else pline("Your auspices say: 15 3");
1385 break;
1386 case 4:
1387 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, all items that you drop will automatically curse themselves.");
1388 else pline("Your auspices say: 15 4");
1389 break;
1390 case 5:
1391 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, monsters can randomly move faster than normal.");
1392 else pline("Your auspices say: 15 5");
1393 break;
1394 case 6:
1395 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, blessed items that you pick up will instantly become cursed.");
1396 else pline("Your auspices say: 15 6");
1397 break;
1398 case 7:
1399 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, using consumables will curse them first.");
1400 else pline("Your auspices say: 15 7");
1401 break;
1402 case 8:
1403 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, items that monsters steal from you will be degraded.");
1404 else pline("Your auspices say: 15 8");
1405 break;
1406 case 9:
1407 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, you cannot use spellbooks or tools unless their base item type is identified.");
1408 else pline("Your auspices say: 15 9");
1409 break;
1410 case 10:
1411 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 15, items lose their BUC, enchantment and rustproofing knowledge when monsters pick them up, and they no longer stack properly.");
1412 else pline("Your auspices say: 15 10");
1413 break;
1416 } else if (u.urmaxlvlUP == 16) {
1417 switch (u.femauspices17) {
1418 case 1:
1419 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, the monster difficulty will be increased.");
1420 else pline("Your auspices say: 17 1");
1421 break;
1422 case 2:
1423 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, monsters start spawning much faster.");
1424 else pline("Your auspices say: 17 2");
1425 break;
1426 case 3:
1427 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, boss monsters become more common.");
1428 else pline("Your auspices say: 17 3");
1429 break;
1430 case 4:
1431 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, rare monsters become common.");
1432 else pline("Your auspices say: 17 4");
1433 break;
1434 case 5:
1435 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, high-level monsters become more common.");
1436 else pline("Your auspices say: 17 5");
1437 break;
1438 case 6:
1439 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, the minimum level for newly spawned monsters will start scaling with the actual level difficulty.");
1440 else pline("Your auspices say: 17 6");
1441 break;
1442 case 7:
1443 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, monster attacks use exploding dice to determine their damage.");
1444 else pline("Your auspices say: 17 7");
1445 break;
1446 case 8:
1447 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, chaotic monsters will live up to their alignment by making the dungeon more chaotic.");
1448 else pline("Your auspices say: 17 8");
1449 break;
1450 case 9:
1451 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, you're permanently burdened even if your inventory is empty.");
1452 else pline("Your auspices say: 17 9");
1453 break;
1454 case 10:
1455 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, your carry capacity can never be higher than 500.");
1456 else pline("Your auspices say: 17 10");
1457 break;
1458 case 11:
1459 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, your ranged weapon ammo mulches every time you fire.");
1460 else pline("Your auspices say: 17 11");
1461 break;
1462 case 12:
1463 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 17, your main inventory is limited to 52 items.");
1464 else pline("Your auspices say: 17 12");
1465 break;
1468 } else if (u.urmaxlvlUP == 19) {
1469 switch (u.femauspices20) {
1470 case 1:
1471 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, your possessions start randomly unidentifying themselves.");
1472 else pline("Your auspices say: 20 1");
1473 break;
1474 case 2:
1475 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, you will get insufficient information about items.");
1476 else pline("Your auspices say: 20 2");
1477 break;
1478 case 3:
1479 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, dungeon floors become invisible.");
1480 else pline("Your auspices say: 20 3");
1481 break;
1482 case 4:
1483 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, monsters become stronger if many of their species have been generated already.");
1484 else pline("Your auspices say: 20 4");
1485 break;
1486 case 5:
1487 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, walls become invisible.");
1488 else pline("Your auspices say: 20 5");
1489 break;
1490 case 6:
1491 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, the map will fill up with fake I markers.");
1492 else pline("Your auspices say: 20 6");
1493 break;
1494 case 7:
1495 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, I markers become invisible and will cost a turn if you bump into them.");
1496 else pline("Your auspices say: 20 7");
1497 break;
1498 case 8:
1499 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, you are subjected to the wing yellow changer.");
1500 else pline("Your auspices say: 20 8");
1501 break;
1502 case 9:
1503 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, your sight is reduced if you don't trigger a trap for a while.");
1504 else pline("Your auspices say: 20 9");
1505 break;
1506 case 10:
1507 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 20, escaping past messages will do bad things.");
1508 else pline("Your auspices say: 20 10");
1509 break;
1512 } else if (u.urmaxlvlUP == 21) {
1513 switch (u.femauspices22) {
1514 case 1:
1515 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, you can no longer cure status effects.");
1516 else pline("Your auspices say: 22 1");
1517 break;
1518 case 2:
1519 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, the dungeon starts becoming ever more chaotic.");
1520 else pline("Your auspices say: 22 2");
1521 break;
1522 case 3:
1523 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, altars and prayer become unsafe.");
1524 else pline("Your auspices say: 22 3");
1525 break;
1526 case 4:
1527 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, all newly spawned monsters will be invisible, and see invisible won't help.");
1528 else pline("Your auspices say: 22 4");
1529 break;
1530 case 5:
1531 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, all newly spawned traps will be invisible, and there is no way to make them visible again.");
1532 else pline("Your auspices say: 22 5");
1533 break;
1534 case 6:
1535 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, empty dungeon floor tiles will quickly turn into walls.");
1536 else pline("Your auspices say: 22 6");
1537 break;
1538 case 7:
1539 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, spells with low spell memory are difficult to cast.");
1540 else pline("Your auspices say: 22 7");
1541 break;
1542 case 8:
1543 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, any trap you trigger will become invisible.");
1544 else pline("Your auspices say: 22 8");
1545 break;
1546 case 9:
1547 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, bad effects turn into really bad effects.");
1548 else pline("Your auspices say: 22 9");
1549 break;
1550 case 10:
1551 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, the pokedex will display incorrect attack types, and sometimes monsters may actually use those.");
1552 else pline("Your auspices say: 22 10");
1553 break;
1554 case 11:
1555 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, many ways of detecting stuff in your surrounding area won't work anymore.");
1556 else pline("Your auspices say: 22 11");
1557 break;
1558 case 12:
1559 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, enhancing a skill drains its amount of training and if that puts it below the threshold for enhancing it, you cannot enhance it after all.");
1560 else pline("Your auspices say: 22 12");
1561 break;
1562 case 13:
1563 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 22, casting a spell puts you on a cooldown until you can cast again.");
1564 else pline("Your auspices say: 22 13");
1565 break;
1568 } else if (u.urmaxlvlUP == 24) {
1569 switch (u.femauspices25) {
1570 case 1:
1571 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, the display will intermittently become all gray.");
1572 else pline("Your auspices say: 25 1");
1573 break;
1574 case 2:
1575 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, your position and the eight surrounding squares will be obscured.");
1576 else pline("Your auspices say: 25 2");
1577 break;
1578 case 3:
1579 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, you will contract the checkerboard disease.");
1580 else pline("Your auspices say: 25 3");
1581 break;
1582 case 4:
1583 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, you will no longer be able to identify the type of a trap.");
1584 else pline("Your auspices say: 25 4");
1585 break;
1586 case 5:
1587 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, you will no longer be able to determine what monsters are.");
1588 else pline("Your auspices say: 25 5");
1589 break;
1590 case 6:
1591 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, leveling up no longer increases your maximum HP and Pw.");
1592 else pline("Your auspices say: 25 6");
1593 break;
1594 case 7:
1595 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, some calculations will work as if your level were 1.");
1596 else pline("Your auspices say: 25 7");
1597 break;
1598 case 8:
1599 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, a manler will start chasing you.");
1600 else pline("Your auspices say: 25 8");
1601 break;
1602 case 9:
1603 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, you will get a giant explorer.");
1604 else pline("Your auspices say: 25 9");
1605 break;
1606 case 10:
1607 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 25, the in-game options will occasionally be set to different values.");
1608 else pline("Your auspices say: 25 10");
1609 break;
1612 } else if (u.urmaxlvlUP == 27) {
1613 switch (u.femauspices28) {
1614 case 1:
1615 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, your maximum alignment record will decrease over time.");
1616 else pline("Your auspices say: 28 1");
1617 break;
1618 case 2:
1619 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, you will start suffering from recurring amnesia.");
1620 else pline("Your auspices say: 28 2");
1621 break;
1622 case 3:
1623 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, your items will start to disenchant themselves spontaneously.");
1624 else pline("Your auspices say: 28 3");
1625 break;
1626 case 4:
1627 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, all equipment you put on will autocurse.");
1628 else pline("Your auspices say: 28 4");
1629 break;
1630 case 5:
1631 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, monsters will be able to use their secret attack.");
1632 else pline("Your auspices say: 28 5");
1633 break;
1634 case 6:
1635 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, you will suffer from random item destruction.");
1636 else pline("Your auspices say: 28 6");
1637 break;
1638 case 7:
1639 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, monsters learn to use their ranged attacks from infinitely far away.");
1640 else pline("Your auspices say: 28 7");
1641 break;
1642 case 8:
1643 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, monsters will be able to use unfair attacks.");
1644 else pline("Your auspices say: 28 8");
1645 break;
1646 case 9:
1647 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, the presence of bosses causes a horrible call to ring in your head.");
1648 else pline("Your auspices say: 28 9");
1649 break;
1650 case 10:
1651 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 28, your equipment will dull much more quickly.");
1652 else pline("Your auspices say: 28 10");
1653 break;
1656 } else if (u.urmaxlvlUP == 29) {
1657 switch (u.femauspices30) {
1658 case 1:
1659 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, you can no longer open your inventory.");
1660 else pline("Your auspices say: 30 1");
1661 break;
1662 case 2:
1663 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, killed monsters no longer drop corpses.");
1664 else pline("Your auspices say: 30 2");
1665 break;
1666 case 3:
1667 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, your directional keys will be inverted.");
1668 else pline("Your auspices say: 30 3");
1669 break;
1670 case 4:
1671 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, you always have to press Ctrl-R to see what happened.");
1672 else pline("Your auspices say: 30 8");
1673 break;
1674 case 5:
1675 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, you will barely be able to see the quasars.");
1676 else pline("Your auspices say: 30 4");
1677 break;
1678 case 6:
1679 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, your directional keys will be shifted 45 degrees clockwise.");
1680 else pline("Your auspices say: 30 5");
1681 break;
1682 case 7:
1683 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, your directional keys will be shifted 90 degrees counterclockwise.");
1684 else pline("Your auspices say: 30 6");
1685 break;
1686 case 8:
1687 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, bumping into monsters will cost a turn unless you use a certain prefix.");
1688 else pline("Your auspices say: 30 7");
1689 break;
1690 case 9:
1691 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, you won't see anything unless you stand on specific tiles.");
1692 else pline("Your auspices say: 30 9");
1693 break;
1694 case 10:
1695 if (femintcheck) pline("You receive an elaborate auspicious message: At experience level 30, your stats will slowly decay.");
1696 else pline("Your auspices say: 30 10");
1697 break;
1707 if (isproblematic && !rn2(3)) {
1708 /* no xlvl check - if you get drained repeatedly, your loss! I'm really mean :D --Amy */
1710 getnastytrapintrinsic();
1714 /* slex has so many skills, you keep running out of slots all the damn time! Need to counteract that --Amy */
1715 while (u.ulevel > u.urmaxlvlN) {
1716 u.urmaxlvlN++;
1717 if (!Race_if(PM_BABYLONIAN)) {
1718 if (u.urmaxlvlN == 5) u.weapon_slots += 1;
1719 if (u.urmaxlvlN == 10) u.weapon_slots += 5;
1720 if (u.urmaxlvlN == 15) u.weapon_slots += 1;
1721 if (u.urmaxlvlN == 20) u.weapon_slots += 5;
1722 if (u.urmaxlvlN == 25) u.weapon_slots += 1;
1723 if (u.urmaxlvlN == 30) u.weapon_slots += 5;
1727 while (Race_if(PM_RODNEYAN) && u.ulevel > u.urmaxlvl) {
1729 u.urmaxlvl++;
1731 if (!rn2(2)) {
1732 ubookz = mkobj(SPBOOK_CLASS, FALSE, FALSE);
1733 if (ubookz) dropy(ubookz);
1734 pline("A book appeared at your feet!");
1739 while ( (Race_if(PM_ASGARDIAN) || (uwep && uwep->oartifact == ART_DOUBLE_MYSTERY)) && u.ulevel > u.urmaxlvlL) {
1741 u.urmaxlvlL++;
1743 if (!rn2(3)) { switch (rnd(62)) {
1745 case 1:
1746 case 2:
1747 case 3:
1748 HFire_resistance |= FROMOUTSIDE; pline("Got fire resistance!"); break;
1749 case 4:
1750 case 5:
1751 case 6:
1752 HCold_resistance |= FROMOUTSIDE; pline("Got cold resistance!"); break;
1753 case 7:
1754 case 8:
1755 case 9:
1756 HSleep_resistance |= FROMOUTSIDE; pline("Got sleep resistance!"); break;
1757 case 10:
1758 case 11:
1759 HDisint_resistance |= FROMOUTSIDE; pline("Got disintegration resistance!"); break;
1760 case 12:
1761 case 13:
1762 case 14:
1763 HShock_resistance |= FROMOUTSIDE; pline("Got shock resistance!"); break;
1764 case 15:
1765 case 16:
1766 case 17:
1767 HPoison_resistance |= FROMOUTSIDE; pline("Got poison resistance!"); break;
1768 case 18:
1769 HDrain_resistance |= FROMOUTSIDE; pline("Got drain resistance!"); break;
1770 case 19:
1771 HSick_resistance |= FROMOUTSIDE; pline("Got sickness resistance!"); break;
1772 case 20:
1773 HAcid_resistance |= FROMOUTSIDE; pline("Got acid resistance!"); break;
1774 case 21:
1775 case 22:
1776 HHunger |= FROMOUTSIDE; pline("You start to hunger rapidly!"); break;
1777 case 23:
1778 case 24:
1779 HSee_invisible |= FROMOUTSIDE; pline("Got see invisible!"); break;
1780 case 25:
1781 HTelepat |= FROMOUTSIDE; pline("Got telepathy!"); break;
1782 case 26:
1783 case 27:
1784 HWarning |= FROMOUTSIDE; pline("Got warning!"); break;
1785 case 28:
1786 case 29:
1787 HSearching |= FROMOUTSIDE; pline("Got searching!"); break;
1788 case 30:
1789 case 31:
1790 HStealth |= FROMOUTSIDE; pline("Got stealth!"); break;
1791 case 32:
1792 case 33:
1793 HAggravate_monster |= FROMOUTSIDE; pline("You aggravate monsters!"); break;
1794 case 34:
1795 HConflict |= FROMOUTSIDE; pline("You start causing conflict!"); break;
1796 case 35:
1797 case 36:
1798 HTeleportation |= FROMOUTSIDE; pline("Got teleportitis!"); break;
1799 case 37:
1800 HTeleport_control |= FROMOUTSIDE; pline("Got teleport control!"); break;
1801 case 38:
1802 HFlying |= FROMOUTSIDE; pline("Got flying!"); break;
1803 case 39:
1804 HSwimming |= FROMOUTSIDE; pline("Got swimming!"); break;
1805 case 40:
1806 HMagical_breathing |= FROMOUTSIDE; pline("Got unbreathing!"); break;
1807 case 41:
1808 HSlow_digestion |= FROMOUTSIDE; pline("Got slow digestion!"); break;
1809 case 42:
1810 case 43:
1811 HRegeneration |= FROMOUTSIDE; pline("Got regeneration!"); break;
1812 case 44:
1813 HPolymorph |= FROMOUTSIDE; pline("Got polymorphitis!"); break;
1814 case 45:
1815 HPolymorph_control |= FROMOUTSIDE; pline("Got polymorph control!"); break;
1816 case 46:
1817 case 47:
1818 HFast |= FROMOUTSIDE; pline("Got speed!"); break;
1819 case 48:
1820 HInvis |= FROMOUTSIDE; pline("Got invisibility!"); break;
1821 case 49:
1822 HManaleech |= FROMOUTSIDE; pline("Got manaleech!"); break;
1823 case 50:
1824 HPeacevision |= FROMOUTSIDE; pline("Got peacevision!"); break;
1825 case 51:
1826 HDefusing |= FROMOUTSIDE; pline("Got defusing power!"); break;
1827 case 52:
1828 HWinceState |= FROMOUTSIDE; pline("You start wincing!"); break;
1829 case 53:
1830 HPainSense |= FROMOUTSIDE; pline("Got pain sense!"); break;
1831 case 54:
1832 HBurdenedState |= FROMOUTSIDE; pline("Got burden!"); break;
1833 case 55:
1834 HMagicVacuum |= FROMOUTSIDE; pline("Got magic vacuum!"); break;
1835 case 56:
1836 HResistancePiercing |= FROMOUTSIDE; pline("Got resistance piercing!"); break;
1837 case 57:
1838 HFuckOverEffect |= FROMOUTSIDE; pline("Got fuck-over!"); break;
1839 case 58:
1840 case 59:
1841 case 60:
1842 HMysteryResist |= FROMOUTSIDE; pline("Got mystery resistance!"); break;
1843 case 61:
1844 HMagicFindBonus |= FROMOUTSIDE; pline("Got magic find!"); break;
1845 case 62:
1846 HSpellboost |= FROMOUTSIDE; pline("Got spellboost!"); break;
1848 default:
1849 break;
1857 while (Role_if(PM_SOCIAL_JUSTICE_WARRIOR) && u.ulevel > u.urmaxlvlK) {
1859 u.urmaxlvlK++;
1861 if (!rn2(4)) {
1862 int wondertech = rnd(MAXTECH-1);
1863 learntech_or_leveltech(wondertech, FROMOUTSIDE, 1);
1864 You("learn how to perform a new technique!");
1870 while (Role_if(PM_WILD_TALENT) && u.ulevel > u.urmaxlvlF) {
1872 u.urmaxlvlF++;
1874 if (!rn2(4)) { switch (rnd(62)) {
1876 case 1:
1877 case 2:
1878 case 3:
1879 HFire_resistance |= FROMOUTSIDE; pline("Got fire resistance!"); break;
1880 case 4:
1881 case 5:
1882 case 6:
1883 HCold_resistance |= FROMOUTSIDE; pline("Got cold resistance!"); break;
1884 case 7:
1885 case 8:
1886 case 9:
1887 HSleep_resistance |= FROMOUTSIDE; pline("Got sleep resistance!"); break;
1888 case 10:
1889 case 11:
1890 HDisint_resistance |= FROMOUTSIDE; pline("Got disintegration resistance!"); break;
1891 case 12:
1892 case 13:
1893 case 14:
1894 HShock_resistance |= FROMOUTSIDE; pline("Got shock resistance!"); break;
1895 case 15:
1896 case 16:
1897 case 17:
1898 HPoison_resistance |= FROMOUTSIDE; pline("Got poison resistance!"); break;
1899 case 18:
1900 HDrain_resistance |= FROMOUTSIDE; pline("Got drain resistance!"); break;
1901 case 19:
1902 HSick_resistance |= FROMOUTSIDE; pline("Got sickness resistance!"); break;
1903 case 20:
1904 HAcid_resistance |= FROMOUTSIDE; pline("Got acid resistance!"); break;
1905 case 21:
1906 case 22:
1907 HHunger |= FROMOUTSIDE; pline("You start to hunger rapidly!"); break;
1908 case 23:
1909 case 24:
1910 HSee_invisible |= FROMOUTSIDE; pline("Got see invisible!"); break;
1911 case 25:
1912 HTelepat |= FROMOUTSIDE; pline("Got telepathy!"); break;
1913 case 26:
1914 case 27:
1915 HWarning |= FROMOUTSIDE; pline("Got warning!"); break;
1916 case 28:
1917 case 29:
1918 HSearching |= FROMOUTSIDE; pline("Got searching!"); break;
1919 case 30:
1920 case 31:
1921 HStealth |= FROMOUTSIDE; pline("Got stealth!"); break;
1922 case 32:
1923 case 33:
1924 HAggravate_monster |= FROMOUTSIDE; pline("You aggravate monsters!"); break;
1925 case 34:
1926 HConflict |= FROMOUTSIDE; pline("You start causing conflict!"); break;
1927 case 35:
1928 case 36:
1929 HTeleportation |= FROMOUTSIDE; pline("Got teleportitis!"); break;
1930 case 37:
1931 HTeleport_control |= FROMOUTSIDE; pline("Got teleport control!"); break;
1932 case 38:
1933 HFlying |= FROMOUTSIDE; pline("Got flying!"); break;
1934 case 39:
1935 HSwimming |= FROMOUTSIDE; pline("Got swimming!"); break;
1936 case 40:
1937 HMagical_breathing |= FROMOUTSIDE; pline("Got unbreathing!"); break;
1938 case 41:
1939 HSlow_digestion |= FROMOUTSIDE; pline("Got slow digestion!"); break;
1940 case 42:
1941 case 43:
1942 HRegeneration |= FROMOUTSIDE; pline("Got regeneration!"); break;
1943 case 44:
1944 HPolymorph |= FROMOUTSIDE; pline("Got polymorphitis!"); break;
1945 case 45:
1946 HPolymorph_control |= FROMOUTSIDE; pline("Got polymorph control!"); break;
1947 case 46:
1948 case 47:
1949 HFast |= FROMOUTSIDE; pline("Got speed!"); break;
1950 case 48:
1951 HInvis |= FROMOUTSIDE; pline("Got invisibility!"); break;
1952 case 49:
1953 HManaleech |= FROMOUTSIDE; pline("Got manaleech!"); break;
1954 case 50:
1955 HPeacevision |= FROMOUTSIDE; pline("Got peacevision!"); break;
1956 case 51:
1957 HDefusing |= FROMOUTSIDE; pline("Got defusing power!"); break;
1958 case 52:
1959 HWinceState |= FROMOUTSIDE; pline("You start wincing!"); break;
1960 case 53:
1961 HPainSense |= FROMOUTSIDE; pline("Got pain sense!"); break;
1962 case 54:
1963 HBurdenedState |= FROMOUTSIDE; pline("Got burden!"); break;
1964 case 55:
1965 HMagicVacuum |= FROMOUTSIDE; pline("Got magic vacuum!"); break;
1966 case 56:
1967 HResistancePiercing |= FROMOUTSIDE; pline("Got resistance piercing!"); break;
1968 case 57:
1969 HFuckOverEffect |= FROMOUTSIDE; pline("Got fuck-over!"); break;
1970 case 58:
1971 case 59:
1972 case 60:
1973 HMysteryResist |= FROMOUTSIDE; pline("Got mystery resistance!"); break;
1974 case 61:
1975 HMagicFindBonus |= FROMOUTSIDE; pline("Got magic find!"); break;
1976 case 62:
1977 HSpellboost |= FROMOUTSIDE; pline("Got spellboost!"); break;
1979 default:
1980 break;
1988 while (Race_if(PM_MISSINGNO) && u.ulevel > u.urmaxlvlM) {
1990 u.urmaxlvlM++;
1992 if (!rn2(3)) learnrandomregulartech();
1995 while (Role_if(PM_DQ_SLIME) && u.ulevel > u.urmaxlvlC) {
1997 u.urmaxlvlC++;
1999 int skillimprove = randomgoodskill();
2001 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2002 unrestrict_weapon_skill(skillimprove);
2003 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2004 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2005 unrestrict_weapon_skill(skillimprove);
2006 P_MAX_SKILL(skillimprove) = P_BASIC;
2007 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2008 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2009 P_MAX_SKILL(skillimprove) = P_SKILLED;
2010 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2011 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2012 P_MAX_SKILL(skillimprove) = P_EXPERT;
2013 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2014 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2015 P_MAX_SKILL(skillimprove) = P_MASTER;
2016 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2017 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2018 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2019 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2020 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2021 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2022 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2023 } else pline("Unfortunately, you feel no different than before.");
2025 if (u.urmaxlvlC >= 10) {
2027 int skillimprove = randomgoodskill();
2029 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2030 unrestrict_weapon_skill(skillimprove);
2031 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2032 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2033 unrestrict_weapon_skill(skillimprove);
2034 P_MAX_SKILL(skillimprove) = P_BASIC;
2035 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2036 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2037 P_MAX_SKILL(skillimprove) = P_SKILLED;
2038 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2039 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2040 P_MAX_SKILL(skillimprove) = P_EXPERT;
2041 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2042 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2043 P_MAX_SKILL(skillimprove) = P_MASTER;
2044 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2045 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2046 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2047 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2048 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2049 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2050 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2051 } else pline("Unfortunately, you feel no different than before.");
2055 if (u.urmaxlvlC >= 20) {
2057 int skillimprove = randomgoodskill();
2059 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2060 unrestrict_weapon_skill(skillimprove);
2061 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2062 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2063 unrestrict_weapon_skill(skillimprove);
2064 P_MAX_SKILL(skillimprove) = P_BASIC;
2065 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2066 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2067 P_MAX_SKILL(skillimprove) = P_SKILLED;
2068 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2069 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2070 P_MAX_SKILL(skillimprove) = P_EXPERT;
2071 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2072 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2073 P_MAX_SKILL(skillimprove) = P_MASTER;
2074 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2075 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2076 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2077 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2078 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2079 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2080 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2081 } else pline("Unfortunately, you feel no different than before.");
2085 if (u.urmaxlvlC >= 30) {
2087 int skillimprove = randomgoodskill();
2089 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2090 unrestrict_weapon_skill(skillimprove);
2091 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2092 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2093 unrestrict_weapon_skill(skillimprove);
2094 P_MAX_SKILL(skillimprove) = P_BASIC;
2095 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2096 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2097 P_MAX_SKILL(skillimprove) = P_SKILLED;
2098 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2099 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2100 P_MAX_SKILL(skillimprove) = P_EXPERT;
2101 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2102 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2103 P_MAX_SKILL(skillimprove) = P_MASTER;
2104 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2105 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2106 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2107 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2108 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2109 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2110 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2111 } else pline("Unfortunately, you feel no different than before.");
2113 skillimprove = randomgoodskill();
2115 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2116 unrestrict_weapon_skill(skillimprove);
2117 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2118 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2119 unrestrict_weapon_skill(skillimprove);
2120 P_MAX_SKILL(skillimprove) = P_BASIC;
2121 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2122 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2123 P_MAX_SKILL(skillimprove) = P_SKILLED;
2124 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2125 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2126 P_MAX_SKILL(skillimprove) = P_EXPERT;
2127 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2128 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2129 P_MAX_SKILL(skillimprove) = P_MASTER;
2130 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2131 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2132 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2133 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2134 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2135 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2136 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2137 } else pline("Unfortunately, you feel no different than before.");
2139 skillimprove = randomgoodskill();
2141 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2142 unrestrict_weapon_skill(skillimprove);
2143 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2144 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2145 unrestrict_weapon_skill(skillimprove);
2146 P_MAX_SKILL(skillimprove) = P_BASIC;
2147 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2148 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2149 P_MAX_SKILL(skillimprove) = P_SKILLED;
2150 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2151 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2152 P_MAX_SKILL(skillimprove) = P_EXPERT;
2153 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2154 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2155 P_MAX_SKILL(skillimprove) = P_MASTER;
2156 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2157 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2158 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2159 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2160 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2161 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2162 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2163 } else pline("Unfortunately, you feel no different than before.");
2165 skillimprove = randomgoodskill();
2167 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2168 unrestrict_weapon_skill(skillimprove);
2169 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2170 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2171 unrestrict_weapon_skill(skillimprove);
2172 P_MAX_SKILL(skillimprove) = P_BASIC;
2173 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2174 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2175 P_MAX_SKILL(skillimprove) = P_SKILLED;
2176 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2177 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2178 P_MAX_SKILL(skillimprove) = P_EXPERT;
2179 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2180 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2181 P_MAX_SKILL(skillimprove) = P_MASTER;
2182 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2183 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2184 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2185 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2186 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2187 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2188 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2189 } else pline("Unfortunately, you feel no different than before.");
2191 skillimprove = randomgoodskill();
2193 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2194 unrestrict_weapon_skill(skillimprove);
2195 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2196 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2197 unrestrict_weapon_skill(skillimprove);
2198 P_MAX_SKILL(skillimprove) = P_BASIC;
2199 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2200 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2201 P_MAX_SKILL(skillimprove) = P_SKILLED;
2202 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2203 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2204 P_MAX_SKILL(skillimprove) = P_EXPERT;
2205 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2206 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2207 P_MAX_SKILL(skillimprove) = P_MASTER;
2208 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2209 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2210 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2211 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2212 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2213 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2214 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2215 } else pline("Unfortunately, you feel no different than before.");
2217 skillimprove = randomgoodskill();
2219 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2220 unrestrict_weapon_skill(skillimprove);
2221 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2222 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2223 unrestrict_weapon_skill(skillimprove);
2224 P_MAX_SKILL(skillimprove) = P_BASIC;
2225 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2226 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2227 P_MAX_SKILL(skillimprove) = P_SKILLED;
2228 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2229 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2230 P_MAX_SKILL(skillimprove) = P_EXPERT;
2231 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2232 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2233 P_MAX_SKILL(skillimprove) = P_MASTER;
2234 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2235 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2236 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2237 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2238 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2239 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2240 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2241 } else pline("Unfortunately, you feel no different than before.");
2243 skillimprove = randomgoodskill();
2245 if (P_MAX_SKILL(skillimprove) == P_ISRESTRICTED) {
2246 unrestrict_weapon_skill(skillimprove);
2247 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2248 } else if (P_MAX_SKILL(skillimprove) == P_UNSKILLED) {
2249 unrestrict_weapon_skill(skillimprove);
2250 P_MAX_SKILL(skillimprove) = P_BASIC;
2251 pline("You can now learn the %s skill.", wpskillname(skillimprove));
2252 } else if (rn2(2) && P_MAX_SKILL(skillimprove) == P_BASIC) {
2253 P_MAX_SKILL(skillimprove) = P_SKILLED;
2254 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2255 } else if (!rn2(4) && P_MAX_SKILL(skillimprove) == P_SKILLED) {
2256 P_MAX_SKILL(skillimprove) = P_EXPERT;
2257 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2258 } else if (!rn2(10) && P_MAX_SKILL(skillimprove) == P_EXPERT) {
2259 P_MAX_SKILL(skillimprove) = P_MASTER;
2260 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2261 } else if (!rn2(100) && P_MAX_SKILL(skillimprove) == P_MASTER) {
2262 P_MAX_SKILL(skillimprove) = P_GRAND_MASTER;
2263 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2264 } else if (!rn2(200) && P_MAX_SKILL(skillimprove) == P_GRAND_MASTER) {
2265 P_MAX_SKILL(skillimprove) = P_SUPREME_MASTER;
2266 pline("Your knowledge of the %s skill increases.", wpskillname(skillimprove));
2267 } else pline("Unfortunately, you feel no different than before.");
2271 } /* DQ slime check */
2273 if (isdemagogue) { /* this is done here because you could use the recursion effect to circumvent it --Amy */
2275 if (u.ulevel == 5) {
2276 MysteriousForceActive |= FROMOUTSIDE;
2278 if (u.ulevel == 9) {
2279 UnfairAttackBug |= FROMOUTSIDE;
2281 if (u.ulevel == 13) {
2282 HighlevelStatus |= FROMOUTSIDE;
2284 if (u.ulevel == 17) {
2285 TrapCreationProblem |= FROMOUTSIDE;
2287 if (u.ulevel == 21) {
2288 UndressingEffect |= FROMOUTSIDE;
2290 if (u.ulevel == 25) {
2291 OrangeSpells |= FROMOUTSIDE;
2293 if (u.ulevel == 30) {
2294 SatanEffect |= FROMOUTSIDE;
2299 while (Role_if(PM_BINDER) && u.ulevel > u.urmaxlvlC) {
2301 u.urmaxlvlC++;
2303 if (!rn2(3)) {
2304 ubookz = mkobj(SPBOOK_CLASS, FALSE, FALSE);
2305 if (ubookz) dropy(ubookz);
2306 pline("A book appeared at your feet!"); }
2310 while (Role_if(PM_BARD) && u.ulevel > u.urmaxlvlD) {
2312 u.urmaxlvlD++;
2313 /* Yes I know, most of the names make no sense. They're from the bard patch. --Amy */
2315 if (u.urmaxlvlD == 3) {
2316 ubookz = mksobj(SPE_SLEEP, TRUE, FALSE, FALSE);
2317 if (ubookz) dropy(ubookz);
2318 pline("A book of lullaby appeared at your feet!");
2320 if (u.urmaxlvlD == 4) {
2321 ubookz = mksobj(SPE_CURE_BLINDNESS, TRUE, FALSE, FALSE);
2322 if (ubookz) dropy(ubookz);
2323 pline("A book of cause blindness appeared at your feet!");
2325 if (u.urmaxlvlD == 5) {
2326 ubookz = mksobj(SPE_CONFUSE_MONSTER, TRUE, FALSE, FALSE);
2327 if (ubookz) dropy(ubookz);
2328 pline("A book of cacophony appeared at your feet!");
2330 if (u.urmaxlvlD == 6) {
2331 ubookz = mksobj(SPE_CURE_SICKNESS, TRUE, FALSE, FALSE);
2332 if (ubookz) dropy(ubookz);
2333 pline("A book of cause sickness appeared at your feet!");
2335 if (u.urmaxlvlD == 7) {
2336 ubookz = mksobj(SPE_SLOW_MONSTER, TRUE, FALSE, FALSE);
2337 if (ubookz) dropy(ubookz);
2338 pline("A book of drowsiness appeared at your feet!");
2340 if (u.urmaxlvlD == 8) {
2341 ubookz = mksobj(SPE_HASTE_SELF, TRUE, FALSE, FALSE);
2342 if (ubookz) dropy(ubookz);
2343 pline("A book of haste pets appeared at your feet!");
2345 if (u.urmaxlvlD == 9) {
2346 ubookz = mksobj(RIN_PROTECTION_FROM_SHAPE_CHAN, TRUE, FALSE, FALSE);
2347 if (ubookz) dropy(ubookz);
2348 pline("A ring of silence appeared at your feet!");
2350 if (u.urmaxlvlD == 10) {
2351 ubookz = mksobj(SPE_CAUSE_FEAR, TRUE, FALSE, FALSE);
2352 if (ubookz) dropy(ubookz);
2353 pline("A book of despair appeared at your feet!");
2355 if (u.urmaxlvlD == 12) {
2356 ubookz = mksobj(SPE_FORCE_BOLT, TRUE, FALSE, FALSE);
2357 if (ubookz) dropy(ubookz);
2358 pline("A book of shatter appeared at your feet!");
2360 if (u.urmaxlvlD == 14) {
2361 ubookz = mksobj(CLOAK_OF_DISPLACEMENT, TRUE, FALSE, FALSE);
2362 if (ubookz) dropy(ubookz);
2363 pline("A cloak of ventriloquism appeared at your feet!");
2365 if (u.urmaxlvlD == 15) {
2366 ubookz = mksobj(SPE_CHARM_MONSTER, TRUE, FALSE, FALSE);
2367 if (ubookz) dropy(ubookz);
2368 pline("A book of friendship appeared at your feet!");
2370 if (u.urmaxlvlD == 20) {
2371 ubookz = mksobj(SPE_POLYMORPH, TRUE, FALSE, FALSE);
2372 if (ubookz) dropy(ubookz);
2373 pline("A book of change appeared at your feet!");
2376 } /* bard check */
2378 while (Role_if(PM_ZYBORG) && u.ulevel > u.urmaxlvlB) {
2380 u.urmaxlvlB++;
2382 if (!rn2(3)) learnrandomregulartech();
2386 while (Role_if(PM_ANACHRONOUNBINDER) && u.ulevel > u.urmaxlvlJ) {
2388 u.urmaxlvlJ++;
2390 int maxtrainingamount = 0;
2391 int skillnumber = 0;
2392 int actualskillselection = 0;
2393 int amountofpossibleskills = 1;
2394 int i;
2396 for (i = 0; i < P_NUM_SKILLS; i++) {
2397 if (P_SKILL(i) != P_ISRESTRICTED) continue;
2399 if (P_ADVANCE(i) > 0 && P_ADVANCE(i) >= maxtrainingamount) {
2400 if (P_ADVANCE(i) > maxtrainingamount) {
2401 amountofpossibleskills = 1;
2402 skillnumber = i;
2403 maxtrainingamount = P_ADVANCE(i);
2404 } else if (!rn2(amountofpossibleskills + 1)) {
2405 amountofpossibleskills++;
2406 skillnumber = i;
2407 } else {
2408 amountofpossibleskills++;
2413 if (skillnumber > 0 && maxtrainingamount > 0) {
2414 unrestrict_weapon_skill(skillnumber);
2415 P_MAX_SKILL(skillnumber) = (maxtrainingamount >= 5000 ? P_SUPREME_MASTER : maxtrainingamount >= 500 ? P_GRAND_MASTER : maxtrainingamount >= 50 ? P_MASTER : P_EXPERT);
2416 pline("You can now learn the %s skill, with a new cap of %s.", wpskillname(skillnumber), maxtrainingamount >= 5000 ? "supreme master" : maxtrainingamount >= 500 ? "grand master" : maxtrainingamount >= 50 ? "master" : "expert");
2417 } else {
2418 pline("You've trained no unknown skills since your last level up and therefore you unfortunately don't learn anything new.");
2421 } /* acu check */
2423 while (Role_if(PM_MYSTIC) && u.ulevel > u.urmaxlvlH) {
2425 u.urmaxlvlH++;
2427 if (!rn2(3)) learnrandomregulartech();
2431 /* Lorskel wants wild talents to learn random techniques, and I agree that this is supposed to be the case. --Amy */
2432 while (Role_if(PM_WILD_TALENT) && u.ulevel > u.urmaxlvlG) {
2434 u.urmaxlvlG++;
2436 if (!rn2(5)) learnrandomregulartech();
2440 if (Race_if(PM_PLAYER_SLIME) && !((Deprovement || u.uprops[DEPROVEMENT].extrinsic || have_deprovementstone()) && !(u.ulevel < 10 && !rn2(u.ulevel + 1)) && rn2(10) ) && Role_if(PM_DQ_SLIME) && (u.ulevel > u.urmaxlvlI) ) {
2442 u.urmaxlvlI++;
2444 u.uhpmax += rnd(10);
2445 u.uenmax += rnd(10);
2449 while (isamerican && Role_if(PM_GLADIATOR) && (u.ulevel > u.urmaxlvlE) ) {
2451 u.urmaxlvlE++;
2453 if (!rn2(2)) learnrandomregulartech();
2457 /* now, set the levels accordingly --Amy */
2458 if (u.urmaxlvl < u.ulevel) u.urmaxlvl = u.ulevel;
2459 if (u.urmaxlvlB < u.ulevel) u.urmaxlvlB = u.ulevel;
2460 if (u.urmaxlvlC < u.ulevel) u.urmaxlvlC = u.ulevel;
2461 if (u.urmaxlvlD < u.ulevel) u.urmaxlvlD = u.ulevel;
2462 if (u.urmaxlvlE < u.ulevel) u.urmaxlvlE = u.ulevel;
2463 if (u.urmaxlvlF < u.ulevel) u.urmaxlvlF = u.ulevel;
2464 if (u.urmaxlvlG < u.ulevel) u.urmaxlvlG = u.ulevel;
2465 if (u.urmaxlvlH < u.ulevel) u.urmaxlvlH = u.ulevel;
2466 if (u.urmaxlvlI < u.ulevel) u.urmaxlvlI = u.ulevel;
2467 if (u.urmaxlvlJ < u.ulevel) u.urmaxlvlJ = u.ulevel;
2468 if (u.urmaxlvlK < u.ulevel) u.urmaxlvlK = u.ulevel;
2469 if (u.urmaxlvlL < u.ulevel) u.urmaxlvlL = u.ulevel;
2470 if (u.urmaxlvlM < u.ulevel) u.urmaxlvlM = u.ulevel;
2471 if (u.urmaxlvlUP < u.ulevel) u.urmaxlvlUP = u.ulevel;
2475 /*exper.c*/