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. */
7 /*STATIC_DCL*/ long newuexp(int);
8 STATIC_DCL
int enermod(int);
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)));*/
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 */
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 */
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);
105 switch (Role_switch
) {
106 /* WAC 'F' and 'I' get bonus similar to 'W' */
109 case PM_ELECTRIC_MAGE
:
112 case PM_OCCULT_MASTER
:
113 case PM_CHAOS_SORCEROR
:
114 case PM_ELEMENTALIST
:
120 return((3 * en
) / 2);
123 case PM_VANILLA_VALK
:
124 return((3 * en
) / 4);
125 case PM_NOOB_MODE_BARB
:
133 experience(mtmp
, nk
) /* return # of exp points for mtmp after nk killed */
134 register struct monst
*mtmp
;
140 register struct permonst
*ptr
= mtmp
->data
;
143 int monlevforexp
, monlevdistance
;
145 monlevforexp
= mtmp
->m_lev
;
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
;
170 if(tmp2
== AT_WEAP
) tmp
+= 5;
171 else if(tmp2
== AT_MAGC
) tmp
+= 10;
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)
186 if (tmp2
== AD_WRAP
&& ptr
->mlet
== S_EEL
) { /* edited by Amy */
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));
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) {
224 if (tmp
< 1) tmp
= 1;
226 if (mtmp
->data
->msound
== MS_BULLETATOR
&& tmp
> 1) {
228 if (tmp
< 1) tmp
= 1;
232 /* Mail daemons put up no fight. */
233 if(mtmp
->data
== &mons
[PM_MAIL_DAEMON
]) tmp
= 1;
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;
248 if (ExpBoost
) exp
*= (StrongExpBoost
? 3 : 2);
249 if (uarmf
&& uarmf
->oartifact
== ART_SYSTEM_OF_SEXUAL_PLEASURE
) {
253 if (uarm
&& uarm
->oartifact
== ART_OH_NO_I_SAVED__AM_I_NEVERT
) {
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)) {
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))
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 */
284 /* explicit wizard mode requests to reduce level are never fatal. */
285 if (drainer
&& !strcmp(drainer
, "#levelchange"))
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!");
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);
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!");
317 } else if (!force
&& (u
.uexp
> 10) && !issoviet
&& u
.ulevel
== 1) {
319 expdrain
/= (isfriday
? 3 : 5);
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!");
331 if (issoviet
) pline("BWAR KHAR (gryaznyy smekh) govorit, chto tip bloka l'da!");
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 */
342 killer_format
= KILLED_BY
;
347 /* no drainer or lifesaved */
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;
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! */
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;
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
);
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 */
404 u
.uenmax
-= (rn2(3) ? rnz(1) : rnz(2));
405 if (u
.uenmax
< 0) u
.uenmax
= 0;
409 if (u
.uen
< 0) u
.uen
= 0;
410 else if (u
.uen
> u
.uenmax
) u
.uen
= u
.uenmax
;
413 u
.uexp
= newuexp(u
.ulevel
) - 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??
426 if (u
.ulevel
< MAXULEV
&& u
.uexp
>= newuexp(u
.ulevel
))
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
)
443 int boostedlevel
= u
.ulevel
;
445 boostedlevel
+= (boost_power_value() * boostmult
);
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! */
455 if (u
.ulevel
>= MAXULEV
&& ((u
.uexp
+ 200000) < (10000000 + (2000000 * u
.xtralevelmult
)) ) ) {
458 You("gain experience.");
459 } else if (u
.ulevel
< MAXULEV
&& ((u
.uexp
+ 200000) < newuexp(u
.ulevel
)) ) {
462 You("gain experience.");
463 } else pluslvl(FALSE
);
468 boolean incr
; /* true iff via incremental experience growth */
469 { /* (false for potion of gain level) */
472 if (!incr
) You_feel("more experienced.");
474 if (u
.ulevel
>= MAXULEV
) {
475 u
.uexp
= 10000000; /* reset counter for gain level */
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) */
491 if (num
< 0) num
= 0;
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
)) {
504 if (ishomicider
&& num
> 0) {
506 if (num
> 0 && !rn2(2)) num
--;
508 if (Race_if(PM_SPRIGGAN
) && num
> 0) {
510 if (num
> 0 && !rn2(2)) 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 */
520 num
= rnz(8); /* unfortunately will be lost upon unpolymorphing --Amy */
521 if (num
< 0) num
= 0;
524 if (Race_if(PM_YEEK
) || Race_if(PM_DUFFLEPUD
) || Race_if(PM_PLAYER_FAIRY
)) num
/= 2;
525 if (Race_if(PM_PLAYER_DOLGSMAN
)) {
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
);
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;
547 if (Race_if(PM_YEEK
) || Race_if(PM_DUFFLEPUD
)) num
/= 2;
549 if (ishomicider
&& num
> 0) {
551 if (num
> 0 && !rn2(2)) 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) ) ) {
564 if (num
< 0) num
= 0;
565 if (num
> 1) num
/= rnd(12);
568 if (Race_if(PM_YEEK
) || Race_if(PM_DUFFLEPUD
) || Race_if(PM_PLAYER_FAIRY
)) num
/= 2;
569 if (Race_if(PM_PLAYER_DOLGSMAN
)) {
574 if (ishomicider
&& num
> 0) {
576 if (num
> 0 && !rn2(2)) num
--;
578 if (Race_if(PM_SPRIGGAN
) && num
> 0) {
580 if (num
> 0 && !rn2(2)) num
--;
587 num
= rnz(8); /* unfortunately will be lost upon unpolymorphing --Amy */
588 if (num
< 0) num
= 0;
589 if (num
> 1) num
/= rnd(12);
592 if (Race_if(PM_YEEK
) || Race_if(PM_DUFFLEPUD
) || Race_if(PM_PLAYER_FAIRY
)) num
/= 2;
593 if (Race_if(PM_PLAYER_DOLGSMAN
)) {
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
);
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);
614 if (Race_if(PM_YEEK
) || Race_if(PM_DUFFLEPUD
)) num
/= 2;
616 if (ishomicider
&& num
> 0) {
618 if (num
> 0 && !rn2(2)) num
--;
624 } /* homicider check */
626 } /* u.ulevel > or < MAXULEV */
628 if(u
.ulevel
< MAXULEV
) {
630 long tmp
= newuexp(u
.ulevel
+ 1);
631 if (u
.uexp
>= tmp
) u
.uexp
= tmp
- 1;
633 u
.uexp
= newuexp(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 */
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 */
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
;
685 register struct obj
*acqo
;
688 while (u
.ulevel
> u
.urmaxlvlUP
&& u
.ulevel
< 30) {
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
);
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
) {
763 whichcheck
= 0; displaycheck
= 0; goto climdone
; break;
765 whichcheck
= u
.climauspices3
; displaycheck
= 3; break;
767 whichcheck
= u
.climauspices6
; displaycheck
= 6; break;
769 whichcheck
= u
.climauspices9
; displaycheck
= 9; break;
771 whichcheck
= u
.climauspices12
; displaycheck
= 12; break;
773 whichcheck
= u
.climauspices15
; displaycheck
= 15; break;
775 whichcheck
= u
.climauspices18
; displaycheck
= 18; break;
777 whichcheck
= u
.climauspices21
; displaycheck
= 21; break;
779 whichcheck
= u
.climauspices24
; displaycheck
= 24; break;
781 whichcheck
= u
.climauspices27
; displaycheck
= 27; break;
783 whichcheck
= u
.climauspices30
; displaycheck
= 30; break;
785 if (rnd(70) < ACURR(A_INT
)) climintcheck
= 1;
787 if (climintcheck
) { /* keyword "marlena" */
788 switch (whichcheck
) {
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
);
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
);
796 pline("You receive an elaborate auspicious message: At experience level %d, some glyphs will display in a green color.", displaycheck
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
820 pline("You receive an elaborate auspicious message: At experience level %d, a ghostly girl will start to follow you.", displaycheck
);
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
);
826 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can attack you with winter stilettos.", displaycheck
);
829 pline("You receive an elaborate auspicious message: At experience level %d, you have to dance or get scarred by female toenails.", displaycheck
);
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
);
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
);
838 pline("You receive an elaborate auspicious message: At experience level %d, you will have to fart randomly.", displaycheck
);
841 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can fart at you.", displaycheck
);
844 pline("You receive an elaborate auspicious message: At experience level %d, stinking clouds can form randomly.", displaycheck
);
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
);
850 pline("You receive an elaborate auspicious message: At experience level %d, monsters with loud farting attacks spawn over time.", displaycheck
);
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
);
856 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters have additional hug attacks.", displaycheck
);
859 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters move more quickly.", displaycheck
);
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
);
865 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters with kick attacks can paralyze you.", displaycheck
);
868 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can burn you with cigarettes.", displaycheck
);
871 pline("You receive an elaborate auspicious message: At experience level %d, monsters with kick attacks can wither your gear.", displaycheck
);
874 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can kick the weapon out of your hands.", displaycheck
);
877 pline("You receive an elaborate auspicious message: At experience level %d, Julietta will subject you to random punishments.", displaycheck
);
880 pline("You receive an elaborate auspicious message: At experience level %d, the master of nasty traps will start constructing traps everywhere.", displaycheck
);
883 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters will attack you with random high heels.", displaycheck
);
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
);
889 pline("You receive an elaborate auspicious message: At experience level %d, monsters that use conversion sermon will spawn over time.", displaycheck
);
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
);
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
);
898 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps spawn much more often.", displaycheck
);
901 pline("You receive an elaborate auspicious message: At experience level %d, you develop anorexia and have reduced strength and constitution.", displaycheck
);
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
);
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
);
910 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can try to steal your items.", displaycheck
);
913 pline("You receive an elaborate auspicious message: At experience level %d, intelligent female monsters can scratch you bloodily with their heels.", displaycheck
);
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
);
919 pline("You receive an elaborate auspicious message: At experience level %d, an annoying blonde will start to annoy you to death.", displaycheck
);
922 pline("You receive an elaborate auspicious message: At experience level %d, female monsters will just swat your projectiles away.", displaycheck
);
925 pline("You receive an elaborate auspicious message: At experience level %d, female socks will attack you constantly and try to paralyze you.", displaycheck
);
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
);
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
);
934 pline("You receive an elaborate auspicious message: At experience level %d, female monsters have super regeneration.", displaycheck
);
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
);
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
);
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
);
946 pline("You receive an elaborate auspicious message: At experience level %d, you turn into a thick girl with steel-capped sandals.", displaycheck
);
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
);
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
);
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
);
958 pline("You receive an elaborate auspicious message: At experience level %d, you have to fight lots of monster shoes, pants and socks.", displaycheck
);
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
);
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
);
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
);
970 pline("You receive an elaborate auspicious message: At experience level %d, boss bitches will challenge you to a duel.", displaycheck
);
973 pline("You receive an elaborate auspicious message: At experience level %d, you'll see what kind of pants the girls are wearing.", displaycheck
);
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
);
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
);
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
);
985 pline("You receive an elaborate auspicious message: At experience level %d, monsters will trigger feminism traps for you, hahaha.", displaycheck
);
988 pline("You receive an elaborate auspicious message: At experience level %d, you'll have to sniff worn female pants on occasion.", displaycheck
);
991 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps will affect you for a loooooong time.", displaycheck
);
994 pline("You receive an elaborate auspicious message: At experience level %d, women will powerfully kick you with their platform sandals.", displaycheck
);
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
);
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
);
1003 pline("You receive an elaborate auspicious message: At experience level %d, some little girl wants to crap loudly to annoy you.", displaycheck
);
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
);
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
);
1012 pline("You receive an elaborate auspicious message: At experience level %d, girls and women will regenerate health a bit more quickly.", displaycheck
);
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
);
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
);
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
);
1024 pline("You receive an elaborate auspicious message: At experience level %d, feminism traps will start to behave like nasty traps.", displaycheck
);
1027 pline("You receive an elaborate auspicious message: At experience level %d, you'll have a harder time fighting women.", displaycheck
);
1030 pline("You receive an elaborate auspicious message: At experience level %d, female monsters will have additional armor class and resistances.", displaycheck
);
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
);
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
);
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
);
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
);
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
);
1048 pline("You receive an elaborate auspicious message: At experience level %d, monsters might occasionally polymorph into particularly feminine ones.", displaycheck
);
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
);
1054 pline("You receive an elaborate auspicious message: At experience level %d, monsters with feminism attacks are spawning more often.", displaycheck
);
1056 pline("You receive an elaborate auspicious message: At experience level %d, covetous shoes will spawn over time and attack you.", displaycheck
);
1058 pline("You receive an elaborate auspicious message: At experience level %d, shoe monsters spawn more often and occasionally appear in groups.", displaycheck
);
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
);
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
);
1064 pline("You receive an elaborate auspicious message: At experience level %d, smaller female monsters are more likely to chase you aggressively.", displaycheck
);
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
);
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
);
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
);
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
);
1075 pline("You receive an elaborate auspicious message: At experience level %d, female sneakers are upper strong.", displaycheck
);
1078 pline("You receive an elaborate auspicious message: At experience level %d, hitting a female monster may cause aggravation.", displaycheck
);
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
);
1084 pline("You receive an elaborate auspicious message: At experience level %d, being paralyzed can cause treaded high heels to attack you intermittently.", displaycheck
);
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
);
1090 } else pline("Your auspices say: %d %d", displaycheck
, whichcheck
);
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
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1152 } else if (u
.urmaxlvlUP
== 5) {
1153 switch (u
.femauspices6
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1204 } else if (u
.urmaxlvlUP
== 7) {
1205 switch (u
.femauspices8
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1260 } else if (u
.urmaxlvlUP
== 10) {
1261 switch (u
.femauspices11
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1328 } else if (u
.urmaxlvlUP
== 12) {
1329 switch (u
.femauspices13
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1372 } else if (u
.urmaxlvlUP
== 14) {
1373 switch (u
.femauspices15
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1416 } else if (u
.urmaxlvlUP
== 16) {
1417 switch (u
.femauspices17
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1468 } else if (u
.urmaxlvlUP
== 19) {
1469 switch (u
.femauspices20
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1512 } else if (u
.urmaxlvlUP
== 21) {
1513 switch (u
.femauspices22
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1568 } else if (u
.urmaxlvlUP
== 24) {
1569 switch (u
.femauspices25
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1612 } else if (u
.urmaxlvlUP
== 27) {
1613 switch (u
.femauspices28
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
1656 } else if (u
.urmaxlvlUP
== 29) {
1657 switch (u
.femauspices30
) {
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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
) {
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
) {
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
) {
1743 if (!rn2(3)) { switch (rnd(62)) {
1748 HFire_resistance
|= FROMOUTSIDE
; pline("Got fire resistance!"); break;
1752 HCold_resistance
|= FROMOUTSIDE
; pline("Got cold resistance!"); break;
1756 HSleep_resistance
|= FROMOUTSIDE
; pline("Got sleep resistance!"); break;
1759 HDisint_resistance
|= FROMOUTSIDE
; pline("Got disintegration resistance!"); break;
1763 HShock_resistance
|= FROMOUTSIDE
; pline("Got shock resistance!"); break;
1767 HPoison_resistance
|= FROMOUTSIDE
; pline("Got poison resistance!"); break;
1769 HDrain_resistance
|= FROMOUTSIDE
; pline("Got drain resistance!"); break;
1771 HSick_resistance
|= FROMOUTSIDE
; pline("Got sickness resistance!"); break;
1773 HAcid_resistance
|= FROMOUTSIDE
; pline("Got acid resistance!"); break;
1776 HHunger
|= FROMOUTSIDE
; pline("You start to hunger rapidly!"); break;
1779 HSee_invisible
|= FROMOUTSIDE
; pline("Got see invisible!"); break;
1781 HTelepat
|= FROMOUTSIDE
; pline("Got telepathy!"); break;
1784 HWarning
|= FROMOUTSIDE
; pline("Got warning!"); break;
1787 HSearching
|= FROMOUTSIDE
; pline("Got searching!"); break;
1790 HStealth
|= FROMOUTSIDE
; pline("Got stealth!"); break;
1793 HAggravate_monster
|= FROMOUTSIDE
; pline("You aggravate monsters!"); break;
1795 HConflict
|= FROMOUTSIDE
; pline("You start causing conflict!"); break;
1798 HTeleportation
|= FROMOUTSIDE
; pline("Got teleportitis!"); break;
1800 HTeleport_control
|= FROMOUTSIDE
; pline("Got teleport control!"); break;
1802 HFlying
|= FROMOUTSIDE
; pline("Got flying!"); break;
1804 HSwimming
|= FROMOUTSIDE
; pline("Got swimming!"); break;
1806 HMagical_breathing
|= FROMOUTSIDE
; pline("Got unbreathing!"); break;
1808 HSlow_digestion
|= FROMOUTSIDE
; pline("Got slow digestion!"); break;
1811 HRegeneration
|= FROMOUTSIDE
; pline("Got regeneration!"); break;
1813 HPolymorph
|= FROMOUTSIDE
; pline("Got polymorphitis!"); break;
1815 HPolymorph_control
|= FROMOUTSIDE
; pline("Got polymorph control!"); break;
1818 HFast
|= FROMOUTSIDE
; pline("Got speed!"); break;
1820 HInvis
|= FROMOUTSIDE
; pline("Got invisibility!"); break;
1822 HManaleech
|= FROMOUTSIDE
; pline("Got manaleech!"); break;
1824 HPeacevision
|= FROMOUTSIDE
; pline("Got peacevision!"); break;
1826 HDefusing
|= FROMOUTSIDE
; pline("Got defusing power!"); break;
1828 HWinceState
|= FROMOUTSIDE
; pline("You start wincing!"); break;
1830 HPainSense
|= FROMOUTSIDE
; pline("Got pain sense!"); break;
1832 HBurdenedState
|= FROMOUTSIDE
; pline("Got burden!"); break;
1834 HMagicVacuum
|= FROMOUTSIDE
; pline("Got magic vacuum!"); break;
1836 HResistancePiercing
|= FROMOUTSIDE
; pline("Got resistance piercing!"); break;
1838 HFuckOverEffect
|= FROMOUTSIDE
; pline("Got fuck-over!"); break;
1842 HMysteryResist
|= FROMOUTSIDE
; pline("Got mystery resistance!"); break;
1844 HMagicFindBonus
|= FROMOUTSIDE
; pline("Got magic find!"); break;
1846 HSpellboost
|= FROMOUTSIDE
; pline("Got spellboost!"); break;
1857 while (Role_if(PM_SOCIAL_JUSTICE_WARRIOR
) && u
.ulevel
> u
.urmaxlvlK
) {
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
) {
1874 if (!rn2(4)) { switch (rnd(62)) {
1879 HFire_resistance
|= FROMOUTSIDE
; pline("Got fire resistance!"); break;
1883 HCold_resistance
|= FROMOUTSIDE
; pline("Got cold resistance!"); break;
1887 HSleep_resistance
|= FROMOUTSIDE
; pline("Got sleep resistance!"); break;
1890 HDisint_resistance
|= FROMOUTSIDE
; pline("Got disintegration resistance!"); break;
1894 HShock_resistance
|= FROMOUTSIDE
; pline("Got shock resistance!"); break;
1898 HPoison_resistance
|= FROMOUTSIDE
; pline("Got poison resistance!"); break;
1900 HDrain_resistance
|= FROMOUTSIDE
; pline("Got drain resistance!"); break;
1902 HSick_resistance
|= FROMOUTSIDE
; pline("Got sickness resistance!"); break;
1904 HAcid_resistance
|= FROMOUTSIDE
; pline("Got acid resistance!"); break;
1907 HHunger
|= FROMOUTSIDE
; pline("You start to hunger rapidly!"); break;
1910 HSee_invisible
|= FROMOUTSIDE
; pline("Got see invisible!"); break;
1912 HTelepat
|= FROMOUTSIDE
; pline("Got telepathy!"); break;
1915 HWarning
|= FROMOUTSIDE
; pline("Got warning!"); break;
1918 HSearching
|= FROMOUTSIDE
; pline("Got searching!"); break;
1921 HStealth
|= FROMOUTSIDE
; pline("Got stealth!"); break;
1924 HAggravate_monster
|= FROMOUTSIDE
; pline("You aggravate monsters!"); break;
1926 HConflict
|= FROMOUTSIDE
; pline("You start causing conflict!"); break;
1929 HTeleportation
|= FROMOUTSIDE
; pline("Got teleportitis!"); break;
1931 HTeleport_control
|= FROMOUTSIDE
; pline("Got teleport control!"); break;
1933 HFlying
|= FROMOUTSIDE
; pline("Got flying!"); break;
1935 HSwimming
|= FROMOUTSIDE
; pline("Got swimming!"); break;
1937 HMagical_breathing
|= FROMOUTSIDE
; pline("Got unbreathing!"); break;
1939 HSlow_digestion
|= FROMOUTSIDE
; pline("Got slow digestion!"); break;
1942 HRegeneration
|= FROMOUTSIDE
; pline("Got regeneration!"); break;
1944 HPolymorph
|= FROMOUTSIDE
; pline("Got polymorphitis!"); break;
1946 HPolymorph_control
|= FROMOUTSIDE
; pline("Got polymorph control!"); break;
1949 HFast
|= FROMOUTSIDE
; pline("Got speed!"); break;
1951 HInvis
|= FROMOUTSIDE
; pline("Got invisibility!"); break;
1953 HManaleech
|= FROMOUTSIDE
; pline("Got manaleech!"); break;
1955 HPeacevision
|= FROMOUTSIDE
; pline("Got peacevision!"); break;
1957 HDefusing
|= FROMOUTSIDE
; pline("Got defusing power!"); break;
1959 HWinceState
|= FROMOUTSIDE
; pline("You start wincing!"); break;
1961 HPainSense
|= FROMOUTSIDE
; pline("Got pain sense!"); break;
1963 HBurdenedState
|= FROMOUTSIDE
; pline("Got burden!"); break;
1965 HMagicVacuum
|= FROMOUTSIDE
; pline("Got magic vacuum!"); break;
1967 HResistancePiercing
|= FROMOUTSIDE
; pline("Got resistance piercing!"); break;
1969 HFuckOverEffect
|= FROMOUTSIDE
; pline("Got fuck-over!"); break;
1973 HMysteryResist
|= FROMOUTSIDE
; pline("Got mystery resistance!"); break;
1975 HMagicFindBonus
|= FROMOUTSIDE
; pline("Got magic find!"); break;
1977 HSpellboost
|= FROMOUTSIDE
; pline("Got spellboost!"); break;
1988 while (Race_if(PM_MISSINGNO
) && u
.ulevel
> u
.urmaxlvlM
) {
1992 if (!rn2(3)) learnrandomregulartech();
1995 while (Role_if(PM_DQ_SLIME
) && u
.ulevel
> 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
) {
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
) {
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!");
2378 while (Role_if(PM_ZYBORG
) && u
.ulevel
> u
.urmaxlvlB
) {
2382 if (!rn2(3)) learnrandomregulartech();
2386 while (Role_if(PM_ANACHRONOUNBINDER
) && u
.ulevel
> u
.urmaxlvlJ
) {
2390 int maxtrainingamount
= 0;
2391 int skillnumber
= 0;
2392 int actualskillselection
= 0;
2393 int amountofpossibleskills
= 1;
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;
2403 maxtrainingamount
= P_ADVANCE(i
);
2404 } else if (!rn2(amountofpossibleskills
+ 1)) {
2405 amountofpossibleskills
++;
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");
2418 pline("You've trained no unknown skills since your last level up and therefore you unfortunately don't learn anything new.");
2423 while (Role_if(PM_MYSTIC
) && u
.ulevel
> 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
) {
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
) ) {
2444 u
.uhpmax
+= rnd(10);
2445 u
.uenmax
+= rnd(10);
2449 while (isamerican
&& Role_if(PM_GLADIATOR
) && (u
.ulevel
> 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
;