1 /* SCCS Id: @(#)artifact.c 3.4 2003/08/11 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
9 struct artifact artilist
[SIZE(artilist_pre
)]; /* the master list of artifacts */
11 STATIC_DCL
struct artifact artilist_pre
[];
12 struct artifact artilist
[SIZE(artilist_pre
)]; /* the master list of artifacts */
15 * Note: both artilist_pre[] and artiexist[] have a dummy element #0,
16 * so loops over them should normally start at #1. The primary
17 * exception is the save & restore code, which doesn't care about
18 * the contents, just the total size.
20 * Amy note: artifact_exists() is the function called when creating an artifact, strangely enough. If we want to add
21 * special code that runs upon the artifact's generation, such as extra-high charge counts for a lightsaber artifact,
22 * that is where we need to put it.
25 static const char all_count
[] = { ALLOW_COUNT
, ALL_CLASSES
, 0 };
26 static const char allowall
[] = { ALL_CLASSES
, 0 };
27 static const char allnoncount
[] = { ALL_CLASSES
, 0 };
29 extern boolean notonhead
; /* for long worms */
31 #define get_artifact(o) \
32 (((o)&&(o)->oartifact) ? &artilist[(int) ((unsigned int) (o)->oartifact)] : 0)
33 /* big thanks to Chris, I'd never have found out that the "unsigned char" part would fix the bug where
34 * any artifacts after #127 were segfaulting and giving random effects instead of the desired ones... --Amy */
36 STATIC_DCL
int spec_applies(const struct artifact
*,struct monst
*);
37 STATIC_DCL
int spec_applies_number(const struct artifact
*,struct monst
*, struct obj
*);
38 STATIC_DCL
int arti_invoke(struct obj
*);
39 STATIC_DCL boolean
Mb_hit(struct monst
*magr
,struct monst
*mdef
,
40 struct obj
*,int *,int,BOOLEAN_P
,char *, int);
42 /* The amount added to the victim's total hit points to insure that the
43 victim will be killed even after damage bonus/penalty adjustments.
44 Most such penalties are small, and 200 is plenty; the exception is
45 half physical damage. 3.3.1 and previous versions tried to use a very
46 large number to account for this case; now, we just compute the fatal
47 damage by adding it to 2 times the total hit points instead of 1 time.
48 Note: this will still break if they have more than about half the number
49 of hit points that will fit in a 15 bit integer. */
50 #define FATAL_DAMAGE_MODIFIER 200
53 STATIC_DCL
int spec_dbon_applies
;
54 STATIC_DCL
int artidisco
[NROFARTIFACTS
];
56 /* coordinate effects from spec_dbon() with messages in artifact_hit() */
57 STATIC_OVL
int spec_dbon_applies
= 0;
59 /* flags including which artifacts have already been created */
60 static boolean artiexist
[1+NROFARTIFACTS
+1];
61 /* and a discovery list for them (no dummy first entry here) */
63 STATIC_OVL
int artidisco
[NROFARTIFACTS
];
65 STATIC_DCL
void hack_artifacts(void);
66 STATIC_DCL boolean
attacks(int,struct obj
*);
70 do_terrainfloodP(x
, y
, poolcnt
)
74 register struct monst
*mtmp
;
75 register struct trap
*ttmp
;
78 if (!rn2(25)) randomamount
+= rnz(2);
79 if (!rn2(125)) randomamount
+= rnz(5);
80 if (!rn2(625)) randomamount
+= rnz(20);
81 if (!rn2(3125)) randomamount
+= rnz(50);
83 if (!rn2(25)) randomamount
+= rnz(2);
84 if (!rn2(125)) randomamount
+= rnz(5);
85 if (!rn2(625)) randomamount
+= rnz(20);
86 if (!rn2(3125)) randomamount
+= rnz(50);
89 if (In_sokoban(&u
.uz
) && rn2(5)) return;
91 while (randomamount
) {
93 randomx
= rn1(COLNO
-3,2);
95 if (isok(randomx
, randomy
) && (levl
[randomx
][randomy
].typ
== ROOM
|| levl
[randomx
][randomy
].typ
== CORR
) ) {
96 levl
[randomx
][randomy
].typ
= randomwalltype();
97 blockorunblock_point(randomx
,randomy
);
98 if (!(levl
[randomx
][randomy
].wall_info
& W_EASYGROWTH
)) levl
[randomx
][randomy
].wall_info
|= W_HARDGROWTH
;
99 del_engr_at(randomx
, randomy
);
101 if ((mtmp
= m_at(randomx
, randomy
)) != 0) {
102 (void) minliquid(mtmp
);
104 newsym(randomx
,randomy
);
110 if ((rn2(1 + distmin(u
.ux
, u
.uy
, x
, y
))) ||
111 (sobj_at(BOULDER
, x
, y
)) || (levl
[x
][y
].typ
!= ROOM
&& levl
[x
][y
].typ
!= CORR
))
116 if (!((*(int *)poolcnt
) && (x
== u
.ux
) && (y
== u
.uy
))) {
117 /* Put a pool at x, y */
118 levl
[x
][y
].typ
= randomwalltype();
119 blockorunblock_point(x
,y
);
120 if (!(levl
[x
][y
].wall_info
& W_EASYGROWTH
)) levl
[x
][y
].wall_info
|= W_HARDGROWTH
;
123 if ((mtmp
= m_at(x
, y
)) != 0) {
124 (void) minliquid(mtmp
);
128 } else if ((x
== u
.ux
) && (y
== u
.uy
)) {
134 /** Remove water tile at x,y. */
136 undo_floodM(x
, y
, roomcnt
)
140 if ((levl
[x
][y
].typ
!= POOL
) &&
141 (levl
[x
][y
].typ
!= MOAT
) &&
142 (levl
[x
][y
].typ
!= WATER
) &&
143 (levl
[x
][y
].typ
!= FOUNTAIN
))
148 /* Get rid of a pool at x, y */
149 levl
[x
][y
].typ
= ROOM
;
154 elemental_imbue(elemtype
)
157 if (!uwep
) return; /* bug */
161 artilist
[ART_FIRE_SWING
].otyp
= uwep
->otyp
;
164 artilist
[ART_FROST_SWING
].otyp
= uwep
->otyp
;
167 artilist
[ART_SHOCK_SWING
].otyp
= uwep
->otyp
;
172 /* Amy change: reaching certain milestones allows specific artifacts to randomly generate from that point on
173 * this is done by removing the NOGEN flag from them; that change is saved into the savegame file */
175 de_energise_artifact(artinum
)
178 artilist
[artinum
].spfx
&= ~SPFX_NOGEN
;
181 /* handle some special cases; must be called after role_init() */
185 struct artifact
*art
;
186 int alignmnt
= aligns
[flags
.initalign
].value
;
188 memcpy(artilist
, artilist_pre
, sizeof(artilist
));
190 /* Fix up the alignments of "gift" artifacts */
191 for (art
= artilist
+1; art
->otyp
; art
++) {
192 if (art
->role
== Role_switch
&& art
->alignment
!= A_NONE
)
193 art
->alignment
= alignmnt
;
195 if (art
->attk
.adtyp
> AD_PHYS
&& !(art
->spfx
& (SPFX_DBONUS
| SPFX_ATTK
)) ) {
196 impossible("BUG! artifact %s lacks SPFX_ATTK flag", art
->name
);
201 /* Excalibur can be used by any lawful character, not just knights */
202 if (!Role_if(PM_KNIGHT
))
203 artilist
[ART_EXCALIBUR
].role
= NON_PM
;
208 /* Fix up the gifts */
209 if (urole
.gift1arti
) {
210 artilist
[urole
.gift1arti
].alignment
= alignmnt
;
211 artilist
[urole
.gift1arti
].role
= Role_switch
;
213 if (urole
.gift2arti
) {
214 artilist
[urole
.gift2arti
].alignment
= alignmnt
;
215 artilist
[urole
.gift2arti
].role
= Role_switch
;
218 /* Fix up the quest artifact */
219 if (urole
.questarti
) {
220 artilist
[urole
.questarti
].alignment
= alignmnt
;
221 artilist
[urole
.questarti
].role
= Role_switch
;
229 /* randarts - the code in this file is from dnethack (thanks Chris) with adaptations --Amy */
230 /* base item: LONG_SWORD = melee weapon, BOW = launcher, DART = missile, LEATHER_ARMOR = suit,
231 * VICTORIAN_UNDERWEAR = shirt, ORCISH_CLOAK = cloak, HELMET = helm, REGULAR_GLOVES = gloves,
232 * SHIELD = shield, LOW_BOOTS = boots, RIN_AGGRAVATE_MONSTER = ring, AMULET_OF_STRANGULATION = amulet,
233 * WAN_MAKE_INVISIBLE = wand, SPE_MAGICTORCH = spellbook */
235 artilist
[ART_SOULCALIBUR
].otyp
= randartmeleeweapon();
236 artilist
[ART_MOURNBLADE
].otyp
= randartmeleeweapon();
237 artilist
[ART_NERF_BRAND
].otyp
= randartmeleeweapon();
238 artilist
[ART_GRISGREN
].otyp
= randartmeleeweapon();
239 artilist
[ART_POSTSCHEME_M
].otyp
= randartmeleeweapon();
240 artilist
[ART_WINTERHOLD_S_KEEP
].otyp
= randartmeleeweapon();
241 artilist
[ART_DAT_S_GOD
].otyp
= randartmeleeweapon();
242 artilist
[ART_HER_UNREACHABLE_BROOK
].otyp
= randartmeleeweapon();
243 artilist
[ART_KOPKILLER
].otyp
= randartmeleeweapon();
244 artilist
[ART_THIS_TRENCH_WAR_HAS_BEEN_F
].otyp
= randartmeleeweapon();
245 artilist
[ART_SKOGLO
].otyp
= randartmeleeweapon();
246 artilist
[ART_UNDEADBANE
].otyp
= randartmeleeweapon();
247 artilist
[ART_RAINBOWSWANDIR
].otyp
= randartmeleeweapon();
248 artilist
[ART_MAGDALENA_S_CUDDLEWEAPON
].otyp
= randartmeleeweapon();
249 artilist
[ART_WIZARDBANE
].otyp
= randartmeleeweapon();
250 artilist
[ART_VORPAL_EDGE
].otyp
= randartmeleeweapon();
251 artilist
[ART_FINAL_CONSEQUENCE
].otyp
= randartmeleeweapon();
252 artilist
[ART_DARK_MAGIC
].otyp
= randartsuit();
253 artilist
[ART_ENCHANTED__OF_DEFUSING
].otyp
= randartsuit();
254 artilist
[ART_COMPLETE_ARMORING
].otyp
= randartsuit();
255 artilist
[ART_RAND_ARM
].otyp
= randartsuit();
256 artilist
[ART_HEART_INFACT
].otyp
= randartsuit();
257 artilist
[ART_AMMY_S_WAIL
].otyp
= randartsuit();
258 artilist
[ART_STAND_YOU_FORWARDS__THERE_
].otyp
= randartsuit();
259 artilist
[ART_BEAM_CONTROL
].otyp
= randartmeleeweapon();
260 artilist
[ART_SANDRA_S_SECRET_WEAPON
].otyp
= randartmeleeweapon();
261 artilist
[ART_FINAL_DOOR_SOLUTION
].otyp
= randartmeleeweapon();
262 artilist
[ART_DUMBOAK_S_HEW
].otyp
= randartmeleeweapon();
263 artilist
[ART_POWER_AMMO
].otyp
= randartmissile();
264 artilist
[ART_DARTHADART
].otyp
= randartmissile();
265 artilist
[ART_MAGISTUS
].otyp
= randartmissile();
266 artilist
[ART_PAUERED_BY_THE_CAP
].otyp
= randartmissile();
267 artilist
[ART_DESSINTERGRATE
].otyp
= randartmissile();
268 artilist
[ART_BLOBLOBLOBLOBLO
].otyp
= randartlauncher();
269 artilist
[ART_SHENA_S_PANTY
].otyp
= randartlauncher();
270 artilist
[ART_BUCK_SHOT
].otyp
= randartlauncher();
271 artilist
[ART_PSCHIUDITT
].otyp
= randartlauncher();
272 artilist
[ART_RATTATTATTATTATT
].otyp
= randartlauncher();
273 artilist
[ART_FLAM_R
].otyp
= randartlauncher();
274 artilist
[ART_SURESHOT
].otyp
= randartlauncher();
275 artilist
[ART_STINGWING
].otyp
= randartmissile();
276 artilist
[ART_PLEINLY
].otyp
= randartshirt();
277 artilist
[ART_NOBILE_MOBILITY
].otyp
= randartshirt();
278 artilist
[ART_ALL_IN_ONE_EFF
].otyp
= randartshirt();
279 artilist
[ART_TILLMANN_S_TARGET
].otyp
= randartshirt();
280 artilist
[ART_THEY_ALL_FEEL_FLEECY
].otyp
= randartshirt();
281 artilist
[ART_ANTIMAGIC_FIELD
].otyp
= randartshirt();
282 artilist
[ART_NATALIA_IS_LOVELY_BUT_DANG
].otyp
= randartshirt();
283 artilist
[ART_TAPE_ARMAMENT
].otyp
= randartsuit();
284 artilist
[ART_NARYA
].otyp
= randartring();
285 artilist
[ART_SHARD_FROM_MORGOTH_S_CROWN
].otyp
= randartring();
286 artilist
[ART_CATHAN_S_SIGIL
].otyp
= randartring();
287 artilist
[ART_XANATHAR_S_RING_OF_PROOF
].otyp
= randartring();
288 artilist
[ART_RING_OF_EVERYTHING_RESISTA
].otyp
= randartring();
289 artilist
[ART_VERSION_CONTROL
].otyp
= randartring();
290 artilist
[ART_FLEEING_MINE_MAIL
].otyp
= randartsuit();
291 artilist
[ART_GREY_FUCKERY
].otyp
= randartsuit();
292 artilist
[ART_LITTLE_PENIS_WANKER
].otyp
= randartsuit();
293 artilist
[ART_D_TYPE_EQUIPMENT
].otyp
= randartsuit();
294 artilist
[ART_INCREDIBLE_SWEETNESS
].otyp
= randartsuit();
295 artilist
[ART_QUEEN_ARTICUNO_S_HULL
].otyp
= randartsuit();
296 artilist
[ART_IT_POWER_KNOEPP
].otyp
= randartsuit();
297 artilist
[ART_DON_SUICUNE_USED_SELFDESTR
].otyp
= randartsuit();
298 artilist
[ART_WONDERCLOAK
].otyp
= randartcloak();
299 artilist
[ART_WHISPERWIND_CLOAK
].otyp
= randartcloak();
300 artilist
[ART_GLAE
].otyp
= randartmeleeweapon();
301 artilist
[ART_FIRM_TOP
].otyp
= randartcloak();
302 artilist
[ART_SHROUD
].otyp
= randartcloak();
303 artilist
[ART_PREIM_OH
].otyp
= randartcloak();
304 artilist
[ART_LIBRARY_HIDING
].otyp
= randartcloak();
305 artilist
[ART_BAMSEL_IN_THE_WAY
].otyp
= randartcloak();
306 artilist
[ART_EVELINE_S_CIVIL_MANTLE
].otyp
= randartcloak();
307 artilist
[ART_INA_S_OVERCOAT
].otyp
= randartcloak();
308 artilist
[ART_GROUNDBUMMER
].otyp
= randartcloak();
309 artilist
[ART_RITA_S_LOVELY_OVERGARMENT
].otyp
= randartcloak();
310 artilist
[ART_LUNAR_ECLIPSE_TONIGHT
].otyp
= randartcloak();
311 artilist
[ART_FONEUZIK
].otyp
= randarthelm();
312 artilist
[ART_TEJUS__VACANCY
].otyp
= randarthelm();
313 artilist
[ART_SAGE_S_HELM
].otyp
= randarthelm();
314 artilist
[ART_LORSKEL_S_SPEED
].otyp
= randarthelm();
315 artilist
[ART_HEAD_W
].otyp
= randarthelm();
316 artilist
[ART_EFFICIENT_SHARING
].otyp
= randarthelm();
317 artilist
[ART_NUTRITION_AND_DIETETICS
].otyp
= randarthelm();
318 artilist
[ART_COMPLETE_SIGHT
].otyp
= randarthelm();
319 artilist
[ART_SUK_ME_HAHAHAHAHAH
].otyp
= randarthelm();
320 artilist
[ART_TEN_MINUTES_COLDER
].otyp
= randarthelm();
321 artilist
[ART_KAWA_JUR_FES
].otyp
= randarthelm();
322 artilist
[ART____DOT__ALIEN_RADIO
].otyp
= randarthelm();
323 artilist
[ART_NADJA_S_DARKNESS_GENERATOR
].otyp
= randarthelm();
324 artilist
[ART_THA_WALL
].otyp
= randartsuit();
325 artilist
[ART_LLLLLLLLLLLLLM
].otyp
= randarthelm();
326 artilist
[ART_SPELLSNIPE
].otyp
= randartgloves();
327 artilist
[ART_REAL_FORCE
].otyp
= randartgloves();
328 artilist
[ART_RED_CORDS_OF_ILMATER
].otyp
= randartgloves();
329 artilist
[ART_MELUGAS_ROCKET
].otyp
= randartgloves();
330 artilist
[ART_ARABELLA_S_GREAT_BANISHER
].otyp
= randartgloves();
331 artilist
[ART_KROL_GR
].otyp
= randartgloves();
332 artilist
[ART_A_LITTLE_SUGAR
].otyp
= randartgloves();
333 artilist
[ART_TARTSCH
].otyp
= randartshield();
334 artilist
[ART_SHIELD_OF_THORN
].otyp
= randartshield();
335 artilist
[ART_NO_FUTURE_BUT_AGONY
].otyp
= randartshield();
336 artilist
[ART_OF_VOIDING
].otyp
= randartshield();
337 artilist
[ART_THERMO_NUCLEAR_CHAMBER
].otyp
= randartshield();
338 artilist
[ART_FLUIDSHIELD
].otyp
= randartshield();
339 artilist
[ART_BONUS_HOLD
].otyp
= randartshield();
340 artilist
[ART_GREXIT_IS_NEAR
].otyp
= randartshield();
341 artilist
[ART_REAL_MEN_WEAR_PSYCHOS
].otyp
= randartshield();
342 artilist
[ART_AMYBSOD_S_NEW_FOOTWEAR
].otyp
= randartboots();
343 artilist
[ART_FLYGEL_BOOTS
].otyp
= randartboots();
344 artilist
[ART_HIGHWAY_HUNTER
].otyp
= randartboots();
345 artilist
[ART_MANUELA_S_UNKNOWN_HEELS
].otyp
= randartboots();
346 artilist
[ART_HADES_THE_MEANIE
].otyp
= randartboots();
347 artilist
[ART_AMY_LOVES_AUTOCURSING_ITEM
].otyp
= randartboots();
348 artilist
[ART_BS_____
].otyp
= randartboots();
349 artilist
[ART_ALLYNONE
].otyp
= randartboots();
350 artilist
[ART_KHOR_S_REQUIRED_IDEA
].otyp
= randartboots();
351 artilist
[ART_ERROR_IN_PLAY_ENCHANTMENT
].otyp
= randartboots();
352 artilist
[ART_WHOA_HOLD_ON_DUDE
].otyp
= randartring();
353 artilist
[ART_PALMIA_PRIDE
].otyp
= randartring();
354 artilist
[ART_MAXIMUM_SHUTLOCK
].otyp
= randartring();
355 artilist
[ART_ACHROMANTIC_RING
].otyp
= randartring();
356 artilist
[ART_GOLDENIVY_S_ENGAGEMENT_RIN
].otyp
= randartring();
357 artilist
[ART_TYRANITAR_S_OWN_GAME
].otyp
= randartamulet();
358 artilist
[ART_PURPLE_ARBALEST
].otyp
= randartamulet();
359 artilist
[ART_BEGGER_S_PENDANT
].otyp
= randartamulet();
360 artilist
[ART_ONE_MOMENT_IN_TIME
].otyp
= randartamulet();
361 artilist
[ART_BUEING
].otyp
= randartamulet();
362 artilist
[ART_NAZGUL_S_REVENGE
].otyp
= randartamulet();
363 artilist
[ART_HARRY_S_BLACKTHORN_WAND
].otyp
= randartwand();
364 artilist
[ART_VIVARIUM_STICK
].otyp
= randartwand();
365 artilist
[ART_PROFESSOR_SNAPE_S_DILDO
].otyp
= randartwand();
366 artilist
[ART_FRENCH_MAGICAL_DEVICE
].otyp
= randartwand();
367 artilist
[ART_SAGGITTII
].otyp
= randartmissile();
368 artilist
[ART_BENTSHOT
].otyp
= randartlauncher();
369 artilist
[ART_JELLYWHACK
].otyp
= randartmeleeweapon();
370 artilist
[ART_SKODIT
].otyp
= randartmeleeweapon();
371 artilist
[ART_ONE_THROUGH_FOUR_SCEPTER
].otyp
= randartmeleeweapon();
372 artilist
[ART_AL_CANONE
].otyp
= randartlauncher();
373 artilist
[ART_VEIL_OF_MINISTRY
].otyp
= randartcloak();
374 artilist
[ART_ZANKAI_HUNG_ZE_TUNG_DO_HAI
].otyp
= randartmeleeweapon();
375 artilist
[ART_AWKWARDNESS
].otyp
= randartmeleeweapon();
376 artilist
[ART_SCHWANZUS_LANGUS
].otyp
= randartmeleeweapon();
377 artilist
[ART_TRAP_DUNGEON_OF_SHAMBHALA
].otyp
= randartshirt();
378 artilist
[ART_ZERO_PERCENT_FAILURE
].otyp
= randarthelm();
379 artilist
[ART_RULE_CONFORMING_SCHWANZLUT
].otyp
= randarthelm();
380 artilist
[ART_HENRIETTA_S_HEAVY_CASTER
].otyp
= randartcloak();
381 artilist
[ART_ROFLCOPTER_WEB
].otyp
= randartsuit();
382 artilist
[ART_SHIVANHUNTER_S_UNUSED_PRIZ
].otyp
= randartsuit();
383 artilist
[ART_ARABELLA_S_ARTIFACT_CREATI
].otyp
= randartmeleeweapon();
384 artilist
[ART_VERSUS_ELECTRICALLY_BASED_
].otyp
= randartmeleeweapon();
385 artilist
[ART_ULTRA_ANNOYANCE
].otyp
= randartpolearm();
386 artilist
[ART_CHATGPT_S_FREEZE
].otyp
= randartpolearm();
387 artilist
[ART_THUNDERING_GLAIVE
].otyp
= randartpolearm();
388 artilist
[ART_FROSTBITE_PIKE
].otyp
= randartpolearm();
389 artilist
[ART_FINALLY__A_USABLE_POLEARM_
].otyp
= randartpolearm();
390 artilist
[ART_TOTAL_GAUCHE
].otyp
= randartdagger();
391 artilist
[ART_ETHER_DAGGER
].otyp
= randartdagger();
392 artilist
[ART_HELICOPTER_TWIRL
].otyp
= randartquarterstaff();
393 artilist
[ART_SHIVERING_STAFF
].otyp
= randartquarterstaff();
394 artilist
[ART_HYSTERESIS_X
].otyp
= randartquarterstaff();
395 artilist
[ART_CASTOR_BOOST
].otyp
= randartquarterstaff();
396 artilist
[ART_GARBAGE_STAFF
].otyp
= randartquarterstaff();
397 artilist
[ART_WHY_DOES_THE_GAME_GENERATE
].otyp
= randartquarterstaff();
398 artilist
[ART_CUTRELEASE
].otyp
= randartknife();
399 artilist
[ART_KNIFE_EM
].otyp
= randartknife();
400 artilist
[ART_GIVE_CRAP_A_BAD_NAME
].otyp
= randartknife();
401 artilist
[ART_TIARA_OF_AMNESIA
].otyp
= randarthelm();
402 artilist
[ART_FLUE_FLUE_FLUEFLUE_FLUE
].otyp
= randarthelm();
403 artilist
[ART_LIXERTYPIE
].otyp
= randartmeleeweapon();
404 artilist
[ART_SAMENESS_OF_CHRIS
].otyp
= randartmeleeweapon();
405 artilist
[ART_DONALD_TRUMP_S_RAGE
].otyp
= randartmeleeweapon();
406 artilist
[ART_PRICK_PASS
].otyp
= randartmeleeweapon();
407 artilist
[ART_THRANDUIL_LOSSEHELIN
].otyp
= randartmeleeweapon();
408 artilist
[ART_FEANARO_SINGOLLO
].otyp
= randartmeleeweapon();
409 artilist
[ART_WINSETT_S_BIG_DADDY
].otyp
= randartlauncher();
410 artilist
[ART_FEMINIST_GIRL_S_PURPLE_WEA
].otyp
= randartshirt();
411 artilist
[ART_LEA_S_SPOKESWOMAN_UNIFORM
].otyp
= randartcloak();
412 artilist
[ART_HERETICAL_FIGURE
].otyp
= randartcloak();
413 artilist
[ART_JANA_S_SECRET_CAR
].otyp
= randartcloak();
414 artilist
[ART_UNIMPLEMENTED_FEATURE
].otyp
= randarthelm();
415 artilist
[ART_FLAT_INSANITY
].otyp
= randarthelm();
416 artilist
[ART_FREEZE_OR_YES
].otyp
= randartgloves();
417 artilist
[ART_PRINCESS_BITCH
].otyp
= randartgloves();
418 artilist
[ART_WOULD_YOU_RAIGHT_THAT
].otyp
= randartgloves();
419 artilist
[ART_DIFFICULTY__
].otyp
= randartgloves();
420 artilist
[ART_SWARM_SOFT_HIGH_HEELS
].otyp
= randartboots();
421 artilist
[ART_WEAK_FROM_HUNGER
].otyp
= randartboots();
422 artilist
[ART_ARABELLA_S_RESIST_COLD
].otyp
= randartring();
423 artilist
[ART_RATSCH_WATSCH
].otyp
= randartamulet();
424 artilist
[ART_ARABELLA_S_PRECIOUS_GADGET
].otyp
= randartamulet();
425 artilist
[ART_ARABELLA_S_WARDING_HOE
].otyp
= randartmeleeweapon();
426 artilist
[ART_SHAPETAKE_NUMBER_FIVE
].otyp
= randartcloak();
427 artilist
[ART_ARABELLA_S_WAND_BOOSTER
].otyp
= randartcloak();
428 artilist
[ART_INTELLIGENT_POPE
].otyp
= randartlauncher();
429 artilist
[ART_RNG_S_PRIDE
].otyp
= randartsuit();
430 artilist
[ART_RNG_S_JOY
].otyp
= randartgloves();
431 artilist
[ART_RNG_S_SEXINESS
].otyp
= randartboots();
432 artilist
[ART_RNG_S_EMBRACE
].otyp
= randartcloak();
433 artilist
[ART_RNG_S_GRIMACE
].otyp
= randarthelm();
434 artilist
[ART_COMPLETE_MON_DIEU
].otyp
= randartspellbook();
435 artilist
[ART_AGATHE_BAUER
].otyp
= randartspellbook();
436 artilist
[ART_ANNELIESE_BROWN
].otyp
= randartspellbook();
437 artilist
[ART_I_WILL_THINK_ABOUT_YOU
].otyp
= randartspellbook();
438 artilist
[ART_DEL_OLELONG
].otyp
= randartspellbook();
439 artilist
[ART_JUBELJUBIJEEAH
].otyp
= randartspellbook();
440 artilist
[ART_DUEDELDUEDELDUEDELDUEDELDU
].otyp
= randartspellbook();
441 artilist
[ART_CAUSE_I_M_A_CHEATER
].otyp
= randartspellbook();
442 artilist
[ART_BATMAN_NIGHT
].otyp
= randartspellbook();
443 artilist
[ART_NIKKENIKKENIK
].otyp
= randartspellbook();
444 artilist
[ART_POLITICAL_CORRECTNESS_FOR_
].otyp
= randartspellbook();
445 artilist
[ART_DOWNDRIVE
].otyp
= randartimplant();
446 artilist
[ART_CORTEX_COPROCESSOR
].otyp
= randartimplant();
447 artilist
[ART_ND___NND_D___NDMD__DM_D_D_
].otyp
= randartimplant();
448 artilist
[ART_ARABELLA_S_EXCHANGER
].otyp
= randartimplant();
449 artilist
[ART_SYMPLANT
].otyp
= randartimplant();
450 artilist
[ART_MAXHIT_BOOST
].otyp
= randartimplant();
451 artilist
[ART_AMULET_OF_SPLENDOR
].otyp
= randartamulet();
452 artilist
[ART_FASTPLANT
].otyp
= randartimplant();
453 artilist
[ART_IRON_OF_INNERMOST_JOY
].otyp
= randartimplant();
454 artilist
[ART_UPSIDE_DOWN_PLAYING_CARD
].otyp
= randartscroll();
455 artilist
[ART_BERRYBREW
].otyp
= randartpotion();
456 artilist
[ART_CURSED_WITH_THE_WORST
].otyp
= randartbadgraystone();
457 artilist
[ART_ONE_IN_FOUR
].otyp
= randartbadgraystone();
458 artilist
[ART_HAVE_IT_ALL_BUT_NOT_GET
].otyp
= randartbadgraystone();
459 artilist
[ART_DOUBLESHELL
].otyp
= randartfeminismjewel();
460 artilist
[ART_HOW_LONG_LASTS_IT_
].otyp
= randartfeminismjewel();
461 artilist
[ART_FEMITY_SOLVE
].otyp
= randartfeminismjewel();
462 artilist
[ART_MINIMAL_MINI_ME
].otyp
= randartfeminismjewel();
463 artilist
[ART_NOT_GONNA_CONTAMINATE
].otyp
= randartfeminismjewel();
464 artilist
[ART_JYL__NOT_XLATED_CALL_KEN
].otyp
= randartfeminismjewel();
465 artilist
[ART_QUE_TANGHERISONJA
].otyp
= randartfeminismjewel();
466 artilist
[ART_PHILOSOPHER_S_STONE
].otyp
= randartfeminismjewel();
467 artilist
[ART_VAPER_BAPER
].otyp
= randartball();
468 artilist
[ART_ICED_OUT_COMPUTER_ON_A_CHA
].otyp
= randartball();
469 artilist
[ART_DOCKEM_GOOD
].otyp
= randartball();
470 artilist
[ART_ARABELLA_S_THINNER
].otyp
= randartball();
471 artilist
[ART_YES_OCCIFER
].otyp
= randartchain();
472 artilist
[ART_STREEEEEAM
].otyp
= randartchain();
473 artilist
[ART_DON_T_GO_AWAY
].otyp
= randartchain();
474 artilist
[ART_TSCHEND_FOR_ETERNITY
].otyp
= randartchain();
475 artilist
[ART_CHAINS_OF_MALCANTHET
].otyp
= randartchain();
476 artilist
[ART_MACHINE_THAT_GOES_PLING
].otyp
= randartgem();
477 artilist
[ART_COCKBANGER_ARMOR
].otyp
= randartsuit();
478 artilist
[ART_TAVION_S_CHARGE
].otyp
= randartlightsaber();
479 artilist
[ART_LORD_SIDIOUS__SECRET_WEAPO
].otyp
= randartlightsaber();
480 artilist
[ART_FOR_STYGWYR_
].otyp
= randartlightsaber();
481 artilist
[ART_LIGHT_____STATED_
].otyp
= randartlightsaber();
482 artilist
[ART_OWENER
].otyp
= randartlightsaber();
483 artilist
[ART_CHARGING_MADE_EASY
].otyp
= randartlightsaber();
484 artilist
[ART_THAIFORCE
].otyp
= randartlightsaber();
485 artilist
[ART_HALF_SUPER_ENCHANTMENT
].otyp
= randartlightsaber();
486 artilist
[ART_WEDIFORCE
].otyp
= randartvenom();
487 artilist
[ART_RIDGET_PHASTO
].otyp
= randartvenom();
488 artilist
[ART_ACIDFALL
].otyp
= randartlongsword();
489 artilist
[ART_FLYING_DRAGON_SWORD
].otyp
= randartlongsword();
490 artilist
[ART_SILVER_SKY
].otyp
= randartlongsword();
491 artilist
[ART_AVENGER
].otyp
= randartlongsword();
492 artilist
[ART_SINGING_SWORD
].otyp
= randartlongsword();
493 artilist
[ART_ACIDIRGE
].otyp
= randartlongsword();
494 artilist
[ART_ITAK_HONE
].otyp
= randartlongsword();
495 artilist
[ART_AVALON
].otyp
= randartscimitar();
496 artilist
[ART_PIRATTERY
].otyp
= randartscimitar();
497 artilist
[ART_WORSE_CARNWENNAN
].otyp
= randartknife();
498 artilist
[ART_SEAFOAM
].otyp
= randarttrident();
499 artilist
[ART_UNLIMITED_MOON
].otyp
= randartflail();
500 artilist
[ART_DISMOUNTER
].otyp
= randartlance();
501 artilist
[ART_PHOENIX_LANCE
].otyp
= randartlance();
502 artilist
[ART_FINAL_DEATH
].otyp
= randartwhip();
503 artilist
[ART_MANEATER
].otyp
= randartshortsword();
504 artilist
[ART_DIABLO_S_COLD_SMACKAGE
].otyp
= randartshortsword();
505 artilist
[ART_SKULL_SWORD
].otyp
= randartshortsword();
506 artilist
[ART_UNATTAINABLE_NINETEEN
].otyp
= randartshortsword();
507 artilist
[ART_GNOLLBANE
].otyp
= randarthammer();
508 artilist
[ART_HAMMA_HAMMA
].otyp
= randarthammer();
509 artilist
[ART_EMMA_S_SYMPATHY
].otyp
= randarthammer();
510 artilist
[ART_EMERALD_SWORD
].otyp
= randarttwohandedsword();
511 artilist
[ART_BRUTISH_CLAYMORE
].otyp
= randarttwohandedsword();
512 artilist
[ART_AMALGAMATED_SKIES
].otyp
= randarttwohandedsword();
513 artilist
[ART_ATLANTEAN_ROYAL_SWORD
].otyp
= randarttwohandedsword();
514 artilist
[ART_CELESTIAL_SCEPTRE
].otyp
= randartmace();
515 artilist
[ART_SMASHIN
].otyp
= randartmace();
516 artilist
[ART_INDOBURDENIA_VIRII
].otyp
= randartmace();
517 artilist
[ART_KLOEB
].otyp
= randartclub();
518 artilist
[ART_BLOOD_MOON
].otyp
= randartclub();
519 artilist
[ART_NOOBY_BONUS_STYLE
].otyp
= randartaxe();
520 artilist
[ART_SEA_ANGERANCHOR
].otyp
= randartaxe();
521 artilist
[ART_HAKUNA_MAALUM
].otyp
= randartspear();
522 artilist
[ART_HOLYBASHER
].otyp
= randartflail();
523 artilist
[ART_RAISING_HEART
].otyp
= randartquarterstaff();
524 artilist
[ART_PSI_STAFF
].otyp
= randartquarterstaff();
525 artilist
[ART_LANCE_ARMSTRONG
].otyp
= randartlance();
526 artilist
[ART_GOLIATHBANE
].otyp
= randartsling();
527 artilist
[ART_VITRIOL_FROM_THE_LAB
].otyp
= randartsling();
528 artilist
[ART_FIREBIRD
].otyp
= randartboomerang();
529 artilist
[ART_STEAMBRINGER
].otyp
= randartbroadsword();
530 artilist
[ART_SKY_REFLECTED
].otyp
= randartbroadsword();
531 artilist
[ART_PENDULUM_OF_BALANCE
].otyp
= randartmace();
532 artilist
[ART_BLOODY_MACE
].otyp
= randartmace();
533 artilist
[ART_POLAR_STAR
].otyp
= randartmorningstar();
534 artilist
[ART_PARRYINGSTAFF
].otyp
= randartquarterstaff();
535 artilist
[ART_STONEBITER
].otyp
= randartpickaxe();
536 artilist
[ART_Y_SWORD
].otyp
= randartpickaxe();
537 artilist
[ART_HIBERNIA_SKIRIMI
].otyp
= randartpickaxe();
538 artilist
[ART_TSCHUEUU
].otyp
= randartcrossbow();
539 artilist
[ART_PIN_EM_ONCE
].otyp
= randartcrossbow();
540 artilist
[ART_SOUTHERN_CROSS
].otyp
= randartcrossbow();
541 artilist
[ART_SNATCHER
].otyp
= randartshortsword();
542 artilist
[ART_LUX_REGINA
].otyp
= randartflail();
543 artilist
[ART_REGINA_LUX
].otyp
= randartmorningstar();
544 artilist
[ART_HARPOON_OF_TRITON
].otyp
= randarttrident();
545 artilist
[ART_MERCILESS_MARE
].otyp
= randartunihorn();
546 artilist
[ART_CURE_GOOD
].otyp
= randartunihorn();
547 artilist
[ART_ENRAI
].otyp
= randartpolearm();
548 artilist
[ART_PRINCIPIUM_INCERTI
].otyp
= randartpolearm();
549 artilist
[ART_BOW_OF_HERCULES
].otyp
= randartbow();
550 artilist
[ART_BIBLICAL_PLAGUE
].otyp
= randartbow();
551 artilist
[ART_DOLORES__WINNING_STRAT
].otyp
= randartbow();
552 artilist
[ART_GRADIUS
].otyp
= randartshortsword();
553 artilist
[ART_U_TSCHELLI
].otyp
= randartpaddle();
554 artilist
[ART_ZURA_S_DRESSCODE
].otyp
= randartrobe();
555 artilist
[ART_ALTADOON_HERMA_MORA
].otyp
= randartrobe();
556 artilist
[ART_ETERNAL_BAMMELING
].otyp
= randartrobe();
557 artilist
[ART_VIHAT_BAGUETTEN_BUS_STOP
].otyp
= randartclaw();
558 artilist
[ART_UT_RULER
].otyp
= randartsaber();
559 artilist
[ART_BREAD_FOR_THE_WORLD
].otyp
= randartgrinder();
560 artilist
[ART_MANABOOST
].otyp
= randartorb();
561 artilist
[ART_STEEL_ON_STEEL
].otyp
= randartknuckles();
562 artilist
[ART_FIVEONPIN
].otyp
= randartcrossbowbolt();
563 artilist
[ART_D____
].otyp
= randartarrow();
564 artilist
[ART_BE_CONSERVED
].otyp
= randartdart();
565 artilist
[ART_COB_AUTO
].otyp
= randartdart();
566 artilist
[ART_AMHIMITL
].otyp
= randartjavelin();
567 artilist
[ART_REGROWN_RESOURCE
].otyp
= randartjavelin();
568 artilist
[ART_NINJINGY
].otyp
= randartshuriken();
569 artilist
[ART_LET_IT_STAY
].otyp
= randartdragonscales();
570 artilist
[ART_KRAH_HOOOOO
].otyp
= randartdragonscales();
571 artilist
[ART_ICE_FROM_THE_NORTH
].otyp
= randartdragonscales();
572 artilist
[ART_PROTPOW
].otyp
= randartdragonscalemail();
573 artilist
[ART_HA_MONK
].otyp
= randartdragonscalemail();
574 artilist
[ART_CUDDLE_CHALLENGE
].otyp
= randartdragonscalemail();
575 artilist
[ART_PRISMATIC_DRAGON_PLATE
].otyp
= randartdragonscalemail();
576 artilist
[ART_POFFGO
].otyp
= randartdragonscaleshield();
577 artilist
[ART_IT_IS_COMPLETE_NOW
].otyp
= randartdragonscaleshield();
578 artilist
[ART_FROM_MASHHAD_TO_AHVAZ
].otyp
= randartdragonscaleshield();
579 artilist
[ART_DIG__OF_COURSE
].otyp
= randartmattock();
580 artilist
[ART_ZIN_BA
].otyp
= randartsaddle();
581 artilist
[ART_INFINITE_RANGE
].otyp
= randartleash();
583 artilist
[ART_JANA_S_GRAVE_WALL
].otyp
= randartcloakX();
584 artilist
[ART_CLOAK_OF_THE_UNHELD_POTATO
].otyp
= randartcloakX();
585 artilist
[ART_UNBINDALL_CHEAT
].otyp
= randartcloakX();
586 artilist
[ART_FIND_ME_NEVERTHELESS
].otyp
= randartcloakX();
587 artilist
[ART_OLD_PERSON_TALK
].otyp
= randartcloakX();
588 artilist
[ART_HENRIETTA_S_DOGSHIT_BOOTS
].otyp
= randartbootsX();
589 artilist
[ART_GRAVE_ROUSE
].otyp
= randartbootsX();
590 artilist
[ART_FANNY_S_BROOK_THAT_YOU_MIS
].otyp
= randartbootsX();
591 artilist
[ART_IDEAL_BASE
].otyp
= randartbootsX();
592 artilist
[ART_DAT_NIGGA_S_GOT_DA_BLING
].otyp
= randartbootsX();
593 artilist
[ART_BUGBOOTS_OF_ERRORNESS
].otyp
= randartbootsX();
594 artilist
[ART_I_DON_T_PARTICULARLY_LIKE_
].otyp
= randartbootsX();
595 artilist
[ART_HOHO_DINGO
].otyp
= randartbootsX();
596 artilist
[ART_HIGHWAY_FIGHTER
].otyp
= randartbootsX();
597 artilist
[ART_SESDERIRO
].otyp
= randartmeleeweaponX();
598 artilist
[ART_ABSURD_OVERPOWEREDNESS
].otyp
= randartmeleeweaponX();
599 artilist
[ART_CHRISTIAN_SKY
].otyp
= randartmeleeweaponX();
600 artilist
[ART_POTATO_SKY
].otyp
= randartmeleeweaponX();
601 artilist
[ART_IGTOS_CORP__INC_
].otyp
= randartmeleeweaponX();
602 artilist
[ART_FOOTPRINTS_IN_THE_LABYRINT
].otyp
= randartmeleeweaponX();
603 artilist
[ART_GLELDRERAL
].otyp
= randartmeleeweaponX();
604 artilist
[ART_FIREPROOF_WALL
].otyp
= randartmeleeweaponX();
605 artilist
[ART_KHALIM_S_FEMUR
].otyp
= randartmeleeweaponX();
606 artilist
[ART_SPEARBLADE
].otyp
= randartmeleeweaponX();
607 artilist
[ART_EWW_THAT_S_DISGUSTING
].otyp
= randartmeleeweaponX();
608 artilist
[ART_GENDERGENDERGENDER
].otyp
= randartmeleeweaponX();
609 artilist
[ART_GALLOW_DIGS
].otyp
= randartmeleeweaponX();
610 artilist
[ART_RADIATOR_AREA
].otyp
= randartmeleeweaponX();
611 artilist
[ART_JESSICA_S_WINNING_STRIKE
].otyp
= randartmeleeweaponX();
612 artilist
[ART_MARKUS_S_JUSTICE
].otyp
= randartmeleeweaponX();
613 artilist
[ART_KATHARINA_S_MELEE_PROWESS
].otyp
= randartmeleeweaponX();
614 artilist
[ART_LICHBANE
].otyp
= randartmeleeweaponX();
615 artilist
[ART_FORKED_TONGUE
].otyp
= randartmeleeweaponX();
616 artilist
[ART_PROOFINGNESS_POOFS
].otyp
= randartmeleeweaponX();
617 artilist
[ART_ALL_SERIOUSNESS
].otyp
= randartmeleeweaponX();
618 artilist
[ART_KRONSCH_ZADROER_WOFF
].otyp
= randartmeleeweaponX();
619 artilist
[ART_SPECIAL_LACK
].otyp
= randartmeleeweaponX();
620 artilist
[ART_WING_WING
].otyp
= randartmeleeweaponX();
621 artilist
[ART_CARMOUFALSCH
].otyp
= randartspellbookX();
622 artilist
[ART_WIE_ES_AUCH_SEI
].otyp
= randartspellbookX();
623 artilist
[ART_MORTON_THEIRS_OF_RAVEL_RAD
].otyp
= randartspellbookX();
624 artilist
[ART_DEEP_FRIENDS
].otyp
= randartspellbookX();
625 artilist
[ART_HAE_HAE_HIIII
].otyp
= randartspellbookX();
626 artilist
[ART_FOR_MOMMY_EVER_FORSELESSAU
].otyp
= randartspellbookX();
627 artilist
[ART_LAWFIRE
].otyp
= randartspellbookX();
628 artilist
[ART_WAE_WAE_WAE_DAEDELDAEDELDA
].otyp
= randartspellbookX();
629 artilist
[ART_PRESIDENT_SCHIESSKANISTA
].otyp
= randartspellbookX();
630 artilist
[ART_KNBLOELOELOELODRIO
].otyp
= randartspellbookX();
631 artilist
[ART_DESERT_MAID
].otyp
= randartmeleeweaponX();
632 artilist
[ART_CYGNISWAN
].otyp
= randartmeleeweaponX();
633 artilist
[ART_TALKATOR
].otyp
= randartmeleeweaponX();
634 artilist
[ART_TRISMAGISTUS
].otyp
= randartmissileX();
635 artilist
[ART_MAGESOOZE
].otyp
= randartmeleeweaponX();
636 artilist
[ART_RESISTANT_RESISTOR
].otyp
= randartmeleeweaponX();
637 artilist
[ART_VERNON_S_POTTERBASHER
].otyp
= randartmeleeweaponX();
638 artilist
[ART_SCHWOINGELOINGELOING_OOOAR
].otyp
= randartmeleeweaponX();
639 artilist
[ART_GONDOLIN_S_HIDDEN_PASSAGE
].otyp
= randartmeleeweaponX();
640 artilist
[ART_FEMMY_S_LASH
].otyp
= randartmeleeweaponX();
641 artilist
[ART_CASQUE_OUTLOOK
].otyp
= randartmeleeweaponX();
642 artilist
[ART_UNFAIR_PEE
].otyp
= randartmeleeweaponX();
643 artilist
[ART_SEA_CAPTAIN_PIERCER
].otyp
= randartmeleeweaponX();
644 artilist
[ART_END_OF_LOOK_WORSE
].otyp
= randartmeleeweaponX();
645 artilist
[ART_SPACE_BEGINS_AFTER_HERE
].otyp
= randartmeleeweaponX();
646 artilist
[ART_CORINA_S_THUNDER
].otyp
= randartmeleeweaponX();
647 artilist
[ART_INNER_TUBE
].otyp
= randartmeleeweaponX();
648 artilist
[ART_SOLO_SLACKER
].otyp
= randartlauncherX();
649 artilist
[ART_SCENTFUL_PANTY
].otyp
= randartlauncherX();
650 artilist
[ART_AMMO_OF_THE_MACHINE
].otyp
= randartmissileX();
651 artilist
[ART_STREW_ANYWHERE
].otyp
= randartmissileX();
652 artilist
[ART_PIERCETHROUGH
].otyp
= randartmissileX();
653 artilist
[ART_DAE_OE_OE_OE_OE_OE
].otyp
= randartlauncherX();
654 artilist
[ART_CANNONEER
].otyp
= randartlauncherX();
655 artilist
[ART_SPEEDHACK
].otyp
= randartlauncherX();
656 artilist
[ART_RAYSWANDIR
].otyp
= randartquarterstaffX();
657 artilist
[ART_STAFF_OF_INSANITY
].otyp
= randartquarterstaffX();
658 artilist
[ART_ELEMENTAL_STAFF
].otyp
= randartquarterstaffX();
659 artilist
[ART_FRISIA_S_TAIL
].otyp
= randartquarterstaffX();
660 artilist
[ART_MAGE_STAFF_OF_ETERNITY
].otyp
= randartquarterstaffX();
661 artilist
[ART_STAFF_OF_WILD_MAGIC
].otyp
= randartquarterstaffX();
662 artilist
[ART_CELL
].otyp
= randartquarterstaffX();
663 artilist
[ART_LYST_ERG
].otyp
= randartquarterstaffX();
664 artilist
[ART_DROWSING_ROD
].otyp
= randartquarterstaffX();
665 artilist
[ART_PAINBOWSWANDIR
].otyp
= randartbowX();
666 artilist
[ART_KRASCHEEP
].otyp
= randartbowX();
667 artilist
[ART_ARROW_RAIN
].otyp
= randartbowX();
668 artilist
[ART_EARTH_GAS_GUN
].otyp
= randartlauncherX();
669 artilist
[ART_FIRE_ALREADY
].otyp
= randartmissileX();
670 artilist
[ART_HUMAN_WIPEOUT
].otyp
= randartmeleeweaponX();
671 artilist
[ART_ESPECIALLYRANDARM
].otyp
= randartsuitX();
672 artilist
[ART_GO_MIEFTLY_THEN_QUEUE__DAE
].otyp
= randartsuitX();
673 artilist
[ART_SPLINTER_ARMAMENT
].otyp
= randartsuitX();
674 artilist
[ART_BELLY_W
].otyp
= randartsuitX();
675 artilist
[ART_GENDERGENDERGENDERGENDERGE
].otyp
= randartsuitX();
676 artilist
[ART_CHIP_INFACT
].otyp
= randartsuitX();
677 artilist
[ART_AMMY_S_RNG_CHANGER
].otyp
= randartsuitX();
678 artilist
[ART_ADD_THE_MISSING_STAIRCASE
].otyp
= randartsuitX();
679 artilist
[ART_THERE_GOES_SHE_TO
].otyp
= randartsuitX();
680 artilist
[ART_HUNKSTERMAN
].otyp
= randartsuitX();
681 artilist
[ART_DUH_BEWEGEO_ZISCH
].otyp
= randartsuitX();
682 artilist
[ART_SEVEBREAKYOU__SEVEBREAK_
].otyp
= randartsuitX();
683 artilist
[ART_PLANTOPLIM
].otyp
= randartsuitX();
684 artilist
[ART_ELMHERE
].otyp
= randartsuitX();
685 artilist
[ART_LU_NONNAME
].otyp
= randartsuitX();
686 artilist
[ART_ALPHA_TAURI
].otyp
= randartsuitX();
687 artilist
[ART_ABSOLUTE_MONSTER_MAIL
].otyp
= randartsuitX();
688 artilist
[ART_RITA_S_TENDER_STILETTOS
].otyp
= randartbootsX();
689 artilist
[ART_EROTIC_STAT_TRAIN
].otyp
= randartbootsX();
690 artilist
[ART_SPECIAL_ROBUNG
].otyp
= randartrobeX();
691 artilist
[ART_UPPERWEAVER_S_THREAD
].otyp
= randartrobeX();
692 artilist
[ART_CHAOSWEAVER_ROBES
].otyp
= randartrobeX();
693 artilist
[ART_COPE_OF_THE_ELDRITCH_KNIGH
].otyp
= randartrobeX();
694 artilist
[ART_ROBE_OF_CLOSED_EYES
].otyp
= randartrobeX();
695 artilist
[ART_HALF_MOON_TONIGHT
].otyp
= randartcloakX();
696 artilist
[ART_PANTAP
].otyp
= randartcloakX();
697 artilist
[ART_RUTH_S_DARK_FORCE
].otyp
= randarthelmX();
698 artilist
[ART_FIVE_HORNED_HELM
].otyp
= randarthelmX();
699 artilist
[ART_PEOPLE_DUMBING
].otyp
= randarthelmX();
700 artilist
[ART_HELM_OF_THE_ARCANE_ARCHER
].otyp
= randarthelmX();
701 artilist
[ART_MASK_OF_TLALOC
].otyp
= randarthelmX();
702 artilist
[ART_HOW_CAN_ONE_PLEASE_LOOK_LI
].otyp
= randarthelmX();
703 artilist
[ART_WEAR_OFF_THE_DAMN_RNG
].otyp
= randarthelmX();
704 artilist
[ART_REJU_GLUCK_GLUCK_GLUCK_BUG
].otyp
= randarthelmX();
705 artilist
[ART_HAMBURG_ONE
].otyp
= randarthelmX();
706 artilist
[ART_ARABELLA_S_MELEE_POWER
].otyp
= randartmeleeweaponX();
707 artilist
[ART_ASBESTOS_MATERIAL
].otyp
= randartmeleeweaponX();
708 artilist
[ART_DO_NOT_DISPLAY_THE_CHARGES
].otyp
= randartmeleeweaponX();
709 artilist
[ART_TANKS_A_LOT
].otyp
= randartglovesX();
710 artilist
[ART_GHAND
].otyp
= randartglovesX();
711 artilist
[ART_GAUNTLETS_OF_YIN_AND_YANG
].otyp
= randartglovesX();
712 artilist
[ART_DIMVISION
].otyp
= randartglovesX();
713 artilist
[ART_AL_UD
].otyp
= randartshieldX();
714 artilist
[ART_I_M_GETTING_HUNGRY
].otyp
= randartshieldX();
715 artilist
[ART_DNETHACKC_NOONISHNESS
].otyp
= randartshieldX();
716 artilist
[ART_SHIELD_OF_THE_PALADIN
].otyp
= randartshieldX();
717 artilist
[ART_PROTECTION_SET
].otyp
= randartshieldX();
718 artilist
[ART_ALTERNATE_SPELLWEAVE
].otyp
= randartshieldX();
719 artilist
[ART_THATS_ENOUGH_RIGHT_THERE
].otyp
= randartshieldX();
720 artilist
[ART_CASTLE_CRUSH_GLITCH
].otyp
= randartshieldX();
721 artilist
[ART_FETTIS_SLOT
].otyp
= randartshieldX();
722 artilist
[ART_RONDITSCH
].otyp
= randartshieldX();
723 artilist
[ART_OF_NULLING
].otyp
= randartshieldX();
724 artilist
[ART_SUPER_ENERGY_LINES
].otyp
= randartshieldX();
725 artilist
[ART_CCC_CCC_CCCCCCC
].otyp
= randartshieldX();
726 artilist
[ART_FIVE_STAR_PARTY
].otyp
= randartshieldX();
727 artilist
[ART_GUDRUN_S_STOMPING
].otyp
= randartbootsX();
728 artilist
[ART_GOEFFELBOEFFEL
].otyp
= randartbootsX();
729 artilist
[ART_TEMPERATOR
].otyp
= randartbootsX();
730 artilist
[ART_PEWWWWWWW
].otyp
= randartjavelinX();
731 artilist
[ART_VILYA
].otyp
= randartringX();
732 artilist
[ART_RING_OF_STEEL_DRAGON
].otyp
= randartringX();
733 artilist
[ART_MARK_OF_THE_RIGHTFUL_SCION
].otyp
= randartringX();
734 artilist
[ART_STAR_EMPEROR_S_RING
].otyp
= randartringX();
735 artilist
[ART_LOMYA
].otyp
= randartringX();
736 artilist
[ART_GREEN_COLOR
].otyp
= randartringX();
737 artilist
[ART_SCARAB_OF_ADORNMENT
].otyp
= randartringX();
738 artilist
[ART_SCHWUEU
].otyp
= randartamuletX();
739 artilist
[ART_TWIN_EDGE
].otyp
= randartamuletX();
740 artilist
[ART_UNKNOWN_SHELL
].otyp
= randartamuletX();
741 artilist
[ART_CURSE_THE_TIME_SHIFT
].otyp
= randartamuletX();
742 artilist
[ART_YOUR_LUCKY_DAY
].otyp
= randartwandX();
743 artilist
[ART_DIFFUSION_WAVE
].otyp
= randartwandX();
744 artilist
[ART_FULLY_THE_LONG_PENIS
].otyp
= randartwandX();
745 artilist
[ART_WORLD_OF_COQ
].otyp
= randartwandX();
746 artilist
[ART_GIVE_IT_ME_YOUR_WILL
].otyp
= randartimplantX();
747 artilist
[ART_ND_D___N_NDMNN_ND___NDMN_N
].otyp
= randartimplantX();
748 artilist
[ART_WHOOSHZAP
].otyp
= randartwandX();
749 artilist
[ART_CLOUDYBAND
].otyp
= randartshirtX();
750 artilist
[ART_CRIMSON_PLATE
].otyp
= randartshirtX();
751 artilist
[ART_LISE_S_UNDERWEAR
].otyp
= randartshirtX();
752 artilist
[ART_FIRST_THERE_WE_WERE
].otyp
= randartshirtX();
753 artilist
[ART_MENSTRUATION_HURTS
].otyp
= randartshirtX();
754 artilist
[ART_NOW_YOU_MADE_HER_SAD
].otyp
= randartshirtX();
755 artilist
[ART_HA_HA_HA_HA___
].otyp
= randartshirtX();
756 artilist
[ART_GREENTOP
].otyp
= randartshirtX();
757 artilist
[ART_ZANTETSU
].otyp
= randartmeleeweaponX();
758 artilist
[ART_NADJA_S_SILENCE
].otyp
= randartmeleeweaponX();
759 artilist
[ART_A_SWORD_NAMED_SWORD
].otyp
= randartmeleeweaponX();
760 artilist
[ART_HERITAGE_IGNORER
].otyp
= randartmeleeweaponX();
761 artilist
[ART_MIMICBANE
].otyp
= randartmeleeweaponX();
762 artilist
[ART_HAHAHAHAHAHAHAAAAAAAAAAAA
].otyp
= randartmeleeweaponX();
763 artilist
[ART_POISON_PEN_LETTER
].otyp
= randartmeleeweaponX();
764 artilist
[ART_SUNALI_S_SUMMONING_STORM
].otyp
= randartbootsX();
765 artilist
[ART_LIGHT_DAL_I_THALION
].otyp
= randartbootsX();
766 artilist
[ART_FILTHY_PRESS
].otyp
= randartlauncherX();
767 artilist
[ART_MUB_PUH_MUB_DIT_DIT
].otyp
= randartmeleeweaponX();
768 artilist
[ART_DONNNNNNNNNNNNG
].otyp
= randartmeleeweaponX();
769 artilist
[ART_PROVOCATEUR
].otyp
= randartmeleeweaponX();
770 artilist
[ART_FOEOEOEOEOEOEOE
].otyp
= randartlauncherX();
771 artilist
[ART_NEVER_WILL_THIS_BE_USEFUL
].otyp
= randartmeleeweaponX();
772 artilist
[ART_QUARRY
].otyp
= randartsuitX();
773 artilist
[ART_KUSE_MUSE
].otyp
= randartsuitX();
774 artilist
[ART_NOTHING_BUT_FILLER
].otyp
= randartsuitX();
775 artilist
[ART_CONNY_S_COMBAT_COAT
].otyp
= randartcloakX();
776 artilist
[ART_ACIDSHOCK_CASTLECRUSHER
].otyp
= randartcloakX();
777 artilist
[ART_LAURA_S_SWIMSUIT
].otyp
= randartcloakX();
778 artilist
[ART_PROTECT_WHAT_CANNOT_BE_PRO
].otyp
= randartcloakX();
779 artilist
[ART_DOEDOEDOEDOEDOEDOEDOE_TEST
].otyp
= randartcloakX();
780 artilist
[ART_GIRLFUL_FARTING_NOISES
].otyp
= randarthelmX();
781 artilist
[ART_YOU_SEE_HERE_AN_ARTIFACT
].otyp
= randarthelmX();
782 artilist
[ART_NUMB_OR_MAYBE
].otyp
= randartglovesX();
783 artilist
[ART_GLOVES_OF_VESDA
].otyp
= randartglovesX();
784 artilist
[ART_DEAD_SLAM_THE_TIME_SHUT
].otyp
= randartglovesX();
785 artilist
[ART_ANASTASIA_S_UNEXPECTED_ABI
].otyp
= randartbootsX();
786 artilist
[ART_FORMO____
].otyp
= randartbootsX();
787 artilist
[ART_ELIANE_S_SHIN_SMASH
].otyp
= randartbootsX();
788 artilist
[ART_MYSTERIOUS_MAGIC
].otyp
= randartamuletX();
789 artilist
[ART_BAKURETU_KEN
].otyp
= randartamuletX();
790 artilist
[ART_BANGCOCK
].otyp
= randartlauncherX();
791 artilist
[ART_RNG_S_COMPLETION
].otyp
= randartsuitX();
792 artilist
[ART_WEGEO_ACQUA_DE_EISU_FORTE
].otyp
= randartsuitX();
793 artilist
[ART_RNG_S_BEAUTY
].otyp
= randartbootsX();
794 artilist
[ART_RNG_S_SAFEGUARD
].otyp
= randartshieldX();
795 artilist
[ART_CREMATED
].otyp
= randartshieldX();
796 artilist
[ART_BLACK_DARKNESS
].otyp
= randartamuletX();
797 artilist
[ART_FLEECY_GREEN
].otyp
= randartamuletX();
798 artilist
[ART_PEEK
].otyp
= randartmeleeweaponX();
799 artilist
[ART_TAILCUTTER
].otyp
= randartmeleeweaponX();
800 artilist
[ART_WONDER_WATERING_PLACE
].otyp
= randartpotionX();
801 artilist
[ART_MULTIPOT
].otyp
= randartpotionX();
802 artilist
[ART_SECRET_RECIPE
].otyp
= randartscrollX();
803 artilist
[ART_MAPS_TO_PLAY
].otyp
= randartscrollX();
804 artilist
[ART_DESIGN_YOUR_OWN
].otyp
= randartscrollX();
805 artilist
[ART_ULTRALASER
].otyp
= randartscrollX();
806 artilist
[ART_HEAVY_HEAVY_BABE
].otyp
= randartballX();
807 artilist
[ART_KLONG_RIGHT
].otyp
= randartballX();
808 artilist
[ART_GORMALER
].otyp
= randartballX();
809 artilist
[ART_SIYID
].otyp
= randartchainX();
810 artilist
[ART_AXELLE_S_CHAIN
].otyp
= randartchainX();
811 artilist
[ART_JIN_GANG_ZUO
].otyp
= randartchainX();
812 artilist
[ART_HAMSTRUNG_FOUR_SURE
].otyp
= randartchainX();
813 artilist
[ART_RACE_ALONG_THE_HIGHWAY
].otyp
= randartchainX();
814 artilist
[ART_PAWNERMASTER
].otyp
= randartgemX();
815 artilist
[ART_SHINING_ROCK
].otyp
= randartgemX();
816 artilist
[ART_GANTULETS_OF_MISPEALING
].otyp
= randartglovesX();
817 artilist
[ART_SECRET_BOOK_OF_VENOM
].otyp
= randartspellbookX();
818 artilist
[ART_ENCYCLOPEDIA_GALACTICA
].otyp
= randartspellbookX();
819 artilist
[ART_HENRIETTENFORCE
].otyp
= randartlightsaberX();
820 artilist
[ART_RISE_OF_VENTRESS
].otyp
= randartlightsaberX();
821 artilist
[ART_DESANN_S_WRATH
].otyp
= randartlightsaberX();
822 artilist
[ART_DONGOR
].otyp
= randartvenomX();
823 artilist
[ART_STAB_ALL_OVER
].otyp
= randartunihornX();
824 artilist
[ART_HOL_ON_MAN
].otyp
= randartvenomX();
825 artilist
[ART_CHOCKERSHOCKER
].otyp
= randartpolearmX();
826 artilist
[ART_CAT_S_TAIL
].otyp
= randartpolearmX();
827 artilist
[ART_POWER_POLE
].otyp
= randartpolearmX();
828 artilist
[ART_BALANCE_PSEUDOSHIELD
].otyp
= randartquarterstaffX();
829 artilist
[ART_STAFF_OF_ROT
].otyp
= randartquarterstaffX();
830 artilist
[ART_STAFF_OF_THE_ARCHMAGIGI
].otyp
= randartquarterstaffX();
831 artilist
[ART_BLU_TOE
].otyp
= randartorbX();
832 artilist
[ART_GIGANTIC_SUN
].otyp
= randartorbX();
833 artilist
[ART_POSSO_CONTINUARE_LATERALE
].otyp
= randartorbX();
834 artilist
[ART_SCHWI_SCHWI
].otyp
= randartorbX();
835 artilist
[ART_MR__AHLBLOW_S_SIGNAGE
].otyp
= randartorbX();
836 artilist
[ART_UNSTOPPABLE
].otyp
= randartcrossbowX();
837 artilist
[ART_EVERCONSUMING_HELLFIRE
].otyp
= randartcrossbowX();
838 artilist
[ART_HEAVY_CROSSBOW_OF_ETERNITY
].otyp
= randartcrossbowX();
839 artilist
[ART_CROSSBOW_OF_THE_GNOLL_LORD
].otyp
= randartcrossbowX();
840 artilist
[ART_HOWLING_FLAIL
].otyp
= randartflailX();
841 artilist
[ART_MACE_OF_ORCUS
].otyp
= randartmaceX();
842 artilist
[ART_MACE_OF_THE_EVANGELIST
].otyp
= randartmaceX();
843 artilist
[ART_UNWIELDYTINE
].otyp
= randarttridentX();
844 artilist
[ART_LOGGERS_S_OVERKILL
].otyp
= randarttridentX();
845 artilist
[ART_POSEIDON_S_TRIDENT
].otyp
= randarttridentX();
846 artilist
[ART_TURVANG_S_THUNDER
].otyp
= randarthammerX();
847 artilist
[ART_GAIA_HAMMER
].otyp
= randarthammerX();
848 artilist
[ART_FORGE_HAMMER_OF_THE_ARTIFI
].otyp
= randarthammerX();
849 artilist
[ART_HAVING_HAMMA
].otyp
= randarthammerX();
850 artilist
[ART_SLAM_SHUT_AND_BE_DONE
].otyp
= randarthammerX();
851 artilist
[ART_OGRE_POWER
].otyp
= randarthammerX();
852 artilist
[ART_MORTALITY_DIAL
].otyp
= randartmaceX();
853 artilist
[ART_ARK_OF_THE_COVENANT
].otyp
= randartpickaxeX();
854 artilist
[ART_MFFAP
].otyp
= randartpickaxeX();
855 artilist
[ART_NOTHING_FOR_IT
].otyp
= randartpickaxeX();
856 artilist
[ART_REPAIR_YOUR_BRAIN
].otyp
= randartpickaxeX();
857 artilist
[ART_FAMOUS_LANCE
].otyp
= randartlanceX();
858 artilist
[ART_HOLY_RANCE
].otyp
= randartlanceX();
859 artilist
[ART_SERPENT_RING_OF_SET
].otyp
= randartringX();
860 artilist
[ART_HOLY_GRAIL
].otyp
= randartquarterstaffX();
861 artilist
[ART_LIBRA_OF_JUSTICE
].otyp
= randartflailX();
862 artilist
[ART_TENRAI
].otyp
= randartspearX();
863 artilist
[ART_QUIXOTIC_SPIRIT
].otyp
= randartlanceX();
864 artilist
[ART_GODAWFUL_ENCHANTMENT
].otyp
= randartclubX();
865 artilist
[ART_LOG_OF_THE_CURATOR
].otyp
= randartclubX();
866 artilist
[ART_FULLY_ON_IT
].otyp
= randartclubX();
867 artilist
[ART_PULVERIZE_EM
].otyp
= randartclubX();
868 artilist
[ART_AQUARHAPSODY
].otyp
= randartbowX();
869 artilist
[ART_FIRE_SOUL
].otyp
= randartshortswordX();
870 artilist
[ART_DIABLO_S_LBOD
].otyp
= randartshortswordX();
871 artilist
[ART_TERROR_DROP
].otyp
= randartshortswordX();
872 artilist
[ART_DAEFAROTH
].otyp
= randartdaggerX();
873 artilist
[ART_DAGGER_SURROUNDED_BY_WIND
].otyp
= randartdaggerX();
874 artilist
[ART_THIN_DAGGER
].otyp
= randartdaggerX();
875 artilist
[ART_FERRUM_D
].otyp
= randartdaggerX();
876 artilist
[ART_GEB_ME_ALL_YOUR_MONEY
].otyp
= randartdaggerX();
877 artilist
[ART_NOCLAF
].otyp
= randartscimitarX();
878 artilist
[ART_BLUE_CORSAR_SWIMMING
].otyp
= randartscimitarX();
879 artilist
[ART_FONLAUSCHI
].otyp
= randartpolearmX();
880 artilist
[ART_RANKIS
].otyp
= randartpolearmX();
881 artilist
[ART_SOUL_REAPER
].otyp
= randartpolearmX();
882 artilist
[ART_DOOMSDAY_HALBERD
].otyp
= randartpolearmX();
883 artilist
[ART_VOID_SCYTHE
].otyp
= randartpolearmX();
884 artilist
[ART_AVAL_N
].otyp
= randartscimitarX();
885 artilist
[ART_EUTATS_ENOTS
].otyp
= randartaxeX();
886 artilist
[ART_AXE_OF_DESTRUCTION
].otyp
= randartaxeX();
887 artilist
[ART_FUNE_NO_IKARI
].otyp
= randartaxeX();
888 artilist
[ART_BRAINSTORM
].otyp
= randartflailX();
889 artilist
[ART_NO_MOON_AT_ALL
].otyp
= randartflailX();
890 artilist
[ART_POLARIS
].otyp
= randartmorningstarX();
891 artilist
[ART_HAXORTROLL
].otyp
= randartmorningstarX();
892 artilist
[ART_SONICBOOM_BABY__LET_S_DO_T
].otyp
= randartmorningstarX();
893 artilist
[ART_GO_FULLY_OFF
].otyp
= randartmorningstarX();
894 artilist
[ART_FLAMESNIPER
].otyp
= randartbowX();
895 artilist
[ART_SHAKING_BOW
].otyp
= randartbowX();
896 artilist
[ART_BOW_SURROUNDED_BY_WIND
].otyp
= randartbowX();
897 artilist
[ART_THUNDERBIRD
].otyp
= randartboomerangX();
898 artilist
[ART_STELLARIS_MATERIA
].otyp
= randartshortswordX();
899 artilist
[ART_ATLACH_NACHA
].otyp
= randartscimitarX();
900 artilist
[ART_KEMONONOYARI
].otyp
= randartspearX();
901 artilist
[ART_MONS_INFERNALIS_X_
].otyp
= randartspearX();
902 artilist
[ART_NIUR_KRAD
].otyp
= randartpolearmX();
903 artilist
[ART_ARM_OF_OLYMPIA
].otyp
= randartspearX();
904 artilist
[ART_KAZAANA
].otyp
= randartglovesX();
905 artilist
[ART_GAUNTLETS_OF_THE_HEALING_H
].otyp
= randartglovesX();
906 artilist
[ART_GAUNTLETS_OF_THE_BERSERKER
].otyp
= randartglovesX();
907 artilist
[ART_UNKNOWINGNESS_AS_A_WEAPON
].otyp
= randartglovesX();
908 artilist
[ART_VIOLENT_SKULL_SWORD
].otyp
= randartlongswordX();
909 artilist
[ART_SWORD_THAT_ENDS_ALL
].otyp
= randartlongswordX();
910 artilist
[ART_PURE_BLACK_DIABLO
].otyp
= randartlongswordX();
911 artilist
[ART_LONG_SWORD_OF_ETERNITY
].otyp
= randartlongswordX();
912 artilist
[ART_HOLY_MOONLIGHT_SWORD
].otyp
= randartlongswordX();
913 artilist
[ART_GAUGE_REDUCE
].otyp
= randartlongswordX();
914 artilist
[ART_GLAMDRING__CHINESE_BOOTLEG
].otyp
= randartlongswordX();
915 artilist
[ART_GIANTCRUSHER
].otyp
= randartlongswordX();
916 artilist
[ART_M__M__M_
].otyp
= randartpaddleX();
917 artilist
[ART_ASS_ASS_IN_ASS
].otyp
= randartclawX();
918 artilist
[ART_VILEA_S_SECRET
].otyp
= randartclawX();
919 artilist
[ART_SUPERSTAB
].otyp
= randartclawX();
920 artilist
[ART_VORPAL_RULER
].otyp
= randartsaberX();
921 artilist
[ART_VENERATION_SABRE
].otyp
= randartsaberX();
922 artilist
[ART_BLOOD_SMEARED_SAW
].otyp
= randartgrinderX();
923 artilist
[ART_NAIL_IMPACT
].otyp
= randartknucklesX();
924 artilist
[ART_SIGMUND_S_SMALL_LOAD
].otyp
= randartcrossbowboltX();
925 artilist
[ART_FLAI_AWEI
].otyp
= randartarrowX();
926 artilist
[ART_CREAMRES
].otyp
= randartslingX();
927 artilist
[ART_FLIUFLIUFLIUUUUUUU_
].otyp
= randartdartX();
928 artilist
[ART_DART_OF_THE_ASSASSIN
].otyp
= randartdartX();
929 artilist
[ART_CAPAUER
].otyp
= randartshurikenX();
930 artilist
[ART_ETERNALE_DELAY
].otyp
= randartmattockX();
931 artilist
[ART_TWISTED_TURN
].otyp
= randartknifeX();
932 artilist
[ART_MCCAULEY_S_INTELLIGENCE
].otyp
= randartbroadswordX();
933 artilist
[ART_SUPERDRAGONBANE
].otyp
= randartbroadswordX();
934 artilist
[ART_MCCAULEY_S_ARGUMENT
].otyp
= randartshortswordX();
935 artilist
[ART_SWORD_OF_THE_KLEPTOMANIAC
].otyp
= randartshortswordX();
936 artilist
[ART_ASHIKAGA_S_REVENGE
].otyp
= randarttwohandedswordX();
937 artilist
[ART_TWO_EDGED_GREAT_SWORD
].otyp
= randarttwohandedswordX();
938 artilist
[ART_DARK_CLAYMORE
].otyp
= randarttwohandedswordX();
939 artilist
[ART_TSCHAPSNAP
].otyp
= randartwhipX();
940 artilist
[ART_MAGYAR_IDEA
].otyp
= randartwhipX();
941 artilist
[ART_TRUSTY_ADVENTURER_S_WHIP
].otyp
= randartwhipX();
942 artilist
[ART_NEEDLESSLY_MEAN
].otyp
= randartwhipX();
943 artilist
[ART_MOUNT_BOND
].otyp
= randartsaddleX();
944 artilist
[ART_SADDLE_OF_BRYNHILDR
].otyp
= randartsaddleX();
945 artilist
[ART_ANNOYING_PET_MONITOR
].otyp
= randartleashX();
947 artilist
[ART_ELLI_S_PSEUDOBAND_OF_POS
].otyp
= randartmeleeweaponX();
949 artilist
[ART_IGTOS_CORP__INC_
].attk
.adtyp
= randartiattacktype();
950 artilist
[ART_IGTOS_CORP__INC_
].attk
.damn
= rnd(8);
951 artilist
[ART_IGTOS_CORP__INC_
].attk
.damd
= rnd(8);
953 artilist
[ART_POSTSCHEME_M
].attk
.adtyp
= randartiattacktype();
954 artilist
[ART_POSTSCHEME_M
].attk
.damn
= rnd(11);
955 artilist
[ART_POSTSCHEME_M
].attk
.damd
= rnd(15);
957 init_appearance_randarts();
961 /* "appearance randarts" are those supposed to have a specific randomized appearance, usually armor pieces, by Amy
962 * these will need to be reset if amnesia or appearance shuffling causes the appearances of such items to be re-randomized,
963 * otherwise none of them will have the proper random appearance for the rest of the game as soon as one such shuffling
964 * incident happens! */
966 init_appearance_randarts()
969 artilist
[ART_HIGHEST_FEELING
].otyp
= find_fetish_heels();
970 artilist
[ART_VORPAL_HEELS
].otyp
= find_fetish_heels();
971 artilist
[ART_LORSKEL_S_INTEGRITY
].otyp
= find_lolita_boots();
973 artilist
[ART_PHANTOM_OF_THE_OPERA
].otyp
= find_opera_cloak();
974 artilist
[ART_HIGH_DESIRE_OF_FATALITY
].otyp
= find_explosive_boots();
975 artilist
[ART_CHOICE_OF_MATTER
].otyp
= find_irregular_boots();
976 artilist
[ART_MELISSA_S_BEAUTY
].otyp
= find_wedge_boots();
977 artilist
[ART_CORINA_S_SNOWY_TREAD
].otyp
= find_skates3();
978 artilist
[ART_NUMBER___
].otyp
= find_aluminium_helmet();
979 artilist
[ART_HAUNTNIGHT
].otyp
= find_ghostly_cloak();
980 artilist
[ART_LORSKEL_S_SPECIAL_PROTECTI
].otyp
= find_polnish_gloves();
981 artilist
[ART_VULTUREHANDLER
].otyp
= find_falconry_gloves();
982 artilist
[ART_MOUNTAIN_FISTS
].otyp
= find_fencing_gloves();
983 artilist
[ART_STORMING_FISTS
].otyp
= find_critical_gloves();
984 artilist
[ART_TECH_OF_X
].otyp
= find_latex_gloves();
985 artilist
[ART_ROBBERY_GONE_RIGHT
].otyp
= find_polnish_gloves();
986 artilist
[ART_JOSEFINE_S_EVILNESS
].otyp
= find_velcro_boots();
987 artilist
[ART_WHINY_MARY
].otyp
= find_clumsy_gloves();
988 artilist
[ART_WARP_SPEED
].otyp
= find_fin_boots();
989 artilist
[ART_LOIS_S_CHILL
].otyp
= find_winter_boots();
990 artilist
[ART_ISHITA_S_OVERWHELMING
].otyp
= find_petrified_cloak();
991 artilist
[ART_PECTORAL_HEEL
].otyp
= find_fin_boots();
992 artilist
[ART_GRENEUVENIA_S_HUG
].otyp
= find_profiled_boots();
993 artilist
[ART_SHELLY
].otyp
= find_void_cloak();
994 artilist
[ART_SPREAD_YOUR_LEGS_WIDE
].otyp
= find_grey_shaded_gloves();
995 artilist
[ART_GREEB
].otyp
= find_weeb_cloak();
996 artilist
[ART_PRINCE_OF_PERSIA
].otyp
= find_persian_boots();
997 artilist
[ART_SHE_S_NOT_FORGOTTEN
].otyp
= find_terrible_boots();
998 artilist
[ART_ANASTASIA_S_PLAYFULNESS
].otyp
= find_hugging_boots();
999 artilist
[ART_KATIE_MELUA_S_FEMALE_WEAPO
].otyp
= find_fleecy_boots();
1000 artilist
[ART_LISSIE_S_SHEAGENTUR
].otyp
= find_fleecy_boots();
1001 artilist
[ART_COCKUETRY
].otyp
= find_fingerless_gloves();
1002 artilist
[ART_PERCENTIOEOEPSPERCENTD_THI
].otyp
= find_mantle_of_coat();
1003 artilist
[ART_PEEPING_GROOVE
].otyp
= find_fatal_gloves();
1004 artilist
[ART_TURN_INTO_THE_NORM
].otyp
= find_leather_gloves();
1005 artilist
[ART_RARE_ASIAN_LADY
].otyp
= find_beautiful_heels();
1006 artilist
[ART_JANA_S_FAIRNESS_CUP
].otyp
= find_homicidal_cloak();
1007 artilist
[ART_OUT_OF_TIME
].otyp
= find_castlevania_boots();
1008 artilist
[ART_KATHERINE_S_BEACHWEAR
].otyp
= find_tankini();
1009 artilist
[ART_PALEOLITHIC_ELBOW_CONTRACT
].otyp
= find_greek_cloak();
1010 artilist
[ART_NUCLEAR_BOMB
].otyp
= find_celtic_helmet();
1011 artilist
[ART_HABIBA_S_MATRONAGE
].otyp
= find_hardcore_cloth();
1012 artilist
[ART_BEEEEEEEANPOLE
].otyp
= find_english_gloves();
1013 artilist
[ART_LEGMA
].otyp
= find_korean_sandals();
1014 artilist
[ART_BRITTA_S_MURDER_STORY
].otyp
= find_sling_pumps();
1015 artilist
[ART_TERRY_PRATCHETT_S_INGENUIT
].otyp
= find_octarine_robe();
1016 artilist
[ART_DERANDERGRAAA
].otyp
= find_faceless_robe();
1017 artilist
[ART_ARABELLA_S_SEXY_GIRL_BUTT
].otyp
= find_chinese_cloak();
1018 artilist
[ART_LONG_LASTING_JOY
].otyp
= find_polyform_cloak();
1019 artilist
[ART_LIGHT_ABSORPTION
].otyp
= find_absorbing_cloak();
1020 artilist
[ART_CATHERINE_S_SEXUALITY
].otyp
= find_birthcloth();
1021 artilist
[ART_POKEWALKER
].otyp
= find_poke_mongo_cloak();
1022 artilist
[ART_WINDS_OF_CHANGE
].otyp
= find_levuntation_cloak();
1023 artilist
[ART_LIGHTSPEED_TRAVEL
].otyp
= find_quicktravel_cloak();
1024 artilist
[ART_T_O_M_E
].otyp
= find_angband_cloak();
1025 artilist
[ART_FEMMY_FATALE
].otyp
= find_anorexia_cloak();
1026 artilist
[ART_ARTIFICIAL_FAKE_DIFFICULTY
].otyp
= find_dnethack_cloak();
1027 artilist
[ART_JUNETHACK______WINNER
].otyp
= find_team_splat_cloak();
1028 artilist
[ART_YOG_SOTHOTH_HELP_ME
].otyp
= find_eldritch_cloak();
1029 artilist
[ART_TOMORROW_WENDY_S_CHOICENA
].otyp
= find_deadly_cloak();
1030 artilist
[ART_LUISA_S_IRRESISTIBLE_CHARM
].otyp
= find_erotic_boots();
1031 artilist
[ART_JANA_S_DECEPTIVE_MASK
].otyp
= find_secret_helmet();
1032 artilist
[ART_NOW_IT_BECOMES_DIFFERENT
].otyp
= find_difficult_cloak();
1033 artilist
[ART_NATASCHA_S_STROKING_UNITS
].otyp
= find_velvet_gloves();
1034 artilist
[ART_SPEAK_TO_OJ
].otyp
= find_sputa_boots();
1035 artilist
[ART_DUE_DUE_DUE_DUE_BRMMMMMMM
].otyp
= find_formula_one_helmet();
1036 artilist
[ART_TOILET_NOISES
].otyp
= find_excrement_cloak();
1037 artilist
[ART_LINE_CAN_PLAY_BY_YOURSELF
].otyp
= find_racer_gloves();
1038 artilist
[ART_TOO_FAST__TOO_FURIOUS
].otyp
= find_turbo_boots();
1039 artilist
[ART_NOUROFIBROMA
].otyp
= find_guild_cloak();
1040 artilist
[ART_MADELINE_S_STUPID_GIRL
].otyp
= find_shitty_gloves();
1041 artilist
[ART_ELARA_S_AGILITY
].otyp
= find_dextrous_gloves();
1042 artilist
[ART_GET_THE_BUC_K_
].otyp
= find_buckloak();
1043 artilist
[ART_ARVOGENIA_S_BIKER_HEELS
].otyp
= find_stone_carved_heels();
1044 artilist
[ART_EI_KEN_WOOK_WIF_DIS
].otyp
= find_stupid_stilettos();
1045 artilist
[ART_PRECURSOR_TO_THE___
].otyp
= find_homo_shoes();
1046 artilist
[ART_HEELMARJI
].otyp
= find_devil_lettuce_shoes();
1047 artilist
[ART_SHE_S_STILL_AN_ANASTASIA
].otyp
= find_loafers();
1048 artilist
[ART_KILLCAP
].otyp
= find_sweaty_shoes();
1049 artilist
[ART_KATHARINA_S_SIGH
].otyp
= find_white_buffalo_boots();
1050 artilist
[ART_THICK_PLATFORM_CRAZE
].otyp
= find_white_buffalo_boots();
1051 artilist
[ART_SASSY_JULIA
].otyp
= find_sister_shoes();
1052 artilist
[ART_POCAHONTAS_HOME
].otyp
= find_sister_shoes();
1053 artilist
[ART_SOFT_ON_THE_CLOUD
].otyp
= find_sister_shoes();
1054 artilist
[ART_WIDEFORCE_GRIP
].otyp
= find_hooked_gloves();
1055 artilist
[ART_HEME_FLOW
].otyp
= find_bladed_disks();
1056 artilist
[ART_CRUSH_THE_OPPOSITION
].otyp
= find_atlas_gloves();
1057 artilist
[ART_JURE_DE_LO
].otyp
= find_speedy_gloves();
1058 artilist
[ART_CHEATER_S_PROSPERING
].otyp
= find_air_cloak();
1059 artilist
[ART_EREA_S_HERITAGE
].otyp
= find_vindale_cloak();
1060 artilist
[ART_ALIEN_MINDWAVE
].otyp
= find_23_helmet();
1061 artilist
[ART_REVELATION____VERSE__
].otyp
= find_a_heels();
1062 artilist
[ART_GLENCHECK_EATING
].otyp
= find_alligator_pumps();
1063 artilist
[ART_KLOCKING_NOISE
].otyp
= find_hammer_shoes();
1064 artilist
[ART_SABRINA_S_FREEDOM
].otyp
= find_platform_fleecies();
1065 artilist
[ART_EVIL_HAIRTEAR
].otyp
= find_platform_fleecies();
1066 artilist
[ART_SANDRA_S_MEGAPOWER
].otyp
= find_retractable_block_heels();
1067 artilist
[ART_WELL__MIGHT_AS_WELL_WEAR_T
].otyp
= find_instafeminism_shoes();
1069 artilist
[ART_IRIS_S_HIDDEN_ALLERGY
].otyp
= find_silver_stilettos();
1070 artilist
[ART_IRIS_S_SECRET_VULNERABILIT
].otyp
= find_echo_helmet();
1071 artilist
[ART_IRIS_S_UNREVEALED_LOVE
].otyp
= find_demonic_cloak();
1072 artilist
[ART_IRIS_S_FAVORED_MATERIAL
].otyp
= find_spiky_gloves();
1074 artilist
[ART_IRMA_S_CHOICE
].otyp
= find_copper_stilettos();
1075 artilist
[ART_EVERLASTING_HEELS
].otyp
= find_diamond_stilettos();
1076 artilist
[ART_HEIKE_S_BIGOTRY
].otyp
= find_heeled_hugging_boots();
1077 artilist
[ART_ADORNING_BUNDLE
].otyp
= find_cosmetic_helmet();
1078 artilist
[ART_GO_ON_A_SURVEY_RECREATION
].otyp
= find_warning_coat();
1079 artilist
[ART_GIVE_US_TODAY_OUR_DAILY_GA
].otyp
= find_bamboo_cloak();
1080 artilist
[ART_JANA_S_ROULETTE_OF_LIFE
].otyp
= find_foundry_cloak();
1081 artilist
[ART_MAGIC_JUGGULATE
].otyp
= find_spellsucking_cloak();
1082 artilist
[ART_HIGH_KING_OF_SKIRIM
].otyp
= find_storm_coat();
1083 artilist
[ART_ALLCOLOR_PRISM
].otyp
= find_fleeceling_cloak();
1084 artilist
[ART_MARY_INSCRIPTION
].otyp
= find_princess_gloves();
1085 artilist
[ART_FATHIEN_ELDER_S_SECRET_POW
].otyp
= find_uncanny_gloves();
1086 artilist
[ART_SI_OH_WEE
].otyp
= find_slaying_gloves();
1087 artilist
[ART_JOHANETTA_S_ROUGH_GENTLENE
].otyp
= find_blue_sneakers();
1088 artilist
[ART_JANA_S_VAGINAL_FUN
].otyp
= find_blue_sneakers();
1089 artilist
[ART_VERY_NICE_PERSON
].otyp
= find_femmy_boots();
1090 artilist
[ART_JULIA_S_REAL_LOVE
].otyp
= find_red_sneakers();
1091 artilist
[ART_ELIANE_S_COMBAT_SNEAKERS
].otyp
= find_yellow_sneakers();
1092 artilist
[ART_MAILIE_S_CHALLENGE
].otyp
= find_pink_sneakers();
1093 artilist
[ART_MERLOT_FUTURE
].otyp
= find_skates4();
1094 artilist
[ART_MADELEINE_S_GIRL_FOOTSTEPS
].otyp
= find_calf_leather_sandals();
1095 artilist
[ART_RUTH_S_MORTAL_ENEMY
].otyp
= find_velcro_sandals();
1096 artilist
[ART_LARISSA_S_ANGER
].otyp
= find_buffalo_boots();
1097 artilist
[ART_PRETTY_ROOMMAID
].otyp
= find_heroine_mocassins();
1098 artilist
[ART_ALISEH_S_RED_COLOR
].otyp
= find_lolita_boots();
1099 artilist
[ART_KATIE_MELUA_S_FLEECINESS
].otyp
= find_weapon_light_boots();
1100 artilist
[ART_SHARP_EDGED_AND_DANGEROUS
].otyp
= find_weapon_light_boots();
1101 artilist
[ART_ELONA_S_SNAIL_TRAIL
].otyp
= find_rubynus_helmet();
1102 artilist
[ART_LORENZI_S_CLEANING_RESIDUE
].otyp
= find_everlasting_boots();
1104 artilist
[ART_ARABELLA_S_WEAPON_STORAGE
].otyp
= find_cursed_called_cloak();
1105 artilist
[ART_KYS_YOURSELF
].otyp
= find_fourchan_cloak();
1106 artilist
[ART_INA_S_SORROW
].otyp
= find_inalish_cloak();
1107 artilist
[ART_WHY_NOT_DO_THE_REAL_THING
].otyp
= find_grunter_helmet();
1108 artilist
[ART_CLAUDIA_S_SEXY_SCENT
].otyp
= find_cloudy_helmet();
1109 artilist
[ART_VACUUM_CLEANER_DEATH
].otyp
= find_breath_control_helmet();
1110 artilist
[ART_NYPHERISBANE
].otyp
= find_gas_mask();
1111 artilist
[ART_CHRISTMAS_MEDAL
].otyp
= find_sages_helmet();
1112 artilist
[ART_LONGEST_RAY
].otyp
= find_rayductnay_gloves();
1113 artilist
[ART_ENDORPHIC_SCRATCHING
].otyp
= find_orgasm_pumps();
1114 artilist
[ART_SONJA_S_TORN_SOUL
].otyp
= find_worn_out_sneakers();
1115 artilist
[ART_RUEA_S_FAILED_CONVERSION
].otyp
= find_noble_sandals();
1116 artilist
[ART_HAWAIIAN_KAMEHAMEHA
].otyp
= find_doctor_claw_boots();
1117 artilist
[ART_LARISSA_S_GENTLE_SLEEP
].otyp
= find_feelgood_heels();
1118 artilist
[ART_STEFANJE_S_PROBLEM
].otyp
= find_plof_heels();
1119 artilist
[ART_MALENA_S_LADYNESS
].otyp
= find_princess_pumps();
1120 artilist
[ART_ELEVECULT
].otyp
= find_ballet_heels();
1121 artilist
[ART_SHIT_KICKERS
].otyp
= find_steel_toed_boots();
1122 artilist
[ART_SARAH_S_GRANNY_WEAR
].otyp
= find_marji_shoes();
1123 artilist
[ART_CLICHE_WEAR
].otyp
= find_mary_janes();
1124 artilist
[ART_YVONNE_S_MODEL_AMBITION
].otyp
= find_velvet_pumps();
1125 artilist
[ART_BRIGHT_AURORA
].otyp
= find_not_slowing_down_boots();
1127 artilist
[ART_BOWSER_S_FUN_ARENA
].otyp
= find_volcanic_cloak();
1128 artilist
[ART_BILLS_PAID
].otyp
= find_fuel_cloak();
1129 artilist
[ART_FINDING_THYSELF
].otyp
= find_cloister_cloak();
1130 artilist
[ART_GUNNEM_DOWN
].otyp
= find_quantity_cloak();
1131 artilist
[ART_GOODFOOD
].otyp
= find_quantity_cloak();
1132 artilist
[ART_SALADIN_S_DESERT_FOX
].otyp
= find_shemagh();
1133 artilist
[ART_JAMILA_S_BELIEF
].otyp
= find_shemagh();
1134 artilist
[ART_SLIPPING_SUCKING
].otyp
= find_serrated_helmet();
1135 artilist
[ART_INERT_GREAVES
].otyp
= find_thick_boots();
1136 artilist
[ART_DESERT_MEDITATION
].otyp
= find_sand_als();
1137 artilist
[ART_GORGEOUS_VEIL_MODEL
].otyp
= find_shadowy_heels();
1138 artilist
[ART_SUBLEVEL_FLOODING
].otyp
= find_weight_attachment_boots();
1139 artilist
[ART_USE_THE_NORMALNESS_TURNS
].otyp
= find_fungal_sandals();
1140 artilist
[ART_UNFELLABLE_TREE
].otyp
= find_standing_footwear();
1142 artilist
[ART_CARMARK
].otyp
= find_business_shoes();
1143 artilist
[ART_ANITA_S_RASHLUST
].otyp
= find_filigree_stilettos();
1144 artilist
[ART_JONADAB_S_EVERYDAY_WEAR
].otyp
= find_ugly_boots();
1145 artilist
[ART_AMATEURSPORTS
].otyp
= find_unisex_pumps();
1146 artilist
[ART_RONJA_S_FEMALE_PUSHING
].otyp
= find_cuddle_cloth_boots();
1147 artilist
[ART_SNAILHUNT
].otyp
= find_garden_slippers();
1148 artilist
[ART_ANTJE_S_POWERSTRIDE
].otyp
= find_dyke_boots();
1149 artilist
[ART_NADINE_S_CUTENESS
].otyp
= find_ankle_strap_sandals();
1150 artilist
[ART_MARJI_JANA
].otyp
= find_ankle_boots();
1152 artilist
[ART_AMPERSAND_HAREM
].otyp
= find_demonologist_boots();
1153 artilist
[ART_DIP_DIVE
].otyp
= find_mud_boots();
1154 artilist
[ART_MANDY_S_RAIDWEAR
].otyp
= find_failed_shoes();
1155 artilist
[ART_PHANTO_S_RETARDEDNESS
].otyp
= find_opera_pumps();
1156 artilist
[ART_CLAUDIA_S_SELF_WILL
].otyp
= find_wooden_clogs();
1157 artilist
[ART_FASTER_THAN_ALL_OTHERS_INT
].otyp
= find_regular_sneakers();
1158 artilist
[ART_RUTH_S_UNDEAD_INLAY
].otyp
= find_elite_sneakers();
1159 artilist
[ART_KRAWASAKI_STEERER
].otyp
= find_biker_boots();
1160 artilist
[ART_UPWARD_HEELS
].otyp
= find_zero_drop_shoes();
1161 artilist
[ART_LUDGERA_S_SECRET_COURSE
].otyp
= find_hiking_boots();
1162 artilist
[ART_THERE_ARE_SEVERAL_OF_THEM
].otyp
= find_pope_hat();
1163 artilist
[ART_FOOTBALL_MASK
].otyp
= find_corona_mask();
1164 artilist
[ART_FFP___MASK
].otyp
= find_corona_mask();
1165 artilist
[ART_ACU_BECOME_HAVE
].otyp
= find_anachro_helmet();
1166 artilist
[ART_PRIESTEST_BLESS
].otyp
= find_ornamental_cope();
1167 artilist
[ART_SATAN_S_SUGGESTION
].otyp
= find_wetsuit();
1168 artilist
[ART_EGASSO_S_GIBBERISH
].otyp
= find_multilinguitis_gloves();
1169 artilist
[ART_SANDALS_OF_JESUS_CHRIST
].otyp
= find_throwaway_sandals();
1170 artilist
[ART_ARTHUR_S_HIGH_HEELED_PLATF
].otyp
= find_sharp_edged_sandals();
1171 artilist
[ART_GREEN_THUMB
].otyp
= find_nondescript_gloves();
1172 artilist
[ART_GEAVY_GREAVES
].otyp
= find_lead_boots();
1173 artilist
[ART_PERMINANT_INCREASE
].otyp
= find_machinery_boots();
1174 artilist
[ART_WHINY_TEACHER_INSIDE_WOMAN
].otyp
= find_christmas_child_mode_boots();
1175 artilist
[ART_NOW_YOU_LOOK_LIKE_A_BEGGAR
].otyp
= find_sandals_with_socks();
1176 artilist
[ART_ANJA_S_WIDE_FIELD
].otyp
= find_wedge_sneakers();
1177 artilist
[ART_U_BE_CURRY
].otyp
= find_barefoot_shoes();
1178 artilist
[ART_H__S_GANGSTER_KICKS
].otyp
= find_exceptional_sneakers();
1179 artilist
[ART_TOO_OLD_MODEL
].otyp
= find_blockchoc_boots();
1180 artilist
[ART_ELENA_S_COMPETITION
].otyp
= find_block_heeled_boots();
1181 artilist
[ART_DAMPENER
].otyp
= find_platform_sneakers();
1182 artilist
[ART_MAY_BRITT_S_ADULTHOOD
].otyp
= find_iceblock_heels();
1183 artilist
[ART_LYDIA_S_SEXYROOM
].otyp
= find_paragraph_shoes();
1184 artilist
[ART_SHARPSPIKE
].otyp
= find_paragraph_sandals();
1185 artilist
[ART_WEDDING_CHALLENGE
].otyp
= find_bridal_shoes();
1186 artilist
[ART_ANACONDA_HEELS
].otyp
= find_pistol_boots();
1187 artilist
[ART_JANA_S_DEVIOUSNESS
].otyp
= find_ng_shoes();
1188 artilist
[ART_PLAYING_ANASTASIA
].otyp
= find_chelsea_boots();
1189 artilist
[ART_JASIEEN_S_FEAR
].otyp
= find_wedge_espadrilles();
1190 artilist
[ART_SHE_REALLY_LIKES_IT
].otyp
= find_treaded_heels();
1191 artilist
[ART_SOARUP
].otyp
= find_higher_helmet();
1192 artilist
[ART_GODLY_POSTMAN
].otyp
= find_winged_sandals();
1193 artilist
[ART_SUCH_A_LOVELY_SHARK
].otyp
= find_remora_heels();
1194 artilist
[ART_SPFLOTCH__HAHAHAHAHA_
].otyp
= find_heeled_chelsea_boots();
1195 artilist
[ART_CLAUDIA_S_BEAUTY
].otyp
= find_superhard_sandals();
1196 artilist
[ART_MAX_THE_SECRET_AGENT
].otyp
= find_telescope();
1197 artilist
[ART_KATI_S_ANTAGONISM
].otyp
= find_telescope();
1198 artilist
[ART_NOW_YOUR_ABLE_TO_POLY
].otyp
= find_osfa_cloak();
1199 artilist
[ART_PINEAPPLE_TYCOON_S_FINISH
].otyp
= find_tarpaulin_cloak();
1200 artilist
[ART_SAFARI_ROCKZ
].otyp
= find_missys();
1201 artilist
[ART_SMILE_Z
].otyp
= find_missys();
1202 artilist
[ART_SECRET_RAINBOW
].otyp
= find_missys();
1203 artilist
[ART_YELLY
].otyp
= find_missys();
1204 artilist
[ART_DEATHHEAD
].otyp
= find_missys();
1205 artilist
[ART_MASK_OFF
].otyp
= find_missys();
1206 artilist
[ART_SPARKLING_GOLD
].otyp
= find_missys();
1207 artilist
[ART_PURPLE_SANDSTORM
].otyp
= find_missys();
1208 artilist
[ART_SQUARE_ZONE
].otyp
= find_missys();
1209 artilist
[ART_CUTE_JEANS
].otyp
= find_missys();
1210 artilist
[ART_LOVELY_CORNFLOWER
].otyp
= find_missys();
1211 artilist
[ART_GHETTO_ROCKZ
].otyp
= find_missys();
1212 artilist
[ART_LAST_UNICORN
].otyp
= find_missys();
1213 artilist
[ART_JUNGLE_LOVE
].otyp
= find_missys();
1214 artilist
[ART_FRESH_PINK
].otyp
= find_missys();
1215 artilist
[ART_BLUE_BLOSSOM
].otyp
= find_missys();
1216 artilist
[ART_SIXX_PAXX
].otyp
= find_missys();
1217 artilist
[ART_NEXT_LEVEL
].otyp
= find_missys();
1218 artilist
[ART_PATCHWORK
].otyp
= find_missys();
1219 artilist
[ART_MAGIC_BUTTERFLY
].otyp
= find_missys();
1220 artilist
[ART_TOXIC_PINK
].otyp
= find_missys();
1221 artilist
[ART_SPACE_SHUTTLE
].otyp
= find_missys();
1222 artilist
[ART_ART_ROCKZ
].otyp
= find_missys();
1223 artilist
[ART_COVER_UP
].otyp
= find_missys();
1224 artilist
[ART_SPIRIT_ROCKZ
].otyp
= find_missys();
1225 artilist
[ART_PURPLE_JUNGLE
].otyp
= find_missys();
1226 artilist
[ART_EAZY_GOING
].otyp
= find_missys();
1227 artilist
[ART_SIMPLY_WHITE
].otyp
= find_missys();
1228 artilist
[ART_SIMPLY_BLACK
].otyp
= find_missys();
1229 artilist
[ART_WOOD_FEELING
].otyp
= find_missys();
1230 artilist
[ART_COLLEGE_ROCKZ
].otyp
= find_missys();
1231 artilist
[ART_WELCOME_ON_BOARD
].otyp
= find_missys();
1232 artilist
[ART_WONDERFUL_LOTUS
].otyp
= find_missys();
1233 artilist
[ART_UNDERWATER_LOVE
].otyp
= find_missys();
1234 artilist
[ART_SWEET_CHERRY
].otyp
= find_missys();
1235 artilist
[ART_TIRE_ROCKZ
].otyp
= find_missys();
1236 artilist
[ART_HAPPY_CLOUD
].otyp
= find_missys();
1237 artilist
[ART_DELFI_ROCKZ
].otyp
= find_missys();
1238 artilist
[ART_ALL_TIME_FAVZ
].otyp
= find_missys();
1239 artilist
[ART_ROCKZ_ARMY
].otyp
= find_missys();
1240 artilist
[ART_SKETCH_IT
].otyp
= find_missys();
1241 artilist
[ART_POKERFACE
].otyp
= find_missys();
1242 artilist
[ART_WHITE_KARMA
].otyp
= find_missys();
1243 artilist
[ART_STREET_ROCKZ
].otyp
= find_missys();
1244 artilist
[ART_BLACK_MANDALA
].otyp
= find_missys();
1245 artilist
[ART_MY_LOVE
].otyp
= find_missys();
1246 artilist
[ART_YES_I_ROCKZ
].otyp
= find_missys();
1247 artilist
[ART_BUNNY_ROCKZ
].otyp
= find_missys();
1248 artilist
[ART_CAT_ROCKZ
].otyp
= find_missys();
1249 artilist
[ART_SCAN_ME
].otyp
= find_missys();
1250 artilist
[ART_BACTERIA
].otyp
= find_missys();
1251 artilist
[ART_JULIA_S_SLIPPERS
].otyp
= find_house_slippers();
1257 int multiplyme
= randartspellbook();
1258 while (objects
[multiplyme
].oc_skill
!= P_OCCULT_SPELL
&& tryct
< 10000) goto multiplymeagain
;
1259 artilist
[ART_MULTIPLY_ME
].otyp
= multiplyme
;
1264 /* zero out the artifact existence list */
1268 (void) memset((void *) artiexist
, 0, sizeof artiexist
);
1269 (void) memset((void *) artidisco
, 0, sizeof artidisco
);
1272 if (Race_if(PM_DE_ENERGISER
) && !u
.deenergisedone
) {
1274 int quartinum
= ART_ORB_OF_DETECTION
;
1275 while (quartinum
<= ART_PENUMBRAL_LASSO
) {
1276 de_energise_artifact(quartinum
);
1280 de_energise_artifact(ART_MOTHERFUCKER_TROPHY
);
1281 de_energise_artifact(ART_ARKENSTONE_OF_THRAIN
);
1282 de_energise_artifact(ART_NIGHTHORN
);
1283 de_energise_artifact(ART_EYE_OF_THE_BEHOLDER
);
1284 de_energise_artifact(ART_HAND_OF_VECNA
);
1285 de_energise_artifact(ART_HELM_OF_KNOWLEDGE
);
1286 de_energise_artifact(ART_BOOTS_OF_THE_MACHINE
);
1287 de_energise_artifact(ART_KAL
);
1288 de_energise_artifact(ART_BIZARRO_ORGASMATRON
);
1289 de_energise_artifact(ART_KATIA_S_SOFT_COTTON
);
1290 de_energise_artifact(ART_STAHNGNIR_S_BASHHUNK
);
1291 de_energise_artifact(ART_PROCOMFORT_SUPER
);
1292 u
.deenergisedone
= TRUE
;
1297 /* Post u_init() initialization */
1301 /* KMH -- Should be expert in quest artifact */
1302 if (urole
.questarti
&& !isamerican
&& !Role_if(PM_ANACHRONOUNBINDER
) &&
1303 (objects
[artilist
[urole
.questarti
].otyp
].oc_class
== WEAPON_CLASS
||
1304 objects
[artilist
[urole
.questarti
].otyp
].oc_class
== TOOL_CLASS
)) {
1305 int skill
= objects
[artilist
[urole
.questarti
].otyp
].oc_skill
;
1307 if (!isamerican
&& !Race_if(PM_BASTARD
) && !(Race_if(PM_GREURO
) && (skill
== P_BOW
|| skill
== P_CROSSBOW
))) {
1309 if (skill
> P_NONE
&& P_SKILL(skill
) < P_UNSKILLED
)
1310 P_SKILL(skill
) = P_UNSKILLED
;
1311 if (skill
> P_NONE
&& P_MAX_SKILL(skill
) < P_EXPERT
) {
1312 if (wizard
) pline("Warning: %s should be at least expert. Fixing...",
1313 artilist
[urole
.questarti
].name
);
1314 P_MAX_SKILL(skill
) = P_EXPERT
;
1324 bwrite(fd
, (void *) artiexist
, sizeof artiexist
);
1325 bwrite(fd
, (void *) artidisco
, sizeof artidisco
);
1326 bwrite(fd
, (void *) artilist
, sizeof artilist
);
1328 int articursor
= (ART_FIREWALL
- 1); /* gotta save them, goddammit! --Amy */
1329 while (articursor
<= NROFARTIFACTS
) {
1330 bwrite(fd
, (void *) &artilist
[articursor
], sizeof(struct artifact
));
1338 restore_artifacts(fd
)
1341 const char *tname
; /* bugfix by Chris_ANG */
1343 mread(fd
, (void *) artiexist
, sizeof artiexist
);
1344 mread(fd
, (void *) artidisco
, sizeof artidisco
);
1345 mread(fd
, (void *) artilist
, sizeof artilist
);
1347 int articursor
= (ART_FIREWALL
- 1);
1348 while (articursor
<= NROFARTIFACTS
) {
1349 tname
= artilist_pre
[articursor
].name
;
1350 mread(fd
, (void *) &artilist
[articursor
], sizeof(struct artifact
));
1351 artilist
[articursor
].name
= tname
;
1355 /*hack_artifacts();*/ /* redo non-saved special cases */
1362 if (artinum
<= 0 || artinum
> NROFARTIFACTS
) return("");
1363 return(artilist
[artinum
].name
);
1367 Make an artifact. If a specific alignment is specified, then an object of
1368 the appropriate alignment is created from scratch, or 0 is returned if
1369 none is available. (If at least one aligned artifact has already been
1370 given, then unaligned ones also become eligible for this.)
1371 If no alignment is given, then 'otmp' is converted
1372 into an artifact of matching type, or returned as-is if that's not possible.
1373 For the 2nd case, caller should use ``obj = mk_artifact(obj, A_NONE);''
1374 for the 1st, ``obj = mk_artifact((struct obj *)0, some_alignment);''.
1377 mk_artifact(otmp
, alignment
, existingagain
)
1378 struct obj
*otmp
; /* existing object; ignored if alignment specified */
1379 aligntyp alignment
; /* target alignment, or A_NONE */
1380 boolean existingagain
; /* if TRUE, existing ones can be generated again */
1382 const struct artifact
*a
;
1384 boolean by_align
= (alignment
!= A_NONE
);
1385 /*short*/int o_typ
= (by_align
|| !otmp
) ? 0 : otmp
->otyp
;
1386 boolean unique
= !by_align
&& otmp
&& objects
[o_typ
].oc_unique
;
1387 /*short*/int eligible
[NROFARTIFACTS
];
1391 /* KMH, role patch -- Try first or second gift */
1392 m
= urole
.gift1arti
;
1393 if (by_align
&& m
&& !artiexist
[m
]) {
1394 a
= (struct artifact
*)&artilist
[m
];
1397 m
= urole
.gift2arti
;
1398 if (by_align
&& m
&& !artiexist
[m
]) {
1399 a
= (struct artifact
*)&artilist
[m
];
1404 /* gather eligible artifacts */
1405 for (n
= 0, a
= artilist
+1, m
= 1; a
->otyp
; a
++, m
++)
1406 if ((!by_align
? a
->otyp
== o_typ
:
1407 (a
->alignment
== alignment
||
1408 (a
->alignment
== A_NONE
&& u
.ugifts
> 0))) &&
1409 (!(a
->spfx
& SPFX_NOGEN
) || unique
) && !(a
->otyp
== ROCK
&& artiexist
[m
]) && !(a
->otyp
== WAN_DESLEXIFICATION
&& !issoviet
) && (!artiexist
[m
] && !(a
->spfx
& SPFX_GIFTAGAIN
) || (existingagain
&& !(a
->spfx
& SPFX_ONLYONE
) ) )) {
1411 * [ALI] The determination of whether an artifact is
1412 * hostile to the player is a little more complex in
1413 * Slash'EM than Vanilla since there are artifacts
1414 * which are hostile to humans (eg., Deathsword) which
1415 * aren't aligned to any race.
1416 * Nevertheless, the rule remains the same: Gods don't
1417 * grant artifacts which would be hostile to the player
1418 * _in their normal form_.
1419 * Amy addition: wand of deslexification cannot be gifted to non-soviet, since that thing is supposed to
1420 * not exist outside of soviet mode.
1422 boolean hostile
= FALSE
;
1424 if (a
->race
!= NON_PM
&& race_hostile(&mons
[a
->race
]))
1425 hostile
= TRUE
; /* enemies' equipment */
1426 else if (a
->spfx
& SPFX_DBONUS
) {
1427 struct artifact tmp
;
1430 tmp
.spfx
&= SPFX_DBONUS
;
1432 set_mon_data(&youmonst
, &upermonst
, 0);
1433 if (spec_applies(&tmp
, &youmonst
))
1434 hostile
= TRUE
; /* can blast unpolyd player */
1436 set_mon_data(&youmonst
, &mons
[u
.umonnum
], 0);
1439 if (hostile
&& rn2(10)) /* don't just make it not spawn at all, that's boring --Amy */
1441 /* Amy evil patch change: remove guaranteed sacrifice gifts because we want variety. */
1442 if (by_align
&& !rn2(issoviet
? 2 : 5) && Role_if(a
->role
) && !artiexist
[m
])
1443 /* Now, you're still more likely than usual to get artifacts that are aligned with your role, but they are
1444 * by no means guaranteed. Instead, you're supposed to use whatever you get now. --Amy */
1445 goto make_artif
; /* 'a' points to the desired one */
1446 else if(by_align
&& Role_if(PM_PIRATE
)) continue; /* pirates are not gifted artifacts */
1451 if (n
) { /* found at least one candidate */
1452 m
= eligible
[rn2(n
)]; /* [0..n-1] */
1455 /* make an appropriate object if necessary, then christen it */
1456 make_artif
: if (by_align
) otmp
= mksobj((int)a
->otyp
, TRUE
, FALSE
, FALSE
);
1458 if ( (existingagain
|| (a
->spfx
& SPFX_GIFTAGAIN
)) && !(a
->spfx
& SPFX_ONLYONE
)) otmp
= onameX(otmp
, a
->name
);
1459 else otmp
= oname(otmp
, a
->name
);
1461 otmp
->oartifact
= m
;
1463 /* usually mark artifact as existing... but not always :D --Amy */
1464 if (rn2(100)) artiexist
[m
] = TRUE
;
1466 /* nothing appropriate could be found; return the original object */
1467 if (by_align
) otmp
= 0; /* (there was no original object) */
1472 /* Make an evil artifact and automatically equip it for the player --Amy
1473 * This can also always spawn another copy of an existing one (not a bug)
1474 * there are a few failsafes, e.g. it cannot be an amulet of strangulation (too deadly) and the item cannot weigh more
1475 * than 2x your weight cap because if you were to get instantly overloaded by the item, it might result in your death
1476 * without anything that you could do about it, which isn't fun at all */
1480 const struct artifact
*a
;
1482 int eligible
[NROFARTIFACTS
];
1483 register struct obj
*otmp
;
1485 /* gather eligible artifacts */
1486 for (n
= 0, a
= artilist
+1, m
= 1; a
->otyp
; a
++, m
++)
1487 if (!(a
->spfx
& SPFX_NOGEN
) && (a
->spfx
& SPFX_EVIL
) && (objects
[a
->otyp
].oc_weight
< (weight_cap() * 2) ) && !(a
->otyp
== AMULET_OF_STRANGULATION
) && !(a
->otyp
== WAN_DESLEXIFICATION
&& !issoviet
) && !(a
->otyp
== ROCK
&& artiexist
[m
]) && (!(artiexist
[m
] && (a
->spfx
& SPFX_ONLYONE
)) ) ) {
1492 if (n
) { /* found at least one candidate */
1493 m
= eligible
[rn2(n
)]; /* [0..n-1] */
1496 /* make an appropriate object if necessary, then christen it */
1497 otmp
= mksobj((int)a
->otyp
, TRUE
, FALSE
, FALSE
);
1501 otmp
= onameX(otmp
, a
->name
);
1505 otmp
->oartifact
= m
;
1506 if (otmp
->otyp
== LOADSTONE
|| otmp
->otyp
== STARLIGHTSTONE
|| otmp
->otyp
== LOADBOULDER
) {
1508 otmp
->owt
= weight(otmp
);
1511 if (rn2(100)) artiexist
[m
] = TRUE
;
1513 return; /* aww, there are no evil artifacts left... so don't make one. Bummer. */
1517 (void) pickup_object(otmp
, otmp
->quan
, TRUE
, TRUE
);
1520 /* try to equip it! */
1524 u
.cnd_badarticount
++;
1526 if (otmp
->oclass
== WEAPON_CLASS
|| otmp
->oclass
== GEM_CLASS
|| otmp
->oclass
== BALL_CLASS
|| otmp
->oclass
== CHAIN_CLASS
|| otmp
->oclass
== VENOM_CLASS
|| is_weptool(otmp
)) {
1527 if (uwep
) setnotworn(uwep
);
1528 if (bimanual(otmp
)) {
1529 if (uswapwep
) uswapwepgone();
1530 if (uarms
) remove_worn_item(uarms
, TRUE
);
1532 if (!uwep
) setuwep(otmp
, FALSE
, TRUE
);
1533 if (otmp
) curse(otmp
);
1536 else if (is_blindfold_slot(otmp
)) {
1537 if (ublindf
) remove_worn_item(ublindf
, TRUE
);
1539 if (otmp
) curse(otmp
);
1542 else if (otmp
->oclass
== RING_CLASS
) {
1543 boolean righthand
= rn2(2);
1545 if (uright
) remove_worn_item(uright
, TRUE
);
1546 setworn(otmp
, RIGHT_RING
);
1548 if (otmp
) curse(otmp
);
1550 if (uleft
) remove_worn_item(uleft
, TRUE
);
1551 setworn(otmp
, LEFT_RING
);
1553 if (otmp
) curse(otmp
);
1557 else if (otmp
->oclass
== AMULET_CLASS
) {
1558 if (uamul
) remove_worn_item(uamul
, TRUE
);
1559 setworn(otmp
, W_AMUL
);
1561 if (otmp
) curse(otmp
);
1564 else if (otmp
->oclass
== IMPLANT_CLASS
) {
1565 if (uimplant
) remove_worn_item(uimplant
, TRUE
);
1566 setworn(otmp
, W_IMPLANT
);
1568 if (otmp
) curse(otmp
);
1571 else if (is_boots(otmp
) && !(Race_if(PM_ELONA_SNAIL
) && !ishighheeled(otmp
))) {
1572 if (uarmf
) remove_worn_item(uarmf
, TRUE
);
1573 setworn(otmp
, W_ARMF
);
1575 if (otmp
) curse(otmp
);
1578 else if (is_gloves(otmp
)) {
1579 if (uarmg
) remove_worn_item(uarmg
, TRUE
);
1580 setworn(otmp
, W_ARMG
);
1582 if (otmp
) curse(otmp
);
1585 else if (is_helmet(otmp
)) {
1586 if (uarmh
) remove_worn_item(uarmh
, TRUE
);
1587 setworn(otmp
, W_ARMH
);
1589 if (otmp
) curse(otmp
);
1592 else if (is_cloak(otmp
)) {
1593 if (uarmc
) remove_worn_item(uarmc
, TRUE
);
1594 setworn(otmp
, W_ARMC
);
1596 if (otmp
) curse(otmp
);
1599 else if (is_shield(otmp
)) {
1600 if (uarms
) remove_worn_item(uarms
, TRUE
);
1601 setworn(otmp
, W_ARMS
);
1603 if (otmp
) curse(otmp
);
1606 else if (is_shirt(otmp
)) {
1607 if (uarmu
) remove_worn_item(uarmu
, TRUE
);
1608 setworn(otmp
, W_ARMU
);
1610 if (otmp
) curse(otmp
);
1613 else if (is_suit(otmp
)) {
1614 if (uskin
) skinback(FALSE
);
1615 if (uarm
) remove_worn_item(uarm
, TRUE
);
1616 setworn(otmp
, W_ARM
);
1618 if (otmp
) curse(otmp
);
1621 if ( (is_nastygraystone(otmp
) || is_feminismstone(otmp
)) ) {
1622 if (!rn2(3)) otmp
->cursed
= otmp
->hvycurse
= TRUE
;
1623 if (!rn2(3)) otmp
->cursed
= otmp
->stckcurse
= TRUE
;
1626 if (ArtificialXtra
) {
1628 otmp
->cursed
= otmp
->hvycurse
= TRUE
;
1629 if (!rn2(5)) otmp
->prmcurse
= TRUE
;
1632 otmp
->cursed
= otmp
->stckcurse
= TRUE
;
1640 /* The same bad artifact effect, but if there is a skill for the generated item, have a chance of learning it --Amy
1641 * Again, this can create a copy of an already existing one */
1645 const struct artifact
*a
;
1647 int eligible
[NROFARTIFACTS
];
1648 register struct obj
*otmp
;
1650 /* gather eligible artifacts */
1651 for (n
= 0, a
= artilist
+1, m
= 1; a
->otyp
; a
++, m
++)
1652 if (!(a
->spfx
& SPFX_NOGEN
) && (a
->spfx
& SPFX_EVIL
) && (objects
[a
->otyp
].oc_weight
< (weight_cap() * 2) ) && !(a
->otyp
== AMULET_OF_STRANGULATION
) && !(a
->otyp
== WAN_DESLEXIFICATION
&& !issoviet
) && !(a
->otyp
== ROCK
&& artiexist
[m
]) && (!(artiexist
[m
] && (a
->spfx
& SPFX_ONLYONE
)) ) ) {
1657 if (n
) { /* found at least one candidate */
1658 m
= eligible
[rn2(n
)]; /* [0..n-1] */
1661 /* make an appropriate object if necessary, then christen it */
1662 otmp
= mksobj((int)a
->otyp
, TRUE
, FALSE
, FALSE
);
1666 otmp
= onameX(otmp
, a
->name
);
1670 otmp
->oartifact
= m
;
1672 if (otmp
->otyp
== LOADSTONE
|| otmp
->otyp
== STARLIGHTSTONE
|| otmp
->otyp
== LOADBOULDER
) {
1674 otmp
->owt
= weight(otmp
);
1677 if (rn2(100)) artiexist
[m
] = TRUE
;
1679 return; /* aww, there are no evil artifacts left... so don't make one. Bummer. */
1683 int evfskill
= get_obj_skill(otmp
, TRUE
);
1685 if (P_MAX_SKILL(evfskill
) == P_ISRESTRICTED
) {
1686 unrestrict_weapon_skill(evfskill
);
1687 } else if (P_MAX_SKILL(evfskill
) == P_UNSKILLED
) {
1688 unrestrict_weapon_skill(evfskill
);
1689 P_MAX_SKILL(evfskill
) = P_BASIC
;
1690 } else if (rn2(2) && P_MAX_SKILL(evfskill
) == P_BASIC
) {
1691 P_MAX_SKILL(evfskill
) = P_SKILLED
;
1692 } else if (!rn2(4) && P_MAX_SKILL(evfskill
) == P_SKILLED
) {
1693 P_MAX_SKILL(evfskill
) = P_EXPERT
;
1694 } else if (!rn2(10) && P_MAX_SKILL(evfskill
) == P_EXPERT
) {
1695 P_MAX_SKILL(evfskill
) = P_MASTER
;
1696 } else if (!rn2(100) && P_MAX_SKILL(evfskill
) == P_MASTER
) {
1697 P_MAX_SKILL(evfskill
) = P_GRAND_MASTER
;
1698 } else if (!rn2(200) && P_MAX_SKILL(evfskill
) == P_GRAND_MASTER
) {
1699 P_MAX_SKILL(evfskill
) = P_SUPREME_MASTER
;
1702 if (Race_if(PM_RUSMOT
)) {
1703 if (P_MAX_SKILL(evfskill
) == P_ISRESTRICTED
) {
1704 unrestrict_weapon_skill(evfskill
);
1705 } else if (P_MAX_SKILL(evfskill
) == P_UNSKILLED
) {
1706 unrestrict_weapon_skill(evfskill
);
1707 P_MAX_SKILL(evfskill
) = P_BASIC
;
1708 } else if (rn2(2) && P_MAX_SKILL(evfskill
) == P_BASIC
) {
1709 P_MAX_SKILL(evfskill
) = P_SKILLED
;
1710 } else if (!rn2(4) && P_MAX_SKILL(evfskill
) == P_SKILLED
) {
1711 P_MAX_SKILL(evfskill
) = P_EXPERT
;
1712 } else if (!rn2(10) && P_MAX_SKILL(evfskill
) == P_EXPERT
) {
1713 P_MAX_SKILL(evfskill
) = P_MASTER
;
1714 } else if (!rn2(100) && P_MAX_SKILL(evfskill
) == P_MASTER
) {
1715 P_MAX_SKILL(evfskill
) = P_GRAND_MASTER
;
1716 } else if (!rn2(200) && P_MAX_SKILL(evfskill
) == P_GRAND_MASTER
) {
1717 P_MAX_SKILL(evfskill
) = P_SUPREME_MASTER
;
1721 (void) pickup_object(otmp
, otmp
->quan
, TRUE
, TRUE
);
1725 /* try to equip it! */
1729 u
.cnd_badarticount
++;
1731 if (otmp
->oclass
== WEAPON_CLASS
|| otmp
->oclass
== GEM_CLASS
|| otmp
->oclass
== BALL_CLASS
|| otmp
->oclass
== CHAIN_CLASS
|| otmp
->oclass
== VENOM_CLASS
|| is_weptool(otmp
)) {
1732 if (uwep
) setnotworn(uwep
);
1733 if (bimanual(otmp
)) {
1734 if (uswapwep
) uswapwepgone();
1735 if (uarms
) remove_worn_item(uarms
, TRUE
);
1737 if (!uwep
) setuwep(otmp
, FALSE
, TRUE
);
1738 if (otmp
) curse(otmp
);
1741 else if (is_blindfold_slot(otmp
)) {
1742 if (ublindf
) remove_worn_item(ublindf
, TRUE
);
1744 if (otmp
) curse(otmp
);
1747 else if (otmp
->oclass
== RING_CLASS
) {
1748 boolean righthand
= rn2(2);
1750 if (uright
) remove_worn_item(uright
, TRUE
);
1751 setworn(otmp
, RIGHT_RING
);
1753 if (otmp
) curse(otmp
);
1755 if (uleft
) remove_worn_item(uleft
, TRUE
);
1756 setworn(otmp
, LEFT_RING
);
1758 if (otmp
) curse(otmp
);
1762 else if (otmp
->oclass
== AMULET_CLASS
) {
1763 if (uamul
) remove_worn_item(uamul
, TRUE
);
1764 setworn(otmp
, W_AMUL
);
1766 if (otmp
) curse(otmp
);
1769 else if (otmp
->oclass
== IMPLANT_CLASS
) {
1770 if (uimplant
) remove_worn_item(uimplant
, TRUE
);
1771 setworn(otmp
, W_IMPLANT
);
1773 if (otmp
) curse(otmp
);
1776 else if (is_boots(otmp
) && !(Race_if(PM_ELONA_SNAIL
) && !ishighheeled(otmp
))) {
1777 if (uarmf
) remove_worn_item(uarmf
, TRUE
);
1778 setworn(otmp
, W_ARMF
);
1780 if (otmp
) curse(otmp
);
1783 else if (is_gloves(otmp
)) {
1784 if (uarmg
) remove_worn_item(uarmg
, TRUE
);
1785 setworn(otmp
, W_ARMG
);
1787 if (otmp
) curse(otmp
);
1790 else if (is_helmet(otmp
)) {
1791 if (uarmh
) remove_worn_item(uarmh
, TRUE
);
1792 setworn(otmp
, W_ARMH
);
1794 if (otmp
) curse(otmp
);
1797 else if (is_cloak(otmp
)) {
1798 if (uarmc
) remove_worn_item(uarmc
, TRUE
);
1799 setworn(otmp
, W_ARMC
);
1801 if (otmp
) curse(otmp
);
1804 else if (is_shield(otmp
)) {
1805 if (uarms
) remove_worn_item(uarms
, TRUE
);
1806 setworn(otmp
, W_ARMS
);
1808 if (otmp
) curse(otmp
);
1811 else if (is_shirt(otmp
)) {
1812 if (uarmu
) remove_worn_item(uarmu
, TRUE
);
1813 setworn(otmp
, W_ARMU
);
1815 if (otmp
) curse(otmp
);
1818 else if (is_suit(otmp
)) {
1819 if (uskin
) skinback(FALSE
);
1820 if (uarm
) remove_worn_item(uarm
, TRUE
);
1821 setworn(otmp
, W_ARM
);
1823 if (otmp
) curse(otmp
);
1826 if ( (is_nastygraystone(otmp
) || is_feminismstone(otmp
)) ) {
1827 if (!rn2(3)) otmp
->cursed
= otmp
->hvycurse
= TRUE
;
1828 if (!rn2(3)) otmp
->cursed
= otmp
->stckcurse
= TRUE
;
1831 if (ArtificialXtra
) {
1833 otmp
->cursed
= otmp
->hvycurse
= TRUE
;
1834 if (!rn2(5)) otmp
->prmcurse
= TRUE
;
1837 otmp
->cursed
= otmp
->stckcurse
= TRUE
;
1846 * Returns the full name (with articles and correct capitalization) of an
1847 * artifact named "name" if one exists, or NULL, it not.
1848 * The given name must be rather close to the real name for it to match.
1849 * The object type of the artifact is returned in otyp if the return value
1853 artifact_name(name
, otyp
)
1857 register const struct artifact
*a
;
1858 register const char *aname
;
1860 if(!strncmpi(name
, "the ", 4)) name
+= 4;
1861 if(!strncmpi(name
, "poisoned ", 9)) name
+= 9;
1863 for (a
= artilist
+1; a
->otyp
; a
++) {
1865 if(!strncmpi(aname
, "the ", 4)) aname
+= 4;
1866 if(!strcmpi(name
, aname
)) {
1876 exist_artifact(otyp
, name
)
1878 register const char *name
;
1880 register const struct artifact
*a
;
1881 register boolean
*arex
;
1884 for (a
= artilist
+1,arex
= artiexist
+1; a
->otyp
; a
++,arex
++)
1885 if ((int) a
->otyp
== otyp
&& !strcmp(a
->name
, name
))
1891 artifact_exists(otmp
, name
, mod
)
1892 register struct obj
*otmp
;
1893 register const char *name
;
1894 register boolean mod
;
1896 register const struct artifact
*a
;
1898 boolean artimatch
= FALSE
;
1901 for (a
= artilist
+1; a
->otyp
; a
++) {
1904 if (a
->otyp
== otmp
->otyp
) artimatch
= TRUE
;
1905 if (a
->otyp
== WORM_TOOTH
&& otmp
->otyp
== CRYSKNIFE
) artimatch
= TRUE
;
1906 if (a
->otyp
== CRYSKNIFE
&& otmp
->otyp
== WORM_TOOTH
) artimatch
= TRUE
;
1908 if (artimatch
&& !strcmp(a
->name
, name
)) {
1909 register int m
= a
- artilist
;
1910 otmp
->oartifact
= (/*char*/int)(mod
? m
: 0);
1912 if (otmp
&& otmp
->oartifact
== ART_NOOBNOOBNOOB
&& Role_if(PM_NOOB_MODE_BARB
)) {
1913 FemaleTrapCharlotte
|= FROMOUTSIDE
;
1914 if (!FemtrapActiveRuth
) {
1915 pline("The feminism power compels you because you're such a noob...");
1916 pline("Watch out, the Bang Gang is considering you a target. They're coming for you, and they have some tricks and traps ready.");
1920 if (otmp
&& otmp
->oartifact
== ART_VADER_S_CHARGE
) otmp
->age
+= rnz(5000);
1921 if (otmp
&& otmp
->oartifact
== ART_TAVION_S_CHARGE
) otmp
->age
+= rnz(5000);
1922 if (otmp
&& otmp
->oartifact
== ART_DURATEX
) otmp
->age
+= 4000;
1923 if (otmp
&& otmp
->oartifact
== ART_BURNER_DREAM
) otmp
->age
+= 2000;
1924 if (otmp
&& otmp
->oartifact
== ART_OWENER
) otmp
->age
= 0;
1925 if (otmp
&& otmp
->oartifact
== ART_OUT_OILED
) otmp
->age
= 0;
1926 if (otmp
&& otmp
->oartifact
== ART_PSEUDO_MAGIC_LAMP
) {
1928 otmp
->age
+= rnz(10000);
1930 if (otmp
&& otmp
->oartifact
== ART_MYSTERIOUS_SPIKES
) {
1932 otmp
->owt
= weight(otmp
);
1934 if (otmp
&& otmp
->oartifact
== ART_BUS_ERROR
) {
1936 otmp
->owt
= weight(otmp
);
1938 if (otmp
&& otmp
->oartifact
== ART_HOL_ON_MAN
) {
1940 otmp
->owt
= weight(otmp
);
1942 if (otmp
&& otmp
->oartifact
== ART_RIDGET_PHASTO
) {
1944 otmp
->owt
= weight(otmp
);
1946 if (otmp
&& otmp
->oartifact
== ART_RAGGO_S_ROCK
) {
1948 otmp
->owt
= weight(otmp
);
1950 if (otmp
&& otmp
->oartifact
== ART_SIEGFRIED_S_DEATHBOLT
) {
1952 otmp
->owt
= weight(otmp
);
1954 if (otmp
&& otmp
->oartifact
== ART_SIGMUND_S_SMALL_LOAD
) {
1956 otmp
->owt
= weight(otmp
);
1958 if (otmp
&& otmp
->oartifact
== ART_WORTH_CHECKING_OUT
&& otmp
->spe
== 0) {
1959 if (rn2(2)) otmp
->spe
= -rne(Race_if(PM_LISTENER
) ? 3 : 2);
1960 else otmp
->spe
= rne(Race_if(PM_LISTENER
) ? 3 : 2);
1962 if (otmp
&& otmp
->oartifact
== ART_NINER
) {
1965 if (otmp
&& otmp
->oartifact
== ART_SAVOS__SAGERY
) {
1968 if (otmp
&& otmp
->oartifact
== ART_PWNZORCHANT
) {
1969 if (otmp
->spe
> 0) otmp
->spe
*= 2;
1972 if (otmp
&& otmp
->oartifact
== ART_WELL__MIGHT_AS_WELL_WEAR_T
) {
1973 FemaleTrapJette
+= 50000;
1975 if (otmp
&& otmp
->oartifact
== ART_WHOA_DOUBLE___
) {
1976 otmp
->spe
+= rnd(10);
1979 if (otmp
&& otmp
->oartifact
== ART_FIGHTEBOSSIT
) {
1980 (void) makemon(specialtensmon(165), 0, 0, MM_ADJACENTOK
); /* G_UNIQ */
1983 if (otmp
&& otmp
->oartifact
== ART_LEGENDARY_BATTLE
) {
1986 for (tryct
= 0; tryct
< 2000; tryct
++) {
1990 if (isok(x
, y
) && (levl
[x
][y
].typ
> DBWALL
) && !(t_at(x
, y
)) ) {
1991 (void) maketrap(x
, y
, BOSS_SPAWNER
, 0, FALSE
);
1992 if (wizard
) pline("boss spawner at %d,%d", x
, y
);
1998 if (otmp
&& otmp
->oartifact
== ART_PITCH_HAD_
) {
1999 NastinessProblem
+= 1000; /* no message, this is intentional --Amy */
2002 if (otmp
&& otmp
->oartifact
== ART_LUCKY_GENERATION
) {
2003 pline("Luck smiles upon you...");
2005 if (P_MAX_SKILL(P_FLAIL
) == P_ISRESTRICTED
) {
2006 unrestrict_weapon_skill(P_FLAIL
);
2007 pline("You can now learn the flail skill!");
2008 } else if (P_MAX_SKILL(P_FLAIL
) == P_UNSKILLED
) {
2009 unrestrict_weapon_skill(P_FLAIL
);
2010 pline("You can now learn the flail skill!");
2011 P_MAX_SKILL(P_FLAIL
) = P_BASIC
;
2012 } else if (P_MAX_SKILL(P_FLAIL
) == P_BASIC
) {
2013 P_MAX_SKILL(P_FLAIL
) = P_SKILLED
;
2014 pline("You can now become skilled with flails!");
2015 } else if (P_MAX_SKILL(P_FLAIL
) == P_SKILLED
) {
2016 P_MAX_SKILL(P_FLAIL
) = P_EXPERT
;
2017 pline("You can now become expert with flails!");
2018 } else if (P_MAX_SKILL(P_FLAIL
) == P_EXPERT
) {
2019 P_MAX_SKILL(P_FLAIL
) = P_MASTER
;
2020 pline("You can now become master with flails!");
2021 } else if (P_MAX_SKILL(P_FLAIL
) == P_MASTER
) {
2022 P_MAX_SKILL(P_FLAIL
) = P_GRAND_MASTER
;
2023 pline("You can now become grand master with flails!");
2024 } else if (P_MAX_SKILL(P_FLAIL
) == P_GRAND_MASTER
) {
2025 P_MAX_SKILL(P_FLAIL
) = P_SUPREME_MASTER
;
2026 pline("You can now become supreme master with flails!");
2027 } else pline("Sadly your knowledge of the flail skill is already maxed.");
2031 if (otmp
&& otmp
->oartifact
== ART_MAIN_CONTAINER
) {
2032 int maincontainerclass
= WEAPON_CLASS
;
2033 int maincontaineramount
= 10;
2035 register struct obj
*ocont
;
2037 if (!rn2(1000)) maincontainerclass
= BALL_CLASS
;
2038 else if (!rn2(2000)) maincontainerclass
= CHAIN_CLASS
;
2039 else if (!rn2(1000)) maincontainerclass
= VENOM_CLASS
;
2040 else if (!rn2(1000)) maincontainerclass
= ROCK_CLASS
;
2041 else if (!rn2(1000)) maincontainerclass
= IMPLANT_CLASS
;
2042 else switch (rnd(11)) {
2043 case 1: maincontainerclass
= WEAPON_CLASS
; break;
2044 case 2: maincontainerclass
= ARMOR_CLASS
; break;
2045 case 3: maincontainerclass
= RING_CLASS
; break;
2046 case 4: maincontainerclass
= AMULET_CLASS
; break;
2047 case 5: maincontainerclass
= WAND_CLASS
; break;
2048 case 6: maincontainerclass
= SPBOOK_CLASS
; break;
2049 case 7: maincontainerclass
= SCROLL_CLASS
; break;
2050 case 8: maincontainerclass
= POTION_CLASS
; break;
2051 case 9: maincontainerclass
= TOOL_CLASS
; break;
2052 case 10: maincontainerclass
= FOOD_CLASS
; break;
2053 case 11: maincontainerclass
= GEM_CLASS
; break;
2056 while (maincontaineramount
> 0) {
2057 maincontaineramount
--;
2058 ocont
= mkobj(maincontainerclass
, FALSE
, FALSE
);
2060 ocont
->owt
= weight(ocont
);
2061 (void) add_to_container(otmp
, ocont
, TRUE
);
2067 if (otmp
&& otmp
->oartifact
== ART_FAILPRIZE
) {
2068 if (Has_contents(otmp
)) delete_contents(otmp
);
2071 if (otmp
&& otmp
->oartifact
== ART_EQUIFRIEND
) {
2072 register struct obj
*ocont
;
2073 ocont
= mkobj(WEAPON_CLASS
, FALSE
, FALSE
);
2075 ocont
->owt
= weight(ocont
);
2076 (void) add_to_container(otmp
, ocont
, TRUE
);
2078 ocont
= mkobj(ARMOR_CLASS
, FALSE
, FALSE
);
2080 ocont
->owt
= weight(ocont
);
2081 (void) add_to_container(otmp
, ocont
, TRUE
);
2086 if (otmp
&& otmp
->oartifact
== ART_TOOLBOX
) {
2087 int maincontaineramount
= 3;
2089 register struct obj
*ocont
;
2091 while (maincontaineramount
> 0) {
2092 maincontaineramount
--;
2093 ocont
= mkobj(TOOL_CLASS
, FALSE
, FALSE
);
2095 ocont
->owt
= weight(ocont
);
2096 (void) add_to_container(otmp
, ocont
, TRUE
);
2102 if (otmp
&& otmp
->oartifact
== ART_IMPLANTOLOGY
) {
2103 int maincontaineramount
= rnd(3);
2105 register struct obj
*ocont
;
2107 while (maincontaineramount
> 0) {
2108 maincontaineramount
--;
2109 ocont
= mkobj(IMPLANT_CLASS
, FALSE
, FALSE
);
2111 ocont
->owt
= weight(ocont
);
2112 (void) add_to_container(otmp
, ocont
, TRUE
);
2118 if (otmp
&& otmp
->oartifact
== ART_SPELLIBRARY
) {
2119 int maincontaineramount
= rnd(3);
2121 register struct obj
*ocont
;
2123 while (maincontaineramount
> 0) {
2124 maincontaineramount
--;
2125 ocont
= mkobj(SPBOOK_CLASS
, FALSE
, FALSE
);
2127 ocont
->owt
= weight(ocont
);
2128 (void) add_to_container(otmp
, ocont
, TRUE
);
2134 if (otmp
&& otmp
->oartifact
== ART_VENOSTASH
) {
2135 int maincontaineramount
= rnd(5);
2137 register struct obj
*ocont
;
2139 while (maincontaineramount
> 0) {
2140 maincontaineramount
--;
2141 ocont
= mkobj(VENOM_CLASS
, FALSE
, FALSE
);
2143 ocont
->owt
= weight(ocont
);
2144 (void) add_to_container(otmp
, ocont
, TRUE
);
2150 if (otmp
&& otmp
->oartifact
== ART_DEMONSEAL
) {
2151 int maincontainerclass
= WEAPON_CLASS
;
2152 int maincontaineramount
= 50;
2154 register struct obj
*ocont
;
2156 if (!rn2(1000)) maincontainerclass
= BALL_CLASS
;
2157 else if (!rn2(2000)) maincontainerclass
= CHAIN_CLASS
;
2158 else if (!rn2(1000)) maincontainerclass
= VENOM_CLASS
;
2159 else if (!rn2(1000)) maincontainerclass
= ROCK_CLASS
;
2160 else if (!rn2(1000)) maincontainerclass
= IMPLANT_CLASS
;
2161 else switch (rnd(11)) {
2162 case 1: maincontainerclass
= WEAPON_CLASS
; break;
2163 case 2: maincontainerclass
= ARMOR_CLASS
; break;
2164 case 3: maincontainerclass
= RING_CLASS
; break;
2165 case 4: maincontainerclass
= AMULET_CLASS
; break;
2166 case 5: maincontainerclass
= WAND_CLASS
; break;
2167 case 6: maincontainerclass
= SPBOOK_CLASS
; break;
2168 case 7: maincontainerclass
= SCROLL_CLASS
; break;
2169 case 8: maincontainerclass
= POTION_CLASS
; break;
2170 case 9: maincontainerclass
= TOOL_CLASS
; break;
2171 case 10: maincontainerclass
= FOOD_CLASS
; break;
2172 case 11: maincontainerclass
= GEM_CLASS
; break;
2175 while (maincontaineramount
> 0) {
2176 maincontaineramount
--;
2177 ocont
= mkobj(maincontainerclass
, FALSE
, FALSE
);
2179 ocont
->owt
= weight(ocont
);
2180 (void) add_to_container(otmp
, ocont
, TRUE
);
2186 if (otmp
&& otmp
->oartifact
== ART_HOARDS_OF_TREASURE
) {
2188 int maincontaineramount
= 50;
2190 register struct obj
*ocont
;
2192 while (maincontaineramount
> 0) {
2193 maincontaineramount
--;
2194 ocont
= mkobj(RANDOM_CLASS
, FALSE
, FALSE
);
2196 ocont
->owt
= weight(ocont
);
2197 (void) add_to_container(otmp
, ocont
, TRUE
);
2203 if (otmp
&& otmp
->oartifact
== ART_BOOTY_CASE
) {
2205 int maincontaineramount
= rnd(3);
2207 register struct obj
*ocont
;
2209 while (maincontaineramount
> 0) {
2210 maincontaineramount
--;
2211 ocont
= mkobj(RANDOM_CLASS
, FALSE
, FALSE
);
2213 ocont
->owt
= weight(ocont
);
2214 (void) add_to_container(otmp
, ocont
, TRUE
);
2220 if (otmp
&& otmp
->oartifact
== ART_PIRATE_TREASURE
) {
2222 int maincontaineramount
= rnd(6);
2224 register struct obj
*ocont
;
2226 while (maincontaineramount
> 0) {
2227 maincontaineramount
--;
2228 ocont
= mkobj(RANDOM_CLASS
, FALSE
, FALSE
);
2230 ocont
->owt
= weight(ocont
);
2231 (void) add_to_container(otmp
, ocont
, TRUE
);
2237 if (otmp
&& otmp
->oartifact
== ART_HOLDYMANY
) {
2239 int maincontaineramount
= 5;
2241 register struct obj
*ocont
;
2243 while (maincontaineramount
> 0) {
2244 maincontaineramount
--;
2245 ocont
= mkobj(RANDOM_CLASS
, FALSE
, FALSE
);
2247 ocont
->owt
= weight(ocont
);
2248 (void) add_to_container(otmp
, ocont
, TRUE
);
2254 if (otmp
&& otmp
->oartifact
== ART_KILILILILI_KILI
) {
2255 register struct obj
*ocont
;
2257 ocont
= mksobj(SCR_WISHING
, TRUE
, FALSE
, FALSE
);
2260 ocont
->hvycurse
= TRUE
;
2261 ocont
->owt
= weight(ocont
);
2262 (void) add_to_container(otmp
, ocont
, TRUE
);
2267 if (otmp
&& otmp
->oartifact
== ART_MEGAKITROOFTM
) {
2268 register struct obj
*ocont
;
2270 ocont
= mksobj(SCR_RELOCATION
, TRUE
, FALSE
, FALSE
);
2273 ocont
->owt
= weight(ocont
);
2274 (void) add_to_container(otmp
, ocont
, TRUE
);
2277 ocont
= mksobj(SCR_RETURN
, TRUE
, FALSE
, FALSE
);
2280 ocont
->owt
= weight(ocont
);
2281 (void) add_to_container(otmp
, ocont
, TRUE
);
2284 ocont
= mksobj(POT_DOWN_LEVEL
, TRUE
, FALSE
, FALSE
);
2287 ocont
->owt
= weight(ocont
);
2288 (void) add_to_container(otmp
, ocont
, TRUE
);
2291 ocont
= mksobj(POT_GAIN_LEVEL
, TRUE
, FALSE
, FALSE
);
2294 ocont
->owt
= weight(ocont
);
2295 (void) add_to_container(otmp
, ocont
, TRUE
);
2298 ocont
= mksobj(WAN_TRAP_DISARMING
, TRUE
, FALSE
, FALSE
);
2300 ocont
->owt
= weight(ocont
);
2301 (void) add_to_container(otmp
, ocont
, TRUE
);
2306 if (otmp
&& otmp
->oartifact
== ART_ASSLOAD_OF_LOOT
) {
2308 int maincontaineramount
= rn1(100, 100);
2310 register struct obj
*ocont
;
2312 while (maincontaineramount
> 0) {
2313 maincontaineramount
--;
2314 ocont
= mkobj(RANDOM_CLASS
, FALSE
, FALSE
);
2316 ocont
->owt
= weight(ocont
);
2317 (void) add_to_container(otmp
, ocont
, TRUE
);
2323 if (otmp
&& otmp
->oartifact
== ART_CORONA_S_TOLL
) {
2324 int maincontaineramount
= rnd(120);
2326 register struct obj
*ocont
;
2328 while (maincontaineramount
> 0) {
2329 maincontaineramount
--;
2330 ocont
= mksobj(!rn2(3) ? PILL
: rn2(2) ? BANDAGE
: PHIAL
, TRUE
, FALSE
, FALSE
);
2332 ocont
->owt
= weight(ocont
);
2333 (void) add_to_container(otmp
, ocont
, TRUE
);
2339 if (otmp
&& otmp
->oartifact
== ART_SYKES_S_INFINITY
) {
2340 int maincontaineramount
= rnd(180);
2342 register struct obj
*ocont
;
2344 while (maincontaineramount
> 0) {
2345 maincontaineramount
--;
2346 ocont
= mksobj(BANDAGE
, TRUE
, FALSE
, FALSE
);
2348 ocont
->owt
= weight(ocont
);
2349 (void) add_to_container(otmp
, ocont
, TRUE
);
2355 if (otmp
&& otmp
->oartifact
== ART_FORTY_FOUR_IS_LUCK
) {
2357 register struct obj
*ocont
;
2359 int extraboxitems
= 5;
2360 while (extraboxitems
> 0) {
2362 ocont
= mksobj(makemusableitem(), TRUE
, TRUE
, FALSE
);
2364 ocont
->owt
= weight(ocont
);
2365 (void) add_to_container(otmp
, ocont
, TRUE
);
2371 if (otmp
&& otmp
->oartifact
== ART_EATBONANZA
) {
2373 register struct obj
*ocont
;
2375 int maincontaineramount
= rnd(100);
2377 while (maincontaineramount
> 0) {
2378 maincontaineramount
--;
2379 register struct obj
*ocont
;
2380 ocont
= mksobj(CORPSE
, TRUE
, FALSE
, FALSE
);
2384 ocont
->icedobject
= TRUE
;
2386 (void) stop_timer(ROT_CORPSE
, (void *)ocont
);
2387 (void) stop_timer(MOLDY_CORPSE
, (void *)ocont
);
2388 (void) stop_timer(REVIVE_MON
, (void *)ocont
);
2391 ocont
->owt
= weight(ocont
);
2392 (void) add_to_container(otmp
, ocont
, TRUE
);
2398 if (otmp
&& otmp
->oartifact
== ART_WEAPONMEMORY
) {
2400 int maincontaineramount
= 10;
2402 register struct obj
*ocont
;
2404 while (maincontaineramount
> 0) {
2405 maincontaineramount
--;
2406 ocont
= mkobj(WEAPON_CLASS
, FALSE
, FALSE
);
2408 ocont
->owt
= weight(ocont
);
2409 (void) add_to_container(otmp
, ocont
, TRUE
);
2415 if (otmp
&& otmp
->oartifact
== ART_ARMORMEMORY
) {
2417 int maincontaineramount
= 10;
2419 register struct obj
*ocont
;
2421 while (maincontaineramount
> 0) {
2422 maincontaineramount
--;
2423 ocont
= mkobj(ARMOR_CLASS
, FALSE
, FALSE
);
2425 ocont
->owt
= weight(ocont
);
2426 (void) add_to_container(otmp
, ocont
, TRUE
);
2432 if (otmp
&& otmp
->oartifact
== ART_EMERGENCY_CASH
) {
2434 register struct obj
*ocont
;
2435 ocont
= mksobj(GOLD_PIECE
, FALSE
, FALSE
, FALSE
);
2436 ocont
->quan
= rn1(10000,10000);
2438 ocont
->owt
= weight(ocont
);
2439 (void) add_to_container(otmp
, ocont
, TRUE
);
2443 if (otmp
&& otmp
->oartifact
== ART_DOLLAR_DEPOSIT
) {
2445 register struct obj
*ocont
;
2446 ocont
= mksobj(GOLD_PIECE
, FALSE
, FALSE
, FALSE
);
2447 ocont
->quan
= 10000;
2449 ocont
->owt
= weight(ocont
);
2450 (void) add_to_container(otmp
, ocont
, TRUE
);
2454 if (otmp
&& otmp
->oartifact
== ART_OORTOCASH
) {
2456 register struct obj
*ocont
;
2457 ocont
= mksobj(GOLD_PIECE
, FALSE
, FALSE
, FALSE
);
2458 ocont
->quan
= rnz(2000);
2460 ocont
->owt
= weight(ocont
);
2461 (void) add_to_container(otmp
, ocont
, TRUE
);
2465 if (otmp
&& otmp
->oartifact
== ART_ARTI_LOCKBOX
) {
2466 register struct obj
*ocont
;
2468 boolean havegifts
= u
.ugifts
;
2470 if (!havegifts
) u
.ugifts
++;
2472 ocont
= mk_artifact((struct obj
*)0, !rn2(3) ? A_CHAOTIC
: rn2(2) ? A_NEUTRAL
: A_LAWFUL
, TRUE
);
2474 ocont
->owt
= weight(ocont
);
2475 (void) add_to_container(otmp
, ocont
, TRUE
);
2478 if (!havegifts
) u
.ugifts
--;
2482 if (otmp
&& otmp
->oartifact
== ART_RURIHUNT
) {
2483 register struct obj
*ocont
;
2485 int ruricount
= rnd(3);
2486 while (ruricount
> 0) {
2489 boolean havegifts
= u
.ugifts
;
2491 if (!havegifts
) u
.ugifts
++;
2493 ocont
= mk_artifact((struct obj
*)0, !rn2(3) ? A_CHAOTIC
: rn2(2) ? A_NEUTRAL
: A_LAWFUL
, TRUE
);
2495 ocont
->owt
= weight(ocont
);
2496 (void) add_to_container(otmp
, ocont
, TRUE
);
2499 if (!havegifts
) u
.ugifts
--;
2504 if (otmp
&& otmp
->oartifact
== ART_BAEAU
) {
2505 otmp
->spe
+= rnd(10);
2507 if (otmp
&& otmp
->oartifact
== ART_YOUR_LUCKY_DAY
) {
2508 switch (otmp
->otyp
) {
2511 case WAN_ACQUIREMENT
:
2512 case WAN_GAIN_LEVEL
:
2513 case WAN_INCREASE_MAX_HITPOINTS
:
2514 otmp
->spe
+= Role_if(PM_WANDKEEPER
) ? 3 : 1;
2517 otmp
->spe
+= Role_if(PM_WANDKEEPER
) ? 50 : 20;
2521 if (otmp
&& otmp
->oartifact
== ART_TADA
) {
2524 if (otmp
&& otmp
->oartifact
== ART_LIBRARY_HIDING
) {
2525 otmp
->oinvis
= TRUE
;
2527 if (otmp
&& otmp
->oartifact
== ART_DAT_S_GOD
) {
2528 otmp
->oerodeproof
= TRUE
;
2530 if (otmp
&& otmp
->oartifact
== ART_DON_T_GO_AWAY
) {
2531 otmp
->oerodeproof
= TRUE
;
2533 if (otmp
&& otmp
->oartifact
== ART_SUK_ME_HAHAHAHAHAH
) {
2534 otmp
->greased
= rnd(3);
2536 if (otmp
&& otmp
->oartifact
== ART_START_WITH_EVERYTHING
) {
2538 otmp
->oerodeproof
= TRUE
;
2539 otmp
->enchantment
= randenchantment();
2541 if (otmp
&& otmp
->oartifact
== ART_WEAR_OFF_THE_DAMN_RNG
) {
2544 if (otmp
&& otmp
->oartifact
== ART_IDEAL_BASE
) {
2546 otmp
->oeroded
= rnd(3);
2547 if (!rn2(3)) otmp
->oeroded2
= rnd(3);
2549 otmp
->oeroded2
= rnd(3);
2550 if (!rn2(3)) otmp
->oeroded
= rnd(3);
2553 if (otmp
&& otmp
->oartifact
== ART_WHO_CARES_ABOUT_A_LITTLE_R
) {
2554 if (otmp
->oeroded
< 1) otmp
->oeroded
= 1;
2556 if (otmp
&& otmp
->oartifact
== ART_NOTHING_BUT_FILLER
) {
2557 otmp
->oerodeproof
= TRUE
;
2559 otmp
->oeroded
= rnd(3);
2560 if (!rn2(3)) otmp
->oeroded2
= rnd(3);
2562 otmp
->oeroded2
= rnd(3);
2563 if (!rn2(3)) otmp
->oeroded
= rnd(3);
2566 if (otmp
&& otmp
->oartifact
== ART_FIND_ME_NEVERTHELESS
) {
2567 otmp
->oinvis
= otmp
->oinvisreal
= TRUE
;
2569 if (otmp
&& otmp
->oartifact
== ART_STRONG_
) {
2570 otmp
->spe
+= rn1(7,7);
2573 if (otmp
->oartifact
== ART_PECULIAR_MARKINGS
) otmp
->spe
= 2;
2575 if (otmp
&& otmp
->oartifact
== ART_MODERN_DIGICAM
) {
2578 if (otmp
&& otmp
->oartifact
== ART_DON_T_RUN_OUT_OF_HALLOWEEN
) {
2581 if (otmp
&& otmp
->oartifact
== ART_BEH__TOO_EASY
) {
2584 if (otmp
&& otmp
->oartifact
== ART_NUTRIROLL
) {
2587 if (otmp
&& otmp
->oartifact
== ART_SING_S_STOCK
) {
2590 if (otmp
&& otmp
->oartifact
== ART_SING_S_LAST_LAUGH
) {
2594 if (otmp
&& otmp
->oartifact
== ART_BOAH_WHAT_A_STACK
) {
2596 otmp
->owt
= weight(otmp
);
2598 if (otmp
&& otmp
->oartifact
== ART_ITAK_HONE
) {
2600 otmp
->owt
= weight(otmp
);
2602 if (otmp
&& otmp
->oartifact
== ART_MULTIPOT
) {
2603 otmp
->quan
+= rn1(6,6);
2604 otmp
->owt
= weight(otmp
);
2606 if (otmp
&& otmp
->oartifact
== ART_WIUNEW
) {
2607 otmp
->quan
+= rn1(4,4);
2608 otmp
->owt
= weight(otmp
);
2610 if (otmp
&& otmp
->oartifact
== ART_HEAP_FROM_THE_YARD
) {
2611 otmp
->quan
+= rn1(500,500);
2612 otmp
->owt
= weight(otmp
);
2614 if (otmp
&& otmp
->oartifact
== ART_PEWWWWWWW
) {
2615 otmp
->quan
+= rn1(9,9);
2616 otmp
->owt
= weight(otmp
);
2618 if (otmp
&& otmp
->oartifact
== ART_LITTLE_BOY
) {
2619 otmp
->quan
+= rnz(10);
2620 otmp
->owt
= weight(otmp
);
2622 if (otmp
&& otmp
->oartifact
== ART_DOHLOW
) {
2624 otmp
->owt
= weight(otmp
);
2626 if (otmp
&& otmp
->oartifact
== ART_TROPICAL_WOOD_SELECTION
) {
2628 otmp
->owt
= weight(otmp
);
2630 if (otmp
&& otmp
->oartifact
== ART_REGROWN_RESOURCE
) {
2631 otmp
->oerodeproof
= TRUE
;
2633 otmp
->owt
= weight(otmp
);
2635 if (otmp
&& otmp
->oartifact
== ART_JUMPING_FLAMING_HE_TIE_CLI
) {
2636 otmp
->quan
+= rnz(50);
2637 otmp
->owt
= weight(otmp
);
2639 if (otmp
&& otmp
->oartifact
== ART_SUNSET_SASAPARILLA
) {
2640 otmp
->quan
+= rn1(10,10);
2641 otmp
->owt
= weight(otmp
);
2643 if (otmp
&& otmp
->oartifact
== ART_POINTED_JAVELIN
) {
2644 otmp
->quan
+= rn1(5, 5);
2645 otmp
->owt
= weight(otmp
);
2647 if (otmp
&& otmp
->oartifact
== ART______STOCKPILE
) {
2649 otmp
->owt
= weight(otmp
);
2651 if (otmp
&& otmp
->oartifact
== ART_WU_TSCHI_
) {
2652 otmp
->quan
+= rnd(10);
2653 otmp
->owt
= weight(otmp
);
2655 if (otmp
&& otmp
->oartifact
== ART_POEPOEPOEPOEOEU_
) {
2657 otmp
->owt
= weight(otmp
);
2659 if (otmp
&& otmp
->oartifact
== ART_WELLDER_GRANT
) {
2660 otmp
->quan
+= rn1(3, 2);
2661 otmp
->owt
= weight(otmp
);
2663 if (otmp
&& otmp
->oartifact
== ART_KSSCHL__KSSCHL_
) {
2665 otmp
->owt
= weight(otmp
);
2667 if (otmp
&& otmp
->oartifact
== ART_ZIEIEIE_
) {
2669 otmp
->owt
= weight(otmp
);
2671 if (otmp
&& otmp
->oartifact
== ART_LOROFEM
) {
2672 otmp
->quan
+= rn1(7, 3);
2673 otmp
->owt
= weight(otmp
);
2675 if (otmp
&& otmp
->oartifact
== ART_THEO_S_BOX
) {
2676 otmp
->quan
+= rnd(otmp
->quan
* 4);
2677 otmp
->owt
= weight(otmp
);
2679 if (otmp
&& otmp
->oartifact
== ART_MUHISH
) {
2681 otmp
->owt
= weight(otmp
);
2683 if (otmp
&& otmp
->oartifact
== ART_SENSHI_NO_BICHIKU
) {
2685 otmp
->owt
= weight(otmp
);
2687 if (otmp
&& otmp
->oartifact
== ART_LARGE_MAGAZINE
) {
2689 otmp
->owt
= weight(otmp
);
2691 if (otmp
&& otmp
->oartifact
== ART_COUPLE_IN_THE_BOX
) {
2693 otmp
->owt
= weight(otmp
);
2695 if (otmp
&& otmp
->oartifact
== ART_HUGESTOCK
) {
2697 otmp
->owt
= weight(otmp
);
2699 if (otmp
&& otmp
->oartifact
== ART_FLIUFLIUFLIUUUUUUU_
) {
2701 otmp
->owt
= weight(otmp
);
2703 if (otmp
&& otmp
->oartifact
== ART_KLARNIGUR
) {
2705 otmp
->owt
= weight(otmp
);
2707 if (otmp
&& otmp
->oartifact
== ART_COMPLETE_BUGNOSE
) {
2708 pline("Lol, you have encountered a nose!");
2710 if (otmp
&& otmp
->oartifact
== ART_FIELD_INITED__SORRY
) {
2711 int fieldtrapamount
= rn1(11,11);
2712 while (fieldtrapamount
> 0) {
2714 makerandomtrap(TRUE
);
2717 if (otmp
&& otmp
->oartifact
== ART_COB_AUTO
) {
2718 otmp
->quan
*= rn1(3,3);
2719 otmp
->owt
= weight(otmp
);
2720 if (objects
[otmp
->otyp
].oc_material
!= MT_COBALT
) objects
[otmp
->otyp
].oc_material
= MT_COBALT
;
2722 if (otmp
&& otmp
->oartifact
== ART_ETHER_DAGGER
) {
2723 if (objects
[otmp
->otyp
].oc_material
!= MT_ETHER
) objects
[otmp
->otyp
].oc_material
= MT_ETHER
;
2725 if (otmp
&& otmp
->oartifact
== ART_DAGGER_SURROUNDED_BY_WIND
) {
2726 if (objects
[otmp
->otyp
].oc_material
!= MT_ETHER
) objects
[otmp
->otyp
].oc_material
= MT_ETHER
;
2728 if (otmp
&& otmp
->oartifact
== ART_BOW_SURROUNDED_BY_WIND
) {
2729 if (objects
[otmp
->otyp
].oc_material
!= MT_ETHER
) objects
[otmp
->otyp
].oc_material
= MT_ETHER
;
2731 if (otmp
&& otmp
->oartifact
== ART_FLIUMILL
) {
2733 otmp
->owt
= weight(otmp
);
2735 if (otmp
&& otmp
->oartifact
== ART_VENOREAL
&& Role_if(PM_POISON_MAGE
)) {
2738 otmp
->owt
= weight(otmp
);
2740 if (otmp
&& otmp
->oartifact
== ART_MUCHO_TALCUM
) otmp
->age
*= 3;
2741 if (otmp
&& otmp
->oartifact
== ART_HALLOWEEN_FUEL
) otmp
->age
*= 2;
2742 if (otmp
&& otmp
->oartifact
== ART_QUASIMAGICAL_SHINE
) {
2745 if (otmp
&& otmp
->oartifact
== ART_ALL_WASTED
) {
2747 if (otmp
->quan
< 1) otmp
->quan
= 1;
2748 otmp
->owt
= weight(otmp
);
2751 /* Light up Candle of Eternal Flame and
2752 * Holy Spear of Light on creation.
2754 if (!artiexist
[m
] && artifact_light(otmp
) &&
2755 otmp
->oartifact
!= ART_SUNSWORD
&& otmp
->oartifact
!= ART_SUNSCREEN
&& otmp
->oartifact
!= ART_SUNTINOPENER
&& otmp
->oartifact
!= ART_SUNRUBBERHOSE
)
2756 begin_burn(otmp
, FALSE
);
2757 /*otmp->quan = 1;*/ /* guarantee only one of this artifact */ /* Amy edit: artifact ammo should not suck... */
2758 /* Artifacts are immune to unpolypile --ALI */
2759 if (is_hazy(otmp
)) {
2760 (void) stop_timer(UNPOLY_OBJ
, (void *) otmp
);
2761 otmp
->oldtyp
= STRANGE_OBJECT
;
2764 /* the age field is used both for lightsaber power and the invoke timer... ugh --Amy
2765 * but thankfully we can fix that BS, now we use otmp->invoketimer */
2766 /* if (a->inv_prop || otmp->oartifact == ART_LIGHTSABER_PROTOTYPE || otmp->oartifact == ART_DEFINITE_LIGHTSABER) */
2767 otmp
->invoketimer
= 0;
2768 if ((mod
== FALSE
) || rn2(100)) artiexist
[m
] = mod
;
2770 } /* if artimatch */
2771 } /* for artilist */
2779 int n
= SIZE(artiexist
);
2782 if(artiexist
[--n
]) a
++;
2790 spec_ability(otmp
, abil
)
2794 const struct artifact
*arti
= get_artifact(otmp
);
2796 return((boolean
)(arti
&& (arti
->spfx
& abil
)));
2800 cspec_ability(otmp
, abil
)
2804 const struct artifact
*arti
= get_artifact(otmp
);
2806 return((boolean
)(arti
&& (arti
->cspfx
& abil
)));
2809 /* determine if a given artifact is "evil" (used in pickup.c) --Amy */
2814 return (obj
->oartifact
&& spec_ability(obj
, SPFX_EVIL
));
2817 /* determine if a given artifact is nonwishable --Amy */
2819 arti_nonwishable(obj
)
2822 return (obj
->oartifact
&& spec_ability(obj
, SPFX_NOWISH
));
2825 /* used so that callers don't need to known about SPFX_ codes
2826 * Amy edit: gaaaaaaaaah idiotic vanilla programmers, why don't you differ between "confers luck when equipped" and
2827 * "confers luck when carried"??? that's, like, SO stupid, why even have those flags in the first place if you can't be
2828 * bothered to make them work? */
2833 boolean invokenotworn
= FALSE
;
2834 /* might as well check for this too */
2835 if (obj
->otyp
== LUCKSTONE
) return TRUE
;
2837 if (obj
->otyp
== FEDORA
&& obj
== uarmh
) return TRUE
;
2839 if (obj
->oartifact
&& spec_ability(obj
, SPFX_LUCK
)) {
2841 if (obj
->oclass
== ARMOR_CLASS
&& !(obj
->owornmask
& W_ARMOR
) ) invokenotworn
= TRUE
;
2842 if (obj
->oclass
== WEAPON_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2843 if (obj
->oclass
== RING_CLASS
&& !(obj
->owornmask
& W_RING
) ) invokenotworn
= TRUE
;
2844 if (obj
->oclass
== AMULET_CLASS
&& !(obj
->owornmask
& W_AMUL
) ) invokenotworn
= TRUE
;
2845 if (obj
->oclass
== IMPLANT_CLASS
&& !(obj
->owornmask
& W_IMPLANT
) ) invokenotworn
= TRUE
;
2846 if (obj
->oclass
== BALL_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2847 if (obj
->oclass
== CHAIN_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2848 if (obj
->oclass
== VENOM_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2849 if (obj
->oclass
== GEM_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2850 if (is_weptool(obj
) && !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2851 if (is_blindfold_slot(obj
) && !(obj
->owornmask
& W_TOOL
) ) invokenotworn
= TRUE
;
2853 if (obj
->oclass
!= ARMOR_CLASS
&& obj
->oclass
!= RING_CLASS
&& obj
->oclass
!= AMULET_CLASS
&& obj
->oclass
!= IMPLANT_CLASS
&& !(is_blindfold_slot(obj
)) && !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
2855 if (!invokenotworn
) return TRUE
;
2858 if (obj
->oartifact
&& cspec_ability(obj
, SPFX_LUCK
)) return TRUE
;
2863 /* used to check whether a monster is getting reflection from an artifact */
2868 const struct artifact
*arti
= get_artifact(obj
);
2871 /* while being worn */
2872 if ((obj
->owornmask
& ~W_ART
) && (arti
->spfx
& SPFX_REFLECT
))
2874 /* just being carried */
2875 if (arti
->cspfx
& SPFX_REFLECT
) return TRUE
;
2884 restrict_name(otmp
, name
) /* returns 1 if name is restricted for otmp->otyp */
2885 register struct obj
*otmp
;
2886 register const char *name
;
2888 register const struct artifact
*a
;
2889 register const char *aname
;
2891 if (!*name
) return FALSE
;
2892 if (!strncmpi(name
, "the ", 4)) name
+= 4;
2894 /* Since almost every artifact is SPFX_RESTR, it doesn't cost
2895 us much to do the string comparison before the spfx check.
2896 Bug fix: don't name multiple elven daggers "Sting".
2898 for (a
= artilist
+1; a
->otyp
; a
++) {
2899 /*if (a->otyp != otmp->otyp) continue;*/ /* artifact naming bug --Amy */
2901 if (!strncmpi(aname
, "the ", 4)) aname
+= 4;
2902 if (!strcmp(aname
, name
))
2903 return ((boolean
)((a
->spfx
& (SPFX_NOGEN
|SPFX_RESTR
)) != 0 ||
2911 attacks(adtyp
, otmp
)
2913 register struct obj
*otmp
;
2915 register const struct artifact
*weap
;
2917 if ((weap
= get_artifact(otmp
)) != 0)
2918 return((boolean
)(weap
->attk
.adtyp
== adtyp
));
2923 defends(adtyp
, otmp
)
2925 register struct obj
*otmp
;
2927 register const struct artifact
*weap
;
2929 if ((weap
= get_artifact(otmp
)) != 0)
2930 return((boolean
)(weap
->defn
.adtyp
== adtyp
));
2934 /* used for monsters */
2936 protects(adtyp
, otmp
)
2940 register const struct artifact
*weap
;
2942 if ((weap
= get_artifact(otmp
)) != 0)
2943 return (boolean
)(weap
->cary
.adtyp
== adtyp
);
2948 * a potential artifact has just been worn/wielded/picked-up or
2949 * unworn/unwielded/dropped. Pickup/drop only set/reset the W_ART mask.
2952 set_artifact_intrinsic(otmp
,on
,wp_mask
)
2953 register struct obj
*otmp
;
2958 register const struct artifact
*oart
= get_artifact(otmp
);
2964 /* effects from the defn field */
2965 dtyp
= (wp_mask
!= W_ART
) ? oart
->defn
.adtyp
: oart
->cary
.adtyp
;
2967 if (dtyp
== AD_FIRE
)
2968 mask
= &EFire_resistance
;
2969 else if (dtyp
== AD_COLD
)
2970 mask
= &ECold_resistance
;
2971 else if (dtyp
== AD_ACID
)
2972 mask
= &EAcid_resistance
;
2973 else if (dtyp
== AD_ELEC
)
2974 mask
= &EShock_resistance
;
2975 else if (dtyp
== AD_MAGM
)
2977 else if (dtyp
== AD_DISN
)
2978 mask
= &EDisint_resistance
;
2979 else if (dtyp
== AD_DRST
)
2980 mask
= &EPoison_resistance
;
2981 else if (dtyp
== AD_STUN
)
2982 mask
= &EStun_resist
;
2983 else if (dtyp
== AD_DRLI
)
2984 mask
= &EDrain_resistance
;
2986 if (mask
&& wp_mask
== W_ART
&& !on
) {
2987 /* find out if some other artifact also confers this intrinsic */
2988 /* if so, leave the mask alone */
2989 register struct obj
* obj
;
2990 for(obj
= invent
; obj
; obj
= obj
->nobj
)
2991 if(obj
!= otmp
&& obj
->oartifact
) {
2992 register const struct artifact
*art
= get_artifact(obj
);
2993 if(art
->cary
.adtyp
== dtyp
) {
3000 if (on
) *mask
|= wp_mask
;
3001 else *mask
&= ~wp_mask
;
3004 /* intrinsics from the spfx field; there could be more than one */
3005 spfx
= (wp_mask
!= W_ART
) ? oart
->spfx
: oart
->cspfx
;
3006 if(spfx
&& wp_mask
== W_ART
&& !on
) {
3007 /* don't change any spfx also conferred by other artifacts */
3008 register struct obj
* obj
;
3009 for(obj
= invent
; obj
; obj
= obj
->nobj
)
3010 if(obj
!= otmp
&& obj
->oartifact
) {
3011 register const struct artifact
*art
= get_artifact(obj
);
3012 spfx
&= ~art
->cspfx
;
3016 if (spfx
& SPFX_SEARCH
) {
3017 if(on
) ESearching
|= wp_mask
;
3018 else ESearching
&= ~wp_mask
;
3020 if (spfx
& SPFX_SEEK
) {
3021 if(on
) ESearching
|= wp_mask
;
3022 else ESearching
&= ~wp_mask
;
3024 if (spfx
& SPFX_HALRES
) {
3025 /* make_hallucinated must (re)set the mask itself to get
3026 * the display right */
3027 /* restoring needed because this is the only artifact intrinsic
3028 * that can print a message--need to guard against being printed
3029 * when restoring a game
3031 (void) make_hallucinated((long)!on
, restoring
? FALSE
: TRUE
, wp_mask
);
3033 if (spfx
& SPFX_ESP
) {
3034 if(on
) ETelepat
|= wp_mask
;
3035 else ETelepat
&= ~wp_mask
;
3038 if (spfx
& SPFX_STLTH
) {
3039 if (on
) EStealth
|= wp_mask
;
3040 else EStealth
&= ~wp_mask
;
3042 if (spfx
& SPFX_REGEN
) {
3043 if (on
) ERegeneration
|= wp_mask
;
3044 else ERegeneration
&= ~wp_mask
;
3046 if (spfx
& SPFX_TCTRL
) {
3047 if (on
) ETeleport_control
|= wp_mask
;
3048 else ETeleport_control
&= ~wp_mask
;
3050 /* weapon warning is specially handled in mon.c */
3051 if (spfx
& SPFX_WARN
) {
3052 if (spec_m2(otmp
)) {
3054 EWarn_of_mon
|= wp_mask
;
3055 flags
.warntype
|= spec_m2(otmp
);
3057 EWarn_of_mon
&= ~wp_mask
;
3058 flags
.warntype
&= ~spec_m2(otmp
);
3062 if (on
) EWarning
|= wp_mask
;
3063 else EWarning
&= ~wp_mask
;
3066 if (spfx
& SPFX_EREGEN
) {
3067 if (on
) EEnergy_regeneration
|= wp_mask
;
3068 else EEnergy_regeneration
&= ~wp_mask
;
3070 if (spfx
& SPFX_HSPDAM
) {
3071 if (on
) EHalf_spell_damage
|= wp_mask
;
3072 else EHalf_spell_damage
&= ~wp_mask
;
3074 if (spfx
& SPFX_HPHDAM
) {
3075 if (on
) EHalf_physical_damage
|= wp_mask
;
3076 else EHalf_physical_damage
&= ~wp_mask
;
3078 if (spfx
& SPFX_PROTEC
) {
3081 HProtection |= FROMOUTSIDE;*/
3082 u
.artifactprotection
= 1;
3085 if (u.ublessed <= 0) HProtection &= ~FROMOUTSIDE;*/
3086 u
.artifactprotection
= 0;
3089 if (spfx
& SPFX_XRAY
) {
3090 if (on
) EAstral_vision
|= wp_mask
;
3091 else EAstral_vision
&= ~wp_mask
;
3092 /* xray_range is now modified in allmain.c --Amy */
3094 /* KMH -- Reflection when wielded */
3095 if ((spfx
& SPFX_REFLECT
)) { /* fix by Chris_ANG - why the heck was this on being wielded only??? */
3096 if (on
) EReflecting
|= wp_mask
;
3097 else EReflecting
&= ~wp_mask
;
3100 if(wp_mask
== W_ART
&& !on
&& oart
->inv_prop
) {
3101 /* might have to turn off invoked power too */
3102 if (oart
->inv_prop
<= LAST_PROP
&&
3103 (u
.uprops
[oart
->inv_prop
].extrinsic
& W_ARTI
))
3104 (void) arti_invoke(otmp
);
3109 * creature (usually player) tries to touch (pick up or wield) an artifact obj.
3110 * Returns 0 if the object refuses to be touched.
3111 * This routine does not change any object chains.
3112 * Ignores such things as gauntlets, assuming the artifact is not
3113 * fooled by such trappings.
3116 touch_artifact(obj
,mon
)
3120 register const struct artifact
*oart
= get_artifact(obj
);
3121 boolean badclass
, badalign
, self_willed
, yours
;
3125 /* [ALI] Thiefbane has a special affinity with shopkeepers */
3126 if (mon
->isshk
&& obj
->oartifact
== ART_THIEFBANE
) return 1;
3128 yours
= (mon
== &youmonst
);
3129 /* all quest artifacts are self-willed; it this ever changes, `badclass'
3130 will have to be extended to explicitly include quest artifacts */
3131 self_willed
= ((oart
->spfx
& SPFX_INTEL
) != 0);
3133 badclass
= self_willed
&&
3134 ((oart
->role
!= NON_PM
&& !Role_if(oart
->role
)) ||
3135 (oart
->race
!= NON_PM
&& !Race_if(oart
->race
)));
3136 badalign
= (oart
->spfx
& SPFX_RESTR
) && oart
->alignment
!= A_NONE
&&
3137 (oart
->alignment
!= u
.ualign
.type
|| u
.ualign
.record
< 0);
3138 } else if (!is_covetous(mon
->data
) && !is_mplayer(mon
->data
)) {
3139 badclass
= self_willed
&&
3140 oart
->role
!= NON_PM
&& oart
!= &artilist
[ART_EXCALIBUR
];
3141 badalign
= (oart
->spfx
& SPFX_RESTR
) && oart
->alignment
!= A_NONE
&&
3142 (oart
->alignment
!= sgn(mon
->data
->maligntyp
));
3143 } else { /* an M3_WANTSxxx monster or a fake player */
3144 /* special monsters trying to take the Amulet, invocation tools or
3145 quest item can touch anything except for `spec_applies' artifacts */
3146 badclass
= badalign
= FALSE
;
3148 /* weapons which attack specific categories of monsters are
3149 bad for them even if their alignments happen to match */
3150 if (!badalign
&& (oart
->spfx
& SPFX_DBONUS
) != 0) {
3151 struct artifact tmp
;
3154 tmp
.spfx
&= SPFX_DBONUS
;
3155 badalign
= !!spec_applies(&tmp
, mon
);
3158 if (((((badclass
|| badalign
) && self_willed
) || (badalign
&& (!yours
|| !rn2(4)))) && !RngeBlastShielding
) || (ArtiblastEffect
|| u
.uprops
[ARTIBLAST_EFFECT
].extrinsic
|| autismweaponcheck(ART_ULTRA_ANNOYANCE
) || have_blaststone()) ) {
3162 /* Amy change: allowing monsters to just use artifacts anyway, because it's a silly restriction anyway */
3163 /* In Soviet Russia, none of the Kreml's troops may use weapons that have been forged by the enemy, because doing so
3164 * counts as defecting - after all, who knows whose side they're really on if they're not using Russian weapons? */
3166 if (issoviet
) return 0;
3169 You("are blasted by %s power!", s_suffix(the(xname(obj
))));
3170 u
.cnd_artiblastcount
++;
3171 dmg
= d((Race_if(PM_KUTAR
) ? 8 : StrongAntimagic
? 3 : Antimagic
? 6 : 8), (self_willed
? 10 : 6));
3172 if (!issoviet
&& (u
.ulevel
< 10)) { /* picking up unknown artifacts should not be a crapshoot for low-level chars. --Amy */
3175 if (dmg
< 1) dmg
= 1;
3178 /* having the artiblast nastytrap means that blast shielding doesn't prevent artifact blasts, but since we don't
3179 * want the property to be completely useless in that case, it reduces the blast damage instead --Amy */
3181 if ((ArtiblastEffect
|| u
.uprops
[ARTIBLAST_EFFECT
].extrinsic
|| autismweaponcheck(ART_ULTRA_ANNOYANCE
) || have_blaststone()) && RngeBlastShielding
) {
3183 if (dmg
< 1) dmg
= 1;
3186 /* the blasts are just too goddamn annoying, and all they really do is blow your symbiote to smithereens... so, I
3187 * decided that they deal much less damage, unless you have the nastytrap effect or soviet mode. --Amy */
3188 if (!(ArtiblastEffect
|| u
.uprops
[ARTIBLAST_EFFECT
].extrinsic
|| autismweaponcheck(ART_ULTRA_ANNOYANCE
) || have_blaststone()) && !issoviet
) {
3189 dmg
/= (self_willed
? 4 : 6);
3190 if (dmg
< 1) dmg
= 1;
3193 /* Yes, I know, this probably means you cannot instantly die by having an artifact spawn on your location while
3194 * having autopickup on, unless you're a DQ Slime or something, but still... */
3196 /* In Soviet Russia, artifacts are not meant to be used by little children. Parents who want to get rid of their kids place Excaliburs and Stormbringers in their house on purpose, hoping that their offspring will make the mistake of touching it and get killed instantly. --Amy */
3197 if (issoviet
) pline("Bum, vy tol'ko chto vzorvali dlya massivnogo povrezhdeniya. Kha-kha-kha, tip bloka l'da smeyetsya nad vami.");
3199 /*if (wizard) pline("damage calc");*/
3200 sprintf(buf
, "touching an artifact (%s)", oart
->name
);
3201 /*if (wizard) pline("sprintf");*/
3202 losehp(dmg
, buf
, KILLED_BY
);
3203 /*if (wizard) pline("losehp done");*/
3204 exercise(A_WIS
, FALSE
);
3207 /* can pick it up unless you're totally non-synch'd with the artifact
3208 * Amy edit: spawning artifacts that you just cannot pick up is as stupid as role-specific gear in Diablo 2...
3209 * so now, you have a 1 in 4 chance of picking up the item anyway; constant blasts still make the item dangerous */
3210 if (badclass
&& badalign
&& self_willed
&& (rn2(4) || issoviet
) ) {
3212 pline("%s your grasp!", Tobjnam(obj
, "evade"));
3213 if (issoviet
) pline("Muakhakha-kha-kha, ty ne budesh' ispol'zovat' etu shtuku. Zamedleniye.");
3217 /* This is a kludge, but I'm not sure where else to put it */
3218 if (oart
== &artilist
[ART_IRON_BALL_OF_LIBERATION
]) {
3219 if (Role_if(PM_CONVICT
) && (!obj
->oerodeproof
)) {
3220 obj
->oerodeproof
= TRUE
;
3221 obj
->owt
= 900; /* Magically lightened, but still heavy */
3224 if (Punished
&& (obj
!= uball
)) {
3225 unpunish(); /* Remove a mundane heavy iron ball */
3235 /* decide whether an artifact's special attacks apply against mtmp
3236 * Amy edit: MAKE SURE you keep the other function below in line, too! This first one is just for touching artifacts,
3237 * and "wayne intressierts" if a player polyd into a vortex doesn't get blasted when trying to pick up that one artifact
3238 * which has damage bonuses against both elementals and vortices. The important part is that the artifact in question
3239 * actually deals bonus damage to both of those monster types when used in combat, which is now governed by the other
3240 * function while this one will be for stuff that doesn't require the artifact ID.
3241 * Still, why the heck did they make it so that the "artifact" structure doesn't store the artifact ID is beyond me. */
3243 spec_applies(weap
, mtmp
)
3244 register const struct artifact
*weap
;
3248 struct permonst
*ptr
;
3251 if(!(weap
->spfx
& (SPFX_DBONUS
| SPFX_ATTK
)))
3252 return(weap
->attk
.adtyp
== AD_PHYS
);
3254 yours
= (mtmp
== &youmonst
);
3257 /* [ALI] Modified to support multiple DBONUS and ATTK flags set.
3258 * Not all combinations are possible because many DBONUS flags
3259 * use mtype and would conflict. Where combinations are possible,
3260 * both checks must pass in order for the special attack to
3261 * apply against mtmp.
3263 if (weap
->spfx
& SPFX_DMONS
) {
3264 retval
&= (ptr
== &mons
[(int)weap
->mtype
]);
3265 } else if (weap
->spfx
& SPFX_DCLAS
) {
3266 retval
&= (weap
->mtype
== (unsigned long)ptr
->mlet
);
3267 } else if (weap
->spfx
& SPFX_DFLAG1
) {
3268 retval
&= ((ptr
->mflags1
& weap
->mtype
) != 0L);
3269 } else if (weap
->spfx
& SPFX_DFLAG2
) {
3270 retval
&= ((ptr
->mflags2
& weap
->mtype
) || (yours
&&
3271 ((!Upolyd
&& (urace
.selfmask
& weap
->mtype
)) ||
3272 ((weap
->mtype
& M2_WERE
) && u
.ulycn
>= LOW_PM
))));
3274 if (weap
->spfx
& SPFX_DALIGN
) {
3275 retval
&= yours
? (u
.ualign
.type
!= weap
->alignment
) :
3276 (ptr
->maligntyp
== A_NONE
||
3277 sgn(ptr
->maligntyp
) != weap
->alignment
);
3279 if (weap
->spfx
& SPFX_ATTK
) {
3280 struct obj
*defending_weapon
= (yours
? uwep
: MON_WEP(mtmp
));
3282 if (defending_weapon
&& defending_weapon
->oartifact
&&
3283 defends((int)weap
->attk
.adtyp
, defending_weapon
))
3285 switch(weap
->attk
.adtyp
) {
3287 if (yours
? Fire_resistance
: (resists_fire(mtmp
) && !player_will_pierce_resistance()) )
3291 if (yours
? Acid_resistance
: (resists_acid(mtmp
) && !player_will_pierce_resistance()) )
3295 if (yours
? Cold_resistance
: (resists_cold(mtmp
) && !player_will_pierce_resistance()) )
3299 if (yours
? Shock_resistance
: (resists_elec(mtmp
) && !player_will_pierce_resistance()) )
3303 if (yours
? Antimagic
: resists_magm(mtmp
))
3307 if (yours
? Antimagic
: (rn2(100) < ptr
->mr
))
3311 if (yours
? Poison_resistance
: (resists_poison(mtmp
) && !player_will_pierce_resistance()) )
3315 if (yours
? Drain_resistance
: resists_drli(mtmp
))
3319 if (yours
? Stone_resistance
: resists_ston(mtmp
))
3324 default: impossible("Weird weapon special attack.");
3330 /* same function but WE WANT TO BE ABLE TO GET THE BLOODY INDEX NUMBER OF THE BLOODY ARTIFACT GAAAAAH --Amy */
3332 spec_applies_number(weap
, mtmp
, otmp
)
3333 register const struct artifact
*weap
;
3338 struct permonst
*ptr
;
3341 if(!(weap
->spfx
& (SPFX_DBONUS
| SPFX_ATTK
)))
3342 return(weap
->attk
.adtyp
== AD_PHYS
);
3344 yours
= (mtmp
== &youmonst
);
3347 /* [ALI] Modified to support multiple DBONUS and ATTK flags set.
3348 * Not all combinations are possible because many DBONUS flags
3349 * use mtype and would conflict. Where combinations are possible,
3350 * both checks must pass in order for the special attack to
3351 * apply against mtmp.
3353 if (weap
->spfx
& SPFX_DMONS
) {
3354 retval
&= (ptr
== &mons
[(int)weap
->mtype
]);
3355 } else if (weap
->spfx
& SPFX_DCLAS
) {
3356 retval
&= (weap
->mtype
== (unsigned long)ptr
->mlet
);
3358 if (otmp
&& otmp
->oartifact
== ART_JONADAB_S_BRAINSTORMING
) {
3359 if (S_DEMON
== (unsigned long)ptr
->mlet
) retval
= TRUE
;
3361 if (otmp
&& otmp
->oartifact
== ART_SHUGO
) {
3362 if (S_UNICORN
== (unsigned long)ptr
->mlet
) retval
= TRUE
;
3364 if (otmp
&& otmp
->oartifact
== ART_STAFF_OF_MOON
) {
3365 if (S_VORTEX
== (unsigned long)ptr
->mlet
) retval
= TRUE
;
3367 if (otmp
&& otmp
->oartifact
== ART_POLE_OF_MOON
) {
3368 if (S_VORTEX
== (unsigned long)ptr
->mlet
) retval
= TRUE
;
3370 if (otmp
&& otmp
->oartifact
== ART_STAFF_OF_STAR
) {
3371 if (S_VORTEX
== (unsigned long)ptr
->mlet
) retval
= TRUE
;
3373 } else if (weap
->spfx
& SPFX_DFLAG1
) {
3374 retval
&= ((ptr
->mflags1
& weap
->mtype
) != 0L);
3375 } else if (weap
->spfx
& SPFX_DFLAG2
) {
3376 retval
&= ((ptr
->mflags2
& weap
->mtype
) || (yours
&&
3377 ((!Upolyd
&& (urace
.selfmask
& weap
->mtype
)) ||
3378 ((weap
->mtype
& M2_WERE
) && u
.ulycn
>= LOW_PM
))));
3380 if (weap
->spfx
& SPFX_DALIGN
) {
3381 retval
&= yours
? (u
.ualign
.type
!= weap
->alignment
) :
3382 (ptr
->maligntyp
== A_NONE
||
3383 sgn(ptr
->maligntyp
) != weap
->alignment
);
3385 if (weap
->spfx
& SPFX_ATTK
) {
3386 struct obj
*defending_weapon
= (yours
? uwep
: MON_WEP(mtmp
));
3388 if (defending_weapon
&& defending_weapon
->oartifact
&&
3389 defends((int)weap
->attk
.adtyp
, defending_weapon
))
3391 switch(weap
->attk
.adtyp
) {
3393 if (yours
? Fire_resistance
: (resists_fire(mtmp
) && !player_will_pierce_resistance()) )
3397 if (yours
? Acid_resistance
: (resists_acid(mtmp
) && !player_will_pierce_resistance()) )
3401 if (yours
? Cold_resistance
: (resists_cold(mtmp
) && !player_will_pierce_resistance()) )
3405 if (yours
? Shock_resistance
: (resists_elec(mtmp
) && !player_will_pierce_resistance()) )
3409 if (yours
? Antimagic
: resists_magm(mtmp
))
3413 if (yours
? Antimagic
: (rn2(100) < ptr
->mr
))
3417 if (yours
? Poison_resistance
: (resists_poison(mtmp
) && !player_will_pierce_resistance()) )
3421 if (yours
? Drain_resistance
: resists_drli(mtmp
))
3425 if (yours
? Stone_resistance
: resists_ston(mtmp
))
3430 default: impossible("Weird weapon special attack.");
3436 /* return the M2 flags of monster that an artifact's special attacks apply against */
3441 register const struct artifact
*artifact
= get_artifact(otmp
);
3443 return artifact
->mtype
;
3447 /* special attack bonus */
3449 spec_abon(otmp
, mon
)
3453 register const struct artifact
*weap
= get_artifact(otmp
);
3455 /* no need for an extra check for `NO_ATTK' because this will
3456 always return 0 for any artifact which has that attribute */
3458 /* to-hit h@ck by Amy because of the brain-dead programming where PHYS(1,0) gives double damage but PHYS(0,0)
3459 * does not; how the hell am I supposed to make an artifact that only gives double damage but no to-hit??? */
3461 if (otmp
&& otmp
->oartifact
) {
3462 switch (otmp
->oartifact
) {
3464 case ART_BIDETHANDER
:
3465 case ART_MEAT_SCRAPER
:
3467 case ART_RITUAL_RINGED_SPEAR
:
3469 case ART_SCALPEL_OF_LIFE_AND_DEATH
:
3470 case ART_NADJA_S_BROKEN_NAIL
:
3471 case ART_FAMOUS_LANCE
:
3472 case ART_EMERALD_SWORD
:
3473 case ART_NAMED_AFTER_ITSELF
:
3474 case ART_PULVERIZE_EM
:
3475 case ART_POST_OFFICE_COURSE
:
3476 case ART_ROOMMATE_S_SPECIAL_IDEA
:
3477 case ART_MR__AHLBLOW_S_SIGNAGE
:
3478 case ART_DO_YOU_EVEN_LIFT
:
3479 case ART_MARINE_THREAT_NEUTERED
:
3480 case ART_WILD_HEAVY_SWINGS
:
3481 case ART_COMPLETELY_OFF
:
3482 return 0; /* no to-hit bonus */
3484 case ART_ANTILUCKBLADE
:
3485 if (Luck
< 0) return abs((int)Luck
);
3492 if (weap
&& weap
->attk
.damn
&& spec_applies_number(weap
, mon
, otmp
)) {
3493 return (int)weap
->attk
.damn
;
3498 /* special damage bonus */
3500 spec_dbon(otmp
, mon
, tmp
)
3505 register const struct artifact
*weap
= get_artifact(otmp
);
3507 /* damage h@ck by Amy because of the brain-dead programming where PHYS(1,0) gives double damage in addition to
3508 * +1 to-hit; how the hell am I supposed to make an artifact that only gives to-hit but no damage bonus??? */
3509 if (otmp
&& otmp
->oartifact
) {
3510 switch (otmp
->oartifact
) {
3515 case ART_BLOODLETTER
:
3516 case ART_ZUSE_S_COMP
:
3517 case ART_SKIN_DEGREE
:
3518 case ART_WATERTROOPER
:
3519 case ART_MISS_LAUNCHER
:
3523 case ART_LONGBOW_OF_DIANA
:
3524 case ART_HEFFER_S_BOW
:
3526 case ART_HOMING_BEAM
:
3527 case ART_TONA_S_GAMES
:
3528 case ART_VIHAT_BAGUETTEN_BUS_STOP
:
3529 case ART_DIG__OF_COURSE
:
3530 case ART_THEO_S_BOX
:
3532 case ART_ANNOYPRICK
:
3533 case ART_MAUSER_C___CUSTOM
:
3535 case ART_WINNETOU_S_FRIEND
:
3536 return 0; /* no damage bonus */
3538 case ART_ANTILUCKBLADE
: /* h@ck for luck-dependant damage bonus --Amy */
3540 int boosteramount
= abs((int)Luck
);
3541 return rnd(boosteramount
);
3546 case ART_POINT_DEXTER
: /* h@ck for dexterity-dependant damage bonus --Amy */
3547 if (ACURR(A_DEX
) < 1) return 1;
3548 else if (ACURR(A_DEX
) > 25) return rnd(25);
3549 else return rnd(ACURR(A_DEX
));
3555 if (!weap
|| (weap
->attk
.adtyp
== AD_PHYS
&& /* check for `NO_ATTK' */
3556 weap
->attk
.damn
== 0 && weap
->attk
.damd
== 0)) {
3557 spec_dbon_applies
= FALSE
;
3559 spec_dbon_applies
= spec_applies_number(weap
, mon
, otmp
);
3562 /* Amy edit: the fact that they always did max damage was fucked up, IMHO. */
3564 if (spec_dbon_applies
) {
3566 if (otmp
&& otmp
->oartifact
== ART_PULVERIZE_EM
) {
3567 return rnd(max(tmp
* 2, 1)); /* triple damage!! */
3570 /* used to be that launchers wouldn't get double damage... but then how the hell am I supposed to make a
3571 * launcher artifact that deals double damage??? fucked-ass programmers who didn't simply make a SPFX_DBLDAMAGE
3572 * flag so that we can easily add double damage if we want it to be on an artifact... --Amy */
3573 return weap
->attk
.damd
? rnd((int)weap
->attk
.damd
) : rnd(max(tmp
,1)); /* double damage was too strong --Amy */
3580 /* add identified artifact to discoveries list */
3582 discover_artifact(m
)
3587 /* look for this artifact in the discoveries list;
3588 if we hit an empty slot then it's not present, so add it */
3589 for (i
= 0; i
< NROFARTIFACTS
; i
++)
3590 if (artidisco
[i
] == 0 || artidisco
[i
] == m
) {
3594 /* there is one slot per artifact, so we should never reach the
3595 end without either finding the artifact or an empty slot... */
3596 impossible("couldn't discover artifact (%d)", (int)m
);
3599 /* used to decide whether an artifact has been fully identified */
3601 undiscovered_artifact(m
)
3606 /* look for this artifact in the discoveries list;
3607 if we hit an empty slot then it's undiscovered */
3608 for (i
= 0; i
< NROFARTIFACTS
; i
++)
3609 if (artidisco
[i
] == m
)
3611 else if (artidisco
[i
] == 0)
3616 /* display a list of discovered artifacts; return their count */
3618 disp_artifact_discoveries(tmpwin
)
3619 winid tmpwin
; /* supplied by dodiscover() */
3626 for (i
= 0; i
< NROFARTIFACTS
; i
++) {
3627 if (artidisco
[i
] == 0) break; /* empty slot implies end of list */
3629 add_menu(tmpwin
, NO_GLYPH
, &any
, 0, 0, iflags
.menu_headings
,
3630 "Artifacts", MENU_UNSELECTED
);
3632 otyp
= artilist
[m
].otyp
;
3633 sprintf(buf
, " %s [%s %s]", artiname(m
),
3634 align_str(artilist
[m
].alignment
), simple_typename(otyp
));
3635 add_menu(tmpwin
, objnum_to_glyph(otyp
), &any
, 0, 0, ATR_NONE
,
3636 buf
, MENU_UNSELECTED
);
3642 dump_artifact_discoveries()
3647 for (i
= 0; i
< NROFARTIFACTS
; i
++) {
3648 if (artidisco
[i
] == 0) break; /* empty slot implies end of list */
3650 dump("", " Artifacts");
3652 otyp
= artilist
[m
].otyp
;
3653 sprintf(buf
, " %s [%s %s]", artiname(m
),
3654 align_str(artilist
[m
].alignment
), simple_typename(otyp
));
3665 * Magicbane's intrinsic magic is incompatible with normal
3666 * enchantment magic. Thus, its effects have a negative
3667 * dependence on spe. Against low mr victims, it typically
3668 * does "double athame" damage, 2d4. Occasionally, it will
3669 * cast unbalancing magic which effectively averages out to
3670 * 4d4 damage (3d4 against high mr victims), for spe = 0.
3672 * Prior to 3.4.1, the cancel (aka purge) effect always
3673 * included the scare effect too; now it's one or the other.
3674 * Likewise, the stun effect won't be combined with either
3675 * of those two; it will be chosen separately or possibly
3676 * used as a fallback when scare or cancel fails.
3678 * [Historical note: a change to artifact_hit() for 3.4.0
3679 * unintentionally made all of Magicbane's special effects
3680 * be blocked if the defender successfully saved against a
3681 * stun attack. As of 3.4.1, those effects can occur but
3682 * will be slightly less likely than they were in 3.3.x.]
3684 #define MB_MAX_DIEROLL 8 /* rolls above this aren't magical */
3685 static const char * const mb_verb
[2][4] = {
3686 { "probe", "stun", "scare", "cancel" },
3687 { "prod", "amaze", "tickle", "purge" },
3689 #define MB_INDEX_PROBE 0
3690 #define MB_INDEX_STUN 1
3691 #define MB_INDEX_SCARE 2
3692 #define MB_INDEX_CANCEL 3
3694 /* called when someone is being hit by Magicbane */
3696 Mb_hit(magr
, mdef
, mb
, dmgptr
, dieroll
, vis
, hittee
, specialtype
)
3697 struct monst
*magr
, *mdef
; /* attacker and defender */
3698 struct obj
*mb
; /* Magicbane */
3699 int *dmgptr
; /* extra damage target will suffer */
3700 int dieroll
; /* d20 that has already scored a hit */
3701 boolean vis
; /* whether the action can be seen */
3702 char *hittee
; /* target's name: "you" or mon_nam(mdef) */
3703 int specialtype
; /* by Amy: additional effects for specific artifacts */
3707 1 = the stun has 1 in 3 chance to also confuse the opponent
3711 struct permonst
*old_uasmon
;
3713 boolean youattack
= (magr
== &youmonst
),
3714 youdefend
= (mdef
== &youmonst
),
3715 resisted
= FALSE
, do_stun
, do_confuse
, result
;
3716 int attack_indx
, scare_dieroll
= MB_MAX_DIEROLL
/ 2;
3718 result
= FALSE
; /* no message given yet */
3719 /* the most severe effects are less likely at higher enchantment */
3721 scare_dieroll
/= (1 << (mb
->spe
/ 3));
3722 /* if target successfully resisted the artifact damage bonus,
3723 reduce overall likelihood of the assorted special effects */
3724 if (!spec_dbon_applies
) dieroll
+= 1;
3726 /* might stun even when attempting a more severe effect, but
3727 in that case it will only happen if the other effect fails;
3728 extra damage will apply regardless; 3.4.1: sometimes might
3729 just probe even when it hasn't been enchanted */
3730 do_stun
= (max(mb
->spe
,0) < rn2(spec_dbon_applies
? 11 : 7));
3732 /* the special effects also boost physical damage; increments are
3733 generally cumulative, but since the stun effect is based on a
3734 different criterium its damage might not be included; the base
3735 damage is either 1d4 (athame) or 2d4 (athame+spec_dbon) depending
3736 on target's resistance check against AD_STUN (handled by caller)
3737 [note that a successful save against AD_STUN doesn't actually
3738 prevent the target from ending up stunned] */
3739 attack_indx
= MB_INDEX_PROBE
;
3740 *dmgptr
+= rnd(4); /* (2..3)d4 */
3742 attack_indx
= MB_INDEX_STUN
;
3743 *dmgptr
+= rnd(4); /* (3..4)d4 */
3745 if (dieroll
<= scare_dieroll
) {
3746 attack_indx
= MB_INDEX_SCARE
;
3747 *dmgptr
+= rnd(4); /* (3..5)d4 */
3749 if (dieroll
<= (scare_dieroll
/ 2)) {
3750 attack_indx
= MB_INDEX_CANCEL
;
3751 *dmgptr
+= rnd(4); /* (4..6)d4 */
3754 /* give the hit message prior to inflicting the effects */
3755 verb
= mb_verb
[!!Hallucination
][attack_indx
];
3756 if (youattack
|| youdefend
|| vis
) {
3758 pline_The("magic-absorbing weapon %s %s!",
3759 vtense((const char *)0, verb
), hittee
);
3760 /* assume probing has some sort of noticeable feedback
3761 even if it is being done by one monster to another */
3762 if (attack_indx
== MB_INDEX_PROBE
&& !canspotmon(mdef
) && !(mdef
->data
->msound
== MS_DEEPSTATE
) && !(mdef
->egotype_deepstatemember
))
3763 map_invisible(mdef
->mx
, mdef
->my
);
3766 /* now perform special effects */
3767 switch (attack_indx
) {
3768 case MB_INDEX_CANCEL
:
3769 old_uasmon
= youmonst
.data
;
3770 /* No mdef->mcan check: even a cancelled monster can be polymorphed
3771 * into a golem, and the "cancel" effect acts as if some magical
3772 * energy remains in spellcasting defenders to be absorbed later.
3774 boolean alreadycancel
= (youattack
&& mdef
&& mdef
->mcan
);
3776 if (!cancel_monst(mdef
, mb
, youattack
, FALSE
, FALSE
)) {
3781 if (youmonst
.data
!= old_uasmon
)
3782 *dmgptr
= 0; /* rehumanized, so no more damage */
3784 You("lose magical energy!");
3786 if (u
.uen
> 0) u
.uen
--;
3790 if (mdef
->data
== &mons
[PM_CLAY_GOLEM
])
3791 mdef
->mhp
= 1; /* cancelled clay golems will die */
3792 if (youattack
&& !alreadycancel
&& attacktype(mdef
->data
, AT_MAGC
)) {
3793 You("absorb magical energy!");
3802 case MB_INDEX_SCARE
:
3807 nomul(-3, "being scared stiff", TRUE
);
3809 if (magr
&& magr
== u
.ustuck
&& sticks(youmonst
.data
)) {
3810 setustuck((struct monst
*)0);
3811 You("release %s!", mon_nam(magr
));
3815 if (rn2(2) && resist(mdef
, WEAPON_CLASS
, 0, NOTELL
))
3818 monflee(mdef
, 3, FALSE
, (mdef
->mhp
> *dmgptr
));
3820 if (!resisted
) do_stun
= FALSE
;
3824 do_stun
= TRUE
; /* (this is redundant...) */
3827 case MB_INDEX_PROBE
:
3828 if (youattack
&& (mb
->spe
== 0 || !rn2(3 * abs(mb
->spe
)))) {
3829 pline_The("%s is insightful.", verb
);
3830 /* pre-damage status */
3831 probe_monster(mdef
);
3835 /* stun if that was selected and a worse effect didn't occur */
3838 make_stunned((HStun
+ 3), FALSE
);
3839 if (specialtype
== 1 && !rn2(3)) make_confused(HConfusion
+ 4, FALSE
);
3842 if (specialtype
== 1 && !rn2(3)) mdef
->mconf
= 1;
3844 /* avoid extra stun message below if we used mb_verb["stun"] above */
3845 if (attack_indx
== MB_INDEX_STUN
) do_stun
= FALSE
;
3847 /* lastly, all this magic can be confusing... */
3848 do_confuse
= !rn2(12);
3851 make_confused(HConfusion
+ 4, FALSE
);
3856 if (youattack
|| youdefend
|| vis
) {
3857 (void) upstart(hittee
); /* capitalize */
3859 pline("%s %s!", hittee
, vtense(hittee
, "resist"));
3860 shieldeff(youdefend
? u
.ux
: mdef
->mx
,
3861 youdefend
? u
.uy
: mdef
->my
);
3863 if ((do_stun
|| do_confuse
) && flags
.verbose
) {
3867 if (do_stun
) strcat(buf
, "stunned");
3868 if (do_stun
&& do_confuse
) strcat(buf
, " and ");
3869 if (do_confuse
) strcat(buf
, "confused");
3870 pline("%s %s %s%c", hittee
, vtense(hittee
, "are"),
3871 buf
, (do_stun
&& do_confuse
) ? '!' : '.');
3878 /* Function used when someone attacks someone else with an artifact
3879 * weapon. Only adds the special (artifact) damage, and returns a 1 if it
3880 * did something special (in which case the caller won't print the normal
3881 * hit message). This should be called once upon every artifact attack;
3882 * dmgval() no longer takes artifact bonuses into account. Possible
3883 * extension: change the killer so that when an orc kills you with
3884 * Stormbringer it's "killed by Stormbringer" instead of "killed by an orc".
3887 artifact_hit(magr
, mdef
, otmp
, dmgptr
, dieroll
)
3888 struct monst
*magr
, *mdef
;
3891 int dieroll
; /* needed for Magicbane and vorpal blades */
3893 boolean youattack
= (magr
== &youmonst
);
3894 boolean youdefend
= (mdef
== &youmonst
);
3895 boolean vis
= (!youattack
&& magr
&& cansee(magr
->mx
, magr
->my
))
3896 || (!youdefend
&& cansee(mdef
->mx
, mdef
->my
))
3897 || (youattack
&& u
.uswallow
&& mdef
== u
.ustuck
&& !Blind
);
3898 boolean realizes_damage
;
3899 const char *wepdesc
;
3900 static const char you
[] = "you";
3901 char hittee
[BUFSIZ
];
3902 boolean special_applies
;
3903 boolean willreturntrue
= 0;
3904 int specialtype
= 0; /* for magicbane-esque artifacts --Amy */
3906 /* monsters can smash you with e.g. Instant Death even though that's not a melee weapon, this is intentional --Amy
3907 * however, we can't allow the player's pets to smash enemies with such weapons as that would be way too OP! */
3908 if (magr
&& !youattack
&& magr
->mtame
&& (is_launcher(otmp
) || is_missile(otmp
) || is_ammo(otmp
) || (is_lightsaber(otmp
) && !otmp
->lamplit
) || (is_pole(otmp
)) ) ) return 0;
3910 strcpy(hittee
, youdefend
? you
: mon_nam(mdef
));
3912 /* The following takes care of most of the damage, but not all--
3913 * the exception being for level draining, which is specially
3914 * handled. Messages are done in this function, however.
3916 *dmgptr
+= spec_dbon(otmp
, mdef
, *dmgptr
);
3918 if (spec_dbon_applies
)
3919 special_applies
= TRUE
;
3921 const struct artifact
*weap
= get_artifact(otmp
);
3922 special_applies
= weap
&& spec_applies_number(weap
, mdef
, otmp
);
3925 if (youattack
&& youdefend
) {
3926 impossible("attacking yourself with weapon?");
3930 realizes_damage
= (youdefend
|| vis
||
3931 /* feel the effect even if not seen */
3932 (youattack
&& mdef
== u
.ustuck
));
3934 /* the four basic attacks: fire, cold, shock and missiles */
3935 if (attacks(AD_FIRE
, otmp
)) {
3936 if (realizes_damage
)
3937 pline_The("fiery weapon %s %s%c",
3938 !spec_dbon_applies
? "hits" :
3939 (mdef
->data
== &mons
[PM_WATER_ELEMENTAL
]) ?
3940 "vaporizes part of" : "burns",
3941 hittee
, !spec_dbon_applies
? '.' : '!');
3942 if (!rn2(50)) (void) destroy_mitem(mdef
, POTION_CLASS
, AD_FIRE
);
3943 if (!rn2(50)) (void) destroy_mitem(mdef
, SCROLL_CLASS
, AD_FIRE
);
3944 if (!rn2(75)) (void) destroy_mitem(mdef
, SPBOOK_CLASS
, AD_FIRE
);
3945 if (youdefend
&& Slimed
) burn_away_slime();
3946 if (realizes_damage
) willreturntrue
= 1;
3948 if (attacks(AD_COLD
, otmp
)) {
3949 if (realizes_damage
)
3950 pline_The("ice-cold weapon %s %s%c",
3951 !spec_dbon_applies
? "hits" : "freezes",
3952 hittee
, !spec_dbon_applies
? '.' : '!');
3953 if (!rn2(100)) (void) destroy_mitem(mdef
, POTION_CLASS
, AD_COLD
);
3954 if (realizes_damage
) willreturntrue
= 1;
3956 if (attacks(AD_ELEC
, otmp
)) {
3957 if (realizes_damage
)
3958 pline_The("electrified weapon hits%s %s%c",
3959 !spec_dbon_applies
? "" : "! Lightning strikes",
3960 hittee
, !spec_dbon_applies
? '.' : '!');
3961 if (!rn2(150)) (void) destroy_mitem(mdef
, RING_CLASS
, AD_ELEC
);
3962 if (!rn2(150)) (void) destroy_mitem(mdef
, WAND_CLASS
, AD_ELEC
);
3963 if (realizes_damage
) willreturntrue
= 1;
3965 if (attacks(AD_ACID
, otmp
)) {
3966 if (realizes_damage
)
3967 pline_The("corrosive weapon %s %s%c",
3968 !spec_dbon_applies
? "hits" : "vitriolizes",
3969 hittee
, !spec_dbon_applies
? '.' : '!');
3970 if (!rn2(30)) erode_armor(mdef
, TRUE
);
3971 if (realizes_damage
) willreturntrue
= 1;
3973 if (attacks(AD_MAGM
, otmp
)) {
3974 if (realizes_damage
)
3975 pline_The("imaginary widget hits%s %s%c",
3976 !spec_dbon_applies
? "" :
3977 "! A hail of magic missiles strikes",
3978 hittee
, !spec_dbon_applies
? '.' : '!');
3979 if (realizes_damage
) willreturntrue
= 1;
3982 if (attacks(AD_STUN
, otmp
) && dieroll
<= MB_MAX_DIEROLL
) {
3985 if (otmp
->oartifact
== ART_SCREAMOUT
) specialtype
= 1;
3987 /* Magicbane's special attacks (possibly modifies hittee[]) */
3988 if (Mb_hit(magr
, mdef
, otmp
, dmgptr
, dieroll
, vis
, hittee
, specialtype
)) willreturntrue
= 1;
3991 if (!special_applies
) {
3992 /* since damage bonus didn't apply, nothing more to do;
3993 no further attacks have side-effects on inventory */
3994 /* [ALI] The Tsurugi of Muramasa has no damage bonus but
3995 is handled below so avoid early exit if SPFX_BEHEAD set
3996 and the defender is vulnerable */
3997 /* Amy edit: way too many special cases, in the case of
3998 doubt we have to go through the remaining possibilities
3999 anyway to ensure none are missed
4000 * edit again: but we need to make sure only susceptible
4001 monsters are affected! */
4006 if(otmp
->oartifact
== ART_REAVER
){
4008 if(mdef
->minvent
&& (Role_if(PM_PIRATE
) || !rn2(10) ) ){
4009 struct obj
*otmp2
, **minvent_ptr
;
4012 if((otmp2
= mdef
->minvent
) != 0) {
4013 /* take the object away from the monster */
4014 obj_extract_self(otmp2
);
4015 if ((unwornmask
= otmp2
->owornmask
) != 0L) {
4016 mdef
->misc_worn_check
&= ~unwornmask
;
4017 if (otmp2
->owornmask
& W_WEP
) {
4018 setmnotwielded(mdef
,otmp2
);
4021 otmp2
->owornmask
= 0L;
4022 update_mon_intrinsics(mdef
, otmp2
, FALSE
, FALSE
);
4024 /* give the object to the character */
4025 otmp2
= (Role_if(PM_PIRATE
) || Role_if(PM_KORSAIR
) || PirateSpeakOn
) ?
4026 hold_another_object(otmp2
, "Ye snatched but dropped %s.",
4027 doname(otmp2
), "Ye steal: ") :
4028 hold_another_object(otmp2
, "You snatched but dropped %s.",
4029 doname(otmp2
), "You steal: ");
4030 if (otmp2
->otyp
== CORPSE
&&
4031 touch_petrifies(&mons
[otmp2
->corpsenm
]) && (!uarmg
|| FingerlessGloves
)) {
4032 static char kbuf
[BUFSZ
];
4034 sprintf(kbuf
, "a stolen petrifying corpse");
4037 if (otmp2
->otyp
== PETRIFYIUM_BAR
&& (!uarmg
|| FingerlessGloves
)) {
4038 static char kbuf
[BUFSZ
];
4040 sprintf(kbuf
, "a stolen petrifyium bar");
4044 if (otmp2
->otyp
== PETRIFYIUM_BRA
&& (!uarmg
|| FingerlessGloves
)) {
4045 static char kbuf
[BUFSZ
];
4047 sprintf(kbuf
, "a stolen petrifyium bra");
4051 /* more take-away handling, after theft message */
4052 if (unwornmask
& W_WEP
) { /* stole wielded weapon */
4053 possibly_unwield(mdef
, FALSE
);
4054 } else if (unwornmask
& W_ARMG
) { /* stole worn gloves */
4055 mselftouch(mdef
, (const char *)0, TRUE
);
4056 if (mdef
->mhp
<= 0) /* it's now a statue */
4057 return 1; /* monster is dead */
4065 steal(magr
, buf
, FALSE
, FALSE
);
4069 /* find an object to steal, non-cursed if magr is tame */
4070 for (obj
= mdef
->minvent
; obj
; obj
= obj
->nobj
)
4071 if (!magr
->mtame
|| !obj
->cursed
)
4075 char buf
[BUFSZ
], onambuf
[BUFSZ
], mdefnambuf
[BUFSZ
];
4077 /* make a special x_monnam() call that never omits
4078 the saddle, and save it for later messages */
4079 strcpy(mdefnambuf
, x_monnam(mdef
, ARTICLE_THE
, (char *)0, 0, FALSE
));
4080 if (u
.usteed
== mdef
&&
4081 obj
== which_armor(mdef
, W_SADDLE
))
4082 /* "You can no longer ride <steed>." */
4083 dismount_steed(DISMOUNT_POLY
);
4084 obj_extract_self(obj
);
4085 if (obj
->owornmask
) {
4086 mdef
->misc_worn_check
&= ~obj
->owornmask
;
4087 if (obj
->owornmask
& W_WEP
)
4088 setmnotwielded(mdef
,obj
);
4089 obj
->owornmask
= 0L;
4090 update_mon_intrinsics(mdef
, obj
, FALSE
, FALSE
);
4092 /* add_to_minv() might free obj [if it merges] */
4094 strcpy(onambuf
, doname(obj
));
4095 (void) add_to_minv(magr
, obj
);
4097 strcpy(buf
, Monnam(magr
));
4098 pline("%s steals %s from %s!", buf
,
4099 onambuf
, mdefnambuf
);
4101 possibly_unwield(mdef
, FALSE
);
4102 mdef
->mstrategy
&= ~STRAT_WAITFORU
;
4103 mselftouch(mdef
, (const char *)0, FALSE
);
4110 /* STEPHEN WHITE'S NEW CODE */
4111 if (otmp
->oartifact
== ART_SERPENT_S_TONGUE
|| otmp
->oartifact
== ART_GIVE_US_A_NAME
|| otmp
->oartifact
== ART_DIRGE
|| otmp
->oartifact
== ART_TOXIC_PINK
|| otmp
->oartifact
== ART_BIBLICAL_PLAGUE
|| otmp
->oartifact
== ART_THORNS
|| otmp
->oartifact
== ART_DEVIOUS_DILJER
|| otmp
->oartifact
== ART_NECMEASURE
|| otmp
->oartifact
== ART_VENOREAL
|| otmp
->oartifact
== ART_TWISTED_TURN
|| otmp
->oartifact
== ART_VERYGRIMTOOTH
|| otmp
->oartifact
== ART_SHIZUGAMI_S_MIZUCHI
|| otmp
->oartifact
== ART_SCHOSCHO_BARBITUER
|| otmp
->oartifact
== ART_WONDERLIGHT
|| otmp
->oartifact
== ART_WAR_DECLARATION
|| otmp
->oartifact
== ART_GREENLINGS_LASH
|| otmp
->oartifact
== ART_EGRI_DUEU
|| otmp
->oartifact
== ART_POISON_BURST
|| otmp
->oartifact
== ART_THOSE_LAZY_PROGRAMMERS
|| otmp
->oartifact
== ART_HALLOW_MOONFALL
|| otmp
->oartifact
== ART_QUEUE_STAFF
|| otmp
->oartifact
== ART_SNAKELASH
|| otmp
->oartifact
== ART_SWORD_OF_BHELEU
) {
4112 otmp
->dknown
= TRUE
;
4113 pline_The("twisted weapon poisons %s!",
4114 youdefend
? "you" : mon_nam(mdef
));
4115 if (!youdefend
&& otmp
->oartifact
== ART_SCHOSCHO_BARBITUER
) adjalign(-1);
4117 if (youdefend
? (Poison_resistance
&& (StrongPoison_resistance
|| rn2(10)) ) : (resists_poison(mdef
) && !player_will_pierce_resistance()) ) {
4119 You("are not affected by the poison.");
4121 pline("%s seems unaffected by the poison.", Monnam(mdef
));
4129 *dmgptr
+= d(1,6) + 2;
4134 *dmgptr
+= d(2,6) + 4;
4138 *dmgptr
+= d(3,6) + 6;
4141 if (!rn2(20) && !(!youdefend
&& resists_poison(mdef
)) && !(youdefend
&& uarmf
&& uarmf
->oartifact
== ART_PURPLE_JUNGLE
) && !(youdefend
&& uarms
&& uarms
->oartifact
== ART_ANTINSTANT_DEATH
) ) {
4142 pline_The("poison was deadly...");
4144 (youdefend
? Upolyd
? u
.mh
: u
.uhp
: mdef
->mhp
) +
4145 FATAL_DAMAGE_MODIFIER
;
4147 else { *dmgptr
+= d(4,6) + 6; }
4153 if (otmp
->oartifact
== ART_DOOMBLADE
&& dieroll
< 6) {
4155 You("plunge the Doomblade deeply into %s!",
4158 pline("%s plunges the Doomblade deeply into %s!",
4159 Monnam(magr
), hittee
);
4160 if (youattack
&& (PlayerHearsSoundEffects
)) pline(issoviet
? "Tak chto vy dumayete, vy mozhete bit' igru tol'ko potomu, chto vy nashli artefakt. Bednyy zabluzhdayutsya dusha." : "Doaaaaaai!");
4161 *dmgptr
+= rnd(4) * 5;
4165 if (otmp
->oartifact
== ART_FUHITSUYONA_HAMETSU_NO_GAR
&& dieroll
< 6) {
4167 You("plunge the sword deeply into %s!",
4170 pline("%s plunges the sword deeply into %s!",
4171 Monnam(magr
), hittee
);
4172 if (youattack
&& (PlayerHearsSoundEffects
)) pline(issoviet
? "Tak chto vy dumayete, vy mozhete bit' igru tol'ko potomu, chto vy nashli artefakt. Bednyy zabluzhdayutsya dusha." : "Doaaaaaai!");
4173 *dmgptr
+= rnd(4) * 5;
4177 if (otmp
->oartifact
== ART_INRAM
&& !rn2(5)) {
4179 You("ram the heel into %s!", mon_nam(mdef
));
4181 pline("%s rams the heel into %s!", Monnam(magr
), hittee
);
4186 if (otmp
->oartifact
== ART_WOEBLADE
&& dieroll
< 6) {
4188 You("plunge the Woeblade deeply into %s!",
4191 pline("%s plunges the Woeblade deeply into %s!",
4192 Monnam(magr
), hittee
);
4193 if (youattack
&& (PlayerHearsSoundEffects
)) pline(issoviet
? "Tak chto vy dumayete, vy mozhete bit' igru tol'ko potomu, chto vy nashli artefakt. Bednyy zabluzhdayutsya dusha." : "Doaaaaaai!");
4194 *dmgptr
+= rnd(4) * 5;
4198 /* END OF STEPHEN WHITE'S NEW CODE */
4201 if (otmp
->oartifact
== ART_SCALPEL
&& dieroll
< 5) {
4202 /* faster than a speeding bullet is the Gray Mouser... */
4203 pline("There is a flurry of blows!");
4204 /* I suppose this could theoretically continue forever... */
4205 while (dieroll
< 5) {
4206 *dmgptr
+= rnd(8) + 1 + otmp
->spe
;
4210 if (otmp
->oartifact
== ART_HEARTSEEKER
&& dieroll
< 3) {
4211 /* this weapon just sounds nasty... yuck... */
4213 You("plunge Heartseeker into %s!",mon_nam(mdef
));
4215 pline("%s plunges Heartseeker into you!",mon_nam(mdef
));
4217 *dmgptr
+= rnd(6)+rnd(6)+rnd(6)+rnd(6)+4;
4222 /* We really want "on a natural 20" but Nethack does it in */
4223 /* reverse from AD&D. */
4224 if (spec_ability(otmp
, SPFX_BEHEAD
)) {
4225 if ( (otmp
->oartifact
== ART_TSURUGI_OF_MURAMASA
|| otmp
->oartifact
== ART_HAHA_OWNED
|| otmp
->oartifact
== ART_GAYSECT
|| otmp
->oartifact
== ART_THOUSAND_FRAGMENTS
|| otmp
->oartifact
== ART_THEIR_DED
|| otmp
->oartifact
== ART_KAMI_SORI_NO_USUI_HA
|| otmp
->oartifact
== ART_ASHIKAGA_S_REVENGE
|| otmp
->oartifact
== ART_SIGMUND_S_SMALL_LOAD
|| otmp
->oartifact
== ART_KATANA_OF_MASAMUNE
|| otmp
->oartifact
== ART_GOOD_GAME_ZUANG_LI
|| otmp
->oartifact
== ART_MINOPOWER
|| otmp
->oartifact
== ART_LIGHTNING_STROKE
|| otmp
->oartifact
== ART_DRAGONCLAN_SWORD
|| otmp
->oartifact
== ART_KILLING_EDGE
) && dieroll
< 2) {
4226 wepdesc
= "The razor-sharp blade";
4228 if (!youdefend
&& mdef
->data
->geno
& G_UNIQ
) {
4229 if (youattack
) You("critically hit %s!", mon_nam(mdef
));
4230 else if (vis
) pline("%s critically hits %s!", Monnam(magr
), hittee
);
4231 *dmgptr
+= (GushLevel
* 2);
4236 /* not really beheading, but so close, why add another SPFX
4237 * Amy edit: that's like totally imba, man, why on earth does that work even on targets that would be
4238 * too large to bisect or lack a head to behead? let's just make it deal extra damage */
4239 if (youattack
&& u
.uswallow
&& mdef
== u
.ustuck
) {
4240 You("slice %s wide open!", mon_nam(mdef
));
4241 *dmgptr
+= (GushLevel
* 2);
4246 /* allow normal cutworm() call to add extra damage */
4251 if (bigmonst(mdef
->data
)) {
4253 You("slice deeply into %s!",
4256 pline("%s cuts deeply into %s!",
4257 Monnam(magr
), hittee
);
4262 *dmgptr
= 2 * mdef
->mhp
+ FATAL_DAMAGE_MODIFIER
;
4263 pline("%s cuts %s in half!", wepdesc
, mon_nam(mdef
));
4264 if (!youdefend
&& otmp
->oartifact
== ART_HAHA_OWNED
&& otmp
->spe
> -20) otmp
->spe
--;
4265 otmp
->dknown
= TRUE
;
4269 /* Invulnerable player won't be bisected */
4270 if (bigmonst(youmonst
.data
) || (uwep
&& uwep
->oartifact
== ART_KATANA_OF_MASAMUNE
) || StrongDiminishedBleeding
|| Invulnerable
|| ((PlayerInBlockHeels
|| PlayerInWedgeHeels
) && tech_inuse(T_EXTREME_STURDINESS
) && !rn2(2) ) || (Stoned_chiller
&& Stoned
&& !(u
.stonedchilltimer
) && !rn2(3)) ) {
4271 pline("%s cuts deeply into you!",
4272 magr
? Monnam(magr
) : wepdesc
);
4278 /* Players with negative AC's take less damage instead
4279 * of just not getting hit. We must add a large enough
4280 * value to the damage so that this reduction in
4281 * damage does not prevent death.
4283 *dmgptr
= 2 * (Upolyd
? u
.mh
: u
.uhp
) + FATAL_DAMAGE_MODIFIER
;
4284 pline("%s cuts you in half!", wepdesc
);
4285 otmp
->dknown
= TRUE
;
4289 } else if (dieroll
< 2 || (otmp
->oartifact
== ART_VORPAL_BLADE
&& mdef
->data
->mlet
== S_JABBERWOCK
)) {
4290 static const char * const behead_msg
[2] = {
4292 "%s decapitates %s!"
4295 if (!youdefend
&& mdef
->data
->geno
& G_UNIQ
) {
4297 if (!has_head(mdef
->data
) || notonhead
|| u
.uswallow
|| noncorporeal(mdef
->data
) || amorphous(mdef
->data
)) {
4301 if (youattack
) You("critically hit %s!", mon_nam(mdef
));
4302 else if (vis
) pline("%s critically hits %s!", Monnam(magr
), hittee
);
4303 *dmgptr
+= (GushLevel
* 2);
4308 if (youattack
&& u
.uswallow
&& mdef
== u
.ustuck
) {
4311 wepdesc
= artilist
[otmp
->oartifact
].name
;
4313 if (!has_head(mdef
->data
) || notonhead
|| u
.uswallow
) {
4315 pline("Somehow, you miss %s wildly.",
4318 pline("Somehow, %s misses wildly.",
4321 if (youattack
|| vis
) willreturntrue
= 1;
4324 if (noncorporeal(mdef
->data
) || amorphous(mdef
->data
)) {
4325 pline("%s slices through %s %s.", wepdesc
,
4326 s_suffix(mon_nam(mdef
)),
4327 mbodypart(mdef
,NECK
));
4331 *dmgptr
= 2 * mdef
->mhp
+ FATAL_DAMAGE_MODIFIER
;
4332 pline(behead_msg
[rn2(SIZE(behead_msg
))],
4333 wepdesc
, mon_nam(mdef
));
4334 otmp
->dknown
= TRUE
;
4339 if (!has_head(youmonst
.data
) || Role_if(PM_COURIER
)) {
4340 pline("Somehow, %s misses you wildly.", magr
? mon_nam(magr
) : wepdesc
);
4346 if (uamul
&& uamul
->otyp
== AMULET_OF_NECK_BRACE
) {
4347 pline("Somehow, %s misses you wildly.", magr
? mon_nam(magr
) : wepdesc
);
4353 if (powerfulimplants() && uimplant
&& uimplant
->oartifact
== ART_DECAPITATION_UP
) {
4354 pline("Somehow, %s misses you wildly.", magr
? mon_nam(magr
) : wepdesc
);
4361 if (uarmh
&& uarmh
->oartifact
== ART_REST_THE_CASE
) {
4362 pline("Somehow, %s misses you wildly.", magr
? mon_nam(magr
) : wepdesc
);
4369 if (uarmh
&& itemhasappearance(uarmh
, APP_COMPLETE_HELMET
) ) {
4370 pline("%s slices into your %s.", wepdesc
, body_part(NECK
));
4375 if (RngeAntiBeheading
) {
4376 pline("%s slices into your %s.", wepdesc
, body_part(NECK
));
4382 if (noncorporeal(youmonst
.data
) || amorphous(youmonst
.data
)) {
4383 pline("%s slices through your %s.", wepdesc
, body_part(NECK
));
4387 *dmgptr
= 2 * (Upolyd
? u
.mh
: u
.uhp
) + FATAL_DAMAGE_MODIFIER
;
4388 if (Invulnerable
|| ((PlayerInBlockHeels
|| PlayerInWedgeHeels
) && tech_inuse(T_EXTREME_STURDINESS
) && !rn2(2) ) || (Stoned_chiller
&& Stoned
&& !(u
.stonedchilltimer
) && !rn2(3)) ) {
4389 pline("%s slices into your %s.", wepdesc
, body_part(NECK
));
4393 pline(behead_msg
[rn2(SIZE(behead_msg
))],
4395 otmp
->dknown
= TRUE
;
4396 /* Should amulets fall off? */
4403 if (spec_ability(otmp
, SPFX_DRLI
)) {
4406 if (!resists_drli(mdef
)) {
4408 if(otmp
->oartifact
== ART_STORMBRINGER
)
4409 pline_The("%s blade draws the life from %s!",
4412 #if 0 /* OBSOLETE */
4413 else if(otmp
->oartifact
== ART_TENTACLE_STAFF
)
4414 pline("The writhing tentacles draw the life from %s!",
4418 pline("%s draws the life from %s!",
4419 The(distant_name(otmp
, xname
)),
4422 if (mdef
->m_lev
== 0) {
4423 *dmgptr
= 2 * mdef
->mhp
+ FATAL_DAMAGE_MODIFIER
;
4427 mdef
->mhpmax
-= drain
;
4430 if (drain
&& youattack
) healup(drain
, 0, FALSE
, FALSE
);
4431 else if (drain
&& magr
) healup_mon(magr
, drain
, 0, FALSE
, FALSE
);
4433 if (vis
) willreturntrue
= 1;
4435 } else if (!Drain_resistance
) { /* youdefend */
4436 int oldhpmax
= u
.uhpmax
;
4439 You_feel("an %s drain your life!",
4440 otmp
->oartifact
== ART_STORMBRINGER
?
4441 "unholy blade" : "object");
4442 else if (otmp
->oartifact
== ART_STORMBRINGER
)
4443 pline_The("%s blade drains your life!",
4446 pline("%s drains your life!",
4447 The(distant_name(otmp
, xname
)));
4448 losexp("life drainage", FALSE
, TRUE
);
4449 if (magr
&& magr
->mhp
< magr
->mhpmax
) {
4450 magr
->mhp
+= (oldhpmax
- u
.uhpmax
)/2;
4451 if (magr
->mhp
> magr
->mhpmax
) magr
->mhp
= magr
->mhpmax
;
4456 /* WAC -- 1/6 chance of cancellation with foobane weapons */
4457 if (otmp
->oartifact
== ART_GIANTKILLER
||
4458 otmp
->oartifact
== ART_ORCRIST
||
4459 otmp
->oartifact
== ART_DRAGONBANE
||
4460 otmp
->oartifact
== ART_DEMONBANE
||
4461 otmp
->oartifact
== ART_WEREBANE
||
4462 otmp
->oartifact
== ART_TROLLSBANE
||
4463 otmp
->oartifact
== ART_THIEFBANE
||
4464 otmp
->oartifact
== ART_OGRESMASHER
||
4465 otmp
->oartifact
== ART_ELFRIST
) {
4467 if (realizes_damage
) {
4468 pline("%s %s!", The(distant_name(otmp
, xname
)), Blind
?
4469 "roars deafeningly" : "shines brilliantly");
4470 pline("It strikes %s!", hittee
);
4472 cancel_monst(mdef
, otmp
, youattack
, TRUE
, magr
== mdef
);
4476 if (willreturntrue
) return TRUE
;
4481 static NEARDATA
const char recharge_type
[] = { ALLOW_COUNT
, ALL_CLASSES
, 0 };
4482 static NEARDATA
const char invoke_types
[] = { ALL_CLASSES
, 0 };
4483 /* #invoke: an "ugly check" filters out most objects */
4488 register struct obj
*obj
, *acqo
;
4490 if (is_pentagram(u
.ux
, u
.uy
)) {
4491 if (yn("Invoke the magical pentagram?") == 'y') {
4493 You("attune yourself with the magical energy.");
4494 u
.cnd_pentagramamount
++;
4496 if (u
.ualign
.type
== A_CHAOTIC
) adjalign(1);
4499 pline("Your mana increases.");
4501 } else switch (rnd(30)) {
4504 HTeleport_control
+= 2;
4509 acqo
= mkobj_at(SPBOOK_CLASS
, u
.ux
, u
.uy
, FALSE
, FALSE
);
4511 acqo
->bknown
= acqo
->known
= TRUE
;
4512 pline("A book appeared at your %s!", makeplural(body_part(FOOT
)));
4514 pline("Nothing happens...");
4515 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
4516 pline("Oh wait, actually something bad happens...");
4523 (void) monster_detect((struct obj
*)0, 0);
4524 exercise(A_WIS
, TRUE
);
4527 trap_detect((struct obj
*)0);
4530 object_detect((struct obj
*)0, 0);
4534 boolean havegifts
= u
.ugifts
;
4536 if (!havegifts
) u
.ugifts
++;
4538 acqo
= mk_artifact((struct obj
*)0, !rn2(3) ? A_CHAOTIC
: rn2(2) ? A_NEUTRAL
: A_LAWFUL
, TRUE
);
4541 int acqoskill
= get_obj_skill(acqo
, TRUE
);
4543 if (P_MAX_SKILL(acqoskill
) == P_ISRESTRICTED
) {
4544 unrestrict_weapon_skill(acqoskill
);
4545 } else if (P_MAX_SKILL(acqoskill
) == P_UNSKILLED
) {
4546 unrestrict_weapon_skill(acqoskill
);
4547 P_MAX_SKILL(acqoskill
) = P_BASIC
;
4548 } else if (rn2(2) && P_MAX_SKILL(acqoskill
) == P_BASIC
) {
4549 P_MAX_SKILL(acqoskill
) = P_SKILLED
;
4550 } else if (!rn2(4) && P_MAX_SKILL(acqoskill
) == P_SKILLED
) {
4551 P_MAX_SKILL(acqoskill
) = P_EXPERT
;
4552 } else if (!rn2(10) && P_MAX_SKILL(acqoskill
) == P_EXPERT
) {
4553 P_MAX_SKILL(acqoskill
) = P_MASTER
;
4554 } else if (!rn2(100) && P_MAX_SKILL(acqoskill
) == P_MASTER
) {
4555 P_MAX_SKILL(acqoskill
) = P_GRAND_MASTER
;
4556 } else if (!rn2(200) && P_MAX_SKILL(acqoskill
) == P_GRAND_MASTER
) {
4557 P_MAX_SKILL(acqoskill
) = P_SUPREME_MASTER
;
4560 if (Race_if(PM_RUSMOT
)) {
4561 if (P_MAX_SKILL(acqoskill
) == P_ISRESTRICTED
) {
4562 unrestrict_weapon_skill(acqoskill
);
4563 } else if (P_MAX_SKILL(acqoskill
) == P_UNSKILLED
) {
4564 unrestrict_weapon_skill(acqoskill
);
4565 P_MAX_SKILL(acqoskill
) = P_BASIC
;
4566 } else if (rn2(2) && P_MAX_SKILL(acqoskill
) == P_BASIC
) {
4567 P_MAX_SKILL(acqoskill
) = P_SKILLED
;
4568 } else if (!rn2(4) && P_MAX_SKILL(acqoskill
) == P_SKILLED
) {
4569 P_MAX_SKILL(acqoskill
) = P_EXPERT
;
4570 } else if (!rn2(10) && P_MAX_SKILL(acqoskill
) == P_EXPERT
) {
4571 P_MAX_SKILL(acqoskill
) = P_MASTER
;
4572 } else if (!rn2(100) && P_MAX_SKILL(acqoskill
) == P_MASTER
) {
4573 P_MAX_SKILL(acqoskill
) = P_GRAND_MASTER
;
4574 } else if (!rn2(200) && P_MAX_SKILL(acqoskill
) == P_GRAND_MASTER
) {
4575 P_MAX_SKILL(acqoskill
) = P_SUPREME_MASTER
;
4579 discover_artifact(acqo
->oartifact
);
4581 if (!havegifts
) u
.ugifts
--;
4582 pline("An artifact appeared beneath you!");
4586 else pline("Opportunity knocked, but nobody was home. Bummer.");
4592 pline("The RNG decides to curse-weld an item to you.");
4593 bad_artifact_xtra();
4597 int aggroamount
= rnd(6);
4598 if (isfriday
) aggroamount
*= 2;
4600 reset_rndmonst(NON_PM
);
4601 while (aggroamount
) {
4602 u
.cnd_aggravateamount
++;
4603 makemon((struct permonst
*)0, u
.ux
, u
.uy
, MM_ANGRY
|MM_FRENZIED
);
4605 if (aggroamount
< 0) aggroamount
= 0;
4608 pline("Several monsters come out of a portal.");
4614 pline("Your body suddenly becomes all stiff!");
4615 if (isstunfish
) nomul(-(rnz(15)), "paralyzed by a pentagram", TRUE
);
4616 else nomul(-(rnd(15)), "paralyzed by a pentagram", TRUE
);
4620 pline("The dungeon is getting more chaotic!");
4623 do_clear_areaX(u
.ux
, u
.uy
, 12, do_terrainfloodP
, (void *)&madepool
);
4628 You_feel("powered up!");
4633 pline("Suddenly, you gain a new companion!");
4634 (void) make_familiar((struct obj
*)0, u
.ux
, u
.uy
, FALSE
, FALSE
);
4639 if (Aggravate_monster
) {
4641 reset_rndmonst(NON_PM
);
4648 int randsp
, randmnst
, randmnsx
;
4649 struct permonst
*randmonstforspawn
;
4657 randsp
= (rn2(14) + 2);
4658 if (!rn2(10)) randsp
*= 2;
4659 if (!rn2(100)) randsp
*= 3;
4660 if (!rn2(1000)) randsp
*= 5;
4661 if (!rn2(10000)) randsp
*= 10;
4662 randmnst
= (rn2(187) + 1);
4663 randmnsx
= (rn2(100) + 1);
4665 pline("You suddenly feel a surge of tension!");
4667 for (i
= 0; i
< randsp
; i
++) {
4668 /* This function will fill the map with a random amount of monsters of one class. --Amy */
4670 if (!enexto(&dd
, u
.ux
, u
.uy
, (struct permonst
*)0) ) continue;
4673 (void) makemon(mkclass(S_ANT
,0), cx
, cy
, MM_ADJACENTOK
);
4674 else if (randmnst
< 9)
4675 (void) makemon(mkclass(S_BLOB
,0), cx
, cy
, MM_ADJACENTOK
);
4676 else if (randmnst
< 11)
4677 (void) makemon(mkclass(S_COCKATRICE
,0), cx
, cy
, MM_ADJACENTOK
);
4678 else if (randmnst
< 15)
4679 (void) makemon(mkclass(S_DOG
,0), cx
, cy
, MM_ADJACENTOK
);
4680 else if (randmnst
< 18)
4681 (void) makemon(mkclass(S_EYE
,0), cx
, cy
, MM_ADJACENTOK
);
4682 else if (randmnst
< 22)
4683 (void) makemon(mkclass(S_FELINE
,0), cx
, cy
, MM_ADJACENTOK
);
4684 else if (randmnst
< 24)
4685 (void) makemon(mkclass(S_GREMLIN
,0), cx
, cy
, MM_ADJACENTOK
);
4686 else if (randmnst
< 29)
4687 (void) makemon(mkclass(S_HUMANOID
,0), cx
, cy
, MM_ADJACENTOK
);
4688 else if (randmnst
< 33)
4689 (void) makemon(mkclass(S_IMP
,0), cx
, cy
, MM_ADJACENTOK
);
4690 else if (randmnst
< 36)
4691 (void) makemon(mkclass(S_JELLY
,0), cx
, cy
, MM_ADJACENTOK
);
4692 else if (randmnst
< 41)
4693 (void) makemon(mkclass(S_KOBOLD
,0), cx
, cy
, MM_ADJACENTOK
);
4694 else if (randmnst
< 44)
4695 (void) makemon(mkclass(S_LEPRECHAUN
,0), cx
, cy
, MM_ADJACENTOK
);
4696 else if (randmnst
< 47)
4697 (void) makemon(mkclass(S_MIMIC
,0), cx
, cy
, MM_ADJACENTOK
);
4698 else if (randmnst
< 50)
4699 (void) makemon(mkclass(S_NYMPH
,0), cx
, cy
, MM_ADJACENTOK
);
4700 else if (randmnst
< 54)
4701 (void) makemon(mkclass(S_ORC
,0), cx
, cy
, MM_ADJACENTOK
);
4702 else if (randmnst
< 55)
4703 (void) makemon(mkclass(S_PIERCER
,0), cx
, cy
, MM_ADJACENTOK
);
4704 else if (randmnst
< 58)
4705 (void) makemon(mkclass(S_QUADRUPED
,0), cx
, cy
, MM_ADJACENTOK
);
4706 else if (randmnst
< 62)
4707 (void) makemon(mkclass(S_RODENT
,0), cx
, cy
, MM_ADJACENTOK
);
4708 else if (randmnst
< 65)
4709 (void) makemon(mkclass(S_SPIDER
,0), cx
, cy
, MM_ADJACENTOK
);
4710 else if (randmnst
< 66)
4711 (void) makemon(mkclass(S_TRAPPER
,0), cx
, cy
, MM_ADJACENTOK
);
4712 else if (randmnst
< 69)
4713 (void) makemon(mkclass(S_UNICORN
,0), cx
, cy
, MM_ADJACENTOK
);
4714 else if (randmnst
< 71)
4715 (void) makemon(mkclass(S_VORTEX
,0), cx
, cy
, MM_ADJACENTOK
);
4716 else if (randmnst
< 73)
4717 (void) makemon(mkclass(S_WORM
,0), cx
, cy
, MM_ADJACENTOK
);
4718 else if (randmnst
< 75)
4719 (void) makemon(mkclass(S_XAN
,0), cx
, cy
, MM_ADJACENTOK
);
4720 else if (randmnst
< 76)
4721 (void) makemon(mkclass(S_LIGHT
,0), cx
, cy
, MM_ADJACENTOK
);
4722 else if (randmnst
< 77)
4723 (void) makemon(mkclass(S_ZOUTHERN
,0), cx
, cy
, MM_ADJACENTOK
);
4724 else if (randmnst
< 78)
4725 (void) makemon(mkclass(S_ANGEL
,0), cx
, cy
, MM_ADJACENTOK
);
4726 else if (randmnst
< 81)
4727 (void) makemon(mkclass(S_BAT
,0), cx
, cy
, MM_ADJACENTOK
);
4728 else if (randmnst
< 83)
4729 (void) makemon(mkclass(S_CENTAUR
,0), cx
, cy
, MM_ADJACENTOK
);
4730 else if (randmnst
< 86)
4731 (void) makemon(mkclass(S_DRAGON
,0), cx
, cy
, MM_ADJACENTOK
);
4732 else if (randmnst
< 89)
4733 (void) makemon(mkclass(S_ELEMENTAL
,0), cx
, cy
, MM_ADJACENTOK
);
4734 else if (randmnst
< 94)
4735 (void) makemon(mkclass(S_FUNGUS
,0), cx
, cy
, MM_ADJACENTOK
);
4736 else if (randmnst
< 99)
4737 (void) makemon(mkclass(S_GNOME
,0), cx
, cy
, MM_ADJACENTOK
);
4738 else if (randmnst
< 102)
4739 (void) makemon(mkclass(S_GIANT
,0), cx
, cy
, MM_ADJACENTOK
);
4740 else if (randmnst
< 103)
4741 (void) makemon(mkclass(S_JABBERWOCK
,0), cx
, cy
, MM_ADJACENTOK
);
4742 else if (randmnst
< 104)
4743 (void) makemon(mkclass(S_KOP
,0), cx
, cy
, MM_ADJACENTOK
);
4744 else if (randmnst
< 105)
4745 (void) makemon(mkclass(S_LICH
,0), cx
, cy
, MM_ADJACENTOK
);
4746 else if (randmnst
< 108)
4747 (void) makemon(mkclass(S_MUMMY
,0), cx
, cy
, MM_ADJACENTOK
);
4748 else if (randmnst
< 110)
4749 (void) makemon(mkclass(S_NAGA
,0), cx
, cy
, MM_ADJACENTOK
);
4750 else if (randmnst
< 113)
4751 (void) makemon(mkclass(S_OGRE
,0), cx
, cy
, MM_ADJACENTOK
);
4752 else if (randmnst
< 115)
4753 (void) makemon(mkclass(S_PUDDING
,0), cx
, cy
, MM_ADJACENTOK
);
4754 else if (randmnst
< 116)
4755 (void) makemon(mkclass(S_QUANTMECH
,0), cx
, cy
, MM_ADJACENTOK
);
4756 else if (randmnst
< 118)
4757 (void) makemon(mkclass(S_RUSTMONST
,0), cx
, cy
, MM_ADJACENTOK
);
4758 else if (randmnst
< 121)
4759 (void) makemon(mkclass(S_SNAKE
,0), cx
, cy
, MM_ADJACENTOK
);
4760 else if (randmnst
< 123)
4761 (void) makemon(mkclass(S_TROLL
,0), cx
, cy
, MM_ADJACENTOK
);
4762 else if (randmnst
< 124)
4763 (void) makemon(mkclass(S_UMBER
,0), cx
, cy
, MM_ADJACENTOK
);
4764 else if (randmnst
< 125)
4765 (void) makemon(mkclass(S_VAMPIRE
,0), cx
, cy
, MM_ADJACENTOK
);
4766 else if (randmnst
< 127)
4767 (void) makemon(mkclass(S_WRAITH
,0), cx
, cy
, MM_ADJACENTOK
);
4768 else if (randmnst
< 128)
4769 (void) makemon(mkclass(S_XORN
,0), cx
, cy
, MM_ADJACENTOK
);
4770 else if (randmnst
< 130)
4771 (void) makemon(mkclass(S_YETI
,0), cx
, cy
, MM_ADJACENTOK
);
4772 else if (randmnst
< 135)
4773 (void) makemon(mkclass(S_ZOMBIE
,0), cx
, cy
, MM_ADJACENTOK
);
4774 else if (randmnst
< 145)
4775 (void) makemon(mkclass(S_HUMAN
,0), cx
, cy
, MM_ADJACENTOK
);
4776 else if (randmnst
< 147)
4777 (void) makemon(mkclass(S_GHOST
,0), cx
, cy
, MM_ADJACENTOK
);
4778 else if (randmnst
< 149)
4779 (void) makemon(mkclass(S_GOLEM
,0), cx
, cy
, MM_ADJACENTOK
);
4780 else if (randmnst
< 152)
4781 (void) makemon(mkclass(S_DEMON
,0), cx
, cy
, MM_ADJACENTOK
);
4782 else if (randmnst
< 155)
4783 (void) makemon(mkclass(S_EEL
,0), cx
, cy
, MM_ADJACENTOK
);
4784 else if (randmnst
< 160)
4785 (void) makemon(mkclass(S_LIZARD
,0), cx
, cy
, MM_ADJACENTOK
);
4786 else if (randmnst
< 162)
4787 (void) makemon(mkclass(S_BAD_FOOD
,0), cx
, cy
, MM_ADJACENTOK
);
4788 else if (randmnst
< 165)
4789 (void) makemon(mkclass(S_BAD_COINS
,0), cx
, cy
, MM_ADJACENTOK
);
4790 else if (randmnst
< 166) {
4792 (void) makemon(mkclass(S_HUMAN
,0), cx
, cy
, MM_ADJACENTOK
);
4794 (void) makemon(mkclass(S_NEMESE
,0), cx
, cy
, MM_ADJACENTOK
);
4796 else if (randmnst
< 171)
4797 (void) makemon(mkclass(S_GRUE
,0), cx
, cy
, MM_ADJACENTOK
);
4798 else if (randmnst
< 176)
4799 (void) makemon(mkclass(S_WALLMONST
,0), cx
, cy
, MM_ADJACENTOK
);
4800 else if (randmnst
< 180)
4801 (void) makemon(mkclass(S_RUBMONST
,0), cx
, cy
, MM_ADJACENTOK
);
4802 else if (randmnst
< 181) {
4804 (void) makemon(mkclass(S_HUMAN
,0), cx
, cy
, MM_ADJACENTOK
);
4806 (void) makemon(mkclass(S_ARCHFIEND
,0), cx
, cy
, MM_ADJACENTOK
);
4808 else if (randmnst
< 186)
4809 (void) makemon(mkclass(S_TURRET
,0), cx
, cy
, MM_ADJACENTOK
);
4810 else if (randmnst
< 187)
4811 (void) makemon(mkclass(S_FLYFISH
,0), cx
, cy
, MM_ADJACENTOK
);
4813 (void) makemon((struct permonst
*)0, cx
, cy
, MM_ADJACENTOK
);
4821 randsp
= (rn2(14) + 2);
4822 if (!rn2(10)) randsp
*= 2;
4823 if (!rn2(100)) randsp
*= 3;
4824 if (!rn2(1000)) randsp
*= 5;
4825 if (!rn2(10000)) randsp
*= 10;
4826 randmonstforspawn
= rndmonst();
4828 You_feel("the arrival of monsters!");
4830 for (i
= 0; i
< randsp
; i
++) {
4832 if (!enexto(&cc
, u
.ux
, u
.uy
, (struct permonst
*)0) ) continue;
4834 (void) makemon(randmonstforspawn
, cx
, cy
, MM_ADJACENTOK
);
4841 randsp
= (rn2(14) + 2);
4842 if (!rn2(10)) randsp
*= 2;
4843 if (!rn2(100)) randsp
*= 3;
4844 if (!rn2(1000)) randsp
*= 5;
4845 if (!rn2(10000)) randsp
*= 10;
4846 monstercolor
= rnd(15);
4848 You_feel("a colorful sensation!");
4850 for (i
= 0; i
< randsp
; i
++) {
4852 if (!enexto(&cc
, u
.ux
, u
.uy
, (struct permonst
*)0) ) continue;
4854 (void) makemon(colormon(monstercolor
), cx
, cy
, MM_ADJACENTOK
);
4861 randsp
= (rn2(14) + 2);
4862 if (!rn2(10)) randsp
*= 2;
4863 if (!rn2(100)) randsp
*= 3;
4864 if (!rn2(1000)) randsp
*= 5;
4865 if (!rn2(10000)) randsp
*= 10;
4866 monstercolor
= rnd(434);
4868 You_feel("that a group has arrived!");
4870 for (i
= 0; i
< randsp
; i
++) {
4872 if (!enexto(&cc
, u
.ux
, u
.uy
, (struct permonst
*)0) ) continue;
4874 (void) makemon(specialtensmon(monstercolor
), cx
, cy
, MM_ADJACENTOK
);
4885 if (u
.uhunger
< 1500) {
4886 pline("Your %s fills.", body_part(STOMACH
));
4888 u
.uhs
= 1; /* NOT_HUNGRY */
4891 pline("Nothing happens...");
4892 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
4893 pline("Oh wait, actually something bad happens...");
4899 if (u
.ualign
.record
< -1) {
4900 adjalign(-(u
.ualign
.record
/ 2));
4901 You_feel("partially absolved.");
4905 You_feel("appropriately %s.", align_str(u
.ualign
.type
));
4911 /* occasionally get extremely lucky --Amy */
4914 You("feel very skillful, and gain an extra skill slot!");
4918 int nastytrapdur
= (Role_if(PM_GRADUATE
) ? 6 : Role_if(PM_GEEK
) ? 12 : 24);
4919 if (!nastytrapdur
) nastytrapdur
= 24; /* fail safe */
4920 int blackngdur
= (Role_if(PM_GRADUATE
) ? 2000 : Role_if(PM_GEEK
) ? 1000 : 500);
4921 if (!blackngdur
) blackngdur
= 500; /* fail safe */
4923 pline("Your mana increases.");
4925 /* nasty trap effect - no extra message because, well, nastiness! --Amy */
4926 randomnastytrapeffect(rnz(nastytrapdur
* (monster_difficulty() + 1)), (blackngdur
- (monster_difficulty() * 3)));
4933 adjattrib(i
, 1, 0, TRUE
);
4934 adjattrib(i
, 1, 0, TRUE
);
4935 adjattrib(i
, 1, 0, TRUE
);
4936 adjattrib(i
, 1, 0, TRUE
);
4937 adjattrib(i
, 1, 0, TRUE
);
4941 Your("intrinsics change.");
4942 intrinsicgainorloss(0);
4947 pseudo
= mksobj(SCR_ITEM_GENOCIDE
, FALSE
, 2, FALSE
);
4949 pline("Nothing happens...");
4950 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
4951 pline("Oh wait, actually something bad happens...");
4956 if (pseudo
->otyp
== GOLD_PIECE
) pseudo
->otyp
= SCR_ITEM_GENOCIDE
;
4957 (void) seffects(pseudo
);
4958 obfree(pseudo
, (struct obj
*)0); /* now, get rid of it */
4964 doubleskilltraining();
4967 if (!(HAggravate_monster
& INTRINSIC
) && !(HAggravate_monster
& TIMEOUT
)) {
4969 int maxtrainingamount
= 0;
4970 int skillnumber
= 0;
4971 int actualskillselection
= 0;
4972 int amountofpossibleskills
= 1;
4975 for (i
= 0; i
< P_NUM_SKILLS
; i
++) {
4976 if (P_SKILL(i
) != P_ISRESTRICTED
) continue;
4978 if (P_ADVANCE(i
) > 0 && P_ADVANCE(i
) >= maxtrainingamount
) {
4979 if (P_ADVANCE(i
) > maxtrainingamount
) {
4980 amountofpossibleskills
= 1;
4982 maxtrainingamount
= P_ADVANCE(i
);
4983 } else if (!rn2(amountofpossibleskills
+ 1)) {
4984 amountofpossibleskills
++;
4987 amountofpossibleskills
++;
4992 if (skillnumber
> 0 && maxtrainingamount
> 0) {
4993 unrestrict_weapon_skill(skillnumber
);
4995 register int maxcap
= P_BASIC
;
5000 if (maxtrainingamount
>= 20 && !rn2(2)) {
5002 if (maxtrainingamount
>= 160 && !rn2(2)) {
5003 maxcap
= P_GRAND_MASTER
;
5004 if (maxtrainingamount
>= 540 && !rn2(2)) {
5005 maxcap
= P_SUPREME_MASTER
;
5012 P_MAX_SKILL(skillnumber
) = maxcap
;
5013 pline("You can now learn the %s skill, with a new cap of %s.", wpskillname(skillnumber
), maxcap
== P_SUPREME_MASTER
? "supreme master" : maxcap
== P_GRAND_MASTER
? "grand master" : maxcap
== P_MASTER
? "master" : maxcap
== P_EXPERT
? "expert" : maxcap
== P_SKILLED
? "skilled" : "basic");
5015 pline("Nothing happens...");
5016 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
5017 pline("Oh wait, actually something bad happens...");
5024 if (HAggravate_monster
& INTRINSIC
) {
5025 HAggravate_monster
&= ~INTRINSIC
;
5026 You_feel("more acceptable!");
5028 if (HAggravate_monster
& TIMEOUT
) {
5029 HAggravate_monster
&= ~TIMEOUT
;
5030 You_feel("more acceptable!");
5036 reset_rndmonst(NON_PM
);
5038 register struct permonst
*ptrZ
;
5044 if (attempts
&& (attempts
% 10000 == 0)) u
.mondiffhack
++;
5045 if (!rn2(2000)) reset_rndmonst(NON_PM
);
5047 } while ( (!ptrZ
|| (ptrZ
&& !(ptrZ
->geno
& G_UNIQ
))) && attempts
< 50000);
5049 if (ptrZ
&& ptrZ
->geno
& G_UNIQ
) {
5050 if (wizard
) pline("monster generation: %s", ptrZ
->mname
);
5051 (void) makemon(ptrZ
, u
.ux
, u
.uy
, MM_ANGRY
);
5064 pline("Boss monsters appear from nowhere!");
5073 if (evilfriday
) evilragnarok(TRUE
,level_difficulty());
5078 u
.heavyaggravation
= 1;
5079 DifficultyIncreased
+= 1;
5080 HighlevelStatus
+= 1;
5081 EntireLevelMode
+= 1;
5083 (void) makemon(mkclass(S_NEMESE
,0), u
.ux
, u
.uy
, MM_ANGRY
|MM_FRENZIED
);
5086 u
.heavyaggravation
= 0;
5097 boolean canbeinawall
= FALSE
;
5098 if (!rn2(Passes_walls
? 5 : 25)) canbeinawall
= TRUE
;
5099 register struct trap
*ttmp
;
5100 for (tryct
= 0; tryct
< 2000; tryct
++) {
5104 if (isok(x
, y
) && ((levl
[x
][y
].typ
> DBWALL
) || canbeinawall
) && !(t_at(x
, y
)) ) {
5105 ttmp
= maketrap(x
, y
, rndtrap(), 0, TRUE
);
5108 ttmp
->hiddentrap
= 1;
5114 You_feel("in grave danger...");
5121 if (!uinsymbiosis
) {
5122 getrandomsymbiote(FALSE
, FALSE
);
5123 pline("Suddenly you have a symbiote!");
5125 u
.usymbiote
.mhpmax
+= rnd(10);
5126 maybe_evolve_symbiote();
5127 if (u
.usymbiote
.mhpmax
> 500) u
.usymbiote
.mhpmax
= 500;
5129 Your("symbiote seems much stronger now.");
5134 You_feel("decontaminated.");
5137 pline("Wow! This makes you feel good!");
5141 for (ii
= 0; ii
< A_MAX
; ii
++) {
5143 if (i
== A_STR
&& u
.uhs
>= 3) --lim
; /* WEAK */
5144 if (ABASE(i
) < lim
) {
5149 if(++i
>= A_MAX
) i
= 0;
5155 boostknownskillcap();
5158 impossible("undefined pentagram effect");
5163 if (!rn2(6) && IS_PENTAGRAM(levl
[u
.ux
][u
.uy
].typ
)) {
5166 if (yn("Make the pentagram fade?") == 'n')
5170 levl
[u
.ux
][u
.uy
].typ
= ROOM
;
5171 pline_The("pentagram fades away completely.");
5179 obj
= getobj(invoke_types
, "invoke");
5181 if (obj
->oartifact
&& !touch_artifact(obj
, &youmonst
)) return 1;
5182 return arti_invoke(obj
);
5187 register struct obj
*obj
;
5189 register const struct artifact
*oart
= get_artifact(obj
);
5190 register struct monst
*mtmp
;
5191 register struct monst
*mtmp2
;
5192 register struct permonst
*pm
;
5200 /* highly randomized timeout; squeaking skill helps --Amy */
5201 int artitimeout
= rnz(2000);
5202 if (!rn2(5)) artitimeout
= rnz(20000);
5203 if (!PlayerCannotUseSkills
) {
5204 switch (P_SKILL(P_SQUEAKING
)) {
5205 case P_BASIC
: artitimeout
*= 9; artitimeout
/= 10; break;
5206 case P_SKILLED
: artitimeout
*= 8; artitimeout
/= 10; break;
5207 case P_EXPERT
: artitimeout
*= 7; artitimeout
/= 10; break;
5208 case P_MASTER
: artitimeout
*= 6; artitimeout
/= 10; break;
5209 case P_GRAND_MASTER
: artitimeout
*= 5; artitimeout
/= 10; break;
5210 case P_SUPREME_MASTER
: artitimeout
*= 4; artitimeout
/= 10; break;
5214 if (artitimeout
< 1) artitimeout
= 1; /* fail safe */
5216 if (obj
->oartifact
== ART_FUEL_NAIL
) {
5217 if (u
.roxannemode
) {
5218 pline("You can only summon Roxanne once.");
5221 u
.roxannemode
= TRUE
;
5222 use_skill(P_SQUEAKING
, 20);
5224 register struct monst
*roxannesummon
;
5225 roxannesummon
= makemon(&mons
[PM_ROXANNE
], u
.ux
, u
.uy
, NO_MM_FLAGS
);
5226 if (roxannesummon
) {
5228 /* she's traitorious, and anyway you could get unlucky to have her be untamed by something, so we
5229 * specifically change her permonst struct permanently to allow you to tame her with food */
5230 struct permonst
* poisonroxanne
= &mons
[PM_ROXANNE
];
5231 poisonroxanne
->mflags2
|= M2_DOMESTIC
;
5233 tamedog(roxannesummon
, (struct obj
*) 0, TRUE
);
5234 verbalize("You've summoned me! I'll fight on your side. If you want to power me up, chat to me and give me a few crossbow bolts, then I'll turn on my poison enchantment that will poison our enemies.");
5240 if (obj
->oartifact
== ART_RE_POISON
) {
5242 if (!obj
->opoisoned
) {
5243 obj
->opoisoned
= TRUE
;
5244 pline("The arrows have been poisoned.");
5245 } else pline("These arrows are already poisoned.");
5249 if (obj
->oartifact
== ART_ATARU_ONE
) {
5250 if (!u
.ataruinvoked
&& !exist_artifact(ETERNIUM_BLADE
, artiname(ART_ATARU_TWO
))) {
5251 register struct obj
*trophy
;
5252 u
.ataruinvoked
= TRUE
;
5253 trophy
= mksobj(ETERNIUM_BLADE
, TRUE
, FALSE
, FALSE
);
5255 trophy
= oname(trophy
, artiname(ART_ATARU_TWO
));
5258 pline("Ataru Two was dropped on the floor.");
5259 } else pline("It seems that Ataru Two has been generated already.");
5263 if (obj
->oartifact
== ART_ATAR_ATAR
) {
5264 if (!u
.ataratarinvoked
) {
5265 register struct obj
*trophy
;
5266 u
.ataratarinvoked
= TRUE
;
5267 trophy
= mksobj(GREEN_LIGHTSABER
, TRUE
, FALSE
, FALSE
);
5269 trophy
= onameX(trophy
, artiname(ART_ATAR_ATAR
));
5272 pline("Another copy of this artifact was dropped on the floor.");
5273 } else pline("Since this invocation has already been done, it cannot be performed again.");
5277 if (obj
->oartifact
== ART_ONE_CATHLETTE
) {
5278 if (!u
.cathletteinvoked
) {
5279 register struct obj
*trophy
;
5280 u
.cathletteinvoked
= TRUE
;
5281 trophy
= mksobj(KITTEN_HEEL_PUMP
, TRUE
, FALSE
, FALSE
);
5283 trophy
= onameX(trophy
, artiname(ART_ONE_CATHLETTE
));
5286 pline("Another copy of this artifact was dropped on the floor.");
5287 } else pline("Since this invocation has already been done, it cannot be performed again.");
5291 if (obj
->oartifact
== ART_ATARU_TWO
) {
5292 if (!u
.ataruinvoked
&& !exist_artifact(CRYSTAL_SWORD
, artiname(ART_ATARU_ONE
))) {
5293 register struct obj
*trophy
;
5294 u
.ataruinvoked
= TRUE
;
5295 trophy
= mksobj(CRYSTAL_SWORD
, TRUE
, FALSE
, FALSE
);
5297 trophy
= oname(trophy
, artiname(ART_ATARU_ONE
));
5300 pline("Ataru One was dropped on the floor.");
5301 } else pline("It seems that Ataru One has been generated already.");
5305 if(!oart
|| !oart
->inv_prop
) {
5306 if(obj
->otyp
== CRYSTAL_BALL
)
5307 use_crystal_ball(obj
);
5309 pline("%s", nothing_happens
);
5310 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
5311 pline("Oh wait, actually something bad happens...");
5318 /* all actual invokes require you to actually have the item equipped if it has a slot it "fits" in --Amy
5319 * only the "special" invokes that aren't actually using something in the invocation field in artilist.h are exempt,
5320 * because those also don't use invoke timeouts */
5323 boolean invokenotworn
= FALSE
;
5324 if (obj
->oclass
== ARMOR_CLASS
&& !(obj
->owornmask
& W_ARMOR
) ) invokenotworn
= TRUE
;
5325 if (obj
->oclass
== WEAPON_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
5326 if (obj
->oclass
== RING_CLASS
&& !(obj
->owornmask
& W_RING
) ) invokenotworn
= TRUE
;
5327 if (obj
->oclass
== AMULET_CLASS
&& !(obj
->owornmask
& W_AMUL
) ) invokenotworn
= TRUE
;
5328 if (obj
->oclass
== IMPLANT_CLASS
&& !(obj
->owornmask
& W_IMPLANT
) ) invokenotworn
= TRUE
;
5329 if (obj
->oclass
== BALL_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
5330 if (obj
->oclass
== CHAIN_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
5331 if (obj
->oclass
== VENOM_CLASS
&& !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
5332 if (is_weptool(obj
) && !(obj
->owornmask
& W_WEP
) ) invokenotworn
= TRUE
;
5333 if (is_blindfold_slot(obj
) && !(obj
->owornmask
& W_TOOL
) ) invokenotworn
= TRUE
;
5334 if (invokenotworn
) {
5335 pline("That artifact cannot be invoked unless you wear it first.");
5340 if(oart
->inv_prop
> LAST_PROP
) {
5341 /* It's a special power, not "just" a property */
5343 if (obj
->oartifact
>= ART_ORB_OF_DETECTION
&& !is_quest_artifact(obj
)) {
5344 pline("Tapping into the powers of artifacts that don't belong to you is dangerous.");
5345 contaminate(rnz(100), TRUE
);
5346 increasesanity(rnz(100));
5347 adjalign(-rnz(100));
5350 if(obj
->invoketimer
> monstermoves
) {
5351 /* the artifact is tired :-) */
5352 You_feel("that %s %s ignoring you.",
5353 the(xname(obj
)), otense(obj
, "are"));
5354 /* and just got more so; patience is essential... */
5355 obj
->invoketimer
+= (long) d(3,10);
5356 if (!rn2(5)) obj
->invoketimer
+= (long) rnz(100);
5359 obj
->invoketimer
= monstermoves
+ artitimeout
;
5360 use_skill(P_SQUEAKING
, rnd(10));
5362 u
.cnd_invokecount
++;
5364 switch(oart
->inv_prop
) {
5368 pseudo
= zeroobj
; /* neither cursed nor blessed */
5369 pseudo
.otyp
= SCR_TAMING
;
5370 (void) seffects(&pseudo
);
5375 /* Amy edit: why on earth was there a kludge where a pseudo spellbook of id was created??? */
5378 if (invent
) identify_pack(cval
, 0, FALSE
); /* like, the identify_pack function has already been invented! */
5380 if (obj
&& obj
->oartifact
== ART_ARKENSTONE_OF_THRAIN
) {
5382 pline("The power of the Arkenstone is uncontrollable, but you knew that.");
5383 badeffect(); badeffect(); badeffect(); badeffect(); badeffect(); badeffect(); badeffect(); badeffect(); badeffect(); badeffect();
5389 int healamt
= (u
.uhpmax
+ 1 - u
.uhp
) / 2;
5390 long creamed
= (long)u
.ucreamed
;
5392 if (Upolyd
) healamt
= (u
.mhmax
+ 1 - u
.mh
) / 2;
5393 if (healamt
|| Sick
|| Slimed
|| Blinded
> creamed
)
5394 You_feel("better.");
5396 goto nothing_special
;
5398 if (Upolyd
) u
.mh
+= healamt
;
5399 else u
.uhp
+= healamt
;
5401 if(Sick
) make_sick(0L,(char *)0,FALSE
,SICK_ALL
);
5402 if(Slimed
) Slimed
= 0L;
5403 if (Blinded
> creamed
) make_blinded(creamed
, FALSE
);
5407 case ENERGY_BOOST
: {
5408 int epboost
= (u
.uenmax
+ 1 - u
.uen
) / 2;
5409 if (epboost
> 120) epboost
= 120; /* arbitrary */
5410 else if (epboost
< 12) epboost
= u
.uenmax
- u
.uen
;
5412 You_feel("re-energized.");
5416 goto nothing_special
;
5421 obj
->invoketimer
= 0; /* don't charge for changing their mind */
5429 if (CannotSelectItemsInPrompts
) return 0;
5430 struct obj
*otmp
= getobj(recharge_type
, "charge");
5434 if (yn("Really exit with no object selected?") == 'y')
5435 pline("You just wasted the opportunity to charge your items.");
5436 else goto chargingchoice
;
5437 obj
->invoketimer
= 0;
5440 b_effect
= (obj
->blessed
&& (Role_switch
== oart
->role
));
5441 if (obj
->oartifact
== ART_CHARGE_O_MANIA
&& powerfulimplants()) b_effect
= TRUE
;
5442 recharge(otmp
, b_effect
? 1 : obj
->cursed
? -1 : 0);
5447 if (!playerlevelportdisabled()) level_tele();
5448 else pline("You are disallowed to use this ability.");
5452 buzz(20+AD_FIRE
-1,6,u
.ux
,u
.uy
,u
.dx
,u
.dy
);
5453 /* ^^^^^^^^^^^^ - see zap.c / ZT_* defines */
5457 pline("%s shines brightly for an instant!", The(xname(obj
)));
5459 pline("%s grows warm for a second!", The(xname(obj
)));
5462 if (is_undead(youmonst
.data
)) {
5463 You("burn in the radiance!");
5464 /* This is ground zero. Not good news ... */
5469 killer_format
= KILLED_BY
;
5470 killer
= "the Holy Spear of Light";
5475 /* Undead and Demonics can't stand the light */
5477 for (mtmp
= fmon
; mtmp
; mtmp
= mtmp
->nmon
) {
5478 if (DEADMONSTER(mtmp
)) continue;
5479 if (distu(mtmp
->mx
, mtmp
->my
) > 9*9) continue;
5480 if (couldsee(mtmp
->mx
, mtmp
->my
) &&
5481 (is_undead(mtmp
->data
) || is_demon(mtmp
->data
)) &&
5482 !resist(mtmp
, '\0', 0, TELL
)) {
5483 if (canseemon(mtmp
))
5484 pline("%s burns in the radiance!", Monnam(mtmp
));
5487 /* damage depends on distance, divisor ranges from 10 to 2 */
5488 mtmp
->mhp
/= (10 - (distu(mtmp
->mx
, mtmp
->my
) / 10));
5489 if (mtmp
->mhp
< 1) mtmp
->mhp
= 1;
5493 You_hear("%s of intense pain!", unseen
> 1 ? "cries" : "a cry");
5498 pline_The("Eye turns on you!");
5500 killer_format
= KILLED_BY
;
5501 killer
= "the Eye of the Beholder";
5505 pline_The("Eye looks around with its icy gaze!");
5506 for (mtmp
= fmon
; mtmp
; mtmp
= mtmp
->nmon
) {
5507 if (DEADMONSTER(mtmp
)) continue;
5508 /* The eye is never blind ... */
5509 if (couldsee(mtmp
->mx
, mtmp
->my
) && !is_undead(mtmp
->data
)) {
5510 pline("%s screams in agony!", Monnam(mtmp
));
5511 mtmp
->mhp
-= (mtmp
->mhp
/ 3); /* nerf by Amy :P */
5512 if (mtmp
->mhp
< 1) mtmp
->mhp
= 1;
5520 if (!Role_if(PM_PREVERSIONER
)) {
5521 pline("Since you're not a preversioner, you cannot use the power of this artifact. So sorry.");
5524 pline("Downsizing nuke initiated.");
5525 for (mtmp
= fmon
; mtmp
; mtmp
= mtmp
->nmon
) {
5526 if (DEADMONSTER(mtmp
)) continue;
5527 if (mtmp
->data
->geno
& G_UNIQ
) {
5528 pline("%s's health is cut down by the nuke!", Monnam(mtmp
));
5529 mtmp
->mhp
-= (mtmp
->mhp
/ 2); /* nerf by Amy :P */
5530 if (mtmp
->mhp
< 1) mtmp
->mhp
= 1;
5534 case SPECIAL_INVOKE
:
5536 /* dummy entry for Amy's copypasting
5537 if (obj->oartifact == ART_) {
5543 if (obj
->oartifact
== ART_HOW_LONG_LASTS_IT_
) {
5544 if (TurbodullBug
& FROMOUTSIDE
) {
5545 pline_The("invoke failed because the conditions are not met.");
5548 TurbodullBug
|= FROMOUTSIDE
;
5549 if (uarm
&& uarm
->spe
< 7) uarm
->spe
++;
5550 if (uarmc
&& uarmc
->spe
< 7) uarm
->spe
++;
5551 if (uarms
&& uarms
->spe
< 7) uarm
->spe
++;
5552 if (uarmf
&& uarmf
->spe
< 7) uarm
->spe
++;
5553 if (uarmu
&& uarmu
->spe
< 7) uarm
->spe
++;
5554 if (uarmg
&& uarmg
->spe
< 7) uarm
->spe
++;
5555 if (uarmh
&& uarmh
->spe
< 7) uarm
->spe
++;
5556 Your("armor pieces have been enchanted, but now your equipment will dull quickly.");
5561 if (obj
->oartifact
== ART_CATALIN_S_ROBBERY
) {
5564 pline("Because you already have a symbiote, nothing happens.");
5568 u
.usymbiote
.active
= 1;
5569 u
.usymbiote
.mnum
= (u
.ulevel
< 10) ? PM_SUCKER_FUNGUS
: PM_TAKER_FUNGUS
;
5570 u
.usymbiote
.mhpmax
= (u
.ulevel
< 10) ? 16 : 128;
5571 u
.usymbiote
.mhp
= (u
.ulevel
< 10) ? 16 : 128;
5572 u
.usymbiote
.cursed
= u
.usymbiote
.hvycurse
= u
.usymbiote
.prmcurse
= u
.usymbiote
.bbcurse
= u
.usymbiote
.morgcurse
= u
.usymbiote
.evilcurse
= u
.usymbiote
.stckcurse
= 0;
5574 pline("Suddenly you have a symbiote!");
5575 pline("Use #monster to manage your symbiote.");
5576 if (flags
.showsymbiotehp
) flags
.botl
= TRUE
;
5581 if (obj
->oartifact
== ART_KIM_S_COLOR
) {
5585 /* we roll until we get an item that can be randomly generated and is not a gold piece or other weird thing --Amy */
5586 while ( (objtomodify
== -1) || (objtomodify
== GOLD_PIECE
) || (objtomodify
== STRANGE_OBJECT
) || (objtomodify
== AMULET_OF_YENDOR
) || (objtomodify
== CANDELABRUM_OF_INVOCATION
) || (objtomodify
== BELL_OF_OPENING
) || (objtomodify
== SPE_BOOK_OF_THE_DEAD
) || (objects
[objtomodify
].oc_prob
< 1) ) objtomodify
= rn2(NUM_OBJECTS
);
5587 objects
[objtomodify
].oc_material
= MT_SILVER
;
5588 pline("%s (%s) is made of silver now.", obj_descr
[objtomodify
].oc_name
, objtypenames
[objects
[objtomodify
].oc_class
]);
5593 if (obj
->oartifact
== ART_EVIL_HAIRTEAR
) {
5595 obj
->hvycurse
= TRUE
;
5597 make_familiar((struct obj
*)0, u
.ux
, u
.uy
, FALSE
, FALSE
);
5602 if (obj
->oartifact
== ART_ENIRHS_MOD
) {
5604 char aliasbuf
[2048]; /* Buffer for alias name */
5607 You("lack the health required to do that.");
5613 if (u
.mh
< 1) u
.mh
= 1;
5617 (void) strncpy(aliasbuf
, playeraliasname
, sizeof(aliasbuf
));
5618 reversestring(aliasbuf
);
5619 strcpy(plalias
, aliasbuf
);
5620 (void) strncpy(u
.aliasname
, aliasbuf
, sizeof(u
.aliasname
));
5622 make_inverted((HInvertedState
& TIMEOUT
) + 10000);
5624 You("don't feel like yourself.");
5626 for (mtmp
= fmon
; mtmp
; mtmp
= mtmp
->nmon
) {
5627 if (DEADMONSTER(mtmp
)) continue;
5628 /* The eye is never blind ... */
5629 if (couldsee(mtmp
->mx
, mtmp
->my
) && !is_undead(mtmp
->data
)) {
5630 pline("%s screams in agony!", Monnam(mtmp
));
5631 mtmp
->mhp
-= (mtmp
->mhp
/ 2);
5632 if (mtmp
->mhp
< 1) mtmp
->mhp
= 1;
5639 if (obj
->oartifact
== ART_SCUDDER
) {
5641 struct obj
*dynamite
;
5645 pline_The("multi-round missiles have been launched.");
5648 cc
.x
= rn1(COLNO
-3,2);
5650 dynamite
= mksobj_at(STICK_OF_DYNAMITE
, cc
.x
, cc
.y
, TRUE
, FALSE
, FALSE
);
5653 u
.dynamitehack
= TRUE
;
5654 if (dynamite
->otyp
!= STICK_OF_DYNAMITE
) delobj(dynamite
);
5656 dynamite
->dynamitekaboom
= 1;
5658 dynamite
->owt
= weight(dynamite
);
5659 attach_bomb_blow_timeout(dynamite
, 0, 0);
5662 u
.dynamitehack
= FALSE
;
5664 if (tunguskas
> 0) {
5673 if (obj
->oartifact
== ART_WEAVING_WARD
) {
5675 incr_itimeout(&Invulnerable
, rn1(3,3));
5676 You_feel(FunnyHallu
? "like a super-duper hero!" : "invulnerable!");
5680 if (obj
->oartifact
== ART_HERACLES_PRIZE
) {
5682 incr_itimeout(&Invulnerable
, rn1(3,3));
5683 You_feel(FunnyHallu
? "like a super-duper hero!" : "invulnerable!");
5687 if (obj
->oartifact
== ART_FANNY_S_ANNOYANCE
) {
5689 randommartialstyle();
5694 if (obj
->oartifact
== ART_TSUNAMI_FISTS
) {
5696 randommartialstyle();
5701 if (obj
->oartifact
== ART_IRIS_S_THUNDER
) {
5704 buzz(15,10,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 15 = lightning */
5709 if (obj
->oartifact
== ART__K_FCJZ_OEAL_I_NE___P_OAMB
) {
5715 u
.alla
-= 100; /* not "drain_alla" */
5716 You("only have %d alla remaining!", u
.alla
);
5719 buzz(24,6,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 24 = disintegration beam */
5724 if (obj
->oartifact
== ART_TURN_INTO_LEATHER
) {
5726 if (find_leather_gloves() == -1) {
5727 pline("Oops, something went wrong! Sorry!");
5733 savewornmask
= obj
->owornmask
;
5734 setworn((struct obj
*)0, obj
->owornmask
);
5736 obj
->otyp
= find_leather_gloves();
5738 setworn(obj
, savewornmask
);
5740 Your("gloves turned into leather!");
5745 if (obj
->oartifact
== ART_MINIMAL_MINI_ME
) {
5747 u
.enchantrecskill
++;
5748 if (u
.enchantrecskill
> 250) u
.enchantrecskill
= 250;
5749 u
.weapchantrecskill
++;
5750 if (u
.weapchantrecskill
> 250) u
.weapchantrecskill
= 250;
5752 if (u
.bucskill
> 250) u
.bucskill
= 250;
5753 You_feel("more knowledgable about equipment!");
5758 if (obj
->oartifact
== ART_EYES_OF_THE_ORACLE
) {
5759 You("gain a bit of the Oracle's secret knowledge...");
5760 wiz_timeout_queue(); /* yes, this is a wizard mode command, I know --Amy */
5764 if (obj
->oartifact
== ART_RITA_S_DIAMOGIGGLING
) {
5769 if (obj
->oartifact
== ART_____SUICIDE
) {
5775 pline("%s used EXPLOSION!", playeraliasname
);
5777 for(i
= -bd
; i
<= bd
; i
++) for(j
= -bd
; j
<= bd
; j
++) {
5778 if (!isok(u
.ux
+ i
, u
.uy
+ j
)) continue;
5779 if ((mtmp
= m_at(u
.ux
+ i
, u
.uy
+ j
)) != 0) {
5780 mtmp
->mhp
-= rnd(u
.uhpmax
* 10);
5781 pline("%s is hit by the explosion!", Monnam(mtmp
));
5782 if (mtmp
->mhp
<= 0) {
5783 pline("%s is killed!", Monnam(mtmp
));
5785 } else wakeup(mtmp
); /* monster becomes hostile */
5790 killer
= "exploding";
5791 killer_format
= KILLED_BY
;
5794 /* No, being polymorphed does not save you. If it did, this arti would be rendered overpowered. --Amy */
5799 if (obj
->oartifact
== ART_GLAE
) {
5803 savewornmask
= obj
->owornmask
;
5804 setworn((struct obj
*)0, obj
->owornmask
);
5806 obj
->otyp
= randartmeleeweapon();
5808 setworn(obj
, savewornmask
);
5810 Your("weapon morphs...");
5815 if (obj
->oartifact
== ART_NEXTMISSION
) {
5817 if (u
.returntimer
) {
5819 pline_The("air around you gradually loses power.");
5828 if (obj
->oartifact
== ART_RANOFRIT
) {
5830 if (!rn2(10)) useupall(obj
);
5832 if (u
.returntimer
) {
5834 pline_The("air around you gradually loses power.");
5842 if (obj
->oartifact
== ART_DO_STAY_A_WHILE_
) {
5848 obj
->hvycurse
= TRUE
;
5849 if (obj
->spe
< 20) obj
->spe
++;
5852 if (u
.returntimer
) {
5854 pline_The("air around you gradually loses power.");
5862 if (obj
->oartifact
== ART_HAMMA_HAMMA
) {
5863 register struct obj
*otmp
;
5864 if (obj
->cursed
|| obj
->spe
< 0) {
5865 pline("Nothing happens, probably because this hammer isn't good enough.");
5869 artilist
[ART_HAVING_HAMMA
].otyp
= randarthammerX();
5871 obj
->hvycurse
= TRUE
;
5874 otmp
= mksobj(artilist
[ART_HAVING_HAMMA
].otyp
, TRUE
, FALSE
, FALSE
);
5878 otmp
= oname(otmp
, artiname(ART_HAVING_HAMMA
));
5881 otmp
->owt
= weight(otmp
);
5884 You("created a new hammer.");
5891 if (obj
->oartifact
== ART_UTE_S_GREENCHANGE
) {
5894 savewornmask
= obj
->owornmask
;
5895 setworn((struct obj
*)0, obj
->owornmask
);
5897 obj
->enchantment
= randenchantment();
5899 setworn(obj
, savewornmask
);
5901 Your("peep-toes' enchantment was randomized.");
5906 if (obj
->oartifact
== ART_REAL_FORCE
) {
5909 struct monst
*psychmonst
;
5910 pline("Select a monster to use psycho force");
5913 getpos(&cc
, TRUE
, "the spot to attack");
5914 if (cc
.x
== -10) return (0); /* user pressed esc */
5915 psychmonst
= m_at(cc
.x
, cc
.y
);
5917 if (!psychmonst
|| (!canseemon(psychmonst
) && !canspotmon(psychmonst
))) {
5918 You("don't see a monster there!");
5923 psychmonst
->mcanmove
= 0;
5924 psychmonst
->mstrategy
&= ~STRAT_WAITFORU
;
5925 psychmonst
->mfrozen
= rn1(3, 3);
5927 pline("%s sputters at the forced hold!", Monnam(psychmonst
));
5928 psychmonst
->mhp
-= rnz(50);
5929 if (psychmonst
->mhp
< 1) {
5930 pline("%s dies!", Monnam(psychmonst
));
5931 xkilled(psychmonst
,0);
5932 } else wakeup(psychmonst
); /* monster becomes hostile */
5938 if (obj
->oartifact
== ART_WIDEFORCE_GRIP
) {
5940 register struct obj
*otmp
;
5941 pline("Where do you want to pick up an item?");
5942 if (getpos(&cc
, TRUE
, "pick up item at which location") < 0) {
5946 if ((otmp
= level
.objects
[cc
.x
][cc
.y
]) != 0) {
5947 if (costly_spot(cc
.x
, cc
.y
)) {
5948 pline("This item is inside a grip-proof shop. Your attempt to pick it up fails.");
5952 You("pick up an object from the %s.", surface(cc
.x
,cc
.y
));
5953 (void) pickup_object(otmp
, otmp
->quan
, TRUE
, FALSE
);
5957 pline("Too bad! There's no item at that location.");
5963 if (obj
->oartifact
== ART_NOW_ASCEND_ALREADY
) {
5965 enchantarmor_prompt();
5970 if (obj
->oartifact
== ART_CRAWL_INTO_LIFE
) {
5973 pline("Because you already have a symbiote, nothing happens.");
5977 getrandomsymbiote(FALSE
, FALSE
);
5978 pline("Suddenly you have a symbiote!");
5983 if (obj
->oartifact
== ART_A_MAGE_DID_IT
) {
5984 if (obj
->greased
< 3) {
5985 pline("Applied a layer of grease.");
5987 } else pline("There's already the maximum amount of grease on your bag.");
5991 if (obj
->oartifact
== ART_LEO_IS_ALWAYS_HIGH
) {
5992 u
.copwantedlevel
+= 2000;
5994 pline("Uh-oh, the kops must have gotten wind of your actions.");
5998 if (obj
->oartifact
== ART_STRANGE_LILCHEN
) {
5999 if (obj
->obrittle
|| obj
->obrittle2
) {
6000 /* be lenient if you don't have the required cash out in the open --Amy */
6001 addplayerdebt(10000, TRUE
); /* cannot resist, cannot get the money back */
6002 obj
->obrittle
= obj
->obrittle2
= 0;
6003 Your("credit card is repaired, but that costs 10000 zorkmids.");
6008 if (obj
->oartifact
== ART_DOWNDRIVE
) {
6010 if (!uinsymbiosis
) {
6011 pline("%s", nothing_happens
);
6012 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
6013 pline("Oh wait, actually something bad happens...");
6019 if (powerfulimplants()) {
6023 getlin("How many moves do you wish to shutdown your symbiote for? [1-10000]", buf
);
6024 sleeptime
= (!*buf
|| *buf
=='\033') ? 0 : atoi(buf
);
6025 } while (sleeptime
< 1 || sleeptime
> 10000);
6026 u
.shutdowntime
+= sleeptime
;
6028 u
.shutdowntime
+= 1000;
6030 pline("Shutdown initiated.");
6035 if (obj
->oartifact
== ART_WELL_FUCK
) {
6037 if (u
.uspellprot
< 4) {
6040 if (!u
.usptime
) u
.usptime
= u
.uspmtime
;
6045 incr_itimeout(&HLevitation
, rnz(250));
6046 HLevitation
|= I_SPECIAL
;
6048 You_feel("protected!");
6049 You("float into the air!");
6054 if (obj
->oartifact
== ART_RES_CIRCLE
) {
6056 incr_itimeout(&HResistancePiercing
, 1000);
6057 You("can pierce enemy resistances!");
6062 if (obj
->oartifact
== ART_LARISSA_S_LAUGHTER
) {
6063 objects
[obj
->otyp
].oc_material
= MT_INKA
;
6064 pline_The("boot is made of inka leather now.");
6068 if (obj
->oartifact
== ART_MOIST_CHERRY
) {
6070 if (!Role_if(PM_BLEEDER
)) {
6071 u
.usanity
+= PlayerBleeds
; /* cannot resist */
6072 u
.contamination
+= PlayerBleeds
;
6077 Your("bleeding stops.");
6078 } else pline("There was no bleeding to cure.");
6083 if (obj
->oartifact
== ART_EVERYTHING_PROOF
) {
6085 register struct obj
*steeling
;
6086 if (CannotSelectItemsInPrompts
) goto protectwhatdone
;
6087 pline("You may erodeproof an item.");
6089 steeling
= getobj(allowall
, "erosionproof");
6091 if (yn("Really exit with no object selected?") == 'y')
6092 pline("You just wasted the opportunity to erosionproof an item.");
6093 else goto protectwhatchoice
;
6094 pline("Oh well, if you don't wanna...");
6096 if (!stack_too_big(steeling
)) {
6097 steeling
->oerodeproof
= 1;
6098 pline("Item erosionproofed.");
6099 if (steeling
&& objects
[(steeling
)->otyp
].oc_material
== MT_CELESTIUM
&& !stack_too_big(steeling
)) {
6100 if (!steeling
->cursed
) bless(steeling
);
6101 else uncurse(steeling
, FALSE
);
6103 } else pline("The stack was too big and therefore nothing happens...");
6109 if (obj
->oartifact
== ART_OCTOPODDY
) {
6110 if (powerfulimplants()) bad_equipment(1);
6111 else bad_equipment(0);
6115 if (obj
->oartifact
== ART_REPAIR_YOUR_BRAIN
) {
6116 if (obj
->spe
< -19) {
6117 pline_The("invocation failed.");
6123 if (ABASE(A_INT
) < AMAX(A_INT
)) {
6124 ABASE(A_INT
) = AMAX(A_INT
);
6126 You_feel("smarter!");
6128 pline("It seems that your intelligence has not been drained yet.");
6134 if (obj
->oartifact
== ART_UNBINDALL_CHEAT
) {
6138 for (pickskill
= 0; pickskill
< P_NUM_SKILLS
; pickskill
++) {
6139 if (pickskill
> P_NONE
) {
6140 if (P_SKILL(pickskill
) != P_ISRESTRICTED
) continue;
6141 P_ADVANCE(pickskill
) = 0;
6144 pline("Training in restricted skills nullified.");
6149 if (obj
->oartifact
== ART_CHARGING_MADE_EASY
) {
6150 deacrandomintrinsic(rnz(5000));
6151 AutomaticVulnerabilitiy
+= rnz(5000);
6153 pline("Lightsaber recharged.");
6156 if (obj
->oartifact
== ART_BENNY_S_CHIP
) {
6157 if (Role_if(PM_COURIER
)) {
6159 pline("BANG! Benny shoots you in the head with his pistol.");
6161 if (u
.uhpmax
< 21) {
6163 killer_format
= KILLED_BY
;
6164 killer
= "being shot in the head";
6170 if (u
.uhp
> u
.uhpmax
) u
.uhp
= u
.uhpmax
;
6172 if(ABASE(A_INT
) < 2) {
6174 u
.youarereallydead
= 1;
6175 Your("last thought fades away.");
6176 killer
= "bullet to the brain";
6177 killer_format
= KILLED_BY
;
6180 /* player still alive somehow? kill them again :P */
6182 pline("Unfortunately your brain is still gone.");
6183 killer
= "bullet to the brain";
6184 killer_format
= KILLED_BY
;
6188 pline("Unfortunately your brain is STILL gone. Your game ends here.");
6193 u
.youarereallydead
= 0;
6195 ABASE(A_INT
) = ATTRABSMIN(A_INT
);
6196 You_feel("like a scarecrow.");
6197 AMAX(A_INT
) = ABASE(A_INT
);
6206 for (n
= 0; n
< MAXSPELL
&& spellid(n
) != NO_SPELL
; n
++) {
6207 spellid(n
) = NO_SPELL
;
6213 } else pline("Hmm... that didn't do anything.");
6217 if (obj
->oartifact
== ART_TILLMANN_S_TARGET
) {
6218 pline("Suddenly, you gain a new companion!");
6219 (void) make_familiar((struct obj
*)0, u
.ux
, u
.uy
, FALSE
, FALSE
);
6223 if (obj
->oartifact
== ART_INVUNI
) {
6225 You("try to change the instrument.");
6227 if (obj
->otyp
== BUGLE
) obj
->otyp
= UNICORN_HORN
;
6228 else if (obj
->otyp
== UNICORN_HORN
) obj
->otyp
= BUGLE
;
6233 if (obj
->oartifact
== ART_CHANGE_THE_TUNE
) {
6235 You("try to change the instrument.");
6237 if (obj
->otyp
== WOODEN_HARP
) obj
->otyp
= WOODEN_FLUTE
;
6238 else if (obj
->otyp
== WOODEN_FLUTE
) obj
->otyp
= WOODEN_HARP
;
6243 if (obj
->oartifact
== ART_THROUGH_THE_MOTIONS
) {
6245 if (obj
->otyp
== PLATE_MAIL
) {
6246 pline("This suit of armor can no longer be upgraded.");
6250 You("try to upgrade your suit of armor.");
6252 if (obj
->otyp
== LEATHER_ARMOR
) obj
->otyp
= STUDDED_LEATHER_ARMOR
;
6253 else if (obj
->otyp
== STUDDED_LEATHER_ARMOR
) obj
->otyp
= RING_MAIL
;
6254 else if (obj
->otyp
== RING_MAIL
) obj
->otyp
= SCALE_MAIL
;
6255 else if (obj
->otyp
== SCALE_MAIL
) obj
->otyp
= CHAIN_MAIL
;
6256 else if (obj
->otyp
== CHAIN_MAIL
) obj
->otyp
= SPLINT_MAIL
;
6257 else if (obj
->otyp
== SPLINT_MAIL
) obj
->otyp
= PLATE_MAIL
;
6261 if (obj
->oartifact
== ART_GIVE_IT_ME_YOUR_WILL
) {
6263 obj
->hvycurse
= obj
->prmcurse
= obj
->stckcurse
= TRUE
;
6265 if (!powerfulimplants()) {
6266 getnastytrapintrinsic();
6274 if (obj
->oartifact
== ART_VINTAGE_MEMORY
) {
6275 if (!Teleport_control
) HTeleport_control
= 2;
6280 if (obj
->oartifact
== ART_FIVEFOLDSWITCH_
) {
6283 pline("You can read, right? If you had looked at the description of this artifact, you'd have known that the invocation only works if its enchantment value is at least +1! Or did you think I was somehow stupid and forgot to actually code that part? Silly player!");
6287 obj
->cursed
= obj
->hvycurse
= obj
->prmcurse
= TRUE
;
6289 pline("Switchswitchswitchswitchswitch!");
6293 if (obj
->oartifact
== ART_WON_STESCHAN
) {
6294 incr_itimeout(&HCold_resistance
, 500);
6295 incr_itimeout(&HFire_resistance
, 500);
6296 incr_itimeout(&HShock_resistance
, 500);
6297 You("become resistant to the elements.");
6301 if (obj
->oartifact
== ART_TSCHEINSCHFORM
) {
6304 savewornmask
= obj
->owornmask
;
6305 setworn((struct obj
*)0, obj
->owornmask
);
6308 tscheinschtype
= HAWAIIAN_SHIRT
+ rn2((LEVITATION_BOOTS
+ 1) - HAWAIIAN_SHIRT
);
6309 if (!(objects
[tscheinschtype
].oc_armcat
== ARM_BOOTS
)) goto tscheinschroll
;
6311 obj
->otyp
= tscheinschtype
;
6312 obj
->owt
= weight(obj
);
6314 setworn(obj
, savewornmask
);
6316 pline("Okay, the boots have had their base type changed.");
6320 if (obj
->oartifact
== ART_CREAMRES
) {
6322 pline("You clean your %s.", makeplural(body_part(HAND
)));
6328 if (obj
->oartifact
== ART_CANNOT_DO_IS_FROZEN
) {
6329 make_frozen(0L,TRUE
);
6333 if (obj
->oartifact
== ART_POSSO_CONTINUARE_LATERALE
) {
6335 struct obj
*asseignobj
;
6337 if (CannotSelectItemsInPrompts
) break;
6338 if ( !(asseignobj
= getobj(allowall
, "unequip"))) break;
6340 if (asseignobj
->owornmask
) {
6341 setnotworn(asseignobj
);
6342 pline("Successfully unwore the item!");
6348 if (obj
->oartifact
== ART_GALLOW_DIGS
) {
6350 zap_dig(TRUE
); /* dig several tiles, like the wand */
6355 if (obj
->oartifact
== ART_BLASWON
) {
6360 pline("Limit has been reached already.");
6365 if (obj
->oartifact
== ART_IDEAL_BASE
) {
6368 pline("The ideal base has been put to good use.");
6370 pline("You've maxxed out the ideal base already.");
6375 if (obj
->oartifact
== ART_WEAR_OFF_THE_DAMN_RNG
) {
6376 if (obj
->greased
< 3) {
6378 pline("Since the damn RNG always causes the grease to wear off, you applied another layer.");
6380 pline("Currently, the amount of grease on this item is at the maximum.");
6385 if (obj
->oartifact
== ART_ASSEIGNMENT_CURSE_
) {
6387 struct obj
*asseignobj
;
6389 if (CannotSelectItemsInPrompts
) break;
6390 if ( !(asseignobj
= getobj(allowall
, "curse"))) break;
6391 asseignobj
->bknown
= TRUE
;
6393 if (stack_too_big(asseignobj
)) {
6394 pline("The stack was too big! Nothing happens.");
6399 pline("Okay, that object is cursed now.");
6404 if (obj
->oartifact
== ART_ARABELLA_S_LIGHTSWITCH
) {
6406 pline_The("light has been switched on!");
6410 if (obj
->oartifact
== ART_ASS_ASS_IN_ASS
) {
6411 trap_detect((struct obj
*)0);
6415 if (obj
->oartifact
== ART_WINNNNNG
) {
6416 (void)object_detect(obj
, 0);
6417 trap_detect((struct obj
*)0);
6418 incr_itimeout(&HDetect_monsters
, 20);
6423 if (obj
->oartifact
== ART_WHOA_LOOK_AT_THOSE
) {
6424 intrinsicgainorloss(1);
6428 if (obj
->oartifact
== ART_FARTDETECTION
) {
6431 u
.heavyaggravation
= 1;
6433 (void) makemon(specialtensmon(40), u
.ux
, u
.uy
, MM_ANGRY
|MM_FRENZIED
|MM_XFRENZIED
|MM_ADJACENTOK
);
6434 trap_detect((struct obj
*)0);
6437 u
.heavyaggravation
= 0;
6442 if (obj
->oartifact
== ART_AJIHEI
) {
6443 pline("An aura surrounds your weapon...");
6444 obj
->oerodeproof
= TRUE
; /* doesn't repair damage */
6449 if (obj
->oartifact
== ART_MUSICAL_SNORKEL
) {
6452 do_clear_areaX(u
.ux
, u
.uy
, 3, undo_floodM
, (void *)&maderoom
);
6454 You("are suddenly very dry!");
6455 } else pline("It seems that there was no water nearby after all.");
6460 if (obj
->oartifact
== ART_PENUMBRAL_LASSO
) {
6464 Your("lance seems sharper!");
6467 pline("Currently your steed has %d%% chance of being targetted by monsters.", u
.steedhitchance
);
6468 if (yn("Change it?") == 'y') {
6472 getlin("Enter a percentage value between 0 and 100 (inclusive):", buf
);
6473 if (sscanf(buf
, "%ld", &offer
) != 1) offer
= 0L;
6475 pline("Sorry, negative numbers are not allowed.");
6476 } else if (offer
> 100) {
6477 pline("Sorry, the number can't exceed 100.");
6479 u
.steedhitchance
= offer
;
6480 pline("Your steed now has %d%% chance of being targetted by monsters.", u
.steedhitchance
);
6488 if (obj
->oartifact
== ART_PRAEFAME
) {
6490 You("feel much more hungry than before.");
6494 if (obj
->oartifact
== ART_SATELLITE_LINKER
) {
6495 incr_itimeout(&HDetect_monsters
, rn1(40, 40));
6497 You("can sense monsters.");
6501 if (obj
->oartifact
== ART_KAZAANA
) {
6503 Your("memory is deleted.");
6507 if (obj
->oartifact
== ART_HOLYBASHER
) {
6508 pline("An aura surrounds your weapon...");
6513 if (obj
->oartifact
== ART_ARK_OF_THE_COVENANT
) {
6514 pline("An aura surrounds your weapon...");
6516 if (!obj
->cursed
) bless(obj
);
6520 if (obj
->oartifact
== ART_KEEP_IT_WARM_INSIDE
) {
6521 pline("An aura surrounds your sack...");
6522 if (!obj
->cursed
) bless(obj
);
6523 else uncurse(obj
, TRUE
);
6527 if (obj
->oartifact
== ART_INCAPUTABLE
) {
6528 obj
->oeroded
= obj
->oeroded2
= 0;
6529 Your("armor looks shiny!");
6532 if (obj
->oartifact
== ART_BRINGS_WHICH
) {
6535 if (u
.uen
> u
.uenmax
) u
.uen
= u
.uenmax
;
6536 You_feel("full of mystic power!");
6542 if (obj
->oartifact
== ART_PAEAU_PAEAU_PAEAU_PAEAU_PA
) {
6544 buzz(10, 1, u
.ux
, u
.uy
, -1, 0);
6545 buzz(10, 1, u
.ux
, u
.uy
, 1, 0);
6546 buzz(10, 1, u
.ux
, u
.uy
, -1, 1);
6547 buzz(10, 1, u
.ux
, u
.uy
, 1, 1);
6548 buzz(10, 1, u
.ux
, u
.uy
, 0, 1);
6549 buzz(10, 1, u
.ux
, u
.uy
, -1, -1);
6550 buzz(10, 1, u
.ux
, u
.uy
, 1, -1);
6551 buzz(10, 1, u
.ux
, u
.uy
, 0, -1);
6556 if (obj
->oartifact
== ART_LONGSPIKE
) {
6558 buzz(10, 4, u
.ux
, u
.uy
, -1, 0);
6559 buzz(10, 4, u
.ux
, u
.uy
, 1, 0);
6560 buzz(10, 4, u
.ux
, u
.uy
, -1, 1);
6561 buzz(10, 4, u
.ux
, u
.uy
, 1, 1);
6562 buzz(10, 4, u
.ux
, u
.uy
, 0, 1);
6563 buzz(10, 4, u
.ux
, u
.uy
, -1, -1);
6564 buzz(10, 4, u
.ux
, u
.uy
, 1, -1);
6565 buzz(10, 4, u
.ux
, u
.uy
, 0, -1);
6570 if (obj
->oartifact
== ART_GO_UP_IN_FLAMESES
) {
6573 int flamexplosions
= 10;
6574 while (flamexplosions
> 0) {
6577 struct obj
*dynamite
;
6578 dynamite
= mksobj_at(FRAG_GRENADE
, u
.ux
, u
.uy
, TRUE
, FALSE
, FALSE
);
6580 if (dynamite
->otyp
!= FRAG_GRENADE
) delobj(dynamite
);
6582 dynamite
->dynamitekaboom
= 1;
6584 dynamite
->owt
= weight(dynamite
);
6585 attach_bomb_blow_timeout(dynamite
, 0, 0);
6591 if (!(HProtection
& INTRINSIC
)) {
6592 HProtection
|= FROMOUTSIDE
;
6595 Your("skin feels harder.");
6599 if (obj
->oartifact
== ART_EROTIC_STAT_TRAIN
) {
6601 You_feel("revitalized.");
6602 make_sick(0L, (char *) 0, FALSE
, SICK_ALL
);
6603 make_blinded(0L,FALSE
);
6604 make_stunned(0L,TRUE
);
6605 make_confused(0L,TRUE
);
6606 (void) make_hallucinated(0L,FALSE
,0L);
6607 make_numbed(0L,TRUE
);
6608 make_feared(0L,TRUE
);
6609 make_frozen(0L,TRUE
);
6610 make_burned(0L,TRUE
);
6611 make_dimmed(0L,TRUE
);
6616 if (obj
->oartifact
== ART_SPFLOTCH__HAHAHAHAHA_
) {
6618 obj
->hvycurse
= TRUE
;
6619 pline("Wow, a corona antidote!");
6624 if (obj
->oartifact
== ART_BACKGROUND_HOLDING
) {
6625 if (HAggravate_monster
& INTRINSIC
) {
6626 HAggravate_monster
&= ~INTRINSIC
;
6627 You_feel("more acceptable!");
6629 pline("Nothing happens...");
6630 if (FailureEffects
|| u
.uprops
[FAILURE_EFFECTS
].extrinsic
|| have_failurestone()) {
6631 pline("Oh wait, actually something bad happens...");
6638 if (obj
->oartifact
== ART_CRUEL_PARENTS
) {
6640 int chaloss
= rnd(5);
6642 strcpy(plalias
, "Liselotte");
6643 (void) strncpy(u
.aliasname
, "Liselotte", sizeof(u
.aliasname
));
6644 pline("Ugh, did your parents really name you 'Liselotte'??? Why didn't they name you 'Ice-Angel Chantalle-Jacqueline' instead, that would have been similarly silly!");
6645 HCold_resistance
|= FROMOUTSIDE
;
6646 HShock_resistance
|= FROMOUTSIDE
;
6648 while (chaloss
> 0) {
6649 if (ABASE(A_CHA
) > 1) {
6652 u
.cnd_permstatdamageamount
++;
6659 obj
->hvycurse
= TRUE
;
6662 make_confused(HConfusion
+ rn1(50, 50),FALSE
);
6663 make_stunned(HStun
+ rn1(50, 50),FALSE
);
6664 increasesanity(rnz(500));
6665 Your("mind spins as you realize what name your parents would have given to you if you had become female.");
6670 if (obj
->oartifact
== ART_SALLY_S_BAKING_MIXTURE
) {
6672 struct obj
*uchocitem
;
6674 uchocitem
= mksobj(FORTUNE_COOKIE
, TRUE
, FALSE
, FALSE
);
6676 uchocitem
->quan
= 1;
6677 uchocitem
->known
= uchocitem
->dknown
= uchocitem
->bknown
= uchocitem
->rknown
= 1;
6678 uchocitem
->owt
= weight(uchocitem
);
6680 stackobj(uchocitem
);
6681 You("baked a fortune cookie.");
6682 } else pline("Somehow, your baking attempt failed.");
6687 if (obj
->oartifact
== ART_DIMENSION_FISHING
) {
6689 register struct monst
*nexusmon
;
6690 int multiplegather
= 0;
6692 You("start fishing.");
6693 for(nexusmon
= fmon
; nexusmon
; nexusmon
= nexusmon
->nmon
) {
6694 if (nexusmon
&& !nexusmon
->mtame
&& !nexusmon
->mpeaceful
&& !(u
.usteed
&& (u
.usteed
== nexusmon
)) ) {
6696 pline("%s is drawn!", Monnam(nexusmon
));
6698 goto callingoutdone
;
6702 if (!multiplegather
) pline("A waste of time...");
6707 if (obj
->oartifact
== ART_HOUZANHA
) {
6710 int houzanhaamount
= 50;
6711 register struct rm
*lev
;
6712 while (houzanhaamount
) {
6714 if (houzanhaamount
< 0) houzanhaamount
= 0;
6718 if (isok(x
,y
) && !(lev
->typ
== ALTAR
&& (Is_astralevel(&u
.uz
) || Is_sanctum(&u
.uz
)) ) && !(lev
->wall_info
& W_NONDIGGABLE
) && lev
->typ
!= STAIRS
&& lev
->typ
!= LADDER
) {
6722 pline("Haaaaaaaa!");
6727 if (obj
->oartifact
== ART_WRONG_RUNE
) {
6728 if (((u
.uhave
.amulet
) && !u
.freeplaymode
) || CannotTeleport
|| (u
.usteed
&& mon_has_amulet(u
.usteed
))) {
6729 pline("The charge around you prevents you from using the rune!");
6733 if (playerlevelportdisabled()) {
6734 You("cannot levelport, and therefore the attempt fails!");
6740 dtmp
.dnum
= dname_to_dnum("Gehennom");
6741 dtmp
.dlevel
= 12; /* level 62, which is the 12th level of Gehennom */
6742 schedule_goto(&dtmp
, FALSE
, FALSE
, 0, (char *)0, (char *)0);
6743 You_feel("yourself yanked in a direction you didn't know existed!");
6748 if (obj
->oartifact
== ART_MARK_AND_RECALL
) {
6749 if (!u
.levelmarked
) {
6750 u
.markedlevel
.dnum
= u
.uz
.dnum
;
6751 u
.markedlevel
.dlevel
= u
.uz
.dlevel
;
6752 pline("The current level has been marked.");
6753 u
.levelmarked
= TRUE
;
6755 if (((u
.uhave
.amulet
) && !u
.freeplaymode
) || CannotTeleport
|| (u
.usteed
&& mon_has_amulet(u
.usteed
))) {
6756 pline("At this point, you're not capable of recalling!");
6760 if (playerlevelportdisabled()) {
6761 You("cannot levelport, and therefore the attempt fails!");
6766 dtmp
.dnum
= u
.markedlevel
.dnum
;
6767 dtmp
.dlevel
= u
.markedlevel
.dlevel
;
6768 schedule_goto(&dtmp
, FALSE
, FALSE
, 0, (char *)0, (char *)0);
6769 You("warp back to the marked level.");
6771 u
.levelmarked
= FALSE
;
6776 if (obj
->oartifact
== ART_DO_NOT_DISPLAY_THE_CHARGES
) {
6777 You_feel("full of mystic power!");
6778 if (!obj
->obrittle
) {
6781 if (!rn2(5)) obj
->obrittle
++;
6786 if (obj
->oartifact
== ART_DINGDOENG_
|| obj
->oartifact
== ART_KRISTA_S_CLEAR_MIND
) {
6787 You_feel("healthier!");
6788 if (powerfulimplants() || !obj
->obrittle
) {
6790 if (Upolyd
) u
.mh
= u
.mhmax
;
6792 if (!obj
->obrittle
&& !rn2(5)) obj
->obrittle
++;
6797 if (obj
->oartifact
== ART_AIRSTRIKE_
) {
6799 pline("Select the target area for your airstrike!");
6802 getpos(&cc
, TRUE
, "airstrike target");
6803 if (cc
.x
== -10) return (0); /* user pressed esc */
6805 if (isok(cc
.x
, cc
.y
)) {
6806 struct obj
*dynamite
;
6807 dynamite
= mksobj_at(STICK_OF_DYNAMITE
, cc
.x
, cc
.y
, TRUE
, FALSE
, FALSE
);
6809 You_hear("a sound that reminds you of fireworks.");
6810 if (dynamite
->otyp
!= STICK_OF_DYNAMITE
) delobj(dynamite
);
6812 dynamite
->dynamitekaboom
= 1;
6814 dynamite
->owt
= weight(dynamite
);
6815 attach_bomb_blow_timeout(dynamite
, 0, 0);
6824 if (obj
->oartifact
== ART_RANDART_REROLL
) {
6826 pline("All randarts have been re-initialized!");
6830 if (obj
->oartifact
== ART_SKILL_RESET
) {
6835 while (u
.skills_advanced
&& tryct
) {
6836 lose_last_spent_skill();
6842 u
.weapon_slots
++; /* because every skill up costs one slot --Amy */
6846 Your("skills have been resetted.");
6850 if (obj
->oartifact
== ART_BUILD_A_WALL
) {
6852 for (x
= 0; x
< COLNO
; x
++)
6853 for (y
= 0; y
< ROWNO
; y
++) {
6854 register struct rm
*lev
;
6856 if (!(lev
->typ
== ALTAR
&& (Is_astralevel(&u
.uz
) || Is_sanctum(&u
.uz
)) ) && !(lev
->wall_info
& W_NONDIGGABLE
) && lev
->typ
!= STAIRS
&& lev
->typ
!= LADDER
&& ((x
== u
.ux
) || (y
== u
.uy
)) ) lev
->typ
= ROCKWALL
;
6858 pline("Build a wall, build a wall...");
6862 if (obj
->oartifact
== ART_BLANKIT_NOW
) {
6864 if (CannotSelectItemsInPrompts
) break;
6865 pline("You may remove the egotype from a piece of armor.");
6867 otmp
= getobj(allnoncount
, "de-egotype");
6869 if (yn("Really exit with no object selected?") == 'y')
6870 pline("You just wasted the opportunity to de-egotype your armor.");
6871 else goto armorspecchoice
;
6872 pline("Oh well, if you don't wanna...");
6873 exercise(A_WIS
, FALSE
);
6876 if (otmp
->oclass
!= ARMOR_CLASS
) {
6877 pline("That's not a piece of armor, and therefore the attempt fails.");
6880 if (!otmp
->enchantment
) {
6881 pline("There was no enchantment on the item to begin with.");
6886 if (otmp
->owornmask
) setnotworn(otmp
);
6887 otmp
->enchantment
= 0;
6888 pline("The item's egotype is gone. Be aware that if you were wearing it, the item has now been unequipped.");
6894 if (obj
->oartifact
== ART_ENTERTAINING_CLEAR
) {
6895 int multiplegather
= 0;
6896 register struct monst
*nexusmon
;
6897 for(nexusmon
= fmon
; nexusmon
; nexusmon
= nexusmon
->nmon
) {
6898 if (nexusmon
&& !nexusmon
->mtame
&& !nexusmon
->mpeaceful
&& !(u
.usteed
&& (u
.usteed
== nexusmon
) ) ) {
6903 if (multiplegather
) pline("%d monsters were teleported to you!", multiplegather
);
6904 else pline("Weird, nothing seems to have happened.");
6909 if (obj
->oartifact
== ART_FREE_SKILL_SLOTS
) {
6912 u
.weapon_slots
+= rnd(5);
6913 You("feel very skillful, and now have %d skill slots!", u
.weapon_slots
);
6919 if (obj
->oartifact
== ART_MONEYSACK
) {
6921 u
.ugold
+= rnd(1000);
6922 Your("budget is extended!");
6926 if (obj
->oartifact
== ART_JYL__NOT_XLATED_CALL_KEN
) {
6928 u
.ugold
+= rnd(500);
6929 You("sold some jewels and gained money.");
6933 if (obj
->oartifact
== ART_KEY_TO_THE_GOLDEN_ITEMS
) {
6935 register struct obj
*goldenitem
;
6936 if (CannotSelectItemsInPrompts
) return 0;
6938 goldenitem
= getobj(allowall
, "turn into an artifact");
6940 if (yn("Really exit with no object selected?") == 'y')
6941 pline("You just wasted the opportunity to turn an item into an artifact.");
6942 else goto goldenchoice
;
6943 pline("Oh well, if you don't wanna...");
6946 if (evades_destruction(goldenitem
)) {
6947 pline("That item is unique, and therefore nothing happens!");
6950 if (goldenitem
->oartifact
|| goldenitem
->fakeartifact
) {
6951 pline("That item is already an artifact, and therefore nothing happens!");
6956 savewornmask
= goldenitem
->owornmask
;
6957 setworn((struct obj
*)0, goldenitem
->owornmask
);
6959 goldenitem
= mk_artifact(goldenitem
, (aligntyp
)A_NONE
, TRUE
);
6960 if (goldenitem
&& goldenitem
->oartifact
) {
6963 setworn(goldenitem
, savewornmask
);
6967 } else if (goldenitem
) {
6968 setworn(goldenitem
, savewornmask
);
6973 if (obj
->oartifact
== ART_KEY_TO_THE_GREEN_ITEMS
) {
6975 register struct obj
*greenitem
;
6976 if (CannotSelectItemsInPrompts
) return 0;
6978 greenitem
= getobj(allowall
, "turn into a fake artifact");
6980 if (yn("Really exit with no object selected?") == 'y')
6981 pline("You just wasted the opportunity to turn an item into an artifact.");
6982 else goto greenchoice
;
6983 pline("Oh well, if you don't wanna...");
6986 if (evades_destruction(greenitem
)) {
6987 pline("That item is unique, and therefore nothing happens!");
6990 if (greenitem
->oartifact
|| greenitem
->fakeartifact
) {
6991 pline("That item is already an artifact, and therefore nothing happens!");
6994 greenitem
= turnintofakeartifact(greenitem
);
6995 if (greenitem
&& greenitem
->fakeartifact
) {
6997 if (greenitem
->oclass
== WEAPON_CLASS
|| greenitem
->oclass
== ARMOR_CLASS
|| greenitem
->oclass
== BALL_CLASS
|| greenitem
->oclass
== GEM_CLASS
|| greenitem
->oclass
== CHAIN_CLASS
|| greenitem
->oclass
== VENOM_CLASS
|| is_weptool(greenitem
)) {
6998 greenitem
->spe
= rne(2);
6999 if (!rn2(2)) greenitem
->spe
+= rne(2);
7009 if (obj
->oartifact
== ART_AUTOSWITCH
) {
7011 pline("You carefully pull the switch...");
7012 if (!Blind
) pline("The red status light goes out while the green light starts shining brightly!");
7013 pline("The switcher dissolves in your hands...");
7019 if (obj
->oartifact
== ART_DEATH_TO_TRAPS
) {
7021 register struct trap
*ttmp
;
7027 for (i
= 0; i
<= COLNO
; i
++) for(j
= 0; j
<= ROWNO
; j
++) {
7029 if (isok(i
, j
) && ((ttmp
= t_at(i
, j
)) != 0) ) {
7030 if (ttmp
->ttyp
== MAGIC_PORTAL
) continue;
7035 pline("Now the traps are dead.");
7041 if (obj
->oartifact
== ART_GOING_DISPLAY
) {
7043 Your("display goes again.");
7047 if (obj
->oartifact
== ART_THIRD_NEXT_MISSION
) {
7049 if (((u
.uhave
.amulet
) && !u
.freeplaymode
) || CannotTeleport
|| (u
.usteed
&& mon_has_amulet(u
.usteed
))) {
7050 pline("You shudder for a moment.");
7051 (void) safe_teleds_normalterrain(FALSE
);
7054 if (playerlevelportdisabled()) {
7055 pline("For some reason you resist the banishment!");
7064 if (obj
->oartifact
== ART_DEMO_CASE
) {
7066 if (t_at(u
.ux
, u
.uy
)) {
7067 You("fail to lay the mine, because there's a trap already!");
7072 ttrap
= maketrap(u
.ux
, u
.uy
, LANDMINE
, 0, FALSE
);
7073 if (ttrap
&& !ttrap
->hiddentrap
) {
7075 ttrap
->madeby_u
= 1;
7077 You("drop something on the ground.");
7079 if (practicantterror
) {
7080 pline("%s booms: 'Practicants are not allowed to lay mines! Now you pay 1000 zorkmids!'", noroelaname());
7081 fineforpracticant(1000, 0, 0);
7090 if (obj
->oartifact
== ART_SEE_THE_ENTIRE_MAP
) {
7091 boolean willdisappear
= FALSE
;
7094 willdisappear
= TRUE
;
7096 if (level
.flags
.nommap
) {
7097 Your("mind is filled with crazy lines!");
7099 pline("Wow! Modern art.");
7101 Your("%s spins in bewilderment.", body_part(HEAD
));
7102 make_confused(HConfusion
+ rnd(30), FALSE
);
7103 if (!rn2(3)) badeffect();
7104 if (willdisappear
) return 1;
7109 if (willdisappear
) return 1;
7114 if (obj
->oartifact
== ART_BACKPACK_BOMBER
) {
7115 struct obj
*dynamite
;
7116 dynamite
= mksobj(STICK_OF_DYNAMITE
, TRUE
, FALSE
, FALSE
);
7118 if (dynamite
->otyp
!= STICK_OF_DYNAMITE
) delobj(dynamite
);
7120 dynamite
->dynamitekaboom
= 1;
7122 dynamite
->owt
= weight(dynamite
);
7124 attach_bomb_blow_timeout(dynamite
, 0, 0);
7133 if (obj
->oartifact
== ART_DETONATIONS_MANTLE
) {
7134 struct obj
*dynamite
;
7135 dynamite
= mksobj(STICK_OF_DYNAMITE
, TRUE
, FALSE
, FALSE
);
7137 if (dynamite
->otyp
!= STICK_OF_DYNAMITE
) delobj(dynamite
);
7139 u
.detonationhack
= TRUE
;
7140 dynamite
->dynamitekaboom
= 1;
7142 dynamite
->owt
= weight(dynamite
);
7144 attach_bomb_blow_timeout(dynamite
, 0, 0);
7146 u
.detonationhack
= FALSE
;
7154 if (obj
->oartifact
== ART_POPPY_S_STRIPED_TIGHTS
) {
7155 struct obj
*dynamite
;
7156 dynamite
= mksobj(STICK_OF_DYNAMITE
, TRUE
, FALSE
, FALSE
);
7158 if (dynamite
->otyp
!= STICK_OF_DYNAMITE
) delobj(dynamite
);
7160 dynamite
->dynamitekaboom
= 1;
7162 dynamite
->owt
= weight(dynamite
);
7164 attach_bomb_blow_timeout(dynamite
, 0, 0);
7173 if (obj
->oartifact
== ART_LASERSHIT
) {
7175 if (t_at(u
.ux
, u
.uy
)) {
7176 pline("There is a trap at your location, and therefore the attempt fails!");
7181 ttrap
= maketrap(u
.ux
, u
.uy
, S_PRESSING_TRAP
, 0, FALSE
);
7182 if (ttrap
&& !ttrap
->hiddentrap
) {
7184 ttrap
->madeby_u
= 1;
7186 You("laid a trap.");
7188 if (practicantterror
) {
7189 pline("%s thunders: 'You shitty practicant lass! Your act of shitting up my laboratory will not be tolerated! Now you pay 5000 zorkmids and clean away your shit, got it?'", noroelaname());
7190 fineforpracticant(5000, 0, 0);
7199 if (obj
->oartifact
== ART_ASSSLASHER_KATANA
) {
7201 if (!flags
.female
) {
7203 You("neuter yourself... but unfortunately playing as a neuter character isn't supported in this version, and therefore the area where you just cut off your penis grows into a neovagina instead.");
7209 if (obj
->oartifact
== ART_TZ__GLGG__AIV_FM__
) {
7212 buzz(24,6,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 24 = disintegration beam */
7218 if (obj
->oartifact
== ART_MELUGAS_ROCKET
) {
7221 buzz(20 + rn2(AD_SPC2
),5,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* random breath */
7227 if (obj
->oartifact
== ART_DOUBTLY_POISON
) {
7230 buzz(26,10,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 26 = poison blast */
7236 if (obj
->oartifact
== ART_DENH_OBVIO
) {
7239 buzz(16,6,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 16 = poison gas */
7245 if (obj
->oartifact
== ART_DWEEEEEEEAUWEAUW
) {
7246 int dweaustrength
= (GushLevel
/ 4);
7247 if (dweaustrength
< 1) dweaustrength
= 1;
7250 buzz(28,dweaustrength
,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 28 = solar beam */
7256 if (obj
->oartifact
== ART_RAYSWANDIR
) {
7259 buzz(20,6,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 20 = magic missile */
7265 if (obj
->oartifact
== ART_STREEEEEAM
) {
7268 buzz(20,6,u
.ux
,u
.uy
,u
.dx
,u
.dy
); /* 20 = magic missile */
7274 if (obj
->oartifact
== ART_GO_AWAY_TYPE_OF_ARMS
) {
7275 register struct monst
*typeofarms
;
7279 if (!getdir((char *)0)) break;
7280 if (!u
.dx
&& !u
.dy
) {
7283 if (!isok(u
.ux
+ u
.dx
, u
.uy
+ u
.dy
)) {
7284 pline("Invalid target location.");
7287 typeofarms
= m_at(u
.ux
+ u
.dx
, u
.uy
+ u
.dy
);
7289 if (typeofarms
->isshk
) {
7291 mongone(typeofarms
);
7292 pline_The("shopkeeper was erased.");
7301 if (obj
->oartifact
== ART_AVENGER_APPEARANCE
) {
7304 register struct permonst
*ptrZ
;
7305 register struct monst
*bossmon
;
7314 if (attempts
&& (attempts
% 10000 == 0)) u
.mondiffhack
++;
7315 if (!rn2(2000)) reset_rndmonst(NON_PM
);
7317 } while ( (!ptrZ
|| (ptrZ
&& !( (ptrZ
->geno
& G_UNIQ
) && (is_male(ptrZ
)) ))) && attempts
< 50000);
7319 if (ptrZ
&& ptrZ
->geno
& G_UNIQ
&& is_male(ptrZ
)) {
7320 bossmon
= makemon(ptrZ
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7328 tamedog(bossmon
, (struct obj
*) 0, TRUE
);
7338 if (attempts
&& (attempts
% 10000 == 0)) u
.mondiffhack
++;
7339 if (!rn2(2000)) reset_rndmonst(NON_PM
);
7341 } while ( (!ptrZ
|| (ptrZ
&& !( (ptrZ
->geno
& G_UNIQ
) && (is_female(ptrZ
)) ))) && attempts
< 50000);
7343 if (ptrZ
&& ptrZ
->geno
& G_UNIQ
&& is_female(ptrZ
)) {
7344 bossmon
= makemon(ptrZ
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7352 tamedog(bossmon
, (struct obj
*) 0, TRUE
);
7357 pline_The("avenger and his woman have appeared!");
7364 if (obj
->oartifact
== ART_COMPLETE_RESET
) {
7366 int wflvl
= u
.ulevel
;
7367 if (wflvl
< 1) wflvl
= 1;
7368 register struct monst
*mtmp
, *mtmp2
;
7372 if (u
.ulevel
< 15) {
7373 pline("That doesn't work unless you're at least experience level 15.");
7376 if (u
.urexp
< 2000000) {
7377 pline("That doesn't work unless you have at least 2 million score.");
7383 while (u
.ulevel
> 1) losexp("complete reset", TRUE
, FALSE
); /* set XL back to 1 */
7384 if (u
.uhpmax
< (urole
.hpadv
.infix
+ urace
.hpadv
.infix
)) {
7385 u
.uhpmax
= urole
.hpadv
.infix
+ urace
.hpadv
.infix
;
7386 if (Role_if(PM_DQ_SLIME
) && Race_if(PM_PLAYER_SLIME
)) u
.uhpmax
+= 20;
7387 if (u
.uhp
< u
.uhpmax
) u
.uhp
= u
.uhpmax
;
7389 if (!tech_known(T_RESTORE_LIFE_LEVELS
)) {
7390 learntech(T_RESTORE_LIFE_LEVELS
, FROMOUTSIDE
, 1);
7393 dataskilldecrease(); /* set training of all skills back to 0 */
7394 for (n
= 0; n
< MAXSPELL
&& spellid(n
) != NO_SPELL
; n
++) { /* lose all spells */
7395 spellid(n
) = NO_SPELL
;
7397 resettechs(); /* +rnz(100k) timeout for all techs */
7398 u
.urexp
= 0; /* reset score to 0 */
7400 /* game over, unless you have life saving */
7401 killer
= "a complete reset";
7402 killer_format
= KILLED_BY
;
7406 /* world fall, but bosses aren't immune and higher-level monsters only have 50% chance of surviving */
7407 for (mtmp
= fmon
; mtmp
; mtmp
= mtmp2
) {
7409 if ( ((mtmp
->m_lev
< wflvl
) || (!rn2(2) && mtmp
->m_lev
< (2 * wflvl
))) ) {
7414 pline("Eliminated %d monster%s.", num
, plur(num
));
7420 if (obj
->oartifact
== ART_CURSE_PURIFY
) {
7424 register struct obj
*tbunc
;
7426 for (tbunc
= invent
; tbunc
; tbunc
= tbunc
->nobj
) {
7428 /* gold isn't subject to cursing and blessing */
7429 if (tbunc
->oclass
== COIN_CLASS
) continue;
7431 uncurse(tbunc
, TRUE
);
7434 Your("inventory has been purged from curses.");
7441 if (obj
->oartifact
== ART_ROTATE_ME
) {
7442 play_blackjack(TRUE
);
7447 if (obj
->oartifact
== ART_CASSERINO
) {
7448 play_blackjack(TRUE
);
7453 if (obj
->oartifact
== ART_YOHUALLI_TEZCATL
) {
7454 make_sick(0L, (char *) 0, FALSE
, SICK_ALL
);
7455 make_blinded(0L,FALSE
);
7456 make_stunned(0L,TRUE
);
7457 make_confused(0L,TRUE
);
7458 (void) make_hallucinated(0L,FALSE
,0L);
7459 make_numbed(0L,TRUE
);
7460 make_feared(0L,TRUE
);
7461 make_frozen(0L,TRUE
);
7462 make_burned(0L,TRUE
);
7463 make_dimmed(0L,TRUE
);
7468 if (obj
->oartifact
== ART_LILLY_S_SECRET_AGENCY
) {
7470 if (In_endgame(&u
.uz
)) {
7471 pline("The documents are unavailable on the planes!");
7475 register struct monst
*offmon
;
7476 struct obj
*rosafootwear
;
7478 while (uarmf
&& mattries
++ < 50000) {
7479 if ((offmon
= makemon(&mons
[PM_LILLY
], 0, 0, NO_MM_FLAGS
)) != 0) {
7480 offmon
->mpeaceful
= TRUE
;
7481 offmon
->mfrenzied
= FALSE
;
7483 setnotworn(rosafootwear
);
7484 freeinv(rosafootwear
);
7485 (void) mpickobj(offmon
, rosafootwear
, FALSE
);
7486 u_teleport_monC(offmon
, FALSE
);
7490 rolerecursioneffect();
7492 pline("You've exchanged your documents with Lilly...");
7493 pline("...and apparently she was a %s, so that's what you are now!", (flags
.female
&& urole
.name
.f
) ? urole
.name
.f
: urole
.name
.m
);
7499 if (obj
->oartifact
== ART_GOT_THAT_STARWARS_ENTRANCE
) {
7500 if (!u
.greencrossopen
) {
7501 u
.greencrossopen
= TRUE
;
7502 pline("The Green Cross subdungeon is now open!");
7503 } else pline("The Green Cross subdungeon was already open.");
7507 if (obj
->oartifact
== ART_WAY_TOO_SOFT
) {
7513 for(i
= -bd
; i
<= bd
; i
++) for(j
= -bd
; j
<= bd
; j
++) {
7514 if (!isok(u
.ux
+ i
, u
.uy
+ j
)) continue;
7515 if ((mtmp
= m_at(u
.ux
+ i
, u
.uy
+ j
)) != 0) {
7516 wakeup(mtmp
); /* monster becomes hostile */
7518 mtmp
->mblinded
= rnd(20);
7519 pline("%s is blinded!", Monnam(mtmp
));
7527 if (obj
->oartifact
== ART_CALLGIRL
) {
7528 struct permonst
*shoe
= 0;
7530 struct monst
*shoemonst
;
7535 if (attempts
&& (attempts
% 10000 == 0)) u
.mondiffhack
++;
7536 if (!rn2(2000)) reset_rndmonst(NON_PM
);
7538 } while ( (!shoe
|| (shoe
&& !(shoe
->msound
== MS_SHOE
))) && attempts
< 50000);
7540 if (shoe
&& (shoe
->msound
== MS_SHOE
) ) {
7541 pline("A shoe appears from nowhere!");
7542 shoemonst
= makemon(shoe
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7543 if (shoemonst
) (void) tamedog(shoemonst
, (struct obj
*) 0, TRUE
);
7545 pline("Hmm... you expected a shoe, but some other monster appeared instead!");
7546 shoemonst
= makemon(shoe
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7547 if (shoemonst
) (void) tamedog(shoemonst
, (struct obj
*) 0, TRUE
);
7548 } else pline("Somehow, it failed... :(");
7556 case CHOCOLATE_CREATION
:
7559 if (obj
->oartifact
== ART_QUADRATIC_PRACTIC_BANG_BAG
) {
7560 register struct obj
*bangbag
;
7561 if (CannotSelectItemsInPrompts
) return 0;
7562 pline("You need to pick a scroll to use as raw material.");
7564 bangbag
= getobj(allowall
, "use as raw material");
7566 if (yn("Really exit with no object selected?") == 'y')
7567 pline("You just wasted the opportunity to create chocolate.");
7568 else goto bangbagchoice
;
7569 pline("Oh well, if you don't wanna...");
7572 if (bangbag
->oclass
!= SCROLL_CLASS
) {
7573 pline("That isn't a scroll! The attempt fails.");
7577 if (bangbag
->otyp
== SCR_MAIL
) {
7578 pline("Cheater. Your mail goes up in flames.");
7583 if (evades_destruction(bangbag
)) {
7584 pline("Yeah, you wish you could use a scroll that doesn't disappear.");
7588 if (bangbag
->oclass
== SCROLL_CLASS
) {
7589 if (bangbag
->quan
> 1) {
7591 bangbag
->owt
= weight(bangbag
);
7601 struct obj
*uchocitem
;
7603 uchocitem
= mksobj(CHOCOLATE
, TRUE
, FALSE
, FALSE
);
7605 uchocitem
->quan
= 1;
7606 uchocitem
->known
= uchocitem
->dknown
= uchocitem
->bknown
= uchocitem
->rknown
= 1;
7607 uchocitem
->owt
= weight(uchocitem
);
7609 stackobj(uchocitem
);
7611 uchocitem
= mksobj(CHOCOEGG
, TRUE
, FALSE
, FALSE
);
7613 uchocitem
->quan
= 1;
7614 uchocitem
->known
= uchocitem
->dknown
= uchocitem
->bknown
= uchocitem
->rknown
= 1;
7615 uchocitem
->owt
= weight(uchocitem
);
7617 stackobj(uchocitem
);
7619 pline("A christmas present may be waiting for you on the floor!");
7625 u
.uhp
-= rn2(20) + 5;
7626 pline_The("Hand claws you with its icy nails!");
7629 killer_format
= KILLED_BY
;
7630 killer
="the Hand of Vecna";
7635 summon_loop
= rn2(4) + 4;
7636 pline("Creatures from the grave surround you!");
7638 if (Aggravate_monster
) {
7640 reset_rndmonst(NON_PM
);
7644 switch (rn2(6) + 1) {
7646 pm
= mkclass(S_VAMPIRE
, 0);
7650 pm
= mkclass(S_ZOMBIE
, 0);
7653 pm
= mkclass(S_MUMMY
, 0);
7656 pm
= mkclass(S_GHOST
, 0);
7659 pm
= mkclass(S_WRAITH
, 0);
7662 mtmp
= makemon(pm
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7663 if ((mtmp2
= tamedog(mtmp
, (struct obj
*)0, FALSE
)) != 0)
7667 } while (summon_loop
);
7676 You_feel("more observant.");
7679 case SUMMON_FIRE_ELEMENTAL
:
7680 pm
= &mons
[PM_FIRE_ELEMENTAL
];
7681 mtmp
= makemon(pm
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7683 pline("You summon an elemental.");
7685 if ((mtmp2
= tamedog(mtmp
, (struct obj
*)0, FALSE
) ) != 0)
7689 case SUMMON_WATER_ELEMENTAL
:
7690 pm
= &mons
[PM_WATER_ELEMENTAL
];
7691 mtmp
= makemon(pm
, u
.ux
, u
.uy
, NO_MM_FLAGS
);
7693 pline("You summon an elemental.");
7695 if ((mtmp2
= tamedog(mtmp
, (struct obj
*)0, FALSE
) ) != 0)
7700 (void)object_detect(obj
, 0);
7703 if (playerlevelportdisabled()) {
7704 You("can't branchport!");
7708 int i
, num_ok_dungeons
, last_ok_dungeon
= 0;
7710 extern int n_dgns
; /* from dungeon.c */
7711 winid tmpwin
= create_nhwindow(NHW_MENU
);
7714 any
.a_void
= 0; /* set all bits to zero */
7715 if (Is_blackmarket(&u
.uz
) && *u
.ushops
) {
7716 You_feel("very disoriented for a moment.");
7717 destroy_nhwindow(tmpwin
);
7721 /* use index+1 (cant use 0) as identifier */
7722 for (i
= num_ok_dungeons
= 0; i
< n_dgns
; i
++) {
7723 if (!dungeons
[i
].dunlev_ureached
) continue;
7725 /* prevent player from ch3ating past the invocation ritual in wonderland mode --Amy */
7726 if (flags
.wonderland
&& !achieve
.perform_invocation
) {
7727 if (!strcmp(dungeons
[i
].dname
, "Yendorian Tower")) continue;
7728 if (!strcmp(dungeons
[i
].dname
, "Forging Chamber")) continue;
7729 if (!strcmp(dungeons
[i
].dname
, "Dead Grounds")) continue;
7730 if (!strcmp(dungeons
[i
].dname
, "Ordered Chaos")) continue;
7731 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TA")) continue;
7732 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TB")) continue;
7733 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TC")) continue;
7734 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TD")) continue;
7735 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TE")) continue;
7736 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TF")) continue;
7737 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TG")) continue;
7738 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TH")) continue;
7739 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TI")) continue;
7740 if (!strcmp(dungeons
[i
].dname
, "Resting Zone TJ")) continue;
7743 add_menu(tmpwin
, NO_GLYPH
, &any
, 0, 0, ATR_NONE
,
7744 dungeons
[i
].dname
, MENU_UNSELECTED
);
7746 last_ok_dungeon
= i
;
7748 end_menu(tmpwin
, "Open a portal to which dungeon?");
7749 if (num_ok_dungeons
> 1) {
7750 /* more than one entry; display menu for choices */
7751 menu_item
*selected
;
7754 n
= select_menu(tmpwin
, PICK_ONE
, &selected
);
7756 destroy_nhwindow(tmpwin
);
7757 goto nothing_special
;
7759 i
= selected
[0].item
.a_int
- 1;
7760 free((void *)selected
);
7762 i
= last_ok_dungeon
; /* also first & only OK dungeon */
7763 destroy_nhwindow(tmpwin
);
7766 * i is now index into dungeon structure for the new dungeon.
7767 * Find the closest level in the given dungeon, open
7768 * a use-once portal to that dungeon and go there.
7769 * The closest level is either the entry or dunlev_ureached.
7772 if(dungeons
[i
].depth_start
>= depth(&u
.uz
))
7773 newlev
.dlevel
= dungeons
[i
].entry_lev
;
7775 newlev
.dlevel
= dungeons
[i
].dunlev_ureached
;
7776 if((u
.uhave
.amulet
&& !u
.freeplaymode
) || CannotTeleport
|| In_endgame(&u
.uz
) || (u
.usteed
&& mon_has_amulet(u
.usteed
)) || In_endgame(&newlev
) ||
7777 newlev
.dnum
== u
.uz
.dnum
) {
7778 You_feel("very disoriented for a moment.");
7780 if(!Blind
) You("are surrounded by a shimmering sphere!");
7781 else You_feel("weightless for a moment.");
7782 if (practicantterror
) {
7783 pline("%s thunders: 'That's not an allowed form of transportation! Are you really too lazy to take the elevator or the stairs? Well wait, I'll ground you for that offense. And additionally you also pay 10000 zorkmids to me!'", noroelaname());
7784 fineforpracticant(10000, 0, 0);
7785 NoReturnEffect
+= rnz(10000);
7788 u
.cnd_branchportcount
++;
7789 goto_level(&newlev
, FALSE
, FALSE
, FALSE
);
7791 if (obj
&& obj
->oartifact
== ART_BIZARRO_ORGASMATRON
) {
7792 if ((u
.bizarrotries
> 2) && !inertiaprotection()) {
7793 u
.uprops
[DEAC_FAST
].intrinsic
+= ((u
.bizarrotries
- 2) * 500);
7794 pline("Due to overexertion and too many orgasms, you feel very lethargic...");
7795 pline(u
.inertia
? "You feel even slower." : "You slow down to a crawl.");
7796 u
.inertia
+= ((u
.bizarrotries
- 2) * 500);
7805 if (!powerfulimplants() && obj
&& obj
->oartifact
== ART_SAATUSPLEASE
) curse(obj
);
7807 enlightenment(0, 1);
7810 struct obj
*otmp
= mksobj(ARROW
, TRUE
, FALSE
, FALSE
);
7812 if (!otmp
) goto nothing_special
;
7813 otmp
->blessed
= obj
->blessed
;
7814 otmp
->cursed
= obj
->cursed
;
7815 otmp
->bknown
= obj
->bknown
;
7817 if (otmp
->spe
< 0) otmp
->spe
= 0;
7818 otmp
->quan
+= rnd(10);
7819 } else if (obj
->cursed
) {
7820 if (otmp
->spe
> 0) otmp
->spe
= 0;
7822 otmp
->quan
+= rnd(5);
7823 otmp
->owt
= weight(otmp
);
7824 otmp
= hold_another_object(otmp
, "Suddenly %s out.",
7825 aobjnam(otmp
, "fall"), (const char *)0);
7828 object_detect(obj
, 0);
7829 artifact_detect(obj
);
7831 case PHASING
: /* Walk through walls and stone like a xorn */
7832 if (Passes_walls
) goto nothing_special
;
7833 if (oart
== &artilist
[ART_IRON_BALL_OF_LIBERATION
]) {
7834 if (Punished
&& (obj
!= uball
)) {
7835 unpunish(); /* Remove a mundane heavy iron ball */
7839 setworn(mkobj(CHAIN_CLASS
, TRUE
, FALSE
), W_CHAIN
);
7840 setworn(obj
, W_BALL
);
7844 if (Blind
) set_bc(1); /* set up ball and chain variables */
7845 newsym(u
.ux
,u
.uy
); /* see ball&chain if can't see self */
7847 Your("%s chains itself to you!", xname(obj
));
7851 Your("body begins to feel less solid.");
7853 You_feel("one with the spirit world.");
7855 incr_itimeout(&Phasing
, (50 + rnd(100)));
7856 obj
->invoketimer
+= Phasing
; /* Time begins after phasing ends */
7861 long eprop
= (u
.uprops
[oart
->inv_prop
].extrinsic
^= W_ARTI
),
7862 iprop
= u
.uprops
[oart
->inv_prop
].intrinsic
;
7863 boolean on
= (eprop
& W_ARTI
) != 0; /* true if invoked prop just set */
7865 if (obj
->oartifact
>= ART_ORB_OF_DETECTION
&& !is_quest_artifact(obj
)) {
7866 pline("Tapping into the powers of artifacts that don't belong to you is dangerous.");
7867 contaminate(rnz(100), TRUE
);
7868 increasesanity(rnz(100));
7869 adjalign(-rnz(100));
7872 if(on
&& obj
->invoketimer
> monstermoves
) {
7873 /* the artifact is tired :-) */
7874 u
.uprops
[oart
->inv_prop
].extrinsic
^= W_ARTI
;
7875 You_feel("that %s %s ignoring you.",
7876 the(xname(obj
)), otense(obj
, "are"));
7877 /* can't just keep repeatedly trying */
7878 obj
->invoketimer
+= (long) d(3,10);
7879 if (!rn2(5)) obj
->invoketimer
+= (long) rnz(100);
7882 /* when turning off property, determine downtime */
7883 /* arbitrary for now until we can tune this -dlc */
7884 obj
->invoketimer
= monstermoves
+ artitimeout
;
7885 use_skill(P_SQUEAKING
, rnd(10));
7888 if ((eprop
& ~W_ARTI
) || iprop
) {
7890 /* you had the property from some other source too */
7892 You_feel("a surge of power, but nothing seems to happen.");
7895 switch(oart
->inv_prop
) {
7897 if(on
) You_feel("like a rabble-rouser.");
7898 else You_feel("the tension decrease around you.");
7904 } else (void) float_down(I_SPECIAL
|TIMEOUT
, W_ARTI
);
7907 if (BInvis
|| Blind
) goto nothing_special
;
7910 Your("body takes on a %s transparency...",
7911 FunnyHallu
? "normal" : "strange");
7913 Your("body seems to unfade...");
7922 * Artifact is dipped into water
7923 * -1 not handled here (not used up here)
7924 * 0 no effect but used up
7927 * Note caller should handle what happens to the medium in these cases.
7928 * This only prints messages about the actual artifact.
7932 artifact_wet(obj
, silent
)
7936 if (!obj
->oartifact
) return (-1);
7937 switch (artilist
[(int) (obj
)->oartifact
].attk
.adtyp
) {
7940 pline("A cloud of steam rises.");
7941 pline("%s is untouched.", The(xname(obj
)));
7946 pline("Icicles form and fall from the freezing %s.",
7952 pline_The("humid air crackles with electricity from %s.",
7958 pline("%s absorbs the water!", The(xname(obj
)));
7967 /* WAC return TRUE if artifact is always lit */
7972 return get_artifact(obj
) && (obj
->oartifact
== ART_SUNSWORD
||
7973 obj
->oartifact
== ART_HOLY_SPEAR_OF_LIGHT
||
7974 obj
->oartifact
== ART_SUNSCREEN
||
7975 obj
->oartifact
== ART_SUNTINOPENER
||
7976 obj
->oartifact
== ART_SUNRUBBERHOSE
||
7977 obj
->oartifact
== ART_CANDLE_OF_ETERNAL_FLAME
);
7980 /* KMH -- Talking artifacts are finally implemented */
7986 impossible("arti_speak called with no valid object");
7990 register const struct artifact
*oart
= get_artifact(obj
);
7995 /* Is this a speaking artifact? */
7996 if (!oart
|| !(oart
->spfx
& SPFX_SPEAK
))
7999 line
= getrumor(bcsign(obj
), buf
, TRUE
);
8001 line
= "Slash'EM rumors file closed for renovation.";
8002 pline("%s:", Tobjnam(obj
, "whisper"));
8003 verbalize("%s", line
);
8008 artifact_has_invprop(otmp
, inv_prop
)
8010 /*uchar*/int inv_prop
;
8012 const struct artifact
*arti
= get_artifact(otmp
);
8014 return((boolean
)(arti
&& (arti
->inv_prop
== inv_prop
)));
8017 /* Return the price sold to the hero of a given artifact or unique item */
8022 if (!otmp
->oartifact
)
8023 return ((long)objects
[otmp
->otyp
].oc_cost
);
8024 else if (artilist
[(int) otmp
->oartifact
].cost
)
8025 return (artilist
[(int) otmp
->oartifact
].cost
);
8027 return (100L * (long)objects
[otmp
->otyp
].oc_cost
);
8030 static const char *random_seasound
[] = {
8034 "the call of the ocean",
8035 "waves against the shore",
8037 "the sighing of waves",
8038 "quarrelling gulls",
8039 "the song of the deep",
8040 "rumbling in the deeps",
8041 "the singing of Eidothea",
8042 "the laughter of the protean nymphs",
8044 "the elusive sea change",
8045 "the silence of the sea",
8046 "the passage of the albatross",
8047 "dancing raindrops",
8048 "coins rolling on the seabed",
8049 "treasure galleons crumbling in the depths",
8050 "waves lapping against a hull"
8053 /* Polymorph obj contents */
8055 arti_poly_contents(obj
)
8058 struct obj
*dobj
= 0; /*object to be deleted*/
8060 You_hear("%s.",random_seasound
[rn2(SIZE(random_seasound
))]);
8061 for (otmp
= obj
->cobj
; otmp
; otmp
= otmp
->nobj
){
8066 if(!obj_resists(otmp
, 5, 95) && !stack_too_big(otmp
) ){
8068 u
.uconduct
.polypiles
++;
8069 /* any saved lock context will be dangerously obsolete */
8070 if (Is_box(otmp
)) (void) boxlock(otmp
, obj
);
8072 if (obj_shudders(otmp
)) {
8075 else otmp
= poly_obj(otmp
, STRANGE_OBJECT
, TRUE
);
8085 find_wildtalentartifact()
8087 int artifactnumber
= artilist
[ART_ELLI_S_PSEUDOBAND_OF_POS
].otyp
;
8088 return artifactnumber
;
8092 find_prostituteartifact()
8094 int artifactnumber
= artilist
[ART_HIGHEST_FEELING
].otyp
;
8095 return artifactnumber
;
8099 find_kurwaartifact()
8101 int artifactnumber
= artilist
[ART_LORSKEL_S_INTEGRITY
].otyp
;
8102 return artifactnumber
;
8105 /* Function that adds or removes a random intrinsic from the player. --Amy */
8107 intrinsicgainorloss(inttype
)
8108 int inttype
; /* 0 = random, 1 = always gain an intrinsic, 2 = always lose an intrinsic */
8110 register boolean intloss
= rn2(2);
8112 boolean hasmadeachange
= 0;
8116 if (!rn2(5)) intloss
= rn2(2);
8118 if (inttype
== 1) intloss
= FALSE
;
8119 if (inttype
== 2) intloss
= TRUE
;
8121 if (rn2(4)) { /* ones that can easily be gained by eating things */
8126 if (HFire_resistance
& INTRINSIC
) {
8127 HFire_resistance
&= ~INTRINSIC
;
8128 You_feel("warmer.");
8131 if (HFire_resistance
& TIMEOUT
) {
8132 HFire_resistance
&= ~TIMEOUT
;
8133 You_feel("warmer.");
8137 if(!(HFire_resistance
& FROMOUTSIDE
)) {
8138 You(FunnyHallu
? "be chillin'." : "feel a momentary chill.");
8139 HFire_resistance
|= FROMOUTSIDE
;
8146 if (HTeleportation
& INTRINSIC
) {
8147 HTeleportation
&= ~INTRINSIC
;
8148 You_feel("less jumpy.");
8151 if (HTeleportation
& TIMEOUT
) {
8152 HTeleportation
&= ~TIMEOUT
;
8153 You_feel("less jumpy.");
8157 if(!(HTeleportation
& FROMOUTSIDE
)) {
8158 You_feel(FunnyHallu
? "diffuse." : "very jumpy.");
8159 HTeleportation
|= FROMOUTSIDE
;
8166 if (HPoison_resistance
& INTRINSIC
) {
8167 HPoison_resistance
&= ~INTRINSIC
;
8168 You_feel("a little sick!");
8171 if (HPoison_resistance
& TIMEOUT
) {
8172 HPoison_resistance
&= ~TIMEOUT
;
8173 You_feel("a little sick!");
8177 if(!(HPoison_resistance
& FROMOUTSIDE
)) {
8178 You_feel(Poison_resistance
? "especially healthy." : "healthy.");
8179 HPoison_resistance
|= FROMOUTSIDE
;
8186 if (HTelepat
& INTRINSIC
) {
8187 HTelepat
&= ~INTRINSIC
;
8188 Your("senses fail!");
8191 if (HTelepat
& TIMEOUT
) {
8192 HTelepat
&= ~TIMEOUT
;
8193 Your("senses fail!");
8197 if(!(HTelepat
& FROMOUTSIDE
)) {
8198 You_feel(FunnyHallu
? "in touch with the cosmos." : "a strange mental acuity.");
8199 HTelepat
|= FROMOUTSIDE
;
8206 if (HCold_resistance
& INTRINSIC
) {
8207 HCold_resistance
&= ~INTRINSIC
;
8208 You_feel("cooler.");
8211 if (HCold_resistance
& TIMEOUT
) {
8212 HCold_resistance
&= ~TIMEOUT
;
8213 You_feel("cooler.");
8217 if(!(HCold_resistance
& FROMOUTSIDE
)) {
8218 You_feel("full of hot air.");
8219 HCold_resistance
|= FROMOUTSIDE
;
8226 if (HInvis
& INTRINSIC
) {
8227 HInvis
&= ~INTRINSIC
;
8228 You_feel("paranoid.");
8231 if (HInvis
& TIMEOUT
) {
8233 You_feel("paranoid.");
8237 if(!(HInvis
& FROMOUTSIDE
)) {
8238 You_feel("less visible.");
8239 HInvis
|= FROMOUTSIDE
;
8246 if (HSee_invisible
& INTRINSIC
) {
8247 HSee_invisible
&= ~INTRINSIC
;
8248 You("%s!", FunnyHallu
? "tawt you taw a puttie tat" : "thought you saw something");
8251 if (HSee_invisible
& TIMEOUT
) {
8252 HSee_invisible
&= ~TIMEOUT
;
8253 You("%s!", FunnyHallu
? "tawt you taw a puttie tat" : "thought you saw something");
8257 if(!(HSee_invisible
& FROMOUTSIDE
)) {
8258 You_feel("your vision sharpen.");
8259 HSee_invisible
|= FROMOUTSIDE
;
8266 if (HFast
& INTRINSIC
) {
8267 HFast
&= ~INTRINSIC
;
8268 You_feel("slower.");
8271 if (HFast
& TIMEOUT
) {
8273 You_feel("slower.");
8277 if(!(HFast
& FROMOUTSIDE
)) {
8278 You_feel("faster.");
8279 HFast
|= FROMOUTSIDE
;
8286 if (HAggravate_monster
& INTRINSIC
) {
8287 HAggravate_monster
&= ~INTRINSIC
;
8288 You_feel("less attractive.");
8291 if (HAggravate_monster
& TIMEOUT
) {
8292 HAggravate_monster
&= ~TIMEOUT
;
8293 You_feel("less attractive.");
8297 if(!(HAggravate_monster
& FROMOUTSIDE
)) {
8298 You_feel("monsters setting up portals.");
8299 HAggravate_monster
|= FROMOUTSIDE
;
8306 if (HSleep_resistance
& INTRINSIC
) {
8307 HSleep_resistance
&= ~INTRINSIC
;
8308 You_feel("tired all of a sudden.");
8311 if (HSleep_resistance
& TIMEOUT
) {
8312 HSleep_resistance
&= ~TIMEOUT
;
8313 You_feel("tired all of a sudden.");
8317 if(!(HSleep_resistance
& FROMOUTSIDE
)) {
8318 You_feel("wide awake.");
8319 HSleep_resistance
|= FROMOUTSIDE
;
8326 if (HDisint_resistance
& INTRINSIC
) {
8327 HDisint_resistance
&= ~INTRINSIC
;
8328 You_feel("like you're going to break apart.");
8331 if (HDisint_resistance
& TIMEOUT
) {
8332 HDisint_resistance
&= ~TIMEOUT
;
8333 You_feel("like you're going to break apart.");
8337 if(!(HDisint_resistance
& FROMOUTSIDE
)) {
8338 You_feel(FunnyHallu
? "totally together, man." : "very firm.");
8339 HDisint_resistance
|= FROMOUTSIDE
;
8346 if (HShock_resistance
& INTRINSIC
) {
8347 HShock_resistance
&= ~INTRINSIC
;
8348 You_feel("like someone has zapped you.");
8351 if (HShock_resistance
& TIMEOUT
) {
8352 HShock_resistance
&= ~TIMEOUT
;
8353 You_feel("like someone has zapped you.");
8357 if(!(HShock_resistance
& FROMOUTSIDE
)) {
8359 You_feel("grounded in reality.");
8361 Your("health currently feels amplified!");
8362 HShock_resistance
|= FROMOUTSIDE
;
8369 if (HTeleport_control
& INTRINSIC
) {
8370 HTeleport_control
&= ~INTRINSIC
;
8371 You_feel("unable to control where you're going.");
8374 if (HTeleport_control
& TIMEOUT
) {
8375 HTeleport_control
&= ~TIMEOUT
;
8376 You_feel("unable to control where you're going.");
8380 if(!(HTeleport_control
& FROMOUTSIDE
)) {
8381 You_feel(FunnyHallu
? "centered in your personal space." : "in control of yourself.");
8382 HTeleport_control
|= FROMOUTSIDE
;
8389 if (HAcid_resistance
& INTRINSIC
) {
8390 HAcid_resistance
&= ~INTRINSIC
;
8391 You_feel("worried about corrosion!");
8394 if (HAcid_resistance
& TIMEOUT
) {
8395 HAcid_resistance
&= ~TIMEOUT
;
8396 You_feel("worried about corrosion!");
8400 if(!(HAcid_resistance
& FROMOUTSIDE
)) {
8401 You(FunnyHallu
? "wanna do more acid!" : "feel less afraid of corrosives.");
8402 HAcid_resistance
|= FROMOUTSIDE
;
8409 int foopathynumber
= rnd(13);
8410 switch (foopathynumber
) {
8415 if (HHallu_party
& INTRINSIC
) {
8416 HHallu_party
&= ~INTRINSIC
;
8417 You_feel("that the party is over!");
8420 if (HHallu_party
& TIMEOUT
) {
8421 HHallu_party
&= ~TIMEOUT
;
8422 You_feel("that the party is over!");
8426 if(!(HHallu_party
& FROMOUTSIDE
)) {
8427 You_feel(FunnyHallu
?
8428 "like throwing wild parties with lots of sexy girls! Yeah!" :
8429 "a strange desire to celebrate.");
8430 HHallu_party
|= FROMOUTSIDE
;
8438 if (HDrunken_boxing
& INTRINSIC
) {
8439 HDrunken_boxing
&= ~INTRINSIC
;
8440 You_feel("a little drunk!");
8443 if (HDrunken_boxing
& TIMEOUT
) {
8444 HDrunken_boxing
&= ~TIMEOUT
;
8445 You_feel("a little drunk!");
8449 if(!(HDrunken_boxing
& FROMOUTSIDE
)) {
8450 You_feel(FunnyHallu
? "like Mike Tyson!" : "ready for a good brawl.");
8451 HDrunken_boxing
|= FROMOUTSIDE
;
8459 if (HStunnopathy
& INTRINSIC
) {
8460 HStunnopathy
&= ~INTRINSIC
;
8461 You_feel("an uncontrolled stunning!");
8464 if (HStunnopathy
& TIMEOUT
) {
8465 HStunnopathy
&= ~TIMEOUT
;
8466 You_feel("an uncontrolled stunning!");
8470 if(!(HStunnopathy
& FROMOUTSIDE
)) {
8471 You_feel(FunnyHallu
? "a controlled wobbling! Feels like being on a bouncy ship!" : "steadily observant.");
8472 HStunnopathy
|= FROMOUTSIDE
;
8480 if (HNumbopathy
& INTRINSIC
) {
8481 HNumbopathy
&= ~INTRINSIC
;
8482 You_feel("numbness spreading through your body!");
8485 if (HNumbopathy
& TIMEOUT
) {
8486 HNumbopathy
&= ~TIMEOUT
;
8487 You_feel("numbness spreading through your body!");
8491 if(!(HNumbopathy
& FROMOUTSIDE
)) {
8492 You_feel(FunnyHallu
?
8493 "as if a sweet woman were clamping your toes with a block-heeled combat boot!" :
8494 "a numb feeling spreading through your body. Somehow, it doesn't feel bad at all...");
8495 HNumbopathy
|= FROMOUTSIDE
;
8503 if (HDimmopathy
& INTRINSIC
) {
8504 HDimmopathy
&= ~INTRINSIC
;
8505 You_feel(FunnyHallu
? "that your marriage is no longer safe..." : "worried about the future!");
8508 if (HDimmopathy
& TIMEOUT
) {
8509 HDimmopathy
&= ~TIMEOUT
;
8510 You_feel(FunnyHallu
? "that your marriage is no longer safe..." : "worried about the future!");
8514 if(!(HDimmopathy
& FROMOUTSIDE
)) {
8515 HDimmopathy
|= FROMOUTSIDE
;
8516 You_feel(FunnyHallu
?
8517 "like your wife was contemplating a breakup, but then you realize that she's gonna stay with you to the end of all time." :
8518 "a little down. But then, good feelings overcome you.");
8526 if (HFreezopathy
& INTRINSIC
) {
8527 HFreezopathy
&= ~INTRINSIC
;
8528 You_feel("ice-cold!");
8531 if (HFreezopathy
& TIMEOUT
) {
8532 HFreezopathy
&= ~TIMEOUT
;
8533 You_feel("ice-cold!");
8537 if(!(HFreezopathy
& FROMOUTSIDE
)) {
8538 You_feel(FunnyHallu
? "like eating a big cone of ice-cream - mmmmmmmm!" : "icy.");
8539 HFreezopathy
|= FROMOUTSIDE
;
8547 if (HStoned_chiller
& INTRINSIC
) {
8548 HStoned_chiller
&= ~INTRINSIC
;
8549 You_feel("that you ain't gonna get time for relaxing anymore!");
8552 if (HStoned_chiller
& TIMEOUT
) {
8553 HStoned_chiller
&= ~TIMEOUT
;
8554 You_feel("that you ain't gonna get time for relaxing anymore!");
8558 if(!(HStoned_chiller
& FROMOUTSIDE
)) {
8559 You_feel(FunnyHallu
? "that you're simply the best - yeah, no shit, man!" : "like relaxing on a couch.");
8560 HStoned_chiller
|= FROMOUTSIDE
;
8568 if (HCorrosivity
& INTRINSIC
) {
8569 HCorrosivity
&= ~INTRINSIC
;
8570 You_feel("the protective layer on your skin disappearing!");
8573 if (HCorrosivity
& TIMEOUT
) {
8574 HCorrosivity
&= ~TIMEOUT
;
8575 You_feel("the protective layer on your skin disappearing!");
8579 if(!(HCorrosivity
& FROMOUTSIDE
)) {
8580 You_feel(FunnyHallu
? "like you just got splashed with gunks of acid!" : "an acidic burning.");
8581 HCorrosivity
|= FROMOUTSIDE
;
8589 if (HFear_factor
& INTRINSIC
) {
8590 HFear_factor
&= ~INTRINSIC
;
8591 You_feel("fearful!");
8594 if (HFear_factor
& TIMEOUT
) {
8595 HFear_factor
&= ~TIMEOUT
;
8596 You_feel("fearful!");
8600 if(!(HFear_factor
& FROMOUTSIDE
)) {
8601 You_feel(FunnyHallu
? "like you're always running - from something! And the 'something' is a prostitute." : "ready to face your fears.");
8602 HFear_factor
|= FROMOUTSIDE
;
8610 if (HBurnopathy
& INTRINSIC
) {
8611 HBurnopathy
&= ~INTRINSIC
;
8612 You_feel("red-hot!");
8615 if (HBurnopathy
& TIMEOUT
) {
8616 HBurnopathy
&= ~TIMEOUT
;
8617 You_feel("red-hot!");
8621 if(!(HBurnopathy
& FROMOUTSIDE
)) {
8622 You_feel(FunnyHallu
? "super burninated by enemy with very tired!" : "a burning inside. Strangely, it feels quite soothing.");
8623 HBurnopathy
|= FROMOUTSIDE
;
8631 if (HSickopathy
& INTRINSIC
) {
8632 HSickopathy
&= ~INTRINSIC
;
8633 You_feel("a loss of medical knowledge!");
8636 if (HSickopathy
& TIMEOUT
) {
8637 HSickopathy
&= ~TIMEOUT
;
8638 You_feel("a loss of medical knowledge!");
8642 if(!(HSickopathy
& FROMOUTSIDE
)) {
8643 You_feel(FunnyHallu
?
8644 "that you just smoked some really wacky stuff! What the heck was in there?" :
8645 "ill for a moment, but get the feeling that you know more about diseases now.");
8646 HSickopathy
|= FROMOUTSIDE
;
8654 if (HWonderlegs
& INTRINSIC
) {
8655 HWonderlegs
&= ~INTRINSIC
;
8656 You_feel("that all girls and women will scratch bloody wounds on your legs with their high heels!");
8659 if (HWonderlegs
& TIMEOUT
) {
8660 HWonderlegs
&= ~TIMEOUT
;
8661 You_feel("that all girls and women will scratch bloody wounds on your legs with their high heels!");
8665 if(!(HWonderlegs
& FROMOUTSIDE
)) {
8666 You_feel(FunnyHallu
?
8667 "a wonderful sensation in your shins, like they were just kicked by female hugging boots! How lovely!" :
8668 "like having your legs scratched up and down by sexy leather pumps.");
8669 HWonderlegs
|= FROMOUTSIDE
;
8677 if (HGlib_combat
& INTRINSIC
) {
8678 HGlib_combat
&= ~INTRINSIC
;
8679 You_feel("fliction in your %s!", makeplural(body_part(HAND
)));
8682 if (HGlib_combat
& TIMEOUT
) {
8683 HGlib_combat
&= ~TIMEOUT
;
8684 You_feel("fliction in your %s!", makeplural(body_part(HAND
)));
8688 if(!(HGlib_combat
& FROMOUTSIDE
)) {
8689 You_feel(FunnyHallu
?
8690 "like an absolute marital arts champion, so you can start fighting off your spouse!" :
8691 "the fliction in your hands disappearing.");
8692 HGlib_combat
|= FROMOUTSIDE
;
8702 if (HStone_resistance
& INTRINSIC
) {
8703 HStone_resistance
&= ~INTRINSIC
;
8704 You_feel("less solid!");
8707 if (HStone_resistance
& TIMEOUT
) {
8708 HStone_resistance
&= ~TIMEOUT
;
8709 You_feel("less solid!");
8713 if(!(HStone_resistance
& FROMOUTSIDE
)) {
8714 You(FunnyHallu
? "feel stony and groovy, man." : "feel rock solid.");
8715 HStone_resistance
|= FROMOUTSIDE
;
8720 default: /* shouldn't happen */
8724 } else switch (rnd(56)) { /* ones that require eating jewelry or other weird actions */
8728 if (HStealth
& INTRINSIC
) {
8729 HStealth
&= ~INTRINSIC
;
8730 You_feel("clumsy.");
8733 if (HStealth
& TIMEOUT
) {
8734 HStealth
&= ~TIMEOUT
;
8735 You_feel("clumsy.");
8739 if(!(HStealth
& FROMOUTSIDE
)) {
8740 HStealth
|= FROMOUTSIDE
;
8741 You_feel("stealthy.");
8749 if (HProtection
& INTRINSIC
) {
8750 HProtection
&= ~INTRINSIC
;
8751 You_feel("vulnerable.");
8754 if (HProtection
& TIMEOUT
) {
8755 HProtection
&= ~TIMEOUT
;
8756 You_feel("vulnerable.");
8760 if(!(HProtection
& FROMOUTSIDE
)) {
8761 HProtection
|= FROMOUTSIDE
;
8762 You_feel("protected.");
8769 if (HDrain_resistance
& INTRINSIC
) {
8770 HDrain_resistance
&= ~INTRINSIC
;
8771 You_feel("like someone is sucking out your life-force.");
8774 if (HDrain_resistance
& TIMEOUT
) {
8775 HDrain_resistance
&= ~TIMEOUT
;
8776 You_feel("like someone is sucking out your life-force.");
8780 if(!(HDrain_resistance
& FROMOUTSIDE
)) {
8781 You_feel("that your life force is safe now.");
8782 HDrain_resistance
|= FROMOUTSIDE
;
8789 if (HSick_resistance
& INTRINSIC
) {
8790 HSick_resistance
&= ~INTRINSIC
;
8791 You_feel("no longer immune to diseases!");
8794 if (HSick_resistance
& TIMEOUT
) {
8795 HSick_resistance
&= ~TIMEOUT
;
8796 You_feel("no longer immune to diseases!");
8800 if(!(HSick_resistance
& FROMOUTSIDE
)) {
8801 You_feel("immune to diseases.");
8802 HSick_resistance
|= FROMOUTSIDE
;
8809 if (HWarning
& INTRINSIC
) {
8810 HWarning
&= ~INTRINSIC
;
8811 You_feel("that your radar has just stopped working!");
8814 if (HWarning
& TIMEOUT
) {
8815 HWarning
&= ~TIMEOUT
;
8816 You_feel("that your radar has just stopped working!");
8820 if(!(HWarning
& FROMOUTSIDE
)) {
8821 You_feel("that your radar was turned on.");
8822 HWarning
|= FROMOUTSIDE
;
8829 if (HSearching
& INTRINSIC
) {
8830 HSearching
&= ~INTRINSIC
;
8831 You_feel("unable to find something you lost!");
8834 if (HSearching
& TIMEOUT
) {
8835 HSearching
&= ~TIMEOUT
;
8836 You_feel("unable to find something you lost!");
8840 if(!(HSearching
& FROMOUTSIDE
)) {
8841 You_feel("capable of finding hidden secrets.");
8842 HSearching
|= FROMOUTSIDE
;
8849 if (HClairvoyant
& INTRINSIC
) {
8850 HClairvoyant
&= ~INTRINSIC
;
8851 You_feel("a loss of mental capabilities!");
8854 if (HClairvoyant
& TIMEOUT
) {
8855 HClairvoyant
&= ~TIMEOUT
;
8856 You_feel("a loss of mental capabilities!");
8860 if(!(HClairvoyant
& FROMOUTSIDE
)) {
8861 You_feel("your consciousness expand!");
8862 HClairvoyant
|= FROMOUTSIDE
;
8869 if (HInfravision
& INTRINSIC
) {
8870 HInfravision
&= ~INTRINSIC
;
8871 You_feel("shrouded in darkness.");
8874 if (HInfravision
& TIMEOUT
) {
8875 HInfravision
&= ~TIMEOUT
;
8876 You_feel("shrouded in darkness.");
8880 if(!(HInfravision
& FROMOUTSIDE
)) {
8881 You_feel("capable of seeing in the dark.");
8882 HInfravision
|= FROMOUTSIDE
;
8888 if (!rn2(200)) { /* detect monsters is the grand daddy and thus very rare --Amy */
8891 if (HDetect_monsters
& INTRINSIC
) {
8892 HDetect_monsters
&= ~INTRINSIC
;
8893 You_feel("that you can no longer sense monsters.");
8896 if (HDetect_monsters
& TIMEOUT
) {
8897 HDetect_monsters
&= ~TIMEOUT
;
8898 You_feel("that you can no longer sense monsters.");
8902 if(!(HDetect_monsters
& FROMOUTSIDE
)) {
8903 HDetect_monsters
|= FROMOUTSIDE
;
8904 You("sense monsters.");
8912 if (HJumping
& INTRINSIC
) {
8913 HJumping
&= ~INTRINSIC
;
8914 You_feel("your legs shrinking.");
8917 if (HJumping
& TIMEOUT
) {
8918 HJumping
&= ~TIMEOUT
;
8919 You_feel("your legs shrinking.");
8923 if(!(HJumping
& FROMOUTSIDE
)) {
8924 HJumping
|= FROMOUTSIDE
;
8925 You_feel("a sudden ability to jump.");
8933 if (HMagical_breathing
& INTRINSIC
) {
8934 HMagical_breathing
&= ~INTRINSIC
;
8935 You_feel("you suddenly need to breathe!");
8938 if (HMagical_breathing
& TIMEOUT
) {
8939 HMagical_breathing
&= ~TIMEOUT
;
8940 You_feel("you suddenly need to breathe!");
8944 if(!(HMagical_breathing
& FROMOUTSIDE
)) {
8945 You_feel("that you don't need to breathe any longer.");
8946 HMagical_breathing
|= FROMOUTSIDE
;
8953 if (HRegeneration
& INTRINSIC
) {
8954 HRegeneration
&= ~INTRINSIC
;
8955 You_feel("your wounds are healing slower!");
8958 if (HRegeneration
& TIMEOUT
) {
8959 HRegeneration
&= ~TIMEOUT
;
8960 You_feel("your wounds are healing slower!");
8964 if(!(HRegeneration
& FROMOUTSIDE
)) {
8965 You_feel("your wounds healing more quickly.");
8966 HRegeneration
|= FROMOUTSIDE
;
8973 if (HEnergy_regeneration
& INTRINSIC
) {
8974 HEnergy_regeneration
&= ~INTRINSIC
;
8975 You_feel("a loss of mystic power!");
8978 if (HEnergy_regeneration
& TIMEOUT
) {
8979 HEnergy_regeneration
&= ~TIMEOUT
;
8980 You_feel("a loss of mystic power!");
8984 if(!(HEnergy_regeneration
& FROMOUTSIDE
)) {
8985 HEnergy_regeneration
|= FROMOUTSIDE
;
8986 You_feel("a surge of mystic power.");
8993 if (HPolymorph
& INTRINSIC
) {
8994 HPolymorph
&= ~INTRINSIC
;
8995 You_feel("unable to change form!");
8998 if (HPolymorph
& TIMEOUT
) {
8999 HPolymorph
&= ~TIMEOUT
;
9000 You_feel("unable to change form!");
9004 if(!(HPolymorph
& FROMOUTSIDE
)) {
9005 HPolymorph
|= FROMOUTSIDE
;
9006 You_feel("unstable.");
9013 if (HPolymorph_control
& INTRINSIC
) {
9014 HPolymorph_control
&= ~INTRINSIC
;
9015 You_feel("less control over your own body.");
9018 if (HPolymorph_control
& TIMEOUT
) {
9019 HPolymorph_control
&= ~TIMEOUT
;
9020 You_feel("less control over your own body.");
9024 if(!(HPolymorph_control
& FROMOUTSIDE
)) {
9025 HPolymorph_control
|= FROMOUTSIDE
;
9026 You_feel("more control over your own body.");
9033 if (HHunger
& INTRINSIC
) {
9034 HHunger
&= ~INTRINSIC
;
9035 You_feel("like you just ate a chunk of meat.");
9038 if (HHunger
& TIMEOUT
) {
9039 HHunger
&= ~TIMEOUT
;
9040 You_feel("like you just ate a chunk of meat.");
9044 if(!(HHunger
& FROMOUTSIDE
)) {
9045 HHunger
|= FROMOUTSIDE
;
9046 You_feel("very hungry.");
9053 if (HConflict
& INTRINSIC
) {
9054 HConflict
&= ~INTRINSIC
;
9055 You_feel("more acceptable.");
9058 if (HConflict
& TIMEOUT
) {
9059 HConflict
&= ~TIMEOUT
;
9060 You_feel("more acceptable.");
9064 if(!(HConflict
& FROMOUTSIDE
)) {
9065 HConflict
|= FROMOUTSIDE
;
9066 You_feel("like a rabble-rouser.");
9073 if (HSlow_digestion
& INTRINSIC
) {
9074 HSlow_digestion
&= ~INTRINSIC
;
9075 You_feel("like you're burning calories faster.");
9078 if (HSlow_digestion
& TIMEOUT
) {
9079 HSlow_digestion
&= ~TIMEOUT
;
9080 You_feel("like you're burning calories faster.");
9084 if(!(HSlow_digestion
& FROMOUTSIDE
)) {
9085 You_feel("constipated.");
9086 HSlow_digestion
|= FROMOUTSIDE
;
9093 if (HFlying
& INTRINSIC
) {
9094 HFlying
&= ~INTRINSIC
;
9095 You_feel("like you just lost your wings!");
9098 if (HFlying
& TIMEOUT
) {
9099 HFlying
&= ~TIMEOUT
;
9100 You_feel("like you just lost your wings!");
9104 if(!(HFlying
& FROMOUTSIDE
)) {
9105 You_feel("airborne.");
9106 HFlying
|= FROMOUTSIDE
;
9113 if (!rn2(200)) { /* passwall is teh uber pwnz0r and therefore rare */
9116 if (HPasses_walls
& INTRINSIC
) {
9117 HPasses_walls
&= ~INTRINSIC
;
9118 You_feel("less ethereal!");
9121 if (HPasses_walls
& TIMEOUT
) {
9122 HPasses_walls
&= ~TIMEOUT
;
9123 You_feel("less ethereal!");
9127 if(!(HPasses_walls
& FROMOUTSIDE
)) {
9128 You_feel("ethereal.");
9129 HPasses_walls
|= FROMOUTSIDE
;
9136 if (HAntimagic
& INTRINSIC
) {
9137 HAntimagic
&= ~INTRINSIC
;
9138 You_feel("less protected from magic!");
9141 if (HAntimagic
& TIMEOUT
) {
9142 HAntimagic
&= ~TIMEOUT
;
9143 You_feel("less protected from magic!");
9147 if(!(HAntimagic
& FROMOUTSIDE
)) {
9148 You_feel("magic-protected.");
9149 HAntimagic
|= FROMOUTSIDE
;
9159 if (HReflecting
& INTRINSIC
) {
9160 HReflecting
&= ~INTRINSIC
;
9161 You_feel("less reflexive!");
9164 if (HReflecting
& TIMEOUT
) {
9165 HReflecting
&= ~TIMEOUT
;
9166 You_feel("less reflexive!");
9170 if(!(HReflecting
& FROMOUTSIDE
)) {
9171 You_feel("reflexive.");
9172 HReflecting
|= FROMOUTSIDE
;
9179 if (HSwimming
& INTRINSIC
) {
9180 HSwimming
&= ~INTRINSIC
;
9181 You_feel("less aquatic!");
9184 if (HSwimming
& TIMEOUT
) {
9185 HSwimming
&= ~TIMEOUT
;
9186 You_feel("less aquatic!");
9190 if(!(HSwimming
& FROMOUTSIDE
)) {
9191 You_feel("aquatic.");
9192 HSwimming
|= FROMOUTSIDE
;
9199 if (HFree_action
& INTRINSIC
) {
9200 HFree_action
&= ~INTRINSIC
;
9201 You_feel("a loss of freedom!");
9204 if (HFree_action
& TIMEOUT
) {
9205 HFree_action
&= ~TIMEOUT
;
9206 You_feel("a loss of freedom!");
9210 if(!(HFree_action
& FROMOUTSIDE
)) {
9212 HFree_action
|= FROMOUTSIDE
;
9219 if (HFear_resistance
& INTRINSIC
) {
9220 HFear_resistance
&= ~INTRINSIC
;
9221 You_feel("a little anxious!");
9224 if (HFear_resistance
& TIMEOUT
) {
9225 HFear_resistance
&= ~TIMEOUT
;
9226 You_feel("a little anxious!");
9230 if(!(HFear_resistance
& FROMOUTSIDE
)) {
9231 You_feel("unafraid.");
9232 HFear_resistance
|= FROMOUTSIDE
;
9239 if (HKeen_memory
& INTRINSIC
) {
9240 HKeen_memory
&= ~INTRINSIC
;
9241 You_feel("a case of selective amnesia...");
9244 if (HKeen_memory
& TIMEOUT
) {
9245 HKeen_memory
&= ~TIMEOUT
;
9246 You_feel("a case of selective amnesia...");
9250 if(!(HKeen_memory
& FROMOUTSIDE
)) {
9251 You_feel("capable of remembering everything.");
9252 HKeen_memory
|= FROMOUTSIDE
;
9259 if (HVersus_curses
& INTRINSIC
) {
9260 HVersus_curses
&= ~INTRINSIC
;
9261 You_feel("cursed!");
9264 if (HVersus_curses
& TIMEOUT
) {
9265 HVersus_curses
&= ~TIMEOUT
;
9266 You_feel("cursed!");
9270 if(!(HVersus_curses
& FROMOUTSIDE
)) {
9271 You_feel("protected from curse words.");
9272 HVersus_curses
|= FROMOUTSIDE
;
9279 if (HStun_resist
& INTRINSIC
) {
9280 HStun_resist
&= ~INTRINSIC
;
9281 You_feel("a little stunned!");
9284 if (HStun_resist
& TIMEOUT
) {
9285 HStun_resist
&= ~TIMEOUT
;
9286 You_feel("a little stunned!");
9290 if(!(HStun_resist
& FROMOUTSIDE
)) {
9291 You_feel("the ability to control stunning.");
9292 HStun_resist
|= FROMOUTSIDE
;
9299 if (HConf_resist
& INTRINSIC
) {
9300 HConf_resist
&= ~INTRINSIC
;
9301 You_feel("a little confused!");
9304 if (HConf_resist
& TIMEOUT
) {
9305 HConf_resist
&= ~TIMEOUT
;
9306 You_feel("a little confused!");
9310 if(!(HConf_resist
& FROMOUTSIDE
)) {
9311 You_feel("capable of concentrating even while confused.");
9312 HConf_resist
|= FROMOUTSIDE
;
9319 if (HExtra_wpn_practice
& INTRINSIC
) {
9320 HExtra_wpn_practice
&= ~INTRINSIC
;
9321 You_feel("less able to learn new stuff!");
9324 if (HExtra_wpn_practice
& TIMEOUT
) {
9325 HExtra_wpn_practice
&= ~TIMEOUT
;
9326 You_feel("less able to learn new stuff!");
9330 if(!(HExtra_wpn_practice
& FROMOUTSIDE
)) {
9331 You_feel("like a quick learner.");
9332 HExtra_wpn_practice
|= FROMOUTSIDE
;
9339 if (HDisplaced
& INTRINSIC
) {
9340 HDisplaced
&= ~INTRINSIC
;
9341 You_feel("a little exposed!");
9344 if (HDisplaced
& TIMEOUT
) {
9345 HDisplaced
&= ~TIMEOUT
;
9346 You_feel("a little exposed!");
9350 if(!(HDisplaced
& FROMOUTSIDE
)) {
9351 You_feel("less exposed.");
9352 HDisplaced
|= FROMOUTSIDE
;
9359 if (HPsi_resist
& INTRINSIC
) {
9360 HPsi_resist
&= ~INTRINSIC
;
9361 You_feel("empty-minded!");
9364 if (HPsi_resist
& TIMEOUT
) {
9365 HPsi_resist
&= ~TIMEOUT
;
9366 You_feel("empty-minded!");
9370 if(!(HPsi_resist
& FROMOUTSIDE
)) {
9371 You_feel("mentally strong.");
9372 HPsi_resist
|= FROMOUTSIDE
;
9379 if (HSight_bonus
& INTRINSIC
) {
9380 HSight_bonus
&= ~INTRINSIC
;
9381 You_feel("less perceptive!");
9384 if (HSight_bonus
& TIMEOUT
) {
9385 HSight_bonus
&= ~TIMEOUT
;
9386 You_feel("less perceptive!");
9390 if(!(HSight_bonus
& FROMOUTSIDE
)) {
9391 You_feel("the presence of a globe of light.");
9392 HSight_bonus
|= FROMOUTSIDE
;
9399 if (HManaleech
& INTRINSIC
) {
9400 HManaleech
&= ~INTRINSIC
;
9401 You_feel("less magically attuned!");
9404 if (HManaleech
& TIMEOUT
) {
9405 HManaleech
&= ~TIMEOUT
;
9406 You_feel("less magically attuned!");
9410 if(!(HManaleech
& FROMOUTSIDE
)) {
9411 You_feel("magically attuned.");
9412 HManaleech
|= FROMOUTSIDE
;
9419 if (HMap_amnesia
& INTRINSIC
) {
9420 HMap_amnesia
&= ~INTRINSIC
;
9421 You_feel("less forgetful!");
9424 if (HMap_amnesia
& TIMEOUT
) {
9425 HMap_amnesia
&= ~TIMEOUT
;
9426 You_feel("less forgetful!");
9430 if(!(HMap_amnesia
& FROMOUTSIDE
)) {
9431 You_feel("very forgetful!");
9432 HMap_amnesia
|= FROMOUTSIDE
;
9439 if (HPeacevision
& INTRINSIC
) {
9440 HPeacevision
&= ~INTRINSIC
;
9441 You_feel("less peaceful!");
9444 if (HPeacevision
& TIMEOUT
) {
9445 HPeacevision
&= ~TIMEOUT
;
9446 You_feel("less peaceful!");
9450 if(!(HPeacevision
& FROMOUTSIDE
)) {
9451 You_feel("a sense of peace.");
9452 HPeacevision
|= FROMOUTSIDE
;
9459 if (HCont_resist
& INTRINSIC
) {
9460 HCont_resist
&= ~INTRINSIC
;
9461 You_feel("less resistant to contamination!");
9464 if (HCont_resist
& TIMEOUT
) {
9465 HCont_resist
&= ~TIMEOUT
;
9466 You_feel("less resistant to contamination!");
9470 if(!(HCont_resist
& FROMOUTSIDE
)) {
9471 You_feel("protected from contamination.");
9472 HCont_resist
|= FROMOUTSIDE
;
9479 if (HDiscount_action
& INTRINSIC
) {
9480 HDiscount_action
&= ~INTRINSIC
;
9481 You_feel("less resistant to paralysis!");
9484 if (HDiscount_action
& TIMEOUT
) {
9485 HDiscount_action
&= ~TIMEOUT
;
9486 You_feel("less resistant to paralysis!");
9490 if(!(HDiscount_action
& FROMOUTSIDE
)) {
9491 You_feel("more resistant to paralysis!");
9492 HDiscount_action
|= FROMOUTSIDE
;
9499 if (HFull_nutrient
& INTRINSIC
) {
9500 HFull_nutrient
&= ~INTRINSIC
;
9501 You_feel("a hole in your %s!", body_part(STOMACH
));
9504 if (HFull_nutrient
& TIMEOUT
) {
9505 HFull_nutrient
&= ~TIMEOUT
;
9506 You_feel("a hole in your %s!", body_part(STOMACH
));
9510 if(!(HFull_nutrient
& FROMOUTSIDE
)) {
9511 You_feel("that your %s is now rather full.", body_part(STOMACH
));
9512 HFull_nutrient
|= FROMOUTSIDE
;
9519 if (HTechnicality
& INTRINSIC
) {
9520 HTechnicality
&= ~INTRINSIC
;
9521 You_feel("less capable of using your techniques...");
9524 if (HTechnicality
& TIMEOUT
) {
9525 HTechnicality
&= ~TIMEOUT
;
9526 You_feel("less capable of using your techniques...");
9530 if(!(HTechnicality
& FROMOUTSIDE
)) {
9531 You_feel("that your techniques are more powerful now!");
9532 HTechnicality
|= FROMOUTSIDE
;
9539 if (HHalf_spell_damage
& INTRINSIC
) {
9540 HHalf_spell_damage
&= ~INTRINSIC
;
9541 You_feel("vulnerable to spells!");
9544 if (HHalf_spell_damage
& TIMEOUT
) {
9545 HHalf_spell_damage
&= ~TIMEOUT
;
9546 You_feel("vulnerable to spells!");
9550 if(!(HHalf_spell_damage
& FROMOUTSIDE
)) {
9551 You_feel("protected from spells.");
9552 HHalf_spell_damage
|= FROMOUTSIDE
;
9559 if (HHalf_physical_damage
& INTRINSIC
) {
9560 HHalf_physical_damage
&= ~INTRINSIC
;
9561 You_feel("vulnerable to damage!");
9564 if (HHalf_physical_damage
& TIMEOUT
) {
9565 HHalf_physical_damage
&= ~TIMEOUT
;
9566 You_feel("vulnerable to damage!");
9570 if(!(HHalf_physical_damage
& FROMOUTSIDE
)) {
9571 You_feel("protected from damage.");
9572 HHalf_physical_damage
|= FROMOUTSIDE
;
9579 if (HUseTheForce
& INTRINSIC
) {
9580 HUseTheForce
&= ~INTRINSIC
;
9581 You_feel("that you lost your jedi powers!");
9584 if (HUseTheForce
& TIMEOUT
) {
9585 HUseTheForce
&= ~TIMEOUT
;
9586 You_feel("that you lost your jedi powers!");
9590 if(!(HUseTheForce
& FROMOUTSIDE
)) {
9591 You_feel("able to use the force like a true jedi!");
9592 HUseTheForce
|= FROMOUTSIDE
;
9599 if (HScentView
& INTRINSIC
) {
9600 HScentView
&= ~INTRINSIC
;
9601 You_feel("unable to smell things!");
9604 if (HScentView
& TIMEOUT
) {
9605 HScentView
&= ~TIMEOUT
;
9606 You_feel("unable to smell things!");
9610 if(!(HScentView
& FROMOUTSIDE
)) {
9611 You_feel("a tingling in your %s!", body_part(NOSE
));
9612 HScentView
|= FROMOUTSIDE
;
9619 if (HDiminishedBleeding
& INTRINSIC
) {
9620 HDiminishedBleeding
&= ~INTRINSIC
;
9621 You_feel("your %s coagulants failing!", body_part(BLOOD
));
9624 if (HDiminishedBleeding
& TIMEOUT
) {
9625 HDiminishedBleeding
&= ~TIMEOUT
;
9626 You_feel("your %s coagulants failing!", body_part(BLOOD
));
9630 if(!(HDiminishedBleeding
& FROMOUTSIDE
)) {
9631 You_feel("a %s coagulation factor being injected into your body!", body_part(BLOOD
));
9632 HDiminishedBleeding
|= FROMOUTSIDE
;
9639 if (HControlMagic
& INTRINSIC
) {
9640 HControlMagic
&= ~INTRINSIC
;
9641 You_feel("unable to control your magic!");
9644 if (HControlMagic
& TIMEOUT
) {
9645 HControlMagic
&= ~TIMEOUT
;
9646 You_feel("unable to control your magic!");
9650 if(!(HControlMagic
& FROMOUTSIDE
)) {
9651 You_feel("magic-controlled!");
9652 HControlMagic
|= FROMOUTSIDE
;
9659 if (HExpBoost
& INTRINSIC
) {
9660 HExpBoost
&= ~INTRINSIC
;
9661 You_feel("a loss of experience!");
9664 if (HExpBoost
& TIMEOUT
) {
9665 HExpBoost
&= ~TIMEOUT
;
9666 You_feel("a loss of experience!");
9670 if(!(HExpBoost
& FROMOUTSIDE
)) {
9671 You_feel("a surge of experience!");
9672 HExpBoost
|= FROMOUTSIDE
;
9679 if (HPainSense
& INTRINSIC
) {
9680 HPainSense
&= ~INTRINSIC
;
9681 You_feel("unable to sense pain!");
9684 if (HPainSense
& TIMEOUT
) {
9685 HPainSense
&= ~TIMEOUT
;
9686 You_feel("unable to sense pain!");
9690 if(!(HPainSense
& FROMOUTSIDE
)) {
9691 You_feel("empathic!");
9692 HPainSense
|= FROMOUTSIDE
;
9699 if (HInvertedState
& INTRINSIC
) {
9700 HInvertedState
&= ~INTRINSIC
;
9701 You_feel("back on your %s!", makeplural(body_part(FOOT
)));
9704 if (HInvertedState
& TIMEOUT
) {
9705 HInvertedState
&= ~TIMEOUT
;
9706 You_feel("back on your %s!", makeplural(body_part(FOOT
)));
9710 if(!(HInvertedState
& FROMOUTSIDE
)) {
9711 You_feel("inverted!");
9712 HInvertedState
|= FROMOUTSIDE
;
9719 if (HWinceState
& INTRINSIC
) {
9720 HWinceState
&= ~INTRINSIC
;
9721 You_feel("relieved!");
9724 if (HWinceState
& TIMEOUT
) {
9725 HWinceState
&= ~TIMEOUT
;
9726 You_feel("relieved!");
9730 if(!(HWinceState
& FROMOUTSIDE
)) {
9732 HWinceState
|= FROMOUTSIDE
;
9739 if (HDefusing
& INTRINSIC
) {
9740 HDefusing
&= ~INTRINSIC
;
9741 You_feel("unable to defuse traps!");
9744 if (HDefusing
& TIMEOUT
) {
9745 HDefusing
&= ~TIMEOUT
;
9746 You_feel("unable to defuse traps!");
9750 if(!(HDefusing
& FROMOUTSIDE
)) {
9751 You_feel("knowledgable about the art of defusing traps!");
9752 HDefusing
|= FROMOUTSIDE
;
9759 if (HBurdenedState
& INTRINSIC
) {
9760 HBurdenedState
&= ~INTRINSIC
;
9761 You_feel("lighter");
9764 if (HBurdenedState
& TIMEOUT
) {
9765 HBurdenedState
&= ~TIMEOUT
;
9766 You_feel("lighter");
9770 if(!(HBurdenedState
& FROMOUTSIDE
)) {
9771 You_feel("burdened");
9772 HBurdenedState
|= FROMOUTSIDE
;
9779 if (HMagicVacuum
& INTRINSIC
) {
9780 HMagicVacuum
&= ~INTRINSIC
;
9781 You_feel("capable of casting magic effectively again!");
9784 if (HMagicVacuum
& TIMEOUT
) {
9785 HMagicVacuum
&= ~TIMEOUT
;
9786 You_feel("capable of casting magic effectively again!");
9790 if(!(HMagicVacuum
& FROMOUTSIDE
)) {
9791 You_feel("less capable of casting magic!");
9792 HMagicVacuum
|= FROMOUTSIDE
;
9799 if (HResistancePiercing
& INTRINSIC
) {
9800 HResistancePiercing
&= ~INTRINSIC
;
9801 You_feel("unable to damage immune opponents!");
9804 if (HResistancePiercing
& TIMEOUT
) {
9805 HResistancePiercing
&= ~TIMEOUT
;
9806 You_feel("unable to damage immune opponents!");
9810 if(!(HResistancePiercing
& FROMOUTSIDE
)) {
9811 You_feel("capable of damaging immune opponents!");
9812 HResistancePiercing
|= FROMOUTSIDE
;
9819 if (HFuckOverEffect
& INTRINSIC
) {
9820 HFuckOverEffect
&= ~INTRINSIC
;
9821 You_feel("that you're no longer being fucked over!");
9824 if (HFuckOverEffect
& TIMEOUT
) {
9825 HFuckOverEffect
&= ~TIMEOUT
;
9826 You_feel("that you're no longer being fucked over!");
9830 if(!(HFuckOverEffect
& FROMOUTSIDE
)) {
9831 You_feel("that you're being fucked over.");
9832 HFuckOverEffect
|= FROMOUTSIDE
;
9839 if (HMysteryResist
& INTRINSIC
) {
9840 HMysteryResist
&= ~INTRINSIC
;
9841 You_feel("less resistant to mystery attacks!");
9844 if (HMysteryResist
& TIMEOUT
) {
9845 HMysteryResist
&= ~TIMEOUT
;
9846 You_feel("less resistant to mystery attacks!");
9850 if(!(HMysteryResist
& FROMOUTSIDE
)) {
9851 You_feel("resistant to mystery attacks!");
9852 HMysteryResist
|= FROMOUTSIDE
;
9859 if (HMagicFindBonus
& INTRINSIC
) {
9860 HMagicFindBonus
&= ~INTRINSIC
;
9861 You_feel("less likely to find magical items!");
9864 if (HMagicFindBonus
& TIMEOUT
) {
9865 HMagicFindBonus
&= ~TIMEOUT
;
9866 You_feel("less likely to find magical items!");
9870 if(!(HMagicFindBonus
& FROMOUTSIDE
)) {
9871 You_feel("more likely to find magical items!");
9872 HMagicFindBonus
|= FROMOUTSIDE
;
9879 if (HSpellboost
& INTRINSIC
) {
9880 HSpellboost
&= ~INTRINSIC
;
9881 You_feel("your spell power waning!");
9884 if (HSpellboost
& TIMEOUT
) {
9885 HSpellboost
&= ~TIMEOUT
;
9886 You_feel("your spell power waning!");
9890 if(!(HSpellboost
& FROMOUTSIDE
)) {
9891 You_feel("able to cast spells more powerfully!");
9892 HSpellboost
|= FROMOUTSIDE
;
9897 default: /* shouldn't happen */
9902 if (!hasmadeachange
) {
9904 if (tryct
< 100 && rn2(intloss
? 10 : 2)) goto retrytrinsic
;