1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-29 17:02:25 +01:00
This commit is contained in:
demogorgon22 2025-04-11 10:21:25 -04:00
commit e71a435835
93 changed files with 4500 additions and 2238 deletions

View file

@ -62,7 +62,7 @@ SRCOBJ = allmain.o alloc.o apply.o artifact.o astar.o attrib.o ball.o bones.o \
mthrowu.o muse.o music.o mutations.o o_init.o objects.o objnam.o \
oextra.o options.o pager.o pickup.o pline.o polyself.o potion.o \
pray.o priest.o projectile.o quest.o questpgr.o read.o \
recover.o rect.o region.o restore.o rip.o rnd.o role.o \
recover.o rect.o region.o research.o restore.o rip.o rnd.o role.o \
rumors.o save.o seduce.o shk.o shknam.o sit.o sounds.o \
sp_lev.o spell.o steal.o steed.o teleport.o testing.o \
thoughtglyph.o tile.o timeout.o topten.o track.o trap.o \

View file

@ -70,8 +70,8 @@ OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "ball", random
OBJECT[50%]: '0', "ball", random
# Non diggable walls
NON_DIGGABLE:(00,00,75,19)
@ -186,7 +186,7 @@ OBJECT: '_', "chain", (2,15)
OBJECT: '_', "chain", (3,15)
OBJECT: '_', "chain", (3,15)
OBJECT: '_', "chain", (4,15)
OBJECT: '0', "heavy iron ball", (4,15)
OBJECT: '0', "ball", (4,15)
OBJECT: '_', "chain", (4,15)
OBJECT: '_', "chain", (5,15)
OBJECT: '_', "chain", (5,15)
@ -194,7 +194,7 @@ OBJECT: '_', "chain", (6,15)
OBJECT: '_', "chain", (6,15)
OBJECT: '_', "chain", (6,15)
OBJECT: '_', "chain", (7,15)
OBJECT: '0', "heavy iron ball", (7,15)
OBJECT: '0', "ball", (7,15)
OBJECT: '_', "chain", (8,15)
OBJECT: '_', "chain", (8,15)
OBJECT: '_', "chain", (9,15)
@ -205,9 +205,9 @@ OBJECT: '_', "chain", (10,15)
OBJECT: '_', "chain", (10,15)
OBJECT: '_', "chain", (11,15)
OBJECT: '_', "chain", (11,15)
OBJECT: '0', "heavy iron ball", (11,15)
OBJECT: '0', "ball", (11,15)
OBJECT: '_', "chain", (2,16)
OBJECT: '0', "heavy iron ball", (2,16)
OBJECT: '0', "ball", (2,16)
OBJECT: '_', "chain", (3,16)
OBJECT: '_', "chain", (3,16)
OBJECT: '_', "chain", (3,16)
@ -219,7 +219,7 @@ OBJECT: '_', "chain", (6,16)
OBJECT: '_', "chain", (6,16)
OBJECT: '_', "chain", (7,16)
OBJECT: '_', "chain", (7,16)
OBJECT: '0', "heavy iron ball", (7,16)
OBJECT: '0', "ball", (7,16)
OBJECT: '_', "chain", (7,16)
OBJECT: '_', "chain", (8,16)
OBJECT: '_', "chain", (8,16)
@ -234,10 +234,10 @@ OBJECT: '_', "chain", (3,17)
OBJECT: '_', "chain", (3,17)
OBJECT: '_', "chain", (3,17)
OBJECT: '_', "chain", (4,17)
OBJECT: '0', "heavy iron ball", (4,17)
OBJECT: '0', "ball", (4,17)
OBJECT: '_', "chain", (4,17)
OBJECT: '_', "chain", (4,17)
OBJECT: '0', "heavy iron ball", (4,17)
OBJECT: '0', "ball", (4,17)
OBJECT: '_', "chain", (5,17)
OBJECT: '_', "chain", (6,17)
OBJECT: '#', "rusty iron trephination kit", (6,17)
@ -245,15 +245,15 @@ OBJECT: '_', "chain", (7,17)
OBJECT: '_', "chain", (7,17)
OBJECT: '_', "chain", (7,17)
OBJECT: '_', "chain", (8,17)
OBJECT: '0', "heavy iron ball", (8,17)
OBJECT: '0', "ball", (8,17)
OBJECT: '_', "chain", (9,17)
OBJECT: '_', "chain", (9,17)
OBJECT: '0', "heavy iron ball", (9,17)
OBJECT: '0', "ball", (9,17)
OBJECT: '_', "chain", (9,17)
OBJECT: '_', "chain", (10,17)
OBJECT: '_', "chain", (10,17)
OBJECT: '_', "chain", (10,17)
OBJECT: '0', "heavy iron ball", (10,17)
OBJECT: '0', "ball", (10,17)
OBJECT: '_', "chain", (11,17)
# pre-placed inherited artifact
OBJECT: '_', "chain", place[0], uncursed, 0, "Inherited"
@ -321,8 +321,8 @@ MONSTER: '&',"lava demon",(26,14),hostile,awake
MONSTER: ''',"iron golem",(04,13),hostile
# Objects
OBJECT:'(',"spoon",(31,10),blessed,0,"The Iron Spoon of Liberation"
# OBJECT:'0',"heavy iron ball",(31,10),blessed,0,"The Iron Ball of Levitation"
# OBJECT:'0',"heavy iron ball",(31,10),blessed,0,"The Iron Ball of Liberation"
# OBJECT:'0',"ball",(31,10),blessed,0,"The Iron Ball of Levitation"
# OBJECT:'0',"ball",(31,10),blessed,0,"The Iron Ball of Liberation"
#Box full of crazy
CONTAINER:'(',"chest",(55,18),cursed,6
OBJECT:'#',"blessed iron +2 magic-resistant visored helmet named Mask of Waterdeep",contained
@ -458,8 +458,8 @@ OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "ball", random
OBJECT[50%]: '0', "ball", random
MAZE:"Con-filb",' '

View file

@ -640,12 +640,18 @@ MONSTER: random, random, random
ROOM: "ordinary" , random, random, random, random
OBJECT: random, random, random
OBJECT: random,random,random
MONSTER: random, random, random
MONSTER: random, random, random
OBJECT: random, random, random
OBJECT: random,random,random
OBJECT: random, random, random
OBJECT: random,random,random
MONSTER: 'x', "man-fly", random, asleep
MONSTER: 'x', "man-fly", random, asleep
MONSTER: 'x', "man-fly", random, asleep
MONSTER: 'x', "man-fly", random, asleep
ROOM: "ordinary" , random, random, random, random
STAIR: random, down
MONSTER: random, random, random
MONSTER: 'x', "man-fly", random, asleep
MONSTER: random, random, random
MONSTER: random, random, random

View file

@ -124,8 +124,8 @@ OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "ball", random
OBJECT[50%]: '0', "ball", random
# Non diggable walls
NON_DIGGABLE:(25,00,43,18)
@ -234,8 +234,8 @@ OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "ball", random
OBJECT[50%]: '0', "ball", random
DOOR:locked,(28,02)
DOOR:locked,(31,02)
@ -636,8 +636,8 @@ OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[75%]: '_', "chain", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "heavy iron ball", random
OBJECT[50%]: '0', "ball", random
OBJECT[50%]: '0', "ball", random
DOOR:locked,(27,02)
DOOR:locked,(27,04)

View file

@ -213,13 +213,13 @@ MONSTER:'@',"pirate brother",(37,11)
MONSTER:'@',"pirate brother",(47,10)
#Used Cannon Balls
OBJECT:'0',"heavy iron ball",(13,15) [skipcheck]
OBJECT:'0',"heavy iron ball",(16,12) [skipcheck]
OBJECT:'0',"heavy iron ball",(21,09) [skipcheck]
OBJECT:'0',"heavy iron ball",(21,16) [skipcheck]
OBJECT:'0',"heavy iron ball",(45,08) [skipcheck]
OBJECT:'0',"heavy iron ball",(51,08) [skipcheck]
OBJECT:'0',"heavy iron ball",(52,08) [skipcheck]
OBJECT:'0',"ball",(13,15) [skipcheck]
OBJECT:'0',"ball",(16,12) [skipcheck]
OBJECT:'0',"ball",(21,09) [skipcheck]
OBJECT:'0',"ball",(21,16) [skipcheck]
OBJECT:'0',"ball",(45,08) [skipcheck]
OBJECT:'0',"ball",(51,08) [skipcheck]
OBJECT:'0',"ball",(52,08) [skipcheck]
# Non diggable walls
NON_DIGGABLE:(00,00,75,20)

View file

@ -287,7 +287,7 @@ ENDMAP
NON_DIGGABLE:(00,00,75,20)
PORTAL:(35,10,35,10),(00,00,00,00),"chaosm"
OBJECT:'0',"heavy iron ball",(35,10)
OBJECT:'0',"ball",(35,10)
BRANCH:(35,19,35,19),(0,0,0,0)
@ -645,7 +645,7 @@ STAIR:(16,19),down
LADDER:(16,01),down
ALTAR:(35,09),noalign,altar,"Chaos"
OBJECT:'0',"heavy iron ball",(35,10)
OBJECT:'0',"ball",(35,10)
MAZEWALK:(02,10),south
MAZEWALK:(02,10),north

View file

@ -7957,6 +7957,15 @@ quit*
quivering blob
A blind, brainless monster that lives in a state of constant,
undirected terror.
rage-walker
rage walker
This tall creature looks at once slender and deadly. Its
generally humanoid body has thin legs and arms, and its
features are concealed by tight-fitting metal armor.
The creature's movements are graceful and sure, yet
they are sharp and angry at the same time.
[ Monster Manual III,
by Skip Williams, Johnathan Tweet, and Monte Cook ]
raijin
raiden
The Japanese god of thunder (rai) and lightning (den). He prevented

View file

@ -13,21 +13,21 @@ MAP
0----------------------------------------------------------------------------
1|...+##################################################################+...|
2|...---------------------------------++---------------------------------...|
3|...|......T......................PPPBBPPP.........................T...|...|
4|+---..T.w....PPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPP.........---+|
5|#|...........P--F--F..............F....F..............F--F--P...T..w....|#|
6|#|.T.........PF....--S--------------..--------------S--....FP.......T...|#|
7|#|....w..T...P-....+#####+....+############+....+#####+....-P.T...T.....|#|
8|#|...........P-....-------....------##------FF|.-------....-P...........|#|
9|#|....T.w....}-FFFF-.....S....-.K..-##-....-..F.+.....-----FP..T...T....|#|
0|#+.................+.....------....+##+....------....\-{}PPPP..w........+#|
1|#|..T........}-FFFF-.....S....-....-##-..K.-..F.+.....-----FP.....T.....|#|
2|#|......T....P-....-------....------##------FF|.-------....-P.....w.....|#|
3|#|...........P-....+#####+....+############+....+#####+....-P..T....T...|#|
4|#|T..T.......PF....--S--------------..--------------S--....FP...........|#|
5|#|.....w.....P--F--F..............F....F..............F--F--P.w..T......|#|
6|+---....T....PPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPP.........---+|
7|...|.w.....T.....................PPPBBPPP....................T.....T..|...|
3|...|eeeeeeTeeeeeeeeeeeeeeeeeeeeeePPPBBPPPeeeeeeeeeeeeeeeeeeeeeeeeeTeee|...|
4|+---eeTeweeeePPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPPeeeeeeeee---+|
5|#|eeeeeeeeeeeP--F--FeeeeeeeeeeeeeeF....FeeeeeeeeeeeeeeF--F--PeeeTeeweeee|#|
6|#|eTeeeeeeeeePF....--S--------------..--------------S--....FPeeeeeeeTeee|#|
7|#|eeeeweeTeeeP-....+#####+....+############+....+#####+....-PeTeeeTeeeee|#|
8|#|eeeeeeeeeeeP-....-------....------##------FF|.-------...e-Peeeeeeeeeee|#|
9|#|eeeeTeweeee}-FFFF-.....S....-.K..-##-....-..F.+.....-----FPeeTeeeTeeee|#|
0|#+eeeeeeeeeeeeeeeee+.....------....+##+....------...e\-{}PPPPeeweeeeeeee+#|
1|#|eeTeeeeeeee}-FFFF-.....S....-....-##-..K.-..F.+.....-----FPeeeeeTeeeee|#|
2|#|eeeeeeTeeeeP-....-------....------##------FF|.-------....-Peeeeeweeeee|#|
3|#|eeeeeeeeeeeP-....+#####+....+############+....+#####+....-PeeTeeeeTeee|#|
4|#|TeeTeeeeeeePF....--S--------------..--------------S--....FPeeeeeeeeeee|#|
5|#|eeeeeweeeeeP--F--FeeeeeeeeeeeeeeF....FeeeeeeeeeeeeeeF--F--PeweeTeeeeee|#|
6|+---eeeeTeeeePPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPPeeeeeeeee---+|
7|...|eweeeeeTeeeeeeeeeeeeeeeeeeeeePPPBBPPPeeeeeeeeeeeeeeeeeeeeTeeeeeTee|...|
8|...---------------------------------++---------------------------------...|
9|...+##################################################################+...|
0----------------------------------------------------------------------------
@ -152,24 +152,24 @@ MAP
0 }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
1 }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
2 }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
3 }}}}......T.......................................................T.....}}}
4 }}}}..T.w....PPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPP...........}}}
5}}}...........P--F--F..............-....-..............F--F--P...T..w.....}}
6}}}.T.........PF....--+---F----------..--------------+--....FP.......T....}}
7}}}....w..T...P-....+..-.....-................-.....-..+....-P.T...T......}}
8}}............P-....-..-.....-.--------------.-.....-..F....-P..........T..}
9}}.....T.w....P-FFFF-..--F+F--.-.....FF.....-.---+F--..-----FP..T...T.......
0}}..................+..........+.....FF.....+..........+........w.....T.....
1}}...T........P-FFFF-..--F+---.-.....FF.....-.---+---..-----FP.....T.....T.
2}........T....P-....-..-.....-.--------------.|.....-..F....-P.....w.......
3}.............P-....+..-.....-................|.....-..+....-P..T....T...
4}..T..T.......PF....--+--------------..--------------+--....FP...........T
5}.......w.....P--F--F..............-....-..............F--F--P.w..T..... T
6.T.......T....PPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPP.........
7......w.....T.............T...............T...................T.....T.
8...T...............T...................T...........T...............
9....
0.
3 }}}},,,,,,T,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,T,,,,,}}}
4 }}}},,T,w,,,,PPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPP,,,,,,,,,,,}}}
5}}},,,,,,,,,,,P--F--F,,,,,,,,,,,,,,-....-,,,,,,,,,,,,,,F--F--P,,,T,,w,,,,,}}
6}}},T,,,,,,,,,PF....--+---F----------..--------------+--....FP,,,,,,,T,,,,}}
7}}},,,,w,,T,,,P-....+..-.....-................-.....-..+....-P,T,,,T,,,,,,}}
8}},,,,,,,,,,,,P-....-..-.....-.--------------.-.....-..F....-P,,,,,,,,,,T,,}
9}},,,,,T,w,,,,P-FFFF-..--F+F--.-.....FF.....-.---+F--..-----FP,,T,,,T,,,,,,,
0}},,,,,,eeeeeeeeeeee+..........+.....FF.....+..........+eeeeeee,w,,,,,T,,,,,
1}},,,T,eeeeeeeP-FFFF-..--F+---.-.....FF.....-.---+---..-----FP,,,,,T,,,,,T,
2},,,,,eeeT,,,,P-....-..-.....-.--------------.|.....-..F....-P,,,,,w,,,,,,,
3},,,eee,,,,,,,P-....+..-.....-................|.....-..+....-P,,T,,,,T,,,
4},,TeeT,,,,,,,PF....--+--------------..--------------+--....FP,,,,,,,,,,,T
5},,eee,,w,,,,,P--F--F,,,,,,,,,,,,,,-....-,,,,,,,,,,,,,,F--F--P,w,,T,,,,, T
6,Teee,,,,T,,,,PPPPPPPPPPPPPPPPPPPPP--++--PPPPPPPPPPPPPPPPPPPPP,,,,,,,,,
7eee,,,w,,,,,T,,,,,,,,,,,,,T,,,,,,,,,,,,,,,T,,,,,,,,,,,,,,,,,,,T,,,,,T,
8ee,T,,,,,,,,,,,,,,,T,,,,,,,,,,,,,,,,,,,T,,,,,,,,,,,T,,,,,,,,,,,,,,,
9e,,,
0e
ENDMAP
#0123456789012345678901234567890123456789012345678901234567890123456789012345
#0 1 2 3 4 5 6 7

View file

@ -2087,14 +2087,14 @@ A("The Sceptre of Might", SPEAR, (const char *)0,
CONFLICT, NOFLAG
),
// old-style artifact block
// A("The Iron Ball of Liberation", HEAVY_IRON_BALL, 0, 0,
// A("The Iron Ball of Liberation", BALL, 0, 0,
// (SPFX_NOGEN|SPFX_RESTR|SPFX_LUCK|SPFX_INTEL),
// (SPFX_SEARCH|SPFX_SEEK|SPFX_WARN), 0,
// NO_ATTK(), NO_DFNS, CARY(AD_MAGM),
// PHASING, A_CHAOTIC, PM_CONVICT, NON_PM, 5000L,
// SPFX2_STLTH,0,0), /*Note: it had caried stealth before*/
A("The Iron Ball of Levitation", HEAVY_IRON_BALL, (const char *)0,
A("The Iron Ball of Levitation", BALL, (const char *)0,
5000L, MT_DEFAULT, MZ_DEFAULT, WT_DEFAULT,
A_CHAOTIC, PM_CONVICT, NON_PM, TIER_A, (ARTG_NOGEN|ARTG_NOWISH|ARTG_MAJOR),
NO_MONS(),

View file

@ -13,11 +13,14 @@ typedef struct d_flags { /* dungeon/level type flags */
Bitfield(align, 3); /* dungeon alignment. */
Bitfield(raise, 3); /* corpse resurection type (current max 8) */
Bitfield(mirror, 1); /* has at least one mirror on the ground */
Bitfield(day, 1); /* Is the map currently in day mode? */
Bitfield(walkers, 2); /* How many rage-walkers for this level? (0-3) */
} d_flags;
typedef struct d_level { /* basic dungeon level element */
int dnum; /* dungeon number */
int dlevel; /* level number */
int rage; /* rage-walker rage*/
d_flags flags; /* type flags */
} d_level;

View file

@ -33,17 +33,21 @@ E time_t NDECL(get_realtime);
E void NDECL(dogoat);
E void FDECL(dogoat_mon, (struct monst *));
E void FDECL(dojellysting, (struct monst *));
E void FDECL(dorotbite, (struct monst *));
E void FDECL(dorotsting, (struct monst *));
E boolean FDECL(doyog, (struct monst *));
E void FDECL(dotwin_cast, (struct monst *));
E void FDECL(dochaos_mon, (struct monst *));
E void FDECL(dohost_mon, (struct monst *));
E void FDECL(dosnake, (struct monst *));
E void FDECL(dokraken_mon, (struct monst *));
E void FDECL(dochain_lashes, (struct monst *));
E void FDECL(dotailslap, (struct monst *));
E void FDECL(dovines, (struct monst *));
E void FDECL(dostarblades, (struct monst *));
E void FDECL(dostorm, (struct monst *));
E void FDECL(donachash, (struct monst *));
E void FDECL(incarnator_spawn, (xchar, xchar, boolean));
/* ### apply.c ### */
@ -79,6 +83,7 @@ E boolean NDECL(parasite_ok);
E int NDECL(defile_count);
E int NDECL(preservation_count);
E int NDECL(vampire_count);
E int NDECL(rot_count);
E boolean NDECL(defile_ok);
E boolean NDECL(impurity_ok);
E boolean NDECL(research_incomplete);
@ -210,6 +215,7 @@ E int FDECL(merc_weapon_damage_slice, (struct obj *, struct monst *, int));
E int FDECL(infinity_s_mirrored_arc_litness, (struct obj *));
E int FDECL(merge_skies, (struct obj **));
E void NDECL(do_your_auras);
E int NDECL(throweffect);
/* ### astar.c ### */
E boolean FDECL(path_exists, (int, int, int, int, long, int));
@ -239,8 +245,9 @@ E double FDECL(conplus, (int));
E void FDECL(change_usanity, (int, boolean));
E void FDECL(change_uinsight, (int));
E boolean NDECL(check_insight);
E int FDECL(roll_generic_madness, (int));
E int FDECL(roll_generic_flat_madness, (int));
E int FDECL(roll_impurity, (boolean));
E int FDECL(roll_generic_madness, (boolean));
E int FDECL(roll_generic_flat_madness, (boolean));
E int NDECL(count_madnesses);
E int FDECL(roll_madness, (long int));
E int FDECL(mad_turn, (long int));
@ -1222,6 +1229,7 @@ E char *FDECL(strstri, (const char *,const char *));
E char *FDECL(strsubst, (char *bp, const char *orig, const char *replacement));
E boolean FDECL(fuzzymatch, (const char *,const char *,const char *,BOOLEAN_P));
E void NDECL(setrandom);
E struct tm * NDECL(getlt);
E int NDECL(getyear);
#if 0
E char *FDECL(yymmdd, (time_t));
@ -1276,7 +1284,8 @@ E boolean NDECL(have_lizard);
E struct obj *FDECL(o_on, (unsigned int,struct obj *));
E boolean FDECL(obj_here, (struct obj *,int,int));
E boolean NDECL(wearing_armor);
E boolean FDECL(is_worn, (struct obj *));
E boolean FDECL(is_worn_no_flags, (struct obj *));
E boolean FDECL(is_worn, (struct obj *, int));
E struct obj *FDECL(g_at, (int,int));
E struct obj *FDECL(mkgoldobj, (long));
E struct obj *FDECL(getobj, (const char *,const char *));
@ -1461,7 +1470,7 @@ E struct permonst *FDECL(grow_up, (struct monst *,struct monst *));
E struct obj * FDECL(mongets, (struct monst *,int,int));
E void FDECL(m_initthrow,(struct monst *, int, int, int));
E int FDECL(golemhp, (int));
E boolean FDECL(peace_minded, (struct permonst *));
E boolean FDECL(peace_minded, (struct monst *));
E void FDECL(set_malign, (struct monst *));
E void FDECL(set_mimic_sym, (struct monst *));
E void FDECL(set_curhouse, (int));
@ -1611,7 +1620,7 @@ E struct obj *FDECL(mksobj_at, (int,int,int,int));
E struct obj *FDECL(mkobj, (CHAR_P,int));
E int NDECL(rndmonnum);
E struct obj *FDECL(splitobj, (struct obj *,long));
E struct obj *FDECL(duplicate_obj, (struct obj *));
E struct obj *FDECL(duplicate_obj, (struct obj *, boolean));
E void FDECL(replace_object, (struct obj *,struct obj *));
E void FDECL(bill_dummy_object, (struct obj *));
E struct obj *FDECL(mksobj, (int,int));
@ -1921,6 +1930,8 @@ E void FDECL(add_byakhee_to_obj, (struct obj *));
E boolean FDECL(likes_obj, (struct monst *, struct obj *));
E boolean FDECL(can_equip, (struct monst *, struct obj *));
E void FDECL(phantom_scorpions_sting, (struct monst *));
E void FDECL(rot_caterpillars_bite, (struct monst *));
E void FDECL(orc_mud_stabs, (struct monst *));
/* ### monst.c ### */
@ -2181,6 +2192,7 @@ E char *FDECL(mshot_xname, (struct obj *));
E boolean FDECL(the_unique_obj, (struct obj *obj));
E char *FDECL(doname, (struct obj *));
E char *FDECL(doname_with_price, (struct obj *));
E boolean FDECL(not_fully_identified_dummy_flags, (struct obj *, int));
E boolean FDECL(not_fully_identified, (struct obj *));
E char *FDECL(corpse_xname, (struct obj *,BOOLEAN_P));
E char *FDECL(cxname, (struct obj *));
@ -2326,9 +2338,10 @@ E int FDECL(collect_obj_classes,
(char *,struct obj *,BOOLEAN_P,BOOLEAN_P,boolean FDECL((*),(OBJ_P)), int *));
#endif
E void FDECL(add_valid_menu_class, (int));
E boolean FDECL(allow_all, (struct obj *));
E boolean FDECL(allow_category, (struct obj *));
E boolean FDECL(is_worn_by_type, (struct obj *));
E boolean FDECL(allow_all_nomods, (struct obj *));
E boolean FDECL(allow_all, (struct obj *, int));
E boolean FDECL(allow_category, (struct obj *, int));
E boolean FDECL(is_worn_by_type, (struct obj *, int));
#ifdef USE_TRAMPOLI
E int FDECL(ck_bag, (struct obj *));
E int FDECL(in_container, (struct obj *));
@ -2339,7 +2352,7 @@ E int FDECL(pickup_object, (struct obj *, long, BOOLEAN_P));
E int FDECL(query_category, (const char *, struct obj *, int,
menu_item **, int));
E int FDECL(query_objlist, (const char *, struct obj *, int,
menu_item **, int, boolean (*)(OBJ_P)));
menu_item **, int, boolean (*)(OBJ_P, int)));
E struct obj *FDECL(pick_obj, (struct obj *));
E int NDECL(encumber_msg);
E int NDECL(doloot);
@ -2631,6 +2644,9 @@ E NhRegion* FDECL(create_gas_cloud, (XCHAR_P, XCHAR_P, int, int, boolean));
E NhRegion* FDECL(create_fog_cloud, (XCHAR_P, XCHAR_P, int, int, boolean));
E NhRegion* FDECL(create_dust_cloud, (XCHAR_P, XCHAR_P, int, int));
/* ### research.c ### */
E int NDECL(doupgradeability);
/* ### restore.c ### */
E void FDECL(inven_inuse, (BOOLEAN_P));
@ -3540,7 +3556,7 @@ E int FDECL(xdamagey, (struct monst *, struct monst *, struct attack *, int));
E int FDECL(xstoney, (struct monst *, struct monst *));
E int FDECL(xmeleehurty, (struct monst *, struct monst *, struct attack *, struct attack *, struct obj **, boolean, int, int, int, boolean));
E int FDECL(xmeleehurty_core, (struct monst *, struct monst *, struct attack *, struct attack *, struct obj **, boolean, int, int, int, boolean, unsigned long));
E void FDECL(getgazeinfo, (int, int, struct permonst *, struct monst *, struct monst *, boolean *, boolean *, boolean *));
E void FDECL(getgazeinfo, (int, int, struct permonst *, struct monst *, struct monst *, boolean *, boolean *, boolean *, boolean *));
E int FDECL(xgazey, (struct monst *, struct monst *, struct attack *, int));
E int FDECL(xengulfhity, (struct monst *, struct monst *, struct attack *, int));
E int FDECL(xengulfhurty, (struct monst *, struct monst *, struct attack *, int));

View file

@ -92,6 +92,7 @@ struct flag {
boolean toptenwin; /* ending list in window instead of stdout */
boolean verbose; /* max battle info */
boolean prayconfirm; /* confirm before praying */
boolean tm_hour; /* hour of the day (updated once per global turn) */
int move; /* type[s] of action taken by player's last input/action */
int movetoprint;

View file

@ -96,18 +96,19 @@
#define CRUSHING 8
#define STONING 9
#define GOLDING 10
#define GLASSED 11
#define TURNED_SLIME 12
#define OVERWOUND 13
#define WEEPING 14
#define DISINTEGRATED 15
#define GENOCIDED 16 //Life saving triggers here and below, including wizard lifesaving
#define APOCALYPSE 17
#define PANICKED 18 //Below this, umortality is incremented
#define TRICKED 19
#define QUIT 20
#define ESCAPED 21
#define ASCENDED 22
#define SALTING 11
#define GLASSED 12
#define TURNED_SLIME 13
#define OVERWOUND 14
#define WEEPING 15
#define DISINTEGRATED 16
#define GENOCIDED 17 //Life saving triggers here and below, including wizard lifesaving
#define APOCALYPSE 18
#define PANICKED 19 //Below this, umortality is incremented
#define TRICKED 20
#define QUIT 21
#define ESCAPED 22
#define ASCENDED 23
#include "align.h"
#include "dungeon.h"
@ -247,6 +248,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#define SIGNAL_NOMENU 0x10 /* return -1 rather than 0 if none allowed */
#define FEEL_COCKATRICE 0x20 /* engage cockatrice checks and react */
#define SIGNAL_ESCAPE 0x40 /* return -2 if menu was escaped */
#define NO_EQUIPMENT 0x80 /* don't show equipped items */
/* Flags to control query_category() */
/* BY_NEXTHERE used by query_category() too, so skip 0x01 */

View file

@ -53,6 +53,7 @@
#define AT_WBIT 43 /* Wolf-head bite */
#define AT_TAIL 44 /* Tail-slap */
#define AT_TONG 45 /* Tongue attack */
#define AT_VOMT 46 /* Vomit attack */
#define AT_WEAP 252 /* uses weapon */
#define AT_XWEP 253 /* uses offhanded weapon */
@ -263,11 +264,13 @@
#define AD_DRHP 171 /* Drains bonus HP */
#define AD_PUSH 172 /* Push target away */
#define AD_LICK 173 /* Pull target, immobalize target, cold touch, acid touch */
#define AD_PFBT 174 /* rot and poison damage */
#define AD_OMUD 175 /* Acid and stab with bone daggers */
//#define AD_AHAZU 116 /* */
//Amon is a headbutt (AT_BUTT/AD_PHYS)
//Chupoclops is a poisonous bite (AT_BITE/AD_DRST)
#define AD_DUNSTAN 174
#define AD_DUNSTAN 176
#define AD_IRIS AD_DUNSTAN+1
#define AD_NABERIUS AD_DUNSTAN+2
#define AD_OTIAX AD_DUNSTAN+3
@ -312,7 +315,7 @@
#define no_contact_attk(attk) (\
(spirit_rapier_at(attk->aatyp) && attk->adtyp != AD_MERC) || \
attk->aatyp == AT_WISP || attk->aatyp == AT_HITS)
attk->aatyp == AT_WISP || attk->aatyp == AT_HITS || attk->aatyp == AT_VOMT)
/*
* Monster to monster attacks. When a monster attacks another (mattackm),
* any or all of the following can be returned. See mattackm() for more

View file

@ -133,12 +133,13 @@
#define species_tears_webs(ptr) (((ptr)->mflagsm & MM_WEBRIP) != 0L)
#define species_busts_doors(ptr) (((ptr)->mflagsm & MM_DOORBUST) != 0L)
#define is_suicidal(ptr) (is_fern_spore(ptr) || \
(ptr)->mtyp == PM_SPHERE_OF_FORCE || \
(ptr)->mtyp == PM_FREEZING_SPHERE || \
(ptr)->mtyp == PM_FLAMING_SPHERE || \
(ptr)->mtyp == PM_SHOCKING_SPHERE)
#define breathless(ptr) (((ptr)->mflagsm & MM_BREATHLESS) != 0L)
#define breathless_mon(mon) (breathless((mon)->data) || mon_resistance((mon), MAGICAL_BREATHING))
#define amphibious(ptr) (((ptr)->mflagsm & (MM_AMPHIBIOUS | MM_BREATHLESS)) != 0L)
#define amphibious(ptr) (((ptr)->mflagsm & (MM_AQUATIC | MM_AMPHIBIOUS | MM_BREATHLESS)) != 0L)
#define amphibious_mon(mon) (amphibious((mon)->data) || mon_resistance((mon), MAGICAL_BREATHING) || mon_resistance((mon), SWIMMING))
#define species_passes_walls(ptr) (((ptr)->mflagsm & MM_WALLWALK) != 0L)
#define amorphous(ptr) (((ptr)->mflagsm & MM_AMORPHOUS) != 0L)
@ -175,6 +176,10 @@
#define is_whirly(ptr) ((ptr)->mlet == S_VORTEX || \
(ptr)->mtyp == PM_AIR_ELEMENTAL ||\
(ptr)->mtyp == PM_ILLURIEN_OF_THE_MYRIAD_GLIMPSES ||\
(ptr)->mtyp == PM_LUMINESCENT_SWARM ||\
(ptr)->mtyp == PM_DREADBLOSSOM_SWARM)
#define is_gaseous_noequip(ptr) ((ptr)->mlet == S_VORTEX || \
(ptr)->mtyp == PM_AIR_ELEMENTAL ||\
(ptr)->mtyp == PM_DREADBLOSSOM_SWARM)
#define has_passthrough_displacement(ptr) ((ptr)->mtyp == PM_WRAITHWORM ||\
(ptr)->mtyp == PM_FIRST_WRAITHWORM)
@ -205,6 +210,7 @@
(ptr)->mtyp == PM_SCRAP_TITAN || \
(ptr)->mtyp == PM_HELLFIRE_COLOSSUS || \
(ptr)->mtyp == PM_HELLFIRE_ORB || \
(ptr)->mtyp == PM_RAGE_WALKER || \
(ptr)->mtyp == PM_FERRUMACH_RILMANI)
#define is_iron_mon(mon) (is_iron((mon)->data))
#define is_silver(ptr) ((ptr)->mtyp == PM_ARGENACH_RILMANI || \
@ -354,7 +360,7 @@
(ptr)->mtyp == PM_UVUUDAUM || \
(ptr)->mtyp == PM_MASKED_QUEEN \
)
#define controlledwidegaze(ptr) (!((ptr)->mtyp == PM_MEDUSA || (ptr)->mtyp == PM_UVUUDAUM || (ptr)->mtyp == PM_GREAT_CTHULHU || (ptr)->mtyp == PM_OBOX_OB || (ptr)->mtyp == PM_DAGON))
#define controlledwidegaze(ptr) (!((ptr)->mtyp == PM_MEDUSA || (ptr)->mtyp == PM_UVUUDAUM || (ptr)->mtyp == PM_DESERT_SEER || (ptr)->mtyp == PM_GREAT_CTHULHU || (ptr)->mtyp == PM_OBOX_OB || (ptr)->mtyp == PM_DAGON))
#define controlledwidegaze_mon(mon) (controlledwidegaze((mon)->data) || has_template(mon, ILLUMINATED))
#define acidic(ptr) (((ptr)->mflagsb & MB_ACID) != 0L)
#define poisonous(ptr) (((ptr)->mflagsb & MB_POIS) != 0L)
@ -660,7 +666,7 @@
|| (ptr)->mtyp == PM_MOON_S_CHOSEN\
)
#define is_snake_bite_mon(mon) (is_snake_bite_mtyp((mon)->data) || has_template(mon, MOLY_TEMPLATE))
#define is_tailslap_mtyp(ptr) (is_true_adult_dragon(ptr) || (ptr)->mtyp == PM_UISCERRE_ELADRIN || (ptr)->mtyp == PM_DISENCHANTER || (ptr)->mtyp == PM_GRAY_DEVOURER)
#define is_tailslap_mtyp(ptr) (is_true_adult_dragon(ptr) || (ptr)->mtyp == PM_UISCERRE_ELADRIN || (ptr)->mtyp == PM_DISENCHANTER || (ptr)->mtyp == PM_GRAY_DEVOURER || (ptr)->mtyp == PM_NAMELESS_GNAWER)
#define is_tailslap_mon(mon) (is_tailslap_mtyp((mon)->data))
#define is_vines_mon(mon) ((mon)->mtyp == PM_GAE_ELADRIN && (mon)->m_lev >= 20)
@ -671,6 +677,8 @@
|| (ptr)->mtyp == PM_GHAELE_ELADRIN || (ptr)->mtyp == PM_LUMINOUS_CLOUD\
|| (ptr)->mtyp == PM_PYROCLASTIC_VORTEX)
#define is_storm_mon(mon) ((is_level_storm_mtyp((mon)->data) && (mon)->m_lev >= 20) || is_storm_mtyp((mon)->data))
#define is_chain_lash_mtyp(ptr) ((ptr)->mtyp == PM_RAGE_WALKER)
#define is_chain_lash_mon(mon) (is_chain_lash_mtyp((mon)->data))
#define is_dancer(ptr) ((ptr)->mtyp == PM_PORO_AULON || (ptr)->mtyp == PM_SEYLL_AUZKOVYN || (ptr)->mtyp == PM_ANULO_DANCER || (ptr)->mtyp == PM_MYRKALFAR_MATRON)
#define goat_monster(ptr) (In_lost_cities(&u.uz) ? lost_cities_goat_monster(ptr) : always_goat_monster(ptr))
@ -728,6 +736,17 @@
|| has_template(mon, DREAM_LEECH) \
)
#define rot_monster(mon) (((mon)->data->mlet == S_FUNGUS && mindless_mon(mon)) \
|| (mon)->mtyp == PM_SWAMP_FERN \
|| (mon)->mtyp == PM_SWAMP_FERN_SPORE \
|| (mon)->mtyp == PM_SWAMP_FERN_SPROUT \
|| (mon)->mtyp == PM_SWAMP_NYMPH \
|| (mon)->mtyp == PM_SILVERMAN \
|| (mon)->mtyp == PM_SILVERGRUB \
|| (mon)->mtyp == PM_MAN_FLY \
|| has_template(mon, SWOLLEN_TEMPLATE) \
)
#define gates_in_help(ptr) ((is_demon((ptr)) || is_minion((ptr))) \
&& !is_auton(ptr) \
&& (ptr)->mtyp != PM_OONA \
@ -1013,45 +1032,10 @@
monsters, we'll likely have to add a new light range field to mons[]
KEEP IN SYNC with MAX_RADIUS, circle_data, and circle_start[].
Maximum allowable lightsource radius is currently 10 (30 after 3x lowlight modifier) */
#define emits_light(ptr) (((ptr)->mlet == S_LIGHT || \
(ptr)->mtyp == PM_BRIGHT_WALKER || \
(ptr)->mtyp == PM_FLAMING_SPHERE || \
(ptr)->mtyp == PM_SHOCKING_SPHERE || \
(ptr)->mtyp == PM_PARASITIZED_DOLL || \
(ptr)->mtyp == PM_MOTE_OF_LIGHT || \
(ptr)->mtyp == PM_BALL_OF_LIGHT || \
(ptr)->mtyp == PM_LIGHT_ELF || \
(ptr)->mtyp == PM_BLOODY_SUNSET || \
(ptr)->mtyp == PM_BALL_OF_GOSSAMER_SUNLIGHT || \
(ptr)->mtyp == PM_LUMINOUS_CLOUD || \
(ptr)->mtyp == PM_HOOLOOVOO || \
(ptr)->mtyp == PM_LIGHTNING_PARAELEMENTAL || \
(ptr)->mtyp == PM_FALLEN_ANGEL || \
(ptr)->mtyp == PM_ANCIENT_OF_THOUGHT || \
(ptr)->mtyp == PM_DARK_WORM || \
(ptr)->mtyp == PM_FIRE_VORTEX) ? 1 : \
((ptr)->mtyp == PM_FIRE_ELEMENTAL ||\
(ptr)->mtyp == PM_FLAMING_ORB || \
(ptr)->mtyp == PM_CANDLE_TREE || \
(ptr)->mtyp == PM_PARASITIZED_KNIGHT || \
(ptr)->mtyp == PM_DANCING_FLAME ||\
(ptr)->mtyp == PM_COTERIE_OF_MOTES ||\
(ptr)->mtyp == PM_BALL_OF_RADIANCE) ? 2 : \
((ptr)->mtyp == PM_THRONE_ARCHON ||\
(ptr)->mtyp == PM_UNBODIED ||\
(ptr)->mtyp == PM_BEAUTEOUS_ONE ||\
(ptr)->mtyp == PM_DAO_LAO_GUI_MONK ||\
(ptr)->mtyp == PM_ASPECT_OF_THE_SILENCE) ? 3 : \
((ptr)->mtyp == PM_BLESSED) ? 4 : \
((ptr)->mtyp == PM_LIGHT_ARCHON|| \
(ptr)->mtyp == PM_GOD ||\
(ptr)->mtyp == PM_LUCIFER) ? 7 : \
((ptr)->mtyp == PM_EDDERKOP) ? 8 : \
((ptr)->mtyp == PM_SURYA_DEVA) ? 9 : \
0)
#define emits_light_mon(mon) (has_template(mon, ILLUMINATED) ? \
max(3, emits_light((mon)->data)) : \
emits_light((mon)->data))
#define emits_light(ptr) ((ptr)->light_radius)
#define emits_light_mon(mon) (emits_light((mon)->data))
#define Is_darklight_monster(ptr) ((ptr)->mtyp == PM_EDDERKOP\
|| (ptr)->mtyp == PM_DARK_WORM\
|| (ptr)->mtyp == PM_ASPECT_OF_THE_SILENCE\
@ -1099,6 +1083,7 @@
#define is_alienist(ptr) (is_mind_flayer(ptr) || \
(ptr)->mlet == S_UMBER ||\
(ptr)->mtyp == PM_DESERT_SEER ||\
(ptr)->mtyp == PM_DROW_ALIENIST ||\
(ptr)->mtyp == PM_DARUTH_XAXOX ||\
(ptr)->mtyp == PM_EMBRACED_DROWESS\
@ -1119,6 +1104,9 @@
|| (ptr)->mtyp == PM_MAD_SEER \
|| (ptr)->mtyp == PM_CLAIRVOYANT_CHANGED \
|| (ptr)->mtyp == PM_FOETID_ANGEL \
|| (ptr)->mtyp == PM_TETTIGON_LEGATUS \
|| (ptr)->mtyp == PM_UNMASKED_TETTIGON \
|| (ptr)->mtyp == PM_TRANSCENDENT_TETTIGON \
|| ((ptr)->mtyp == PM_TWIN_SIBLING && check_mutation(TWIN_DREAMS)) \
)
@ -1317,6 +1305,8 @@
(mon)->mtyp == PM_ARIANNA || (mon)->mtyp == PM_BLIBDOOLPOOLP_S_MINDGRAVEN_CHAMPION || \
(mon)->mtyp == PM_REBEL_RINGLEADER || (mon)->mtyp == PM_RADIANT_PYRAMID || \
(mon)->mtyp == PM_SIR_ALJANOR || (mon)->mtyp == PM_ALLIANCE_VANGUARD || \
(mon)->mtyp == PM_TETTIGON_LEGATUS || (mon)->mtyp == PM_UNMASKED_TETTIGON || \
(mon)->mtyp == PM_TRANSCENDENT_TETTIGON || \
((mon)->mtyp == PM_HOD_SEPHIRAH && Role_if(PM_KNIGHT)) || \
((mon)->mtyp == PM_DEMINYMPH && (mon)->mvar_deminymph_role == PM_KNIGHT))
#define mon_healing_turn(mon) ((mon)->mtyp == PM_DRACAE_ELADRIN || (mon)->mtyp == PM_UNBODIED)

View file

@ -107,6 +107,7 @@
#define MM_FLEETFLEE 0x00008000L /* Flees if adjacent if it thinks it can outrun you */
#define MM_WEBRIP 0x00010000L /* Tears through webs instead of getting stuck */
#define MM_DOORBUST 0x00020000L /* Breaks down locked doors (UNIMPLEMENTED, part of ma_giant currently!) */
#define MM_AQUATIC 0x00040000L /* Can ONLY survive underwater */
//Monster Thoughts and behavior
#define MT_WANTSAMUL 0x00000001L /* would like to steal the amulet */
@ -467,8 +468,10 @@
#define HOLY_BOLT MADF_BURST+1
#define MIST_WOLVES HOLY_BOLT+1
//105
#define FORCE_SPHERES MIST_WOLVES+1
#define PEST_THREADS FORCE_SPHERES+1
#define MON_LASTSPELL MIST_WOLVES
#define MON_LASTSPELL PEST_THREADS
//Not yet implemented
// #define MON_FIRE STRANGLE+1
// #define MON_BLIZZARD MON_FIRAGA+1

View file

@ -207,6 +207,10 @@ struct monst {
Bitfield(mequipping,7); /*146*/
Bitfield(mironmarked,1);/* recently hit by an iron weapon (elves/fey/rage-walker) */ /*147*/
Bitfield(mcaterpillars,1); /* monster is covered in rot scorpions */ /*148*/
Bitfield(momud,1); /* monster is covered in orc-mud */ /*148*/
unsigned long long int seenmadnesses; /* monster has seen these madnesses */
char mbdrown; /* drowning in blood */
@ -278,6 +282,7 @@ struct monst {
#define NECROMANCY_FACTION FACTION_PADDING+12 /* Elf Necromacer's faction */
#define CITY_FACTION FACTION_PADDING+13 /* Undead Hunter city faction */
#define MOON_FACTION FACTION_PADDING+14 /* Undead Hunter lycanthrope faction */
#define ROT_FACTION FACTION_PADDING+15 /* Rot monster faction */
/* template applied to monster to create a new-ish monster */
int mtemplate;
@ -313,7 +318,9 @@ struct monst {
#define TONGUE_PUPPET 30 /* moon-tongue puppet */
#define YGGDRASIL 31 /* of the sacred tree */
#define WHISPERING 32 /* Voidified */
#define MAXTEMPLATE WHISPERING
#define SWOLLEN_TEMPLATE 33 /* giant */
#define BLOOD_MON 34 /* blood clone */
#define MAXTEMPLATE BLOOD_MON
//define HALF_DEMON FACTION_PADDING+1 /* half-demon ??? */
//define HALF_DEVIL FACTION_PADDING+2 /* half-devil ??? */
@ -370,6 +377,7 @@ struct monst {
#define mvar_star_vampire_blood mvar1
#define mvar_elfwraith_target mvar1
#define mvar_spellweaver_count mvar1
#define mvar1_tettigon_uncancel mvar1
long mvar2;
#define mvar_dracaePregTimer mvar2
#define mvar_spList_2 mvar2

View file

@ -603,7 +603,7 @@ struct obj {
( (a)->otyp ) == ROUNDSHIELD ? ((o)->otyp==DWARVISH_ROUNDSHIELD) : \
( (a) == &artilist[ART_LANCE_OF_LONGINUS] ) ? ((o)->otyp==SCALPEL||(o)->otyp==LIGHTSABER) : \
( (a) == &artilist[ART_GUNGNIR] ) ? (is_spear(o)) : \
( (a) == &artilist[ART_SINGING_SWORD] ) ? ((o)->otyp == LONG_SWORD || (o)->otyp == RAPIER || (o)->otyp == SABER) : \
( (a) == &artilist[ART_SINGING_SWORD] ) ? ((o)->otyp == LONG_SWORD || (o)->otyp == RAPIER || (o)->otyp == SABER || (Race_if(PM_ELF) && (o)->otyp == ELVEN_BROADSWORD)) : \
( (a) == &artilist[ART_DIRGE] ) ? (o->oclass == WEAPON_CLASS || is_weptool(o)) : \
( (a) == &artilist[ART_SKY_REFLECTED] ) ? (o->obj_material == MERCURIAL && (o->oclass == WEAPON_CLASS || is_weptool(o))) : \
((a) == &artilist[ART_FIRE_BRAND] || (a) == &artilist[ART_FROST_BRAND]) ? \
@ -696,7 +696,7 @@ struct obj {
|| typ == KATAR \
|| (Role_if(PM_PIRATE) && typ == FLINTLOCK) \
|| (Role_if(PM_UNDEAD_HUNTER) && typ == PISTOL) \
|| (Role_if(PM_MADMAN) && u.uinsight > 30 && typ == CARCOSAN_STING) \
|| (Role_if(PM_MADMAN) && Insight > 30 && typ == CARCOSAN_STING) \
|| typ == BOW \
|| (Role_if(PM_SAMURAI) && typ == YUMI) \
|| (Race_if(PM_GNOME) && typ == CROSSBOW) \
@ -852,11 +852,11 @@ struct obj {
#define yog_magicable(otmp) (accepts_weapon_oprops(otmp)\
&& !check_oprop((otmp), OPROP_SOTHW) && !check_oprop((otmp), OPROP_MAGCW) && !check_oprop((otmp), OPROP_LESSER_MAGCW))
#define yog_windowable(otmp) (accepts_weapon_oprops(otmp) && !check_oprop((otmp), OPROP_SOTHW) && !check_oprop((otmp), OPROP_MAGCW))
#define sflm_able(otmp) (((otmp)->obj_material == SILVER || (otmp)->obj_material == PLATINUM || (otmp)->obj_material == MITHRIL)\
#define sflm_able(otmp) (((otmp)->obj_material == SILVER || (otmp)->obj_material == PLATINUM || (otmp)->obj_material == MITHRIL || (otmp)->obj_material == HEMARGYOS)\
|| ((otmp)->oartifact == ART_IBITE_ARM && artinstance[ART_IBITE_ARM].IbiteUpgrades&IPROP_REFLECT)\
|| ((otmp)->oartifact == ART_AMALGAMATED_SKIES)\
)
#define sflm_active(otmp) (sflm_able(otmp) || (otmp)->obj_material == HEMARGYOS)
#define sflm_active(otmp) (sflm_able(otmp))
#define sflm_offerable(otmp) (accepts_weapon_oprops(otmp) && sflm_able(otmp) && !check_oprop(otmp, OPROP_SFLMW))
#define sflm_mirrorable(otmp) (((otmp)->oclass == WEAPON_CLASS || is_weptool(otmp) || is_suit(otmp) || is_shield(otmp))\
&& sflm_able(otmp) && !check_oprop(otmp, OPROP_REFL))
@ -879,7 +879,7 @@ struct obj {
(otmp)->otyp==AKLYS || \
(otmp)->otyp==DISKOS || \
(otmp)->otyp==HUNTER_S_LONG_AXE || \
(is_cclub_able(otmp) && u.uinsight >= 15) || \
(is_cclub_able(otmp) && Insight >= 15) || \
(otmp)->oartifact==ART_SOL_VALTIVA || \
(otmp)->oartifact==ART_SHADOWLOCK || \
(otmp)->oartifact==ART_RUYI_JINGU_BANG || \
@ -1161,7 +1161,7 @@ struct obj {
is_weptool((otmp)) || \
(otmp)->otyp == BOULDER || \
(otmp)->otyp == MASS_OF_STUFF || \
(otmp)->otyp == HEAVY_IRON_BALL || \
(otmp)->otyp == BALL || \
(otmp)->otyp == CHAIN || \
(otmp)->oclass == GEM_CLASS)
#define throwing_weapon(otmp) (is_missile((otmp)) || is_spear((otmp)) || \
@ -1218,6 +1218,7 @@ struct obj {
|| carrying(IMPERIAL_ELVEN_BOOTS)\
)
#define helm_upgrade_obj(obj) (((obj)->otyp == AMULET_OF_MAGICAL_BREATHING \
|| (obj)->otyp == ENCOUNTER_EXOSKELETON \
|| (obj)->otyp == WAN_DRAINING \
|| (obj)->otyp == RIN_SEE_INVISIBLE \
|| (obj)->otyp == HELM_OF_TELEPATHY \
@ -1232,6 +1233,7 @@ struct obj {
|| (obj)->otyp == GAUNTLETS_OF_DEXTERITY \
|| (obj)->otyp == RIN_INCREASE_DAMAGE \
|| (obj)->otyp == WAN_MAGIC_MISSILE \
|| (obj)->otyp == ENCOUNTER_EXOSKELETON \
|| (obj)->otyp == AMULET_OF_STRANGULATION \
) && objects[(obj)->otyp].oc_name_known)
#define armor_upgrade_obj(obj) (((obj)->otyp == FLYING_BOOTS \
@ -1244,6 +1246,7 @@ struct obj {
|| (obj)->otyp == AMULET_VERSUS_SICKNESS \
|| (obj)->otyp == HEALER_UNIFORM \
|| (obj)->otyp == BODYGLOVE \
|| (obj)->otyp == ENCOUNTER_EXOSKELETON \
|| (obj)->otyp == CLOAK_OF_PROTECTION \
|| (obj)->otyp == CLOAK_OF_MAGIC_RESISTANCE \
|| (obj)->otyp == ORIHALCYON_GAUNTLETS \
@ -1257,6 +1260,7 @@ struct obj {
#define boots_upgrade_obj(obj) (((obj)->otyp == JUMPING_BOOTS \
|| (obj)->otyp == SPEED_BOOTS \
|| (obj)->otyp == KICKING_BOOTS \
|| (obj)->otyp == ENCOUNTER_EXOSKELETON \
|| (obj)->otyp == WAN_SPEED_MONSTER \
|| (obj)->otyp == RIN_ALACRITY \
|| (obj)->otyp == WAN_TELEPORTATION \

View file

@ -234,15 +234,19 @@ struct objclass {
#define ETRAIT_SECOND 0x00004000L
#define ETRAIT_CREATE_OPENING 0x00008000L
#define ETRAIT_BRACED 0x00010000L
#define ETRAIT_BLADESONG 0x00020000L
#define ETRAIT_BLADEDANCE 0x00040000L
#define wielder_size(mon) ((mon) == &youmonst ? youracedata->msize : (mon)->data->msize)
#define CHECK_ETRAIT(obj, mon, trait) (( (objects[(obj)->otyp].expert_traits&trait && (obj)->objsize == wielder_size(mon) \
&& (trait == ETRAIT_PENETRATE_ARMOR || !is_lightsaber(obj) || litsaber(obj)) \
#define CHECK_ETRAIT(obj, mon, trait) (((obj)->objsize == wielder_size(mon) || (obj)->oartifact == ART_AMALGAMATED_SKIES) && \
( (objects[(obj)->otyp].expert_traits&trait \
&& (trait == ETRAIT_FOCUS_FIRE || (obj)->otyp != TOOTH || !((obj)->o_e_trait&ETRAIT_FOCUS_FIRE)) \
&& !((mon) == &youmonst && objects[(obj)->otyp].oc_skill == P_LANCE && !(u.usteed || centauroid(youracedata) || animaloid(youracedata))) \
) \
|| (trait == ETRAIT_QUICK && (mon) == &youmonst && obj->otyp == LONG_SWORD && activeFightingForm(FFORM_HALF_SWORD))\
|| (trait == ETRAIT_PENETRATE_ARMOR && (mon) == &youmonst && obj->otyp == LONG_SWORD && activeFightingForm(FFORM_POMMEL))\
|| (trait == ETRAIT_BLADESONG && (obj)->oartifact == ART_BLADE_SINGER_S_SABER)\
|| (trait == ETRAIT_BLADEDANCE && (obj)->oartifact == ART_BLADE_DANCER_S_DAGGER)\
|| ((obj)->oartifact == ART_AMALGAMATED_SKIES && artinstance[ART_AMALGAMATED_SKIES].TwinSkiesEtraits&trait)\
) && \
((mon) == &youmonst ? (P_SKILL(weapon_type(obj)) > P_BASIC ) : (((mon)->data->mflagsf&MF_MARTIAL_E) || ((mon)->data->mflagsf&MF_MARTIAL_S))))

View file

@ -24,6 +24,7 @@ struct attack {
boolean offhand; /*This attack is blocked by a shield (offhand weapons and spiritual rapiers handled via at_ type).*/
boolean polywep; /*This attack is changed to a weapon attack if you're poly'd into this form and wielding a weapon.*/
uchar ins_req; /*The PC must have reached X insight for the attacker to get this attack.*/
char san_req; /*The PC must have fallen below or risen above X sanity for the attacker to get this attack.*/
};
#define is_null_attk(attk) ((attk) && ((attk)->aatyp == 0 && (attk)->adtyp == 0 && (attk)->damn == 0 && (attk)->damd == 0))
@ -110,6 +111,7 @@ struct permonst {
mflagsa, /* Monster rAce boolean bitflags */
mflagsv, /* Monster Vision boolean bitflags */
mflagsw; /* Monster Warded boolean bitflags */
unsigned char light_radius;
# ifdef TEXTCOLOR
uchar mcolor; /* color to use */
# endif

View file

@ -47,7 +47,8 @@
#define WOUNDED_LEGS 1 + SLEEPING
#define STONED 1 + WOUNDED_LEGS
#define GOLDED 1 + STONED
#define STRANGLED 1 + GOLDED
#define SALTED 1 + GOLDED
#define STRANGLED 1 + SALTED
#define FROZEN_AIR 1 + STRANGLED
#define HALLUC 1 + FROZEN_AIR
#define HALLUC_RES 1 + HALLUC

View file

@ -41,7 +41,15 @@ struct spell {
spellid(spell) == SPE_RESTORE_ABILITY || spellid(spell) == SPE_REMOVE_CURSE)
#define metal_blocks_spellcasting(otmp) (otmp && \
(is_metallic(otmp) || otmp->oartifact == ART_DRAGON_PLATE) && \
!(check_oprop(otmp, OPROP_BRIL) || otmp->otyp == HELM_OF_BRILLIANCE || (otmp->otyp == HELM_OF_TELEPATHY && base_casting_stat() == A_CHA)))
!(check_oprop(otmp, OPROP_BRIL) || otmp->otyp == HELM_OF_BRILLIANCE \
|| (otmp->otyp == HELM_OF_TELEPATHY && base_casting_stat() == A_CHA) \
|| (is_imperial_elven_armor(otmp) && !(check_imp_mod(otmp, IEA_TELEPAT) \
|| check_imp_mod(otmp, IEA_BOLTS) \
|| check_imp_mod(otmp, IEA_KICKING) \
|| check_imp_mod(otmp, IEA_DEFLECTION) \
) \
)) \
)
#define FIRST_LIGHT MAXSPELL+1
#define PART_WATER MAXSPELL+2

View file

@ -78,7 +78,10 @@
#define SUBOUT_ACU 19 /* ACU tentacle attack */
#define SUBOUT_SALA1 20 /* Sala tuch attack */
#define SUBOUT_SALA2 21 /* Sala hug attack */
#define MAX_SUBOUT 22
#define SUBOUT_ARRAY_SIZE (MAX_SUBOUT/8+1)
#define SUBOUT_ROT_SPORES 22 /* Pasive spore attack */
#define SUBOUT_ROT_VOMIT 23 /* Vomit rot */
#define SUBOUT_ROT_STING 24 /* Rot stinger */
#define MAX_SUBOUT 25
#define SUBOUT_ARRAY_SIZE (MAX_SUBOUT/16+1)
#endif

View file

@ -359,6 +359,7 @@ struct you {
Bitfield(uavoid_grabattk,1);
Bitfield(uavoid_englattk,1);
Bitfield(uavoid_unsafetouch,1);
Bitfield(uavoid_theft,1);
int umystic; /*Monk mystic attacks active*/
#define monk_style_active(style) (u.umystic & (1 << (style-1)))
#define toggle_monk_style(style) (u.umystic = u.umystic ^ (1 << (style-1)))
@ -371,6 +372,7 @@ struct you {
// long laststruck;
long lastmoved;
long lastcast;
long bladesong;
boolean ukinghill; /* records if you are carying the pirate treasure (and are therefor king of the hill) */
int protean; /* counter for the auto-polypiling power of the pirate treasure*/
@ -472,6 +474,7 @@ struct you {
#define MATTK_YUKI 37
#define MATTK_LEPRE 38
#define MATTK_KI 39
#define MATTK_UPGRADE 40
@ -736,7 +739,7 @@ struct you {
int uinsight; /* to record level of insight */
/*Insight rate calculation: 40: "high insight" 300: "Approximate per-turn WoYendor intervention rate" 5: "total number of harmful effects" */
#define INSIGHT_RATE (40*300*5)
#define COA_PROB (max(1, 10000*pow(.95,(Role_if(PM_ANACHRONOUNBINDER)?max(0,u.uinsight-100):u.uinsight))))
#define COA_PROB (max(1, 10000*pow(.95,(Role_if(PM_ANACHRONOUNBINDER)?max(0,Insight-100):Insight))))
int uimpurity; /* to record level of impurity */
Bitfield(uimp_meat, 4);
Bitfield(uimp_blood, 4);
@ -756,7 +759,10 @@ struct you {
Bitfield(uimp_betrayal, 4);
Bitfield(uimp_kuo_toa, 4);
Bitfield(uimp_ibite, 4);
Bitfield(uimp_mind_flayers, 4); //51/+25 eve/+12 bullets?
Bitfield(uimp_mind_flayers, 4);
Bitfield(uimp_rot, 4);
Bitfield(uimp_poison, 4);
Bitfield(uimp_curse, 4); //60/+30 eve/+12 bullets?
int ureanimation_research; /* to record progress on reanimation */
//Power 1: raise crazed corpses
//Power 2: Summon blood creatures
@ -799,6 +805,7 @@ struct you {
//
#define PRESERVE_DEAD_TRUCE 0x00000040L
#define PRESERVE_MAX PRESERVE_DEAD_TRUCE
#define PRESERVE_ROT_TRIGGER PRESERVE_GAIN_DR
#define check_preservation(upgrade) (u.upreservation_upgrades&(upgrade))
#define add_preservation(upgrade) (u.upreservation_upgrades|=(upgrade))
//Path 2: Steal will
@ -813,8 +820,23 @@ struct you {
#define check_vampire(upgrade) (u.uvampire_upgrades&(upgrade))
#define add_vampire(upgrade) (u.uvampire_upgrades|=(upgrade))
// long urot_upgrades;
long urot_upgrades;
//Path 3: New life
#define ROT_VOMIT 0x00000001L
#define ROT_WINGS 0x00000002L
#define ROT_CLONE 0x00000004L
#define ROT_TRUCE 0x00000008L
#define ROT_KIN 0x00000010L
#define ROT_FEAST 0x00000020L
#define ROT_CENT 0x00000040L
#define ROT_STING 0x00000080L
#define ROT_SPORES 0x00000100L
#define ROT_MIN ROT_VOMIT
#define ROT_MAX ROT_SPORES
#define ROT_COUNT 9
#define check_rot(upgrade) (u.urot_upgrades&(upgrade))
#define add_rot(upgrade) (u.urot_upgrades|=(upgrade))
#define remove_rot(upgrade) (u.urot_upgrades&=~(upgrade))
// Blood fly swarm
// Rot enemy
// Ants and fungi are peaceful
@ -837,6 +859,7 @@ struct you {
u.uimpurity++;\
}\
}
Bitfield(silvergrubs, 1);
uchar wimage; /* to record if you have the image of a Weeping Angel in your mind */
int umorgul; /* to record the number of morgul wounds */
@ -1107,7 +1130,7 @@ struct you {
boolean ufirst_know;
long ufirst_know_timeout;
long thoughts;
#define MAX_GLYPHS (((Role_if(PM_MADMAN) && u.uevent.qcompleted && (u.uinsight >= 20 || u.render_thought)) || Role_if(PM_UNDEAD_HUNTER)) ? 4 : 3)
#define MAX_GLYPHS (((Role_if(PM_MADMAN) && u.uevent.qcompleted && (Insight >= 20 || u.render_thought)) || Role_if(PM_UNDEAD_HUNTER)) ? 4 : 3)
long mutations[MUTATION_LISTSIZE];
}; /* end of `struct you' */
#define uclockwork ((Race_if(PM_CLOCKWORK_AUTOMATON) && !Upolyd) || (Upolyd && youmonst.data->mtyp == PM_CLOCKWORK_AUTOMATON))

View file

@ -174,7 +174,9 @@
#define NightmareAware_Sanity ((Nightmare && ClearThoughts) ? (u.usanity + 4*Insanity/5) : ClearThoughts ? (u.usanity + 9*Insanity/10) : u.usanity)
#define NightmareAware_Insanity ((Nightmare && ClearThoughts) ? (Insanity/5) : ClearThoughts ? Insanity/10 : Insanity)
#define FacelessHelm(obj) ((obj)->otyp == PLASTEEL_HELM || (obj)->otyp == CRYSTAL_HELM || (obj)->otyp == PONTIFF_S_CROWN || (obj)->otyp == FACELESS_HELM || (obj)->otyp == IMPERIAL_ELVEN_HELM)
#define Insight (u.uinsight)
#define FacelessHelm(obj) ((obj)->otyp == PLASTEEL_HELM || (obj)->otyp == CRYSTAL_HELM || (obj)->otyp == PONTIFF_S_CROWN || (obj)->otyp == FACELESS_HELM || (obj)->otyp == FACELESS_HOOD || (obj)->otyp == IMPERIAL_ELVEN_HELM)
#define FacelessCloak(obj) ((obj)->otyp == WHITE_FACELESS_ROBE || (obj)->otyp == BLACK_FACELESS_ROBE || (obj)->otyp == SMOKY_VIOLET_FACELESS_ROBE)
#define Faceless(obj) (FacelessHelm(obj) || FacelessCloak(obj))
@ -205,7 +207,7 @@
#define Blind_res (HBlind_res || EBlind_res)
#define Blindfolded ((ublindf && is_opaque_worn_tool(ublindf)) ||\
(uarmh && uarmh->otyp == PLASTEEL_HELM && uarmh->obj_material != objects[uarmh->otyp].oc_material && is_opaque(uarmh)) ||\
(uarmh && uarmh->otyp == CRYSTAL_HELM && is_opaque(uarmh)))
(uarmh && (uarmh->otyp == CRYSTAL_HELM || uarmh->otyp == FACELESS_HOOD) && is_opaque(uarmh)))
/* ...means blind because of a cover */
#define NoLightBlind (((Blinded || Blindfolded || !haseyes(youracedata)) && \
!(u.sealsActive&SEAL_DANTALION && !((uarm && arm_blocks_upper_body(uarm->otyp) && is_opaque(uarm)) || (uarmu && is_opaque(uarmu)))) && \
@ -226,6 +228,7 @@
#define Sick u.uprops[SICK].intrinsic
#define Stoned u.uprops[STONED].intrinsic
#define Golded u.uprops[GOLDED].intrinsic
#define Salted u.uprops[SALTED].intrinsic
#define Vomiting u.uprops[VOMITING].intrinsic
#define Glib u.uprops[GLIB].intrinsic
#define Slimed u.uprops[SLIMED].intrinsic /* [Tom] */
@ -652,7 +655,7 @@
/*Note: the rings only give life saving when charged, so it can't be a normal property*/
#define ELifesaved u.uprops[LIFESAVED].extrinsic
#define Lifesaved (ELifesaved || Check_crystal_lifesaving() || Check_iaso_lifesaving() || Check_twin_lifesaving() || (uleft && uleft->otyp == RIN_WISHES && uleft->spe > 0) || (uright && uright->otyp == RIN_WISHES && uright->spe > 0) || (check_mutation(ABHORRENT_SPORE) && !(mvitals[PM_DARK_YOUNG].mvflags & G_GENOD)))
#define Lifesaved (ELifesaved || Check_crystal_lifesaving() || Check_iaso_lifesaving() || Check_twin_lifesaving() || (uleft && uleft->otyp == RIN_WISHES && uleft->spe > 0) || (uright && uright->otyp == RIN_WISHES && uright->spe > 0) || (check_rot(ROT_CENT) && !(mvitals[PM_CENTIPEDE].mvflags & G_GENOD) && !HUnchanging) || (check_mutation(ABHORRENT_SPORE) && !(mvitals[PM_DARK_YOUNG].mvflags & G_GENOD)))
#define Necrospellboost (u.uprops[NECROSPELLS].extrinsic)

View file

@ -37,6 +37,7 @@ STATIC_DCL void NDECL(cthulhu_mind_blast);
STATIC_DCL void FDECL(unseen_actions, (struct monst *));
STATIC_DCL void FDECL(blessed_spawn, (struct monst *));
STATIC_DCL void FDECL(alkilith_spawn, (struct monst *));
STATIC_DCL void FDECL(incarnator_action, (struct monst *));
STATIC_DCL void FDECL(befouled_wraith, (struct monst *));
STATIC_DCL void FDECL(good_neighbor, (struct monst *));
STATIC_DCL void FDECL(dark_pharaoh, (struct monst *));
@ -48,6 +49,7 @@ STATIC_DCL void FDECL(goat_sacrifice, (struct monst *));
STATIC_DCL void FDECL(palid_stranger, (struct monst *));
STATIC_DCL void FDECL(sib_follow, (struct monst *));
STATIC_DCL void FDECL(invisible_twin_act, (struct monst *));
void FDECL(make_rage_walker_polts, (int));
#ifdef OVL0
@ -487,7 +489,7 @@ void
clear_stale_fforms()
{
for(int fform = NO_FFORM+1; fform <= LAST_FFORM; fform++){
if (!!(u.fightingForm[(fform-1)/16] & (0x1L << ((fform-1)%16))) && FightingFormSkillLevel(fform) <= P_ISRESTRICTED){
if (!!(u.fightingForm[(fform-1)/16] & (0x1L << ((fform-1)%16))) && fform != FFORM_SHII_CHO && FightingFormSkillLevel(fform) <= P_ISRESTRICTED){
unSetFightingForm(fform);
You("readjust your stance.");
}
@ -1343,7 +1345,7 @@ you_regen_pw()
reglevel += 10;
}
if (Role_if(PM_MADMAN)) reglevel += 9;
if (Role_if(PM_UNDEAD_HUNTER) && u.uinsight > 10)
if (Role_if(PM_UNDEAD_HUNTER) && Insight > 10)
reglevel += 9;
if (Role_if(PM_HEALER)) reglevel += 6;
if (Role_if(PM_PRIEST)) reglevel += 6;
@ -1477,7 +1479,7 @@ san_threshhold()
{
// Threshold levels based on wis.
int reglevel = ACURR(A_WIS);
int insight = u.uinsight;
int insight = Insight;
// role bonuses
if (Role_if(PM_BARBARIAN)) reglevel += 10;
@ -1491,7 +1493,7 @@ san_threshhold()
if (Role_if(PM_CONVICT)) reglevel -= 3;
if (Role_if(PM_NOBLEMAN)) reglevel -= 5;
if (Role_if(PM_MADMAN)) reglevel -= 10;
if (Role_if(PM_UNDEAD_HUNTER) && (u.uinsight >= 50 || quest_status.moon_close)) reglevel -= 10;
if (Role_if(PM_UNDEAD_HUNTER) && (Insight >= 50 || quest_status.moon_close)) reglevel -= 10;
//Maybe scale undead hunter based on how well they did on the quest as well.
if (Race_if(PM_ELF)) reglevel += 3;
@ -1633,6 +1635,7 @@ moveloop()
pline("Be careful! New moon tonight.");
}
flags.friday13 = friday_13th();
flags.tm_hour = getlt()->tm_hour;
if (flags.friday13) {
pline("Watch out! Bad things can happen on Friday the 13th.");
change_luck(-1);
@ -1703,13 +1706,24 @@ moveloop()
/**************************************************/
for (mtmp = fmon; mtmp; mtmp = nxtmon){
nxtmon = mtmp->nmon;
if(mtmp->m_insight_level > u.uinsight
if(DEADMONSTER(mtmp))
continue;
if(mtmp->m_insight_level > Insight && !mtmp->mcan && mtmp->mtyp == PM_TRANSCENDENT_TETTIGON){
set_mon_data(mtmp, PM_UNMASKED_TETTIGON);
mtmp->m_insight_level -= 35;
newsym(x(mtmp), y(mtmp));
}
if(mtmp->m_insight_level > Insight
|| (mtmp->mtyp == PM_WALKING_DELIRIUM && BlockableClearThoughts)
|| (mtmp->mtyp == PM_STRANGER && !quest_status.touched_artifact)
|| ((mtmp->mtyp == PM_PUPPET_EMPEROR_XELETH || mtmp->mtyp == PM_PUPPET_EMPRESS_XEDALLI) && mtmp->mvar_yellow_lifesaved)
|| (mtmp->mtyp == PM_TWIN_SIBLING && (mtmp->mvar_twin_lifesaved || !(u.specialSealsActive&SEAL_YOG_SOTHOTH)))
){
if(!(mtmp->mtrapped && t_at(mtmp->mx, mtmp->my) && t_at(mtmp->mx, mtmp->my)->ttyp == VIVI_TRAP)){
if(mtmp->mvar1_tettigon_uncancel){
mtmp->mvar1_tettigon_uncancel = FALSE;
set_mcan(mtmp, FALSE);
}
insight_vanish(mtmp);
continue;
}
@ -1735,8 +1749,7 @@ moveloop()
mtmp->mamnesia = FALSE;
newsym(mtmp->mx, mtmp->my);
}
if (!DEADMONSTER(mtmp)
&& mon_attacktype(mtmp, AT_WDGZ)
if (mon_attacktype(mtmp, AT_WDGZ)
&& !(controlledwidegaze(mtmp->data) && (mtmp->mpeaceful || mtmp->mtame || helpless(mtmp)))
&& !(hideablewidegaze(mtmp->data) && hiddenwidegaze(mtmp))
&& !vivitrapped(mtmp)
@ -1778,6 +1791,8 @@ moveloop()
average_dogs();
for (mtmp = fmon; mtmp; mtmp = nxtmon){
nxtmon = mtmp->nmon;
if(DEADMONSTER(mtmp))
continue;
if(mtmp->mtyp == PM_HELLCAT){
if(!isdark(mtmp->mx,mtmp->my) && !mtmp->minvis){
mtmp->minvis = TRUE;
@ -1809,7 +1824,12 @@ moveloop()
newsym(mtmp->mx,mtmp->my);
}
}
if(mtmp->m_insight_level > u.uinsight
if(mtmp->m_insight_level > Insight && !mtmp->mcan && mtmp->mtyp == PM_TRANSCENDENT_TETTIGON){
set_mon_data(mtmp, PM_UNMASKED_TETTIGON);
mtmp->m_insight_level -= 35;
newsym(x(mtmp), y(mtmp));
}
if(mtmp->m_insight_level > Insight
|| (mtmp->mtyp == PM_WALKING_DELIRIUM && BlockableClearThoughts)
|| (mtmp->mtyp == PM_STRANGER && !quest_status.touched_artifact)
|| ((mtmp->mtyp == PM_PUPPET_EMPEROR_XELETH || mtmp->mtyp == PM_PUPPET_EMPRESS_XEDALLI) && mtmp->mvar_yellow_lifesaved)
@ -2604,10 +2624,24 @@ karemade:
messaged = TRUE;
TRANSCENDENCE_IMPURITY_UP(FALSE)
}
mark_mon_as_summoned(mtmp, (struct monst *)0, NightmareAware_Insanity+u.uinsight, 0);
mark_mon_as_summoned(mtmp, (struct monst *)0, NightmareAware_Insanity+Insight, 0);
}
}
}
if(u.uz.flags.walkers < 3 && rnd(100)+3 < u.uz.rage && roll_generic_flat_madness(TRUE) && rnd(98)+2 < Insight){
mtmp = makemon(&mons[PM_RAGE_WALKER], 0, 0, MM_ADJACENTOK);
if(mtmp){
make_rage_walker_polts(u.uz.rage+3);
u.uz.rage = 0;
}
int i;
int vort[] = {PM_ICE_VORTEX, PM_ENERGY_VORTEX, PM_FIRE_VORTEX};
for(i = d(3,3); i > 0; i--) makemon(&mons[ROLL_FROM(vort)], 0, 0, NO_MM_FLAGS);
int sphere[] = {PM_FREEZING_SPHERE, PM_FLAMING_SPHERE, PM_SHOCKING_SPHERE};
for(i = d(3,3); i > 0; i--) makemon(&mons[ROLL_FROM(sphere)], 0, 0, NO_MM_FLAGS);
}
else if(u.uz.rage > 0 && !rn2(u.uz.rage))
u.uz.rage--;
}
if(Infuture && !(Is_qstart(&u.uz) && !Race_if(PM_ANDROID)) && !rn2(35)){
struct monst* mtmp = makemon(&mons[PM_SEMBLANCE], rn1(COLNO-3,2), rn1(ROWNO-3,2), MM_ADJACENTOK);
@ -2751,6 +2785,7 @@ karemade:
&& !Race_if(PM_ANDROID) && !Race_if(PM_CLOCKWORK_AUTOMATON)
){
make_hallucinated(itimeout_incr(HHallucination, 100), TRUE, 0L);
IMPURITY_UP(u.uimp_rot)
if(roll_madness(MAD_SPORES)){//Second roll for more severe symptoms
make_stunned(itimeout_incr(HStun, 100), TRUE);
make_confused(itimeout_incr(HConfusion, 100), FALSE);
@ -2758,6 +2793,7 @@ karemade:
exercise(A_INT, FALSE);exercise(A_WIS, FALSE);exercise(A_CHA, FALSE);
exercise(A_INT, FALSE);exercise(A_WIS, FALSE);exercise(A_CHA, FALSE);
exercise(A_INT, FALSE);exercise(A_WIS, FALSE);exercise(A_CHA, FALSE);
IMPURITY_UP(u.uimp_rot)
}
else {
make_confused(itimeout_incr(HConfusion, 100), TRUE);
@ -2784,11 +2820,32 @@ karemade:
}
}
if(u.umadness&MAD_SCORPIONS){
change_usanity(-1, FALSE);
phantom_scorpions_sting(&youmonst);
if(!rn2(20)){
u.umadness &= ~MAD_SCORPIONS;
if(!u.uinvulnerable){
if(u.umadness&MAD_SCORPIONS){
change_usanity(-1, FALSE);
phantom_scorpions_sting(&youmonst);
if(!rn2(20)){
u.umadness &= ~MAD_SCORPIONS;
}
}
if(youmonst.mcaterpillars){
rot_caterpillars_bite(&youmonst);
if(!rn2(20)){
youmonst.mcaterpillars = FALSE;
}
}
if(youmonst.momud){
orc_mud_stabs(&youmonst);
if(!rn2(20)){
youmonst.momud = FALSE;
struct obj *daggers = mksobj(ORCISH_DAGGER, NO_MKOBJ_FLAGS);
curse(daggers);
daggers->opoisoned = OPOISON_ACID;
daggers->quan = d(3,8);
set_obj_size(daggers, MZ_TINY);
set_material_gm(daggers, BONE);
place_object(daggers, u.ux, u.uy);
}
}
}
@ -2877,6 +2934,8 @@ karemade:
/********************************/
/* once-per-turn things go here */
/********************************/
/* Update the hour of the day */
flags.tm_hour = getlt()->tm_hour;
/* Environment effects */
dust_storm();
/* Unseen monsters may take action */
@ -2996,7 +3055,7 @@ karemade:
if (flags.bypasses) clear_bypasses();
if(Glib) glibr();
if (uswapwep && !Weldproof && uswapwep->cursed) {
if (uswapwep && !Weldproof && uswapwep->cursed && u.twoweap) {
uswapwep->bknown = TRUE;
drop_uswapwep();
}
@ -3309,6 +3368,8 @@ karemade:
////////////////////////////////////////////////////////////////////////////////////////////////
for (mtmp = fmon; mtmp; mtmp = nxtmon){
nxtmon = mtmp->nmon;
if(DEADMONSTER(mtmp))
continue;
if(mtmp->mtyp == PM_HELLCAT){
if(!isdark(mtmp->mx,mtmp->my) && !mtmp->minvis){
mtmp->minvis = TRUE;
@ -3345,7 +3406,12 @@ karemade:
mtmp->mappearance = 0;
newsym(mtmp->mx, mtmp->my);
}
if(mtmp->m_insight_level > u.uinsight
if(mtmp->m_insight_level > Insight && !mtmp->mcan && mtmp->mtyp == PM_TRANSCENDENT_TETTIGON){
set_mon_data(mtmp, PM_UNMASKED_TETTIGON);
mtmp->m_insight_level -= 35;
newsym(x(mtmp), y(mtmp));
}
if(mtmp->m_insight_level > Insight
|| (mtmp->mtyp == PM_WALKING_DELIRIUM && BlockableClearThoughts)
|| (mtmp->mtyp == PM_STRANGER && !quest_status.touched_artifact)
|| ((mtmp->mtyp == PM_PUPPET_EMPEROR_XELETH || mtmp->mtyp == PM_PUPPET_EMPRESS_XEDALLI) && mtmp->mvar_yellow_lifesaved)
@ -3869,7 +3935,6 @@ find_preset_inherited(name)
if(artilist[i].gflags&ARTG_INHER
&& !Role_if(artilist[i].role) && !Pantheon_if(artilist[i].role)
&& !(urole.questarti == i)
&& (artilist[i].alignment == A_NONE || artilist[i].alignment == u.ualign.type)
){
aname = (char *)artilist[i].name;
if(!strncmpi(aname, "the ", 4)) aname += 4;
@ -4574,12 +4639,21 @@ printAttacks(buf, ptr)
if(attk->lev_req > 0){
Sprintf(eos(buf), "level %d+", attk->lev_req);
}
if(attk->lev_req > 0 && attk->ins_req > 0){
if(attk->lev_req > 0 && (attk->ins_req > 0 || attk->san_req != 0)){
Sprintf(eos(buf), " and ");
}
if(attk->ins_req > 0){
Sprintf(eos(buf), "%d+ [[insight]]", attk->ins_req);
}
if((attk->lev_req > 0 || attk->ins_req > 0) && attk->san_req != 0){
Sprintf(eos(buf), " and ");
}
if(attk->san_req < 0){
Sprintf(eos(buf), "<%d [[sanity]]", -1*attk->san_req);
}
if(attk->san_req > 0){
Sprintf(eos(buf), ">%d [[sanity]]", attk->san_req);
}
Sprintf(eos(buf), ")");
}
}
@ -4727,8 +4801,12 @@ struct monst *mon;
unbodied_heal(mon);
else if(mon->mux == u.uz.dnum && mon->muy == u.uz.dlevel && mon->mtyp == PM_ALKILITH)
alkilith_spawn(mon);
else if(mon->mux == u.uz.dnum && mon->muy == u.uz.dlevel && mon->mtyp == PM_INCARNATOR_MAGGOT)
incarnator_action(mon);
else if(mon->mux == u.uz.dnum && mon->muy == u.uz.dlevel && mon->mtyp == PM_MOUTH_OF_THE_GOAT)
goat_sacrifice(mon);
else if(mon->mux == u.uz.dnum && mon->muy == u.uz.dlevel && mon->mtyp == PM_RAGE_WALKER && (check_insight() || (!rn2(u.uevent.udemigod ? 25 : 50) && roll_generic_madness(TRUE))))
make_rage_walker_polts(u.uz.rage+3);
else if(mon->mtyp == PM_STRANGER)
palid_stranger(mon);
else if(mon->mtyp == PM_PUPPET_EMPEROR_XELETH || mon->mtyp == PM_PUPPET_EMPRESS_XEDALLI)
@ -4760,9 +4838,9 @@ struct monst *mon;
}
}
STATIC_OVL
void
alkilith_spawn(mon)
struct monst *mon;
alkilith_spawn(struct monst *mon)
{
struct monst *mtmp;
xchar xlocale, ylocale, xyloc;
@ -4807,6 +4885,59 @@ struct monst *mon;
}
}
void
incarnator_spawn(xchar xlocale, xchar ylocale, boolean death)
{
struct monst *mtmp;
const static int orcs[] = {PM_HILL_ORC, PM_MORDOR_ORC, PM_ORC_SHAMAN, PM_ORC_CAPTAIN, PM_URUK_HAI, PM_URUK_CAPTAIN, PM_MORDOR_ORC_ELITE, PM_MORDOR_SHAMAN, PM_MORDOR_MARSHAL};
int orc = ROLL_FROM(orcs);
if(mvitals[orc].died > rnd(death ? 200 : 500)){
mvitals[orc].died--;
mtmp = makemon(&mons[orc], xlocale, ylocale, MM_ADJACENTOK|MM_NOCOUNTBIRTH|NO_MINVENT);
if(mtmp){
const static int orc_weapons[] = {ORCISH_DAGGER, ORCISH_SHORT_SWORD, ORCISH_SPEAR};
struct obj *otmp;
mtmp->mpeaceful = 0;
set_malign(mtmp);
otmp = mongets(mtmp, ROLL_FROM(orc_weapons), NO_MKOBJ_FLAGS);
if(otmp){
set_material_gm(otmp, rn2(3) ? BONE : MINERAL);
}
otmp = mongets(mtmp, ORCISH_HELM, NO_MKOBJ_FLAGS);
if(otmp){
set_material_gm(otmp, rn2(3) ? BONE : MINERAL);
}
otmp = mongets(mtmp, rn2(2) ? ORCISH_CHAIN_MAIL : ORCISH_RING_MAIL, NO_MKOBJ_FLAGS);
if(otmp){
set_material_gm(otmp, rn2(3) ? BONE : MINERAL);
}
otmp = mongets(mtmp, ORCISH_SHIELD, NO_MKOBJ_FLAGS);
if(otmp){
set_material_gm(otmp, rn2(3) ? BONE : MINERAL);
}
}
}
}
STATIC_OVL
void
incarnator_action(struct monst *mon)
{
xchar xlocale, ylocale, xyloc;
xyloc = mon->mtrack[0].x;
xlocale = mon->mtrack[1].x;
ylocale = mon->mtrack[1].y;
if(xyloc == MIGR_EXACT_XY){
if(!mon->mpeaceful && !rn2(6)){
incarnator_spawn(xlocale, ylocale, FALSE);
}
}
}
STATIC_OVL
void
befouled_wraith(mon)
@ -5521,7 +5652,7 @@ struct monst *mon;
return;
}
/* The Stranger arrives from other levels and appears as soon as you gain enough insight */
if(mon->m_insight_level <= u.uinsight && quest_status.touched_artifact){
if(mon->m_insight_level <= Insight && quest_status.touched_artifact){
for(mtmp = migrating_mons; mtmp; mtmp = mtmp2){
mtmp2 = mtmp->nmon;
if (mtmp == mon) {
@ -5607,7 +5738,7 @@ struct monst *mon;
return;
}
/* Arrives from other levels (and from death) and appears as soon as you gain enough insight */
if(mon->m_insight_level <= u.uinsight && (!mon->mvar_yellow_lifesaved || !rn2(55))){
if(mon->m_insight_level <= Insight && (!mon->mvar_yellow_lifesaved || !rn2(55))){
mon->mvar_yellow_lifesaved = FALSE;
for(mtmp = migrating_mons; mtmp; mtmp = mtmp2){
mtmp2 = mtmp->nmon;
@ -5667,7 +5798,7 @@ struct monst *mon;
return;
}
/* Arrives from other levels and appears as soon as you gain enough insight */
if(mon->m_insight_level <= u.uinsight && u.specialSealsActive&SEAL_YOG_SOTHOTH){
if(mon->m_insight_level <= Insight && u.specialSealsActive&SEAL_YOG_SOTHOTH){
for(mtmp = migrating_mons; mtmp; mtmp = mtmp2){
mtmp2 = mtmp->nmon;
if (mtmp == mon) {
@ -6457,6 +6588,92 @@ struct monst *magr;
return;
}
STATIC_OVL void
dorotattack(struct monst *magr, struct attack * attk, int max, int mult)
{
struct monst *mdef;
extern const int clockwisex[8];
extern const int clockwisey[8];
int i = rnd(8),j;
int ax, ay;
boolean youagr = (magr == &youmonst);
boolean youdef;
boolean attacked = FALSE;
struct permonst *pa;
pa = youagr ? youracedata : magr->data;
//Attack all surrounding foes
for(j=8*mult;j>=1;j--){
ax = x(magr)+clockwisex[(i+j)%8];
ay = y(magr)+clockwisey[(i+j)%8];
if(youagr && u.ustuck && u.uswallow)
mdef = u.ustuck;
else if(!isok(ax, ay))
continue;
else if(onscary(ax, ay, magr))
continue;
else mdef = m_at(ax, ay);
if(u.ux == ax && u.uy == ay)
mdef = &youmonst;
if(!mdef)
continue;
if(rn2(2)) //1/2 chance to just skip anyway, stings are too powerful if they attack too frequently.
continue;
youdef = (mdef == &youmonst);
if(youagr && (mdef->mpeaceful))
continue;
if(youdef && (magr->mpeaceful))
continue;
if(youdef && Invulnerable)
continue;
if(!youagr && !youdef && ((mdef->mpeaceful == magr->mpeaceful) || (!!mdef->mtame == !!magr->mtame)))
continue;
if(youdef && u.uswallow)
continue;
if(!youdef && nonthreat(mdef))
continue;
if(attk->aatyp != AT_MAGC && attk->aatyp != AT_GAZE){
if((touch_petrifies(mdef->data)
|| mdef->mtyp == PM_MEDUSA)
&& (youagr ? !Stone_resistance : !resists_ston(magr))
) continue;
if(mdef->mtyp == PM_PALE_NIGHT)
continue;
}
xmeleehity(magr, mdef, attk, (struct obj **)0, -1, 0, FALSE);
// Limited attacks
if(--max <= 0)
return;
}
return;
}
void
dorotbite(struct monst *magr)
{
struct attack * attk;
struct attack symbiote = { AT_OBIT, AD_DISE, 1, 3 };
dorotattack(magr, &symbiote, 1, 1);
}
void
dorotsting(struct monst *magr)
{
struct attack * attk;
struct attack symbiote = { AT_STNG, AD_DISE, 1, 4 };
dorotattack(magr, &symbiote, 1, 1);
}
void
dokraken_mon(magr)
struct monst *magr;
@ -6843,6 +7060,146 @@ struct monst *magr;
}
void
dochain_lashes(magr)
struct monst *magr;
{
struct monst *mdef;
extern const int clockwisex[8];
extern const int clockwisey[8];
struct attack attkbuff = {AT_WEAP, AD_ELEC, 3, 6};
int i = rnd(8),j;
int ax, ay, n;
int chain_count = 0;
struct obj *ofirst;
struct obj *chain;
boolean youagr = (magr == &youmonst);
boolean youdef;
struct permonst *pa;
pa = youagr ? youracedata : magr->data;
ofirst = youagr ? invent : magr->minvent;
// Find chains etc:
for(chain = ofirst; chain; chain = chain->nobj){
if(chain->otyp == CHAIN)
chain_count+=4;
else if(chain->otyp == BALL)
chain_count++;
}
if(!chain_count)
return;
chain_count = rnd(chain_count);
for(chain = ofirst; chain; chain = chain->nobj){
if(chain->otyp == CHAIN)
chain_count-=4;
else if(chain->otyp == BALL)
chain_count--;
if(chain_count <= 0)
break;
}
if(!chain)
return;
for(j=8;j>=1;j--){
ax = x(magr)+clockwisex[(i+j)%8];
ay = y(magr)+clockwisey[(i+j)%8];
if(youagr && u.ustuck && u.uswallow)
mdef = u.ustuck;
else if(!isok(ax, ay))
continue;
else if(onscary(ax, ay, magr))
continue;
else mdef = m_at(ax, ay);
if(u.ux == ax && u.uy == ay)
mdef = &youmonst;
if(!mdef)
continue;
if(!rn2(3))
continue;
youdef = (mdef == &youmonst);
if(youagr && (mdef->mpeaceful))
continue;
if(youdef && (magr->mpeaceful))
continue;
if(youdef && Invulnerable)
continue;
if(!youagr && !youdef && ((mdef->mpeaceful == magr->mpeaceful) || (!!mdef->mtame == !!magr->mtame)))
continue;
if(youdef && u.uswallow)
continue;
if(!youdef && nonthreat(mdef))
continue;
if(mdef->mtyp == PM_PALE_NIGHT)
continue;
xmeleehity(magr, mdef, &attkbuff, &chain, +3, 0, FALSE);
}
}
void
make_rage_walker_polts(int rage)
{
struct obj *otmp, *nobj;
struct monst *polt;
int ox, oy;
boolean created = FALSE;
int otyp = ELVEN_BROADSWORD;
int otyp_index = 0;
int elven_weapon_types[] = {ELVEN_BROADSWORD, ELVEN_SHORT_SWORD, ELVEN_SPEAR, ELVEN_SICKLE, ELVEN_SCIMITAR, HIGH_ELVEN_WARSWORD, ELVEN_LANCE, ELVEN_MACE};
while(rage > 0){
if(!otyp){
polt = makemon(&mons[PM_POLTERGEIST], 0, 0, MM_ADJACENTOK|NO_MINVENT);
otmp = mksobj(ROLL_FROM(elven_weapon_types), NO_MKOBJ_FLAGS);
set_material_gm(otmp, IRON);
rage--;
if(otmp->spe < 3)
otmp->spe = 3;
curse(otmp);
mpickobj(polt, otmp);
m_dowear(polt, TRUE);
continue;
}
created = FALSE;
for(ox = 0; ox < COLNO && rage > 0; ox++){
for(oy = 0; oy < ROWNO && rage > 0; oy++){
otmp = level.objects[ox][oy];
if(!otmp)
continue;
for(; otmp; otmp = otmp->nexthere){
if(otmp->otyp == otyp){
polt = makemon(&mons[PM_POLTERGEIST], otmp->ox, otmp->oy, MM_ADJACENTOK|NO_MINVENT);
obj_extract_self(otmp);
set_material_gm(otmp, IRON);
rage--;
if(otmp->spe < 3)
otmp->spe = 3;
curse(otmp);
mpickobj(polt, otmp);
m_dowear(polt, TRUE);
created = TRUE;
break; //Break nexthere loop, continue location loop
}
}
}}
if(!created){
otyp_index++;
if(otyp_index < SIZE(elven_weapon_types)){
otyp = elven_weapon_types[otyp_index];
}
else otyp = 0;
}
}
doredraw(); //Just moved a bunch of items
}
#endif /* OVLB */
/*allmain.c*/

View file

@ -87,7 +87,7 @@ STATIC_DCL void FDECL(soul_crush_consequence, (struct obj *));
STATIC_DCL int FDECL(do_soul_coin, (struct obj *));
STATIC_DCL boolean FDECL(figurine_location_checks,
(struct obj *, coord *, BOOLEAN_P));
STATIC_DCL boolean NDECL(uhave_graystone);
STATIC_DCL boolean NDECL(uhave_usablestone);
STATIC_DCL int FDECL(do_carve_obj, (struct obj *));
STATIC_PTR int FDECL(pick_rune, (BOOLEAN_P));
STATIC_DCL void FDECL(describe_rune, (int));
@ -998,7 +998,7 @@ struct obj **obj_p;
if (vis){
signs_mirror();
}
if(u.uinsight >= 10 && !obj->oartifact){
if(Insight >= 10 && !obj->oartifact){
// if(wizard)
// pline("silver flame d: %d, l: %d, x:%d, y:%d", u.silver_flame_z.dnum, u.silver_flame_z.dlevel, u.s_f_x, u.s_f_y);
if(u.uz.dnum == u.silver_flame_z.dnum){
@ -2360,7 +2360,7 @@ use_chikage(struct obj *obj)
}
if(obj_is_material(obj, HEMARGYOS)){
if (u.uinsight < 13)
if (Insight < 13)
You("wipe the blood from your sword.");
else
You("wipe your blood from the sword.");
@ -2371,9 +2371,9 @@ use_chikage(struct obj *obj)
obj->oeroded3 = access_oeroded3(obj->ovar2_alt_erosion);
(void) stop_timer(REVERT_OBJECT, obj->timed);
} else {
if(u.uinsight < 27)
if(Insight < 27)
You("sheath your sword in your saya and draw it forth bloody.");
else if(u.uinsight < 50)
else if(Insight < 50)
You("sheath your sword in your %s and draw it forth bloody.", body_part(HEART));
else
You("sheath your sword in your shadow's %s and draw it forth bloody.", body_part(HEART));
@ -2939,7 +2939,7 @@ parasite_ok()
{
if(ABASE(A_INT) < 6)
return FALSE;
if(u.veil)
if(Insight < 10)
return FALSE;
if(parasite_research_ok())
return TRUE;
@ -2950,15 +2950,9 @@ int
defile_count()
{
int count = 0;
long i;
for(i = 1L; i <= PRESERVE_MAX; i = i<<1){
if(u.upreservation_upgrades&i)
count++;
}
for(i = 1L; i <= VAMPIRE_MAX; i = i<<1){
if(u.uvampire_upgrades&i)
count++;
}
count += preservation_count();
count += vampire_count();
count += rot_count();
return count;
}
@ -2980,7 +2974,19 @@ vampire_count()
int count = 0;
long i;
for(i = 1L; i <= VAMPIRE_MAX; i = i<<1){
if(u.upreservation_upgrades&i)
if(u.uvampire_upgrades&i)
count++;
}
return count;
}
int
rot_count()
{
int count = 0;
long i;
for(i = ROT_MIN; i <= ROT_MAX; i = i<<1){
if(u.urot_upgrades&i)
count++;
}
return count;
@ -2989,8 +2995,9 @@ vampire_count()
STATIC_OVL int
defile_score()
{
int count = defile_count()+1;
int count = vampire_count()+1;
count *= 4; //TIER_B 4
count += preservation_count()*2;//TIER_D 2
return (count*(count+1))/2;
}
@ -3002,6 +3009,71 @@ defile_research_ok()
return FALSE;
}
STATIC_OVL int
rot_score()
{
return rot_count()+1;
}
STATIC_OVL int
rot_crys()
{
int count = 0;
for(struct obj *obj = invent; obj; obj = obj->nobj){
if(obj->otyp == CRYSTAL && obj->obj_material == FLESH){
count += obj->quan;
}
}
return count;
}
STATIC_OVL void
use_rot_crys(int num)
{
int count = 0;
for(struct obj *obj = invent; obj; obj = obj->nobj){
if(obj->otyp == CRYSTAL && obj->obj_material == FLESH){
count += obj->quan;
}
}
if(count <= num){
struct obj *nobj;
for(struct obj *obj = invent; obj; obj = nobj){
nobj = obj->nobj;
if(obj->otyp == CRYSTAL && obj->obj_material == FLESH){
useupall(obj);
}
}
}
else {
int n;
while(num > 0){
n = rn2(count);
for(struct obj *obj = invent; obj; obj = obj->nobj){
if(obj->otyp == CRYSTAL && obj->obj_material == FLESH){
n -= obj->quan;
if(n < 1){
useup(obj);
count--;
num--;
break;
}
}
}
}
}
}
boolean
rot_research_ok()
{
if(rot_score() <= rot_crys())
return TRUE;
return FALSE;
}
boolean
defile_ok()
{
@ -3047,7 +3119,7 @@ reanimation_score()
boolean
reanimation_insight_ok()
{
if(u.uinsight < 60 && (reanimation_count()+1) * 10 > u.uinsight)
if(Insight < 60 && (reanimation_count()+1) * 10 > Insight)
return FALSE;
return TRUE;
}
@ -3766,7 +3838,7 @@ doresearch()
IMPURITY_UP(u.uimp_bodies) //dead bodies are impure
if(researchtype == A_CHAOTIC){
boolean pre_research = defile_research_ok();
pline("You drain and fractionate the corpses's blood, studying its impurities.");
pline("You drain and fractionate the corpse's blood, studying its impurities.");
IMPURITY_UP(u.uimp_blood)
u.udefilement_research += rnd(value);
otmp->odrained = TRUE;
@ -4061,7 +4133,7 @@ register struct obj *obj;
int otyp;
struct obj *glyph;
if(Upolyd && u.uinsight < 20){
if(Upolyd && Insight < 20){
You("can't get at your own brain right now!");
return;
}
@ -4197,7 +4269,7 @@ register struct obj *obj;
pline("The kit's medical supplies are exhausted.");
return;
}
if(u.uinsight < 10 || !(u.thoughts || skulls || parasites)){
if(Insight < 10 || !(u.thoughts || skulls || parasites)){
You("examine the drills in the kit, but have no idea how to use them!");
return;
}
@ -4400,6 +4472,10 @@ use_smithing_hammer(struct obj *obj)
return MOVE_CANCELLED;
}
struct obj *product = mksobj(picked, MKOBJ_NOINIT);
boolean product_bknown = metal_ingots->bknown && obj->bknown;
boolean inner_bknown;
boolean metal_ingots_blessed = metal_ingots->blessed, metal_ingots_cursed = metal_ingots->cursed;
boolean metal_ingots_2_blessed, metal_ingots_2_cursed;
set_material(product, metal_ingots->obj_material);
if(objects[picked].oc_class == ARMOR_CLASS){
if(yn("Size it to a particular creature?")=='y')
@ -4418,6 +4494,9 @@ use_smithing_hammer(struct obj *obj)
obfree(product, (struct obj *)0);
return MOVE_CANCELLED;
}
inner_bknown = obj->bknown && metal_ingots_2->bknown;
metal_ingots_2_blessed = metal_ingots_2->blessed;
metal_ingots_2_cursed = metal_ingots_2->cursed;
if(metal_ingots == metal_ingots_2){
if(picked == CANE || picked == WHIP_SAW){
product->ovar1_alt_mat = metal_ingots_2->obj_material;
@ -4509,40 +4588,36 @@ use_smithing_hammer(struct obj *obj)
}
}
if((metal_ingots->blessed && obj->cursed)
|| (obj->blessed && metal_ingots->cursed)
if((metal_ingots_blessed && obj->cursed)
|| (obj->blessed && metal_ingots_cursed)
){
product->blessed = FALSE;
product->cursed = FALSE;
}
else if(metal_ingots->blessed || obj->blessed){
else if(metal_ingots_blessed || obj->blessed){
product->blessed = TRUE;
product->cursed = FALSE;
}
else if(metal_ingots->cursed || obj->cursed){
else if(metal_ingots_cursed || obj->cursed){
product->blessed = FALSE;
product->cursed = TRUE;
}
if(sword){
struct obj *ingots = metal_ingots_2 ? metal_ingots_2 : metal_ingots;
sword->bknown = ingots->bknown;
sword->dknown = TRUE;
sword->sknown = TRUE;
if((ingots->blessed && obj->cursed)
|| (obj->blessed && ingots->cursed)
if((metal_ingots_2_blessed && obj->cursed)
|| (obj->blessed && metal_ingots_2_cursed)
){
sword->blessed = FALSE;
sword->cursed = FALSE;
}
else if(ingots->blessed || obj->blessed){
else if(metal_ingots_2_blessed || obj->blessed){
sword->blessed = TRUE;
sword->cursed = FALSE;
}
else if(ingots->cursed || obj->cursed){
else if(metal_ingots_2_cursed || obj->cursed){
sword->blessed = FALSE;
sword->cursed = TRUE;
}
sword->bknown = ingots->bknown;
sword->bknown = inner_bknown;
sword->dknown = TRUE;
sword->sknown = TRUE;
}
@ -4561,7 +4636,10 @@ use_smithing_hammer(struct obj *obj)
exercise(A_STR, TRUE);
exercise(A_STR, TRUE);
exercise(A_DEX, TRUE);
product->bknown = product_bknown;
}
product->dknown = TRUE;
product->sknown = TRUE;
use_skill(P_SMITHING, 2);
product = hold_another_object(product, "You can't pick up %s.",
@ -4946,7 +5024,7 @@ struct obj **optr;
return MOVE_STANDARD;
}
if(rnd(20) > u.uinsight || u.uen < EMON(*optr)->m_lev){
if(rnd(20) > Insight || u.uen < EMON(*optr)->m_lev){
You_cant("maintain your focus on the crystal!");
if(save_vs_sanloss())
change_usanity(-1, FALSE);
@ -4992,7 +5070,7 @@ coord *cc;
if(oinv->otyp == TREPHINATION_KIT || ensouled_item(oinv))
continue;
otmp = duplicate_obj(oinv);
otmp = duplicate_obj(oinv, TRUE);
obj_extract_self(otmp);
if(otmp->oclass == SCROLL_CLASS){
otmp = poly_obj(otmp, SCR_BLANK_PAPER);
@ -5351,7 +5429,7 @@ struct obj *sensor;
for(; pobj; pobj = pobj->nexthere){
/* target object has now been "seen (up close)" */
pobj->dknown = 1;
if (Is_container(pobj) || pobj->otyp == STATUE || (pobj->otyp == CRYSTAL_SKULL && u.uinsight >= 20)) {
if (Is_container(pobj) || pobj->otyp == STATUE || (pobj->otyp == CRYSTAL_SKULL && Insight >= 20)) {
if (!pobj->cobj)
pline("%s empty.", Tobjnam(pobj, "are"));
else {
@ -5372,7 +5450,7 @@ struct obj *sensor;
for(; pobj; pobj = pobj->nexthere){
/* target object has now been "seen (up close)" */
pobj->dknown = 1;
if (Is_container(pobj) || pobj->otyp == STATUE || (pobj->otyp == CRYSTAL_SKULL && u.uinsight >= 20)) {
if (Is_container(pobj) || pobj->otyp == STATUE || (pobj->otyp == CRYSTAL_SKULL && Insight >= 20)) {
if (!pobj->cobj)
pline("%s empty.", Tobjnam(pobj, "are"));
else {
@ -5740,7 +5818,7 @@ struct obj *hypo;
if(amp->cursed){
if(u.usanity > 0)
change_usanity(-1, FALSE);
if(u.uinsight > 0)
if(Insight > 0)
change_uinsight(-1);
exercise(A_WIS, FALSE);
exercise(A_INT, FALSE);
@ -6042,8 +6120,8 @@ struct obj **optr;
else if (Stunned)
what = "while stunned";
else if (u.uswallow)
what = is_animal(u.ustuck->data) ? "while swallowed" :
"while engulfed";
what = (naoid(u.ustuck->data) || is_whirly(u.ustuck->data)) ? "while engulfed" :
"while swallowed";
else if (Underwater)
what = "underwater";
else if (Levitation)
@ -7366,6 +7444,186 @@ struct obj *obj;
return MOVE_STANDARD;
}
STATIC_OVL int
use_crysalis(struct obj *obj)
{
winid tmpwin;
anything any;
any.a_void = 0; /* zero out all bits */
menu_item *selected;
int n = 0;
char ch = 'a';
int accident_n = 0;
tmpwin = create_nhwindow(NHW_MENU);
start_menu(tmpwin);
if(!rot_research_ok()){
pline("Nothing happens.");
return MOVE_CANCELLED;
}
any.a_int = 1;
if(!check_rot(ROT_VOMIT)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Vomit rot", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 2;
if(!check_rot(ROT_WINGS)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Rot wings", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 3;
if(check_rot(ROT_WINGS) && !check_rot(ROT_CLONE)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Send forth a phantom duplicate", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 4;
if(!check_rot(ROT_TRUCE)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Become uninteresting to beings of rot", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 5;
if(!check_rot(ROT_KIN)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Become followed by the kindred of rot", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 6;
if(!check_rot(ROT_FEAST)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Feast on injury and destruction", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 7;
if(!check_rot(ROT_CENT)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Seek saprovorous imortality", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 8;
if(!check_rot(ROT_STING)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Rot stinger", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
ch++;
any.a_int = 9;
if(!check_rot(ROT_SPORES)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Rot spores", MENU_UNSELECTED);
if(!rn2(n))
accident_n = any.a_int;
}
if(!n){
destroy_nhwindow(tmpwin);
return MOVE_CANCELLED;
}
boolean override = FALSE;
if(rn2(n) && rn2(n))
override = TRUE;
end_menu(tmpwin, "Pick an upgrade to attempt to manifest:");
n = select_menu(tmpwin, PICK_ONE, &selected);
destroy_nhwindow(tmpwin);
if(n <= 0){
return MOVE_CANCELLED;
}
n = selected[0].item.a_int;
free(selected);
if(override)
n = accident_n;
use_rot_crys(rot_score());
if(n == 1){
add_rot(ROT_VOMIT);
pline("You feel a little nauseated.");
}
if(n == 2){
add_rot(ROT_WINGS);
pline((Race_if(PM_HALF_DRAGON) && u.ulevel >= 14) || has_wings(youracedata) ? "Your wings rot!" : "Wings of rot grow from your back!");
HFlying |= FROMOUTSIDE;
float_up();
spoteffects(FALSE);
}
if(n == 3){
add_rot(ROT_CLONE);
pline("Strange butterflies hatch from your wings and dance overhead.");
}
if(n == 4){
add_rot(ROT_TRUCE);
You("become uninteresting to the beings of rot.");
}
if(n == 5){
add_rot(ROT_KIN);
You("are followed by the kin of rot.");
}
if(n == 6){
add_rot(ROT_FEAST);
You("feast on injury and destruction.");
}
if(n == 7){
add_rot(ROT_CENT);
pline("A monstrous centipede bores out of your body.");
}
if(n == 8){
add_rot(ROT_STING);
pline("A monstrous scorpion stinger tears loose from your flesh.");
}
if(n == 9){
add_rot(ROT_SPORES);
pline("Puffball mushrooms errupt from your skin.");
}
// u.udefilement_research += rn2(defile_score());
u.mental_scores_down++;
ABASE(A_INT) -= 1;
// check_brainlessness();
ABASE(A_INT) = max(ABASE(A_INT), ATTRMIN(A_INT));
AMAX(A_INT) = max(AMAX(A_INT)-1, ATTRMIN(A_INT)); //Can't be recovered via restore ability
ABASE(A_CON) = max(ABASE(A_CON)-1, ATTRMIN(A_CON));
AMAX(A_CON) = max(AMAX(A_CON)-1, ATTRMIN(A_CON));
return MOVE_STANDARD;
}
STATIC_OVL int
use_dilithium(obj)
struct obj *obj;
@ -7540,8 +7798,7 @@ use_doll(obj)
flags.botl = 1;
}
healup(0, 0, TRUE, FALSE);
if (Stoned) fix_petrification();
if (Golded) fix_petrification();
if (Stoned || Golded || Salted) fix_petrification();
res = MOVE_STANDARD;
pline("You feel very healthy.");
give_intrinsic(GOOD_HEALTH, 100L);
@ -8404,13 +8661,16 @@ do_break_wand(obj)
}
STATIC_OVL boolean
uhave_graystone()
uhave_usablestone()
{
register struct obj *otmp;
for(otmp = invent; otmp; otmp = otmp->nobj)
for(otmp = invent; otmp; otmp = otmp->nobj){
if(is_graystone(otmp))
return TRUE;
if(otmp->otyp == CRYSTAL && otmp->obj_material == FLESH)
return TRUE;
}
return FALSE;
}
@ -9843,6 +10103,7 @@ upgradeImpArmor()
return MOVE_CANCELLED;
}
switch(upitm->otyp){
case ENCOUNTER_EXOSKELETON:
case AMULET_OF_MAGICAL_BREATHING:
STANDARD_UPGRADE(IEA_NOBREATH, "life-support subsystem")
break;
@ -9901,6 +10162,7 @@ upgradeImpArmor()
case RIN_INCREASE_DAMAGE:
STANDARD_UPGRADE(IEA_INC_DAM, "microtargetting servos")
break;
case ENCOUNTER_EXOSKELETON:
case WAN_MAGIC_MISSILE:
STANDARD_UPGRADE(IEA_BOLTS, "missile projectors")
break;
@ -9946,6 +10208,7 @@ upgradeImpArmor()
case AMULET_VERSUS_SICKNESS:
case HEALER_UNIFORM:
case BODYGLOVE:
case ENCOUNTER_EXOSKELETON:
STANDARD_UPGRADE(IEA_SICK_RES, "sealed bodyglove")
break;
case CLOAK_OF_PROTECTION:
@ -10003,6 +10266,7 @@ upgradeImpArmor()
STANDARD_UPGRADE(IEA_TELEPORT, "blink subsystem")
break;
case KICKING_BOOTS:
case ENCOUNTER_EXOSKELETON:
STANDARD_UPGRADE(IEA_KICKING, "concussive impactors")
break;
default:
@ -10188,7 +10452,7 @@ doapply()
if(check_capacity((char *)0)) return MOVE_CANCELLED;
if (carrying(POT_OIL) || carrying(POT_BLOOD) || uhave_graystone() || carrying(ROCK))
if (carrying(POT_OIL) || carrying(POT_BLOOD) || uhave_usablestone() || carrying(ROCK))
Strcpy(class_list, tools_too);
else
Strcpy(class_list, tools);
@ -10500,7 +10764,7 @@ doapply()
}
}break;
case NIGHTMARE_S_BULLET_MOLD:{
You("jab the bullet mold into your %s!", u.uinsight < 18 ? body_part(LEG) : body_part(HEAD));
You("jab the bullet mold into your %s!", Insight < 18 ? body_part(LEG) : body_part(HEAD));
if(u.uexp > 7 && *hp(&youmonst) > 3*(*hpmax(&youmonst))/10){
if(uwep && (uwep->otyp == TWINGUN_SHANTA || uwep->otyp == SHANTA_PATA)){
if(uwep->ovar1_last_blooded > moves - 10)
@ -10961,6 +11225,11 @@ doapply()
case ANTIMAGIC_RIFT:
res = use_rift(obj);
break;
case CRYSTAL:
if(obj->obj_material == FLESH)
res = use_crysalis(obj);
else res = MOVE_CANCELLED;
break;
case VITAL_SOULSTONE:
if (objects[obj->otyp].oc_name_known)
res = use_vital(obj);
@ -11167,6 +11436,7 @@ unfixable_trouble_count(is_horn)
if (Stoned) unfixable_trbl++;
if (Golded) unfixable_trbl++;
if (Salted) unfixable_trbl++;
if (Strangled) unfixable_trbl++;
if (Panicking) unfixable_trbl++;
if (StumbleBlind) unfixable_trbl++;

View file

@ -20,7 +20,6 @@ extern struct attack grapple;
//duplicates of other functions, created due to problems with the linker
STATIC_DCL void NDECL(cast_protection);
STATIC_DCL int NDECL(throweffect);
STATIC_DCL void FDECL(awaken_monsters,(int));
STATIC_DCL void FDECL(do_item_blast, (int));
@ -2418,9 +2417,9 @@ struct obj *obj;
return (obj && (
(obj->oartifact && arti_attack_prop(obj, ARTA_PHASING)) ||
has_spear_point(obj, OBSIDIAN) ||
(check_oprop(obj, OPROP_ELFLW) && u.uinsight >= 22) ||
(check_oprop(obj, OPROP_ELFLW) && Insight >= 22) ||
(check_oprop(obj, OPROP_PHSEW)) ||
(check_oprop(obj, OPROP_RLYHW) && u.uinsight >= 40) ||
(check_oprop(obj, OPROP_RLYHW) && Insight >= 40) ||
((obj->oartifact == ART_HOLY_MOONLIGHT_SWORD) && obj->lamplit)
));
}
@ -3413,6 +3412,7 @@ get_premium_heart_multiplier()
if (Sick) multiplier++;
if (Stoned) multiplier++;
if (Golded) multiplier++;
if (Salted) multiplier++;
if (Strangled) multiplier++;
if (Vomiting) multiplier++;
if (Slimed) multiplier++;
@ -3735,7 +3735,7 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
if (!rn2(4)) (void) destroy_item(mdef, SCROLL_CLASS, AD_FIRE);
if (!rn2(7)) (void) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
}
if (youdefend && Slimed) burn_away_slime();
if (youdefend) burn_away_slime();
if (youdefend && FrozenAir) melt_frozen_air();
// if(youdef ? (hates_unholy(youracedata)) : (hates_unholy_mon(mdef))){
if(youdefend ? !Fire_resistance : !resists_fire(mdef)){
@ -4557,7 +4557,7 @@ int * truedmgptr;
}
}
if(check_oprop(otmp, OPROP_ELFLW)){
int level = u.uinsight >= 33 ? 2 : u.uinsight >= 11 ? 1 : 0;
int level = Insight >= 33 ? 2 : Insight >= 11 ? 1 : 0;
int bonus = 0;
if(youagr){
if(u.ualign.record < -3){
@ -4736,18 +4736,18 @@ int * truedmgptr;
bonus = rnd(15);
bonus += otmp->spe;
}
if(u.uinsight >= 36){//Works on all monsters, even mindless ones
if(Insight >= 36){//Works on all monsters, even mindless ones
*truedmgptr += basedmg + otmp->spe + bonus;
}
else if(youdef && !Tele_blind && (Blind_telepat || u.uinsight >= 6 || !rn2(4))){
else if(youdef && !Tele_blind && (Blind_telepat || Insight >= 6 || !rn2(4))){
*truedmgptr += basedmg + otmp->spe + bonus;
}
else if(!youdef && !mindless_mon(mdef) && (mon_resistance(mdef,TELEPAT) || u.uinsight >= 6 || !rn2(4))){
else if(!youdef && !mindless_mon(mdef) && (mon_resistance(mdef,TELEPAT) || Insight >= 6 || !rn2(4))){
*truedmgptr += basedmg + otmp->spe + bonus;
}
}
if(check_oprop(otmp, OPROP_GSSDW)){
int power = youagr ? min(u.uinsight, u.usanity) : magr ? magr->m_lev : 0;
int power = youagr ? min(Insight, u.usanity) : magr ? magr->m_lev : 0;
//"Crit" chance
if(power > 0){
int multiplier = power >= 50 ? 3 : power >= 25 ? 2 : 1;
@ -4809,9 +4809,9 @@ int * truedmgptr;
}
if(mercy_blade_prop(otmp)){
if(!u.veil && !Magic_res(mdef)){
int mod = min(u.uinsight, 50);
if(youagr && u.uinsight > 25)
mod += min((u.uinsight-25)/2, ACURR(A_CHA));
int mod = min(Insight, 50);
if(youagr && Insight > 25)
mod += min((Insight-25)/2, ACURR(A_CHA));
*truedmgptr += basedmg*mod/50;
}
}
@ -4897,7 +4897,7 @@ int dieroll;
int original_truedmgptr = *truedmgptr;
if(otmp->obj_material == MERCURIAL && magr && mlev(magr) > 20 && (
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL)
(youagr && Insight > 20 && YOU_MERC_SPECIAL)
|| (!youagr && insightful(magr->data) && is_chaotic_mon(magr))
)){
if(is_streaming_merc(otmp)){
@ -4928,11 +4928,11 @@ int dieroll;
if(youagr){
if(ACURR(abil[i]) >= 15){
if(ACURR(abil[i]) >= 25)
dsize = (u.uinsight + u.usanity)/10;
dsize = (Insight + u.usanity)/10;
else if(ACURR(abil[i]) >= 18)
dsize = (u.uinsight + u.usanity)/20;
dsize = (Insight + u.usanity)/20;
else /*>= 15*/
dsize = (u.uinsight + u.usanity)/40;
dsize = (Insight + u.usanity)/40;
*truedmgptr += rnd(dsize);
}
@ -4946,10 +4946,10 @@ int dieroll;
else if(is_chained_merc(otmp)){
if(youdef){
if(u.uen > 0){
u.uen -= youagr ? u.uinsight/10 : mlev(magr)/10;
u.uen -= youagr ? Insight/10 : mlev(magr)/10;
flags.botl = 1;
}
if((dieroll == 1 && (youagr ? u.uinsight : mlev(magr)) >= 40) || u.uen < 0){
if((dieroll == 1 && (youagr ? Insight : mlev(magr)) >= 40) || u.uen < 0){
if(u.uen > 0){
u.uen = max(u.uen-400, 0);
flags.botl = 1;
@ -4957,8 +4957,8 @@ int dieroll;
}
}
else {
mdef->mspec_used += rnd(youagr ? u.uinsight/10 : mlev(magr)/10);
if(dieroll == 1 && (youagr ? u.uinsight : mlev(magr)) >= 40)
mdef->mspec_used += rnd(youagr ? Insight/10 : mlev(magr)/10);
if(dieroll == 1 && (youagr ? Insight : mlev(magr)) >= 40)
set_mcan(mdef, TRUE);
}
int wt = youagr ? inv_weight() : curr_mon_load(magr);
@ -5044,7 +5044,7 @@ boolean lethal;
int temp_encouraged = u.uencouraged;
if(lethal)
pline("The blade lodges in your %s!", body_part(SPINE));
u.uencouraged = (youagr ? (u.uinsight + ACURR(A_CHA))/5 : magr->m_lev/5) + spe;
u.uencouraged = (youagr ? (Insight + ACURR(A_CHA))/5 : magr->m_lev/5) + spe;
flags.forcefight = TRUE;
xattacky(mdef, target, x(target), y(target));
flags.forcefight = FALSE;
@ -5054,7 +5054,7 @@ boolean lethal;
int temp_encouraged = mdef->encouraged;
boolean friendly_fire;
long result;
mdef->encouraged = (youagr ? (u.uinsight + ACURR(A_CHA))/5 : magr->m_lev/5) + spe;
mdef->encouraged = (youagr ? (Insight + ACURR(A_CHA))/5 : magr->m_lev/5) + spe;
if(lethal)
pline("The blade lodges in %s %s!", s_suffix(mon_nam(mdef)), mbodypart(mdef, SPINE));
friendly_fire = !mm_grudge(mdef, target, FALSE);
@ -5144,7 +5144,7 @@ struct monst *magr;
target = targets[rn2(count)];
if(youdef){
int temp_encouraged = u.uencouraged;
u.uencouraged = (youagr ? (u.uinsight + ACURR(A_CHA))/5 : magr->m_lev/5);
u.uencouraged = (youagr ? (Insight + ACURR(A_CHA))/5 : magr->m_lev/5);
flags.forcefight = TRUE;
xattacky(mdef, target, x(target), y(target));
flags.forcefight = FALSE;
@ -5152,7 +5152,7 @@ struct monst *magr;
}
else {
int temp_encouraged = mdef->encouraged;
mdef->encouraged = (youagr ? (u.uinsight + ACURR(A_CHA))/5 : magr->m_lev/5);
mdef->encouraged = (youagr ? (Insight + ACURR(A_CHA))/5 : magr->m_lev/5);
xattacky(mdef, target, x(target), y(target));
mdef->encouraged = temp_encouraged;
}
@ -5189,6 +5189,8 @@ boolean direct_weapon;
if (!rn2(3)) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
if (!rn2(3)) destroy_item(mdef, POTION_CLASS, AD_FIRE);
}
if (youdef) burn_away_slime();
if (youdef && FrozenAir) melt_frozen_air();
}
if (otmp->otyp == MAGIC_TORCH && otmp->lamplit){
if (!Fire_res(mdef)) {
@ -5242,7 +5244,7 @@ boolean direct_weapon;
}
}
}
if (otmp->otyp == TOOTH && u.uinsight >= 20 && otmp->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(otmp, magr, ETRAIT_FOCUS_FIRE)){
if (otmp->otyp == TOOTH && Insight >= 20 && otmp->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(otmp, magr, ETRAIT_FOCUS_FIRE)){
if(otmp->ovar1_tooth_type == MAGMA_TOOTH){
if (!Fire_res(mdef)) {
if (species_resists_cold(mdef))
@ -5347,21 +5349,21 @@ boolean direct_weapon;
*truedmgptr += bonus;
}
if(otmp->otyp == DISKOS && u.uinsight >= 15 && !on_level(&spire_level,&u.uz)){
if(otmp->otyp == DISKOS && Insight >= 15 && !on_level(&spire_level,&u.uz)){
int bonus = 0;
//Holy/Unholy energy attack
if(u.uinsight >= 50){
if(Insight >= 50){
bonus += d(3, (mdef && bigmonst(pd)) ?
objects[otmp->otyp].oc_wldam.oc_damd :
objects[otmp->otyp].oc_wsdam.oc_damd);
bonus += (mdef && bigmonst(pd)) ?
(objects[otmp->otyp].oc_wldam.oc_damd) :
(objects[otmp->otyp].oc_wsdam.oc_damd);
} else if(u.uinsight >= 45){
} else if(Insight >= 45){
bonus += d(3, (mdef && bigmonst(pd)) ?
objects[otmp->otyp].oc_wldam.oc_damd :
objects[otmp->otyp].oc_wsdam.oc_damd);
} else if(u.uinsight >= 20){
} else if(Insight >= 20){
bonus += d(2, (mdef && bigmonst(pd)) ?
objects[otmp->otyp].oc_wldam.oc_damd :
objects[otmp->otyp].oc_wsdam.oc_damd);
@ -5552,7 +5554,7 @@ boolean direct_weapon;
int studystack = 0;
if(youagr){
if(active_glyph(BEASTS_EMBRACE))
insight_mod = 30*pow(.97,u.uinsight);
insight_mod = 30*pow(.97,Insight);
}
else if(magr){
if(magr->mcrazed)
@ -5581,22 +5583,22 @@ boolean direct_weapon;
mdef->mstdy += 3;
}
}
if(otmp->otyp == MOON_AXE && otmp->ovar1_moonPhase == HUNTING_MOON && u.uinsight >= 5){
if(otmp->otyp == MOON_AXE && otmp->ovar1_moonPhase == HUNTING_MOON && Insight >= 5){
if(youdef){
u.ustdy += rnd(u.uinsight/5);
u.ustdy += rnd(Insight/5);
} else if(mdef){
mdef->mstdy += rnd(u.uinsight/5);
mdef->mstdy += rnd(Insight/5);
}
}
//Banishes summoned monsters
if(otmp->otyp == CHURCH_HAMMER && !youdef && mdef && get_mx(mdef, MX_ESUM)){
*truedmgptr += 10*u.uinsight;
*truedmgptr += 10*Insight;
}
//Flogging raises sanity (note: this is "backwards" on purpose)
if((otmp->otyp == CANE && !youdef && mdef && is_serration_vulnerable(mdef) && u.uinsight >= rnd(100))
|| (otmp->otyp == WHIP_SAW && !youdef && mdef && hates_holy_mon(mdef) && u.uinsight >= rnd(100))
|| (otmp->otyp == CHURCH_SHORTSWORD && (resist_pierce(mdef->data) && !resist_slash(mdef->data)) && u.uinsight >= rnd(100))
if((otmp->otyp == CANE && !youdef && mdef && is_serration_vulnerable(mdef) && Insight >= rnd(100))
|| (otmp->otyp == WHIP_SAW && !youdef && mdef && hates_holy_mon(mdef) && Insight >= rnd(100))
|| (otmp->otyp == CHURCH_SHORTSWORD && (resist_pierce(mdef->data) && !resist_slash(mdef->data)) && Insight >= rnd(100))
){
int reglevel = san_threshhold() + otmp->spe;
if(u.usanity < reglevel){
@ -5612,22 +5614,22 @@ boolean direct_weapon;
change_usanity(1, FALSE);
}
}
if(otmp->otyp == ISAMUSEI && u.uinsight >= 10 && !on_level(&spire_level,&u.uz) && mdef){
if(otmp->otyp == ISAMUSEI && Insight >= 10 && !on_level(&spire_level,&u.uz) && mdef){
if(youdef || !resist(mdef, WEAPON_CLASS, 0, TRUE)){
int factor = 20;
if(u.uinsight >= 70){
if(Insight >= 70){
factor = 4;
}
else if(u.uinsight >= 57){
else if(Insight >= 57){
factor = 5;
}
else if(u.uinsight >= 45){
else if(Insight >= 45){
factor = 6;
}
else if(u.uinsight >= 33){
else if(Insight >= 33){
factor = 8;
}
else if(u.uinsight >= 22){
else if(Insight >= 22){
factor = 10;
}
if(Half_phys(mdef))
@ -5637,15 +5639,15 @@ boolean direct_weapon;
}
}
if(otmp->otyp == PINCER_STAFF && u.uinsight >= 10 && !on_level(&spire_level,&u.uz) && mdef){
if(otmp->otyp == PINCER_STAFF && Insight >= 10 && !on_level(&spire_level,&u.uz) && mdef){
if(otmp->ovar1_pincerTarget == mdef->m_id){
*plusdmgptr += basedmg;
if (u.uinsight >= 20 && otmp->oartifact && otmp->oartifact == ART_FALLINGSTAR_MANDIBLES && !Magic_res(mdef)){
if (Insight >= 20 && otmp->oartifact && otmp->oartifact == ART_FALLINGSTAR_MANDIBLES && !Magic_res(mdef)){
*truedmgptr += reduce_dmg(mdef, d(1, 12), FALSE, TRUE);
}
}
else otmp->ovar1_pincerTarget = mdef->m_id;
if(u.uinsight >= 50){
if(Insight >= 50){
struct obj *armor = some_armor(mdef);
if(!armor){
*plusdmgptr += basedmg;
@ -5675,7 +5677,7 @@ boolean direct_weapon;
if(youagr)
*plusdmgptr += u.uimpurity/2;
if(!u.veil && !Magic_res(mdef)){
int mod = min(u.uinsight, 100);
int mod = min(Insight, 100);
*truedmgptr += basedmg*mod/100;
}
if(has_blood_mon(mdef) && direct_weapon){
@ -5693,7 +5695,7 @@ boolean direct_weapon;
if(youagr)
*plusdmgptr += u.uimpurity/4;
if(!u.veil && !Magic_res(mdef)){
int mod = min(u.uinsight/2, 100);
int mod = min(Insight/2, 100);
*truedmgptr += basedmg*mod/100;
}
if(has_blood_mon(mdef) && direct_weapon){
@ -6382,7 +6384,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
}
pline_The("%s %s %s %s%c",
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL) ? "many-colored" : "paper-thin",
(youagr && Insight > 20 && YOU_MERC_SPECIAL) ? "many-colored" : "paper-thin",
wepdesc,
vtense(wepdesc, "hit"),
hittee, !spec_dbon_applies ? '.' : '!');
@ -6413,7 +6415,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
else if(is_chained_merc(otmp)){
pline_The("%s %s %s %s%c",
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL) ? "dense" : "shimmering",
(youagr && Insight > 20 && YOU_MERC_SPECIAL) ? "dense" : "shimmering",
wepdesc,
vtense(wepdesc, "hit"),
hittee, !spec_dbon_applies ? '.' : '!');
@ -6421,7 +6423,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
else if(is_kinstealing_merc(otmp)){
pline_The("%s %s %s %s%c",
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL) ? "grasping" : "jagged",
(youagr && Insight > 20 && YOU_MERC_SPECIAL) ? "grasping" : "jagged",
wepdesc,
vtense(wepdesc, "hit"),
hittee, !spec_dbon_applies ? '.' : '!');
@ -6449,7 +6451,7 @@ boolean printmessages; /* print generic elemental damage messages */
if (!rn2(4)) (void) destroy_item(mdef, SCROLL_CLASS, AD_FIRE);
if (!rn2(7)) (void) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
}
if (youdef && Slimed) burn_away_slime();
if (youdef) burn_away_slime();
if (youdef && FrozenAir) melt_frozen_air();
}
if(oartifact == ART_ARYVELAHR_KERYM &&
@ -6471,12 +6473,12 @@ boolean printmessages; /* print generic elemental damage messages */
if (!rn2(4)) (void) destroy_item(mdef, SCROLL_CLASS, AD_FIRE);
if (!rn2(7)) (void) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
}
if (youdef && Slimed) burn_away_slime();
if (youdef) burn_away_slime();
if (youdef && FrozenAir) melt_frozen_air();
}
if(check_oprop(otmp, OPROP_ELFLW)){
static boolean suddenly = TRUE;
if(u.uinsight >= 56 &&
if(Insight >= 56 &&
(yellow_monster(mdef) || mdef->mfaction == YELLOW_FACTION)
){
/*Note: magic green flames, damage through fire res but still check invent fire res to see if inventory should burn*/
@ -6497,7 +6499,7 @@ boolean printmessages; /* print generic elemental damage messages */
if (!rn2(4)) (void) destroy_item(mdef, SCROLL_CLASS, AD_FIRE);
if (!rn2(7)) (void) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
}
if (youdef && Slimed) burn_away_slime();
if (youdef) burn_away_slime();
if (youdef && FrozenAir) melt_frozen_air();
}
else suddenly = TRUE;
@ -6689,7 +6691,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
//sunlight code adapted from Sporkhack
if ((pd->mtyp == PM_GREMLIN || pd->mtyp == PM_HUNTING_HORROR)
&& (arti_bright(otmp) || (check_oprop(otmp, OPROP_ELFLW) && u.uinsight >= 33 && u.ualign.record > 3))
&& (arti_bright(otmp) || (check_oprop(otmp, OPROP_ELFLW) && Insight >= 33 && u.ualign.record > 3))
){
wepdesc = oartifact ? artilist[oartifact].name : simple_typename(otmp->otyp);
/* Sunlight kills gremlins */
@ -6707,7 +6709,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
}
if ((pd->mlet == S_TROLL)
&& (arti_bright(otmp) || (check_oprop(otmp, OPROP_ELFLW) && u.uinsight >= 33 && u.ualign.record > 3))
&& (arti_bright(otmp) || (check_oprop(otmp, OPROP_ELFLW) && Insight >= 33 && u.ualign.record > 3))
){
wepdesc = oartifact ? artilist[oartifact].name : simple_typename(otmp->otyp);
/* Sunlight turns trolls to stone (Middle-earth) */
@ -6769,7 +6771,7 @@ boolean printmessages; /* print generic elemental damage messages */
experts += 2;
}
}
else if(m_martial_skill(magr->data) == P_EXPERT && !magr->mformication && !magr->mscorpions){
else if(m_martial_skill(magr->data) == P_EXPERT && !magr->mformication && !magr->mscorpions && !magr->mcaterpillars){
experts = 10;
}
/* Masamune rewards skill */
@ -7526,14 +7528,14 @@ boolean printmessages; /* print generic elemental damage messages */
/*level drain*/
if ((check_oprop(otmp, OPROP_DRANW)
|| (otmp->otyp == TOOTH && otmp->ovar1_tooth_type == VOID_TOOTH && u.uinsight >= 20 && otmp->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(otmp, magr, ETRAIT_FOCUS_FIRE))
|| (otmp->otyp == TOOTH && otmp->ovar1_tooth_type == VOID_TOOTH && Insight >= 20 && otmp->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(otmp, magr, ETRAIT_FOCUS_FIRE))
) && !Drain_res(mdef)
){
int dlife;
int n = 0;
if(check_oprop(otmp, OPROP_DRANW))
n++;
if(otmp->otyp == TOOTH && otmp->ovar1_tooth_type == VOID_TOOTH && u.uinsight >= 20 && otmp->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(otmp, magr, ETRAIT_FOCUS_FIRE))
if(otmp->otyp == TOOTH && otmp->ovar1_tooth_type == VOID_TOOTH && Insight >= 20 && otmp->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(otmp, magr, ETRAIT_FOCUS_FIRE))
n += 3;
/* message */
if (youdef) {
@ -7950,17 +7952,17 @@ boolean printmessages; /* print generic elemental damage messages */
if(arti_struct && arti_struct->inv_prop == FALLING_STARS){
if(!Fire_res(mdef)){
if(u.uinsight >= 36){
if(Insight >= 36){
*truedmgptr += d(6,6);
}
else if(u.uinsight >= 6){
*truedmgptr += d(u.uinsight/6,6);
else if(Insight >= 6){
*truedmgptr += d(Insight/6,6);
}
}
if (!UseInvFire_res(mdef) && u.uinsight >= 6){
if (!UseInvFire_res(mdef) && Insight >= 6){
if (rn2(3)) destroy_item(mdef, SCROLL_CLASS, AD_FIRE);
if (rn2(3) && u.uinsight >= 12) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
if (rn2(3) && u.uinsight >= 18) destroy_item(mdef, POTION_CLASS, AD_FIRE);
if (rn2(3) && Insight >= 12) destroy_item(mdef, SPBOOK_CLASS, AD_FIRE);
if (rn2(3) && Insight >= 18) destroy_item(mdef, POTION_CLASS, AD_FIRE);
}
if(NightmareAware_Insanity >= 4){
int n = ClearThoughts ? 1 : 2;
@ -7974,7 +7976,7 @@ boolean printmessages; /* print generic elemental damage messages */
if (rn2(3)) destroy_item(mdef, POTION_CLASS, AD_FIRE);
}
}
if(u.uinsight >= 42 && u.uinsight > rn2(73)){
if(Insight >= 42 && Insight > rn2(73)){
int x, y, n, tries = 0;
coord cc;
do{
@ -7984,14 +7986,14 @@ boolean printmessages; /* print generic elemental damage messages */
} while (!(isok(x,y) && ACCESSIBLE(levl[x][y].typ) && (!magr || (distmin(x(magr), y(magr), x, y) > 2 &&
clear_path(x(magr), y(magr), x, y)))) && tries++ < 1000);
if(u.uinsight >= 72)
if(Insight >= 72)
n = 6;
else
n = (u.uinsight - 36)/6;
n = (Insight - 36)/6;
n=rnd(n)+1;
explode_yours(x, y, AD_PHYS, 0, d(6,6), EXPL_MUDDY, 1, FALSE);
if (cansee(x, y)){
if (Hallucination || u.uinsight > 96) pline("Another Star Falls.");
if (Hallucination || Insight > 96) pline("Another Star Falls.");
else pline("A star falls from the %s!", (In_outdoors(&u.uz) ? "sky" : ceiling(x, y)));
} else {
You_hear("a thunderous crash!");
@ -8011,7 +8013,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
if(otmp->oartifact == ART_GOLDEN_SWORD_OF_Y_HA_TALLA){
if(u.uinsight > 8){
if(Insight > 8){
extern const int clockwisex[8];
extern const int clockwisey[8];
int nx, ny;
@ -8031,7 +8033,7 @@ boolean printmessages; /* print generic elemental damage messages */
if(m_u_at(nx,ny) != 0)
continue;
//The world around the target warps into giant stinging scorpion tails
if(u.uinsight > 64 || u.uinsight > rnd(64)){
if(Insight > 64 || Insight > rnd(64)){
*plusdmgptr += d(1,8);
if(!Poison_res(mdef)){
if(!rn2(10))
@ -8042,7 +8044,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
}
}
if(u.uinsight > 64 && (otmp->otyp == BULLWHIP || !rn2(4))){
if(Insight > 64 && (otmp->otyp == BULLWHIP || !rn2(4))){
if(youdef){
u.umadness |= MAD_SCORPIONS;
}
@ -8052,14 +8054,14 @@ boolean printmessages; /* print generic elemental damage messages */
}
}
if(check_oprop(otmp, OPROP_ELFLW) && u.uinsight >= 33 && u.ualign.record > 3 && u.uinsight > rn2(333)){
if(check_oprop(otmp, OPROP_ELFLW) && Insight >= 33 && u.ualign.record > 3 && Insight > rn2(333)){
/* cancel_monst handles resistance */
cancel_monst(mdef, otmp, youagr, FALSE, FALSE, FALSE);
}
//Also does the bolt (when it hits as a launcher)
if(otmp->otyp == CARCOSAN_STING){
if(u.uinsight >= 25){
if(Insight >= 25){
struct obj *arm = some_armor(mdef);
if(arm){
add_byakhee_to_obj(arm);
@ -8234,7 +8236,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
if(is_kinstealing_merc(otmp) && (
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL)
(youagr && Insight > 20 && YOU_MERC_SPECIAL)
|| (!youagr && insightful(magr->data) && is_chaotic_mon(magr))
)){
int target;
@ -8294,7 +8296,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
}
// Theft
target = youagr ? (u.uinsight + ACURR(A_DEX)) : mlev(magr);
target = youagr ? (Insight + ACURR(A_DEX)) : mlev(magr);
target -= mlev(mdef);
if(rnd(100) < target){
if (youagr){
@ -8400,7 +8402,7 @@ boolean printmessages; /* print generic elemental damage messages */
}
}
if(mercy_blade_prop(otmp)){
if(u.uinsight >= 25 && !resist(mdef, youagr ? SPBOOK_CLASS : WEAPON_CLASS, 0, NOTELL)){
if(Insight >= 25 && !resist(mdef, youagr ? SPBOOK_CLASS : WEAPON_CLASS, 0, NOTELL)){
if(youdef){
if(u.uencouraged >= 0 && ACURR_MON(A_CHA, magr)/5 > 0)
You("feel a rush of irrational mercy!");
@ -8841,7 +8843,7 @@ struct obj *obj;
MENU_UNSELECTED);
}
inclet++;
if(u.uinsight >= 60){
if(Insight >= 60){
Sprintf(buf, "Raise ibite mob");
any.a_int = -2;
add_menu(tmpwin, NO_GLYPH, &any,
@ -9015,7 +9017,7 @@ struct obj *obj;
}
inclet++;
if(!(obj->ovara_carapace&CPROP_IMPURITY) && u.uinsight >= 5){
if(!(obj->ovara_carapace&CPROP_IMPURITY) && Insight >= 5){
Sprintf(buf, "Armor of impurity (2 points)");
any.a_int = CPROP_IMPURITY;
add_menu(tmpwin, NO_GLYPH, &any,
@ -9291,7 +9293,7 @@ struct obj *obj;
int difficulty = artinstance[ART_FINGERPRINT_SHIELD].FingerprintProgress + 1;
difficulty *= 12;
difficulty -= u.uinsight;
difficulty -= Insight;
difficulty -= ACURR(A_INT);
difficulty -= 14 - ACURR(A_WIS); //High wis may apply a penalty
difficulty -= 10 - ACURR(A_CHA); //High cha may apply a penalty
@ -9303,12 +9305,12 @@ struct obj *obj;
if(artinstance[ART_FINGERPRINT_SHIELD].FingerprintProgress == 0){
pline("As you study the patterns, you begin to sense some elusive deeper meaning.");
if(u.usanity > 90){
if(u.uinsight > 40)
if(Insight > 40)
You("feel an itch behind your eyes.");
change_usanity(-1*d(2,6), FALSE);
}
else {
if(u.uinsight > 60)
if(Insight > 60)
You("scratch at your eyes.");
else
You("are blinded by a flash of magenta light.");
@ -9324,12 +9326,12 @@ struct obj *obj;
else if(artinstance[ART_FINGERPRINT_SHIELD].FingerprintProgress == 1){
pline("You study the patterns, chasing the elusive deeper meaning.");
if(u.usanity > 50){
if(u.uinsight > 45)
if(Insight > 45)
You("feel a scratching behind your eyes.");
change_usanity(-1*d(3,12), TRUE);
}
else {
if(u.uinsight > 60)
if(Insight > 60)
You("claw at your eyes.");
else
You("are blinded by a flare of magenta flame.");
@ -9351,13 +9353,13 @@ struct obj *obj;
else if(artinstance[ART_FINGERPRINT_SHIELD].FingerprintProgress == 2){
pline("You study the patterns. You are closing on the Truth at last.");
if(u.usanity > 10){
if(u.uinsight > 50)
if(Insight > 50)
You("feel a clawing behind your eyes.");
u.umadness |= MAD_FRENZY;
change_usanity(-1*d(4,20), TRUE);
}
else {
if(u.uinsight > 60)
if(Insight > 60)
You("tear out your eyes!");
else
Your("eyes are blasted away by magenta fire.");
@ -10232,7 +10234,7 @@ arti_invoke(obj)
for(i = 12; i > 0; i--){
int xadj=0;
int yadj=0;
otmp = mksobj(HEAVY_IRON_BALL, NO_MKOBJ_FLAGS);
otmp = mksobj(BALL, NO_MKOBJ_FLAGS);
otmp->blessed = 0;
otmp->cursed = 0;
if(u.dy == 0) yadj = d(1,3)-2;
@ -14945,7 +14947,7 @@ arti_poly_contents(obj)
}
#endif /* OVLB */
STATIC_OVL int
int
throweffect()
{
coord cc;
@ -15110,15 +15112,15 @@ dosymbiotic_equip()
dosymbiotic(&youmonst, uarm);
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_WHIPPING))
doscorpion(&youmonst, uarm);
if(uwep && ((check_oprop(uwep, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(uwep) || is_bloodthirsty_artifact(uwep) ))
if(uwep && ((check_oprop(uwep, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(uwep) || is_bloodthirsty_artifact(uwep) ))
doliving(&youmonst, uwep);
if(uswapwep && ((check_oprop(uswapwep, OPROP_LIVEW) && u.twoweap && u.uinsight >= 40) || is_living_artifact(uswapwep) || (is_bloodthirsty_artifact(uswapwep) && u.twoweap) ))
if(uswapwep && ((check_oprop(uswapwep, OPROP_LIVEW) && u.twoweap && Insight >= 40) || is_living_artifact(uswapwep) || (is_bloodthirsty_artifact(uswapwep) && u.twoweap) ))
doliving(&youmonst, uswapwep);
if(uarms && ((check_oprop(uarms, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(uarms) ))
if(uarms && ((check_oprop(uarms, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(uarms) ))
doliving(&youmonst, uarms);
if(uarm && ((check_oprop(uarm, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(uarm) ))
if(uarm && ((check_oprop(uarm, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(uarm) ))
doliving(&youmonst, uarm);
if(uarmh && ((check_oprop(uarmh, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(uarmh) ))
if(uarmh && ((check_oprop(uarmh, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(uarmh) ))
doliving(&youmonst, uarmh);
for (obj = invent; obj; obj = obj->nobj){
if(is_chaos_orb(obj))
@ -15139,19 +15141,19 @@ dosymbiotic_equip()
doscorpion(mtmp, obj);
obj = MON_WEP(mtmp);
if(obj && ((check_oprop(obj, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(obj) ))
if(obj && ((check_oprop(obj, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(obj) ))
doliving(mtmp, obj);
obj = MON_SWEP(mtmp);
if(obj && ((check_oprop(obj, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(obj) ))
if(obj && ((check_oprop(obj, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(obj) ))
doliving(mtmp, obj);
obj = which_armor(mtmp, W_ARMS);
if(obj && ((check_oprop(obj, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(obj) ))
if(obj && ((check_oprop(obj, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(obj) ))
doliving(mtmp, obj);
obj = which_armor(mtmp, W_ARM);
if(obj && ((check_oprop(obj, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(obj) ))
if(obj && ((check_oprop(obj, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(obj) ))
doliving(mtmp, obj);
obj = which_armor(mtmp, W_ARMH);
if(obj && ((check_oprop(obj, OPROP_LIVEW) && u.uinsight >= 40) || is_living_artifact(obj) ))
if(obj && ((check_oprop(obj, OPROP_LIVEW) && Insight >= 40) || is_living_artifact(obj) ))
doliving(mtmp, obj);
for (obj = mtmp->minvent; obj; obj = obj->nobj){
@ -15194,6 +15196,10 @@ do_passive_attacks()
dotailslap(&youmonst);
if(uring_art(ART_STAR_EMPEROR_S_RING))
dostarblades(&youmonst);
if(check_rot(ROT_CENT))
dorotbite(&youmonst);
if(check_rot(ROT_STING))
dorotsting(&youmonst);
//Note: The player never gets Eladrin vines, starblades, or storms
flags.mon_moving = TRUE;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon){
@ -15216,6 +15222,8 @@ do_passive_attacks()
dohost_mon(mtmp);
if(is_storm_mon(mtmp))
dostorm(mtmp);
if(is_chain_lash_mon(mtmp))
dochain_lashes(mtmp);
if(mtmp->mtyp == PM_KRAKEN__THE_FIEND_OF_WATER)
dokraken_mon(mtmp);
if(mtmp->mtyp == PM_CHAOS && !PURIFIED_WATER)
@ -15361,7 +15369,7 @@ living_items()
if((obj->otyp == BROKEN_ANDROID || obj->otyp == BROKEN_GYNOID || obj->otyp == LIFELESS_DOLL) && obj->ovar1_insightlevel){
xchar ox, oy;
get_obj_location(obj, &ox, &oy, 0);
if(obj->ovar1_insightlevel <= u.uinsight && !rn2(20)){
if(obj->ovar1_insightlevel <= Insight && !rn2(20)){
struct monst *mtmp;
mtmp = revive(obj, TRUE);
if (mtmp && cansee(ox, oy)) pline("%s wakes up.", Monnam(mtmp));
@ -15644,7 +15652,7 @@ int stat;
if(youagr){
if(!YOU_MERC_SPECIAL)
return 0;
if(u.uinsight <= 20 || ACURR(stat) < 15)
if(Insight <= 20 || ACURR(stat) < 15)
return 0;
}
else {
@ -15720,7 +15728,9 @@ struct obj **opptr;
pline("The two weapons clink together awkwardly.");
return MOVE_CANCELLED;
}
if(u.ulevel < 22){ //Less than rank 7
if((u.usanity < 50 || u.ulevel < 22 || Insight < 50) //Lower threshold than that for using the Resonant Edge of Fellowship
|| !(artinstance[ART_SKY_REFLECTED].ZerthUpgrades&ZPROP_BALANCE) //From the *knowing* of Two Skies came the realization that hurting others, hurts oneself.
){
pline("The two weapons ripple for a moment, then push each-other away!");
pline("It seems you are not powerful enough to merge them together.");
return MOVE_CANCELLED;

View file

@ -1518,7 +1518,7 @@ boolean check;
long int thought;
for (thought = 1L; thought <= u.thoughts; thought = thought << 1) {
if ((u.thoughts&thought) &&
active_glyph(thought) != was_active_glyph(thought, u.uinsight, u.usanity - delta)
active_glyph(thought) != was_active_glyph(thought, Insight, u.usanity - delta)
) {
change_glyph_active(thought, active_glyph(thought));
}
@ -1597,7 +1597,7 @@ int delta;
long int thought;
for (thought = 1L; thought <= u.thoughts; thought = thought << 1) {
if ((u.thoughts&thought) &&
active_glyph(thought) != was_active_glyph(thought, u.uinsight-delta, u.usanity)
active_glyph(thought) != was_active_glyph(thought, Insight-delta, u.usanity)
) {
change_glyph_active(thought, active_glyph(thought));
}
@ -1610,16 +1610,31 @@ check_insight()
/*ACU's full insight doesn't have negative effects*/
if(Role_if(PM_ANACHRONOUNBINDER)) return FALSE;
int insight;
if(u.uinsight > INSIGHT_RATE/20)
if(Insight > INSIGHT_RATE/20)
insight = INSIGHT_RATE/20;
else insight = u.uinsight;
else insight = Insight;
return insight > rn2(INSIGHT_RATE);
}
int
roll_generic_madness(clearable)
boolean clearable;
roll_impurity(boolean clearable)
{
int implevel;
if((clearable && ClearThoughts) || TimeStop)
return FALSE;
implevel = 100 - (int)(((float)rand()/(float)(RAND_MAX)) * ((float)rand()/(float)(RAND_MAX)) * 100);
//Note: Clear Thoughts plus Walking Nightmare yields partial resistance rather than complete.
if(u.uimpurity > implevel)
return TRUE;
return FALSE;
}
int
roll_generic_madness(boolean clearable)
{
int sanlevel;
int usan = u.usanity;
@ -1638,8 +1653,7 @@ boolean clearable;
}
int
roll_generic_flat_madness(clearable)
int clearable;
roll_generic_flat_madness(boolean clearable)
{
int sanlevel;
int usan = u.usanity;
@ -2311,7 +2325,7 @@ int edge;
return u.usanity > 50 || u.ulevel < 14;
break;
case GSTYLE_COLD:
return u.usanity > 50 || u.ulevel < 14 || u.uinsight < 9;
return u.usanity > 50 || u.ulevel < 14 || Insight < 9;
break;
case GSTYLE_DEFENSE:
return u.usanity < 50 || u.ulevel < 14;
@ -2320,7 +2334,7 @@ int edge;
return u.usanity < 50 || u.ulevel < 14;
break;
case GSTYLE_RESONANT:
return u.usanity < 50 || u.ulevel < 30 || u.uinsight < 81;
return u.usanity < 50 || u.ulevel < 30 || Insight < 81;
break;
default:
impossible("Attempting to get blockage of mental edge number %d?", edge);

View file

@ -851,7 +851,7 @@ bc_sanity_check()
uball ? "iron ball" : "");
}
/* ball is free when swallowed, changing levels, other times? */
if (uball && (uball->otyp != HEAVY_IRON_BALL
if (uball && (uball->otyp != BALL
|| (uball->where != OBJ_FLOOR
&& uball->where != OBJ_INVENT
&& uball->where != OBJ_FREE)

View file

@ -285,6 +285,7 @@ int y;
otmp->owornmask = 0;
if(u.ugrave_arise == (NON_PM - 3)) set_material(otmp, GOLD);
if(u.ugrave_arise == (NON_PM - 4)) set_material(otmp, SALT);
/* lamps don't go out when dropped */
if ((cont || artifact_light(otmp)) && obj_is_burning(otmp))
end_burn(otmp, TRUE); /* smother in statue */
@ -537,6 +538,16 @@ struct obj *corpse;
} else if (u.ugrave_arise == (NON_PM - 4)) {
struct obj *otmp;
/* embed your possessions in your statue */
otmp = mk_named_object(STATUE, &mons[u.umonnum],
x, y, plname);
set_material_gm(otmp, SALT);
drop_upon_death((struct monst *)0, otmp, x, y);
if (!otmp) return; /* couldn't make statue */
mtmp = (struct monst *)0;
} else if (u.ugrave_arise == (NON_PM - 5)) {
struct obj *otmp;
/* embed your possessions in your statue */
otmp = mk_named_object(STATUE, &mons[u.umonnum],
x, y, plname);

View file

@ -64,7 +64,7 @@ long get_status_duration(long long mask) {
long long get_status_mask() {
long long mask = 0;
if(Stoned || Golded)
if(Stoned || Golded || Salted)
mask |= BL_MASK_STONE;
if(Slimed)
mask |= BL_MASK_SLIME;

View file

@ -146,6 +146,7 @@ STATIC_PTR int NDECL(doclearinvissyms);
# ifdef WIZARD
STATIC_PTR int NDECL(wiz_bind);
STATIC_PTR int NDECL(wiz_mutate);
STATIC_PTR int NDECL(wiz_research);
STATIC_PTR int NDECL(wiz_cult);
STATIC_PTR int NDECL(wiz_mk_mapglyphdump);
STATIC_PTR int NDECL(wiz_wish);
@ -675,6 +676,9 @@ boolean you_abilities;
if (mon_abilities && is_unicorn(youracedata)){
add_ability('u', "Use your unicorn horn", MATTK_UHORN);
}
if (you_abilities && ((check_rot(ROT_VOMIT) && (umechanoid || u.uhs < WEAK)) || (check_rot(ROT_CLONE) && u.uen >= 45) )){
add_ability('U', "Use your upgrade abilities", MATTK_UPGRADE);
}
if (mon_abilities && is_vampire(youracedata) && u.ulevel > 1){
add_ability('V', "Raise a vampiric minion", MATTK_VAMP);
}
@ -783,6 +787,10 @@ boolean you_abilities;
return MOVE_STANDARD;
}
break;
case MATTK_UPGRADE: {
return doupgradeability();
}
break;
case MATTK_SHRIEK: {
You("shriek.");
if(u.uburied) pline("Unfortunately sound does not carry well through rock.");
@ -1693,9 +1701,9 @@ doGithForm()
for (i = FIRST_GSTYLE; i <= LAST_GSTYLE; i++) {
if (i == GSTYLE_RESONANT && (u.ulevel < 30 || u.uinsight < 81) && (artinstance[ART_SILVER_SKY].GithStylesSeen & 2) == 0)
if (i == GSTYLE_RESONANT && (u.ulevel < 30 || Insight < 81) && (artinstance[ART_SILVER_SKY].GithStylesSeen & 2) == 0)
continue;
if (i == GSTYLE_COLD && u.uinsight < 9 && (artinstance[ART_SILVER_SKY].GithStylesSeen & 1) == 0)
if (i == GSTYLE_COLD && Insight < 9 && (artinstance[ART_SILVER_SKY].GithStylesSeen & 1) == 0)
continue;
/* knight forms are shown if unskilled but not restricted, since training involves starting from unskilled */
@ -1709,9 +1717,9 @@ doGithForm()
else if (i == GSTYLE_PENETRATE)
block_reason = "lack of hate";
else if (i == GSTYLE_COLD)
block_reason = (u.uinsight < 9) ? "lack of knowledge" : "lack of wrath";
block_reason = (Insight < 9) ? "lack of knowledge" : "lack of wrath";
else if (i == GSTYLE_RESONANT)
block_reason = (u.ulevel < 30) ? "lack of skill" : ((u.uinsight < 81) ? "lack of knowledge" : "lack of mental discipline");
block_reason = (u.ulevel < 30) ? "lack of skill" : ((Insight < 81) ? "lack of knowledge" : "lack of mental discipline");
else
block_reason = "lack of mental discipline";
@ -1857,7 +1865,7 @@ doEtechForm()
#define AVOID_UNSAFETOUCH 0x080L
#define GITH_FORMS 0x100L
#define ETECH_FORMS 0x200L
#define AVOID_THEFT 0x400L
int
hasfightingforms(){
@ -1896,8 +1904,8 @@ hasfightingforms(){
if(no_contact_attk(attk)) formmask |= AVOID_PASSIVES;
}
}
if (u.uavoid_msplcast)
formmask |= AVOID_MSPLCAST;
if (u.uavoid_theft)
formmask |= AVOID_THEFT;
else {
indexnum = tohitmod = 0;
zero_subout(subout);
@ -1909,7 +1917,7 @@ hasfightingforms(){
!is_null_attk(attk);
attk = getattk(&youmonst, (struct monst *) 0, res, &indexnum, &prev_attk2, FALSE, subout, &tohitmod)
){
if(attk->aatyp == AT_MAGC) formmask |= AVOID_MSPLCAST;
if(attk->adtyp == AD_SEDU || attk->adtyp == AD_SITM || attk->adtyp == AD_SSEX) formmask |= AVOID_THEFT;
}
}
if (u.uavoid_grabattk || sticks(&youmonst))
@ -1991,6 +1999,7 @@ dofightingform()
#define AVOD_TUCH 8
#define GITH_FORM 9
#define ETCH_FORM 10
#define AVOD_THFT 11
if (formmask & MONK_FORMS) {
any.a_int = MONK_FORM;
@ -2047,6 +2056,13 @@ dofightingform()
add_menu(tmpwin, NO_GLYPH, &any, 't', 0, ATR_NONE, buf, MENU_UNSELECTED);
}
if (formmask & AVOID_THEFT) {
any.a_int = AVOD_THFT;
if (!u.uavoid_theft) Strcpy(buf, "Discard stolen items from monsters");
else Strcpy(buf, "Keep stolen items from monsters");
add_menu(tmpwin, NO_GLYPH, &any, 'h', 0, ATR_NONE, buf, MENU_UNSELECTED);
}
end_menu(tmpwin, "Adjust fighting styles:");
@ -2087,6 +2103,9 @@ dofightingform()
return doGithForm();
case ETCH_FORM:
return doEtechForm();
case AVOD_THFT:
u.uavoid_theft = !u.uavoid_theft;
return MOVE_INSTANT;
default:
impossible("unknown fighting form set %d", n);
return MOVE_CANCELLED;
@ -2094,6 +2113,18 @@ dofightingform()
return MOVE_CANCELLED;
}
#undef MONK_FORM
#undef LGHT_FORM
#undef KNIT_FORM
#undef AVOD_FORM
#undef AVOD_MSPL
#undef AVOD_GRAB
#undef AVOD_ENGL
#undef AVOD_TUCH
#undef GITH_FORM
#undef ETCH_FORM
#undef AVOD_THFT
#undef MONK_FORMS
#undef LIGHTSABER_FORMS
#undef KNIGHT_FORMS
@ -2102,7 +2133,7 @@ dofightingform()
#undef AVOID_GRABATTK
#undef AVOID_ENGLATTK
#undef AVOID_UNSAFETOUCH
#undef AVOID_THEFT
int
dounmaintain()
@ -2273,6 +2304,26 @@ wiz_mutate()
return MOVE_CANCELLED;
}
STATIC_PTR int
wiz_research()
{
if (!wizard)
return MOVE_CANCELLED;
winid tmpwin;
int n, how;
char buf[BUFSZ];
menu_item *selected;
char inclet = 'a';
anything any;
tmpwin = create_nhwindow(NHW_MENU);
start_menu(tmpwin);
any.a_void = 0; /* zero out all bits */
return MOVE_CANCELLED;
}
#define GAIN_SHUB_ATTEN 1
#define GAIN_FLAM_ATTEN 2
#define GAIN_YOG_ATTEN 3
@ -2866,7 +2917,7 @@ STATIC_PTR int wiz_setinsight()
pline1(Never_mind);
return MOVE_CANCELLED;
}
change_uinsight(newval - u.uinsight);
change_uinsight(newval - Insight);
return MOVE_INSTANT;
}

View file

@ -2676,10 +2676,9 @@ long timeout; /* unused */
boolean on_floor = obj->where == OBJ_FLOOR,
in_invent = obj->where == OBJ_INVENT;
if (on_floor) {
x = obj->ox;
y = obj->oy;
} else if (in_invent) {
get_obj_location(obj, &x, &y, 0);
if (in_invent) {
if (flags.verbose) {
char *cname = corpse_xname(obj, FALSE);
Your("%s%s %s away%c",
@ -2754,6 +2753,42 @@ long timeout; /* unused */
mksobj_at(PARASITE, x, y, NO_MKOBJ_FLAGS);
}
}
if(check_preservation(PRESERVE_ROT_TRIGGER)){
int out_of = check_preservation(PRESERVE_MAX) ? 300 : check_preservation(PRESERVE_GAIN_DR_2) ? 600 : 900;
if(check_rot(ROT_KIN))
out_of /= 2;
out_of -= u.uimpurity;
out_of -= u.uimp_rot;
if(active_glyph(EYE_THOUGHT) && active_glyph(LUMEN))
out_of /= 3;
else if(active_glyph(EYE_THOUGHT))
out_of /= 2;
else if(active_glyph(LUMEN))
out_of = 2*out_of/3;
if(!obj->researched)
out_of /= 2;
if(!obj->odrained)
out_of /= 3;
if(out_of < 2 || !rn2(out_of)){
struct obj *crys = mksobj(CRYSTAL, NO_MKOBJ_FLAGS);
if(crys){
set_material_gm(crys, FLESH);
crys->spe = rn2(7);
place_object(crys, x, y);
}
}
if(u.silvergrubs && !rn2(20)){
u.silvergrubs = FALSE;
}
if(check_rot(ROT_KIN) && !mindless(&mons[obj->corpsenm]) && !is_animal(&mons[obj->corpsenm]) && (u.silvergrubs || !rn2(100)) && !(mvitals[PM_SILVERGRUB].mvflags&G_GONE && !In_quest(&u.uz))){
u.silvergrubs = TRUE;
makemon(&mons[PM_SILVERGRUB], x, y, NO_MM_FLAGS);
}
}
}
if(x && couldsee(x, y) && distmin(x, y, u.ux, u.uy) <= BOLT_LIM/2){
IMPURITY_UP(u.uimp_rot)
}
// rot_organic(arg, timeout); //This is not for corpses, it is for buried containers.
obj_extract_self(obj);

View file

@ -1336,7 +1336,7 @@ int portal;
if(!up && !newdungeon && !portal && In_quest(&u.uz)
&& Role_if(PM_UNDEAD_HUNTER) && !mvitals[PM_MOON_S_CHOSEN].died
&& dunlev(&u.uz) < qlocate_level.dlevel
&& rnd(20) < u.uinsight && rn2(2)
&& rnd(20) < Insight && rn2(2)
){
int diff = rn2(2); /* 0 - 1 */
if (diff != 0) {
@ -1843,12 +1843,12 @@ misc_levelport:
}
else if(quest_status.time_doing_quest >= UH_QUEST_TIME_1){
You("again sense Vicar Amalia pleading for help:");
pline("Somthing is wrong. The infection is now spreading in the city!");
pline("Something is wrong. The infection is now spreading in the city!");
}
//Futureproof, but I don't think this can be reached.
else {
You("again sense Vicar Amalia pleading for help:");
pline("Somthing is wrong. The infection is still spreading.");
pline("Something is wrong. The infection is still spreading.");
}
} else {
if (u.uevent.qcalled) {
@ -2185,6 +2185,9 @@ int different;
if(different==REVIVE_ZOMBIE){
if(mtmp->mspores){
set_template(mtmp, SPORE_ZOMBIE);
if(couldsee(mtmp->mx, mtmp->my) && distmin(u.ux, u.uy, mtmp->mx, mtmp->my)){
IMPURITY_UP(u.uimp_rot)
}
mtmp->mspores = 0;
}
else {
@ -2446,6 +2449,9 @@ long timeout;
) pmtype = -1;
if (pmtype != -1) {
if(couldsee(body->ox, body->oy) && distmin(body->ox, body->oy, u.ux, u.uy) <= BOLT_LIM){
IMPURITY_UP(u.uimp_rot)
}
/* We don't want special case revivals */
if (cant_create(&pmtype, TRUE) || get_ox(body, OX_EMON))
pmtype = -1; /* cantcreate might have changed it so change it back */

View file

@ -1014,6 +1014,7 @@ boolean full;
else if (full && template == CORDYCEPS) Sprintf(buf2, "%s's sporulating corpse", buf);
else if (full && template == PSURLON) Sprintf(buf2, "%s the finger", buf);
else if (full && template == CONSTELLATION) Sprintf(buf2, "%s constellation", buf);
else if (full && template == SWOLLEN_TEMPLATE) Sprintf(buf2, "%s the swollen", buf);
else Strcpy(buf2, buf);
}
else {
@ -1047,6 +1048,7 @@ boolean full;
else if (full && template == CORDYCEPS) Sprintf(buf2, "%s cordyceps", buf);
else if (full && template == PSURLON) Sprintf(buf2, "%s finger", buf);
else if (full && template == CONSTELLATION) Sprintf(buf2, "%s constellation", buf);
else if (full && template == SWOLLEN_TEMPLATE) Sprintf(buf2, "swollen %s", buf);
else Strcpy(buf2, buf);
}

View file

@ -271,6 +271,8 @@ Cloak_on()
case CLOAK_OF_MAGIC_RESISTANCE:
case ROBE:
case CLOAK:
case CAPELET:
case HOODED_CAPELET:
case LEO_NEMAEUS_HIDE:
case WHITE_FACELESS_ROBE:
case BLACK_FACELESS_ROBE:
@ -353,6 +355,8 @@ Cloak_off()
case OILSKIN_CLOAK:
case ROBE:
case CLOAK:
case CAPELET:
case HOODED_CAPELET:
case LEO_NEMAEUS_HIDE:
case WHITE_FACELESS_ROBE:
case BLACK_FACELESS_ROBE:
@ -402,6 +406,7 @@ Helmet_on()
adj_abon(uarmh, uarmh->spe);
switch(uarmh->otyp) {
case FEDORA:
case TRICORN:
case SHEMAGH:
case HELMET:
case DROVEN_HELM:
@ -410,6 +415,7 @@ Helmet_on()
case CRYSTAL_HELM:
case PONTIFF_S_CROWN:
case FACELESS_HELM:
case FACELESS_HOOD:
case SEDGE_HAT:
case WAR_HAT:
case WIDE_HAT:
@ -428,6 +434,12 @@ Helmet_on()
case HELM_OF_BRILLIANCE:
case SUNLIGHT_MAGGOT:
break;
case TOP_HAT:
case ESCOFFION:
case HENNIN:
ABON(A_CHA) += 1;
flags.botl = 1;
break;
case CORNUTHAUM:
/* people think marked wizards know what they're talking
* about, but it takes trained arrogance to pull it off,
@ -525,6 +537,7 @@ Helmet_off()
switch(uarmh->otyp) {
case FEDORA:
case TRICORN:
case SHEMAGH:
case HELMET:
case DROVEN_HELM:
@ -533,6 +546,7 @@ Helmet_off()
case CRYSTAL_HELM:
case PONTIFF_S_CROWN:
case FACELESS_HELM:
case FACELESS_HOOD:
case SEDGE_HAT:
case WAR_HAT:
case WIDE_HAT:
@ -548,6 +562,12 @@ Helmet_off()
case HARMONIUM_HELM:
case SUNLIGHT_MAGGOT:
break;
case TOP_HAT:
case ESCOFFION:
case HENNIN:
ABON(A_CHA) -= 1;
flags.botl = 1;
break;
case DUNCE_CAP:
flags.botl = 1;
break;
@ -583,7 +603,7 @@ Helmet_off()
if (Blind) {
if (was_blind) {
/* "still cannot see" needs the helmet to possibly have been the cause of your blindness */
if ((otmp->otyp == CRYSTAL_HELM && is_opaque(otmp)) ||
if (((otmp->otyp == CRYSTAL_HELM || otmp->otyp == FACELESS_HOOD) && is_opaque(otmp)) ||
(otmp->otyp == PLASTEEL_HELM && is_opaque(otmp) && otmp->obj_material != objects[otmp->otyp].oc_material))
You("still cannot see.");
}
@ -2264,7 +2284,7 @@ doputon()
Blindf_on(otmp);
return MOVE_STANDARD;
}
if (is_worn(otmp))
if (is_worn(otmp, 0))
prinv((char *)0, otmp, 0L);
return MOVE_STANDARD;
}
@ -2634,10 +2654,10 @@ base_uac()
}
if(has_spear_point(uwep,JET)) uac -= 2 + uwep->spe/2;
else if(uwep->oartifact == ART_LASH_OF_THE_COLD_WASTE){
if(u.uinsight >= 20)
if(Insight >= 20)
uac -= 10;
else if(u.uinsight > 10)
uac -= u.uinsight - 10;
else if(Insight > 10)
uac -= Insight - 10;
}
if(!flat_foot){
if((is_rapier(uwep) && arti_phasing(uwep)) ||
@ -2833,6 +2853,9 @@ find_ac()
)
uac -= 3;//+1 bonus to shield size
}
if(!uarms && uwep && CHECK_ETRAIT(uwep, &youmonst, ETRAIT_BLADEDANCE) && Race_if(PM_ELF)){
uac -= ROLL_ETRAIT(uwep, &youmonst, 3, 1);
}
if (uarmg) uac -= arm_ac_bonus(uarmg);
if (uarmu) uac -= arm_ac_bonus(uarmu);
if (ubelt) uac -= arm_ac_bonus(ubelt);
@ -2931,7 +2954,7 @@ int base_nat_udr()
else udr += (u.ulevel)/6;
}
}
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && u.uinsight >= 5){
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && Insight >= 5){
udr += 3;
}
if(check_preservation(PRESERVE_GAIN_DR)){
@ -2965,10 +2988,10 @@ int base_udr()
if(uwep->oartifact == ART_LANCE_OF_LONGINUS) udr += max((uwep->spe)/2,0);
if(has_spear_point(uwep,JET)) udr += 2 + uwep->spe/2;
else if(uwep->oartifact == ART_LASH_OF_THE_COLD_WASTE){
if(u.uinsight >= 40)
if(Insight >= 40)
udr += 5;
else if(u.uinsight > 20)
udr += (u.uinsight - 20)/4;
else if(Insight > 20)
udr += (Insight - 20)/4;
}
}
if (HProtection & INTRINSIC) udr += (u.ublessed)/2;
@ -3355,7 +3378,7 @@ struct monst *victim;
otmp = (victim == &youmonst) ? uarmf : which_armor(victim, W_ARMF);
if(otmp && (!otmph || !rn2(4))) otmph = otmp;
otmp = (victim == &youmonst) ? ubelt : which_armor(victim, W_BELT);
if(otmp && (!otmph || !rn2(4))) otmph = otmp;
if(otmp && otmp->otyp == KIDNEY_BELT && (!otmph || !rn2(4))) otmph = otmp;
otmp = (victim == &youmonst) ? uarms : which_armor(victim, W_ARMS);
if(otmp && (!otmph || !rn2(4))) otmph = otmp;
return(otmph);
@ -4554,7 +4577,9 @@ register schar delta;
flags.botl = 1;
}
}
if (otmp->otyp == find_gcirclet() || otmp->oartifact == ART_CROWN_OF_THE_PERCIPIENT){
if (otmp->otyp == find_gcirclet() || otmp->oartifact == ART_CROWN_OF_THE_PERCIPIENT
|| otmp->otyp == TOP_HAT || otmp->otyp == ESCOFFION || otmp->otyp == HENNIN
){
if (delta) {
ABON(A_CHA) += (delta);
flags.botl = 1;
@ -5743,16 +5768,16 @@ struct monst *magr;
struct obj *wep;
boolean invoked;
{
if(u.uinsight >= 60 && invoked){
if(Insight >= 60 && invoked){
//summon ghosts
doibite_ghosts(magr, wep);
}
if(u.uinsight >= 50 && !rn2(20)){
if(Insight >= 50 && !rn2(20)){
//cast spell
doibite_cast(magr, wep);
}
else if(u.uinsight >= 40 || invoked){
else if(Insight >= 40 || invoked){
//hit targets
doibite_thrash(magr, wep);
}
@ -6031,7 +6056,7 @@ boolean invoked;
boolean youdef;
/*Must have some insight or all targets will be skipped.*/
if(u.uinsight < 1)
if(Insight < 1)
return;
for(j=8;j>=1;j--){
@ -6058,7 +6083,7 @@ boolean invoked;
if(!youdef && nonthreat(mdef))
continue;
if(rn2(101) >= u.uinsight)
if(rn2(101) >= Insight)
continue;
if(youdef && u.uen > 0){
@ -6093,7 +6118,7 @@ boolean invoked;
if(wep == MON_WEP(magr)) delta = 3;
}
if (!invoked && u.uinsight < rnd(100)) return;
if (!invoked && Insight < rnd(100)) return;
for(i = x-delta; i <= x+delta; i++)
for(j = y-delta; j <= y+delta; j++){
@ -6133,7 +6158,7 @@ boolean invoked;
return; //oops!
}
if(u.uinsight >= 50 && invoked && !rn2(4) && m_online(magr, mdef, x(mdef), y(mdef), TRUE, TRUE)){
if(Insight >= 50 && invoked && !rn2(4) && m_online(magr, mdef, x(mdef), y(mdef), TRUE, TRUE)){
pline("A torrent of energy erupts from the jaws!");
struct zapdata beam;
basiczap(&beam, AD_MAGM, ZAP_BREATH, 6);
@ -6199,10 +6224,10 @@ struct obj *salve;
if(rn2(180))
return;
if(u.uinsight >= 18 && salve->spe < 6){
if(Insight >= 18 && salve->spe < 6){
salve->spe++;
}
else if(u.uinsight >= 66 && salve->spe >= 6){
else if(Insight >= 66 && salve->spe >= 6){
for(struct obj *otmp = yours ? invent : mon->minvent; otmp; otmp = otmp->nobj){
if(salve_target(otmp) && rn2(2)){
if(yours) pline("%s crawls across %s.", Yname2(salve), yname(otmp));

View file

@ -293,7 +293,7 @@ makedog()
if(pettype == PM_SECRET_WHISPERER){
mark_mon_as_summoned(mtmp, &youmonst, ACURR(A_CHA) + 1, 0);
for(int i = min(45, (u.uinsight - mtmp->m_lev)); i > 0; i--){
for(int i = min(45, (Insight - mtmp->m_lev)); i > 0; i--){
grow_up(mtmp, (struct monst *) 0);
//Technically might grow into a genocided form.
if(DEADMONSTER(mtmp))
@ -407,7 +407,7 @@ losedogs()
for(mtmp = migrating_mons; mtmp; mtmp = mtmp2) {
mtmp2 = mtmp->nmon;
if (mtmp->mux == u.uz.dnum && mtmp->muy == u.uz.dlevel
&& mtmp->m_insight_level <= u.uinsight
&& mtmp->m_insight_level <= Insight
&& !(mtmp->mtyp == PM_WALKING_DELIRIUM && BlockableClearThoughts)
&& !(mtmp->mtyp == PM_STRANGER && !quest_status.touched_artifact)
&& !((mtmp->mtyp == PM_PUPPET_EMPEROR_XELETH || mtmp->mtyp == PM_PUPPET_EMPRESS_XEDALLI) && mtmp->mvar_yellow_lifesaved)

View file

@ -130,13 +130,13 @@ boolean check_if_better;
/* collect artifacts and oprop items */
(otmp->oartifact
|| !check_oprop(otmp, OPROP_NONE)
|| (rakuyo_prop(otmp) && u.uinsight >= 20)
|| (rakuyo_prop(otmp) && Insight >= 20)
|| (mercy_blade_prop(otmp) && !u.veil)
|| (otmp->otyp == ISAMUSEI && u.uinsight >= 22)
|| (otmp->otyp == DISKOS && u.uinsight >= 10)
|| (otmp->otyp == ISAMUSEI && Insight >= 22)
|| (otmp->otyp == DISKOS && Insight >= 10)
) ||
/* slotless non-artifact items */
((otmp->otyp == ARMOR_SALVE && u.uinsight >= 66) || otmp->otyp == PRESERVATIVE_ENGINE) ||
((otmp->otyp == ARMOR_SALVE && Insight >= 66) || otmp->otyp == PRESERVATIVE_ENGINE) ||
/* chains for some */
((mtmp->mtyp == PM_CATHEZAR) && otmp->otyp == CHAIN) ||
/* better weapons */

View file

@ -78,7 +78,8 @@ const char * const objexplain[] = { /* these match def_oc_syms, above */
"splash of venom",
"broken tile or slab",
"bed or chair",
"strange coin"
"strange coin",
"belt"
};
/* Object class names. Used in object_detect(). */

View file

@ -764,16 +764,14 @@ BOOLEAN_P bld, nobadeffects;
case PM_SMALL_CAVE_LIZARD:
case PM_CAVE_LIZARD:
case PM_LARGE_CAVE_LIZARD:
if (Stoned) fix_petrification();
if (Golded) fix_petrification();
if (Stoned || Golded || Salted) fix_petrification();
break;
case PM_MANDRAKE:
if(!nobadeffects){
pline ("Oh wow! Great stuff!");
make_hallucinated(HHallucination + 200,FALSE,0L);
}
if (Stoned) fix_petrification();
if (Golded) fix_petrification();
if (Stoned || Golded || Salted) fix_petrification();
make_sick(0L, (char *) 0, TRUE, SICK_ALL);
break;
case PM_GREEN_SLIME:
@ -804,7 +802,7 @@ BOOLEAN_P bld, nobadeffects;
victual.piece = (struct obj *)0;
return;
}
if (acidic(&mons[pm]) && (Stoned || Golded))
if (acidic(&mons[pm]) && (Stoned || Golded || Salted))
fix_petrification();
break;
}
@ -825,8 +823,7 @@ struct monst *mon;
case PM_SMALL_CAVE_LIZARD:
case PM_CAVE_LIZARD:
case PM_LARGE_CAVE_LIZARD:
if (Stoned) fix_petrification();
if (Golded) fix_petrification();
if (Stoned || Golded || Salted) fix_petrification();
break;
// case PM_MANDRAKE: No blood
// if(!nobadeffects){
@ -852,7 +849,7 @@ struct monst *mon;
}
/* Fall through */
default:
if (acidic(mon->data) && (Stoned || Golded))
if (acidic(mon->data) && (Stoned || Golded || Salted))
fix_petrification();
break;
}
@ -864,6 +861,7 @@ fix_petrification()
{
Stoned = 0;
Golded = 0;
Salted = 0;
delayed_killer = 0;
if (Hallucination)
pline("What a pity - you just ruined a future piece of %sart!",

View file

@ -80,7 +80,7 @@ extern void FDECL(nethack_exit,(int));
static NEARDATA const char *deaths[] = { /* the array of death */
"died", "betrayed", "choked", "poisoned", "starvation", "drowning", /*5*/
"burning", "dissolving under the heat and pressure",
"crushed", "turned to stone", "turned to gold", "turned to glass", "turned into slime",
"crushed", "turned to stone", "turned to gold", "turned to salt", "turned to glass", "turned into slime",
"exploded after being overwound", "turned into a weeping angel", "disintegrated",
"genocided", "world ended",
"panic", "trickery",
@ -90,7 +90,7 @@ static NEARDATA const char *deaths[] = { /* the array of death */
static NEARDATA const char *ends[] = { /* "when you..." */
"died", "were betrayed", "choked", "were poisoned", "starved", "drowned",
"burned", "dissolved in the lava",
"were crushed", "turned to stone", "turned to gold", "turned to glass", "turned into slime",
"were crushed", "turned to stone", "turned to gold", "turned to salt", "turned to glass", "turned into slime",
"were overwound and exploded", "turned into a weeping angel", "were disintegrated",
"were genocided", "world ended",
"panicked", "were tricked",
@ -1164,6 +1164,18 @@ int how;
You("wish that hadn't happened.");
pline("A star flares on your right ring-finger!");
uright->spe--;
} else if(check_rot(ROT_CENT) && !(mvitals[PM_CENTIPEDE].mvflags & G_GENOD) && !HUnchanging){
lsvd = LSVD_MISC;
if (how == DISINTEGRATED) pline("A monstrous centipede crawls out of your dust!");
else pline("A monstrous centipede crawls out of your rotting body!");
struct obj *otmp, *nobj;
for(otmp = invent; otmp; otmp = nobj){
nobj = otmp->nobj;
obj_extract_and_unequip_self(otmp);
dropy(otmp);
}
polymon(PM_CENTIPEDE);
remove_rot(ROT_CENT);
} else if(check_mutation(ABHORRENT_SPORE) && !(mvitals[PM_DARK_YOUNG].mvflags & G_GENOD)){
lsvd = LSVD_SPOR;
if (how == DISINTEGRATED) pline("Your dust is consumed by the abhorrent spore!");
@ -1348,8 +1360,10 @@ die:
u.ugrave_arise = (NON_PM - 1); /* statue instead of corpse */
else if (how == GOLDING)
u.ugrave_arise = (NON_PM - 3); /* statue instead of corpse */
else if (how == GLASSED)
else if (how == SALTING)
u.ugrave_arise = (NON_PM - 4); /* statue instead of corpse */
else if (how == GLASSED)
u.ugrave_arise = (NON_PM - 5); /* statue instead of corpse */
else if (u.ugrave_arise == NON_PM &&
!(mvitals[u.umonnum].mvflags & G_NOCORPSE && !uandroid)) {
int mtyp = u.umonnum;

View file

@ -191,6 +191,8 @@ static const char *haluMesg[] = {
"I don't care if it compiles / Or makes your head explode / I want a messy makefile / I want a billion lines of code", /* Scope Creep by Radiohead by qt */
"my eternal angel form dnh soul has a gun with a spoon in it", /* Demo */
"I see you...",
"...do you see me?",
"That was a mistake.",

View file

@ -884,6 +884,7 @@ boolean dumping;
}
if (Stoned) you_are("turning to stone");
if (Golded) you_are("turning to gold");
if (Salted) you_are("turning to salt");
if (Slimed) you_are("turning into slime");
if (FrozenAir) you_are("suffocating in the cold night");
if (BloodDrown) you_are("drowning in blood");
@ -1387,11 +1388,11 @@ resistances_enlightenment()
else if(u.usanity < 100)
putstr(en_win, 0, "You are a little touched in the head.");
if(u.uinsight > 40)
if(Insight > 40)
putstr(en_win, 0, "You frequently see things you wish you hadn't.");
else if(u.uinsight > 20)
else if(Insight > 20)
putstr(en_win, 0, "You periodically see things you wish you hadn't.");
else if(u.uinsight > 1)
else if(Insight > 1)
putstr(en_win, 0, "You occasionally see things you wish you hadn't.");
if(Doubt)
@ -2563,7 +2564,7 @@ signs_mirror()
if(dimness(u.ux, u.uy) <= 0)
putstr(en_win, 0, "Your rigid features can't be seen in the dark.");
else if((ublindf && (ublindf->otyp==MASK || ublindf->otyp==R_LYEHIAN_FACEPLATE)) //face-covering mask
|| (uarmh && (uarmh->otyp==PLASTEEL_HELM || uarmh->otyp==PONTIFF_S_CROWN || uarmh->otyp==FACELESS_HELM || uarmh->otyp==IMPERIAL_ELVEN_HELM)) //opaque face-covering helm
|| (uarmh && (uarmh->otyp==PLASTEEL_HELM || uarmh->otyp==PONTIFF_S_CROWN || uarmh->otyp==FACELESS_HELM || uarmh->otyp==FACELESS_HOOD || uarmh->otyp==IMPERIAL_ELVEN_HELM)) //opaque face-covering helm
|| (uarmc && (uarmc->otyp==WHITE_FACELESS_ROBE || uarmc->otyp==BLACK_FACELESS_ROBE || uarmc->otyp==SMOKY_VIOLET_FACELESS_ROBE))//face-covering robe
) putstr(en_win, 0, "Your rigid features can't be seen through your disguise.");
else putstr(en_win, 0, "Your features have taken on the rigidity of a cheap disguise.");
@ -3190,6 +3191,39 @@ research_enlightenment()
if(check_vampire(VAMPIRE_GAZE)){
putstr(en_win, 0, " You have learned to hypnotize your prey.");
}
if(rot_count() > 0){
if(rot_count() < ROT_COUNT)
putstr(en_win, 0, " You have discovered a strange form of all-consuming rot.");
else
putstr(en_win, 0, " You have progressed your study of the cycle of rot and renewal as far as can be done in the Dungeons of Doom.");
if(check_rot(ROT_VOMIT)){
putstr(en_win, 0, " Your guts have blossomed into parasitic caterpillars.");
}
if(check_rot(ROT_WINGS)){
putstr(en_win, 0, " You fly on wings of rot.");
}
if(check_rot(ROT_CLONE)){
putstr(en_win, 0, " Strange butterflies hatch from your wings.");
}
if(check_rot(ROT_TRUCE)){
putstr(en_win, 0, " You no longer interest the beings of rot.");
}
if(check_rot(ROT_KIN)){
putstr(en_win, 0, " You are followed by the kindred of rot.");
}
if(check_rot(ROT_FEAST)){
putstr(en_win, 0, " You feast on injury and destruction.");
}
if(check_rot(ROT_CENT)){
putstr(en_win, 0, " Monstrous centipedes bore through your body.");
}
if(check_rot(ROT_STING)){
putstr(en_win, 0, " A monstrous scorpion stinger has torn loose from your flesh.");
}
if(check_rot(ROT_SPORES)){
putstr(en_win, 0, " Puffball mushrooms errupt from your skin.");
}
}
}
if(active_glyph(LUMEN) || u.ualign.god == GOD_THE_CHOIR || u.uparasitology_research){
if(parasite_count() >= 6){
@ -3214,6 +3248,9 @@ research_enlightenment()
putstr(en_win, 0, buf);
}
}
else if(Insight < 10){
putstr(en_win, 0, " You must listen beyond the veil.");
}
else {
putstr(en_win, 0, " You are unable to devise further surgical experiments.");
if(ABASE(A_INT) < 6)

View file

@ -1378,7 +1378,7 @@ dipforge(struct obj *obj)
/* If punished and wielding a hammer, there's a good chance
* you can use a forge to free yourself */
if (Punished && obj->otyp == HEAVY_IRON_BALL) {
if (Punished && obj->otyp == BALL) {
if ((uwep && !is_hammer(uwep)) || !uwep) { /* sometimes drop a hint */
if (!rn2(4))
pline("You'll need a hammer to be able to break the chain.");

View file

@ -1342,24 +1342,24 @@ domove()
if(attk) do {
/* Streaming mercurial weapons hit an aditional target if your insight is high enough */
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && otmp && is_streaming_merc(otmp)){
if(mlev(&youmonst) > 20 && (u.uinsight > 20 && YOU_MERC_SPECIAL)){
if(mlev(&youmonst) > 20 && (Insight > 20 && YOU_MERC_SPECIAL)){
result |= hit_with_streaming(&youmonst, otmp, x, y, 0, attk);
}
}
/* Rakuyo hit additional targets, if your insight is high enough to percieve the blood */
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 20 && otmp && rakuyo_prop(otmp)){
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 20 && otmp && rakuyo_prop(otmp)){
result |= hit_with_rblood(&youmonst, otmp, x, y, 0, attk);
}
/* Chikage launch blood iff you DON'T have a primary target, if your insight is high enough to percieve the blood */
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 20 && otmp && otmp->otyp == CHIKAGE && otmp->obj_material == HEMARGYOS){
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 20 && otmp && otmp->otyp == CHIKAGE && otmp->obj_material == HEMARGYOS){
result |= hit_with_cblood(&youmonst, otmp, x, y, 0, attk);
}
/* Club-claw insight weapons strike additional targets if your insight is high enough to perceive the claw */
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 15 && otmp && is_cclub_able(otmp)){
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 15 && otmp && is_cclub_able(otmp)){
result |= hit_with_cclaw(&youmonst, otmp, x, y, 0, attk);
}
/* Isamusei hit additional targets, if your insight is high enough to percieve the distortions */
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 22 && otmp && otmp->otyp == ISAMUSEI){
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 22 && otmp && otmp->otyp == ISAMUSEI){
result |= hit_with_iwarp(&youmonst, otmp, x, y, 0, attk);
}
/* Dancers hit additional targets */
@ -2837,7 +2837,7 @@ const char *msg_override;
difficulty *= 6;
if(objects[HYPERBOREAN_DIAL].oc_name_known)
difficulty -= 6;
difficulty -= u.uinsight;
difficulty -= Insight;
difficulty -= ACURR(A_INT);
if(rnd(20) >= difficulty && !(u.veil && puzzle->ovar1_puzzle_steps >= 5)){
if(u.uhyperborean_steps < 6){

View file

@ -530,7 +530,6 @@ fuzzymatch(s1, s2, ignore_chars, caseblind)
#if defined(AMIGA) && !defined(AZTEC_C) && !defined(__SASC_60) && !defined(_DCC) && !defined(__GNUC__)
extern struct tm *FDECL(localtime,(time_t *));
#endif
static struct tm *NDECL(getlt);
void
setrandom()
@ -554,7 +553,7 @@ setrandom()
srand((unsigned int) time((time_t *)0)); /*The basic rand function is always used in a few places, so seed it*/
}
static struct tm *
struct tm *
getlt()
{
time_t date;
@ -681,15 +680,13 @@ friday_13th()
int
night()
{
register int hour = getlt()->tm_hour;
return(hour < 6 || hour > 21);
return(flags.tm_hour < 6 || flags.tm_hour > 21);
}
int
midnight()
{
return(getlt()->tm_hour == 0);
return flags.tm_hour == 0;
}
//Integer hash function courtesy of Thomas Mueller via Stackoverflow

View file

@ -13,8 +13,8 @@
STATIC_DCL void NDECL(reorder_invent);
STATIC_DCL boolean FDECL(mergable,(struct obj *,struct obj *));
STATIC_DCL void FDECL(invdisp_nothing, (const char *,const char *));
STATIC_DCL boolean FDECL(worn_wield_only, (struct obj *));
STATIC_DCL boolean FDECL(only_here, (struct obj *));
STATIC_DCL boolean FDECL(worn_wield_only, (struct obj *, int));
STATIC_DCL boolean FDECL(only_here, (struct obj *, int));
#endif /* OVL1 */
STATIC_DCL void FDECL(compactify,(char *));
STATIC_DCL boolean FDECL(taking_off, (const char *));
@ -28,7 +28,7 @@ static char FDECL(display_pickinv,
static char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *));
#endif /* DUMP_LOG */
#ifdef OVLB
STATIC_DCL boolean FDECL(this_type_only, (struct obj *));
STATIC_DCL boolean FDECL(this_type_only, (struct obj *, int));
STATIC_DCL void NDECL(dounpaid);
STATIC_DCL struct obj *FDECL(find_unpaid,(struct obj *,struct obj **));
STATIC_DCL void FDECL(menu_identify, (int));
@ -1390,6 +1390,7 @@ register const char *let,*word;
(otmp->oclass == GEM_CLASS && !is_graystone(otmp) && !(otmp->otyp == ROCK)
&& otyp != CATAPSI_VORTEX && otyp != ANTIMAGIC_RIFT
&& otyp != VITAL_SOULSTONE && otyp != SPIRITUAL_SOULSTONE
&& !(otyp == CRYSTAL && otmp->obj_material == FLESH)
&& !(otyp == DILITHIUM_CRYSTAL && Role_if(PM_ANACHRONONAUT) && !otmp->oartifact)
)))
|| (!strcmp(word, "invoke") &&
@ -1714,7 +1715,7 @@ ckvalidcat(otmp)
register struct obj *otmp;
{
/* use allow_category() from pickup.c */
return((int)allow_category(otmp));
return((int)allow_category(otmp, 0));
}
STATIC_PTR int
@ -1735,8 +1736,13 @@ wearing_armor()
}
boolean
is_worn(otmp)
register struct obj *otmp;
is_worn_no_flags(struct obj *otmp)
{
return is_worn(otmp, 0);
}
boolean
is_worn(struct obj *otmp, int qflags)
{
return((boolean)(!!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_BELT | W_TOOL |
#ifdef STEED
@ -1787,7 +1793,7 @@ unsigned *resultflags;
add_valid_menu_class(0); /* reset */
if (taking_off(word)) {
takeoff = TRUE;
filter = is_worn;
filter = is_worn_no_flags;
} else if (!strcmp(word, "identify")) {
ident = TRUE;
filter = not_fully_identified;
@ -1975,7 +1981,7 @@ nextclass:
if(ilet == 'z') ilet = 'A'; else ilet++;
otmp2 = otmp->nobj;
if (olets && *olets && otmp->oclass != *olets) continue;
if (takeoff && !is_worn(otmp)) continue;
if (takeoff && !is_worn(otmp, 0)) continue;
if (ident && !not_fully_identified(otmp)) continue;
if (ckfn && !(*ckfn)(otmp)) continue;
if (!allflag) {
@ -2080,7 +2086,7 @@ int id_limit;
Sprintf(buf, "What would you like to identify %s?",
first ? "first" : "next");
n = query_objlist(buf, invent, SIGNAL_NOMENU|USE_INVLET|INVORDER_SORT|SIGNAL_ESCAPE,
&pick_list, PICK_ANY, not_fully_identified);
&pick_list, PICK_ANY, not_fully_identified_dummy_flags);
if (n > 0) {
if (n > id_limit) n = id_limit;
@ -2513,6 +2519,9 @@ struct obj *obj;
else if (obj->otyp == ANTIMAGIC_RIFT || obj->otyp == CATAPSI_VORTEX)
add_menu(win, NO_GLYPH, &any, 'a', 0, ATR_NONE,
"Crush this flawed gem", MENU_UNSELECTED);
else if (obj->otyp == CRYSTAL && obj->obj_material == FLESH)
add_menu(win, NO_GLYPH, &any, 'a', 0, ATR_NONE,
"Contemplate this crysalis", MENU_UNSELECTED);
else if (obj->otyp == MISOTHEISTIC_PYRAMID || obj->otyp == MISOTHEISTIC_FRAGMENT)
add_menu(win, NO_GLYPH, &any, 'a', 0, ATR_NONE,
"Shatter this pyramid", MENU_UNSELECTED);
@ -2844,7 +2853,7 @@ winid *datawin;
}
/* Object classes currently with no special messages here: amulets. */
if (olet == WEAPON_CLASS || (olet == TOOL_CLASS && oc.oc_skill) || otyp == HEAVY_IRON_BALL || olet == GEM_CLASS || has_artidmg) {
if (olet == WEAPON_CLASS || (olet == TOOL_CLASS && oc.oc_skill) || otyp == BALL || olet == GEM_CLASS || has_artidmg) {
int mask = attack_mask(obj, otyp, oartifact, &youmonst);
boolean otyp_is_blaster = (otyp == CARCOSAN_STING || otyp == HAND_BLASTER || otyp == ARM_BLASTER || otyp == MASS_SHADOW_PISTOL || otyp == CUTTING_LASER || otyp == RAYGUN || otyp == SHOCK_MORTAR);
boolean otyp_is_launcher = (((oc.oc_skill >= P_BOW && oc.oc_skill <= P_CROSSBOW) || otyp == ATLATL) && !otyp_is_blaster);
@ -3141,7 +3150,7 @@ winid *datawin;
}
int ldamd = objects[otyp].oc_wldam.oc_damd;
int sdamd = objects[otyp].oc_wsdam.oc_damd;
if(obj->otyp == TOOTH && u.uinsight >= 20 && obj->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(obj, &youmonst, ETRAIT_FOCUS_FIRE)){
if(obj->otyp == TOOTH && Insight >= 20 && obj->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(obj, &youmonst, ETRAIT_FOCUS_FIRE)){
if(obj->ovar1_tooth_type == MAGMA_TOOTH){
Sprintf(buf2, "Deals +5d10%s fire damage.", (obj->spe ? sitoa(obj->spe) : ""));
OBJPUTSTR(buf2);
@ -3210,10 +3219,10 @@ winid *datawin;
(3 + 2*(obj->objsize - MZ_MEDIUM)), (obj->spe ? sitoa(obj->spe) : ""));
OBJPUTSTR(buf2);
}
if(obj->otyp == DISKOS && u.uinsight >= 15){
int dice = (u.uinsight >= 45) ? 3 : ((u.uinsight >= 20) ? 2 : 1);
int lflat = (u.uinsight >= 50) ? ldamd : 0;
int sflat = (u.uinsight >= 50) ? sdamd : 0;
if(obj->otyp == DISKOS && Insight >= 15){
int dice = (Insight >= 45) ? 3 : ((Insight >= 20) ? 2 : 1);
int lflat = (Insight >= 50) ? ldamd : 0;
int sflat = (Insight >= 50) ? sdamd : 0;
if(u.ualign.record < -3 && Insanity > 50){
lflat += ldamd*(50-u.usanity)/50;
@ -3231,11 +3240,11 @@ winid *datawin;
}
if(mercy_blade_prop(obj) & !u.veil){
Sprintf(buf2, "Deals extra damage scaled by insight%s, currently %d%% extra damage.",
(u.uinsight >= 25) ? " and charisma" : "",
(min(u.uinsight, 50) + ((u.uinsight >= 25) ? min((u.uinsight-25)/2, ACURR(A_CHA)) : 0))*2);
(Insight >= 25) ? " and charisma" : "",
(min(Insight, 50) + ((Insight >= 25) ? min((Insight-25)/2, ACURR(A_CHA)) : 0))*2);
OBJPUTSTR(buf2);
if (u.uinsight >= 25){
if (Insight >= 25){
Sprintf(buf2, "Lowers struck targets' morale based on your charisma, currently -%d per hit, capped at -%d.",
ACURR(A_CHA)/5, (obj->spe + ACURR(A_CHA)));
OBJPUTSTR(buf2);
@ -3247,33 +3256,33 @@ winid *datawin;
}
if(obj->otyp == BESTIAL_CLAW && active_glyph(BEASTS_EMBRACE)){
Sprintf(buf2, "Makes struck targets vulnerable, adding stacks equal to 10%% of damage, capped at %d (scaling inversely with insight).",
(int)(30*pow(.97, u.uinsight)));
(int)(30*pow(.97, Insight)));
OBJPUTSTR(buf2);
}
if(obj->otyp == ISAMUSEI){
int factor = 20;
if(u.uinsight >= 70){
if(Insight >= 70){
factor = 4;
}
else if(u.uinsight >= 57){
else if(Insight >= 57){
factor = 5;
}
else if(u.uinsight >= 45){
else if(Insight >= 45){
factor = 6;
}
else if(u.uinsight >= 33){
else if(Insight >= 33){
factor = 8;
}
else if(u.uinsight >= 22){
else if(Insight >= 22){
factor = 10;
}
Sprintf(buf2, "Attempts to lower the target's current health by %d%% of its current value.", 100/factor);
OBJPUTSTR(buf2);
}
if(obj->otyp == PINCER_STAFF && u.uinsight >= 10){
if(obj->otyp == PINCER_STAFF && Insight >= 10){
Sprintf(buf2, "Deals double base damage %s%son consecutive attacks against the same target.",
(obj->oartifact == ART_FALLINGSTAR_MANDIBLES) ? "plus 1d12 magic damage " : "",
(u.uinsight >= 50) ? "and attempts to steal worn armor " : "");
(Insight >= 50) ? "and attempts to steal worn armor " : "");
OBJPUTSTR(buf2);
}
if(obj->oartifact == ART_ESSCOOAHLIPBOOURRR){
@ -3285,8 +3294,8 @@ winid *datawin;
OBJPUTSTR(buf2);
}
if(obj->oartifact == ART_RUINOUS_DESCENT_OF_STARS){
if (u.uinsight >= 6){
Sprintf(buf2, "Deals +%dd6 fire damage, scaling with your insight.", min(6, u.uinsight/6));
if (Insight >= 6){
Sprintf(buf2, "Deals +%dd6 fire damage, scaling with your insight.", min(6, Insight/6));
OBJPUTSTR(buf2);
}
if (NightmareAware_Insanity >= 4){
@ -3294,9 +3303,9 @@ winid *datawin;
ClearThoughts ? 1 : 2, min(12, NightmareAware_Insanity/4));
OBJPUTSTR(buf2);
}
if (u.uinsight >= 42){
if (Insight >= 42){
Sprintf(buf2, "Randomly drops falling stars on a hit, causing up to %d physical & fiery explosions centered anywhere on the level.",
min(6, (u.uinsight - 36)/6));
min(6, (Insight - 36)/6));
OBJPUTSTR(buf2);
}
}
@ -3386,7 +3395,7 @@ winid *datawin;
poisons |= OPOISON_SLEEP;
if (oartifact == ART_DIRGE)
poisons |= OPOISON_ACID;
if (check_oprop(obj, OPROP_RLYHW) && u.uinsight && rnd(u.uinsight) >= 44)
if (check_oprop(obj, OPROP_RLYHW) && Insight && rnd(Insight) >= 44)
poisons |= OPOISON_ACID;
if (poisons) {
@ -3717,33 +3726,43 @@ winid *datawin;
}
}
if(objects[otyp].expert_traits){
buf[0] = '\0';
if(obj->objsize != wielder_size(&youmonst) && obj->oartifact != ART_AMALGAMATED_SKIES){
Sprintf(buf2, "You cannot use this item's expert traits because it's the wrong size for you.");
OBJPUTSTR(buf2);
}
else {
buf[0] = '\0';
#define EXPERTTRAITS(trait, string) \
ADDCLASSPROP(CHECK_ETRAIT(obj, &youmonst, trait), string);
EXPERTTRAITS(ETRAIT_HEW, "can deliver powerful overhead blows");
EXPERTTRAITS(ETRAIT_FELL, "can disrupt enemy movement");
EXPERTTRAITS(ETRAIT_KNOCK_BACK, (objects[otyp].expert_traits&ETRAIT_KNOCK_BACK_CHARGE) ? "can charge and knock enemies back" : "can knock enemies back");
EXPERTTRAITS(ETRAIT_FOCUS_FIRE, "can target gaps in enemy armor");
EXPERTTRAITS(ETRAIT_STUNNING_STRIKE, "can deliver powerful stunning blows");
EXPERTTRAITS(ETRAIT_GRAZE, "may graze foes on a near miss");
EXPERTTRAITS(ETRAIT_STOP_THRUST, "can harness enemy momentum to deliver powerful blows");
EXPERTTRAITS(ETRAIT_PENETRATE_ARMOR, "penetrates enemy armor");
EXPERTTRAITS(ETRAIT_LONG_SLASH, "deals extra damage against lightly-armored enemies");
EXPERTTRAITS(ETRAIT_BLEED, "may deliver bleeding wounds");
EXPERTTRAITS(ETRAIT_CLEAVE, "cleaves through slain enemies");
EXPERTTRAITS(ETRAIT_LUNGE, "can be used for lunging attacks");
EXPERTTRAITS(ETRAIT_QUICK, "strikes quickly");
EXPERTTRAITS(ETRAIT_SECOND, "when wielded in the off-hand strikes a second foe after killing the first");
EXPERTTRAITS(ETRAIT_CREATE_OPENING, "creates openings for sneak attacks");
EXPERTTRAITS(ETRAIT_BRACED, "delivers powerful counterattacks");
if(buf[0] != '\0')
Sprintf(buf2, "Expert traits: %s.", buf);
else
Sprintf(buf2, "No expert traits unlocked.");
EXPERTTRAITS(ETRAIT_HEW, "can deliver powerful overhead blows");
EXPERTTRAITS(ETRAIT_FELL, "can disrupt enemy movement");
EXPERTTRAITS(ETRAIT_KNOCK_BACK, (objects[otyp].expert_traits&ETRAIT_KNOCK_BACK_CHARGE) ? "can charge and knock enemies back" : "can knock enemies back");
EXPERTTRAITS(ETRAIT_FOCUS_FIRE, "can target gaps in enemy armor");
EXPERTTRAITS(ETRAIT_STUNNING_STRIKE, "can deliver powerful stunning blows");
EXPERTTRAITS(ETRAIT_GRAZE, "may graze foes on a near miss");
EXPERTTRAITS(ETRAIT_STOP_THRUST, "can harness enemy momentum to deliver powerful blows");
EXPERTTRAITS(ETRAIT_PENETRATE_ARMOR, "penetrates enemy armor");
EXPERTTRAITS(ETRAIT_LONG_SLASH, "deals extra damage against lightly-armored enemies");
EXPERTTRAITS(ETRAIT_BLEED, "may deliver bleeding wounds");
EXPERTTRAITS(ETRAIT_CLEAVE, "cleaves through slain enemies");
EXPERTTRAITS(ETRAIT_LUNGE, "can be used for lunging attacks");
EXPERTTRAITS(ETRAIT_QUICK, "strikes quickly");
EXPERTTRAITS(ETRAIT_SECOND, "when wielded in the off-hand strikes a second foe after killing the first");
EXPERTTRAITS(ETRAIT_CREATE_OPENING, "creates openings for sneak attacks");
EXPERTTRAITS(ETRAIT_BRACED, "delivers powerful counterattacks");
EXPERTTRAITS(ETRAIT_BLADESONG, "delivers powerful blows when combined with songs or spells");
EXPERTTRAITS(ETRAIT_BLADEDANCE, "delivers powerful blows when moving and striking erratically");
if(buf[0] != '\0')
Sprintf(buf2, "Expert traits: %s.", buf);
else
Sprintf(buf2, "No expert traits unlocked.");
OBJPUTSTR(buf2);
}
}
else {
Sprintf(buf2, "No expert traits.");
OBJPUTSTR(buf2);
}
else
Sprintf(buf2, "No expert traits.");
/* other artifact weapon effects */
if (oartifact) {
register const struct artifact *oart = &artilist[oartifact];
@ -4450,6 +4469,7 @@ winid *datawin;
otyp == CRYSTAL_HELM ||
otyp == PONTIFF_S_CROWN ||
otyp == FACELESS_HELM ||
otyp == FACELESS_HOOD ||
otyp == IMPERIAL_ELVEN_HELM ||
otyp == WHITE_FACELESS_ROBE ||
otyp == BLACK_FACELESS_ROBE ||
@ -5195,9 +5215,10 @@ dounpaid()
static int this_type;
STATIC_OVL boolean
this_type_only(obj)
struct obj *obj;
this_type_only(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
return (obj->oclass == this_type);
}
@ -5823,7 +5844,7 @@ doprinuse()
char lets[52+1];
for (otmp = invent; otmp; otmp = otmp->nobj)
if (is_worn(otmp) || tool_in_use(otmp))
if (is_worn(otmp, 0) || tool_in_use(otmp))
lets[ct++] = obj_to_let(otmp);
lets[ct] = '\0';
if (!ct) You("are not wearing or wielding anything.");
@ -6235,8 +6256,7 @@ const char *hdr, *txt;
/* query_objlist callback: return things that could possibly be worn/wielded */
STATIC_OVL boolean
worn_wield_only(obj)
struct obj *obj;
worn_wield_only(struct obj *obj, int qflags)
{
return (obj->oclass == WEAPON_CLASS
|| obj->oclass == ARMOR_CLASS
@ -6373,9 +6393,10 @@ register struct obj *obj;
static coord only;
STATIC_OVL boolean
only_here(obj)
struct obj *obj;
only_here(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
return (obj->ox == only.x && obj->oy == only.y);
}

View file

@ -56,7 +56,7 @@ register struct permonst *ptr;
case PM_ICE_PARAELEMENTAL: return Is_waterlevel(&u.uz);
}
else if((ptr->mlet == S_CHA_ANGEL || ptr->mlet == S_NEU_ANGEL || ptr->mlet == S_LAW_ANGEL ) && is_minion(ptr))
return Is_astralevel(&u.uz) && u.uinsight >= 7;
return Is_astralevel(&u.uz) && Insight >= 7;
return FALSE;
}
@ -134,7 +134,7 @@ register int x, y, n;
mm.y = y;
mndx = monsndx(mtmp->data);
while(cnt--) {
if (peace_minded(mtmp->data) &&
if (peace_minded(mtmp) &&
!(is_auton(mtmp->data) && u.uevent.uaxus_foe)) continue;
/* Don't create groups of peaceful monsters since they'll get
* in our way. If the monster has a percentage chance so some
@ -168,7 +168,7 @@ register int x, y, n;
set_malign(mon);
/* if auton was going to be peaceful but you killed Axus, make it hostile and worth negative alignment */
if (is_auton(mon->data) && peace_minded(mtmp->data) && u.uevent.uaxus_foe) {
if (is_auton(mon->data) && peace_minded(mtmp) && u.uevent.uaxus_foe) {
mon->mpeaceful = 1;
mon->mavenge = 0;
set_malign(mon);
@ -751,7 +751,7 @@ boolean goodequip;
(void) mpickobj(mtmp, otmp);
} else if(ptr->mtyp == PM_GIANT_GOAT_SPAWN) {
int threshold = rnd(10)+rn2(11);
if(mtmp->female && (In_lost_cities(&u.uz)) && u.uinsight > threshold){
if(mtmp->female && (In_lost_cities(&u.uz)) && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
}
@ -1058,7 +1058,7 @@ boolean greatequip;
}
else if(mm == PM_GOAT_SPAWN) {
int threshold = rnd(10)+rn2(11);
if(mtmp->female && (In_lost_cities(&u.uz)) && u.uinsight > threshold){
if(mtmp->female && (In_lost_cities(&u.uz)) && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
}
@ -2338,6 +2338,126 @@ boolean greatequip;
(void)mongets(mtmp, SHEMAGH, mkobjflags);
(void)mongets(mtmp, ELVEN_TOGA, mkobjflags);
(void)mongets(mtmp, ELVEN_BOOTS, mkobjflags);
} else if(mm == PM_DESERT_SEER){
otmp = mongets(mtmp, FACELESS_HOOD, mkobjflags);
if(otmp){
curse(otmp);
otmp->obj_color = CLR_BLACK;
}
otmp = mongets(mtmp, HOODED_CAPELET, mkobjflags);
if(otmp){
otmp->obj_color = CLR_ORANGE;
}
(void)mongets(mtmp, GLOVES, mkobjflags);
(void)mongets(mtmp, ELVEN_BOOTS, mkobjflags);
switch(rn2(12)){
case 0:
otmp = mksobj(ELVEN_SICKLE, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SICKLE, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 1:
otmp = mksobj(ELVEN_SPEAR, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SICKLE, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 2:
otmp = mksobj(ELVEN_SHORT_SWORD, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SICKLE, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 3:
otmp = mksobj(ELVEN_SHORT_SWORD, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SHORT_SWORD, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 4:
case 5:
otmp = mksobj(HIGH_ELVEN_WARSWORD, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 6:
otmp = mksobj(ELVEN_BROADSWORD, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SHORT_SWORD, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 7:
case 8:
case 9:
otmp = mksobj(ELVEN_SCIMITAR, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SCIMITAR, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 10:
otmp = mksobj(VIPERWHIP, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SCIMITAR, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
case 11:
otmp = mksobj(VIPERWHIP, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
otmp = mksobj(ELVEN_SICKLE, mkobjflags);
if(otmp){
set_material_gm(otmp, METAL);
(void) mpickobj(mtmp, otmp);
}
break;
}
} else if(mm == PM_MYRKALFR){
mtmp->m_lev = 4;
mtmp->mhp = mtmp->mhpmax = 6*mtmp->m_lev;
@ -3184,7 +3304,7 @@ boolean greatequip;
(void) mpickobj(mtmp, otmp);
// ifdef CONVICT
} else if (mm == PM_INMATE){
(void)mongets(mtmp, rn2(2) ? HEAVY_IRON_BALL : SPOON, mkobjflags);
(void)mongets(mtmp, rn2(2) ? BALL : SPOON, mkobjflags);
(void)mongets(mtmp, STRIPED_SHIRT, mkobjflags);
// endif
} else if (mm == PM_ATTENDANT){
@ -3538,7 +3658,7 @@ boolean greatequip;
otmp->spe = 5;
(void) mpickobj(mtmp, otmp);
} else if (mm == PM_ROBERT_THE_LIFER){
otmp = mksobj(HEAVY_IRON_BALL, mkobjflags|MKOBJ_NOINIT);
otmp = mksobj(BALL, mkobjflags|MKOBJ_NOINIT);
curse(otmp);
otmp->spe = -5;
(void) mpickobj(mtmp, otmp);
@ -3904,8 +4024,8 @@ boolean greatequip;
otmp->cursed = TRUE;
// otmp->spe = -6;
(void) mpickobj(mtmp,otmp);
(void)mongets(mtmp, HEAVY_IRON_BALL, mkobjflags);
(void)mongets(mtmp, HEAVY_IRON_BALL, mkobjflags);
(void)mongets(mtmp, BALL, mkobjflags);
(void)mongets(mtmp, BALL, mkobjflags);
} else if (mm == PM_MINER) {
(void)mongets(mtmp, PICK_AXE, mkobjflags);
otmp = mksobj(LANTERN, mkobjflags);
@ -5153,7 +5273,7 @@ int mmflags;
case S_CHA_ANGEL:
{
int spe2;
boolean endgame_equip = goodequip || (In_endgame(&u.uz) && rn2(7) < u.uinsight);
boolean endgame_equip = goodequip || (In_endgame(&u.uz) && rn2(7) < Insight);
if(In_mordor_quest(&u.uz)
&& !In_mordor_forest(&u.uz)
&& !Is_ford_level(&u.uz)
@ -6467,6 +6587,7 @@ int mmflags;
rn2(2) ? mongets(mtmp, HEELED_BOOTS, mkobjflags) : mongets(mtmp, HIGH_BOOTS, mkobjflags);
break;
case 2:
(void) mongets(mtmp, rn2(3) ? HENNIN : ESCOFFION, mkobjflags);
(void) mongets(mtmp, GENTLEWOMAN_S_DRESS, mkobjflags);
(void) mongets(mtmp, VICTORIAN_UNDERWEAR, mkobjflags);
(void) mongets(mtmp, LONG_GLOVES, mkobjflags);
@ -6759,7 +6880,7 @@ int mmflags;
(void) mpickobj(mtmp, otmp);
} else if(mm == PM_SMALL_GOAT_SPAWN) {
int threshold = rnd(10)+rn2(11);
if(mtmp->female && (In_lost_cities(&u.uz)) && u.uinsight > threshold){
if(mtmp->female && (In_lost_cities(&u.uz)) && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
}
@ -8093,6 +8214,7 @@ int mmflags;
mongets(mtmp, rn2(2) ? SHOES : STILETTOS, mkobjflags);
mongets(mtmp, rn2(2) ? GENTLEMAN_S_SUIT : GENTLEWOMAN_S_DRESS, mkobjflags);
mongets(mtmp, rn2(2) ? RUFFLED_SHIRT : VICTORIAN_UNDERWEAR, mkobjflags);
mongets(mtmp, rn2(2) ? TOP_HAT : HENNIN, mkobjflags);
}
mongets(mtmp, MASK, mkobjflags);
}
@ -8129,6 +8251,7 @@ int mmflags;
mongets(mtmp, rn2(2) ? SHOES : STILETTOS, mkobjflags);
mongets(mtmp, rn2(2) ? GENTLEMAN_S_SUIT : GENTLEWOMAN_S_DRESS, mkobjflags);
mongets(mtmp, rn2(2) ? RUFFLED_SHIRT : VICTORIAN_UNDERWEAR, mkobjflags);
mongets(mtmp, rn2(2) ? TOP_HAT : HENNIN, mkobjflags);
}
mongets(mtmp, MASK, mkobjflags);
}
@ -8319,7 +8442,7 @@ int mmflags;
}
(void) mpickobj(mtmp, otmp);
int threshold = rnd(10)+rn2(11);
if(mtmp->female && u.uinsight > threshold){
if(mtmp->female && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
} else {
@ -9446,9 +9569,16 @@ int mmflags;
otmp = mksobj(JACKET, mkobjflags|MKOBJ_ARTIF);
otmp->spe = 0+rn2(4);
(void) mpickobj(mtmp, otmp);
otmp = mksobj(CAPELET, mkobjflags|MKOBJ_ARTIF);
otmp->spe = 0+rn2(4);
(void) mpickobj(mtmp, otmp);
otmp = mksobj(FEDORA, mkobjflags|MKOBJ_ARTIF);
otmp->spe = 0+rn2(4);
(void) mpickobj(mtmp, otmp);
otmp = mksobj(TRICORN, mkobjflags|MKOBJ_ARTIF);
otmp->spe = 0+rn2(4);
set_material_gm(otmp, LEATHER);
(void) mpickobj(mtmp, otmp);
otmp = mksobj(HIGH_BOOTS, mkobjflags|MKOBJ_ARTIF);
otmp->spe = 0+rn2(4);
(void) mpickobj(mtmp, otmp);
@ -9489,9 +9619,9 @@ int mmflags;
}
break;
}
} else {//not shopkeepers, deminymphs, or intoners
} else {//not shopkeepers, deminymphs, rage-walkers, or intoners
int threshold = rnd(10)+rn2(11);
if(mtmp->female && (faction == GOATMOM_FACTION) && u.uinsight > threshold){
if(mtmp->female && (faction == GOATMOM_FACTION) && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
}
@ -9608,7 +9738,7 @@ int mmflags;
}
if(ptr->mtyp == PM_FOREST_CENTAUR || ptr->mtyp == PM_PLAINS_CENTAUR || ptr->mtyp == PM_PLAINS_CENTAUR){
int threshold = rnd(10)+rn2(11);
if(mtmp->female && (faction == GOATMOM_FACTION) && u.uinsight > threshold){
if(mtmp->female && (faction == GOATMOM_FACTION) && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
}
@ -10558,7 +10688,7 @@ int mmflags;
set_material_gm(otmp, BONE);
(void) mpickobj(mtmp, otmp);
int threshold = rnd(10)+rn2(11);
if(mtmp->female && u.uinsight > threshold){
if(mtmp->female && Insight > threshold){
set_template(mtmp, MISTWEAVER);
mtmp->m_insight_level = threshold;
} else {
@ -11192,6 +11322,16 @@ boolean greatequip;
mongets(mtmp, SCIMITAR, mkobjflags);
}
}
else if(ptr->mtyp == PM_LUMINESCENT_SWARM){
otmp = mongets(mtmp, SPEAR, mkobjflags);
if(otmp) set_material_gm(otmp, METAL);
otmp = mongets(mtmp, ROUNDSHIELD, mkobjflags);
if(otmp) set_material_gm(otmp, CHITIN);
switch (rnd(3)) {
case 1: (void) mongets(mtmp, POT_EXTRA_HEALING, mkobjflags);
case 2: (void) mongets(mtmp, POT_HEALING, mkobjflags);
}
}
break;
case S_DOG:
//Escaped war-dog
@ -11312,7 +11452,7 @@ boolean greatequip;
if(chance == 100){
if(mtmp->female) mongets(mtmp, GENTLEWOMAN_S_DRESS, mkobjflags);
else mongets(mtmp, GENTLEMAN_S_SUIT, mkobjflags);
mongets(mtmp, FEDORA, mkobjflags);
mongets(mtmp, TOP_HAT, mkobjflags);
}
else if(chance >= 90) mongets(mtmp, JACKET, mkobjflags);
}
@ -11437,6 +11577,26 @@ boolean greatequip;
(void) mongets(mtmp, VICTORIAN_UNDERWEAR, mkobjflags);
(void) mongets(mtmp, LONG_GLOVES, mkobjflags);
(void) mongets(mtmp, STILETTOS, mkobjflags);
} else if(ptr->mtyp == PM_RAGE_WALKER){
#define RAGE_WALKER_ITEM(otyp) \
otmp = mksobj(otyp, NO_MKOBJ_FLAGS); \
otmp->spe = 3; \
add_oprop(otmp, OPROP_SPIKED); \
set_material_gm(otmp, IRON); \
curse(otmp); \
(void) mpickobj(mtmp, otmp);
RAGE_WALKER_ITEM(ELVEN_BOOTS)
RAGE_WALKER_ITEM(HIGH_ELVEN_PLATE)
RAGE_WALKER_ITEM(HIGH_ELVEN_GAUNTLETS)
RAGE_WALKER_ITEM(FACELESS_HELM)
/*Note: none of this is equipped */
RAGE_WALKER_ITEM(CHAIN)
RAGE_WALKER_ITEM(CHAIN)
RAGE_WALKER_ITEM(CHAIN)
RAGE_WALKER_ITEM(CHAIN)
RAGE_WALKER_ITEM(SHACKLES)
RAGE_WALKER_ITEM(BALL)
RAGE_WALKER_ITEM(BALL)
} else if(Infuture && ptr->mtyp != PM_INTONER && ptr->mtyp != PM_DEMINYMPH && ptr->mtyp != PM_NEVERWAS && ptr->mtyp != PM_CARCOSAN_COURTIER){
if(rn2(3)){
(void) mongets(mtmp, ELVEN_CLOAK, mkobjflags);
@ -12658,6 +12818,7 @@ boolean greatequip;
(void) mpickobj(mtmp, otmp);
(void) mongets(mtmp, RUFFLED_SHIRT, mkobjflags);
(void) mongets(mtmp, GENTLEMAN_S_SUIT, mkobjflags);
(void) mongets(mtmp, TOP_HAT, mkobjflags);
(void) mongets(mtmp, HIGH_BOOTS, mkobjflags);
(void) mongets(mtmp, GLOVES, mkobjflags);
(void) mongets(mtmp, SPE_CHARM_MONSTER, mkobjflags);
@ -13718,6 +13879,10 @@ boolean randmonst;
else if(randmonst && (is_animal(ptr) || mortal_race_data(ptr)) && !(ptr->geno & G_UNIQ) && Role_if(PM_UNDEAD_HUNTER) && quest_status.moon_close && Is_astralevel(&u.uz)){
mkmon_template = TONGUE_PUPPET;
}
/**/
if(check_preservation(PRESERVE_ROT_TRIGGER) && (mindless(ptr) || is_animal(ptr)) && (u.silvergrubs || !rn2(100))){
mkmon_template = SWOLLEN_TEMPLATE;
}
/* most general case at bottom -- creatures randomly being zombified */
else if(randmonst && can_undead(ptr)
#ifdef REINCARNATION
@ -13929,6 +14094,8 @@ struct monst * mon;
out_faction = ILSENSINE_FACTION;
else if(In_quest(&u.uz) && Role_if(PM_EXILE) && !peaceful)
out_faction = SEROPAENES_FACTION;
else if(rot_monster(mon) && check_rot(ROT_KIN))
out_faction = ROT_FACTION;
else if(In_quest(&u.uz) && Role_if(PM_UNDEAD_HUNTER)){
if(!peaceful)
out_faction = MOON_FACTION;
@ -14431,6 +14598,31 @@ int faction;
else if(G_C_INST(mtmp->data->geno) > 0){
mtmp->m_insight_level = G_C_INST(mtmp->data->geno)-rn2((G_C_INST(mtmp->data->geno)+3)/4);
}
//Templates
if (template != 0){
/* apply template */
set_template(mtmp, template);
/* update ptr to mtmp's new data */
ptr = mtmp->data;
/* special case: some templates increase the level of the creatures made */
int plslvl = 0;
switch (template) {
case FRACTURED:
plslvl = 4; break;
case YITH:
plslvl = 2; break;
}
if (plslvl) {
mtmp->m_lev += plslvl;
}
/* update symbol */
newsym(mtmp->mx,mtmp->my);
/* zombies and other derived undead are much less likely to have their items */
if (is_undead(mtmp->data))
allow_minvent = rn2(2);
}
if(mtmp->mtyp == PM_CHOKHMAH_SEPHIRAH)
mtmp->m_lev += u.chokhmah;
@ -14559,31 +14751,6 @@ int faction;
unsethouse = TRUE;
}
}
if (template != 0){
/* apply template */
set_template(mtmp, template);
/* update ptr to mtmp's new data */
ptr = mtmp->data;
/* special case: some templates increase the level of the creatures made */
int plslvl = 0;
switch (template) {
case FRACTURED:
plslvl = 4; break;
case YITH:
plslvl = 2; break;
}
if (plslvl) {
mtmp->m_lev += plslvl;
mtmp->mhpmax += d(plslvl, hd_size(mtmp->data));
mtmp->mhp = mtmp->mhpmax;
}
/* update symbol */
newsym(mtmp->mx,mtmp->my);
/* zombies and other derived undead are much less likely to have their items */
if (is_undead(mtmp->data))
allow_minvent = rn2(2);
}
//One-off templates like Yith should be unset immediately after being applied
if(template == YITH){
template = 0;
@ -14592,7 +14759,7 @@ int faction;
if(Race_if(PM_DROW) && in_mklev && Is_qstart(&u.uz) &&
(ptr->mtyp == PM_SPROW || ptr->mtyp == PM_DRIDER || ptr->mtyp == PM_CAVE_LIZARD || ptr->mtyp == PM_LARGE_CAVE_LIZARD)
) mtmp->mpeaceful = TRUE;
else mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(ptr);
else mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(mtmp);
if(mtmp->mfaction <= 0)
makemon_set_monster_faction(mtmp);
@ -15533,7 +15700,7 @@ int mndx;
{
if (mons[mndx].geno & (G_NOGEN | G_UNIQ)) return TRUE;
if (mvitals[mndx].mvflags & G_GONE && !In_quest(&u.uz)) return TRUE;
if (G_C_INST(mons[mndx].geno) > u.uinsight) return TRUE;
if (G_C_INST(mons[mndx].geno) > Insight) return TRUE;
if (Inhell)
return((mons[mndx].geno & (G_PLANES|G_DEPTHS)) != 0);
else if (In_endgame(&u.uz))
@ -16174,7 +16341,7 @@ int spc;
for (first = LOW_PM; first < SPECIAL_PM; first++)
if (mons[first].mlet == class
&& !(mons[first].geno & mask)
&& (G_C_INST(mons[first].geno) <= u.uinsight)
&& (G_C_INST(mons[first].geno) <= Insight)
) break;
if (first == SPECIAL_PM) return (struct permonst *) 0;
@ -16184,7 +16351,7 @@ int spc;
if (!(mvitals[last].mvflags & G_GONE && !In_quest(&u.uz))
&& !(mons[last].geno & mask)
&& !is_placeholder(&mons[last])
&& (G_C_INST(mons[last].geno) <= u.uinsight)
&& (G_C_INST(mons[last].geno) <= Insight)
) {
/* consider it */
if(num && toostrong(last, maxmlev) && monstr[last] != monstr[last-1]) break;
@ -16204,7 +16371,7 @@ int spc;
if (!(mvitals[first].mvflags & G_GONE && !In_quest(&u.uz))
&& !(mons[first].geno & mask)
&& !is_placeholder(&mons[first])
&& (G_C_INST(mons[first].geno) <= u.uinsight)
&& (G_C_INST(mons[first].geno) <= Insight)
) {
/* skew towards lower value monsters at lower exp. levels */
freq = (mons[first].geno & G_FREQ);
@ -17341,7 +17508,7 @@ int mkobjflags;
otmp->blessed = TRUE;
if (otmp->spe < 0) otmp->spe *= -1;
otmp->oerodeproof = TRUE;
if((In_endgame(&u.uz) && rn2(7) < u.uinsight) || (mkobjflags&MKOBJ_GOODEQUIP)){
if((In_endgame(&u.uz) && rn2(7) < Insight) || (mkobjflags&MKOBJ_GOODEQUIP)){
if(otmp->oclass == ARMOR_CLASS || otmp->oclass == WEAPON_CLASS || is_weptool(otmp)){
int min = 3;
if(Is_astralevel(&u.uz)){
@ -17544,27 +17711,28 @@ struct permonst *ptr;
* ( some "animal" types are co-aligned, but also hungry )
*/
boolean
peace_minded(ptr)
register struct permonst *ptr;
peace_minded(struct monst *mon)
{
int mndx = monsndx(ptr);
aligntyp mal = ptr->maligntyp, ual = u.ualign.type;
int mndx = monsndx(mon->data);
aligntyp mal = mon->data->maligntyp, ual = u.ualign.type;
if(Infuture && !in_mklev) return FALSE;
if(Race_if(PM_CLOCKWORK_AUTOMATON) && (mndx == PM_TINKER_GNOME || mndx == PM_HOOLOOVOO) ) return TRUE;
if(mndx == PM_CENTER_OF_ALL){
if(In_endgame(&u.uz) || u.uinsight > 8)
if(In_endgame(&u.uz) || Insight > 8)
return FALSE;
else if(!u.uevent.sum_entered)
return TRUE;
//else fall through
}
if(goat_monster(ptr) && u.shubbie_atten && !godlist[GOD_THE_BLACK_MOTHER].anger) return TRUE;
if(goat_monster(mon->data) && u.shubbie_atten && !godlist[GOD_THE_BLACK_MOTHER].anger) return TRUE;
if(is_undead(ptr) && mindless(ptr) && check_preservation(PRESERVE_DEAD_TRUCE)) return TRUE;
if(is_undead(mon->data) && mindless_mon(mon) && check_preservation(PRESERVE_DEAD_TRUCE)) return TRUE;
if(rot_monster(mon) && check_rot(ROT_TRUCE)) return TRUE;
if(Race_if(PM_DROW) &&
((ual == A_CHAOTIC && (!Role_if(PM_NOBLEMAN) || flags.initgend)) || (ual == A_NEUTRAL && !flags.initgend)) && /*Males can be neutral or chaotic, but a chaotic male nobleman converted to a different god*/
@ -17579,33 +17747,33 @@ register struct permonst *ptr;
if(u.uhouse &&
u.uhouse == EILISTRAEE_SYMBOL
&& is_elf(ptr) && !is_drow(ptr)
&& is_elf(mon->data) && !is_drow(mon->data)
) return TRUE;
if(u.uhouse &&
(u.uhouse == XAXOX || u.uhouse == EDDER_SYMBOL)
&& ptr->mtyp == PM_EDDERKOP
&& mon->mtyp == PM_EDDERKOP
) return TRUE;
if(u.uhouse &&
u.uhouse == GHAUNADAUR_SYMBOL
&& (ptr->mlet == S_PUDDING || ptr->mlet == S_BLOB || ptr->mlet == S_JELLY)
&& mindless(ptr)
&& (mon->data->mlet == S_PUDDING || mon->data->mlet == S_BLOB || mon->data->mlet == S_JELLY)
&& mindless_mon(mon)
) return TRUE;
if(u.uhouse &&
u.uhouse == GHAUNADAUR_SYMBOL
&& (ptr->mtyp == PM_SHOGGOTH || ptr->mtyp == PM_PRIEST_OF_GHAUNADAUR || ptr->mtyp == PM_PRIESTESS_OF_GHAUNADAUR)
&& (mon->mtyp == PM_SHOGGOTH || mon->mtyp == PM_PRIEST_OF_GHAUNADAUR || mon->mtyp == PM_PRIESTESS_OF_GHAUNADAUR)
) return TRUE;
if (ptr->mtyp == urole.ldrnum || ptr->mtyp == urole.guardnum)
if (mon->mtyp == urole.ldrnum || mon->mtyp == urole.guardnum)
return TRUE;
if (ptr->msound == MS_NEMESIS) return FALSE;
if (mon->data->msound == MS_NEMESIS) return FALSE;
if (ptr->mtyp == PM_GRAY_DEVOURER && base_casting_stat() == A_CHA) return FALSE;
if (mon->mtyp == PM_GRAY_DEVOURER && base_casting_stat() == A_CHA) return FALSE;
//As a foulness shall ye know Them.
if(goodsmeller(ptr) && u.specialSealsActive&SEAL_YOG_SOTHOTH)
if(goodsmeller(mon->data) && u.specialSealsActive&SEAL_YOG_SOTHOTH)
return FALSE;
//The painting is normally peaceful
@ -17613,8 +17781,8 @@ register struct permonst *ptr;
return((boolean)(!!rn2(6 + (u.ualign.record < -5 ? -5 : u.ualign.record))));
}
if((ptr->mtyp == PM_TREESINGER || ptr->mtyp == PM_MITHRIL_SMITH) && In_mordor_quest(&u.uz));//Not always peaceful
else if (always_peaceful(ptr)) return TRUE;
if((mon->mtyp == PM_TREESINGER || mon->mtyp == PM_MITHRIL_SMITH) && In_mordor_quest(&u.uz));//Not always peaceful
else if (always_peaceful(mon->data)) return TRUE;
if(!u.uevent.invoked && mndx==PM_UVUUDAUM && !Infuture) return TRUE;
@ -17625,7 +17793,7 @@ register struct permonst *ptr;
if(Pantheon_if(PM_SALAMANDER) && is_salamander(&mons[mndx])) return TRUE;
//Law quest uniques
if (is_auton(ptr)){
if (is_auton(mon->data)){
/* u.uevent.uaxus_foe must be checked elsewhere
* it will make autons hostile AND penalize alignment as though they had been generated peaceful */
if (sgn(mal) == sgn(ual) && (u.ualign.record >= 10 || u.uevent.uaxus_foe))
@ -17637,19 +17805,19 @@ register struct permonst *ptr;
if (mndx==PM_OONA && u.ualign.record >= 20 && u.ualign.sins < 10 && sgn(mal) == sgn(ual)) return TRUE;
//Always hostility, with exception for vampireness and law quest insects
if (always_hostile(ptr) &&
(u.uz.dnum != law_dnum || !(is_social_insect(ptr) || is_mercenary(ptr))
if (always_hostile(mon->data) &&
(u.uz.dnum != law_dnum || !(is_social_insect(mon->data) || is_mercenary(mon->data))
|| (!on_level(&arcadia1_level,&u.uz) && !on_level(&arcadia2_level,&u.uz) && !on_level(&arcadia3_level,&u.uz))
) && (!is_vampire(ptr) || !is_vampire(youracedata))
) && (!is_vampire(mon->data) || !is_vampire(youracedata))
) return FALSE;
if(Role_if(PM_VALKYRIE) && (mndx==PM_CROW || mndx==PM_RAVEN)) return TRUE;
if(u.silver_atten && sflm_target_data(ptr))
if(u.silver_atten && sflm_target_data(mon->data))
return FALSE;
if (race_peaceful(ptr)) return TRUE;
if (race_hostile(ptr)) return FALSE;
if (race_peaceful(mon->data)) return TRUE;
if (race_hostile(mon->data)) return FALSE;
/* the monster is hostile if its alignment is different from the
@ -17658,13 +17826,13 @@ register struct permonst *ptr;
* A_NONE: Done by a special function.
*/
if(ual == A_NONE){
if(conflicting_unaligned_alignment(u.ualign.god, ptr))
if(conflicting_unaligned_alignment(u.ualign.god, mon->data))
return FALSE;
}
else if (sgn(mal) != sgn(ual)) return FALSE;
/* minions are hostile to players that have strayed at all */
if (is_minion(ptr)) return((boolean)(u.ualign.record >= 0));
if (is_minion(mon->data)) return((boolean)(u.ualign.record >= 0));
/* Negative monster hostile to player with Amulet. */
if (mal < A_NEUTRAL && u.uhave.amulet) return FALSE;

View file

@ -355,6 +355,7 @@ choose_magic_special(struct monst *mtmp, unsigned int type, int i)
{
int clrc_spell_power;
int wzrd_spell_power;
boolean youagr = (mtmp == &youmonst);
if(mtmp->m_id == 0){
clrc_spell_power = rn2(u.ulevel) * 18 / 30;
wzrd_spell_power = rn2(u.ulevel) * 24 / 30;
@ -1798,6 +1799,24 @@ choose_magic_special(struct monst *mtmp, unsigned int type, int i)
case PM_SHOGGOTH:
if(!rn2(20)) return SUMMON_MONS;
else return 0;
case PM_TETTIGON_LEGATUS:
case PM_UNMASKED_TETTIGON:
case PM_TRANSCENDENT_TETTIGON:
if(!youagr && !mtmp->mpeaceful && distmin(mtmp->mux, mtmp->muy, x(mtmp), y(mtmp)) < 3 && rn2(2))
return MON_WARP_THROW;
switch(rnd(8)){
case 1: return PSI_BOLT;
case 2: return FORCE_SPHERES;
case 3: return MON_WARP;
case 4: return MON_WARP_THROW;
case 5: return HOLY_BOLT;
case 6: return PAIN_BOLT;
case 7: return VULNERABILITY;
case 8: return STUN_YOU;
}
case PM_SILVERMAN:
case PM_SILVERGRUB:
return PEST_THREADS;
case PM_VERIER:
if(!rn2(3)) return WEAKEN_YOU;
else return DESTRY_ARMR;
@ -2258,7 +2277,9 @@ const char * spellname[] =
"MADF_BURST",
"HOLY_BOLT",
"MIST_WOLVES",
//106
//105
"FORCE_SPHERES",
"PEST_THREADS",
};
@ -2479,7 +2500,7 @@ xcasty(struct monst *magr, struct monst *mdef, struct attack *attk, int tarx, in
else {
if(magr->mrage && magr->mberserk)
spell_skill /= 2;
if(magr->mformication || magr->mscorpions)
if(magr->mformication || magr->mscorpions || magr->mcaterpillars)
spell_skill /= 2;
if(magr->msciaphilia && unshadowed_square(x(magr), y(magr)))
spell_skill /= 2;
@ -2571,10 +2592,10 @@ xcasty(struct monst *magr, struct monst *mdef, struct attack *attk, int tarx, in
magr->mux = magr->muy = 0;
}
}
if(result == MM_HIT && magr && !youagr && magr->mfaction == NECROMANCY_FACTION && magr->mtyp != PM_ELVEN_WRAITH && u.uinsight >= 15 && spellnum && mdef){
if(result == MM_HIT && magr && !youagr && magr->mfaction == NECROMANCY_FACTION && magr->mtyp != PM_ELVEN_WRAITH && Insight >= 15 && spellnum && mdef){
struct monst *wraith = makemon(&mons[PM_ELVEN_WRAITH], magr->mx, magr->my, MM_ESUM|MM_ADJACENTOK|NO_MINVENT);
if(wraith){
mark_mon_as_summoned(wraith, magr, u.uinsight/5, 0);
mark_mon_as_summoned(wraith, magr, Insight/5, 0);
wraith->m_insight_level = 15;
wraith->m_lev = magr->m_lev;
wraith->mpeaceful = magr->mpeaceful;
@ -2591,7 +2612,7 @@ xcasty(struct monst *magr, struct monst *mdef, struct attack *attk, int tarx, in
if(result == MM_HIT && magr && !youagr && magr->mtyp == PM_SPELLWEAVER_GODDESS_MOCKER && spellnum && mdef){
struct monst *wraith = makemon(&mons[PM_SILVERFIRE_SHADOW_S_WRAITH], magr->mx, magr->my, MM_ESUM|MM_ADJACENTOK|NO_MINVENT);
if(wraith){
mark_mon_as_summoned(wraith, magr, u.uinsight/5, 0);
mark_mon_as_summoned(wraith, magr, Insight/5, 0);
wraith->m_insight_level = magr->m_insight_level;
wraith->m_lev = max(1, magr->m_lev-6);
wraith->mpeaceful = magr->mpeaceful;
@ -3716,10 +3737,10 @@ int tary;
if(distmin(x(magr), y(magr), x(mdef), y(mdef)) <= mlev(magr)/10+1 && !resist(mdef, '\0', 0, NOTELL)){
if(!youdef){
mdef->mcanmove = 0;
mdef->mfrozen = min_ints(7, max(mdef->mfrozen, u.uinsight/11));
mdef->mfrozen = min_ints(7, max(mdef->mfrozen, Insight/11));
}
else {
mdef->movement -= u.uinsight/11;
mdef->movement -= Insight/11;
}
}
if(!youdef && cansee(x(mdef),y(mdef)))
@ -3729,7 +3750,7 @@ int tary;
if (Shock_res(mdef)) {
shieldeff(mdef->mx, mdef->my);
} else {
dmg = d(min(10, u.uinsight/11*2),6);
dmg = d(min(10, Insight/11*2),6);
}
}
return xdamagey(magr, mdef, attk, dmg);
@ -4862,6 +4883,51 @@ int tary;
}
return xdamagey(magr, mdef, attk, dmg);
case PEST_THREADS:
/* needs direct target */
if (!foundem) {
impossible("sticky threads with no mdef?");
return MM_MISS;
}
else {
int n = 0;
int i;
char * rays;
for(i = 0; i < dmn; i++)
if (zap_hit(mdef, 0, TRUE))
n++;
if(dmn > 1 && dmn == n)
n *= 2;
if (!n){
if (youagr || youdef || canseemon(mdef))
pline("Sticky threads whizz past %s!",
youdef ? "you" : mon_nam(mdef));
return MM_MISS;
}
if (n == 1)
rays = "a sticky thread";
if (n >= 2)
rays = "sticky threads";
if (youagr || youdef || canseemon(mdef))
pline("%s %s %s by %s!",
youdef ? "You" : Monnam(mdef), youdef ? "are" : "is",
dmn < n ? "torn apart" : "torn",
rays);
int ndmg;
for(i = 0; i < n; i++){
ndmg = d(n, hd_size(mdef->data)) - (youdef ? roll_udr(magr, ROLL_SLOT) : roll_mdr(mdef, magr, ROLL_SLOT));
if(ndmg < 1)
ndmg = 1;
dmg += ndmg;
}
dmg = reduce_dmg(mdef,dmg,TRUE,TRUE);
}
return xdamagey(magr, mdef, attk, dmg);
case MON_WARP_THROW:
/* needs direct target */
if (!foundem) {
@ -4880,9 +4946,14 @@ int tary;
do{
dx = rn2(3) - 1;
dy = rn2(3) - 1;
//Reduce odds of being flung into an adjacent wall
if(!isok(x(mdef)+dx,y(mdef)+dy) || !ZAP_POS(levl[x(mdef)+dx][y(mdef)+dy].typ)){
dx = rn2(3) - 1;
dy = rn2(3) - 1;
}
} while(
!(dx || dy) &&
!(dx == x(mdef) - x(magr) && dy == y(mdef) - y(magr))
!(dx == x(magr) - x(mdef) && dy == y(magr) - y(mdef))
);
if(youdef){
hurtle(dx, dy, BOLT_LIM, FALSE, FALSE);
@ -4927,7 +4998,7 @@ int tary;
Is_rogue_level(&u.uz) ||
#endif
(In_endgame(&u.uz) && !Is_earthlevel(&u.uz)));
otmp = mksobj(iron ? HEAVY_IRON_BALL : BOULDER, MKOBJ_NOINIT);
otmp = mksobj(iron ? BALL : BOULDER, MKOBJ_NOINIT);
otmp->quan = 1;
otmp->owt = weight(otmp);
if (iron) otmp->owt += 160 * rn2(2);
@ -5515,6 +5586,31 @@ int tary;
}
}
return MM_HIT;
case FORCE_SPHERES:{
int i = 0;
int n;
struct monst *mtmp;
int maketame = ((magr->mtame || youagr) ? MM_EDOG : 0);
int makesum = MM_ESUM;
for(n = (dmg+5)/6; n > 0; n--){
mtmp = makemon(&mons[PM_SPHERE_OF_FORCE], x(magr), y(magr), MM_ADJACENTOK|MM_ADJACENTSTRICT|maketame|makesum);
if (mtmp) {
/* time out */
if(makesum)
mark_mon_as_summoned(mtmp, magr, mlev(magr) + rnd(mlev(magr)), 0);
/* can be peaceful */
if(magr->mpeaceful)
mtmp->mpeaceful = TRUE;
/* can be tame */
if (maketame) {
initedog(mtmp);
}
/* bonus movement */
mtmp->movement = 3*NORMAL_SPEED;
}
}
}
return MM_HIT;
case INSECTS:
if (!(tarx || tary)) {
@ -6467,7 +6563,7 @@ int tary;
dist2(tarx, tary, cmon->mx, cmon->my) <= 3 * 3 + 1
)
{
dmg = rnd(dmn);
dmg = d(dmn, dmd);
if (Half_spel(mdef))
dmg = (dmg + 1) / 2;
if (Magic_res(mdef))
@ -6480,7 +6576,7 @@ int tary;
if (!(youagr || magr->mtame)
&& dist2(tarx, tary, u.ux, u.uy) <= 3 * 3 + 1)
{
dmg = rnd(dmn);
dmg = d(dmn, dmd);
if (Half_spel(mdef))
dmg = (dmg + 1) / 2;
if (Magic_res(mdef))
@ -6737,6 +6833,7 @@ int spellnum;
)) ||
spellnum == RAISE_DEAD ||
spellnum == TIME_DUPLICATE ||
spellnum == FORCE_SPHERES ||
spellnum == CLONE_WIZ
)
return TRUE;
@ -6793,6 +6890,7 @@ int spellnum;
case MADF_BURST:
case STARFALL:
case MON_AURA_BOLT:
case PEST_THREADS:
return TRUE;
default:
break;
@ -7276,7 +7374,7 @@ int tary;
))
return TRUE;
/* Don't de-stone the player */
if (youdef && (Stoned || Golded) && (
if (youdef && (Stoned || Golded || Salted) && (
spellnum == ACID_RAIN
))
return TRUE;

View file

@ -527,8 +527,7 @@ long num;
* in the nobj chain (and nexthere chain when on the floor).
*/
struct obj *
duplicate_obj(obj)
struct obj *obj;
duplicate_obj(struct obj *obj, boolean same_chain)
{
struct obj *otmp;
@ -545,7 +544,7 @@ struct obj *obj;
struct obj *cntdup;
struct obj **curcobj = &(otmp->cobj);
for(struct obj *cntobj = obj->cobj; cntobj; cntobj = cntobj->nobj){
cntdup = duplicate_obj(cntobj);
cntdup = duplicate_obj(cntobj, TRUE);
if(cntdup){
obj_extract_self(cntdup);
//Note: don't use the normal add to container function, or it will reverse the order of cobj
@ -561,11 +560,18 @@ struct obj *obj;
if (!otmp->o_id) otmp->o_id = flags.ident++; /* ident overflowed */
otmp->lamplit = 0; /* not lit, yet */
otmp->owornmask = 0L; /* new object isn't worn */
obj->nobj = otmp;
/* Only set nexthere when on the floor, nexthere is also used */
/* as a back pointer to the container object when contained. */
if (obj->where == OBJ_FLOOR)
obj->nexthere = otmp;
if(same_chain){
obj->nobj = otmp;
/* Only set nexthere when on the floor, nexthere is also used */
/* as a back pointer to the container object when contained. */
if (obj->where == OBJ_FLOOR)
obj->nexthere = otmp;
}
else {
otmp->where = OBJ_FREE;
otmp->nobj = 0;
otmp->nexthere = 0;
}
register int ox_id;
for (ox_id=0; ox_id<NUM_OX; ox_id++)
@ -2729,7 +2735,7 @@ int mat;
case GOLD_BLADED_VIBROZANBATO:
if(mat != GOLD) obj->otyp = WHITE_VIBROZANBATO;
break;
// case HEAVY_IRON_BALL:
// case BALL:
// obj->otyp = ;
// break;
// case CHAIN:
@ -2945,7 +2951,7 @@ register struct obj *obj;
return eaten_stat((int)obj->quan * wt, obj);
} else if (obj->oclass == COIN_CLASS)
return gold_weight(obj->quan);
else if (obj->otyp == HEAVY_IRON_BALL && obj->owt != 0)
else if (obj->otyp == BALL && obj->owt != 0)
return((int)(obj->owt)); /* kludge for "very" heavy iron ball */
return((wt || obj->oartifact) ? wt*(int)obj->quan : ((int)obj->quan + 1)>>1);
}

264
src/mon.c
View file

@ -669,7 +669,7 @@ register struct monst *mtmp;
}
num = d(2,4);
while(num--)
obj = mksobj_at(HEAVY_IRON_BALL, x, y, NO_MKOBJ_FLAGS);
obj = mksobj_at(BALL, x, y, NO_MKOBJ_FLAGS);
rem_mx(mtmp, MX_ENAM);
otmp = mksobj(MACE, NO_MKOBJ_FLAGS);
otmp = oname(otmp, artiname(ART_FIELD_MARSHAL_S_BATON));
@ -1649,7 +1649,7 @@ register struct monst *mtmp;
}
} else {
/* but eels have a difficult time outside */
if (mtmp->data->mlet == S_EEL && !Is_waterlevel(&u.uz)) {
if ((mtmp->data->mflagsm&MM_AQUATIC) && !Is_waterlevel(&u.uz)) {
/* Puddles can sustain a tiny sea creature, or lessen the burdens of a larger one */
if (!(inshallow && mtmp->data->msize == MZ_TINY))
{
@ -1786,6 +1786,9 @@ mcalcdistress()
if(mtmp->mscorpions){
phantom_scorpions_sting(mtmp);
}
if(mtmp->mcaterpillars){
rot_caterpillars_bite(mtmp);
}
if(mtmp->mvermin){
int damage = d(10,10);
damage -= avg_mdr(mtmp);
@ -1871,6 +1874,7 @@ struct monst *mtmp;
mtmp->mflamemarked = FALSE;
mtmp->mibitemarked = FALSE;
mtmp->myoumarked = FALSE;
mtmp->mironmarked = FALSE;
/* gradually time out temporary problems */
if (mtmp->mblinded && !--mtmp->mblinded)
@ -2020,7 +2024,14 @@ movemon()
mtmp->mprev_attk.x = 0;
mtmp->mprev_attk.y = 0;
}
if(mtmp->m_insight_level > u.uinsight
if(u.specialSealsActive&SEAL_LIVING_CRYSTAL)
average_dogs();
if(mtmp->m_insight_level > Insight && !mtmp->mcan && mtmp->mtyp == PM_TRANSCENDENT_TETTIGON){
set_mon_data(mtmp, PM_UNMASKED_TETTIGON);
mtmp->m_insight_level -= 35;
newsym(x(mtmp), y(mtmp));
}
if(mtmp->m_insight_level > Insight
|| (mtmp->mtyp == PM_WALKING_DELIRIUM && BlockableClearThoughts)
|| (mtmp->mtyp == PM_STRANGER && !quest_status.touched_artifact)
|| ((mtmp->mtyp == PM_PUPPET_EMPEROR_XELETH || mtmp->mtyp == PM_PUPPET_EMPRESS_XEDALLI) && mtmp->mvar_yellow_lifesaved)
@ -2198,7 +2209,14 @@ movemon()
if(mtmp->m_ap_type == M_AP_FURNITURE ||
mtmp->m_ap_type == M_AP_OBJECT)
continue;
if(mtmp->mundetected) continue;
if(mtmp->mundetected){
if(mtmp->mtyp == PM_INCARNATOR_MAGGOT){
if(!rn2(6)){
incarnator_spawn(mtmp->mx, mtmp->my, FALSE);
}
}
continue;
}
}
if (minliquid(mtmp)) continue;
@ -3386,7 +3404,7 @@ mfndpos(mon, poss, info, flag)
nowtyp = levl[x][y].typ;
nodiag = (mdat->mtyp == PM_GRID_BUG) || (mdat->mtyp == PM_BEBELITH);
wantpool = mdat->mlet == S_EEL;
wantpool = (mdat->mflagsm&MM_AQUATIC);
wantdry = !wantpool;
puddleispool = (wantpool && mdat->msize == MZ_TINY) || (wantdry && is_iron(mon));
@ -3469,11 +3487,12 @@ nexttry:
continue;
if((mdat->mtyp == PM_GRUE) && isdark(mon->mx, mon->my) && !isdark(nx, ny))
continue;
if((mdat->mtyp == PM_WATCHER_IN_THE_WATER || mdat->mtyp == PM_KETO || mdat->mtyp == PM_ARCHIPELAGO_ANCIENT) &&
if((mdat->mtyp == PM_WATCHER_IN_THE_WATER || mdat->mtyp == PM_KETO ||
mdat->mtyp == PM_ARCHIPELAGO_ANCIENT || mdat->mtyp == PM_TETTIGON_LEGATUS) &&
!no_upos(mon) &&
distmin(nx, ny, mon->mux, mon->muy) <= 3 &&
dist2(nx, ny, mon->mux, mon->muy) <= dist2(mon->mx, mon->my, mon->mux, mon->muy)) continue;
if((mdat->mtyp == PM_WATCHER_IN_THE_WATER) &&
if((mdat->mtyp == PM_WATCHER_IN_THE_WATER || mdat->mtyp == PM_TETTIGON_LEGATUS) &&
onlineu(nx, ny) && (lined_up(mon) || !rn2(4))) continue;
if(witw && dist2(nx, ny, witw->mx, witw->my) > 32 &&
dist2(nx, ny, witw->mx, witw->my) >= dist2(mon->mx, mon->my, witw->mx, witw->my)) continue;
@ -3918,7 +3937,13 @@ boolean actual; /* actual attack or faction check? */
return 0L;
if(magr->mfaction == mdef->mfaction && mdef->mfaction == MOON_FACTION)
return 0L;
if(magr->mfaction == mdef->mfaction && mdef->mfaction == ROT_FACTION)
return 0L;
// rot kin attack almost anything
if(magr->mfaction == ROT_FACTION || mdef->mfaction == ROT_FACTION) {
return ALLOW_M|ALLOW_TM;
}
// dreadblossoms attack almost anything
if(ma->mtyp == PM_DREADBLOSSOM_SWARM &&
!(is_fey(md) || is_plant(md))
@ -4477,22 +4502,23 @@ struct monst *mtmp;
boolean messaged = FALSE;
int lifesavers = 0;
int i;
#define LSVD_ANA 0x0001 /* anachrononaut quest */
#define LSVD_IAS 0x0002 /* Iasoian Archon grants recovery */
#define LSVD_HLO 0x0004 /* Halo (Blessed) */
#define LSVD_UVU 0x0008 /* uvuuduam + prayerful thing */
#define LSVD_ASC 0x0010 /* drained the life from another */
#define LSVD_OBJ 0x0020 /* lifesaving items */
#define LSVD_ILU 0x0040 /* illuminated */
#define LSVD_TWN 0x0080 /* twin sibling */
#define LSVD_FRC 0x0100 /* fractured kamerel */
#define LSVD_NBW 0x0200 /* nitocris's black wraps */
#define LSVD_YEL 0x0400 /* Cannot die unless on the Astral Plane */
#define LSVD_PLY 0x0800 /* polypoids */
#define LSVD_NIT 0x1000 /* Nitocris becoming a ghoul */
#define LSVD_KAM 0x2000 /* kamerel becoming fractured */
#define LSVD_ALA 0x4000 /* alabaster decay */
#define LSVD_FLS 0x8000 /* God of flesh claims body */
#define LSVD_ANA 0x00000001 /* anachrononaut quest */
#define LSVD_IAS 0x00000002 /* Iasoian Archon grants recovery */
#define LSVD_HLO 0x00000004 /* Halo (Blessed) */
#define LSVD_UVU 0x00000008 /* uvuuduam + prayerful thing */
#define LSVD_ASC 0x00000010 /* drained the life from another */
#define LSVD_TRA 0x00000020 /* Transforms */
#define LSVD_OBJ 0x00000040 /* lifesaving items */
#define LSVD_ILU 0x00000080 /* illuminated */
#define LSVD_TWN 0x00000100 /* twin sibling */
#define LSVD_FRC 0x00000200 /* fractured kamerel */
#define LSVD_NBW 0x00000400 /* nitocris's black wraps */
#define LSVD_YEL 0x00000800 /* Cannot die unless on the Astral Plane */
#define LSVD_PLY 0x00001000 /* polypoids */
#define LSVD_NIT 0x00002000 /* Nitocris becoming a ghoul */
#define LSVD_KAM 0x00004000 /* kamerel becoming fractured */
#define LSVD_ALA 0x00008000 /* alabaster decay */
#define LSVD_FLS 0x00010000 /* God of flesh claims body */
#define LSVDLAST LSVD_FLS /* last lifesaver */
/* set to kill */
@ -4515,6 +4541,8 @@ struct monst *mtmp;
|| is_alabaster_mummy(mtmp->data)
)))
lifesavers |= LSVD_ALA;
if (mtmp->mtyp == PM_TETTIGON_LEGATUS)
lifesavers |= LSVD_TRA;
if (Infuture && mtmp->mpeaceful && !is_myrkalfr(mtmp) && !nonliving(mtmp->data) && !is_android(mtmp->data))
lifesavers |= LSVD_FLS;
if (has_template(mtmp, FRACTURED) && !rn2(2) && !mtmp->mcan)
@ -4618,11 +4646,41 @@ struct monst *mtmp;
/* restore level, maxhp */
if (mtmp->m_lev < 38)
mtmp->m_lev = 38;
if (mtmp->mhpmax < 171) /* 171 = 38x4.5 = avg(38d8) */
mtmp->mhpmax = 171;
if (mtmp->mhpmax < 38*hd_size(mtmp->data))
mtmp->mhpmax = 38*hd_size(mtmp->data);
/* set mspec_used */
mtmp->mspec_used = mtmp->mhpmax / 5;
break;
case LSVD_TRA:{
struct obj *otmp;
/* message */
if (couldsee(mtmp->mx, mtmp->my)) {
messaged = TRUE;
pline("But wait...");
pline("A glowing crack forms around the head!");
}
/* restore level, maxhp */
if (mtmp->m_lev < 16)
mtmp->m_lev = 16;
if (mtmp->mhpmax < 16*hd_size(mtmp->data))
mtmp->mhpmax = 16*hd_size(mtmp->data);
if(mtmp->mcan)
set_mcan(mtmp, FALSE);
otmp = mksobj_at(ENCOUNTER_EXOSKELETON, mtmp->mx, mtmp->my, NO_MKOBJ_FLAGS);
if(otmp){
otmp->quan = 1;
if(stoned)
set_material(otmp, MINERAL);
else if(golded)
set_material(otmp, GOLD);
else if(glassed)
set_material(otmp, GLASS);
fix_object(otmp);
}
set_mon_data(mtmp, Insight > 40 ? PM_TRANSCENDENT_TETTIGON : PM_UNMASKED_TETTIGON);
mtmp->m_insight_level = 5+rn2(6);
newsym(x(mtmp), y(mtmp));
}break;
case LSVD_ASC:{
struct monst *victim = random_plague_victim();
struct obj *sacked_victim = 0;
@ -5345,6 +5403,8 @@ int adtyp;
case PM_DUNGEON_FERN_SPORE:
case PM_APHANACTONAN_AUDIENT:
return EXPL_NOXIOUS;
case PM_SPHERE_OF_FORCE:
return EXPL_GRAY;
case PM_SWAMP_FERN_SPORE:
return EXPL_MAGICAL;
case PM_BURNING_FERN_SPORE:
@ -5643,6 +5703,10 @@ boolean was_swallowed; /* digestion */
for(i = 0; i<30; i++) makemon(&mons[PM_LEMURE], mon->mx, mon->my, MM_ADJACENTOK);
return (FALSE);
}
else if(adtyp == AD_OMUD){
int i;
for(i=0; i<39; i++) incarnator_spawn(mon->mx, mon->my, TRUE);
}
else if( ( (aatyp == AT_NONE && mdat->mtyp==PM_GREAT_CTHULHU)
|| aatyp == AT_BOOM)
&& adtyp == AD_POSN
@ -6699,6 +6763,12 @@ xkilled(mtmp, dest)
if (corpse_chance(mtmp, (struct monst *)0, FALSE)){
corpse = make_corpse(mtmp);
}
if(mtmp->mironmarked && (
is_elf(mtmp->data)
|| is_fey(mtmp->data)
)){
u.uz.rage++;
}
if(mtmp->mibitemarked){
mtmp->mflamemarked = FALSE;
mtmp->mgoatmarked = FALSE;
@ -7077,6 +7147,7 @@ boolean severe; /* Powerful poison that partially overcomes poison resistance
pline_The("poison was quite debilitating...");
printed = TRUE;
}
IMPURITY_UP(u.uimp_poison)
}
if (i <= 5) {
drain = -rn1(3, 3);
@ -8447,6 +8518,41 @@ struct monst *mtmp;
}
}
STATIC_OVL void
mark_item_chain_summoned(struct obj *otmp, struct monst *mon, int duration)
{
for (; otmp; otmp = otmp->nobj) {
if(otmp->cobj)
mark_item_chain_summoned(otmp->cobj, mon, duration);
if (!get_ox(otmp, OX_ESUM)) {
/* add component to obj */
add_ox(otmp, OX_ESUM);
otmp->oextra_p->esum_p->summoner = mon;
otmp->oextra_p->esum_p->sm_id = mon->m_id;
otmp->oextra_p->esum_p->sm_o_id = 0;
otmp->oextra_p->esum_p->summonstr = 0;
otmp->oextra_p->esum_p->sticky = 0;
otmp->oextra_p->esum_p->permanent = (duration == ESUMMON_PERMANENT);
otmp->oextra_p->esum_p->staleptr = 0;
/* add timer to obj */
start_timer(duration, TIMER_OBJECT, DESUMMON_OBJ, (genericptr_t)otmp);
}
else {
/* already marked as summoned -- double-check it's the right mon */
if (otmp->oextra_p->esum_p->summoner != mon)
impossible("%s already attached to %s, cannot attach to %s",
xname(otmp), m_monnam(otmp->oextra_p->esum_p->summoner), m_monnam(mon));
else {
/* change duration, if applicable */
if (duration != ESUMMON_PERMANENT) {
otmp->oextra_p->esum_p->permanent = 0;
adjust_timer_duration(get_timer(otmp->timed, DESUMMON_OBJ), duration - ESUMMON_PERMANENT);
}
}
}
}
}
/* marks `mon` as being summoned by the summoner, which causes it to vanish after duration expires or summoner dies */
/* its inventory at time of marking is set to vanish when `mon` dies */
void
@ -8495,39 +8601,7 @@ int flags;
}
}
#endif
struct obj * otmp, * pobj = 0;
for (otmp = mon->minvent; otmp || (pobj && pobj->where == OBJ_CONTAINED); otmp = otmp->nobj) {
if(otmp)
while(otmp->cobj) {pobj = otmp; otmp = otmp->cobj;}
else
otmp = pobj->ocontainer;
if (!get_ox(otmp, OX_ESUM)) {
/* add component to obj */
add_ox(otmp, OX_ESUM);
otmp->oextra_p->esum_p->summoner = mon;
otmp->oextra_p->esum_p->sm_id = mon->m_id;
otmp->oextra_p->esum_p->sm_o_id = 0;
otmp->oextra_p->esum_p->summonstr = 0;
otmp->oextra_p->esum_p->sticky = 0;
otmp->oextra_p->esum_p->permanent = (duration == ESUMMON_PERMANENT);
otmp->oextra_p->esum_p->staleptr = 0;
/* add timer to obj */
start_timer(duration, TIMER_OBJECT, DESUMMON_OBJ, (genericptr_t)otmp);
}
else {
/* already marked as summoned -- double-check it's the right mon */
if (otmp->oextra_p->esum_p->summoner != mon)
impossible("%s already attached to %s, cannot attach to %s",
xname(otmp), m_monnam(otmp->oextra_p->esum_p->summoner), m_monnam(mon));
else {
/* change duration, if applicable */
if (duration != ESUMMON_PERMANENT) {
otmp->oextra_p->esum_p->permanent = 0;
adjust_timer_duration(get_timer(otmp->timed, DESUMMON_OBJ), duration - ESUMMON_PERMANENT);
}
}
}
}
mark_item_chain_summoned(mon->minvent, mon, duration);
}
struct monst *
@ -10505,6 +10579,80 @@ struct monst *mdef;
}
}
void
rot_caterpillars_bite(struct monst *mdef)
{
int damage = 0;
if(mdef == &youmonst){
IMPURITY_UP(u.uimp_rot)
if (!Sick_res(mdef)) {
if(!Sick) make_sick((long)rn1(ACURR(A_CON), 20), "rotting caterpillars", TRUE, SICK_NONVOMITABLE);
damage += (*hp(mdef))*3.3/100 + 26;
}
else {
damage += (*hp(mdef))*2/100 + 8;
}
You("are bitten by a swarm of parasitic caterpillars!");
losehp(damage, "a swarm of parasitic caterpillars", KILLED_BY);
if(has_blood(youracedata)){
Your("blood is being drained!");
IMPURITY_UP(u.uimp_blood)
if(!rn2(3) && !Drain_res(mdef)){
losexp("life force drain", TRUE, FALSE, FALSE);
}
}
}
else {
if (!Sick_res(mdef)) {
damage += (!rn2(10)) ? 100 : rnd(12);
damage += (*hp(mdef))*3.3/100 + 26;
}
else {
damage += (*hp(mdef))*2/100 + 8;
}
if(has_blood_mon(mdef) && !rn2(3) && !Drain_res(mdef)){
pline("%s suddenly seems weaker!", Monnam(mdef));
if(!mdef->m_lev)
damage += mdef->mhpmax;
else mdef->m_lev--;
mdef->mhpmax -= (hd_size(mdef->data)+1)/2;
mdef->mhpmax = max(mdef->mhpmax, 1);
mdef->mhp = min(mdef->mhpmax, mdef->mhp);
}
if(m_losehp(mdef, damage, FALSE, "swarm of parasitic caterpillars")); //died
else if (canseemon(mdef))
pline("%s is bitten by parasitic caterpillars.", Monnam(mdef));
}
}
void
orc_mud_stabs(struct monst *mdef)
{
int damage = 0;
int number = rnd(3);
damage += d(number, 2);
if(mdef == &youmonst)
damage -= roll_udr_detail((struct monst *)0, 0x1<<rn2(5), W_ARMC, ROLL_SLOT);
else
damage -= roll_mdr_detail(mdef, (struct monst *)0, 0x1<<rn2(5), W_ARMC, ROLL_SLOT);
damage = max(damage, 1);
if (!Acid_res(mdef)) {
damage += d(number, 2) + d(number, 10);
}
if(mdef == &youmonst){
You("are stabbed by the writhing tarry mud!");
losehp(damage, "a swarm of parasitic caterpillars", KILLED_BY);
}
else {
if(m_losehp(mdef, damage, FALSE, "inchoate orcs")); //died
else if (canseemon(mdef))
pline("%s is bitten by parasitic caterpillars.", Monnam(mdef));
}
}
#endif /* OVLB */
/*mon.c*/

View file

@ -42,6 +42,11 @@ boolean state;
{
boolean weap_attack, xwep_attack;
mon->mcan = state;
if(mon->mcan && mon->mtyp == PM_UNMASKED_TETTIGON){
set_mon_data(mon, PM_TRANSCENDENT_TETTIGON);
mon->m_insight_level += 35;
mon->mvar1_tettigon_uncancel = TRUE;
}
set_mon_data_core(mon, mon->data);
weap_attack = mon_attacktype(mon, AT_WEAP) ? TRUE : FALSE;
xwep_attack = mon_attacktype(mon, AT_XWEP) ? TRUE : FALSE;
@ -213,6 +218,7 @@ int newpm;
//mon->mvar_lucksucker = 0;
//mon->mvar_star_vampire_blood = 0;
//mon->mvar_spellweaver_count = 0;
//mon->mvar1_tettigon_uncancel = 0;
mon->mvar1 = 0;
break;
}
@ -583,6 +589,7 @@ int template;
ptr->mflagsg &= ~(MG_HATESHOLY);
ptr->mflagsa |= (MA_MINION);
ptr->mflagsw |= (MW_ELDER_EYE_PLANES);
ptr->light_radius = max(3, ptr->light_radius);
break;
case PSEUDONATURAL:
/* flags */
@ -995,6 +1002,10 @@ int template;
ptr->mmove = 15;
break;
case SWOLLEN_TEMPLATE:
ptr->msize = MZ_GIGANTIC;
ptr->geno |= (G_NOCORPSE);
break;
}
#undef MT_ITEMS
@ -1172,7 +1183,7 @@ int template;
if ((attk->aatyp == AT_GAZE || attk->aatyp == AT_WDGZ) && !haseyes(ptr))
{
boolean needs_magr_eyes;
getgazeinfo(attk->aatyp, attk->adtyp, ptr, (struct monst *) 0, (struct monst *) 0, &needs_magr_eyes, (boolean *)0, (boolean *)0);
getgazeinfo(attk->aatyp, attk->adtyp, ptr, (struct monst *) 0, (struct monst *) 0, &needs_magr_eyes, (boolean *)0, (boolean *)0, (boolean *)0);
if (needs_magr_eyes == TRUE)
{
/* remove attack */
@ -1571,6 +1582,23 @@ int template;
attk->damd = 3;
special = TRUE;
}
/* swollen monsters's attacks are generally stronger */
if (template == SWOLLEN_TEMPLATE && (
!is_null_attk(attk))
)
{
int delta = ptr->msize - mons[ptr->mtyp].msize;
if (attk->damn < 3)
attk->damd += delta*2;
else
attk->damn += delta;
if(ptr->mmove){
ptr->mmove /= 2;
if(ptr->mmove < 6)
ptr->mmove = 6;
}
}
}
#undef insert_okay
#undef end_insert_okay
@ -2144,7 +2172,7 @@ int atyp, dtyp;
struct attack *a;
for (a = &ptr->mattk[0]; a < &ptr->mattk[NATTK]; a++){
if (a->ins_req <= u.uinsight && a->aatyp == atyp && (dtyp == AD_ANY || a->adtyp == dtyp))
if (a->ins_req <= Insight && a->aatyp == atyp && (dtyp == AD_ANY || a->adtyp == dtyp))
return a;
}
@ -2159,7 +2187,7 @@ int dtyp;
struct attack *a;
for (a = &ptr->mattk[0]; a < &ptr->mattk[NATTK]; a++){
if (a->ins_req <= u.uinsight && (dtyp == AD_ANY || a->adtyp == dtyp))
if (a->ins_req <= Insight && (dtyp == AD_ANY || a->adtyp == dtyp))
return a;
}
@ -2672,7 +2700,7 @@ struct obj *obj; /* aatyp == AT_WEAP, AT_SPIT */
o = (mdef == &youmonst) ? invent : mdef->minvent;
for ( ; o; o = o->nobj){
if ((o->owornmask & W_ARMH) &&
(o->otyp == find_vhelm() || o->otyp == CRYSTAL_HELM || o->otyp == PLASTEEL_HELM || o->otyp == PONTIFF_S_CROWN || o->otyp == FACELESS_HELM || (o->otyp == IMPERIAL_ELVEN_HELM && check_imp_mod(o, IEA_BLIND_RES)))
(o->otyp == find_vhelm() || o->otyp == CRYSTAL_HELM || o->otyp == PLASTEEL_HELM || o->otyp == PONTIFF_S_CROWN || o->otyp == FACELESS_HELM || o->otyp == FACELESS_HOOD || (o->otyp == IMPERIAL_ELVEN_HELM && check_imp_mod(o, IEA_BLIND_RES)))
) return FALSE;
if ((o->owornmask & W_ARMC) &&
(o->otyp == WHITE_FACELESS_ROBE
@ -3199,6 +3227,7 @@ static const short grownups[][2] = {
{PM_DUNGEON_FERN_SPROUT, PM_DUNGEON_FERN},
{PM_SWAMP_FERN_SPROUT, PM_SWAMP_FERN},
{PM_BURNING_FERN_SPROUT, PM_BURNING_FERN},
{PM_SILVERGRUB, PM_SILVERMAN},
{NON_PM,NON_PM}
};
@ -3577,6 +3606,8 @@ struct permonst *ptr;
size = 4;
else if(ptr->mtyp == PM_ANCIENT_OF_DEATH)
size = 20;
else if(ptr->mtyp == PM_TETTIGON_LEGATUS || ptr->mtyp == PM_UNMASKED_TETTIGON || ptr->mtyp == PM_TRANSCENDENT_TETTIGON)
size = 16;
else switch(ptr->msize){
case MZ_TINY:
size = 4;

View file

@ -439,7 +439,7 @@ scaryItem(mtmp)
struct monst *mtmp;
{
if (mtmp->isshk || mtmp->isgd || mtmp->iswiz || is_blind(mtmp) ||
mtmp->mpeaceful || mtmp->data->mlet == S_HUMAN ||
mtmp->mpeaceful || (mtmp->data->mlet == S_HUMAN && !mtmp->mtemplate) ||
is_lminion(mtmp) || mtmp->mtyp == PM_ANGEL ||
is_rider(mtmp->data) || mtmp->mtyp == PM_MINOTAUR)
return(FALSE);
@ -460,7 +460,7 @@ struct monst *mtmp;
if(u.ualign.type == A_VOID) return FALSE;
if(LOLTH_HIGH_POWER){
if (mtmp->isshk || mtmp->isgd || mtmp->iswiz || is_blind(mtmp) ||
mtmp->mpeaceful || mtmp->data->mlet == S_HUMAN ||
mtmp->mpeaceful || (mtmp->data->mlet == S_HUMAN && !mtmp->mtemplate) ||
(is_rider(mtmp->data))
)
return(FALSE);
@ -481,7 +481,8 @@ struct monst *mtmp;
if(Infuture) return FALSE;
if(ELBERETH_HIGH_POWER){
if (mtmp->isshk || mtmp->isgd || mtmp->iswiz || is_blind(mtmp) ||
mtmp->mpeaceful || mtmp->data->mlet == S_HUMAN ||
mtmp->mpeaceful ||
(mtmp->data->mlet == S_HUMAN && !mtmp->mtemplate) ||
is_lminion(mtmp) || mtmp->mtyp == PM_ANGEL ||
(is_rider(mtmp->data) && !(mtmp->mtyp == PM_NAZGUL)) ||
mtmp->mtyp == PM_MINOTAUR)
@ -496,7 +497,7 @@ struct monst *mtmp;
}
else{
if (mtmp->isshk || mtmp->isgd || mtmp->iswiz || is_blind(mtmp) ||
mtmp->mpeaceful || mtmp->data->mlet == S_HUMAN ||
mtmp->mpeaceful || (mtmp->data->mlet == S_HUMAN && !mtmp->mtemplate) ||
is_lminion(mtmp) || mtmp->mtyp == PM_ANGEL ||
(is_rider(mtmp->data) && !(mtmp->mtyp == PM_NAZGUL)) ||
mtmp->mtyp == PM_MINOTAUR)
@ -542,8 +543,10 @@ boolean digest_meal;
mon->mhp -= rnd(6);
if(hates_silver(mon->data) && entangle_material(mon, SILVER))
mon->mhp -= rnd(20);
if(hates_iron(mon->data) && (entangle_material(mon, IRON) || entangle_material(mon, GREEN_STEEL)))
if(hates_iron(mon->data) && (entangle_material(mon, IRON) || entangle_material(mon, GREEN_STEEL))){
mon->mhp -= rnd(mon->m_lev);
mon->mironmarked = TRUE;
}
if(hates_unholy_mon(mon) && entangle_material(mon, GREEN_STEEL))
mon->mhp -= d(2,9);
beat = entangle_beatitude(mon, -1);
@ -802,7 +805,7 @@ boolean fleemsg;
mtmp->mspec_used = 10;
for(tmpm = fmon; tmpm; tmpm = tmpm->nmon){
if(tmpm != mtmp && !DEADMONSTER(tmpm)){
if(tmpm->mpeaceful != mtmp->mpeaceful && !resist(tmpm, 0, 0, FALSE)){
if(tmpm->mpeaceful != mtmp->mpeaceful && !resist(tmpm, RING_CLASS, 0, 0)){
tmpm->mconf = 1;
}
}
@ -872,7 +875,7 @@ int *inrange, *nearby, *scared;
}
if(mtmp->mtyp == PM_DAUGHTER_OF_BEDLAM && !rn2(20)) *scared = TRUE;
else if(mtmp->mtyp == PM_CARCOSAN_COURTIER && *nearby && !mtmp->mflee && (u.uinsight < 25 || mtmp->m_id%2)) *scared = TRUE;
else if(mtmp->mtyp == PM_CARCOSAN_COURTIER && *nearby && !mtmp->mflee && (Insight < 25 || mtmp->m_id%2)) *scared = TRUE;
else if(*nearby && !mtmp->mflee && fleetflee(mtmp->data) && (mtmp->data->mmove > youracedata->mmove || noattacks(mtmp->data))) *scared = TRUE;
if(*scared) {
@ -1011,8 +1014,13 @@ register struct monst *mtmp;
makemon(&mons[PM_GNOLL], mtmp->mx, mtmp->my, NO_MINVENT|MM_ADJACENTOK|MM_ADJACENTSTRICT);
}
}
if(mdat->mtyp == PM_INCARNATOR_MAGGOT){
if(!rn2(3)){ //Twice as likely when active
incarnator_spawn(mtmp->mx, mtmp->my, FALSE);
}
}
if(mdat->mtyp == PM_FORD_GUARDIAN){
if(!rn2(2) && distmin(mtmp->mux, mtmp->muy, mtmp->mx, mtmp->my) < 4 && distmin(u.ux, u.uy, mtmp->mx, mtmp->my) < 4 && !(mtmp->mstrategy&STRAT_WAITFORU)){
if(!rn2(2) && distmin(mtmp->mux, mtmp->muy, mtmp->mx, mtmp->my) < BOLT_LIM && distmin(u.ux, u.uy, mtmp->mx, mtmp->my) < BOLT_LIM && !(mtmp->mstrategy&STRAT_WAITFORU)){
ford_rises(mtmp);
}
}
@ -1079,7 +1087,7 @@ register struct monst *mtmp;
&& !mtmp->mtame
&& !Is_astralevel(&u.uz)
&& (near_capacity()>UNENCUMBERED || u.ulevel < 14 || mtmp->mpeaceful)
&& (near_capacity()>SLT_ENCUMBER || mtmp->mpeaceful || u.uinsight < 2 || (u.uinsight < 32 && !rn2(u.uinsight)))
&& (near_capacity()>SLT_ENCUMBER || mtmp->mpeaceful || Insight < 2 || (Insight < 32 && !rn2(Insight)))
&& (near_capacity()>MOD_ENCUMBER || !rn2(4))
){
int nlev;
@ -1137,8 +1145,9 @@ register struct monst *mtmp;
if (mtmp->mdoubt && !rn2(300)) mtmp->mdoubt = 0;
if (mtmp->mwounded_legs && !rn2(60)) mtmp->mwounded_legs = 0;
if (mtmp->mscorpions && !rn2(20)) mtmp->mscorpions = 0;
if (mtmp->mcaterpillars && !rn2(20)) mtmp->mcaterpillars = 0;
if(mtmp->msleeping && (mtmp->mformication || mtmp->mscorpions) && rn2(mtmp->m_lev)){
if(mtmp->msleeping && (mtmp->mformication || mtmp->mscorpions || mtmp->mcaterpillars) && rn2(mtmp->m_lev)){
//Awakens from the bugs. High level is good for it here.
mtmp->msleeping = 0;
}
@ -1566,7 +1575,7 @@ register struct monst *mtmp;
}
}
if (mtmp->mtyp == PM_ITINERANT_PRIESTESS && u.uinsight >= 40 && !straitjacketed_mon(mtmp)){
if (mtmp->mtyp == PM_ITINERANT_PRIESTESS && Insight >= 40 && !straitjacketed_mon(mtmp)){
struct monst *patient = 0;
int i, j, x, y, rot = rn2(3);
for(i = -1; i < 2; i++){
@ -1941,7 +1950,7 @@ register struct monst *mtmp;
u.umadness |= MAD_DREAMS;
}
if(mdat->mtyp == PM_FOETID_ANGEL){
make_doubtful((long) u.uinsight,TRUE);
make_doubtful((long) Insight,TRUE);
}
if (mdat->mtyp == PM_ELDER_BRAIN) {
for (m2 = fmon; m2; m2 = nmon) {
@ -2283,7 +2292,7 @@ int x;
int y;
{
int i;
for(i = 1; i < 2; i++){
for(i = -1; i < 2; i++){
if(isok(x+i,y+i) && !is_pool(x+i,y+i,FALSE) && ZAP_POS(levl[x+i][y+i].typ))
return TRUE;
}

File diff suppressed because it is too large Load diff

View file

@ -687,7 +687,7 @@ int *weapon, *secweapon, *rweapon, *rwammo, *armor, *shirt, *cloak, *helm, *boot
#ifdef PM_CONVICT
case PM_CONVICT:
if (rn2(4)) *weapon = FLAIL;
else if(rn2(3)) *weapon = HEAVY_IRON_BALL;
else if(rn2(3)) *weapon = BALL;
else *weapon = SPOON;
if(special){
*helm = find_vhelm();
@ -924,8 +924,8 @@ int *weapon, *secweapon, *rweapon, *rwammo, *armor, *shirt, *cloak, *helm, *boot
break;
}
*armor = JACKET;
*helm = FEDORA;
*cloak = CLOAK;
*helm = TRICORN;
*cloak = CAPELET;
*gloves = GLOVES;
*boots = HIGH_BOOTS;
break;

View file

@ -387,7 +387,7 @@ struct monst * magr;
return 8;
}
if(magr->mformication || magr->mscorpions)
if(magr->mformication || magr->mscorpions || magr->mcaterpillars)
return 4;
switch (m_martial_skill(magr->data)) {
@ -505,7 +505,7 @@ int whodidit; /* 1==hero, 0=other, -1==just check whether it'll pass thru */
if (whodidit ? hero_breaks(otmp, x, y, FALSE) : breaks(otmp, x, y))
*obj_p = otmp = 0; /* object is now gone */
/* breakage makes its own noises */
else if (obj_type == BOULDER || obj_type == STATUE || obj_type == HEAVY_IRON_BALL)
else if (obj_type == BOULDER || obj_type == STATUE || obj_type == BALL)
pline("Whang!");
else if (otmp->oclass == COIN_CLASS ||
otmp->obj_material == GOLD ||

View file

@ -261,7 +261,7 @@ struct monst *mtmp;
struct trap *t;
int x=mtmp->mx, y=mtmp->my;
boolean stuck = (mtmp == u.ustuck);
boolean immobile = (mtmp->data->mmove == 0);
boolean immobile = (mtmp->data->mmove == 0) || stationary_mon(mtmp);
int fraction;
if (is_animal(mtmp->data) && mindless_muse_mon(mtmp))
@ -602,7 +602,7 @@ struct monst *mtmp;
if (otmp)
pline("%s %s a unicorn horn!", Monnam(mtmp), is_weeping(mtmp->data) ? "is using" : "uses");
else if(mtmp->mtyp == PM_ITINERANT_PRIESTESS && !straitjacketed_mon(mtmp)){
if(u.uinsight < 40){
if(Insight < 40){
pline("A glow issues from somewhere around %s torso, but trying to see the exact source gives you a %sache!", s_suffix(mon_nam(mtmp)), body_part(HEAD));
}
else {
@ -2077,7 +2077,7 @@ struct monst *mtmp;
int x = mtmp->mx, y = mtmp->my;
struct trap *t;
int xx, yy;
boolean immobile = (mdat->mmove == 0);
boolean immobile = (mdat->mmove == 0) || stationary_mon(mtmp);
boolean stuck = (mtmp == u.ustuck);
boolean nomouth = nomouth(mtmp->mtyp)
|| ((mtmp->misc_worn_check & W_ARMH) && which_armor(mtmp, W_ARMH) && FacelessHelm(which_armor(mtmp, W_ARMH)))
@ -2483,6 +2483,7 @@ museamnesia:
mtmp->mformication = 0;
mtmp->mscorpions = 0;
mtmp->mvermin = 0;
mtmp->mcaterpillars = 0;
} else {
if (vismon) pline("%s looks angry and confused!", Monnam(mtmp));
untame(mtmp, 0);
@ -2542,7 +2543,7 @@ museamnesia:
if (vismon){
pline("%s flicks a whip towards your %s!", Monnam(mtmp), hand);
}
if (obj->otyp == HEAVY_IRON_BALL) {
if (obj->otyp == BALL) {
pline("%s fails to wrap around %s.", The_whip, the_weapon);
return 1;
}

View file

@ -817,7 +817,8 @@ play_song()
///* songs only have effect after the 1st turn */
//if (song_delay <= songs[song_played].level+2)
switch (song_being_played()) {
int song_id = song_being_played();
switch (song_id) {
case SNG_SLEEP:
sleep_song(distance);
break;
@ -850,6 +851,10 @@ play_song()
break;
}
if(ACURR(A_CHA) == 25)
u.bladesong = monstermoves + 8 + songs[song_id].level;
else
u.bladesong = monstermoves + (ACURR(A_CHA) - 10)/2 + songs[song_id].level;
song_delay--;
if (song_delay <= 0) {
reset_song();

View file

@ -1383,17 +1383,17 @@ void
set_isamusei_color(obj)
struct obj *obj;
{
if(u.uinsight >= 70){
if(Insight >= 70){
obj->obj_color = CLR_MAGENTA;
} else if(u.uinsight >= 57){
} else if(Insight >= 57){
obj->obj_color = CLR_BRIGHT_MAGENTA;
} else if(u.uinsight >= 45){
} else if(Insight >= 45){
obj->obj_color = CLR_BRIGHT_BLUE;
} else if(u.uinsight >= 33){
} else if(Insight >= 33){
obj->obj_color = CLR_BRIGHT_CYAN;
} else if(u.uinsight >= 22){
} else if(Insight >= 22){
obj->obj_color = CLR_BRIGHT_GREEN;
} else if(u.uinsight >= 10){
} else if(Insight >= 10){
obj->obj_color = CLR_YELLOW;
} else {
obj->obj_color = CLR_ORANGE;

View file

@ -244,7 +244,7 @@ WEAPON(("dagger"),
1, 1, MZ_SMALL, 20, 10, 4, 2, P, P_DAGGER, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_QUICK|ETRAIT_SECOND|ETRAIT_FOCUS_FIRE)),
WEAPON(("elven dagger", "runed dagger"),
DMG(D(5)), DMG(D(3)),
0, 1, MZ_SMALL, 7, 3, 4, 4, P, P_DAGGER, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_QUICK|ETRAIT_SECOND|ETRAIT_FOCUS_FIRE)),
0, 1, MZ_SMALL, 7, 3, 4, 4, P, P_DAGGER, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_QUICK|ETRAIT_SECOND|ETRAIT_FOCUS_FIRE|ETRAIT_BLADESONG)),
WEAPON(("droven dagger", "dagger"), /*Needs encyc entry*/
DMG(D(8)), DMG(D(6)),
0, 1, MZ_SMALL, 0, 5, 12, 4, P, P_DAGGER, OBSIDIAN_MT, UNIDED, CLR_BLACK, O_TRAITS(ETRAIT_QUICK|ETRAIT_SECOND|ETRAIT_FOCUS_FIRE)),
@ -291,7 +291,7 @@ WEAPON(("sickle"), /* Vs plants: +6 to hit and double damage */
1, 1, MZ_SMALL, 19, 20, 4, -2, S, P_HARVEST, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_BLEED)),
WEAPON(("elven sickle", "runed sickle"), /* Vs plants: +6 to hit and double damage *//*Needs tile*/
DMG(D(6)), DMG(D(3)),
0, 1, MZ_SMALL, 0, 5, 4, 0, S, P_HARVEST, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_BLEED)),
0, 1, MZ_SMALL, 0, 5, 4, 0, S, P_HARVEST, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_BLEED|ETRAIT_BLADESONG)),
WEAPON(("saw cleaver"),
DMG(D(6)), DMG(D(4)),
1, 0, MZ_SMALL, 1, 60, 4, 1, S, P_HARVEST, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_BLEED)),
@ -330,7 +330,7 @@ WEAPON(("short sword"),
1, 0, MZ_SMALL, 7, 30, 10, 0, P, P_SHORT_SWORD, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_FOCUS_FIRE|ETRAIT_CREATE_OPENING)),
WEAPON(("elven short sword", "runed short sword"),
DMG(D(7)), DMG(D(7)),
0, 0, MZ_SMALL, 2, 10, 10, 2, P, P_SHORT_SWORD, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_FOCUS_FIRE|ETRAIT_CREATE_OPENING)),
0, 0, MZ_SMALL, 2, 10, 10, 2, P, P_SHORT_SWORD, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_FOCUS_FIRE|ETRAIT_CREATE_OPENING|ETRAIT_BLADESONG)),
WEAPON(("droven short sword", "short sword"), /*Needs encyc entry*/
DMG(D(9)), DMG(D(9)),
0, 0, MZ_SMALL, 0, 15, 10, 2, P, P_SHORT_SWORD, OBSIDIAN_MT, UNIDED, CLR_BLACK, O_TRAITS(ETRAIT_FOCUS_FIRE|ETRAIT_CREATE_OPENING)),
@ -372,9 +372,12 @@ WEAPON(("hunter's shortsword"),
WEAPON(("scimitar", "curved sword"),
DMG(D(8)), DMG(D(8)),
0, 0, MZ_MEDIUM, 13, 40, 15, 0, S, P_SCIMITAR, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_LONG_SLASH)),
WEAPON(("elven scimitar", "runed curved sword"),
DMG(D(6), F(2)), DMG(D(6), F(1)),
0, 0, MZ_MEDIUM, 0, 12, 15, 2, S, P_SCIMITAR, WOOD, FALSE, HI_METAL, O_TRAITS(ETRAIT_LONG_SLASH|ETRAIT_BLADEDANCE)),
WEAPON(("high-elven warsword", "runed curved sword"), /*Needs encyc entry*/
DMG(D(10), D(6)), DMG(D(10), D(6)),
0, 0, MZ_HUGE, 1, 75,150, 2, S, P_SCIMITAR, MITHRIL, UNIDED, HI_MITHRIL, O_TRAITS(ETRAIT_HEW|ETRAIT_FELL|ETRAIT_CLEAVE|ETRAIT_LONG_SLASH)),
0, 0, MZ_HUGE, 1, 75,150, 2, S, P_SCIMITAR, MITHRIL, UNIDED, HI_MITHRIL, O_TRAITS(ETRAIT_HEW|ETRAIT_FELL|ETRAIT_CLEAVE|ETRAIT_LONG_SLASH|ETRAIT_BLADESONG|ETRAIT_BLADEDANCE)),
WEAPON(("bow-blade", "recurved sword"),
DMG(D(8)), DMG(D(8)),
@ -411,7 +414,7 @@ WEAPON(("broadsword", "basket-hilted sword"),
0, 0, MZ_LARGE, 8, 70, 10, 0, S, P_BROAD_SWORD, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_GRAZE)),
WEAPON(("elven broadsword", "runed broadsword"), /*Needs encyc entry*/
DMG(D(6), D(4)), DMG(D(6), F(2)),
0, 0, MZ_LARGE, 4, 20, 10, 2, S, P_BROAD_SWORD, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_GRAZE|ETRAIT_FOCUS_FIRE)),
0, 0, MZ_LARGE, 4, 20, 10, 2, S, P_BROAD_SWORD, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_BLADEDANCE|ETRAIT_GRAZE|ETRAIT_BLADESONG)),
WEAPON(("long sword"), /*Needs encyc entry*/
DMG(D(8)), DMG(D(12)),
1, 0, MZ_MEDIUM, 44, 40, 15, 0, S|P, P_LONG_SWORD, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_GRAZE|ETRAIT_FOCUS_FIRE|ETRAIT_STOP_THRUST)),
@ -521,7 +524,7 @@ WEAPON(("gold-bladed vibrospear", "long black and gold spear", "long spear"),/*N
0, 0, MZ_LARGE, 0, 30,1000, 2, P|S, P_LANCE, GOLD, FALSE, CLR_BLACK, O_MAGIC(1), O_TRAITS(ETRAIT_STOP_THRUST|ETRAIT_BRACED|ETRAIT_LUNGE|ETRAIT_FOCUS_FIRE)),
WEAPON(("elven lance", "runed lance"), /*Needs encyc entry*//*Needs tile*/
DMG(D(8)), DMG(D(8)),
0, 0, MZ_LARGE, 0, 60, 10, 2, P, P_LANCE, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_STOP_THRUST|ETRAIT_BRACED|ETRAIT_PENETRATE_ARMOR|ETRAIT_LUNGE)),
0, 0, MZ_LARGE, 0, 60, 10, 2, P, P_LANCE, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_STOP_THRUST|ETRAIT_BRACED|ETRAIT_PENETRATE_ARMOR|ETRAIT_LUNGE|ETRAIT_BLADESONG)),
WEAPON(("droven lance", "lance"), /*Needs encyc entry*//*Needs tile*/
DMG(D(12)), DMG(D(12)),
0, 0, MZ_HUGE, 0, 60, 10, 2, P, P_LANCE, OBSIDIAN_MT, UNIDED, CLR_BLACK, O_TRAITS(ETRAIT_STOP_THRUST|ETRAIT_BRACED|ETRAIT_PENETRATE_ARMOR|ETRAIT_LUNGE)),
@ -573,7 +576,7 @@ WEAPON(("great mace"),
1, 0, MZ_HUGE, 5,140, 50, 0, B, P_MACE, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_HEW|ETRAIT_STUNNING_STRIKE|ETRAIT_KNOCK_BACK|ETRAIT_KNOCK_BACK_CHARGE|ETRAIT_PENETRATE_ARMOR)),
WEAPON(("elven mace", "runed mace"), /*Needs encyc entry*/
DMG(D(7), F(3)), DMG(D(7)),
0, 0, MZ_MEDIUM, 0, 10, 5, 2, B, P_MACE, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_HEW|ETRAIT_STUNNING_STRIKE|ETRAIT_PENETRATE_ARMOR)),
0, 0, MZ_MEDIUM, 0, 10, 5, 2, B, P_MACE, WOOD, FALSE, HI_WOOD, O_TRAITS(ETRAIT_HEW|ETRAIT_STUNNING_STRIKE|ETRAIT_PENETRATE_ARMOR|ETRAIT_BLADEDANCE)),
WEAPON(("tonitrus", "thunder mace"),
DMG(D(10), F(1)), DMG(D(10)),
0, 0, MZ_MEDIUM, 0, 40,500, 0, B, P_MACE, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_HEW|ETRAIT_STUNNING_STRIKE)),
@ -620,7 +623,7 @@ WEAPON(("double sword"), /*Needs encyc entry*/
1, 0, MZ_HUGE, 1, 80, 30, 0, S|P, P_QUARTERSTAFF, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_CLEAVE)),
WEAPON(("kamerel vajra", "short mace"), /*Needs encyc entry*/
DMG(D(6)), DMG(D(6)), /* very different dice for different litness states */
0, 0, MZ_MEDIUM, 0, 10,800, 1, S|E, P_MACE, GOLD, UNIDED, HI_GOLD, O_NOWISH(1), O_TRAITS(ETRAIT_GRAZE|ETRAIT_PENETRATE_ARMOR)),
0, 0, MZ_MEDIUM, 0, 10,800, 1, S|E, P_MACE, GOLD, UNIDED, HI_GOLD, O_NOWISH(1)),
WEAPON(("bar"),
DMG(D(8)), DMG(D(6)),
1, 0, MZ_HUGE, 0, 400, 10,-10, B, P_QUARTERSTAFF, IRON, IDED|UNIDED, HI_METAL, O_TRAITS(ETRAIT_HEW|ETRAIT_FELL|ETRAIT_STUNNING_STRIKE|ETRAIT_KNOCK_BACK|ETRAIT_KNOCK_BACK_CHARGE)),
@ -656,7 +659,7 @@ WEAPON(("bestial claw"), /*Needs encyc entry*/
1, 0, MZ_MEDIUM, 0, 10,100, 0, S|P, P_BARE_HANDED_COMBAT, BONE, FALSE, CLR_WHITE, O_MAGIC(1)),
WEAPON(("katar"), /*Needs encyc entry*/
DMG(D(6)), DMG(D(4)),
1, 0, MZ_SMALL, 5, 5, 4, 0, S|P, P_BARE_HANDED_COMBAT, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_CREATE_OPENING)),
1, 0, MZ_SMALL, 5, 5, 4, 0, S|P, P_BARE_HANDED_COMBAT, IRON, FALSE, HI_METAL, O_TRAITS(ETRAIT_CREATE_OPENING|ETRAIT_PENETRATE_ARMOR)),
WEAPON(("shanta-pata", "ornate gauntlet-sword"), /*Needs encyc entry*/
DMG(D(8)), DMG(D(12)),
0, 0, MZ_MEDIUM, 1, 40, 125, 0, S|P, P_BARE_HANDED_COMBAT, METAL, FALSE, HI_METAL, O_TRAITS(ETRAIT_FOCUS_FIRE|ETRAIT_STOP_THRUST)),
@ -815,6 +818,14 @@ HELM(("sunlight maggot", "parasitic insectoid"),
0, 0, 0, 1, 10, 200,9, 2, 0, CHITIN, CLR_BROWN),
HELM(("fedora"),
1, 0, 0, 0, 3, 1,10, 0, 0, CLOTH, CLR_BROWN),
HELM(("tricorn"),
1, 0, 0, 0, 3, 10,10, 0, 0, CLOTH, CLR_BROWN),
HELM(("top hat"),
1, 0, 0, 0, 3, 100,10, 0, 0, CLOTH, CLR_BLACK),
HELM(("escoffion", "heart-shaped hat"),
0, 0, 0, 0, 3, 100,10, 0, 0, CLOTH, CLR_WHITE),
HELM(("hennin", "conical hat"),
0, 0, 0, 0, 3, 100,10, 0, 0, CLOTH, CLR_BRIGHT_MAGENTA),
HELM(("cornuthaum", "conical hat"),
0, 1, 3, 1, 4, 80,10, 0, 2, CLOTH, CLR_BLUE, O_POWER(CLAIRVOYANT)),
HELM(("witch hat", "wide-brimmed conical hat"),
@ -845,6 +856,8 @@ HELM(("pontiff's crown", "filigreed faceless helm"), /*Needs encyc entry*//*Need
0, 0, 0, 2, 90, 300, 8, 5, 0, GOLD, HI_GOLD, O_MATSPEC(IDED)),
HELM(("shemagh", "headscarf"), /*Needs encyc entry*//*Needs tile*/
0, 0, 0, 0, 5, 5, 10, 0, 0, CLOTH, CLR_WHITE, O_MATSPEC(UNIDED)),
HELM(("faceless hood"), /*Needs encyc entry*//*Needs tile*/
1, 0, 0, 0, 5, 5, 10, 0, 0, CLOTH, CLR_BROWN),
HELM(("faceless helm"), /*Needs encyc entry*//*Needs tile*/
1, 0, 0, 2, 30, 300, 8, 5, 0, BONE, CLR_GRAY, O_MATSPEC(IDED)),
@ -1030,6 +1043,10 @@ CLOAK(("dwarvish cloak", "hooded cloak"),
0, 0, 8, 0, 10, 50,10, 1, 2, CLOTH, CLR_BLUE, O_DRSLOT(HEAD_DR|CLOAK_DR)),
CLOAK(("oilskin cloak", "slippery cloak"),
0, 0, 8, 0, 10, 50, 9, 0, 3, CLOTH, HI_CLOTH, O_POWER(WATERPROOF)),
CLOAK(("capelet"),
1, 0, 0, 0, 5, 2, 10, 1, 1, LEATHER, HI_LEATHER, O_DRSLOT(UPPER_TORSO_DR)),
CLOAK(("hooded capelet"),
1, 0, 0, 0, 5, 2, 10, 1, 1, LEATHER, HI_LEATHER, O_DRSLOT(HEAD_DR|UPPER_TORSO_DR)),
CLOAK(("robe"),
1, 1, 3, 0, 15, 50, 10, 2, 3, CLOTH, CLR_RED),
CLOAK(("white faceless robe", (char *)0, "faceless robe"),
@ -1498,13 +1515,13 @@ TORCH(("sunrod", "rod"),/*Needs encyc entry*/
*/
WEPTOOL(("lightsaber", "sword hilt"), /*Needs (better) encyc entry*/
DMG(D(8)), DMG(D(8)),
0, MZ_SMALL, 1, 1, 0, 10, 500, -3, S|E, P_SABER, SILVER, HI_SILVER, O_MATSPEC(IDED|UNIDED), O_TRAITS(ETRAIT_GRAZE)),
0, MZ_SMALL, 1, 1, 0, 10, 500, -3, S|E, P_SABER, SILVER, HI_SILVER, O_MATSPEC(IDED|UNIDED)),
WEPTOOL(("beamsword", "broadsword hilt"), /*Needs encyc entry*/
DMG(D(10)), DMG(D(10)),
0, MZ_SMALL, 1, 1, 0, 20, 500, -3, S|E, P_BROAD_SWORD, GOLD, HI_GOLD, O_MATSPEC(IDED|UNIDED), O_TRAITS(ETRAIT_GRAZE)),
0, MZ_SMALL, 1, 1, 0, 20, 500, -3, S|E, P_BROAD_SWORD, GOLD, HI_GOLD, O_MATSPEC(IDED|UNIDED)),
WEPTOOL(("double lightsaber", "long grip"), /*Needs encyc entry*//*Needs tile*//*needs special case for 2handedness*/
DMG(D(10)), DMG(D(10)),
0, MZ_SMALL, 1, 1, 0, 30,1000, -6, S|E, P_QUARTERSTAFF, PLATINUM, HI_SILVER, O_MATSPEC(IDED|UNIDED), O_TRAITS(ETRAIT_GRAZE)),
0, MZ_SMALL, 1, 1, 0, 30,1000, -6, S|E, P_QUARTERSTAFF, PLATINUM, HI_SILVER, O_MATSPEC(IDED|UNIDED)),
WEPTOOL(("rod of force", "rod"), /*Needs encyc entry*/
DMG(D(8)), DMG(D(12)),
0, MZ_SMALL, 1, 1, 0, 10,1000, 1, S|P|E, P_LONG_SWORD, IRON, CLR_BLACK, O_DIR(IMMEDIATE), O_MATSPEC(UNIDED), O_NOWISH(1), O_TRAITS(ETRAIT_GRAZE)),
@ -1558,6 +1575,9 @@ FOOD(("parasite"), 0, MZ_TINY, 1, 1, 0, VEGGY, 25, CLR_BRIGH
/* Body parts.... eeeww */
FOOD(("eyeball"), 0, MZ_TINY, 1, 0, 0, FLESH, 10, CLR_WHITE),/*Needs tile*/
FOOD(("severed hand"), 0, MZ_TINY, 1, 0, 0, FLESH, 40, CLR_BROWN),/*Needs tile*/
FOOD(("encounter exoskeleton"), 0, MZ_SMALL,20,
750,
0, CHITIN,200, CLR_GREEN),/*Needs tile*/
/* fruits & veggies */
FOOD(("kelp frond"), 0, MZ_SMALL, 1, 1, 0, VEGGY, 30, CLR_GREEN),
@ -1983,11 +2003,11 @@ OBJECT(("Bergonic chair", "strange chair"), BITS(0,0,0,0,0,0,0,0,MZ_LARGE,1,0,0,
BED_CLASS, 0, 0, 60, 100, DMG(D(4)), DMG(D(4)), 0, 0, 0, 2000, HI_ZAP),
#ifdef CONVICT
OBJECT(("heavy iron ball"), BITS(1,0,0,0,0,0,0,0,MZ_LARGE,0,0,0,WHACK,P_FLAIL,IRON,0), {0},
OBJECT(("ball"), BITS(1,0,0,0,0,0,0,0,MZ_LARGE,0,0,0,WHACK,P_FLAIL,IRON,0), {0},
#else
OBJECT(("heavy iron ball"), BITS(1,0,0,0,0,0,0,0,MZ_LARGE,0,0,0,WHACK,P_NONE,IRON,0), {0},
OBJECT(("ball"), BITS(1,0,0,0,0,0,0,0,MZ_LARGE,0,0,0,WHACK,P_NONE,IRON,0), {0},
#endif /* CONVICT */
BALL_CLASS, 1000, 0, 480, 10, DMG(D(25)), DMG(D(25)), 0, 0, 0, 200, HI_METAL),
BALL_CLASS, 1000, 0, 480, 10, DMG(D(25)), DMG(D(25)), 0, 0, 0, 200, HI_METAL, O_MATSPEC(IDED|UNIDED)),
/* +d4 when "very heavy" */
#define CHAIN(names,sdam,ldam,nutr,wt,cost,hitbon,dtyp,mat,color,...) OBJECT( \

View file

@ -1004,6 +1004,14 @@ boolean dofull;
Strcat(buf, "wool-lined ");
}
if((obj == uwep || obj == uswapwep)
&& CHECK_ETRAIT(obj, &youmonst, ETRAIT_BLADESONG)
&& ((u.bladesong + (Race_if(PM_ELF) ? 3 : 0)) >= monstermoves)
){
Strcat(buf, "chiming ");
return;
}
if(obj->oartifact && get_artifact(obj)->inv_prop == RINGED_SPEAR){
if (artinstance[obj->oartifact].RRSember >= moves)
Strcat(buf, "molten ");
@ -1017,16 +1025,16 @@ boolean dofull;
}
if (!check_oprop(obj, OPROP_NONE) && (obj->oartifact == 0 || dofull)){
if (check_oprop(obj, OPROP_ASECW) && (obj->known || u.uinsight >= 10) && !(obj->opoisoned&OPOISON_ACID))
u.uinsight < 10 ? Strcat(buf, "self-acidifying ") : Strcat(buf, "acid-secreting ");
if (check_oprop(obj, OPROP_PSECW) && (obj->known || u.uinsight >= 10) && !(obj->opoisoned&OPOISON_BASIC))
u.uinsight < 10 ? Strcat(buf, "self-poisoning ") : Strcat(buf, "poison-secreting ");
if (check_oprop(obj, OPROP_GRES) && (obj->known || u.uinsight >= 10) && !(obj->greased))
u.uinsight < 10 ? Strcat(buf, "self-greasing ") : Strcat(buf, "grease-secreting ");
if (check_oprop(obj, OPROP_HEAL) && (obj->known || u.uinsight >= 21))
u.uinsight < 21 ? Strcat(buf, "healing ") : check_oprop(obj, OPROP_UNHY) ? Strcat(buf, "angel-imprisoning ") : Strcat(buf, "angel-haunted ");
if (check_oprop(obj, OPROP_RETRW) && (obj->known || u.uinsight >= 10))
u.uinsight < 10 ? Strcat(buf, "returning ") : Strcat(buf, "loyal ");
if (check_oprop(obj, OPROP_ASECW) && (obj->known || Insight >= 10) && !(obj->opoisoned&OPOISON_ACID))
Insight < 10 ? Strcat(buf, "self-acidifying ") : Strcat(buf, "acid-secreting ");
if (check_oprop(obj, OPROP_PSECW) && (obj->known || Insight >= 10) && !(obj->opoisoned&OPOISON_BASIC))
Insight < 10 ? Strcat(buf, "self-poisoning ") : Strcat(buf, "poison-secreting ");
if (check_oprop(obj, OPROP_GRES) && (obj->known || Insight >= 10) && !(obj->greased))
Insight < 10 ? Strcat(buf, "self-greasing ") : Strcat(buf, "grease-secreting ");
if (check_oprop(obj, OPROP_HEAL) && (obj->known || Insight >= 21))
Insight < 21 ? Strcat(buf, "healing ") : check_oprop(obj, OPROP_UNHY) ? Strcat(buf, "angel-imprisoning ") : Strcat(buf, "angel-haunted ");
if (check_oprop(obj, OPROP_RETRW) && (obj->known || Insight >= 10))
Insight < 10 ? Strcat(buf, "returning ") : Strcat(buf, "loyal ");
if(check_oprop(obj, OPROP_OCLTW) && obj->known)
Strcat(buf, "occult ");
@ -1093,7 +1101,7 @@ boolean dofull;
Strcat(buf, "wrathful ");
if (check_oprop(obj, OPROP_ELFLW))
Strcat(buf, u.uinsight >= 33 ? "radiant " : u.uinsight >= 11 ? "incandescent " : "luminous ");
Strcat(buf, Insight >= 33 ? "radiant " : Insight >= 11 ? "incandescent " : "luminous ");
if (check_oprop(obj, OPROP_WATRW))
Strcat(buf, "misty ");
@ -1194,11 +1202,11 @@ boolean dofull;
if (check_oprop(obj, OPROP_LESSER_FLAYW) && obj->known)
Strcat(buf, "excoriating ");
if (check_oprop(obj, OPROP_LIVEW) && u.uinsight >= 40)
if (check_oprop(obj, OPROP_LIVEW) && Insight >= 40)
Strcat(buf, "living ");
if (check_oprop(obj, OPROP_GSSDW))
Strcat(buf, u.uinsight >= 50 ? "rushing " : u.uinsight >= 25 ? "flowing " : u.uinsight > 0 ? "rippling " : "");
Strcat(buf, Insight >= 50 ? "rushing " : Insight >= 25 ? "flowing " : Insight > 0 ? "rippling " : "");
if (check_oprop(obj, OPROP_BRIL) && !obj->known)
Strcat(buf, "ornate ");
@ -1433,29 +1441,29 @@ char *buf;
Strcat(buf, "budding ");
}
if (rakuyo_prop(obj)){
if(u.uinsight >= 40)
if(Insight >= 40)
Strcat(buf, "burning ");
if(u.uinsight >= 20)
if(Insight >= 20)
Strcat(buf, "blood-drenched ");
}
if (obj->otyp == ISAMUSEI){
if(u.uinsight >= 70)
if(Insight >= 70)
Strcat(buf, "circular ");
else if(u.uinsight >= 57)
else if(Insight >= 57)
Strcat(buf, "tredecile ");
else if(u.uinsight >= 45)
else if(Insight >= 45)
Strcat(buf, "crossed ");
else if(u.uinsight >= 22)
else if(Insight >= 22)
Strcat(buf, "reflected ");
}
if (obj->otyp == CLUB && check_oprop(obj, OPROP_CCLAW)){
if(u.uinsight >= 30)
if(Insight >= 30)
Strcat(buf, "thrashing ");
else if(u.uinsight >= 15)
else if(Insight >= 15)
Strcat(buf, "severed ");
}
if (obj->otyp == DISKOS){
if(u.uinsight >= 15){
if(Insight >= 15){
if(obj->where == OBJ_INVENT)
Strcat(buf, u.ualign.record < -3 ? "shadow-wrapped " : u.ualign.record > 3 ? "light-wrapped " : "energy-wrapped ");
else if(obj->where == OBJ_MINVENT)
@ -1463,14 +1471,14 @@ char *buf;
else
Strcat(buf, "energy-wrapped ");
}
else if(u.uinsight >= 5)
else if(Insight >= 5)
Strcat(buf, "spinning ");
}
if (mercy_blade_prop(obj)){
//Note: Brain fluid
if(u.uinsight >= 50)
if(Insight >= 50)
Strcat(buf, "sticky ");
if(u.uinsight >= 25)
if(Insight >= 25)
Strcat(buf, "sidereal ");
else if(!u.veil)
Strcat(buf, "twinkling ");
@ -1768,6 +1776,12 @@ add_material_words(obj, buf)
struct obj *obj;
char *buf;
{
if (obj->otyp == BALL && (obj->owt > objects[BALL].oc_weight)) {
Strcat(buf, "very ");
}
if(obj->otyp == BALL){
Strcat(buf, "heavy ");
}
/*To avoid an if statement with a massive condition, detect cases where the material should NOT be printed, and return out*/
/*Materials don't matter for lit lightsabers, and they should be described in terms of color*/
if(is_lightsaber(obj) && litsaber(obj))
@ -1775,6 +1789,8 @@ char *buf;
/* gold pieces should not have their material described, it's in their name */
if(obj->otyp == GOLD_PIECE)
return;
if(obj->otyp == CRYSTAL && obj->obj_material == FLESH)
return;
if (obj->oartifact && !iflags.artifact_descriptors && !undiscovered_artifact(obj->oartifact) && artilist[obj->oartifact].material != MT_DEFAULT){
/*Known artifact is made from the artifact's expected material */
if(artilist[obj->oartifact].material && obj->obj_material == artilist[obj->oartifact].material)
@ -1790,7 +1806,7 @@ char *buf;
if (obj->otyp == find_gcirclet())
goto force_add_material_name;
/*Item is made from standard material, and isn't of a type for which the material is always shown*/
if(objects[obj->otyp].oc_name_known && (!(objects[obj->otyp].oc_showmat&IDED) || (obj->otyp == TOOTH && u.uinsight >= 20)) && obj->obj_material == objects[obj->otyp].oc_material)
if(objects[obj->otyp].oc_name_known && (!(objects[obj->otyp].oc_showmat&IDED) || (obj->otyp == TOOTH && Insight >= 20)) && obj->obj_material == objects[obj->otyp].oc_material)
return;
/*Unknown item is made from standard material, and isn't of a type for which the material is always shown*/
if(!objects[obj->otyp].oc_name_known && !(objects[obj->otyp].oc_showmat&UNIDED) && obj->obj_material == objects[obj->otyp].oc_material)
@ -1852,7 +1868,7 @@ struct obj *obj;
char *buf;
{
if (obj->otyp == TOOTH && objects[obj->otyp].oc_name_known){
if(u.uinsight >= 20){
if(Insight >= 20){
switch (obj->ovar1_tooth_type){
case SERPENT_TOOTH: Strcat(buf, "world-serpent "); break;
case MAGMA_TOOTH: Strcat(buf, "primordial dragon "); break;
@ -1900,36 +1916,47 @@ boolean getting_obj_base_desc;
actualn = Alternate_item_name(typ, Pirate_items);
if(obj->otyp == CLUB && check_oprop(obj, OPROP_CCLAW)){
if(u.uinsight >= 15)
if(Insight >= 15)
actualn = "arm";
}
if(obj->otyp == CRYSTAL && obj->obj_material == HEMARGYOS){
if(obj->spe == 1)
actualn = "columnar crystal rod";
else if(obj->spe == 2)
actualn = "twin-columnar crystal";
else if(obj->spe == 3)
actualn = "columnar chunk";
else if(obj->spe == 4)
actualn = "columnar mass";
}
if(obj->otyp == CRYSTAL
&& obj->obj_material == CHITIN
&& check_oprop(obj, OPROP_GOATW)
){
actualn = "misty seed";
}
if(obj->otyp == CRYSTAL
&& obj->obj_material == SILVER
&& check_oprop(obj, OPROP_SFLMW)
){
actualn = "mirror shard";
}
if(obj->otyp == CRYSTAL
&& obj->obj_material == FIRMAMENT
&& check_oprop(obj, OPROP_SOTHW)
){
actualn = "sky fragment";
if(obj->otyp == CRYSTAL){
if(obj->obj_material == HEMARGYOS){
if(obj->spe == 1)
actualn = "columnar crystal rod";
else if(obj->spe == 2)
actualn = "twin-columnar crystal";
else if(obj->spe == 3)
actualn = "columnar chunk";
else if(obj->spe == 4)
actualn = "columnar mass";
}
else if(obj->obj_material == CHITIN
&& check_oprop(obj, OPROP_GOATW)
){
actualn = "misty seed";
}
else if(obj->obj_material == SILVER
&& check_oprop(obj, OPROP_SFLMW)
){
actualn = "mirror shard";
}
else if(obj->obj_material == FIRMAMENT
&& check_oprop(obj, OPROP_SOTHW)
){
actualn = "sky fragment";
}
else if(obj->obj_material == FLESH){
const char *butterflies[] = {
"novel Hedylidae crysalis",
"novel Hesperiidae crysalis",
"novel Lycaenidae crysalis",
"novel Nymphalidae crysalis",
"novel Papilionidae crysalis",
"novel Pieridae crysalis",
"novel Riodinidae crysalis",
};
actualn = butterflies[obj->spe];
}
}
buf[0] = '\0';
@ -2113,9 +2140,6 @@ boolean getting_obj_base_desc;
Strcat(buf, OBJ_NAME(objects[ptyp]));
Strcat(buf, " ");
}
if (obj->oclass == BALL_CLASS && (obj->owt > ocl->oc_weight)) {
Strcat(buf, "very ");
}
if (typ == STATUE) {
if (Role_if(PM_ARCHEOLOGIST) && (obj->spe & STATUE_HISTORIC))
Strcat(buf, "historic ");
@ -2726,10 +2750,15 @@ doname_with_price(obj)
#endif /* OVL0 */
#ifdef OVLB
boolean
not_fully_identified_dummy_flags(struct obj *otmp, int qflags)
{
return not_fully_identified(otmp);
}
/* used from invent.c */
boolean
not_fully_identified(otmp)
register struct obj *otmp;
not_fully_identified(struct obj *otmp)
{
#ifdef GOLDOBJ
/* gold doesn't have any interesting attributes [yet?] */
@ -3872,7 +3901,7 @@ struct alt_spellings {
{ "orichalcum gauntlets", ORIHALCYON_GAUNTLETS },
{ "chain", CHAIN },
{ "iron chain", CHAIN },
{ "iron ball", HEAVY_IRON_BALL },
{ "iron ball", BALL },
{ "mattock", DWARVISH_MATTOCK },
{ "amulet of poison resistance", AMULET_VERSUS_POISON },
{ "amulet of curse resistance", AMULET_VERSUS_CURSES },
@ -4119,6 +4148,12 @@ int wishflags;
return mkcolumnarcrystal(3);
if(!strcmpi(bp, "columnar mass"))
return mkcolumnarcrystal(4);
if(!strcmpi(bp, "crysalis")){
struct obj *crys = mksobj(CRYSTAL, NO_MKOBJ_FLAGS);
set_material_gm(crys, FLESH);
crys->spe = rn2(7);
return crys;
}
for(;;) {
register int l;
@ -5771,7 +5806,7 @@ typfnd:
/* Fall through */
case SKELETON_KEY: case UNIVERSAL_KEY: case CHEST: case BOX:
case SARCOPHAGUS:
case HEAVY_IRON_BALL: case CHAIN: case STATUE:
case BALL: case CHAIN: case STATUE:
/* otmp->cobj already done in mksobj() */
break;
#ifdef MAIL
@ -6201,7 +6236,7 @@ typfnd:
}
}
otmp->owt = weight(otmp);
if (very && otmp->otyp == HEAVY_IRON_BALL) otmp->owt += 160;
if (very && otmp->otyp == BALL) otmp->owt += 160;
*wishreturn = WISH_SUCCESS;
return(otmp);

View file

@ -178,6 +178,7 @@ flag_to_word(flag, category)
case MM_FLEETFLEE: return "flee";
case MM_WEBRIP: return "tear webs";
case MM_DOORBUST: return "break down doors";
case MM_AQUATIC: return "lives underwater";
}
break;
case MT_FLAG:
@ -2300,6 +2301,7 @@ get_description_of_attack_type(uchar id)
case AT_ARRW: return "launch ammo";
case AT_WHIP: return "whip";
case AT_VINE: return "vines";
case AT_VOMT: return "vomit";
case AT_LRCH: return "reaching attack";
case AT_HODS: return "mirror attack";
case AT_LNCK: return "reaching bite";
@ -2521,6 +2523,8 @@ get_description_of_damage_type(uchar id)
case AD_DRHP: return "drains bonus HP";
case AD_PUSH: return "push away";
case AD_LICK: return "monstrous tongue lick";
case AD_PFBT: return "poison and disease damage";
case AD_OMUD: return "inchoate orc-spawn";
default:
impossible("bug in get_description_of_damage_type(%d)", id);
return "<MISSING DESCRIPTION, THIS IS A BUG>";

View file

@ -18,8 +18,8 @@ STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *,
const char *,struct obj *,BOOLEAN_P,int *));
#endif
STATIC_DCL void FDECL(check_here, (BOOLEAN_P));
STATIC_DCL boolean FDECL(n_or_more, (struct obj *));
STATIC_DCL boolean FDECL(all_but_uchain, (struct obj *));
STATIC_DCL boolean FDECL(n_or_more, (struct obj *, int));
STATIC_DCL boolean FDECL(all_but_uchain, (struct obj *, int));
#if 0 /* not used */
STATIC_DCL boolean FDECL(allow_cat_no_uchain, (struct obj *));
#endif
@ -297,9 +297,10 @@ static long val_for_n_or_more;
/* query_objlist callback: return TRUE if obj's count is >= reference value */
STATIC_OVL boolean
n_or_more(obj)
struct obj *obj;
n_or_more(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
if (obj == uchain) return FALSE;
return (obj->quan >= val_for_n_or_more);
}
@ -308,8 +309,7 @@ struct obj *obj;
static char valid_menu_classes[MAXOCLASSES + 2];
void
add_valid_menu_class(c)
int c;
add_valid_menu_class(int c)
{
static int vmc_count = 0;
@ -322,25 +322,36 @@ int c;
/* query_objlist callback: return TRUE if not uchain */
STATIC_OVL boolean
all_but_uchain(obj)
struct obj *obj;
all_but_uchain(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
return (obj != uchain);
}
/* query_objlist callback: return TRUE */
/*ARGSUSED*/
boolean
allow_all(obj)
struct obj *obj;
allow_all_nomods(struct obj *obj)
{
return TRUE;
}
/* query_objlist callback: return TRUE */
/*ARGSUSED*/
boolean
allow_category(obj)
struct obj *obj;
allow_all(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
return TRUE;
}
boolean
allow_category(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
if (Role_if(PM_PRIEST)) obj->bknown = TRUE;
if (((index(valid_menu_classes,'u') != (char *)0) && obj->unpaid) ||
(index(valid_menu_classes, obj->oclass) != (char *)0))
@ -364,9 +375,10 @@ struct obj *obj;
#if 0 /* not used */
/* query_objlist callback: return TRUE if valid category (class), no uchain */
STATIC_OVL boolean
allow_cat_no_uchain(obj)
struct obj *obj;
allow_cat_no_uchain(struct obj *obj, int qflags)
{
if(qflags&NO_EQUIPMENT && obj->owornmask)
return FALSE;
if ((obj != uchain) &&
(((index(valid_menu_classes,'u') != (char *)0) && obj->unpaid) ||
(index(valid_menu_classes, obj->oclass) != (char *)0)))
@ -378,8 +390,7 @@ struct obj *obj;
/* query_objlist callback: return TRUE if valid class and worn */
boolean
is_worn_by_type(otmp)
register struct obj *otmp;
is_worn_by_type(struct obj *otmp, int qflags)
{
return((boolean)(!!(otmp->owornmask &
(W_ARMOR | W_RING | W_AMUL | W_BELT | W_TOOL | W_WEP | W_SWAPWEP | W_QUIVER)))
@ -466,7 +477,7 @@ int what; /* should be a long */
traverse_how = BY_NEXTHERE;
} else {
objchain = u.ustuck->minvent;
traverse_how = 0; /* nobj */
traverse_how = 0|NO_EQUIPMENT; /* nobj */
}
/*
* Start the actual pickup process. This is split into two main
@ -520,18 +531,28 @@ menu_pickup:
selective = FALSE; /* ask for each item */
/* check for more than one object */
for (obj = objchain;
obj; obj = (traverse_how == BY_NEXTHERE) ? obj->nexthere : obj->nobj)
ct++;
for (obj = objchain; obj;
obj = (traverse_how&BY_NEXTHERE) ? obj->nexthere : obj->nobj
){
if(traverse_how&NO_EQUIPMENT && obj->owornmask)
continue;
ct++;
}
if (ct == 1 && count) {
/* if only one thing, then pick it */
obj = objchain;
lcount = min(obj->quan, (long)count);
n_tried++;
if (pickup_object(obj, lcount, FALSE) > 0)
n_picked++; /* picked something */
goto end_query;
for (obj = objchain; obj;
obj = (traverse_how&BY_NEXTHERE) ? obj->nexthere : obj->nobj
){
if(traverse_how&NO_EQUIPMENT && obj->owornmask)
continue;
if (pickup_object(obj, lcount, FALSE) > 0)
n_picked++; /* picked something */
goto end_query;
}
} else if (ct >= 2) {
int via_menu = 0;
@ -540,7 +561,7 @@ menu_pickup:
(ct <= 10) ? "several" : "many");
if (!query_classes(oclasses, &selective, &all_of_a_type,
"pick up", objchain,
traverse_how == BY_NEXTHERE,
!!(traverse_how&BY_NEXTHERE),
#ifndef GOLDOBJ
FALSE,
#endif
@ -556,12 +577,15 @@ menu_pickup:
}
for (obj = objchain; obj; obj = obj2) {
if (traverse_how == BY_NEXTHERE)
if (traverse_how&BY_NEXTHERE)
obj2 = obj->nexthere; /* perhaps obj will be picked up */
else
obj2 = obj->nobj;
lcount = -1L;
if(traverse_how&NO_EQUIPMENT && obj->owornmask)
continue;
if (!selective && oclasses[0] && !index(oclasses,obj->oclass))
continue;
@ -730,7 +754,7 @@ struct obj *olist; /* the list to pick from */
int qflags; /* options to control the query */
menu_item **pick_list; /* return list of items picked */
int how; /* type of query */
boolean FDECL((*allow), (OBJ_P));/* allow function */
boolean FDECL((*allow), (OBJ_P, int));/* allow function */
{
#ifdef SORTLOOT
int i, j;
@ -750,7 +774,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
/* count the number of items allowed */
for (n = 0, last = 0, curr = olist; curr; curr = FOLLOW(curr, qflags))
if ((*allow)(curr)) {
if ((*allow)(curr, qflags)) {
last = curr;
n++;
}
@ -772,7 +796,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
/* Add objects to the array */
i = 0;
for (curr = olist; curr; curr = FOLLOW(curr, qflags)) {
if ((*allow)(curr)) {
if ((*allow)(curr, qflags)) {
if (iflags.sortloot == 'f' ||
(iflags.sortloot == 'l' && !(qflags & USE_INVLET)))
{
@ -818,7 +842,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
return 0;
}
if ((!(qflags & INVORDER_SORT) || curr->oclass == *pack)
&& (*allow)(curr)) {
&& (*allow)(curr, qflags)) {
/* if sorting, print type name (once only) */
if (qflags & INVORDER_SORT && !printed_type_name) {
@ -1469,7 +1493,7 @@ struct obj *
pick_obj(otmp)
struct obj *otmp;
{
obj_extract_self(otmp);
obj_extract_and_unequip_self(otmp);
if (!u.uswallow && otmp != uball && costly_spot(otmp->ox, otmp->oy)) {
char saveushops[5], fakeshop[2];
@ -3162,7 +3186,7 @@ boolean past;
expert_weapon_skill(P_TWO_WEAPON_COMBAT);
break;
}
if(u.uinsight >= 10){
if(Insight >= 10){
open_crazy_box(box, past);
box->spe = 0;
return TRUE;
@ -3447,7 +3471,7 @@ struct monst *mon;
Sprintf(buf, "Equipment");
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_BOLD, buf, MENU_UNSELECTED);
if(!(is_whirly(mon->data) || noncorporeal(mon->data))) for(otmp = invent; otmp; otmp = otmp->nobj){
if(!(is_gaseous_noequip(mon->data) || noncorporeal(mon->data))) for(otmp = invent; otmp; otmp = otmp->nobj){
if(!otmp->owornmask){
if(otmp->oclass == AMULET_CLASS && !(mon->misc_worn_check&W_AMUL) &&
can_wear_amulet(mon->data) &&
@ -3705,7 +3729,7 @@ register int held;
} else if(obj->spe == 5){
open_sarcophagus(obj, FALSE); //FALSE: the box was not destroyed. Use present tense.
return MOVE_CONTAINER;
} else if(obj->spe == 6 && u.uinsight >= 10){
} else if(obj->spe == 6 && Insight >= 10){
open_crazy_box(obj, FALSE); //FALSE: the box was not destroyed. Use present tense.
return MOVE_CONTAINER;
} else if(obj->spe == 7){
@ -4422,7 +4446,7 @@ struct obj *box; /* or bag */
pline("%ssarcophagus is now empty.", Shk_Your(yourbuf, box));
else
empty_it = TRUE;
} else if(Is_real_container(box) && box->spe == 6 && u.uinsight >= 10){
} else if(Is_real_container(box) && box->spe == 6 && Insight >= 10){
open_crazy_box(box, TRUE);
if (!Has_contents(box))

View file

@ -660,6 +660,7 @@ ustatusline()
}
if (Stoned) Strcat(info, ", solidifying");
if (Golded) Strcat(info, ", aurelifying");
if (Golded) Strcat(info, ", salifying");
if (Slimed) Strcat(info, ", becoming slimy");
if (BloodDrown) Strcat(info, ", drowning");
if (FrozenAir) Strcat(info, ", can't breath");

View file

@ -210,6 +210,7 @@ newman()
if (Sick) make_sick(0L, (char *) 0, FALSE, SICK_ALL);
Stoned = 0;
Golded = 0;
Salted = 0;
delayed_killer = 0;
if (u.uhp <= 0 || u.uhpmax <= 0) {
if (Polymorph_control) {
@ -494,11 +495,16 @@ int mntmp;
delayed_killer = 0;
You("no longer seem to be petrifying.");
}
if (Stone_resistance && Golded) { /* parnes@eniac.seas.upenn.edu */
if (Stone_resistance && Golded) {
Golded = 0;
delayed_killer = 0;
You("no longer seem to be turning to gold.");
}
if (Stone_resistance && Salted) {
Salted = 0;
delayed_killer = 0;
You("no longer seem to be turning to salt.");
}
if (Sick_resistance && Sick) {
make_sick(0L, (char *) 0, FALSE, SICK_ALL);
You("no longer feel sick.");
@ -697,9 +703,9 @@ break_armor()
register struct obj *otmp;
#define special_armor(a) (a->oartifact || is_imperial_elven_armor(a))
if ((otmp = uarm) != 0) {
if(!arm_size_fits(youracedata,otmp) || !arm_match(youracedata,otmp) || is_whirly(youracedata) || noncorporeal(youracedata)){
if(!arm_size_fits(youracedata,otmp) || !arm_match(youracedata,otmp) || is_gaseous_noequip(youracedata) || noncorporeal(youracedata)){
if (donning(otmp)) cancel_don();
if(special_armor(otmp) || otmp->objsize > youracedata->msize || is_whirly(youracedata) || noncorporeal(youracedata)){
if(special_armor(otmp) || otmp->objsize > youracedata->msize || is_gaseous_noequip(youracedata) || noncorporeal(youracedata)){
Your("armor falls around you!");
(void) Armor_gone();
dropx(otmp);
@ -713,10 +719,10 @@ break_armor()
}
if ((otmp = uarmc) != 0) {
if(abs(otmp->objsize - youracedata->msize) > 1
|| is_whirly(youracedata) || noncorporeal(youracedata)
|| is_gaseous_noequip(youracedata) || noncorporeal(youracedata)
){
if (donning(otmp)) cancel_don();
if(special_armor(otmp) || otmp->objsize > youracedata->msize || is_whirly(youracedata) || noncorporeal(youracedata)) {
if(special_armor(otmp) || otmp->objsize > youracedata->msize || is_gaseous_noequip(youracedata) || noncorporeal(youracedata)) {
Your("%s falls off!", cloak_simple_name(otmp));
(void) Cloak_off();
dropx(otmp);
@ -729,10 +735,10 @@ break_armor()
}
if ((otmp = uarmu) != 0) {
if(otmp->objsize != youracedata->msize
|| !shirt_match(youracedata,otmp) || is_whirly(youracedata) || noncorporeal(youracedata)
|| !shirt_match(youracedata,otmp) || is_gaseous_noequip(youracedata) || noncorporeal(youracedata)
){
if (donning(otmp)) cancel_don();
if(special_armor(otmp) || otmp->objsize > youracedata->msize || is_whirly(youracedata) || noncorporeal(youracedata)) {
if(special_armor(otmp) || otmp->objsize > youracedata->msize || is_gaseous_noequip(youracedata) || noncorporeal(youracedata)) {
Your("shirt falls off!");
(void) Shirt_off();
// setworn((struct obj *)0, otmp->owornmask & W_ARMU);
@ -750,7 +756,7 @@ break_armor()
|| (!has_head_mon(&youmonst) && !hat)
|| !helm_size_fits(youracedata, uarmh)
|| (has_horns(youracedata) && !(otmp->otyp == find_gcirclet() || is_flimsy(otmp)))
|| is_whirly(youracedata)
|| is_gaseous_noequip(youracedata)
|| noncorporeal(youracedata)
) {
if (donning(otmp)) cancel_don();
@ -769,7 +775,7 @@ break_armor()
if(nogloves(youracedata)
|| nolimbs(youracedata)
|| youracedata->msize != otmp->objsize
|| is_whirly(youracedata)
|| is_gaseous_noequip(youracedata)
|| noncorporeal(youracedata)
){
if (donning(otmp)) cancel_don();
@ -781,7 +787,7 @@ break_armor()
}
}
if ((otmp = uarms) != 0) {
if(nohands(youracedata) || nolimbs(youracedata) || bimanual(uwep,youracedata) || is_whirly(youracedata) || noncorporeal(youracedata)){
if(nohands(youracedata) || nolimbs(youracedata) || bimanual(uwep,youracedata) || is_gaseous_noequip(youracedata) || noncorporeal(youracedata)){
if (donning(otmp)) cancel_don();
You("can no longer hold your shield!");
(void) Shield_off();
@ -792,11 +798,11 @@ break_armor()
if(noboots(youracedata)
|| (!humanoid(youracedata) && !can_wear_boots(youracedata))
|| !boots_size_fits(youracedata, otmp)
|| is_whirly(youracedata)
|| is_gaseous_noequip(youracedata)
|| noncorporeal(youracedata)
){
if (donning(otmp)) cancel_don();
if (is_whirly(youracedata))
if (is_gaseous_noequip(youracedata))
Your("boots fall away!");
else Your("boots %s off your feet!",
youracedata->msize < otmp->objsize ? "slide" : "are pushed");
@ -937,18 +943,18 @@ domakewhisperer()
const char *petname;
struct monst *mtmp;
int duration;
if (u.uen < (10+min(u.uinsight, 45))) {
if (u.uen < (10+min(Insight, 45))) {
You("concentrate but lack the energy to maintain doing so.");
return MOVE_CANCELLED;
}
duration = ACURR(A_CHA) + 1;
if(u.uinsight >= 20)
if(Insight >= 20)
duration = 2*ACURR(A_CHA);
u.whisperturn = moves+duration+14;
losepw(10+min(u.uinsight, 45));
losepw(10+min(Insight, 45));
flags.botl = 1;
// makedog();
@ -957,7 +963,7 @@ domakewhisperer()
if(!mtmp) return MOVE_CANCELLED; /* pets were genocided */
mark_mon_as_summoned(mtmp, &youmonst, duration, 0);
for(int i = min(45, (u.uinsight - mtmp->m_lev)); i > 0; i--){
for(int i = min(45, (Insight - mtmp->m_lev)); i > 0; i--){
grow_up(mtmp, (struct monst *) 0);
//Technically might grow into a genocided form.
if(DEADMONSTER(mtmp))
@ -2367,7 +2373,16 @@ ptrbodypart(struct permonst *mptr, int part, struct monst *mon)
"lung", "nose", "stomach", "heart",
"skin", "flesh", "beat", "bones",
"ear", "ears", "tongue", "brain",
"creak", "crack" };
"creak", "crack" },
*luminous_parts[] = {
"arm", "eye", "face", "finger",
"fingertip", "leg spike", "claw", "clawed",
"head", "front leg", "light headed", "neck",
"spine", "spike-tip", "setae", "swarm",
"swarm center", "swarm antenna", "interior", "vital core",
"outer swarm", "swarm currents", "pulse", "latice",
"swarm tympanum", "swarm tympana", "swarm haustellum", "ego core",
"weaken", "falter" };
/* claw attacks are overloaded in mons[]; most humanoids with
such attacks should still reference hands rather than claws */
static const char not_claws[] = {
@ -2461,6 +2476,8 @@ ptrbodypart(struct permonst *mptr, int part, struct monst *mon)
return uvuudaum_parts[part];
if (mptr->mtyp == PM_DRACAE_ELADRIN)
return dracae_parts[part];
if (mptr->mtyp == PM_LUMINESCENT_SWARM)
return luminous_parts[part];
//S-based part lists
if (mptr->mlet == S_PLANT)

View file

@ -1356,8 +1356,7 @@ as_extra_healing:
"potion of acid", KILLED_BY_AN);
exercise(A_CON, FALSE);
}
if (Stoned) fix_petrification();
if (Golded) fix_petrification();
if (Stoned || Golded || Salted) fix_petrification();
unkn++; /* holy/unholy water can burn like acid too */
break;
case POT_PRIMORDIAL_WATERS:{
@ -1371,8 +1370,7 @@ as_extra_healing:
"primordial water", KILLED_BY);
exercise(A_CON, FALSE);
}
if (Stoned) fix_petrification();
if (Golded) fix_petrification();
if (Stoned || Golded || Salted) fix_petrification();
int num;
num = rnd(5) + 5 * otmp->blessed + 1;

View file

@ -211,8 +211,7 @@ in_trouble()
/*
* major troubles
*/
if(Stoned) return(TROUBLE_STONED);
if(Golded) return(TROUBLE_STONED);
if(Stoned || Golded || Salted) return(TROUBLE_STONED);
if(BloodDrown) return(TROUBLE_BLOOD_DROWN);
if(FrozenAir) return(TROUBLE_FROZEN_AIR);
if(Slimed) return(TROUBLE_SLIMED);
@ -373,6 +372,7 @@ register int trouble;
You_feel("more limber.");
Stoned = 0;
Golded = 0;
Salted = 0;
flags.botl = 1;
delayed_killer = 0;
break;
@ -763,15 +763,15 @@ int godnum;
/* changed from tmp = anger + abs (u.uluck) -- rph */
/* added test for alignment diff -dlc */
if(u.ualign.god != godnum){
maxanger = 3*godlist[godnum].anger +
maxanger = 3*godlist[godnum].anger +
((Luck > 0 || u.ualign.record <= STRAYED) ? -Luck/3 : -Luck);
} else {
maxanger = 3*godlist[godnum].anger +
maxanger = 3*godlist[godnum].anger +
((Luck > 0 || u.ualign.record >= STRIDENT) ? -Luck/3 : -Luck);
}
if (maxanger < 1) maxanger = 1; /* possible if bad align & good luck */
else if (maxanger > 15) maxanger = 15; /* be reasonable */
else if (maxanger > 18) maxanger = 15; /* be reasonable */
if(godnum == GOD_THE_BLACK_MOTHER){
/* anger goat-following creatures on the level */
@ -796,54 +796,88 @@ int godnum;
godvoice(godnum,"");
return;
}
// 1 anger: 2/3 nothing, 1/3 lose xp
// 2 anger: 1/3 nothing, 1/3 lose xp, 1/3 curse items
// 3 anger: 2/9 nothing, 2/9 lose xp, 2/9 curse items, 1/9 punishment, 2/9 minions
// 4 anger:
switch (rn2(maxanger)) {
case 0:
case 1:
case 0:
case 1:
if(godnum == GOD_THE_BLACK_MOTHER){
You_feel("that %s is %s.", godname(godnum),
Hallucination ? "peckish" : "hungry");
You_feel("that %s is %s.", godname(godnum), Hallucination ? "peckish" : "hungry");
} else {
You_feel("that %s is %s.", godname(godnum),
Hallucination ? "bummed" : "displeased");
You_feel("that %s is %s.", godname(godnum), Hallucination ? "bummed" : "displeased");
}
break;
case 2:
case 3:
case 2:
case 3:
Sprintf(buf,"Thou %s, %s. Thou must relearn thy lessons!",
(ugod_is_angry() && godnum == u.ualign.god)
? "hast strayed from the path" :
"art arrogant",
youracedata->mlet == S_HUMAN ? "mortal" : "creature");
(ugod_is_angry() && godnum == u.ualign.god) ? "hast strayed from the path" : "art arrogant",
(Mortal_race) ? "mortal" : "creature"
);
godvoice(godnum,buf);
(void) adjattrib(A_WIS, -1, FALSE);
losexp((char *)0,TRUE,FALSE,TRUE);
break;
case 6: if (!Punished) {
gods_angry(godnum);
punish((struct obj *)0);
break;
case 6:
if (!Punished) {
gods_angry(godnum);
punish((struct obj *)0);
break;
} /* else fall thru */
case 4:
case 5: gods_angry(godnum);
if (!Blind && !Antimagic)
pline("%s glow surrounds you.",
An(hcolor(NH_BLACK)));
case 4:
case 5: gods_angry(godnum);
if (!Blind && !Antimagic) pline("%s glow surrounds you.", An(hcolor(NH_BLACK)));
rndcurse();
break;
case 7:
case 8:
case 7:
case 8:
Sprintf(buf,"Thou durst %s me? Then die, %s!",
(on_altar() &&
((god_at_altar(u.ux,u.uy)) != godnum)) ?
"scorn":"call upon",
youracedata->mlet == S_HUMAN ? "mortal" : "creature"
(on_altar() && ((god_at_altar(u.ux,u.uy)) != godnum)) ? "scorn":"call upon",
(Mortal_race) ? "mortal" : "creature"
);
godvoice(godnum, buf);
(void) summon_god_minion(godnum, FALSE);
break;
default:
case 9:
case 10:
Sprintf(buf, "Let thy senses fail and thine %s be sewn shut!", makeplural(body_part(EYE)));
godvoice(godnum, buf);
HStumbleBlind += rn1(80, 150);
break;
case 11:
case 12:
if (has_blood_mon(&youmonst)){
Sprintf(buf,"Such insolence! Let thy own %s scorn thee!", body_part(BLOOD));
godvoice(godnum, buf);
pline("Your %s boils!", body_part(BLOOD));
if (!FIXED_ABIL) adjattrib(A_CON, -3, FALSE);
} else {
Sprintf(buf,"Such insolence! Let thy %s creak and shatter!", body_part(BONES));
godvoice(godnum, buf);
pline("Pain erupts from your %s!", makeplural(body_part(LEG)));
set_wounded_legs(BOTH_SIDES, rn1(100, 80));
}
// should be nonlethal down to 1 hp. 12d12 (78) at anger 4, 15d15 (112) at anger 5, scales indefinitely
losehp(min(d(maxanger, maxanger), u.uhp - 1), "divine intervention", KILLED_BY);
break;
case 13:
case 14:
Sprintf(buf,"Thou hath affronted me for the last time, %s! %s!",
(Mortal_race) ? "mortal" : "creature",
(Mortal_race) ? "Return to the earth from whence thou came" : "Become inanimate once more"
);
godvoice(godnum, buf);
if (!Salted && !Stone_resistance) {
pline("Salt crystals form on your body.");
Salted = 7;
delayed_killer = "the fate of Sodom & Gomorrah";
killer_format = KILLED_BY;
} else {
pline("But nothing seems to happen.");
}
break;
default:
gods_angry(godnum);
god_zaps_you(godnum);
break;
@ -852,6 +886,7 @@ int godnum;
return;
}
/* chance for god to give you a gift */
/* returns TRUE if your god should give you a gift */
boolean
@ -3667,12 +3702,12 @@ commune_with_goat()
"see crabgrass at your %s. A funny thing in a dungeon." :
"glimpse a four-leaf clover at your %s.",
makeplural(body_part(FOOT)));
if(u.uinsight >= 40){
if(Insight >= 40){
pline(Hallucination ?
"It waves its major cheliped at you." :
"...actually, that's a little mouth on a stalk.");
}
else if(u.uinsight >= 20){
else if(Insight >= 20){
pline(Hallucination ?
"It waves its major cheliped at you." :
"...you don't remember clovers having serrated leaves.");
@ -4904,7 +4939,7 @@ boolean offering;
/* at this point, gain credit */
/* credit gain suffers diminishing returns, less harshly if you have a lot of insight */
int dim_return_factor = max(1, u.uinsight);
int dim_return_factor = max(1, Insight);
if (wizard) {
/* debug */
pline("FlameCredit = %ld [+%ld base %d], FlameDevotion = %ld",

View file

@ -243,7 +243,7 @@ boolean impaired; /* TRUE if throwing/firing slipped OR magr is confused/stun
/* player exercises STR just be throwing heavy things */
if (youagr && !launcher && !(hmoncode & HMON_KICKED) && (
is_boulder(thrownobj) ||
thrownobj->otyp == HEAVY_IRON_BALL
thrownobj->otyp == BALL
))
{
exercise(A_STR, TRUE);
@ -498,7 +498,7 @@ boolean impaired; /* TRUE if throwing/firing slipped OR magr is confused/stun
}
/* limit range of iron balls so hero won't make an invalid move */
if (range > 0 && thrownobj && thrownobj->otyp == HEAVY_IRON_BALL) {
if (range > 0 && thrownobj && thrownobj->otyp == BALL) {
struct obj *bobj;
struct trap *t;
if ((bobj = boulder_at(bhitpos.x, bhitpos.y)) != 0) {
@ -1991,7 +1991,7 @@ int shotlimit;
int magr_wepskill;
if (youagr)
magr_wepskill = P_SKILL(weapon_type((launcher && launcher->oartifact != ART_PEN_OF_THE_VOID) ? launcher : ammo));
else if(magr->mformication || magr->mscorpions)
else if(magr->mformication || magr->mscorpions || magr->mcaterpillars)
magr_wepskill = P_UNSKILLED;
else
magr_wepskill = m_martial_skill(magr->data);
@ -2186,7 +2186,7 @@ int * hurtle_dist;
* than 1, so the effects from throwing attached balls are
* actually possible
*/
if (ammo->otyp == HEAVY_IRON_BALL)
if (ammo->otyp == BALL)
range = urange - (heaviness / 100);
else
range = urange - (heaviness / 40);
@ -3499,7 +3499,7 @@ int n; /* number to try to fire */
ammo_type = SILVER_ARROW;
break;
case AD_BALL:
ammo_type = HEAVY_IRON_BALL;
ammo_type = BALL;
qvr = mksobj(ammo_type, MKOBJ_NOINIT);
rngmod = 8;
break;
@ -3530,7 +3530,7 @@ int n; /* number to try to fire */
rngmod = 8;
break;
case AD_VBLD:
ammo_type = HEAVY_IRON_BALL;
ammo_type = BALL;
qvr = mksobj(ammo_type, MKOBJ_NOINIT);
rngmod = 8;
volley = TRUE;

View file

@ -466,7 +466,7 @@ chat_with_leader()
(void) encumber_msg();
} else if(Role_if(PM_CONVICT)){
struct obj *obj;
obj = mksobj(HEAVY_IRON_BALL, NO_MKOBJ_FLAGS);
obj = mksobj(BALL, NO_MKOBJ_FLAGS);
obj = oname(obj, artiname(ART_IRON_BALL_OF_LEVITATION));
obj->oerodeproof = TRUE;
obj->blessed = TRUE;

View file

@ -1030,6 +1030,7 @@ chaos_montype()
struct permonst *
chaos2_montype()
{
int diff = (u.ulevel+level_difficulty())/2;
if(on_level(&elshava_level,&u.uz)){
if(rn2(3))
return !(mvitals[PM_FOG_CLOUD].mvflags & G_GONE) ? &mons[PM_FOG_CLOUD] : mkclass(S_VORTEX, G_NOHELL);
@ -1042,6 +1043,10 @@ chaos2_montype()
else
return !(mvitals[PM_NOVIERE_ELADRIN].mvflags & G_GONE) ? &mons[PM_NOVIERE_ELADRIN] : mkclass(S_CHA_ANGEL, G_NOHELL);
} else if(In_mithardir_desert(&u.uz)){
if(G_C_INST(mons[PM_DESERT_SEER].geno) < Insight && !rn2(10)){
if(!toostrong(PM_DESERT_SEER, diff+5))
return &mons[PM_DESERT_SEER];
}
if(rn2(3))
return !(mvitals[PM_DUST_VORTEX].mvflags & G_GONE) ? &mons[PM_DUST_VORTEX] : mkclass(S_ZOMBIE, G_NOHELL);
else if(rn2(2))
@ -1072,11 +1077,28 @@ chaos2_montype()
}
return !(mvitals[PM_FOG_CLOUD].mvflags & G_GONE) ? &mons[PM_FOG_CLOUD] : mkclass(S_VORTEX, G_NOHELL);
}
#define FOREST_INSIGHT { \
if(!rn2(66)){\
if (moves > 9000 && !(mvitals[PM_INCARNATOR_MAGGOT].mvflags & G_GONE) && !toostrong(PM_INCARNATOR_MAGGOT, diff+5)) \
return &mons[PM_INCARNATOR_MAGGOT]; \
}\
}
#define DEPTHS_INSIGHT { \
if(!rn2(20)){\
if (!(mvitals[PM_INCARNATOR_MAGGOT].mvflags & G_GONE) && !toostrong(PM_INCARNATOR_MAGGOT, diff+5)) \
return &mons[PM_INCARNATOR_MAGGOT]; \
}\
if(check_insight()){ \
if(G_C_INST(mons[PM_NAMELESS_GNAWER].geno) < u.uinsight && !toostrong(PM_NAMELESS_GNAWER, diff+5)) \
return &mons[PM_NAMELESS_GNAWER]; \
} \
}
struct permonst *
chaos3_montype()
{
int diff = (u.ulevel+level_difficulty())/2;
if(In_mordor_forest(&u.uz)){
FOREST_INSIGHT
switch(rn2(20)){
case 0:
case 1:
@ -1100,8 +1122,10 @@ chaos3_montype()
case 19: return &mons[PM_DREAM_QUASIELEMENTAL];
}
} else if(Is_ford_level(&u.uz)){
FOREST_INSIGHT
return ford_montype(0);
} else if(In_mordor_fields(&u.uz)){
FOREST_INSIGHT
switch(rn2(8)){
case 0: return &mons[PM_ROTHE];
case 1: return &mons[PM_MUMAK_CALF];
@ -1150,6 +1174,7 @@ chaos3_montype()
on_level(&u.uz, &mordor_depths_1_level)
|| on_level(&u.uz, &mordor_depths_2_level)
){
DEPTHS_INSIGHT
switch(rn2(on_level(&u.uz, &mordor_depths_2_level) ? 30 : 20)){
case 1:
case 2:
@ -1182,6 +1207,7 @@ chaos3_montype()
case 29: return &mons[PM_MORDOR_SHAMAN];
}
} else if(on_level(&u.uz, &mordor_depths_3_level)){
DEPTHS_INSIGHT
switch(rn2(20)){
case 0:
case 1:
@ -1205,6 +1231,7 @@ chaos3_montype()
case 19: return &mons[PM_MORDOR_SHAMAN];
}
} else if(on_level(&u.uz, &borehole_1_level)){
DEPTHS_INSIGHT
switch(rn2(4)){
case 0:
case 1:
@ -1212,6 +1239,7 @@ chaos3_montype()
case 3: return &mons[PM_MORDOR_ORC_ELITE];
}
} else if(on_level(&u.uz, &borehole_2_level)){
DEPTHS_INSIGHT
switch(rn2(6)){
case 0:
case 1:
@ -1221,6 +1249,7 @@ chaos3_montype()
case 5: return &mons[PM_ANGBAND_ORC];
}
} else if(on_level(&u.uz, &borehole_3_level)){
DEPTHS_INSIGHT
switch(rn2(10)){
case 0:
case 1:
@ -1233,6 +1262,8 @@ chaos3_montype()
case 8: return &mons[PM_ANGBAND_ORC];
case 9: return &mons[PM_INVIDIAK];
}
} else if(on_level(&u.uz, &borehole_4_level)){
DEPTHS_INSIGHT
}
return (struct permonst *)0;
}
@ -1546,6 +1577,14 @@ law_montype()
}
else if(on_level(&arcadia1_level,&u.uz)){
int chance = d(1,100);
int diff = (u.ulevel+level_difficulty())/2;
if(check_insight()){
if(!night() && !toostrong(PM_TETTIGON_LEGATUS, diff+5))
return &mons[PM_TETTIGON_LEGATUS];
else if(night() && !toostrong(PM_LUMINESCENT_SWARM, diff+5))
return &mons[PM_LUMINESCENT_SWARM];
}
//No insight event or too strong
if(chance <= 20){
return !(mvitals[PM_KILLER_BEE].mvflags & G_GONE) ? &mons[PM_KILLER_BEE] : mkclass(S_ANT, 0);
}

View file

@ -178,19 +178,19 @@ doread()
return MOVE_READ;
} else if(scroll->oartifact == ART_HOLY_MOONLIGHT_SWORD && scroll->lamplit){
/* Note: you can see the blade even when blind */
if(u.uinsight < 2) {
if(Insight < 2) {
pline("The glowing cyan blade is decorated with faint curves.");
}
else if(u.uinsight < 5) {
else if(Insight < 5) {
You("faintly see strange arches inside the cyan blade.");
}
else if(u.uinsight < 10){
else if(Insight < 10){
You("can barely see faint bright stars behind the arches inside the cyan blade.");
}
else if(u.uinsight < 20){
else if(Insight < 20){
pline("The blade is the deep black of the night sky. You don't know why you ever thought it was cyan.");
}
else if(u.uinsight < 40){
else if(Insight < 40){
pline("The distant stars wink and dance among the arches within the black night sky.");
}
else {
@ -3624,7 +3624,7 @@ register struct obj *sobj;
}
setworn(mkobj(CHAIN_CLASS, TRUE), W_CHAIN);
#ifdef CONVICT
if (((otmp = carrying(HEAVY_IRON_BALL)) != 0) &&(otmp->oartifact ==
if (((otmp = carrying(BALL)) != 0) &&(otmp->oartifact ==
ART_IRON_BALL_OF_LEVITATION)) {
setworn(otmp, W_BALL);
Your("%s chains itself to you!", xname(otmp));
@ -3764,6 +3764,9 @@ char *in_buff;
else if (!strncmpi(bufp, "fulvous ", l = 8)) {
undeadtype = YELLOW_TEMPLATE;
}
else if (!strncmpi(bufp, "swollen ", l = 8)) {
undeadtype = SWOLLEN_TEMPLATE;
}
else if (!strncmpi(bufp, "mad_angel ", l = 10)) {
undeadtype = MAD_TEMPLATE;
}
@ -3840,6 +3843,8 @@ char *in_buff;
undeadtype = MAD_TEMPLATE;
else if (!strncmpi(p, "witness", 7))
undeadtype = FRACTURED;
else if (!strncmpi(p, "swollen", 7))
undeadtype = SWOLLEN_TEMPLATE;
else if (!strncmpi(p, "one", 3) && ((q = rindex(bufp, ' ')) != 0))
{
*q++ = 0;

120
src/research.c Normal file
View file

@ -0,0 +1,120 @@
#include "hack.h"
STATIC_OVL int
dorotvomit()
{
struct monst* mtmp = 0;
int nx = u.ux, ny = u.uy;
if(!(getdir((char *)0) && (u.dx || u.dy)))
return MOVE_CANCELLED;
int i = 2;
while(i-- > 0){
nx += u.dx;
ny += u.dy;
if(!isok(nx,ny) || !ZAP_POS(levl[nx][ny].typ))
return MOVE_CANCELLED;
if((mtmp = m_at(nx, ny)))
break;
}
if(!mtmp)
return MOVE_CANCELLED;
struct attack theattk = { AT_VOMT, AD_DISE, 1, 1 };
xmeleehity(&youmonst, mtmp, &theattk, (struct obj **)0, -1, 0, FALSE);
make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
if(!umechanoid) morehungry(20*get_uhungersizemod());
return MOVE_STANDARD;
}
STATIC_OVL int
dorotsummon()
{
if (throweffect()) {
int nx = u.dx, ny = u.dy;
if(!isok(nx,ny) || !ZAP_POS(levl[nx][ny].typ) || (m_u_at(nx, ny) != 0)){
pline("That's blocked!");
return MOVE_CANCELLED;
}
struct monst *clone = makemon(&mons[PM_BUTTERFLY_SWARM], nx, ny, MM_ESUM|MM_EDOG|MM_ADJACENTOK|NO_MINVENT|MM_NOCOUNTBIRTH);
struct obj *wep;
if(clone){
initedog(clone);
clone = christen_monst(clone, plname);
if(uswapwep && u.twoweap){
wep = duplicate_obj(uswapwep, FALSE);
if(wep){
mpickobj(clone, wep);
}
}
if(uwep){
wep = duplicate_obj(uwep, FALSE);
if(wep){
mpickobj(clone, wep);
}
}
clone->m_lev = u.ulevel;
clone->mhp = clone->mhpmax = clone->m_lev*8;
m_dowear(clone, TRUE);
init_mon_wield_item(clone);
mark_mon_as_summoned(clone, &youmonst, 3, 0);
m_level_up_intrinsic(clone);
}
}
losepw(45);
morehungry(45*get_uhungersizemod());
flags.botl = 1;
return MOVE_STANDARD;
}
int
doupgradeability()
{
winid tmpwin;
anything any;
any.a_void = 0; /* zero out all bits */
menu_item *selected;
int n = 0;
char ch = 'a';
tmpwin = create_nhwindow(NHW_MENU);
start_menu(tmpwin);
any.a_int = 1;
if(check_rot(ROT_VOMIT) && (umechanoid || u.uhs < WEAK)){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Vomit rot", MENU_UNSELECTED);
}
ch++;
any.a_int = 2;
if(check_rot(ROT_WINGS) && check_rot(ROT_CLONE) && u.uen >= 45){
n++;
add_menu(tmpwin, NO_GLYPH, &any , ch, 0, ATR_NONE,
"Send forth a phantom duplicate", MENU_UNSELECTED);
}
if(!n){
destroy_nhwindow(tmpwin);
return MOVE_CANCELLED;
}
end_menu(tmpwin, "Pick an ability:");
n = select_menu(tmpwin, PICK_ONE, &selected);
destroy_nhwindow(tmpwin);
if(n <= 0){
return MOVE_CANCELLED;
}
n = selected[0].item.a_int;
free(selected);
if(n == 1){
return dorotvomit();
}
else if(n == 2){
return dorotsummon();
}
return MOVE_CANCELLED;
}

View file

@ -1035,7 +1035,7 @@ boolean ghostly;
/* reset peaceful/malign relative to new character */
if(!mtmp->isshk)
/* shopkeepers will reset based on name */
mtmp->mpeaceful = peace_minded(mtmp->data);
mtmp->mpeaceful = peace_minded(mtmp);
set_malign(mtmp);
} else if (monstermoves > omoves){
mon_catchup_elapsed_time(mtmp, monstermoves - omoves);

View file

@ -6042,7 +6042,7 @@ struct monst *mon;
if(u.sealsActive&SEAL_ANDROMALIUS && !NoBInvis
&& !((levl[u.ux][u.uy].lit == 0 && (dimness(u.ux, u.uy) <= 0)) //dark square
|| (ublindf && (ublindf->otyp==MASK || ublindf->otyp==R_LYEHIAN_FACEPLATE)) //face-covering mask
|| (uarmh && (uarmh->otyp==PLASTEEL_HELM || uarmh->otyp==PONTIFF_S_CROWN || uarmh->otyp==FACELESS_HELM || uarmh->otyp==IMPERIAL_ELVEN_HELM)) //OPAQUE face-covering helm (visored should also work)
|| (uarmh && (uarmh->otyp==PLASTEEL_HELM || uarmh->otyp==PONTIFF_S_CROWN || uarmh->otyp==FACELESS_HELM || uarmh->otyp==FACELESS_HOOD || uarmh->otyp==IMPERIAL_ELVEN_HELM)) //OPAQUE face-covering helm (visored should also work)
|| (uarmc && (uarmc->otyp==WHITE_FACELESS_ROBE || uarmc->otyp==BLACK_FACELESS_ROBE || uarmc->otyp==SMOKY_VIOLET_FACELESS_ROBE))//face-covering robe
)
) count++;

View file

@ -700,6 +700,9 @@ rndcurse() /* curse a few inventory items at random! */
did_curse = TRUE;
}
#endif /*STEED*/
if(did_curse){
IMPURITY_UP(u.uimp_curse)
}
return did_curse;
}

View file

@ -1849,7 +1849,7 @@ asGuardian:
}
switch(rnd(4)){
case 1:
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s screams melodiously.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s screams melodiously.", Monnam(mtmp));
else pline("%s sings the song of broken eyes.", Monnam(mtmp));
for(tmpm = fmon; tmpm; tmpm = tmpm->nmon){
@ -1869,7 +1869,7 @@ asGuardian:
}
break;
case 2:
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s sings a resonant note.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s sings a resonant note.", Monnam(mtmp));
else pline("%s sings a harmless song of ruin.", Monnam(mtmp));
int trycount;
for(i = rnd(5); i > 0; i--){
@ -1896,7 +1896,7 @@ asGuardian:
break;
case 3:{
struct obj *ispe = mksobj(SPE_TURN_UNDEAD, MKOBJ_NOINIT);
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s wails deafeningly.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s wails deafeningly.", Monnam(mtmp));
else pline("%s sings the song of the day of repentance.", Monnam(mtmp));
//Rapture invisible creatures
for(tmpm = fmon; tmpm; tmpm = tmpm->nmon){
@ -1930,7 +1930,7 @@ asGuardian:
}
}break;
case 4:
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s screams furiously.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s screams furiously.", Monnam(mtmp));
else pline("%s sings the song of bloodied prayers.", Monnam(mtmp));
for(tmpm = fmon; tmpm; tmpm = tmpm->nmon){
@ -1965,7 +1965,7 @@ asGuardian:
if(!inrange) break;
if (!canspotmon(mtmp) && distmin(u.ux,u.uy,mtmp->mx,mtmp->my) < 5)
map_invisible(mtmp->mx, mtmp->my);
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s screeches discordantly.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s screeches discordantly.", Monnam(mtmp));
else pline("%s sings a song of courage.", Monnam(mtmp));
if(mtmp->mtyp != PM_INTONER) mtmp->mspec_used = rn1(10,10);
@ -2019,7 +2019,7 @@ asGuardian:
if(!inrange) break;
if (!canspotmon(mtmp) && distmin(u.ux,u.uy,mtmp->mx,mtmp->my) < 5)
map_invisible(mtmp->mx, mtmp->my);
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s whistles shrilly.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s whistles shrilly.", Monnam(mtmp));
else pline("%s sings a song of good health.", Monnam(mtmp));
if(mtmp->mtyp != PM_INTONER) mtmp->mspec_used = rn1(10,10);
@ -2077,7 +2077,7 @@ asGuardian:
if(!inrange) break;
if (!canspotmon(mtmp) && distmin(u.ux,u.uy,mtmp->mx,mtmp->my) < 5 && !Invulnerable)
map_invisible(mtmp->mx, mtmp->my);
if(ptr->mtyp == PM_INTONER && u.uinsight > Insanity+10) pline("%s laughs frantically.", Monnam(mtmp));
if(ptr->mtyp == PM_INTONER && Insight > Insanity+10) pline("%s laughs frantically.", Monnam(mtmp));
else pline("%s sings a song of haste.", Monnam(mtmp));
if(mtmp->mtyp != PM_INTONER) mtmp->mspec_used = rn1(10,10);
@ -6232,6 +6232,9 @@ int tx,ty;
if (uwep->opoisoned & OPOISON_BASIC)
uwep->opoisoned &= ~OPOISON_BASIC;
u.sealTimeout[YMIR-FIRST_SEAL] = moves + bindingPeriod;
if(moves>5000){
IMPURITY_UP(u.uimp_rot)
}
} else {
if(!Blind) pline("The eye closes.");
else pline("But nothing else occurs.");

View file

@ -1274,11 +1274,11 @@ struct mkroom *croom;
case PM_DEMINYMPH:
case PM_YUKI_ONNA:
insight = rn2(20);
if(mon->mtyp != PM_PRIESTESS && rn2(20) > u.uinsight)
if(mon->mtyp != PM_PRIESTESS && rn2(20) > Insight)
goto default_case;
set_template(mon, MISTWEAVER);
set_faction(mon, GOATMOM_FACTION);
mon->m_insight_level = min(insight, u.uinsight);
mon->m_insight_level = min(insight, Insight);
tmpo = mongets(mon, SHACKLES, NO_MKOBJ_FLAGS);
if(tmpo){
mon->entangled_otyp = SHACKLES;

View file

@ -1492,7 +1492,7 @@ update_externally_granted_spells()
if(uarmh && uarmh->oartifact == ART_CROWN_OF_THE_PERCIPIENT){
for (i = 0; i < MAXSPELL; i++) {
if (spellid(i) != NO_SPELL) {
if (spl_book[i].sp_lev <= (u.uinsight*2)/11+1)
if (spl_book[i].sp_lev <= (Insight*2)/11+1)
spellext(i) = TRUE;
}
}
@ -4984,6 +4984,7 @@ dothrowspell:
/* gain skill for successful cast */
use_skill(skill, spellev(spell));
u.bladesong = monstermoves + spellev(spell);
u.lastcast = monstermoves + spellev(spell);
if(uwep && uwep->oartifact == ART_INFINITY_S_MIRRORED_ARC && uwep->spe > 0)
u.lastcast += uwep->spe;
@ -6030,6 +6031,9 @@ int spell;
splcaster -= urole.spelarmr;
}
if(Black_crystal)
splcaster -= urole.spelarmr;
if(uwep){
int cast_bon;
// powerful channeling artifacts
@ -6039,7 +6043,6 @@ int spell;
|| uwep->oartifact == ART_PROFANED_GREATSCYTHE
|| uwep->oartifact == ART_GARNET_ROD
|| (Role_if(PM_KNIGHT) && uwep->oartifact == ART_MAGIC_MIRROR_OF_MERLIN)
|| Black_crystal
) splcaster -= urole.spelarmr;
if(uwep->obj_material == MERCURIAL)
@ -6342,7 +6345,7 @@ int spell;
chance = chance * (20-splcaster) / 15 - splcaster;
if(check_mutation(SHUB_RADIANCE)){
int insight = u.uinsight;
int insight = Insight;
while(insight){
chance += 1;
insight /= 2;

View file

@ -371,6 +371,7 @@ gotobj:
case TOOL_CLASS:
case AMULET_CLASS:
case RING_CLASS:
case BELT_CLASS:
case FOOD_CLASS: /* meat ring */
remove_worn_item(otmp, TRUE);
break;

View file

@ -53,7 +53,7 @@ can_saddle(mtmp, otmp)
) &&
(ptr->msize >= MZ_MEDIUM) &&
!(humanoid(ptr) && ptr->mtyp != PM_SPROW) &&
!amorphous(ptr) && !is_whirly(ptr) &&
!amorphous(ptr) && !is_gaseous_noequip(ptr) &&
((otmp && check_oprop(otmp, OPROP_PHSEW)) || !(noncorporeal(ptr) || unsolid(ptr)))
);
}

View file

@ -50,7 +50,7 @@ long int thought;
if ((count_glyphs() >= MAX_GLYPHS) ||
(u.thoughts & thought) ||
(u.veil) ||
(u.uinsight < glyph_insight(thought)) ||
(Insight < glyph_insight(thought)) ||
(u.usanity > glyph_sanity(thought))
)
return FALSE;
@ -123,7 +123,7 @@ active_glyph(long int thought)
return FALSE;
if (u.veil)
return FALSE;
if (u.uinsight >= glyph_insight(thought) && u.usanity <= glyph_sanity(thought))
if (Insight >= glyph_insight(thought) && u.usanity <= glyph_sanity(thought))
return TRUE;
return FALSE;
}

View file

@ -12,6 +12,7 @@
STATIC_DCL void NDECL(stoned_dialogue);
STATIC_DCL void NDECL(golded_dialogue);
STATIC_DCL void NDECL(gillyweed_dialogue);
STATIC_DCL void NDECL(salted_dialogue);
#ifdef CONVICT
STATIC_DCL void NDECL(phasing_dialogue);
#endif /* CONVICT */
@ -175,6 +176,30 @@ gillyweed_dialogue()
}
}
static NEARDATA const char * const salted_texts[] = {
"You are slowing down.", /* 5 */
"Your limbs are stiffening.", /* 4 */
"Your limbs have turned to salt.", /* 3 */
"You have turned to salt.", /* 2 */
"You have become a pillar of salt." /* 1 */
};
STATIC_OVL void
salted_dialogue()
{
register long i = (Salted & TIMEOUT);
if (i > 0L && i <= SIZE(salted_texts)) {
pline1(salted_texts[SIZE(salted_texts) - i]);
nomul(0, NULL); /* fix for C343-74 */
}
if (i == 5L)
HFast = 0L;
if (i == 3L && !Free_action)
nomul(-3, "turning to salt");
exercise(A_DEX, FALSE);
}
#ifdef CONVICT
STATIC_OVL void
phasing_dialogue()
@ -334,6 +359,14 @@ burn_away_slime()
flags.botl = 1;
delayed_killer = 0;
}
if (youmonst.mcaterpillars) {
pline_The("parasitic caterpillars are burned off!");
youmonst.mcaterpillars = FALSE;
}
if (youmonst.momud) {
pline_The("writhing mud that covers you is burned away!");
youmonst.momud = FALSE;
}
return;
}
@ -577,6 +610,7 @@ nh_timeout()
if(Invulnerable) return; /* things past this point could kill you */
if(Stoned) stoned_dialogue();
if(Golded) golded_dialogue();
if(Salted) salted_dialogue();
if(Slimed) slime_dialogue();
if(Vomiting) vomiting_dialogue();
if((Strangled || FrozenAir || BloodDrown) && !Breathless) choke_dialogue();
@ -705,7 +739,7 @@ nh_timeout()
if(u.divetimer<=3) You("are running short on air.");
if(u.divetimer==1) You("are running out of air!");
} else if (!u.usubwater){ /* limited duration dive, 2 turns to 6 turns naturally, 8 turns with magic */
if(u.divetimer < (ACURR(A_CON))/3 && !u.ustuck && !Babble && !Screaming) u.divetimer++;
if(u.divetimer < (ACURR(A_CON))/3 && !u.ustuck && (u.divetimer == 0 || (!Babble && !Screaming))) u.divetimer++;
else if(u.divetimer > (ACURR(A_CON))/3) u.divetimer--;
}
@ -841,6 +875,24 @@ nh_timeout()
}
done(GOLDING);
break;
case SALTED:
if (delayed_killer && !killer) {
killer = delayed_killer;
delayed_killer = 0;
}
if (!killer) {
/* leaving killer_format would make it
"petrified by petrification" */
killer_format = NO_KILLER_PREFIX;
killer = "killed by turning to salt";
}
if (!u.uconduct.killer){
//Pcifist PCs aren't combatants so if something kills them up "killed peaceful" type impurities
IMPURITY_UP(u.uimp_murder)
IMPURITY_UP(u.uimp_bloodlust)
}
done(SALTING);
break;
case FROZEN_AIR:
pline("The frozen air surrounding you becomes vapor.");
break;
@ -1250,6 +1302,13 @@ long timeout;
mon = mon2 = (struct monst *)0;
mtyp = big_to_little(egg->corpsenm);
if(u.silvergrubs && !rn2(20)){
u.silvergrubs = FALSE;
}
if(check_rot(ROT_KIN) && (u.silvergrubs || !rn2(100)) && !(mvitals[PM_MAN_FLY].mvflags&G_GONE && !In_quest(&u.uz))){
mtyp = PM_MAN_FLY;
u.silvergrubs = TRUE;
}
/* The identity of one's father is learned, not innate */
yours = (egg->spe || (!flags.female && carried(egg) && !rn2(2)));
silent = (timeout != monstermoves); /* hatched while away */
@ -2696,6 +2755,7 @@ struct obj *obj;
EMON(obj)->mspores = mon->mspores;
EMON(obj)->mformication = mon->mformication;
EMON(obj)->mscorpions = mon->mscorpions;
EMON(obj)->mcaterpillars = mon->mcaterpillars;
EMON(obj)->encouraged = mon->encouraged;

View file

@ -1610,6 +1610,9 @@ struct obj *otmp;
pline("The cold-iron sears %s!", //half cold-iron damage
mon_nam(mtmp));
}
if(hates_iron(mtmp->data) && tt == SPIKED_PIT){
mtmp->mironmarked = TRUE;
}
if (mtmp->mhp <= 0 ||
thitm(mtmp, rnd((tt == PIT) ? 6 : 10) + ((tt == SPIKED_PIT && hates_iron(mtmp->data)) ? rnd(mtmp->m_lev) : 0), FALSE))
trapkilled = TRUE;
@ -2463,6 +2466,9 @@ glovecheck: target = which_armor(mtmp, W_ARMG);
pline("The cold-iron sears %s!",
mon_nam(mtmp));
}
if(hates_iron(mtmp->data) && tt == SPIKED_PIT){
mtmp->mironmarked = TRUE;
}
mselftouch(mtmp, "Falling, ", FALSE);
if (mtmp->mhp <= 0 ||
thitm(mtmp, rnd((tt == PIT) ? 6 : 10) + ((tt == SPIKED_PIT && hates_iron(mtmp->data)) ? rnd(mtmp->m_lev) : 0), FALSE))

View file

@ -654,14 +654,14 @@ static struct trobj UndeadHunter[] = {
#define U_SMITH_HAMMER 2
{ SMITHING_HAMMER, 0, WEAPON_CLASS, 1, 0 },
#define U_JACKET 3
{ JACKET, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ JACKET, 0, ARMOR_CLASS, 1, 0 },
#define U_SHIRT 4
{ RUFFLED_SHIRT, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ RUFFLED_SHIRT, 0, ARMOR_CLASS, 1, 0 },
#define U_HAT 5
{ FEDORA, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ CLOAK, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ GLOVES, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ HIGH_BOOTS, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ TRICORN, 0, ARMOR_CLASS, 1, 0 },
{ CAPELET, 0, ARMOR_CLASS, 1, 0 },
{ GLOVES, 0, ARMOR_CLASS, 1, 0 },
{ HIGH_BOOTS, 0, ARMOR_CLASS, 1, 0 },
#define U_BULLETS 9
{ BLOOD_BULLET, 0, WEAPON_CLASS, 20, 0 },
{ NIGHTMARE_S_BULLET_MOLD, 0, TOOL_CLASS, 1, 0 },
@ -1900,6 +1900,7 @@ u_init()
u.uavoid_grabattk = 0; // by default, allow grabbing attacks
u.uavoid_englattk = 0; // by default, allow engulfing attacks
u.uavoid_unsafetouch = 1; // avoid touching potentally unsafe monsters by default
u.uavoid_theft = 0; // by default, allow theft attacks
u.umystic = ~0; //By default, all monk style attacks are active
u.summonMonster = FALSE;
@ -2713,6 +2714,7 @@ u_init()
switch(rn2(5)){
case 0:
//UndeadHunter[U_WEAPON].trotyp = CANE;
UndeadHunter[U_HAT].trotyp = flags.female ? (rn2(2) ? ESCOFFION : HENNIN) : TOP_HAT;
break;
case 1:
UndeadHunter[U_WEAPON].trotyp = SOLDIER_S_RAPIER;
@ -3421,6 +3423,19 @@ register struct trobj *trop;
if(obj->otyp == HEAVY_MACHINE_GUN && Role_if(PM_ANACHRONONAUT) && Race_if(PM_DWARF)){
set_material_gm(obj, MITHRIL);
}
if(Role_if(PM_UNDEAD_HUNTER)){
if(Race_if(PM_VAMPIRE) && obj->otyp != HIGH_BOOTS){
if(obj->obj_material == LEATHER || obj->otyp == TRICORN){
set_material_gm(obj, CLOTH);
if(obj->otyp == GLOVES)
obj->obj_color = CLR_RED;
else
obj->obj_color = CLR_BLACK;
}
}
else if(obj->otyp == TRICORN)
set_material_gm(obj, LEATHER);
}
if(obj->otyp == RIFLE && Role_if(PM_ANACHRONONAUT) && Race_if(PM_DWARF)){
set_material_gm(obj, MITHRIL);
add_oprop(obj, OPROP_BLADED);

View file

@ -260,8 +260,8 @@ struct monst *magr;
|| (Role_if(PM_UNDEAD_HUNTER) && mvitals[PM_MOON_S_CHOSEN].died)
)
){
if(u.uinsight)
tmp += rnd(min(u.uinsight, mlev(magr)));
if(Insight)
tmp += rnd(min(Insight, mlev(magr)));
}
else if(magr && insightful(magr->data)){
tmp += rnd(mlev(magr));
@ -269,8 +269,8 @@ struct monst *magr;
}
if (otmp->oartifact == ART_LASH_OF_THE_COLD_WASTE){
if(youagr && u.uinsight){
tmp += rnd(min(u.uinsight, mlev(magr)));
if(youagr && Insight){
tmp += rnd(min(Insight, mlev(magr)));
} else if(magr && insightful(magr->data)) {
tmp += rnd(mlev(magr));
}
@ -346,7 +346,7 @@ struct monst *magr;
attackmask |= WHACK;
}
if(obj && magr && !litsaber(obj) && is_chained_merc(obj) && (
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL)
(youagr && Insight > 20 && YOU_MERC_SPECIAL)
|| (!youagr && insightful(magr->data) && is_chaotic_mon(magr))
)){
attackmask |= WHACK;
@ -383,7 +383,7 @@ struct monst *magr;
|| oartifact == ART_CLAWS_OF_THE_REVENANCER
|| (obj && otyp == KNUCKLE_DUSTERS)
|| (obj && check_oprop(obj, OPROP_BLADED) && !litsaber(obj))
|| (obj && check_oprop(obj, OPROP_RLYHW) && u.uinsight >= 12)
|| (obj && check_oprop(obj, OPROP_RLYHW) && Insight >= 12)
|| (obj && !litsaber(obj) && is_streaming_merc(obj))
){
attackmask |= SLASH;
@ -395,7 +395,7 @@ struct monst *magr;
|| (oartifact == ART_BLOODLETTER && artinstance[oartifact].BLactive >= moves)
|| oartifact == ART_FIRE_BRAND
|| oartifact == ART_ARYFAERN_KERYM
|| (obj && check_oprop(obj, OPROP_RLYHW) && u.uinsight >= 24)
|| (obj && check_oprop(obj, OPROP_RLYHW) && Insight >= 24)
){
attackmask |= EXPLOSION;
}
@ -577,7 +577,7 @@ struct monst *magr;
{
ocn = 1;
ocd = 3;
if(u.uinsight >= 25){
if(Insight >= 25){
bonn = 1;
bond = 5;
spe_mult += 1;
@ -654,8 +654,8 @@ struct monst *magr;
ignore_rolls += u.usanity > 50 ? 0 : u.usanity > 25 ? 1 : u.usanity > 10 ? 2 : 3;
}
if (otyp == HEAVY_IRON_BALL) {
int wt = (int)objects[HEAVY_IRON_BALL].oc_weight;
if (otyp == BALL) {
int wt = (int)objects[BALL].oc_weight;
if ((int)obj->owt > wt) {
wt = ((int)obj->owt - wt) / 160;
@ -726,8 +726,8 @@ struct monst *magr;
modnum = &flat;
}
if(magr == &youmonst || (!magr && obj->where == OBJ_INVENT)){
*modnum += u.uinsight/10;
if (((moves)*(u.uinsight % 10)) / 10 > ((moves - 1)*(u.uinsight % 10)) / 10)
*modnum += Insight/10;
if (((moves)*(Insight % 10)) / 10 > ((moves - 1)*(Insight % 10)) / 10)
*modnum += 1;
}
else if(magr){
@ -985,22 +985,22 @@ struct monst *magr;
case DOUBLE_LIGHTSABER: spe_mult *= 3; ocn *= 3; if(obj&&obj->altmode){ ocn*=2; spe_mult *= 2;} break; // external special case: lightsaber forms
case ROD_OF_FORCE: spe_mult *= 2; ocn *= 2; if(obj&&obj->altmode){ ocn*=2; spe_mult *= 2;} break; // external special case: lightsaber forms
case DISKOS:
if(u.uinsight >= 40){
if(Insight >= 40){
ocn+=1;
flat+=(ocd+1)/2;
} else if(u.uinsight >= 35){
} else if(Insight >= 35){
ocn+=1;
flat+=(ocd+3)/4;
} else if(u.uinsight >= 30){
} else if(Insight >= 30){
plus(1,3*ocd/4);
flat+=(ocd+3)/4;
} else if(u.uinsight >= 25){
} else if(Insight >= 25){
plus(1,(ocd+1)/2);
flat+=(ocd+3)/4;
} else if(u.uinsight >= 10){
} else if(Insight >= 10){
plus(1,(ocd+3)/4);
flat+=(ocd+3)/4;
} else if(u.uinsight >= 5){
} else if(Insight >= 5){
flat+=(ocd+3)/4;
}
break;
@ -1623,7 +1623,7 @@ oselect(struct monst *mtmp, int x, int spot, boolean marilith)
|| (marilith && ok_mariwep(otmp, mtmp, mtmp->data, FALSE))
|| (otmp->otyp == CHAIN && mtmp->mtyp == PM_CATHEZAR)
|| (otmp->otyp == CHAIN && mtmp->mtyp == PM_FIERNA)
|| (otmp->otyp == HEAVY_IRON_BALL && mtmp->mtyp == PM_WARDEN_ARIANNA)
|| (otmp->otyp == BALL && (mtmp->mtyp == PM_WARDEN_ARIANNA || mtmp->mtyp == PM_ARIANNA || mtmp->mtyp == PM_RAGE_WALKER))
|| (mtmp->mtyp == PM_BASTARD_OF_THE_BOREAL_VALLEY)
|| (mtmp->mtyp == PM_LUNGORTHIN)
|| (mtmp->mtyp == PM_CORVIAN_KNIGHT)
@ -1963,7 +1963,7 @@ static const NEARDATA short hwep[] = {
MIRRORBLADE/*your weapon is probably pretty darn good*/,
TOOTH/*6d6/3d12+3*/,
GREATCLUB/*3d6/1d12*/,
HEAVY_IRON_BALL,/*1d25/1d25*/
BALL,/*1d25/1d25*/
VIBROBLADE,/*2d6+3/2d8+4*/
ROD_OF_FORCE/*2d8/2d12*/,
CRYSTAL_SWORD/*2d8/2d12*/,
@ -2008,6 +2008,7 @@ static const NEARDATA short hwep[] = {
PINCER_STAFF/*1d6+2/2d6+1*/,
SHANTA_PATA/*1d6+2/2d6+1*/,
TRIDENT/*1d8+1/3d6*/,
ELVEN_SCIMITAR/*1d6+2/1d6+1*/,
HUNTER_S_LONG_AXE/*1d8+1/1d6+2*/,
SAW_SPEAR/*1d8/1d10*/,
BOW_BLADE/*1d8/1d8*/,
@ -2096,7 +2097,7 @@ static const NEARDATA short hpwep[] = {
MIRRORBLADE/*your weapon is probably pretty darn good*/,
TOOTH/*6d6/3d12+3*/,
GREATCLUB/*3d6/1d12*/,
HEAVY_IRON_BALL,/*1d25/1d25*/
BALL,/*1d25/1d25*/
VIBROBLADE,/*2d6+3/2d8+4*/
ROD_OF_FORCE/*2d8/2d12*/,
CRYSTAL_SWORD/*2d8/2d12*/,
@ -2151,6 +2152,7 @@ static const NEARDATA short hpwep[] = {
PINCER_STAFF/*1d6+2/2d6+1*/,
SHANTA_PATA/*1d6+2/2d6+1*/,
TRIDENT/*1d8+2/3d6*/,
ELVEN_SCIMITAR/*1d6+2/1d6+1*/,
HUNTER_S_LONG_AXE/*1d8+1/1d6+2*/,
SAW_SPEAR/*1d8/1d10*/,
BOW_BLADE/*1d8/1d8*/,
@ -2236,7 +2238,7 @@ struct obj *otmp;
if (wep->oartifact) return FALSE;
if (!check_oprop(wep, OPROP_NONE) || (rakuyo_prop(wep) && u.uinsight >= 20)) return FALSE;
if (!check_oprop(wep, OPROP_NONE) || (rakuyo_prop(wep) && Insight >= 20)) return FALSE;
if (is_giant(mtmp->data) && wep->otyp == CLUB) return FALSE;
if (is_giant(mtmp->data) && otmp->otyp == CLUB) return TRUE;
@ -2277,10 +2279,10 @@ register struct monst *mtmp;
otmp = MON_WEP(mtmp);
if(otmp && (otmp->oartifact
|| !check_oprop(otmp, OPROP_NONE)
|| (rakuyo_prop(otmp) && u.uinsight >= 20) //Note: Rakuyo-ness is accidently caught by OPROP_
|| (otmp->otyp == ISAMUSEI && u.uinsight >= 22)
|| (otmp->otyp == DISKOS && u.uinsight >= 10)
|| (otmp->otyp == PINCER_STAFF && u.uinsight >= 10)
|| (rakuyo_prop(otmp) && Insight >= 20) //Note: Rakuyo-ness is accidently caught by OPROP_
|| (otmp->otyp == ISAMUSEI && Insight >= 22)
|| (otmp->otyp == DISKOS && Insight >= 10)
|| (otmp->otyp == PINCER_STAFF && Insight >= 10)
))
return otmp;
@ -2288,15 +2290,15 @@ register struct monst *mtmp;
for(otmp=mtmp->minvent; otmp; otmp = otmp->nobj) {
if (/* valid weapon */
(otmp->oclass == WEAPON_CLASS || is_weptool(otmp)
|| otmp->otyp == CHAIN || otmp->otyp == HEAVY_IRON_BALL
|| otmp->otyp == CHAIN || otmp->otyp == BALL
) &&
/* an artifact or other special weapon*/
(otmp->oartifact
|| !check_oprop(otmp, OPROP_NONE)
|| (rakuyo_prop(otmp) && u.uinsight >= 20)
|| (otmp->otyp == ISAMUSEI && u.uinsight >= 22)
|| (otmp->otyp == DISKOS && u.uinsight >= 10)
|| (otmp->otyp == PINCER_STAFF && u.uinsight >= 10)
|| (rakuyo_prop(otmp) && Insight >= 20)
|| (otmp->otyp == ISAMUSEI && Insight >= 22)
|| (otmp->otyp == DISKOS && Insight >= 10)
|| (otmp->otyp == PINCER_STAFF && Insight >= 10)
) &&
/* never uncharged lightsabers */
(!is_lightsaber(otmp) || otmp->age
@ -2354,10 +2356,10 @@ register struct monst *mtmp;
otmp = MON_SWEP(mtmp);
if(otmp && (otmp->oartifact
|| !check_oprop(otmp, OPROP_NONE)
|| (rakuyo_prop(otmp) && u.uinsight >= 20)
|| (otmp->otyp == ISAMUSEI && u.uinsight >= 22)
|| (otmp->otyp == DISKOS && u.uinsight >= 10)
|| (otmp->otyp == PINCER_STAFF && u.uinsight >= 10)
|| (rakuyo_prop(otmp) && Insight >= 20)
|| (otmp->otyp == ISAMUSEI && Insight >= 22)
|| (otmp->otyp == DISKOS && Insight >= 10)
|| (otmp->otyp == PINCER_STAFF && Insight >= 10)
))
return otmp;
@ -2365,17 +2367,17 @@ register struct monst *mtmp;
for(otmp=mtmp->minvent; otmp; otmp = otmp->nobj) {
if (/* valid weapon */
(otmp->oclass == WEAPON_CLASS || is_weptool(otmp)
|| otmp->otyp == CHAIN || otmp->otyp == HEAVY_IRON_BALL
|| otmp->otyp == CHAIN || otmp->otyp == BALL
) &&
/* not already weided in main hand */
(otmp != MON_WEP(mtmp)) &&
/* an artifact or other special weapon*/
(otmp->oartifact
|| !check_oprop(otmp, OPROP_NONE)
|| (rakuyo_prop(otmp) && u.uinsight >= 20)
|| (otmp->otyp == ISAMUSEI && u.uinsight >= 22)
|| (otmp->otyp == DISKOS && u.uinsight >= 10)
|| (otmp->otyp == PINCER_STAFF && u.uinsight >= 10)
|| (rakuyo_prop(otmp) && Insight >= 20)
|| (otmp->otyp == ISAMUSEI && Insight >= 22)
|| (otmp->otyp == DISKOS && Insight >= 10)
|| (otmp->otyp == PINCER_STAFF && Insight >= 10)
) &&
/* never uncharged lightsabers */
(!is_lightsaber(otmp) || otmp->age
@ -2954,7 +2956,7 @@ int atr;
otmp->oartifact == ART_FRIEDE_S_SCYTHE || otmp->oartifact == ART_CRUCIFIX_OF_THE_MAD_KING)
mod = 0.5;
if (check_oprop(otmp, OPROP_OCLTW) || (u.uinsight > 0 && check_oprop(otmp, OPROP_GSSDW)))
if (check_oprop(otmp, OPROP_OCLTW) || (Insight > 0 && check_oprop(otmp, OPROP_GSSDW)))
mod = 0.5;
return mod;
@ -2974,7 +2976,7 @@ int atr;
case A_CON:
return mod;
case A_INT:
if (u.uinsight > 0 && check_oprop(otmp, OPROP_GSSDW))
if (Insight > 0 && check_oprop(otmp, OPROP_GSSDW))
mod += 1;
if (otmp->oartifact == ART_VELKA_S_RAPIER || otmp->oartifact == ART_FRIEDE_S_SCYTHE)
@ -3701,7 +3703,7 @@ struct obj *obj;
/* Not using a weapon */
return (P_BARE_HANDED_COMBAT);
#ifdef CONVICT
if ((obj->otyp == HEAVY_IRON_BALL) && (Role_if(PM_CONVICT) || u.sealsActive&SEAL_AHAZU))
if ((obj->otyp == BALL) && (Role_if(PM_CONVICT) || u.sealsActive&SEAL_AHAZU))
return objects[obj->otyp].oc_skill;
#endif /* CONVICT */
if ((obj->otyp == CHAIN) && (Role_if(PM_CONVICT) || u.sealsActive&SEAL_AHAZU))

View file

@ -359,6 +359,7 @@ struct monst *mon;
}
/* regenerate by 1/4 of the lost hit points */
mon->mhp += (mon->mhpmax - mon->mhp) / 4;
return;
}
pm = counter_were(monsndx(mon->data));

View file

@ -57,7 +57,7 @@ STATIC_DCL int FDECL(ready_weapon, (struct obj *, boolean));
/* probably should be renamed */
#define erodeable_wep(optr) ((optr)->oclass == WEAPON_CLASS \
|| is_weptool(optr) \
|| (optr)->otyp == HEAVY_IRON_BALL \
|| (optr)->otyp == BALL \
|| (optr)->otyp == CHAIN)
/* used by welded(), and also while wielding */

View file

@ -1239,7 +1239,7 @@ coa_arrive()
if(!mtmp && mvitals[PM_CENTER_OF_ALL].born == 0) mtmp = makemon(&mons[PM_CENTER_OF_ALL], 0, 0, MM_NOWAIT);
if (mtmp && (In_endgame(&u.uz) || u.uinsight > 8)) {
if (mtmp && (In_endgame(&u.uz) || Insight > 8)) {
mtmp->msleeping = mtmp->mtame = mtmp->mpeaceful = 0;
set_malign(mtmp);
}

View file

@ -100,7 +100,7 @@ int otyp;
otyp = obj->otyp;
i = 0;
for (cur_prop = 1; cur_prop < LAST_PROP; cur_prop++)
for (cur_prop = 1; cur_prop <= LAST_PROP; cur_prop++)
{
got_prop = FALSE;
// from objclass
@ -233,6 +233,10 @@ int otyp;
if(check_imp_mod(obj, IEA_PROT_SHAPE))
got_prop = TRUE;
break;
case QUICK_DRAW:
if(check_imp_mod(obj, IEA_GODEXTERITY))
got_prop = TRUE;
break;
}
}
//From scorpion carapace
@ -812,8 +816,8 @@ struct monst *mon;
base -= mon->data->nac;
}
if(mon->mtyp == PM_CARCOSAN_COURTIER){
if(u.uinsight < 25){
base -= u.uinsight/5;
if(Insight < 25){
base -= Insight/5;
}
else {
base -= 5;
@ -821,8 +825,8 @@ struct monst *mon;
}
if(!mon->mcan){
base -= mon->data->pac;
if(mon->mtyp == PM_CENTER_OF_ALL && u.uinsight < 32)
base -= (32-u.uinsight)/2;
if(mon->mtyp == PM_CENTER_OF_ALL && Insight < 32)
base -= (32-Insight)/2;
}
if(mon->mtyp == PM_VERMIURGE && mon->mvar_vermiurge > 0)
base -= min(mon->mvar_vermiurge/10, 20);
@ -895,10 +899,10 @@ struct monst *mon;
if(!uarmc && !uarm) base -= max( (monwep->spe+1)/2,0);
}
else if(monwep->oartifact == ART_LASH_OF_THE_COLD_WASTE){
if(u.uinsight >= 20)
if(Insight >= 20)
base -= 10;
else if(u.uinsight > 10)
base -= u.uinsight - 10;
else if(Insight > 10)
base -= Insight - 10;
}
if(monwep->obj_material == MERCURIAL){
int level = monwep->ocarry->m_lev;
@ -1046,8 +1050,8 @@ struct monst *mon;
base -= mon->data->nac;
}
if(mon->mtyp == PM_CARCOSAN_COURTIER){
if(u.uinsight < 25){
base -= u.uinsight/5;
if(Insight < 25){
base -= Insight/5;
}
else {
base -= 5;
@ -1055,8 +1059,8 @@ struct monst *mon;
}
if(!mon->mcan && !(mon->mtyp == PM_SHADOWSMITH && dimness(mon->mx,mon->my) <= 0)){
base -= mon->data->pac;
if(mon->mtyp == PM_CENTER_OF_ALL && u.uinsight < 32)
base -= (32-u.uinsight)/2;
if(mon->mtyp == PM_CENTER_OF_ALL && Insight < 32)
base -= (32-Insight)/2;
}
if(mon->mtyp == PM_VERMIURGE && mon->mvar_vermiurge > 0)
base -= min(mon->mvar_vermiurge/10, 20);
@ -1257,13 +1261,13 @@ struct monst *mon;
if(mon->mtame){
if(active_glyph(IMPURITY)) base += 3;
if(active_glyph(DEFILEMENT)) base += 3;
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && u.uinsight >= 5){
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && Insight >= 5){
base += 3;
}
if(active_glyph(DEFILEMENT)){
if(active_glyph(IMPURITY))
base += max(0, u.uimpurity/3-3);
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && u.uinsight >= 5)
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && Insight >= 5)
base += max(0, (u.uimpurity+4)/3-3);
}
if(Role_if(PM_HEALER))
@ -1307,13 +1311,13 @@ struct monst *mon;
if(mon->mtame){
if(active_glyph(IMPURITY)) base += 3;
if(active_glyph(DEFILEMENT)) base += 3;
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && u.uinsight >= 5){
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && Insight >= 5){
base += 3;
}
if(active_glyph(DEFILEMENT)){
if(active_glyph(IMPURITY))
base += max(0, u.uimpurity/3-3);
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && u.uinsight >= 5)
if(uarm && uarm->oartifact == ART_SCORPION_CARAPACE && check_carapace_mod(uarm, CPROP_IMPURITY) && Insight >= 5)
base += max(0, (u.uimpurity+4)/3-3);
}
if(Role_if(PM_HEALER))
@ -1351,8 +1355,8 @@ struct monst *mon;
#undef m_fdr
#undef m_gdr
base += (dr / 7);
if(mon->mtyp == PM_CENTER_OF_ALL && u.uinsight < 32)
base += (33-u.uinsight)/2;
if(mon->mtyp == PM_CENTER_OF_ALL && Insight < 32)
base += (33-Insight)/2;
if(mon->mtyp == PM_OONA && mon->mhp < mon->mhpmax/2){
base += 7;
@ -1529,10 +1533,10 @@ int depth;
}
}
else if(MON_WEP(mon)->oartifact == ART_LASH_OF_THE_COLD_WASTE){
if(u.uinsight >= 40)
if(Insight >= 40)
bas_mdr += 5;
else if(u.uinsight > 20)
bas_mdr += (u.uinsight - 20)/4;
else if(Insight > 20)
bas_mdr += (Insight - 20)/4;
}
}
/* Hod Sephirah OVERRIDE other arm_mdr sources with the player's total DR (regardless of who's attacking them) */
@ -1554,8 +1558,8 @@ int depth;
}
nat_mdr += slotnatdr;
if(mon->mtyp == PM_CARCOSAN_COURTIER){
if(u.uinsight < 25){
nat_mdr += u.uinsight/5;
if(Insight < 25){
nat_mdr += Insight/5;
}
else {
nat_mdr += 5;
@ -1570,8 +1574,8 @@ int depth;
case LEG_DR: bas_mdr += mon->data->spe_fdr; break;
case ARM_DR: bas_mdr += mon->data->spe_gdr; break;
}
if(mon->mtyp == PM_CENTER_OF_ALL && u.uinsight < 32)
bas_mdr += (33-u.uinsight)/2;
if(mon->mtyp == PM_CENTER_OF_ALL && Insight < 32)
bas_mdr += (33-Insight)/2;
if(mon->mtyp == PM_OONA && mon->mhp < mon->mhpmax/2){
bas_mdr += 7;
@ -1738,7 +1742,7 @@ boolean racialexception;
if (mon->mfrozen) return; /* probably putting previous item on */
if(is_whirly(mon->data) || noncorporeal(mon->data)) return;
if(is_gaseous_noequip(mon->data) || noncorporeal(mon->data)) return;
/* Get a copy of monster's name before altering its visibility */
Strcpy(nambuf, See_invisible(mon->mx,mon->my) ? Monnam(mon) : mon_nam(mon));
@ -2100,8 +2104,8 @@ boolean polyspot;
m_useup(mon, otmp); /* no message here;
"the dragon merges with his scaly armor" is odd
and the monster's previous form is already gone */
else if(!arm_size_fits(mon->data, otmp) || !arm_match(mon->data,otmp) || is_whirly(mon->data) || noncorporeal(mon->data)){
if (special_armor(otmp) || otmp->objsize > mon->data->msize || is_whirly(mon->data) || noncorporeal(mon->data)) {
else if(!arm_size_fits(mon->data, otmp) || !arm_match(mon->data,otmp) || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)){
if (special_armor(otmp) || otmp->objsize > mon->data->msize || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)) {
if (vis)
pline("%s armor falls around %s!",
s_suffix(Monnam(mon)), pronoun);
@ -2119,8 +2123,8 @@ boolean polyspot;
}
}
if ((otmp = which_armor(mon, W_ARMC)) != 0) {
if(abs(otmp->objsize - mon->data->msize) > 1 || is_whirly(mon->data) || noncorporeal(mon->data)){
if (special_armor(otmp) || otmp->objsize > mon->data->msize || is_whirly(mon->data) || noncorporeal(mon->data)) {
if(abs(otmp->objsize - mon->data->msize) > 1 || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)){
if (special_armor(otmp) || otmp->objsize > mon->data->msize || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)) {
if (vis)
pline("%s %s falls off!", s_suffix(Monnam(mon)),
cloak_simple_name(otmp));
@ -2150,8 +2154,8 @@ boolean polyspot;
}
}
if ((otmp = which_armor(mon, W_ARMU)) != 0) {
if(otmp->objsize != mon->data->msize || !shirt_match(mon->data,otmp) || is_whirly(mon->data) || noncorporeal(mon->data)){
if (special_armor(otmp) || otmp->objsize > mon->data->msize || is_whirly(mon->data) || noncorporeal(mon->data)) {
if(otmp->objsize != mon->data->msize || !shirt_match(mon->data,otmp) || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)){
if (special_armor(otmp) || otmp->objsize > mon->data->msize || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)) {
if (vis)
pline("%s %s falls off!", s_suffix(Monnam(mon)),
cloak_simple_name(otmp));
@ -2167,7 +2171,7 @@ boolean polyspot;
}
}
if ((otmp = which_armor(mon, W_ARMG)) != 0) {
if(nogloves(mon->data) || nolimbs(mon->data) || otmp->objsize != mon->data->msize || is_whirly(mon->data) || noncorporeal(mon->data)){
if(nogloves(mon->data) || nolimbs(mon->data) || otmp->objsize != mon->data->msize || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)){
if (vis)
pline("%s drops %s gloves!", Monnam(mon), ppronoun);
if (polyspot) bypass_obj(otmp);
@ -2175,7 +2179,7 @@ boolean polyspot;
}
}
if ((otmp = which_armor(mon, W_ARMS)) != 0) {
if(nohands(mon->data) || nolimbs(mon->data) || bimanual(MON_WEP(mon),mon->data) || is_whirly(mon->data) || noncorporeal(mon->data)){
if(nohands(mon->data) || nolimbs(mon->data) || bimanual(MON_WEP(mon),mon->data) || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)){
if (vis)
pline("%s can no longer hold %s shield!", Monnam(mon), ppronoun);
else
@ -2186,7 +2190,7 @@ boolean polyspot;
}
if ((otmp = which_armor(mon, W_ARMH)) != 0 &&
/* flimsy test for horns matches polyself handling */
(!helm_match(mon->data, otmp) || !helm_size_fits(mon->data, otmp) || is_whirly(mon->data) || noncorporeal(mon->data) )
(!helm_match(mon->data, otmp) || !helm_size_fits(mon->data, otmp) || is_gaseous_noequip(mon->data) || noncorporeal(mon->data) )
) {
if (vis)
pline("%s helmet falls to the %s!",
@ -2197,9 +2201,9 @@ boolean polyspot;
m_lose_armor(mon, otmp);
}
if ((otmp = which_armor(mon, W_ARMF)) != 0) {
if(((noboots(mon->data) || !humanoid(mon->data)) && !can_wear_boots(mon->data)) || !boots_size_fits(mon->data, otmp) || is_whirly(mon->data) || noncorporeal(mon->data)){
if(((noboots(mon->data) || !humanoid(mon->data)) && !can_wear_boots(mon->data)) || !boots_size_fits(mon->data, otmp) || is_gaseous_noequip(mon->data) || noncorporeal(mon->data)){
if (vis) {
if (is_whirly(mon->data) || noncorporeal(mon->data))
if (is_gaseous_noequip(mon->data) || noncorporeal(mon->data))
pline("%s %s falls, unsupported!",
s_suffix(Monnam(mon)), cloak_simple_name(otmp));
else pline("%s boots %s off %s feet!",
@ -2899,7 +2903,6 @@ saber_damage_slot(struct monst *mdef, struct obj *saber, int slot, boolean letha
*messaged = TRUE;
vis = FALSE;
}
pline("%s is hit", The(xname(otmp)));
if((is_lasersword(saber) && item_has_property(otmp, REFLECTING))
||(saber->otyp == ROD_OF_FORCE && (item_has_property(otmp, ANTIMAGIC) || item_has_property(otmp, NULLMAGIC)))
||(saber->otyp == KAMEREL_VAJRA && item_has_property(otmp, SHOCK_RES))

View file

@ -776,10 +776,10 @@ int tary;
boolean devaloop = (aatyp == AT_DEVA);
do {
bhitpos.x = tarx; bhitpos.y = tary;
if(ranged && otmp && is_cclub_able(otmp) && u.uinsight >= 15)
if(ranged && otmp && is_cclub_able(otmp) && Insight >= 15)
otmp->otyp = CLAWED_HAND;
result = xmeleehity(magr, mdef, attk, &otmp, vis, tohitmod, ranged);
if(ranged && otmp && is_cclub_able(otmp) && u.uinsight >= 15)
if(ranged && otmp && is_cclub_able(otmp) && Insight >= 15)
otmp->otyp = otmp->oartifact == ART_AMALGAMATED_SKIES ? TWO_HANDED_SWORD : CLUB;
/* Marionette causes an additional weapon strike to a monster behind the original target */
/* this can attack peaceful/tame creatures without warning */
@ -808,22 +808,22 @@ int tary;
/* Mercurial weapons may hit additional targets */
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && otmp && is_streaming_merc(otmp)){
if(magr && mlev(magr) > 20 && (
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL)
(youagr && Insight > 20 && YOU_MERC_SPECIAL)
|| (!youagr && insightful(magr->data) && is_chaotic_mon(magr))
)){
result |= hit_with_streaming(magr, otmp, tarx, tary, tohitmod, attk)&(MM_AGR_DIED|MM_AGR_STOP);
}
}
/* Rakuyo hit additional targets, if your insight is high enough to percieve the blood */
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 20 && otmp && rakuyo_prop(otmp)){
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 20 && otmp && rakuyo_prop(otmp)){
result |= hit_with_rblood(magr, otmp, tarx, tary, tohitmod, attk)&(MM_AGR_DIED|MM_AGR_STOP);
}
/* Club-claw insight weapons strike additional targets if your insight is high enough to perceive the claw */
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 15 && otmp && is_cclub_able(otmp)){
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 15 && otmp && is_cclub_able(otmp)){
result |= hit_with_cclaw(magr, otmp, tarx, tary, tohitmod, attk)&(MM_AGR_DIED|MM_AGR_STOP);
}
/* Isamusei hit additional targets, if your insight is high enough to percieve the distortions */
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && u.uinsight >= 22 && otmp && otmp->otyp == ISAMUSEI){
if(!ranged && !(result&(MM_AGR_DIED|MM_AGR_STOP)) && Insight >= 22 && otmp && otmp->otyp == ISAMUSEI){
result |= hit_with_iwarp(magr, otmp, tarx, tary, tohitmod, attk)&(MM_AGR_DIED|MM_AGR_STOP);
}
/* Soldier's katar may shoot additional targets */
@ -1030,6 +1030,7 @@ int tary;
case AT_WISP: //
case AT_HITS: // always hits
case AT_TUCH: // uses touch accuracy
case AT_VOMT: // uses touch accuracy
case AT_SRPR: // uses touch accuracy
case AT_XSPR: // uses touch accuracy
case AT_MSPR: // uses touch accuracy
@ -1957,9 +1958,40 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
}
/*Some attacks have insight requirements*/
/*PCs can gain monster insight attacks, since insight is always about the PC's perceptions*/
if(attk->ins_req > u.uinsight){
if(attk->ins_req > Insight){
GETNEXT
}
/*Some attacks have sanity requirements*/
if(attk->san_req > 0){
if(youdef || by_the_book){
if(NightmareAware_Sanity < attk->san_req){
GETNEXT
}
}
else if(mdef){
if(mdef->encouraged < attk->san_req/10){
GETNEXT
}
}
else {
GETNEXT
}
}
else if(attk->san_req < 0){
if(youdef || by_the_book){
if(NightmareAware_Sanity > -1*attk->san_req){
GETNEXT
}
}
else if(mdef){
if(mdef->encouraged > -1*attk->san_req/10){
GETNEXT
}
}
else {
GETNEXT
}
}
/* khaamnun tanninim switch to sucking memories after dragging target in close */
if (pa->mtyp == PM_KHAAMNUN_TANNIN
&& mdef && distmin(x(magr),y(magr), x(mdef),y(mdef)) <= 1
@ -1984,9 +2016,9 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
attk->aatyp = AT_DEVA;
}
/* Carcosan courtiers gain extra dice on their tentacles. */
if(pa->mtyp == PM_CARCOSAN_COURTIER && attk->aatyp == AT_TENT && u.uinsight > 5){
if(u.uinsight < 25){
attk->damn = u.uinsight/5;
if(pa->mtyp == PM_CARCOSAN_COURTIER && attk->aatyp == AT_TENT && Insight > 5){
if(Insight < 25){
attk->damn = Insight/5;
}
else {
attk->damn = 5;
@ -2293,7 +2325,11 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
}
}
/* Dream leech dream leeches disappear when cancelled */
if(has_template(magr, DREAM_LEECH) && magr->mcan &&attk->aatyp == AT_TUCH && attk->adtyp == AT_TUCH){
if(has_template(magr, DREAM_LEECH) && magr->mcan &&attk->aatyp == AT_TUCH && attk->adtyp == AD_DRIN){
GETNEXT
}
/* Tettigon touch attack is magical and can be cancelled */
if(magr->mtyp == PM_TETTIGON_LEGATUS && magr->mcan &&attk->aatyp == AT_TUCH){
GETNEXT
}
/* Skip kicks with wounded legs */
@ -2304,6 +2340,10 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
if(!youagr && magr->mstun && !by_the_book && !rn2(6)){
GETNEXT
}
/* Man flies actually have only a 1/10th chance to barf */
if(pa->mtyp == PM_MAN_FLY && attk->aatyp == AT_VOMT && !by_the_book && rn2(10)){
GETNEXT
}
if(!by_the_book &&
(pa->mtyp == PM_SMALL_GOAT_SPAWN || pa->mtyp == PM_GOAT_SPAWN || pa->mtyp == PM_GIANT_GOAT_SPAWN || pa->mtyp == PM_XUENU_MONK)
@ -2459,7 +2499,7 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
}
}
/* Blibdoolpoolp switches to a worse attack routine at high insight -- shown in pokedex */
if (pa->mtyp == PM_BLIBDOOLPOOLP__GRAVEN_INTO_FLESH && *indexnum < NATTK && u.uinsight >= 54) {
if (pa->mtyp == PM_BLIBDOOLPOOLP__GRAVEN_INTO_FLESH && *indexnum < NATTK && Insight >= 54) {
static const struct attack blib_alternate[NATTK] = {
{ AT_CLAW, AD_SQUE, 4, 8, 0, 0, 1 },
{ AT_CLAW, AD_SQUE, 4, 8, 0, 1, 0 },
@ -2745,6 +2785,18 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
add_subout(subout, SUBOUT_SALA2);
}
/* Player may get rot stinger attack */
if (youagr && is_null_attk(attk) && !by_the_book && check_rot(ROT_STING)
&& !check_subout(subout, SUBOUT_ROT_STING)
) {
attk->aatyp = AT_STNG;
attk->adtyp = AD_DISE;
attk->damn = 1;
attk->damd = 4;
fromlist = FALSE;
add_subout(subout, SUBOUT_ROT_STING);
}
/* Player may get brain sucker attack */
if (youagr && is_null_attk(attk) && !by_the_book && u.brainsuckers && active_glyph(LUMEN)
&& !check_subout(subout, SUBOUT_BRAINSUCK)
@ -2757,6 +2809,22 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
add_subout(subout, SUBOUT_BRAINSUCK);
}
/* Player may get rot vomit attack */
if (youagr && is_null_attk(attk) && !by_the_book && check_rot(ROT_VOMIT) && (umechanoid || u.uhs < WEAK)
&& !check_subout(subout, SUBOUT_ROT_VOMIT)
) {
if(!rn2(10)){
attk->aatyp = AT_VOMT;
attk->adtyp = AD_DISE;
attk->damn = 1;
attk->damd = 1;
fromlist = FALSE;
make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
if(!umechanoid) morehungry(20*get_uhungersizemod());
}
add_subout(subout, SUBOUT_ROT_VOMIT);
}
/* players can get a whole host of spirit attacks */
if (youagr && is_null_attk(attk) && !by_the_book) {
/* this assumes that getattk() will not be interrupted with youagr when already called with youagr */
@ -2770,6 +2838,17 @@ int * tohitmod; /* some attacks are made with decreased accuracy */
fromlist = FALSE;
}
/* Player may get rot spores passive attack */
if (youagr && is_null_attk(attk) && !by_the_book && check_rot(ROT_SPORES)
&& !check_subout(subout, SUBOUT_ROT_SPORES)
) {
attk->aatyp = AT_NONE;
attk->adtyp = AD_DISE;
attk->damn = 1;
attk->damd = 1;
fromlist = FALSE;
add_subout(subout, SUBOUT_ROT_SPORES);
}
/* some pseudonatural's claws become more-damaging tentacles */
if (!youagr && has_template(magr, PSEUDONATURAL) && (
attk->aatyp == AT_CLAW && (magr->m_id + *indexnum) % 4 == 0)
@ -2992,6 +3071,7 @@ struct attack *attk;
boolean youagr = (magr == &youmonst);
boolean youdef = (mdef == &youmonst);
struct permonst * pa = youagr ? youracedata : magr->data;
struct permonst * pd = youdef ? youracedata : mdef->data;
int compat;
/* AT_NONE is silent */
@ -3136,7 +3216,7 @@ struct attack *attk;
case AT_OBIT:
pline("%s %s bites %s!",
(youagr ? "Your" : s_suffix(Monnam(magr))),
(attk->adtyp == AD_MAGM ? "skirt" : magr->mtyp == PM_MEDUSA ? "hair" : magr->mtyp == PM_MOON_S_CHOSEN ? "cranial wolfpack" : magr->mtyp == PM_HYGIEIAN_ARCHON ? "snake" : magr->mtyp == PM_ANCIENT_NAGA ? "canopy" : "snake head"),
(attk->adtyp == AD_MAGM ? "skirt" : magr->mtyp == PM_MEDUSA ? "hair" : magr->mtyp == PM_MOON_S_CHOSEN ? "cranial wolfpack" : magr->mtyp == PM_HYGIEIAN_ARCHON ? "snake" : magr->mtyp == PM_ANCIENT_NAGA ? "canopy" : attk->adtyp == AD_DISE ? "centipede" : "snake head"),
((youdef && !youagr) ? "you" : mon_nam_too(mdef, magr))
);
break;
@ -3148,6 +3228,14 @@ struct attack *attk;
(youagr ? "your" : mhis(magr))
);
break;
case AT_VOMT:
pline("%s vomit%s %s %s!",
(youagr ? "You" : Monnam(magr)),
(youagr ? "" : "s"),
(pd->msize > pa->msize ? "on" : "all over"),
((youdef && !youagr) ? "you" : mon_nam_too(mdef, magr))
);
break;
case AT_TONG:
if(attk->adtyp == AD_FATK
|| attk->adtyp == AD_PAIN
@ -3840,7 +3928,7 @@ int *shield_margin;
(u.sealsActive&SEAL_EVE) ||
(weapon->otyp == DAGGER && Role_if(PM_ROGUE)) ||
(weapon->otyp == DART && Role_if(PM_TOURIST)) ||
(weapon->otyp == HEAVY_IRON_BALL && Role_if(PM_CONVICT))
(weapon->otyp == BALL && Role_if(PM_CONVICT))
)) {
base_acc = mlev(magr);
}
@ -3929,8 +4017,8 @@ int *shield_margin;
if(attk && is_insight_tentacle_at(attk->aatyp)
&& (u.sealsActive&SEAL_OSE)
){
if(u.uinsight)
bons_acc += rnd(min(u.uinsight, mlev(magr)));
if(Insight)
bons_acc += rnd(min(Insight, mlev(magr)));
if (ACURR(A_CHA) == 25) bons_acc += 8;
else bons_acc += max(0, (ACURR(A_CHA) - 10) / 2);
}
@ -3972,7 +4060,7 @@ int *shield_margin;
/* monster-only accuracy bonuses */
else {
/* martial-trained foes are accurate */
if(magr->mformication || magr->mscorpions)
if(magr->mformication || magr->mscorpions || magr->mcaterpillars)
bons_acc -= 2;
else switch(m_martial_skill(pa)) {
case P_UNSKILLED: bons_acc += 0; break;
@ -4136,7 +4224,7 @@ int *shield_margin;
}
/* some objects are more likely to hit than others */
switch (weapon->otyp) {
case HEAVY_IRON_BALL:
case BALL:
if (weapon != uball)
rang_acc += 2;
break;
@ -4236,8 +4324,8 @@ int *shield_margin;
if (is_insight_weapon(launcher) && (youagr ? (Role_if(PM_MADMAN) || u.sealsActive&SEAL_OSE || mvitals[PM_MOON_S_CHOSEN].died) : insightful(magr->data))){
if(youagr){
if(u.uinsight)
wepn_acc += rnd(min(u.uinsight, mlev(magr)));
if(Insight)
wepn_acc += rnd(min(Insight, mlev(magr)));
}
else {
wepn_acc += rnd(mlev(magr));
@ -4363,6 +4451,7 @@ int *shield_margin;
(melee && youagr && weapon && weapon->otyp == LONG_SWORD && activeFightingForm(FFORM_HALF_SWORD)) ||
(melee && attk->aatyp == AT_TUCH) ||
(melee && attk->aatyp == AT_VINE) ||
(melee && attk->aatyp == AT_VOMT) ||
(melee && spirit_rapier_at(attk->aatyp)) ||
(weapon && !valid_weapon(weapon)) /* potions, cream pies, rubber chickens, eggs, etc. */
) {
@ -4373,6 +4462,9 @@ int *shield_margin;
defn_acc += base_mac(mdef);
}
if(shield_margin) *shield_margin = -1;
if(melee && attk->aatyp == AT_VOMT){
defn_acc += 5;
}
}
/* do not ignore worn armor */
else {
@ -4586,6 +4678,7 @@ boolean ranged;
case AT_MSPR: // uses touch accuracy
case AT_DSPR: // uses touch accuracy
case AT_ESPR: // uses touch accuracy
case AT_VOMT: // uses touch accuracy
/* ranged attack types that are also melee */
case AT_LNCK:
case AT_5SBT:
@ -5427,6 +5520,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
/* acid */
case AD_EACD:
case AD_ACID:
case AD_OMUD:
/* print a basic hit message */
if (vis && dohitmsg) {
xyhitmsg(magr, mdef, originalattk);
@ -5435,9 +5529,11 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
if ((notmcan && !rn2(3)) || attk->adtyp == AD_EACD) {
/* someone's splashed -- print mesage message! */
if (vis) {
Sprintf(buf, "%s%s covered in acid",
Sprintf(buf, "%s%s covered in %s",
(youdef ? "You" : Monnam(mdef)),
(youdef ? "'re" : " is"));
(youdef ? "'re" : " is"),
(attk->adtyp == AD_OMUD ? "writhing tarry mud" : "acid")
);
}
if (Acid_res(mdef)) {
if (attk->adtyp == AD_EACD)
@ -5448,7 +5544,10 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
/* print message */
if (youdef){
if (dmg == 0) {
Strcat(buf, ", but it seems harmless.");
if(attk->adtyp == AD_OMUD)
Strcat(buf, ".");
else
Strcat(buf, ", but it seems harmless.");
}
else if (Acid_res(mdef)) {
Strcat(buf, "! It stings!");
@ -5473,6 +5572,12 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
pline("%s", buf);
if (dmg == 0 && !youdef)
shieldeff(mdef->mx, mdef->my);
if(attk->adtyp == AD_OMUD){
pline("It begins stabbing %s with bone daggers!", youdef ? "you" : mon_nam(mdef));
}
}
if(attk->adtyp == AD_OMUD){
mdef->momud = TRUE;
}
/* erode armor, if inventory isn't protected */
@ -5519,6 +5624,9 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
xyhitmsg(magr, mdef, originalattk);
}
/* asymetric: diseasemu prints out messages, applies sickness to player*/
if(originalattk->aatyp == AT_VOMT){
mdef->mcaterpillars = TRUE;
}
if (youdef) {
if (!diseasemu(pa))
dmg = 0;
@ -5537,6 +5645,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
pline("%s is afflicted by disease!",
Monnam(mdef));
}
if(!rn2(10)) dmg += 100;
if(!youagr && mdef->mhp < mdef->mhpmax/2 && ((magr->mspores && !rn2(20)) || has_template(magr, SPORE_ZOMBIE) || has_template(magr, CORDYCEPS)))
mdef->mspores = TRUE;
}
@ -6350,6 +6459,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
return xmeleehurty(magr, mdef, &alt_attk, originalattk, weapon_p, FALSE, dmg, dieroll, vis, ranged);
/* various poisons */
case AD_PFBT:
case AD_SVPN:
case AD_DRST:
case AD_DRDX:
@ -6359,6 +6469,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
switch (attk->adtyp)
{
case AD_SVPN: ptmp = !rn2(3) ? A_STR : rn2(2) ? A_DEX : A_CON; break;
case AD_PFBT:
case AD_DRST: ptmp = A_STR; break;
case AD_DRDX: ptmp = A_DEX; break;
case AD_EDRC:
@ -6404,6 +6515,9 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
else {
if (vis)
pline_The("poison was deadly...");
if(youagr){
IMPURITY_UP(u.uimp_poison)
}
mdef->mhp = 0;
}
/* if the poison killed, deal with the maybe-dead monster and return early */
@ -6422,7 +6536,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
}
}
/* make physical attack without hitmsg */
alt_attk.adtyp = AD_PHYS;
alt_attk.adtyp = attk->adtyp == AD_PFBT ? AD_DISE : AD_PHYS;
return xmeleehurty(magr, mdef, &alt_attk, originalattk, weapon_p, FALSE, dmg, dieroll, vis, ranged);
case AD_VAMP:
@ -6930,7 +7044,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
if(youdef){
//Lifts the veil
lift_veil();
hits = rn2(u.uinsight) >= 10;
hits = rn2(Insight) >= 10;
}
else {
//Just do a level check for monsters
@ -9911,9 +10025,10 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
(youagr ? "Your" : s_suffix(Monnam(magr))),
(youdef ? "you" : mon_nam(mdef))
);
result = xdamagey(magr, mdef, attk, d(rnd(5), (mlev(mdef) + 1) / 2));
if (result&(MM_DEF_DIED|MM_DEF_LSVD)) return result;
}
mdef->mironmarked = TRUE;
result = xdamagey(magr, mdef, attk, d(rnd(5), (mlev(mdef) + 1) / 2));
if (result&(MM_DEF_DIED|MM_DEF_LSVD)) return result;
}
}
/* 1/5 chance of radiant feathers */
@ -9929,6 +10044,7 @@ xmeleehurty_core(struct monst *magr, struct monst *mdef, struct attack *attk, st
pline("The cold iron rachises sear %s.",
(youdef ? "you" : mon_nam(mdef)));
}
mdef->mironmarked = TRUE;
result = xdamagey(magr, mdef, attk, d(5, mlev(mdef)));
if (result&(MM_DEF_DIED|MM_DEF_LSVD)) return result;
}
@ -10622,6 +10738,17 @@ int vis;
it take longer for you to be digested, but
you'll end up trapped inside for longer too */
tim_tmp += -u.uac + 10 + (ACURR(A_CON) / 3 - 1);
if(magr->mtyp == PM_NAMELESS_GNAWER){
int nid = u.ualign.sins + u.uimpurity;
if(u.ualign.record < 0)
nid -= u.ualign.record; //Increases score
if(u.ualign.record >= 20)
tim_tmp += 1;
for (; nid > 0 && tim_tmp > 2; nid/=2){//Digests faster
tim_tmp--;
}
}
if(thick_skinned(youracedata) || u.sealsActive&SEAL_ECHIDNA)
tim_tmp += 2;
}
@ -11231,6 +11358,18 @@ int vis;
Monnam(mdef));
}
}
else if (pa && pa->mtyp == PM_LUMINESCENT_SWARM) {
if (youdef) {
You("are bitten and stung by the swarming insects!");
exercise(A_STR, FALSE);
exercise(A_DEX, FALSE);
exercise(A_CON, FALSE);
}
else if (vis&VIS_MDEF) {
pline("%s is bitten and stung by the swarming insects!",
Monnam(mdef));
}
}
else {
if (youdef) {
You("are pummeled with debris!");
@ -11580,6 +11719,7 @@ int vis;
if (!Sick_res(mdef)) {
if (vis&VIS_MDEF)
pline("%s is afflicted by disease!", Monnam(mdef));
if(!rn2(10)) dmg += 100;
}
}
if(pa->mtyp == PM_JUIBLEX){
@ -12082,15 +12222,7 @@ expl_common:
}
void
getgazeinfo(aatyp, adtyp, pa, magr, mdef, needs_magr_eyes, needs_mdef_eyes, needs_uncancelled)
int aatyp;
int adtyp;
struct permonst * pa;
struct monst * magr;
struct monst * mdef;
boolean * needs_magr_eyes;
boolean * needs_mdef_eyes;
boolean * needs_uncancelled;
getgazeinfo(int aatyp, int adtyp, struct permonst *pa, struct monst *magr, struct monst *mdef, boolean *needs_magr_eyes, boolean *needs_mdef_eyes, boolean *needs_magr_head, boolean *needs_uncancelled)
{
#define maybeset(b, tf) if(b) {*(b)=tf;}
boolean adjacent = FALSE;
@ -12138,6 +12270,12 @@ boolean * needs_uncancelled;
maybeset(needs_magr_eyes, TRUE);
maybeset(needs_mdef_eyes, TRUE);
break;
/* seeing the monster's face is dangerous */
case AD_PAIN:
maybeset(needs_magr_eyes, FALSE);
maybeset(needs_mdef_eyes, TRUE);
maybeset(needs_magr_head, TRUE);
break;
/* the monster staring *at* something is dangerous */
case AD_FIRE:
case AD_COLD:
@ -12206,6 +12344,7 @@ int vis;
boolean needs_magr_eyes = TRUE; /* when TRUE, mdef is protected if magr is blind */
boolean needs_mdef_eyes = TRUE; /* when TRUE, mdef is protected by being blind */
boolean needs_magr_head = FALSE; /* when TRUE, mdef is protected if magr's head is covered */
boolean needs_uncancelled = TRUE; /* when TRUE, attack cannot happen when cancelled */
boolean maybe_not = (!youagr && pa->mtyp != PM_DEMOGORGON); /* when TRUE, occasionally doesn't use gaze attack at all */
boolean cooldown = TRUE; /* when TRUE, attack may set cooldown */
@ -12214,6 +12353,8 @@ int vis;
AD_CONF, AD_SLOW, AD_STUN, AD_BLND, AD_FIRE, AD_FIRE,
AD_COLD, AD_COLD, AD_ELEC, AD_ELEC, AD_HALU, AD_SLEE };
static const int elementalgazeattacks[] = { AD_FIRE, AD_COLD, AD_ELEC };
struct obj *ahelm = youagr ? uarmh : which_armor(magr, W_ARMH);
struct obj *acloak = youagr ? uarmc : which_armor(magr, W_ARMC);
char buf[BUFSZ];
struct attack alt_attk;
@ -12250,7 +12391,7 @@ int vis;
break;
}
/* get eyes, uncancelledness */
getgazeinfo(attk->aatyp, adtyp, pa, magr, mdef, &needs_magr_eyes, &needs_mdef_eyes, &needs_uncancelled);
getgazeinfo(attk->aatyp, adtyp, pa, magr, mdef, &needs_magr_eyes, &needs_mdef_eyes, &needs_magr_head, &needs_uncancelled);
/* widegazes cannot fail, and don't use mspec_used */
if (attk->aatyp == AT_WDGZ){
@ -12280,6 +12421,12 @@ int vis;
(!(youdef ? Sleeping : mdef->msleeping)) &&
(!Gaze_res(mdef)) /* wearing the Eyes, nearly anything is safe to see */
))
||
/* needs_mdef_eyes: mdef must have eyes and can actively see magr */
(needs_magr_head && (
( (ahelm && FacelessHelm(ahelm)) || (acloak && FacelessCloak(acloak)) ) || /* wearing a faceless helm or cloak (cloak even if headless) */
(Gaze_res(mdef)) /* wearing the Eyes, nearly anything is safe to see */
))
){
/* gaze fails because the appropriate gazer/gazee eye (contact?) is not available */
return MM_MISS;
@ -13481,6 +13628,67 @@ int vis;
}
break;
/*crushing pain*/
case AD_PAIN:
if (distmin(x(magr), y(magr), x(mdef), y(mdef)) > BOLT_LIM)
return MM_MISS;
if (youdef) {
Your("mind is imploding from the sight of %s visage!", s_suffix(mon_nam(magr)));
// make_blinded((long)dmg, FALSE);
// stop_occupation();
// make_stunned((long)d(1, 3), TRUE);
if(!HScreaming){
if (!is_silent(pd)){
You("%s from the pain!", humanoid_torso(pd) ? "scream" : "shriek");
}
else {
You("writhe in pain!");
}
change_usanity(-dmg, TRUE); //May result in screaming being set, or other minor madness
HScreaming += dmg;
}
else {
HScreaming += 2;
change_usanity(-2, FALSE);
}
if(!u.veil && !mvitals[monsndx(magr->data)].vis_insight){
mvitals[monsndx(magr->data)].vis_insight = TRUE;
uchar insight = u_insight_gain(magr);
mvitals[monsndx(magr->data)].insight_gained += insight;
change_uinsight(insight);
}
stop_occupation();
}
else {
if((nonliving(pd) && !is_android(pd))
|| has_template(mdef, TOMB_HERD) /*not a statue-piloting thingy */
|| is_primordial(pd)
|| is_alienist(pd)
|| is_great_old_one(pd)
){
return MM_MISS;
}
unsigned int oldspeed = mdef->mspeed;
if(mdef->movement > 0 && mdef->mcanmove){
if (!is_silent_mon(mdef)){
if (canseemon(mdef))
pline("%s %s in pain!", Monnam(mdef), humanoid_torso(mdef->data) ? "screams" : "shrieks");
else You_hear("%s %s in pain!", mdef->mtame ? noit_mon_nam(mdef) : mon_nam(mdef), humanoid_torso(mdef->data) ? "screaming" : "shrieking");
}
else {
if (canseemon(mdef))
pline("%s writhes in pain!", Monnam(mdef));
}
}
mdef->movement = max(mdef->movement - 2*dmg, -12);
}
/* apply half damage (both) */
dmg = reduce_dmg(mdef,dmg,TRUE,TRUE);
return xdamagey(magr, mdef, attk, dmg);
break;
case AD_SEDU:
if (!youdef)
return MM_MISS;
@ -14398,7 +14606,7 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
precision_mult += max(P_SKILL(objects[launcher->otyp].oc_skill) - 2, 0);
}
else {
if(!magr->mformication && !magr->mscorpions)
if(!magr->mformication && !magr->mscorpions && !magr->mcaterpillars)
precision_mult += max(m_martial_skill(magr->data)-2, 0);
}
@ -14839,6 +15047,7 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
/* Simurgh's iron claws, for the player attacking with bared hands */
ironobj |= W_SKIN;
seardmg += rnd(mlev(mdef));
mdef->mironmarked = TRUE;
}
}
@ -14962,22 +15171,22 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
poisons |= OPOISON_ACID;
if (poisonedobj->otyp == FANG_OF_APEP)
poisons |= OPOISON_DIRE;
if (poisonedobj->otyp == TOOTH && poisonedobj->ovar1_tooth_type == SERPENT_TOOTH && u.uinsight >= 20 && poisonedobj->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(poisonedobj, magr, ETRAIT_FOCUS_FIRE))
if (poisonedobj->otyp == TOOTH && poisonedobj->ovar1_tooth_type == SERPENT_TOOTH && Insight >= 20 && poisonedobj->o_e_trait&ETRAIT_FOCUS_FIRE && CHECK_ETRAIT(poisonedobj, magr, ETRAIT_FOCUS_FIRE))
poisons |= OPOISON_DIRE;
if (poisonedobj->otyp == GREATCLUB){
poisons |= OPOISON_BASIC;
//All greatclubs upgrade to filth due to your influence on the world
if(u.uinsight >= 20 && u.uimpurity >= 20){
if(Insight >= 20 && u.uimpurity >= 20){
poisons |= OPOISON_FILTH;
}
}
if (poisonedobj->otyp == CHIKAGE && poisonedobj->obj_material == HEMARGYOS){
poisons |= OPOISON_BASIC;
if(youagr){
if(u.uinsight >= 20 && u.uimpurity >= 10){
if(Insight >= 20 && u.uimpurity >= 10){
poisons |= OPOISON_FILTH;
}
if(u.uinsight >= 50 && *hp(magr) <= (u.uimpurity*(*hpmax(magr)))/50){
if(Insight >= 50 && *hp(magr) <= (u.uimpurity*(*hpmax(magr)))/50){
poisons |= OPOISON_DIRE;
}
}
@ -15884,9 +16093,16 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
otmp = (youagr ? uarmf : which_armor(magr, W_ARMF));
if (otmp) {
basedmg += otmp->spe;
if (otmp->otyp == KICKING_BOOTS || (otmp->otyp == IMPERIAL_ELVEN_BOOTS && check_imp_mod(otmp, IEA_KICKING))){
if (otmp->otyp == KICKING_BOOTS){
basedmg += rnd(6) + rnd(5) + (bigmonst(pd) ? 0 : 1);
}
if(otmp->otyp == IMPERIAL_ELVEN_BOOTS && check_imp_mod(otmp, IEA_KICKING)){
basedmg += rnd(6) + (bigmonst(pd) ? 0 : 1);
if(mdef && !resists_magm(mdef) && !resist(mdef, RING_CLASS, 0, NOTELL)){
//Half spell etc.
elemdmg += d(2,12) + otmp->spe;
}
}
if (otmp->otyp == STILETTOS || otmp->otyp == HEELED_BOOTS){
basedmg += rnd(bigmonst(pd) ? 2 : 6);
}
@ -16097,8 +16313,8 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
if(attk && is_insight_tentacle_at(attk->aatyp)
&& (u.sealsActive&SEAL_OSE)
){
if(u.uinsight)
bonsdmg += rnd(min(u.uinsight, mlev(magr)));
if(Insight)
bonsdmg += rnd(min(Insight, mlev(magr)));
if (ACURR(A_CHA) == 25) bonsdmg += 8;
else bonsdmg += max(0, (ACURR(A_CHA) - 10) / 2);
}
@ -16317,6 +16533,60 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
if(youagr)
tratdmg += weapon_dam_bonus(weapon, weapon_type(weapon));
}
if(CHECK_ETRAIT(weapon, magr, ETRAIT_BLADESONG)){
struct weapon_dice wdice;
/* grab the weapon dice from dmgval_core */
dmgval_core(&wdice, bigmonst(pd), weapon, weapon->otyp, magr);
/* Maybe add to the tratdmg counter */
if(youagr){
long timeout = u.bladesong + (Race_if(PM_ELF) ? 3 : 0);
if(timeout >= monstermoves &&
(Race_if(PM_ELF) ?
(timeout >= monstermoves+4 || ROLL_ETRAIT(weapon, magr, TRUE, rn2((monstermoves+6) - u.bladesong))):
(timeout >= monstermoves+10 || ROLL_ETRAIT(weapon, magr, TRUE, rn2((monstermoves+10) - u.bladesong)))
)
){
tratdmg += weapon_dmg_roll(&wdice, youdef);
tratdmg += weapon_dam_bonus(weapon, weapon_type(weapon));
if (wizard && (iflags.wizcombatdebug & WIZCOMBATDEBUG_DMG) && WIZCOMBATDEBUG_APPLIES(magr, mdef))
pline("Blade song!");
}
}
else if(is_elf(pa) && ROLL_ETRAIT(weapon, magr, rn2(3), !rn2(3))){
if (wizard && (iflags.wizcombatdebug & WIZCOMBATDEBUG_DMG) && WIZCOMBATDEBUG_APPLIES(magr, mdef))
pline("Blade song!");
tratdmg += weapon_dmg_roll(&wdice, youdef);
}
}
if(CHECK_ETRAIT(weapon, magr, ETRAIT_BLADEDANCE)){
struct weapon_dice wdice;
/* grab the weapon dice from dmgval_core */
dmgval_core(&wdice, bigmonst(pd), weapon, weapon->otyp, magr);
/* Maybe add to the tratdmg counter */
if(youagr){
int dx1 = u.prev_dir.x;
int dy1 = u.prev_dir.y;
//Note: allows thrown etc.
int dx = x(mdef) - x(magr);
int dy = y(mdef) - y(magr);
if((dx != dx1 || dy != dy1) && (dx1 || dy1)){
int tmpdmg;
tmpdmg = weapon_dmg_roll(&wdice, youdef);
tmpdmg += weapon_dam_bonus(weapon, weapon_type(weapon));
if(Race_if(PM_ELF))
tmpdmg += (ACURR(A_CHA)+1)/2;
tratdmg += ROLL_ETRAIT(weapon, magr, tmpdmg, (tmpdmg+2)/3);
if (wizard && (iflags.wizcombatdebug & WIZCOMBATDEBUG_DMG) && WIZCOMBATDEBUG_APPLIES(magr, mdef))
pline("Blade dance!");
You("twirl and strike!");
}
}
else if(is_elf(pa) && magr->mspec_used && ROLL_ETRAIT(weapon, magr, TRUE, !rn2(3))){
tratdmg += weapon_dmg_roll(&wdice, youdef);
if (wizard && (iflags.wizcombatdebug & WIZCOMBATDEBUG_DMG) && WIZCOMBATDEBUG_APPLIES(magr, mdef))
pline("Blade dance!");
}
}
if(braced_weapon){
struct weapon_dice wdice;
if (wizard && (iflags.wizcombatdebug & WIZCOMBATDEBUG_DMG) && WIZCOMBATDEBUG_APPLIES(magr, mdef))
@ -16356,6 +16626,10 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
}
/* ARTIFACT HIT BLOCK */
/* this must come after skills are trained, as this can kill the defender and cause a return */
if(youagr && melee){
if(check_rot(ROT_FEAST))
healup((*hpmax(magr))*.016, 0, TRUE, FALSE);
}
if (valid_weapon_attack || unarmed_punch || unarmed_kick || unarmed_butt)
{
int returnvalue = 0;
@ -16366,16 +16640,16 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
doguidance(mdef, basedmg);
if(weapon){
if(weapon->oartifact == ART_HOLY_MOONLIGHT_SWORD){
if(u.uinsight >= 40)
if(Insight >= 40)
doguidance(mdef, active_glyph(GUIDANCE) ? basedmg : basedmg/2);
else if(active_glyph(GUIDANCE)){
doguidance(mdef, (u.uinsight*basedmg)/40);
doguidance(mdef, (Insight*basedmg)/40);
}
else {
doguidance(mdef, (u.uinsight*basedmg)/80);
doguidance(mdef, (Insight*basedmg)/80);
}
}
else if(weapon->otyp == CHURCH_BLADE && u.uinsight >= 40){
else if(weapon->otyp == CHURCH_BLADE && Insight >= 40){
doguidance(mdef, active_glyph(GUIDANCE) ? basedmg/2 : basedmg/4);
}
}
@ -16503,8 +16777,8 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
/* madmen do extra damage with insight weapons */
if (valid_weapon_attack && is_insight_weapon(weapon) && !recursed && magr && (youagr ? (Role_if(PM_MADMAN) || u.sealsActive&SEAL_OSE || mvitals[PM_MOON_S_CHOSEN].died) : insightful(magr->data))){
if(youagr){
if(u.uinsight)
bonsdmg += d(1, (min(u.uinsight, (bimanual(weapon, youracedata) ? 2 : 1) * mlev(magr))+1)/2);
if(Insight)
bonsdmg += d(1, (min(Insight, (bimanual(weapon, youracedata) ? 2 : 1) * mlev(magr))+1)/2);
}
else {
bonsdmg += d(1, ((bimanual(weapon, magr->data) ? 2 : 1) * mlev(magr) + 1)/2+1);
@ -16565,7 +16839,7 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
|| pd->mtyp == PM_BEFOULED_WRAITH || mdef->mtraitor || mdef->mferal
)
){
subtotl *= u.uinsight >= 40 ? 1.5 : 1.2;
subtotl *= Insight >= 40 ? 1.5 : 1.2;
}
@ -17547,9 +17821,14 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
if (adjattrib(attrib, -amnt, 1))
pline_The("poison was quite debilitating...");
IMPURITY_UP(u.uimp_poison)
}
else if ((vis&VIS_MDEF) && lethaldamage)
else if ((vis&VIS_MDEF) && lethaldamage) {
pline_The("poison was deadly...");
if(youagr){
IMPURITY_UP(u.uimp_poison)
}
}
break;
case OPOISON_DIRE:
if (youdef) {
@ -17565,6 +17844,7 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
drain -= 4;
adjattrib(A_CON, drain, 1);
IMPURITY_UP(u.uimp_poison)
}
int amnt = rn1(3, 3);
if(Poison_resistance)
@ -17575,8 +17855,12 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
if (adjattrib(attrib, -amnt, 1))
pline_The("poison was quite debilitating...");
}
else if ((vis&VIS_MDEF) && lethaldamage)
else if ((vis&VIS_MDEF) && lethaldamage){
pline_The("poison was deadly...");
if(youagr){
IMPURITY_UP(u.uimp_poison)
}
}
break;
case OPOISON_FILTH:
if (youdef) {
@ -17584,8 +17868,12 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
make_sick(Sick ? Sick / 2L + 1L : (long)rn1(ACURR(A_CON), 20),
"filth-coated weapon", TRUE, SICK_NONVOMITABLE);
}
else if ((vis&VIS_MDEF) && lethaldamage)
else if ((vis&VIS_MDEF) && lethaldamage){
pline_The("tainted filth was deadly...");
if(youagr){
IMPURITY_UP(u.uimp_dirtiness)
}
}
break;
case OPOISON_SLEEP:
if (youdef) {
@ -17783,7 +18071,7 @@ hmoncore(struct monst *magr, struct monst *mdef, struct attack *attk, struct att
/* Use the mercy blade */
/* this can print a message, can possibly kill monster, returning immediately */
if(mercy_blade){
if(u.uinsight >= 50 && (youdef || lethaldamage || !resist(mdef, youagr ? SPBOOK_CLASS : WEAPON_CLASS, 0, TRUE))){
if(Insight >= 50 && (youdef || lethaldamage || !resist(mdef, youagr ? SPBOOK_CLASS : WEAPON_CLASS, 0, TRUE))){
mercy_blade_conflict(mdef, magr, wepspe, lethaldamage);
}
//Might have died in mvm combat, for example, attacking a cockatrice.
@ -20253,6 +20541,9 @@ struct monst * mdef;
//Check curse resistance
if(Curse_res(mdef, TRUE))
return MM_MISS;
if(youdef){
IMPURITY_UP(u.uimp_curse)
}
//Roll type
switch(magr->mtyp){
case PM_HMNYW_PHARAOH:
@ -20627,7 +20918,7 @@ boolean magical;
dmg = (dmg + 1) / 2;
if (magical && Half_spel(mdef))
dmg = (dmg + 1) / 2;
if (mdef->mtyp == PM_CENTER_OF_ALL && u.uinsight < 32)
if (mdef->mtyp == PM_CENTER_OF_ALL && Insight < 32)
dmg = (dmg + 1) / 2;
if (mdef == &youmonst && u.uvaul_duration){
if(physical && magical)

View file

@ -329,6 +329,16 @@ struct monst * mon;
pline("You're afraid to go near that wormy thing!");
return TRUE;
}
if (mon->mtyp == PM_UNMASKED_TETTIGON
&& canspotmon(mon)
&& !ClearThoughts
&& !roll_generic_madness(TRUE)
&& !roll_impurity(TRUE)
){
You("can't bring yourself to strike %s!", mon_nam(mon));
return TRUE;
}
return FALSE;
}
@ -511,7 +521,7 @@ struct attack *mattk;
Monnam(mdef), mhis(mdef));
}
if(near_capacity() < calc_capacity(otmp->owt)){
if(near_capacity() < calc_capacity(otmp->owt) || u.uavoid_theft){
You("steal %s %s and drop it to the %s.",
s_suffix(mon_nam(mdef)), xname(otmp), surface(u.ux, u.uy));
if(otmp->otyp == CORPSE && touch_petrifies(&mons[otmp->corpsenm]) && !uarmg && !Stone_resistance){
@ -1050,6 +1060,7 @@ int aatyp;
case AT_DSPR:
case AT_ESPR:
case AT_WISP:
case AT_VOMT:
case AT_REND: /* If the previous attacks were OK, this one is too */
w_mask = ~0L; /* special case; no defense needed */
break;
@ -1503,7 +1514,7 @@ struct monst * magr;
if (is_self_righteous(otmp) &&
(otmp->otyp != CHURCH_SHORTSWORD || !(resist_pierce(pd) && !resist_slash(pd)))
)
diesize *= otmp->otyp == CHURCH_SHORTSWORD && u.uinsight >= 40 ? 5 : 2.5;
diesize *= otmp->otyp == CHURCH_SHORTSWORD && Insight >= 40 ? 5 : 2.5;
/* calculate dice */
dmg += vd(ndice, diesize);
}
@ -1572,7 +1583,7 @@ struct monst * magr;
if (is_self_righteous(otmp) &&
(otmp->otyp != CHURCH_SHORTSWORD || !(resist_pierce(pd) && !resist_slash(pd)))
)
diesize *= otmp->otyp == CHURCH_SHORTSWORD && u.uinsight >= 40 ? 5 : 2.5;
diesize *= otmp->otyp == CHURCH_SHORTSWORD && Insight >= 40 ? 5 : 2.5;
/* calculate */
if (ndice)
dmg += vd(ndice, diesize);
@ -2059,7 +2070,6 @@ int dmgtyp;
if (osym == RING_CLASS && dmgtyp == AD_ELEC)
return MM_MISS; /*Rings aren't destroyed by electrical damage anymore*/
if (ProtectItems(mtmp) && (osym == POTION_CLASS || osym == SCROLL_CLASS || osym == WAND_CLASS)){
return MM_MISS;
}
@ -2651,11 +2661,11 @@ struct attack * attk;
)
return result;
if(is_streaming_merc(otmp) && otmp->oartifact == ART_AMALGAMATED_SKIES && mlev(magr) > 20 && (
(youagr && u.uinsight > 20 && YOU_MERC_SPECIAL)
(youagr && Insight > 20 && YOU_MERC_SPECIAL)
|| (!youagr && insightful(magr->data) && is_chaotic_mon(magr)))
){
merc_mult++;
if((youagr ? (u.uinsight > 60) : (mlev(magr) > 30)))
if((youagr ? (Insight > 60) : (mlev(magr) > 30)))
merc_mult++;
}
dx *= merc_mult;
@ -2689,7 +2699,7 @@ struct attack * attk;
}
dx /= merc_mult;
dy /= merc_mult;
if(u.uinsight >= 30){
if(Insight >= 30){
//45 degree rotation
nx = sgn(dx+dy);
ny = sgn(dy-dx);
@ -2908,7 +2918,7 @@ struct attack * attk;
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
}
}
if(u.uinsight >= 45){
if(Insight >= 45){
//90 degree rotation
nx = -dy;
ny = dx;
@ -2964,7 +2974,7 @@ struct attack * attk;
}
}
}
if(u.uinsight >= 57){
if(Insight >= 57){
//45 degree rotation
nx = sgn(dx+dy);
ny = sgn(dy-dx);
@ -3020,7 +3030,7 @@ struct attack * attk;
}
}
}
if(u.uinsight >= 70){
if(Insight >= 70){
//135 degree rotation
//x = xcos0 - ysin0
//x = x*(-0.7) - y*(0.7)
@ -3137,7 +3147,7 @@ struct attack * attk;
/* handle MM_AGR_DIED and MM_AGR_STOP by adding them to the overall result, ignore other outcomes */
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
}
if(u.uinsight >= 40
if(Insight >= 40
&& ((youagr) ? couldsee(tarx + dx, tary + dy) : clear_path(magr->mx, magr->my, tarx + dx, tary + dy))
){
explode(tarx + dx, tary + dy, AD_FIRE, -1, d(6,6), EXPL_FIERY, 1);
@ -3199,7 +3209,7 @@ struct attack * attk;
/* handle MM_AGR_DIED and MM_AGR_STOP by adding them to the overall result, ignore other outcomes */
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
}
int n = (u.uinsight - 20)/15;
int n = (Insight - 20)/15;
if (n > 2)
n = 2;
for(int i = 0; i < n; i++){
@ -3430,7 +3440,7 @@ struct attack * attk;
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
}
}
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && (youagr ? (u.uinsight > 60) : (mlev(magr) > 30)) && isok(tarx + 2*dx, tary + 2*dy)){
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && (youagr ? (Insight > 60) : (mlev(magr) > 30)) && isok(tarx + 2*dx, tary + 2*dy)){
tarx += dx;
tary += dy;
struct monst *mdef2 = !youagr ? m_u_at(tarx + dx, tary + dy) :
@ -3478,7 +3488,7 @@ struct attack * attk;
int dy = sgn(tary - y(magr));
int nx, ny;
int result = 0;
if(u.uinsight >= 15 && otmp->oartifact != ART_AMALGAMATED_SKIES && is_cclub_able(otmp)){
if(Insight >= 15 && otmp->oartifact != ART_AMALGAMATED_SKIES && is_cclub_able(otmp)){
return hit_with_cclaw_streaming(magr, otmp, tarx, tary, tohitmod, attk);
}
if(!(isok(tarx - dx, tary - dy) &&
@ -3511,7 +3521,7 @@ struct attack * attk;
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
}
}
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && (youagr ? (u.uinsight > 60) : (mlev(magr) > 30)) && isok(tarx + 2*dx, tary + 2*dy)){
if(!(result&(MM_AGR_DIED|MM_AGR_STOP)) && (youagr ? (Insight > 60) : (mlev(magr) > 30)) && isok(tarx + 2*dx, tary + 2*dy)){
tarx += dx;
tary += dy;
struct monst *mdef2 = !youagr ? m_u_at(tarx + dx, tary + dy) :

View file

@ -177,7 +177,7 @@ int adtyp;
case AD_DRST:
return CLR_GREEN;
case AD_PHYS:
return CLR_BROWN;
return CLR_BRIGHT_MAGENTA;
case AD_WET:
return CLR_BLUE;
case AD_DISE:
@ -2194,7 +2194,7 @@ struct obj *obj, *otmp;
res = !obj->dknown;
/* target object has now been "seen (up close)" */
obj->dknown = 1;
if (Is_container(obj) || obj->otyp == STATUE || (obj->otyp == CRYSTAL_SKULL && u.uinsight >= 20)) {
if (Is_container(obj) || obj->otyp == STATUE || (obj->otyp == CRYSTAL_SKULL && Insight >= 20)) {
if (!obj->cobj)
pline("%s empty.", Tobjnam(obj, "are"));
else {
@ -2734,6 +2734,17 @@ boolean ordinary;
case SPE_FIRE_STORM:
You("explode a fireball on top of yourself!");
explode(u.ux, u.uy, AD_FIRE, WAND_CLASS, d(6,6), EXPL_FIERY, 1);
if(u.explosion_up){
int ex, ey;
for(int i = 0; i < u.explosion_up; i++){
ex = u.ux + rn2(3) - 1;
ey = u.uy + rn2(3) - 1;
if(isok(ex, ey) && ZAP_POS(levl[ex][ey].typ))
explode(ex, ey, AD_FIRE, WAND_CLASS, d(6,6), EXPL_FIERY, 1);
else
explode(u.ux, u.uy, AD_FIRE, WAND_CLASS, d(6,6), EXPL_FIERY, 1);
}
}
break;
case WAN_FIRE:
makeknown(WAN_FIRE);
@ -4339,6 +4350,17 @@ struct zapdata * zapdata; /* lots of flags and data about the zap */
/* TODO: record colours in zapdata? Color currently standardized on AD_type */
if (zapdata->explosive) {
explode(sx, sy, zapdata->adtyp, 0, zapdamage(magr, (struct monst *)0, zapdata), adtyp_expl_color(zapdata->adtyp), 1 + !!(youagr &&Double_spell_size));
if(youagr && u.explosion_up){
int ex, ey;
for(int i = 0; i < u.explosion_up; i++){
ex = sx + rn2(3) - 1;
ey = sy + rn2(3) - 1;
if(isok(ex, ey) && ZAP_POS(levl[ex][ey].typ))
explode(ex, ey, zapdata->adtyp, 0, zapdamage(magr, (struct monst *)0, zapdata), adtyp_expl_color(zapdata->adtyp), 1 + !!(Double_spell_size));
else
explode(sx, sy, zapdata->adtyp, 0, zapdamage(magr, (struct monst *)0, zapdata), adtyp_expl_color(zapdata->adtyp), 1 + !!(Double_spell_size));
}
}
}
if (zapdata->splashing) {
splash(sx, sy, dx, dy, zapdata->adtyp, 0, zapdamage(magr, (struct monst *)0, zapdata), adtyp_expl_color(zapdata->adtyp));