diff -rwBEN -U4 nethack-3.4.2-test/dat/Arch.des nethack-3.4.2-diff/dat/Arch.des --- nethack-3.4.2-test/dat/Arch.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Arch.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, Lord Carnarvon # and receive your quest assignment. # MAZE: "Arc-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP ............................................................................ ............................................................................ @@ -33,9 +33,10 @@ ............................................................................ ............................................................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION: (21,05,57,15),lit,"ordinary",inside REGION: (22,06,23,06),unlit,"ordinary" REGION: (25,06,30,06),unlit,"ordinary" REGION: (32,06,48,06),unlit,"ordinary" REGION: (50,06,56,08),lit,"ordinary" @@ -117,9 +118,9 @@ # to go further towards your assigned quest. # MAZE: "Arc-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel GEOMETRY:center,center MAP ............................................................................ ............................................................................ @@ -142,9 +143,10 @@ ............................................................................ ............................................................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(24,03,54,17),lit,"ordinary",inside REGION:(25,04,28,07),lit,"temple" REGION:(25,09,28,11),unlit,"temple" REGION:(25,13,28,16),lit,"temple" REGION:(30,04,30,16),lit,"ordinary" diff -rwBEN -U4 nethack-3.4.2-test/dat/Barb.des nethack-3.4.2-diff/dat/Barb.des --- nethack-3.4.2-test/dat/Barb.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Barb.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, Pelias, # and receive your quest assignment. # MAZE: "Bar-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP ..................................PP........................................ ...................................PP....................................... @@ -33,18 +33,18 @@ ....................................PP...PP................................. ....................................PP....PP................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(09,05,11,05),unlit,"ordinary" -REGION:(09,07,11,07),lit,"ordinary" -REGION:(09,09,11,09),unlit,"ordinary" -REGION:(13,05,20,09),lit,"ordinary" -REGION:(29,05,31,06),lit,"ordinary" -REGION:(26,10,28,11),lit,"ordinary" -REGION:(04,13,06,14),lit,"ordinary" -REGION:(15,13,17,14),lit,"ordinary" -REGION:(22,14,24,15),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(09,05,11,05),unlit,"ordinary",inside +REGION:(09,07,11,07),lit,"ordinary",inside +REGION:(09,09,11,09),unlit,"ordinary",inside +REGION:(13,05,20,09),lit,"ordinary",inside +REGION:(29,05,31,06),lit,"ordinary",inside +REGION:(26,10,28,11),lit,"ordinary",inside +REGION:(04,13,06,14),lit,"ordinary",inside +REGION:(15,13,17,14),lit,"ordinary",inside +REGION:(22,14,24,15),lit,"ordinary",inside # Stairs STAIR:(09,09),down # Portal arrival point BRANCH:(62,02,62,02),(0,0,0,0) @@ -98,9 +98,9 @@ # further towards your assigned quest. # MAZE: "Bar-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel GEOMETRY:center,center MAP ..........PPP......................................... ...........PP.......................................... ....... @@ -123,15 +123,15 @@ ...............PP.................................................... ................PPP................................................... ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(24,03,26,04),unlit,"ordinary" -REGION:(31,08,33,09),unlit,"ordinary" -REGION:(35,14,37,15),unlit,"ordinary" -REGION:(39,03,54,08),lit,"ordinary" -REGION:(56,00,75,08),unlit,"ordinary" -REGION:(64,09,75,16),unlit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(24,03,26,04),unlit,"ordinary",inside +REGION:(31,08,33,09),unlit,"ordinary",inside +REGION:(35,14,37,15),unlit,"ordinary",inside +REGION:(39,03,54,08),lit,"ordinary",inside +REGION:(56,00,75,08),unlit,"ordinary",inside +REGION:(64,09,75,16),unlit,"ordinary",inside # Doors DOOR:open,(23,03) DOOR:open,(30,08) DOOR:open,(34,14) @@ -304,9 +304,10 @@ # and goal levels. # MAZE: "Bar-fila" , ' ' -INIT_MAP: '.' , '.' , true , true , unlit , false +FLAGS: skylevel +INIT_MAP: '.' , '.' , true , true , unlit , false , outside NOMAP # STAIR: random, up STAIR: random, down diff -rwBEN -U4 nethack-3.4.2-test/dat/Healer.des nethack-3.4.2-diff/dat/Healer.des --- nethack-3.4.2-test/dat/Healer.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Healer.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, Hippocrates # and receive your quest assignment. # MAZE: "Hea-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPP........PPPP.....PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.P..PPPPP......PPPPPPPP @@ -33,9 +33,13 @@ PPP.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP....PPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(26,06,48,14),lit,"ordinary",inside +REGION:(24,07,25,13),lit,"ordinary",inside +REGION:(49,07,50,13),lit,"ordinary",inside + # Stairs STAIR:(37,9),down # Portal arrival point BRANCH:(04,12,04,12),(0,0,0,0) @@ -99,19 +103,20 @@ MONSTER: 'S',random,random,hostile MONSTER: 'S',random,random,hostile MONSTER: 'S',random,random,hostile MONSTER: 'S',random,random,hostile +MONSTER:'y',"will o' wisp",(65,11) # # The "locate" level for the quest. # # Here you have to find the Temple of Coeus to go # further towards your assigned quest. # MAZE: "Hea-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel # -INIT_MAP: '.' , 'P', true , true , lit , false +INIT_MAP: '.' , 'P', true , true , lit , false , outside GEOMETRY:center,center MAP PPPPPPPPPPPPP.......PPPPPPPPPPP PPPPPPPP...............PPPPPPPP @@ -124,9 +129,10 @@ PPPPPPPP...............PPPPPPPP PPPPPPPPPPP........PPPPPPPPPPPP ENDMAP # Dungeon Description -REGION:(00,00,30,09),lit,"ordinary" +REGION:(00,00,30,09),lit,"ordinary",outside +REGION:(10,03,20,06),lit,"ordinary",inside REGION:(12,03,20,06),lit,"temple" # Doors DOOR:closed,(09,04) DOOR:closed,(09,05) @@ -197,9 +203,9 @@ MONSTER: 'S',random,random,hostile MONSTER: 'S',random,random,hostile MONSTER: 'S',random,random,hostile MONSTER: 'S',random,random,hostile - +MONSTER:'y',"will o' wisp",random # # The "goal" level for the quest. # # Here you meet Cyclops your nemesis monster. You have to @@ -207,10 +213,11 @@ # been assigned to retrieve. # MAZE: "Hea-goal", 'P' +FLAGS: skylevel # -INIT_MAP: '.' , 'P' , false , true , lit , false +INIT_MAP: '.' , 'P' , false , true , lit , false , outside GEOMETRY:center,center MAP .P....................................PP. PP.......PPPPPPP....PPPPPPP....PPPP...PP. @@ -225,9 +232,9 @@ P....PPPPP...PPPP..PPPPP...PPPPPPP...PP.. PPP..................................PPP. ENDMAP # Dungeon Description -REGION:(00,00,40,11),lit,"ordinary" +REGION:(00,00,40,11),lit,"ordinary",outside # Stairs STAIR:(39,10),up # Non diggable walls NON_DIGGABLE:(00,00,40,11) @@ -298,9 +305,10 @@ # and goal levels. # MAZE: "Hea-fila" , 'P' -INIT_MAP: '.' , 'P' , false , true , lit , false +FLAGS: skylevel +INIT_MAP: '.' , 'P' , false , true , lit , false , outside NOMAP # STAIR: random, up STAIR: random, down @@ -333,9 +341,10 @@ TRAP: random, random TRAP: random, random MAZE: "Hea-filb" , 'P' -INIT_MAP: '.' , 'P' , false , true , lit , false +FLAGS: skylevel +INIT_MAP: '.' , 'P' , false , true , lit , false , outside NOMAP # STAIR: random, up STAIR: random, down diff -rwBEN -U4 nethack-3.4.2-test/dat/Knight.des nethack-3.4.2-diff/dat/Knight.des --- nethack-3.4.2-test/dat/Knight.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Knight.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,11 +8,11 @@ # Here you meet your (besieged) class leader, King Arthur # and receive your quest assignment. # MAZE: "Kni-strt",'.' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel # This is a kludge to init the level as a lit field. -INIT_MAP: '.' , '.' , false , false , lit , false +INIT_MAP: '.' , '.' , false , false , lit , false,outside GEOMETRY:center,center MAP .................................................. .-----......................................-----. @@ -31,12 +31,18 @@ .-----......................................-----. .................................................. ENDMAP # Dungeon Description -REGION:(00,00,49,15),lit,"ordinary" +REGION:(00,00,49,15),lit,"ordinary",outside +REGION:(03,03,46,12),lit,"ordinary",inside REGION:(04,04,45,11),unlit,"ordinary" REGION:(06,06,22,09),lit,"throne" , unfilled REGION:(27,06,43,09),lit,"ordinary" +REGION:(01,01,05,03),lit,"ordinary",inside +REGION:(44,01,48,03),lit,"ordinary",inside +REGION:(01,12,05,14),lit,"ordinary",inside +REGION:(44,12,48,14),lit,"ordinary",inside + # Portal arrival point BRANCH:(20,14,20,14),(0,0,0,0) # Stairs STAIR:(40,7),down @@ -105,10 +111,10 @@ # further towards your assigned quest. # MAZE: "Kni-loca",' ' -FLAGS: hardfloor -INIT_MAP: '.' , 'P' , false , true , lit , false +FLAGS: hardfloor,skylevel +INIT_MAP: '.' , 'P' , false , true , lit , false , outside GEOMETRY:center,center MAP ...PPP.........PPPP..............PPPP... .PPPP...........PP................PPPP.. @@ -124,9 +130,9 @@ ....PPPP.........PPP.........PPPP..PP... ENDMAP # Dungeon Description # The Isle of Glass is a Tor rising out of the swamps surrounding it. -REGION:(00,00,39,11),lit,"ordinary" +REGION:(00,00,39,11),lit,"ordinary",outside # The top area of the Tor is a holy site. REGION:(09,02,27,09),lit,"temple" # Stairs STAIR:(38,0),up @@ -220,12 +226,12 @@ MONSTER:'i',"quasit",random,hostile MONSTER:'i',"quasit",random,hostile MONSTER:'i',"quasit",random,hostile MONSTER:'i',"quasit",random,hostile -MONSTER:'i',"quasit",random,hostile -MONSTER:'i',"quasit",random,hostile -MONSTER:'i',"quasit",random,hostile -MONSTER:'i',"quasit",random,hostile +#MONSTER:'i',"quasit",random,hostile +#MONSTER:'i',"quasit",random,hostile +#MONSTER:'i',"quasit",random,hostile +#MONSTER:'i',"quasit",random,hostile MONSTER:'i',random,random,hostile MONSTER:'j',random,random,hostile MONSTER:'j',"ochre jelly",random,hostile MONSTER:'j',"ochre jelly",random,hostile @@ -234,9 +240,12 @@ MONSTER:'j',"ochre jelly",random,hostile MONSTER:'j',"ochre jelly",random,hostile MONSTER:'j',"ochre jelly",random,hostile MONSTER:'j',random,random,hostile - +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random # # The "goal" level for the quest. # # Here you meet Ixoth your nemesis monster. You have to @@ -268,10 +277,11 @@ ....PPPPP...... ......... .......................... .......PPPP... ENDMAP # Dungeon Description -REGION:(00,00,14,19),lit,"ordinary" -REGION:(15,00,75,19),unlit,"ordinary" +REGION:(00,00,14,19),lit,"ordinary",outside +REGION:(15,00,75,19),unlit,"ordinary",inside +REGION:(11,06,14,11),lit,"ordinary",inside # Stairs STAIR:(03,08),up # Non diggable walls NON_DIGGABLE:(00,00,75,19) @@ -346,9 +356,10 @@ # and goal levels. # MAZE: "Kni-fila" , '.' -INIT_MAP: '.' , 'P' , false , true , lit , false +FLAGS: skylevel +INIT_MAP: '.' , 'P' , false , true , lit , false , outside NOMAP # STAIR: random, up STAIR: random, down @@ -374,9 +385,10 @@ TRAP: random, random TRAP: random, random MAZE: "Kni-filb" , '.' -INIT_MAP: '.' , 'P' , false , true , lit , false +FLAGS: skylevel +INIT_MAP: '.' , 'P' , false , true , lit , false , outside NOMAP # STAIR: random, up STAIR: random, down diff -rwBEN -U4 nethack-3.4.2-test/dat/Monk.des nethack-3.4.2-diff/dat/Monk.des --- nethack-3.4.2-test/dat/Monk.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Monk.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, the Grand Master # and receive your quest assignment. # MAZE: "Mon-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP ............................................................................ ............................................................................ @@ -33,9 +33,11 @@ ............................................................................ ............................................................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(20,03,55,16),lit,"ordinary",inside +REGION:(18,08,19,11),lit,"ordinary",inside REGION:(24,06,33,13),lit,"temple" # Portal arrival point BRANCH:(05,04,05,04),(0,0,0,0) # Stairs diff -rwBEN -U4 nethack-3.4.2-test/dat/Priest.des nethack-3.4.2-diff/dat/Priest.des --- nethack-3.4.2-test/dat/Priest.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Priest.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, High Priest # and receive your quest assignment. # MAZE: "Pri-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP ............................................................................ ............................................................................ @@ -33,9 +33,11 @@ ............................................................................ ............................................................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(20,03,55,16),lit,"ordinary",inside +REGION:(18,08,19,11),lit,"ordinary",inside REGION:(24,06,33,13),lit,"temple" # Portal arrival point BRANCH:(05,04,05,04),(0,0,0,0) # Stairs @@ -63,10 +65,10 @@ ALTAR:(28,09),noalign,altar # High Priest MONSTER:'@',"Arch Priest",(28,10) # The treasure of High Priest -OBJECT:'(',"chest",(27,10) -# knight guards for the audience chamber +OBJECT:'(',"chest",(28,10) +# acolyte guards for the audience chamber MONSTER:'@',"acolyte",(32,07) MONSTER:'@',"acolyte",(32,08) MONSTER:'@',"acolyte",(32,11) MONSTER:'@',"acolyte",(32,12) @@ -95,8 +97,442 @@ MONSTER: 'Z',"human zombie",(18,18) MONSTER: 'Z',"human zombie",(59,10) MONSTER: 'Z',"human zombie",(13,09) MONSTER: 'Z',"human zombie",(01,17) +# jungle temple +MAZE: "Pri-stra",' ' +FLAGS: noteleport,hardfloor,skylevel,arboreal +GEOMETRY:center,center +MAP +T.....T.TT.............................TT...........TTT...TT.TTTTT}}TTT.TT.T +...T..TTT.T..------------------------...TT.TT.......T.T..T.T...TTT}}}.....TT +.TT..TT......|......................|..............TTT...........TT}..T....T +.T......T....|.--------------------.|.....T.T.TT...T.T...T.......T}}........ +....T..TT....|.|..................|.|...TT..TTT................TT}}....TTT.. +.......T.....|.|.----------------.|.|....TT....T...T..T....T....T.}}.....T.. +T.....T......|.|.|..............|.|.|........TT.........T..........}|....... +TT.T.........|.|.|.------------.|.|.|.......TT.T.TT.........T..T...}}....... +TT.T......T..|.|.|.|..|....|..|.|.|.|.......T.TT..TT............TT..}}...... +T..T..T......|.|.|.|..|....|..|.|.|.+.........T.T........T.......T...}...... +T.....T......|.|.|.|..|....|..|.|.|.+................................}...... +TT...........|.|.|.|..|....|..|.|.|.|................T...T..........}}...... +TT..T...T....|.|.|.------------.|.|.|.....TT..............T....T....}}...... +TT...........|.|.|.....|..|.....|.|.|....T................T....TT..}}.T..... +TT....TTT....|.|.-------..-------.|.|....T.....TT...T....T.T....T}}}..T..... +T..T...T.T...|.|.......|..|.......|.|....T..T..T...TT......TT....}}}}T..T... +T..TT..T.....|.---------..---------.|...T..T....................}}T.}....T.. +T...T.....T..|.........|..|.........|.....T..T...T......T.....}}}.TT.T.....T +T....T...T...------------------------..........T....T.....TT.}}.}.....T...TT +TTT........T...........................TT....TTT...T..TTTTT.T}TT.}..T.T..TTT +TTTTTT...TTTT........................TTTTT...TTTTT.T..TTTTT}}}TT}...T.T..TTT +ENDMAP +# Dungeon Description + +REGION:(00,00,75,19),lit,"ordinary",outside +#REGION:(14,02,35,17),unlit,"ordinary",inside +REGION:(24,06,33,13),lit,"temple" +TREES:"notype,looted,swarmed",(00,00,75,19) +TREES[50%]:"banana",(00,00,75,19) +TREES[5%]:"banana,loot",(00,00,75,19) +TREES[2%]:"orange,loot",(00,00,75,19) +# Portal arrival point +BRANCH:(70,10,75,10),(0,0,0,0) +DRAWBRIDGE:(67,06),east,open +# Stairs +STAIR:(25,17),down +# Doors +# Unattended Altar - unaligned due to conflict - player must align it. +ALTAR:(25,10),noalign,altar +# High Priest +MONSTER:'@',"Arch Priest",(24,10) +# The treasure of High Priest +OBJECT:'(',"chest",(24,10) +# acolyte guards for the audience chamber +MONSTER:'@',"acolyte",(32,07) +MONSTER:'@',"acolyte",(32,08) +MONSTER:'@',"acolyte",(32,11) +MONSTER:'@',"acolyte",(32,12) +MONSTER:'@',"acolyte",(33,07) +MONSTER:'@',"acolyte",(33,08) +MONSTER:'@',"acolyte",(33,11) +MONSTER:'@',"acolyte",(33,12) +# Non diggable walls +NON_DIGGABLE:(00,00,75,19) +# Random traps +TRAP:"dart",(20,09) +TRAP:"dart",(20,10) +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +# Monsters on siege duty. +MONSTER: 'Z',"human zombie",(37,01) +MONSTER: 'Z',"human zombie",(37,18) +MONSTER: 'Z',"human zombie",(03,03) +MONSTER: 'Z',"human zombie",(65,04) +MONSTER: 'Z',"human zombie",(12,11) +MONSTER: 'Z',"human zombie",(60,12) +MONSTER: 'Z',"human zombie",(14,08) +MONSTER: 'Z',"human zombie",(55,00) +MONSTER: 'Z',"human zombie",(18,18) +MONSTER: 'Z',"human zombie",(59,10) +MONSTER: 'Z',"human zombie",(13,09) +MONSTER: 'Z',"human zombie",(01,17) +MONSTER: 'f',"jaguar",(54,08) +MONSTER: 'f',"jaguar",(17,00) +MONSTER: 'f',"jaguar",random +# parthenon type temple +MAZE: "Pri-strh",' ' +FLAGS: noteleport,hardfloor,skylevel +GEOMETRY:center,center +MAP +PPPPP.......PPPPP....PPPPPPPPPPPPPPPPPPPP............................... +PPP..........PP.......PPPPPPPPP........................................ +PP..P.........PP......PPP................................................ +PPPP...........PP....................................................... +P..P...........PPPPPP............................................... +P...........PPPPPPPP.............................................. .. +PPP.............P.........-----------------------................. ...... +PP......................--|.|......S..........S.|--............... ....... +PPP...........PPP.......|.S.|......-----------|S|.|............... ....... +PPPPP.......PPPPP.......|.|.|......|...|......|.|.|........................ +P........PPPPPPPP.......+.|.|......S...S......|.|.+....................... +PP......PPP...PP........|.|.|......|...|......|.|.|....................... +P.......PP..............|.|S|-----------......|.S.|.................... +P......PPP...PP.........--|.S..........S......|.|--..................... +PPP.....PPPPPPPP..........-----------------------........................ +PP........................................................................ +PP...............PPP....................................................... +P.................PPPP..................................................... +PP.................PPPP................................................... +PPP...............PPPPPPPPPPP...........PP............................ +ENDMAP +# Dungeon Description +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(26,06,48,14),lit,"ordinary",inside +REGION:(24,07,25,13),lit,"ordinary",inside +REGION:(49,07,50,13),lit,"ordinary",inside +REGION:(29,07,34,11),lit,"temple",inside + +# Stairs +STAIR:(37,10),down +# Portal arrival point +BRANCH:(04,12,04,12),(0,0,0,0) +# Unattended Altar - unaligned due to conflict - player must align it. +ALTAR:(32,09),noalign,altar +# High Priest +MONSTER:'@',"Arch Priest",(32,10) +# The treasure of High Priest +OBJECT:'(',"chest",(32,10) +# Doors +DOOR:locked,(24,10) +DOOR:closed,(26,08) +DOOR:closed,(27,12) +DOOR:locked,(28,13) +DOOR:closed,(35,07) +DOOR:locked,(35,10) +DOOR:locked,(39,10) +DOOR:closed,(39,13) +DOOR:locked,(46,07) +DOOR:closed,(47,08) +DOOR:closed,(48,12) +DOOR:locked,(50,10) +# intern guards for the audience chamber +MONSTER:'@',"acolyte",(29,08) +MONSTER:'@',"acolyte",(29,09) +MONSTER:'@',"acolyte",(29,10) +MONSTER:'@',"acolyte",(29,11) +MONSTER:'@',"acolyte",(40,09) +MONSTER:'@',"acolyte",(40,10) +MONSTER:'@',"acolyte",(40,11) +MONSTER:'@',"acolyte",(40,13) +# Non diggable walls +NON_DIGGABLE:(00,00,75,19) +# Random traps +TRAP:"dart",(25,09) +TRAP:"dart",(25,11) +TRAP:"dart",(49,09) +TRAP:"dart",(49,11) +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +# Monsters on siege duty. +MONSTER: 'Z',"human zombie",(37,01) +MONSTER: 'Z',"human zombie",(37,18) +MONSTER: 'Z',"human zombie",(03,03) +MONSTER: 'Z',"human zombie",(65,04) +MONSTER: 'Z',"human zombie",(12,11) +MONSTER: 'Z',"human zombie",(59,12) +MONSTER: 'Z',"human zombie",(13,08) +MONSTER: 'Z',"human zombie",(54,00) +MONSTER: 'Z',"human zombie",(18,18) +MONSTER: 'Z',"human zombie",(58,10) +MONSTER: 'Z',"human zombie",(20,09) +MONSTER: 'Z',"human zombie",(01,17) +# druid type temple +MAZE: "Pri-strk",'P' +FLAGS: hardfloor,skylevel +GEOMETRY:center,center +MAP +PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.....PPP.CCCCCCCCCCC..PPPPPPPPPPPPPPPPPPPPP +PPPPPPPP....PPPPPPPP.CCC...PPPP.........PP.CCCCCCC..CCC..PPPPPPPP.......T..P +P...PPPP.....P..PPCCCCC......P................CCCC...CCCC..TPPPP....CCC..T.T +P.......PP..PPP.....PPP.....................T...........CC...TPPP..CCC.PP... +.PP....PP.PPP........PPPPPP...PPPPPPPPPPPPPPPPP.............CCC.PP..CPP.PPP. +.PPPP...............T..TP}PPPPPPPPPPPPPPPPPPPPPPPPPPP}T......CCC C...CP.T..P +...P........PPP......T..PPPP.......-............T.PP}}}.....CCCCC...PPPP...P +..P...P....PPPPP.......}PP.................-.......TP}}P.....C.....PP..PPPPP +.......PP...PPP......P}}P.....-......................}P}P....TCC..PP.....PP. +P..................TT}}PP.............................P}P.......C...T..PPP.P +P..................+.T}P.....................-...-..T}}}P...CC.T..T..CC.PPP. +P..................TT}}P.............................}PP.....CCC......C.PP.. +P.........PP........P}}PP.....-......................}P.......T.CCC..T.PP... +P..............C....PP}}PP.T...............-...CCC..P}P...........CCC....CT. +}P.............CCC..TP}}}PPP....................CCPP}}...........CC....CC..} +}}PPP..PPP.P....CC....P}}}}PPPP.....-..........}}PP}P........T..CC.PP.....}} +}P......TPPPP..P..CC..P}}}}}}}}}}}}}}}}}}}}}}}}}}}}}..CC...T..CCC.}}}}}.}}}} +}}PT..........PP.CC.TTP}}}}.}}}}}}}}}}...}}}}}}}}}P....CCC.....CC.}---}}}--- +}}PPPP...........C.TPPP}}}}}}}}}}}}}}}}...}}}}}}}PP.......PP...C..}|.|---|.| +}}}}}PPPPPPPP..C.PPP}}}}}}}}}....}}}}}}}.}}}}}}}}P....CC...PP..CC}}-|.....|- +}}}}}}}}}}}}PPPPPPP}}}}}}}.....T..}}}}}}}}}}}}}PPP.CCCCC.PPPPTCCC}}}|.....|} +ENDMAP +# Dungeon Description +TELEPORT_REGION:(00,00,75,20),(20,06,52,15) +TELEPORT_REGION:(20,10,27,11),(21,10,23,11) +REGION:(00,00,75,20),lit,"ordinary",outside +REGION:(04,12,04,12),lit,"swamp" +REGION:(30,07,43,14),lit,"temple" + +TREES:"notype,looted,swarmed",(00,00,75,19) +TREES[50%]:"apple",(00,00,75,19) +TREES[25%]:"oak,loot-rand",(00,00,75,19) +# Non diggable walls +NON_DIGGABLE:(00,00,75,20) +# Stairs +STAIR:(71,20),down +#doors and stuff +DOOR:locked,(19,10) +DRAWBRIDGE:(71,17),south,open +# Portal arrival point +BRANCH:(04,12,04,12),(0,0,0,0) +# Unattended Altar - unaligned due to conflict - player must align it. +ALTAR:(39,10),noalign,altar +# High Priest +MONSTER:'@',"Arch Priest",(38,10) +# The treasure of High Priest +OBJECT:'(',"chest",(38,10) + +OBJECT:'`',"boulder",(35,06) +OBJECT:'`',"boulder",(43,07) +OBJECT:'`',"boulder",(30,08) +OBJECT:'`',"boulder",(45,10) +OBJECT:'`',"boulder",(49,10) +OBJECT:'`',"boulder",(30,12) +OBJECT:'`',"boulder",(43,13) +OBJECT:'`',"boulder",(36,15) +TRAP:"teleport",(20,10) +TRAP:"teleport",(53,09) +MONSTER:'@',"acolyte",(36,07) +MONSTER:'@',"acolyte",(42,08) +MONSTER:'@',"acolyte",(31,09) +MONSTER:'@',"acolyte",(44,10) +MONSTER:'@',"acolyte",(34,10) +MONSTER:'@',"acolyte",(31,12) +MONSTER:'@',"acolyte",(42,13) +MONSTER:'@',"acolyte",(36,14) + +TRAP:"bear",(18,10) +TRAP:random,(18,9) +TRAP:random,(18,11) +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +TRAP:random,random +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random +# Monsters on siege duty. +MONSTER: 'Z',"human zombie",(02,13) +MONSTER: 'Z',"human zombie",(05,04) +MONSTER: 'Z',"human zombie",(11,03) +MONSTER: 'Z',"human zombie",(11,17) +MONSTER: 'Z',"human zombie",(16,14) +MONSTER: 'Z',"human zombie",(17,07) +MONSTER: 'Z',"human zombie",(17,15) +MONSTER: 'Z',"human zombie",(27,03) +MONSTER: 'Z',"human zombie",(50,04) +MONSTER: 'Z',"human zombie",(52,03) +MONSTER: 'Z',"human zombie",(59,13) +MONSTER: 'Z',"human zombie",(67,14) +MONSTER: 'Z',"human zombie",(68,18) +MONSTER: 'Z',"human zombie",(71,04) +# discworld temple +MAZE: "Pri-strT",'.' +FLAGS: noteleport,hardfloor,skylevel +GEOMETRY:center,center +MAP +............................................................................ +........................................||||||||||||||...................... +......................................||| |||.................... +....................................||| ........ |||.................. +.................................|||| .......... |.................. +.................................|| ............ ||................. +..................................|| .............. |||................. +...................................| ................ |................... +...................................| .................. ||.................. +..................................|| .................. ||.................. +...................................+ .................. |................... +...................................| .................. |................... +..................................|| .................. |................... +..................................| .................. |................... +..................................|| ................ ||.................. +...................................|| .............. ||................. +....................................| ............ ||................. +....................................| .......... ||| |.................. +....................................||| ........ ||.|||.................. +......................................|||----S------|...||.................. +............................................................................ +ENDMAP +BRANCH:(04,12,04,12),(0,0,0,0) +# norse, contains a spot for each of the 9 worlds +MAZE: "Pri-strv",' ' +FLAGS: noteleport,hardfloor,skylevel +GEOMETRY:center,center +MAP +............................................IIIIII}}}}}}}}IIII.............. +.............-------...........................IIIIII}}}}IIII............... +............--.....--............................IIIIIIIIIIII............... +..........---.......---................................IIII................. +..........|.........S.|..................................................... +........---S---------.---................................................... +........|.IC|......S....|................................................... +........|CCI|......|....|................................................... +........|C.I---S--------|................................................... +........|II.|........+..+................................................... +........|-S-|........+..+................................................... +........|...------------|................................................... +........|...|......|..LL|................................................... +........|...S......S..L.|................................................... +........---.---------.---................................................... +..........|.|.......S.|..................................................... +..........---.......|--..................................................... +............--.....--....................................................... +.............-------........................................................ +............................................................................ +ENDMAP +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(10,03,22,16),lit,"ordinary",inside +REGION:(08,05,24,14),lit,"ordinary",inside +REGION:(09,06,11,09),unlit,"ordinary",inside +REGION:(13,12,18,13),unlit,"ordinary",inside +REGION:(13,02,19,04),lit,"temple",inside +REGION:(13,15,19,17),unlit,"ordinary",inside +# Portal arrival point +BRANCH:(58,07,70,15),(0,0,0,0) +# altar to be converted +ALTAR:(16,03),noalign,altar +# Stairs +STAIR:(16,16),down +OBJECT:'`',"statue",(16,02),"Norn",5 +OBJECT:'`',"statue",(09,07),"none",1,"Nidhogg" +OBJECT:'`',"statue",(15,06),"none",3,"Freyr" +OBJECT:'`',"statue",(23,06),"storm giant",3,"Thyrm" +OBJECT:'`',"statue",(09,13),"none",5,"Nerthus" +OBJECT:'`',"statue",(16,12),"dwarf king",1 +OBJECT:'`',"statue",(23,13),"Lord Surtur",3 +OBJECT:'`',"statue",(15,16),"none",5,"the ogress Hel" +OBJECT:'`',"statue",(13,09),"none",1,"the Midgard Serpent" +# pyramid like temple +MAZE: "Pri-strw",' ' +FLAGS: noteleport,hardfloor,skylevel +GEOMETRY:center,center +MAP +.......................................................| | |---------------- +.......................................................| | +.......................................................| |------------------ +.......................................................| +.......-----------------------------...................|-------------------- +.......|...|...|...................|........................................ +.......|...|+--|. . . . . . . . . .|--...................................... +.......|.....|.S...................|--...................................... +.......|-+-----|. . . . . . . . . .|........................................ +.......|..|....|...................+........................................ +.......|..|....+...................+........................................ +.......|..S....|. . . . . . . . . .|........................................ +.......|+----S-|...................|--...................................... +.......|...|...|. . . . . . . . . .|--...................................... +.......|...|...|...................|........................................ +.......-----------------------------........................................ +............................................................................ +............................................................................ +............................................................................ +............................................................................ +ENDMAP +# Dungeon Description +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(07,04,35,15),lit,"ordinary",inside +REGION:(08,04,14,15),unlit,"ordinary" +REGION:(11,09,14,11),lit,"temple" +# Portal arrival point +BRANCH:(68,07,74,15),(0,0,0,0) +# Stairs +STAIR:(13,05),down +# Doors +DOOR:locked,(35,09) +DOOR:locked,(35,10) +DOOR:closed,(15,10) +DOOR:locked,(12,06) +DOOR:closed,(15,07) +DOOR:closed,(09,08) +DOOR:closed,(10,11) +DOOR:closed,(08,12) +DOOR:closed,(13,12) +# Unattended Altar - unaligned due to conflict - player must align it. +ALTAR:(12,10),noalign,altar +OBJECT:'`',"statue",(36,07),"none",1,"a sphinx" +OBJECT:'`',"statue",(36,12),"none",1,"a sphinx" +# High Priest +MONSTER:'@',"Arch Priest",(13,10) +# The treasure of High Priest +OBJECT:'(',"chest",(13,10) +# acolyte guards for the audience chamber +MONSTER:'@',"acolyte",(08,05) +MONSTER:'@',"acolyte",(34,14) +MONSTER:'@',"acolyte",(24,06) +MONSTER:'@',"acolyte",(28,12) +MONSTER:'@',"acolyte",(20,08) +MONSTER:'@',"acolyte",(18,08) +MONSTER:'@',"acolyte",(13,13) +MONSTER:'@',"acolyte",(09,10) +# Non diggable walls +NON_DIGGABLE:(00,00,38,19) +# Monsters on siege duty. +MONSTER: 'Z',"human zombie",(41,02) +MONSTER: 'M',"human mummy",(42,08) +MONSTER: 'Z',"human zombie",(03,01) +MONSTER: 'M',"human mummy",(64,05) +MONSTER: 'M',"human mummy",(70,09) +MONSTER: 'Z',"human zombie",(50,03) +MONSTER: 'M',"human mummy",(47,09) +MONSTER: 'M',"human mummy",(51,10) +MONSTER: 'M',"human mummy",(02,12) +MONSTER: 'M',"human mummy",(43,15) +MONSTER: 'M',"human mummy",(74,10) +MONSTER: 'M',"human mummy",(35,17) +MONSTER: 'M',"human mummy",(06,19) +MONSTER: 'M',"human mummy",(47,11) + +MONSTER: 's',"scorpion",random +MONSTER: 's',"scorpion",random +MONSTER: 's',"scorpion",random +MONSTER: 'S', random, (03,10) +MONSTER: 'S', random, (71,12) # # The "locate" level for the quest. # @@ -104,11 +540,11 @@ # further towards your assigned quest. # MAZE: "Pri-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel # This is a kludge to init the level as a lit field. -INIT_MAP: '.' , '.' , false , false , lit , false +INIT_MAP: '.' , '.' , false , false , lit , false , outside GEOMETRY:center,center MAP ........................................ ........................................ @@ -125,13 +561,13 @@ ........................................ ........................................ ENDMAP # Dungeon Description -REGION:(00,00,09,13),unlit,"morgue" -REGION:(09,00,30,01),unlit,"morgue" -REGION:(09,12,30,13),unlit,"morgue" -REGION:(31,00,39,13),unlit,"morgue" -REGION:(11,03,29,10),lit,"temple",filled,true +REGION:(00,00,09,13),unlit,"morgue",outside +REGION:(09,00,30,01),unlit,"morgue",outside +REGION:(09,12,30,13),unlit,"morgue",outside +REGION:(31,00,39,13),unlit,"morgue",outside +REGION:(11,03,29,10),lit,"temple",filled,true,inside # The altar inside the temple ALTAR:(20,07),noalign,shrine MONSTER:'@',"aligned priest",(20,07),noalign,hostile # Doors diff -rwBEN -U4 nethack-3.4.2-test/dat/Ranger.des nethack-3.4.2-diff/dat/Ranger.des --- nethack-3.4.2-test/dat/Ranger.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Ranger.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,10 +8,10 @@ # Here you meet your (besieged) class leader, Orion, # and receive your quest assignment. # MAZE: "Ran-strt",'.' -FLAGS: noteleport,hardfloor,arboreal -INIT_MAP:'.','.',true,true,lit,false +FLAGS: noteleport,hardfloor,arboreal,skylevel +INIT_MAP:'.','.',true,true,lit,false,outside GEOMETRY:left,center #1234567890123456789012345678901234567890123456789012345678901234567890 MAP .. @@ -36,9 +36,9 @@ ................................... . .. ENDMAP # Dungeon Description -REGION:(00,00,40,20),lit,"ordinary" +REGION:(00,00,40,20),lit,"ordinary",outside # Stairs STAIR:(10,10),down # Portal arrival point; just about anywhere on the right hand side of the map BRANCH:levregion(51,2,77,18),(0,0,40,20) @@ -293,9 +293,10 @@ # and goal levels. # MAZE: "Ran-fila" , ' ' -INIT_MAP: '.' , 'T', true, true, random, true +FLAGS: skylevel +INIT_MAP: '.' , 'T', true, true, random, true, outside NOMAP # STAIR: random, up STAIR: random, down diff -rwBEN -U4 nethack-3.4.2-test/dat/Rogue.des nethack-3.4.2-diff/dat/Rogue.des --- nethack-3.4.2-test/dat/Rogue.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Rogue.des 2003-11-30 09:37:32.000000000 -0600 @@ -7,45 +7,46 @@ # Here you meet your (besieged) class leader, Master of Thieves # and receive your quest assignment. # MAZE: "Rog-strt",' ' -FLAGS: noteleport, hardfloor, nommap +FLAGS: noteleport, hardfloor, nommap, skylevel GEOMETRY:center,center # 1 2 3 4 5 6 7 #123456789012345678901234567890123456789012345678901234567890123456789012345 MAP ----------------------------------.------------------------------------------ -|.....|.||..........|....|......|.|.........|.......+............---.......| -|.....|..+..........+....---....S.|...-S-----.-----.|............+.+.......| -|.....+.||........---......|....|.|...|.....|.|...|.---.....------.--------| -|-----|.-------|..|........------.-----.....|.--..|...-------..............| -|.....|........------+------..........+.....|..--S---.........------.-----.. -|.....|.------...............-----.}}.--------.|....-------.---....|.+...--| -|..-+--.|....|-----.--------.|...|.....+.....|.|....|.....+.+......|.--....| -|..|....|....|....+.|......|.|...-----.|.....|.--...|.....|.|......|..|....| -|..|.-----S----...|.+....-----...|...|.----..|..|.---....--.---S-----.|----| -|..|.|........|...------.|.S.....|...|....-----.+.|......|..|.......|.|....| -|---.-------..|...|....|.|.|.....|...----.|...|.|---.....|.|-.......|.---..| -...........|..S...|....---.----S----..|...|...+.|..-------.---+-....|...--+| -|---------.---------...|......|....S..|.---...|.|..|...........----.---....| -|........|.........|...+.------....|---.---...|.--+-.----.----....|.+...--+| -|........|.---+---.|----.--........|......-----......|..|..|.--+-.|.-S-.|..| -|........|.|.....|........----------.----.......---.--..|-.|....|.-----.|..| -|----....+.|.....----+---............|..|--------.+.|...SS.|....|.......|..| -|...--+-----.....|......|.------------............---...||.------+--+----..| -|..........S.....|......|.|..........S............|.....||...|.....|....|..| --------------------------.-------------------------------------------------- +---------------------------------,------------------------------------------ +|.....|,||..........|....|......|,|.........|,,,,,,,+............---.......| +|.....|,,+..........+....---....S,|...-S-----,-----,|............+,+.......| +|.....+,||........---......|....|,|...|.....|,|...|,---.....------,--------| +|-----|,-------|..|........------,-----.....|,--..|,,,-------,,,,,,,,,,,,,,| +|.....|,,,,,,,,------+------,,,,,,,,,,+.....|,,--S---,,,,,,,,,------,-----,, +|.....|,------,,,,,,,,,,,,,,,-----,}},--------,|....-------,---....|,+...--| +|..-+--,|....|-----,--------,|...|,,,,,+.....|,|....|.....+,+......|,--....| +|..|,,,,|....|....+,|......|,|...-----,|.....|,--...|.....|,|......|,,|....| +|..|,-----S----...|,+....-----...|...|,----..|,,|.---....--,---S-----,|----| +|..|,|........|...------.|,S.....|...|,,,,-----,+.|......|,,|.......|,|....| +|---,-------..|...|....|.|,|.....|...----,|...|,|---.....|,|-.......|,---..| +,,,,,,,,,,,|..S...|....---,----S----..|,,,|...+,|..-------,---+-....|,,,--+| +|---------,---------...|,,,,,,|....S..|,---...|,|..|,,,,,,,,,,,----.---,,,,| +|........|,,,,,,,,,|...+,------....|---,---...|,--+-,----,----,,,,|.+,,,--+| +|........|,---+---,|----,--........|,,,,,,-----,,,,,,|..|,,|.--+-,|.-S-,|..| +|........|,|.....|,,,,,,,,----------,----,,,,,,,---.--..|-,|....|,-----,|..| +|----....+,|.....----+---,,,,,,,,,,,,|..|--------.+.|...SS,|....|,,,,,,,|..| +|...--+-----.....|......|,------------............---...||,------+--+----..| +|..........S.....|......|,|..........S............|.....||,,,|.....|....|..| +-------------------------,-------------------------------------------------- ENDMAP # Dungeon Description -#REGION:(00,00,75,20),lit,"ordinary" +#REGION:(00,00,75,20),unlit,"ordinary",inside # The down stairs is at one of the 4 "exits". The others are mimics, # mimicing stairwells. RANDOM_PLACES: (33,0), (0,12), (25,20), (75,05) STAIR:place[0],down MONSTER:'m',"giant mimic", place[1], m_feature "staircase down" MONSTER:'m',"large mimic", place[2], m_feature "staircase down" MONSTER:'m',"small mimic", place[3], m_feature "staircase down" # Portal arrival point +REGION:(35,06,36,06),unlit,"ordinary",outside BRANCH:(19,09,19,09),(0,0,0,0) # Doors (secret) #DOOR:locked|closed|open,(xx,yy) DOOR: locked, (32, 2) diff -rwBEN -U4 nethack-3.4.2-test/dat/Samurai.des nethack-3.4.2-diff/dat/Samurai.des --- nethack-3.4.2-test/dat/Samurai.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Samurai.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, Lord Sato # and receive your quest assignment. # MAZE: "Sam-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP ..............................................................PP............ ...............................................................PP........... @@ -33,10 +33,12 @@ ............................................................................ ............................................................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(10,02,60,11),lit,"ordinary",inside REGION:(18,03,26,07),lit,"throne",unfilled +REGION:(42,11,60,17),lit,"ordinary",inside # Portal arrival zone BRANCH:(62,12,70,17),(0,0,0,0) # Stairs STAIR:(29,04),down @@ -95,9 +97,9 @@ # further towards your assigned quest. # MAZE: "Sam-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel GEOMETRY:center,center MAP ............................................................................ ............................................................................ @@ -120,9 +122,18 @@ ............................................................................ ............................................................................ ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(10,04,65,15),lit,"ordinary",inside +REGION:(08,02,12,05),lit,"ordinary",inside +REGION:(65,02,69,05),lit,"ordinary",inside +REGION:(08,14,12,17),lit,"ordinary",inside +REGION:(65,14,69,17),lit,"ordinary",inside +REGION:(15,04,19,05),lit,"ordinary",outside +REGION:(56,04,60,05),lit,"ordinary",outside +REGION:(15,14,19,15),lit,"ordinary",outside +REGION:(56,14,60,15),lit,"ordinary",outside # Doors DOOR:locked,(22,04) DOOR:locked,(22,15) DOOR:locked,(53,04) @@ -341,9 +352,10 @@ # and goal levels. # MAZE: "Sam-fila", ' ' -INIT_MAP: '.' , 'P', true, true, random, true +FLAGS: skylevel +INIT_MAP: '.' , 'P', true, true, random, true, outside NOMAP # STAIR: random, up STAIR: random, down diff -rwBEN -U4 nethack-3.4.2-test/dat/Tourist.des nethack-3.4.2-diff/dat/Tourist.des --- nethack-3.4.2-test/dat/Tourist.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Tourist.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, Twoflower # and receive your quest assignment. # MAZE: "Tou-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP .......}}....---------..-------------------------------------------------... ........}}...|.......|..|.-------------------------------------------...|... @@ -33,13 +33,14 @@ ...|.....|......|.....|..................................................... ...-------......-------..................................................... ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside REGION:(14,01,20,03),unlit,"morgue" -REGION:(07,10,11,12),unlit,"ordinary" -REGION:(04,16,08,18),unlit,"ordinary" -REGION:(17,16,21,18),unlit,"ordinary" +REGION:(24,00,72,07),lit,"ordinary",inside +REGION:(07,10,11,12),unlit,"ordinary",inside +REGION:(04,16,08,18),unlit,"ordinary",inside +REGION:(17,16,21,18),unlit,"ordinary",inside REGION:(27,02,32,04),unlit,"ordinary" REGION:(34,02,39,04),unlit,"ordinary" REGION:(41,02,53,04),unlit,"ordinary" REGION:(55,02,60,04),unlit,"ordinary" @@ -136,9 +137,9 @@ # further towards your assigned quest. # MAZE: "Tou-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel GEOMETRY:center,center MAP ---------------------------------------------------------------------------- |....|......|..........|......|......|...|....|.....|......|...............| @@ -161,46 +162,46 @@ |...........|........|.|.....|........................|.....|..............| ---------------------------------------------------------------------------- ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside NON_DIGGABLE:(00,00,75,19) # -REGION:(01,01,04,05),unlit,"morgue" -REGION:(15,03,20,05),lit,"shop" -REGION:(62,03,71,04),lit,"shop" -REGION:(01,17,11,18),lit,"barracks" -REGION:(12,09,20,10),lit,"barracks" -REGION:(53,11,59,14),lit,"zoo" -REGION:(63,14,72,16),lit,"barracks" -REGION:(32,14,40,16),lit,"temple" -# -REGION:(06,01,11,02),random,"ordinary" -REGION:(24,01,29,02),random,"ordinary" -REGION:(31,01,36,02),random,"ordinary" -REGION:(42,01,45,03),random,"ordinary" -REGION:(53,01,58,02),random,"ordinary" -REGION:(24,04,26,05),random,"ordinary" -REGION:(30,06,34,07),random,"ordinary" -REGION:(73,05,74,05),unlit,"ordinary" -REGION:(01,09,04,12),random,"ordinary" -REGION:(01,14,07,15),random,"ordinary" -REGION:(12,12,20,13),random,"ordinary" -REGION:(13,17,20,18),random,"ordinary" -REGION:(22,09,24,10),random,"ordinary" -REGION:(22,12,24,12),random,"ordinary" -REGION:(24,16,28,18),random,"ordinary" -REGION:(28,11,33,12),random,"ordinary" -REGION:(35,11,36,12),lit,"ordinary" -REGION:(38,08,41,12),random,"ordinary" -REGION:(43,07,49,08),random,"ordinary" -REGION:(43,12,49,12),random,"ordinary" -REGION:(44,16,51,16),random,"ordinary" -REGION:(53,06,59,07),random,"ordinary" -REGION:(61,06,71,07),random,"ordinary" -REGION:(55,16,59,18),random,"ordinary" -REGION:(63,11,68,12),random,"ordinary" -REGION:(70,11,72,12),random,"ordinary" +REGION:(01,01,04,05),unlit,"morgue",inside +REGION:(15,03,20,05),lit,"shop",inside +REGION:(62,03,71,04),lit,"shop",inside +REGION:(01,17,11,18),lit,"barracks",inside +REGION:(12,09,20,10),lit,"barracks",inside +REGION:(53,11,59,14),lit,"zoo",inside +REGION:(63,14,72,16),lit,"barracks",inside +REGION:(32,14,40,16),lit,"temple",inside +# +REGION:(06,01,11,02),random,"ordinary",inside +REGION:(24,01,29,02),random,"ordinary",inside +REGION:(31,01,36,02),random,"ordinary",inside +REGION:(42,01,45,03),random,"ordinary",inside +REGION:(53,01,58,02),random,"ordinary",inside +REGION:(24,04,26,05),random,"ordinary",inside +REGION:(30,06,34,07),random,"ordinary",inside +REGION:(73,05,74,05),unlit,"ordinary",inside +REGION:(01,09,04,12),random,"ordinary",inside +REGION:(01,14,07,15),random,"ordinary",inside +REGION:(12,12,20,13),random,"ordinary",inside +REGION:(13,17,20,18),random,"ordinary",inside +REGION:(22,09,24,10),random,"ordinary",inside +REGION:(22,12,24,12),random,"ordinary",inside +REGION:(24,16,28,18),random,"ordinary",inside +REGION:(28,11,33,12),random,"ordinary",inside +REGION:(35,11,36,12),lit,"ordinary",inside +REGION:(38,08,41,12),random,"ordinary",inside +REGION:(43,07,49,08),random,"ordinary",inside +REGION:(43,12,49,12),random,"ordinary",inside +REGION:(44,16,51,16),random,"ordinary",inside +REGION:(53,06,59,07),random,"ordinary",inside +REGION:(61,06,71,07),random,"ordinary",inside +REGION:(55,16,59,18),random,"ordinary",inside +REGION:(63,11,68,12),random,"ordinary",inside +REGION:(70,11,72,12),random,"ordinary",inside # Stairs STAIR:(10,04),up STAIR:(73,05),down # Non diggable walls diff -rwBEN -U4 nethack-3.4.2-test/dat/Valkyrie.des nethack-3.4.2-diff/dat/Valkyrie.des --- nethack-3.4.2-test/dat/Valkyrie.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Valkyrie.des 2003-11-30 09:37:32.000000000 -0600 @@ -8,9 +8,9 @@ # Here you meet your (besieged) class leader, the Norn, # and receive your quest assignment. # MAZE: "Val-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP IIIIIIPPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIPPPPPIIIIIIII..IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII...IIIIIIIIIIIIIIIIIIIII @@ -33,10 +33,10 @@ IIIIPPPIIIIIIIIIIIIIIPPLPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.......IIIIII IIIIIIIIIIIIIIIIIIIIIIPPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" -REGION:(27,08,42,12),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(27,08,42,12),lit,"ordinary",inside # Portal arrival point BRANCH:(66,17,66,17),(0,0,0,0) # Stairs STAIR:(18,01),down @@ -87,10 +87,10 @@ # further towards your assigned quest. # MAZE: "Val-loca",' ' -FLAGS: hardfloor -INIT_MAP: '.' , 'I' , true , true , lit , false +FLAGS: hardfloor,skylevel +INIT_MAP: '.' , 'I' , true , true , lit , false , outside GEOMETRY:center,center MAP PPPP.... ....PPPPP. PLP... .PPLLLPP @@ -106,9 +106,13 @@ .PLLP ..PLLP .PPPP.. ....PPPP ENDMAP # Dungeon Description -REGION:(00,00,39,12),lit,"ordinary" +REGION:(00,00,39,12),lit,"ordinary",outside +REGION:(04,02,33,10),lit,"ordinary",inside +REGION:(01,04,35,08),lit,"ordinary",inside +REGION:(34,05,36,10),lit,"ordinary",inside + # Stairs STAIR:(48,14),up STAIR:(20,06),down # Non diggable walls @@ -263,9 +267,10 @@ # and goal levels. # MAZE: "Val-fila" , 'I' -INIT_MAP: '.' , 'I' , true , true , lit, false +FLAGS: skylevel +INIT_MAP: '.' , 'I' , true , true , lit, false , outside NOMAP # STAIR: random, up STAIR: random, down diff -rwBEN -U4 nethack-3.4.2-test/dat/Wizard.des nethack-3.4.2-diff/dat/Wizard.des --- nethack-3.4.2-test/dat/Wizard.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/Wizard.des 2003-11-30 09:37:32.000000000 -0600 @@ -7,9 +7,9 @@ # Here you meet your (besieged) class leader, Neferet the Green # and receive your quest assignment. # MAZE: "Wiz-strt",' ' -FLAGS: noteleport,hardfloor +FLAGS: noteleport,hardfloor,skylevel GEOMETRY:center,center MAP ............................................................................ .....................C....CC.C........................C..................... @@ -32,9 +32,10 @@ ..........C.C.........................C............C...........}}}}}........ ......................CCC.C................................................. ENDMAP # Dungeon Description -REGION:(00,00,75,19),lit,"ordinary" +REGION:(00,00,75,19),lit,"ordinary",outside +REGION:(13,04,33,16),lit,"ordinary",inside REGION:(35,00,49,03),unlit,"ordinary" REGION:(43,12,49,16),unlit,"ordinary" REGION:(19,11,33,15),unlit,"ordinary",unfilled,true REGION:(30,10,31,10),unlit,"ordinary" @@ -101,9 +102,9 @@ # further towards your assigned quest. # MAZE: "Wiz-loca",' ' -FLAGS: hardfloor +FLAGS: hardfloor,skylevel GEOMETRY:center,center MAP ............. ....................................................... .............. .............}}}}}}}.}}}}}}}}}}}}}}}}}}}.}}}}}}}....... @@ -127,10 +128,10 @@ ............. .............}}}}}}}.}}}}}}}}}}}}}}}}}}}.}}}}}}}....... ............. ....................................................... ENDMAP # Dungeon Description -REGION:(00,00,75,20),lit,"ordinary" -REGION:(37,04,65,16),unlit,"ordinary" +REGION:(00,00,75,20),lit,"ordinary",outside +REGION:(37,04,65,16),unlit,"ordinary",inside REGION:(41,08,46,12),lit,"ordinary" REGION:(56,08,61,12),lit,"ordinary" REGION:(48,08,54,08),unlit,"ordinary" REGION:(48,12,54,12),unlit,"ordinary" diff -rwBEN -U4 nethack-3.4.2-test/dat/data.base nethack-3.4.2-diff/dat/data.base --- nethack-3.4.2-test/dat/data.base 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/data.base 2003-11-30 09:37:32.000000000 -0600 @@ -312,8 +312,47 @@ sickly yellow grin, miming Flagg's own. "You'll tell," he whispered. "Oh yes indeed you will." And Dayna knew he was right. [ The Stand, by Stephen King ] +bandersnatch* +whitefood + "Beware the Jabberwock, my son! + The jaws that bite, the claws that catch! + Beware the Jubjub bird, and shun + The frumius Bandersnatch!" + [ Jabberwocky, by Lewis Carroll ] + + "Bandersnatchi are whitefoods," said Kzanol/Greenberg. "They + don't have minds." + "I guessed that. But, son, you've got to remember that they've + had two billion years to develop minds." + "It wouldn't help them. They can't mutate. They were designed + that way. A whitefood is one big cell, with a chromosome as + long as your arm and as thick as your little finger. Radiation + could never affect them.... + [ World of Ptavvs, by Larry Niven ] +banni*k + The Bannik in the Troika + While a peasant sat in front of his izba (cottage), a troika + pulled up to him and a gentleman stepped out. He said to the + peasant, "I would like a tea prepared and people gathered for + a party. Before the party I would for you to heat the bathhouse + and find someone to wash me. I'll pay 100 rubles." + "For 100 rubles, I would be happy to organize the party, and my + own wife would be happy to wash and steam you." Excitedly, the + peasant set to work on the party and sent his wife out to wash + the gentleman. + The evening party was well underway when the peasant realized + they'd been in the bathhouse a very long time. He asked the + coachman what was happening and the coachman said "The gentleman + likes to steam himself for a good long time." + The peasant waited a bit longer, but became worried and peeked + into the bathhouse between the slats. There he saw the gentleman + sitting upon the ledge, peeling the skin from his wife. + Screaming, he ran back to the house where he gathered up all the + guests and ran back to the bathhouse. His dead wife lay there, + alone, with her skin peeled from her body. One hundred rubles sat + on the windowsill. The troika, too, had disappeared. barbarian * barbarian They dressed alike -- in buckskin boots, leathern breeks and deerskin shirts, with broad girdles that held axes and short @@ -683,8 +722,24 @@ with trees_ or _swords_, or needing to be _pulled close around her/his shivering body_. This seems to suggest they are less than practical for anyone on an arduous Tour. [ The Tough Guide to Fantasyland, by Diana Wynne Jones ] +clockwork* + The Automaton Chess-Player was invented in 1769, by Baron Kempelen, + a nobleman of Presburg, in Hungary, who afterwards disposed of it, + together with the secret of its operation, to its present posessor. + [...] + The foregoing observations apply to the appearance of the + Automaton upon its first introduction into the presence + of the spectators. + Maelzel now informs the company that he will disclose to their + view the mechanism of the machine. Taking from his pocket a bunch + of keys he unlocks with one of them, door marked 1 in the cut on + page 424, and throws the cupboard fully open to the inspection of + all present. Its whole interior is apparently filled with wheels, + pinions, levers, and other machinery, crowded very closely together, + so that the eye can penetrate but a little distance into the mass. + [ Maelzel's Chess-Player, by Edgar Allan Poe ] cloud* I wandered lonely as a cloud That floats on high o'er vales and hills, When all at once I saw a crowd, @@ -900,8 +955,12 @@ A wolflike wild dog, Canis dingo, of Australia, having a reddish- or yellowish-brown coat, believed to have been introduced by the aborigines. [Webster's Encyclopedic Unabridged Dictionary of the English Language] +disint*grator + Disintegrators are nightmares made real. You will know them + by the pale green glow of almost anything larger than dust + disintegrating as it hits their skin. dispater Dispater is an arch-devil who rules the city of Dis. He is a powerful mage. djinn* @@ -1443,8 +1502,23 @@ corrosive agents, and therefore well suited for its use in coin and jewelry. [ Webster's New International Dictionary of the English Language, Second Edition ] +gold bug + Hereupon Legrand arose, with a grave and stately air, + and brought me the beetle from a glass case in which + it was enclosed.It was a beautiful scarabaeus, and, at + that time, unknown to naturalists --of course a great + prize in a scientific point of view. There were two + round, black spots near one extremity of the back, and + a long one near the other. The scales were exceedingly + hard and glossy, with all the appearance of burnished + gold. The weight of the insect was very remarkable, + and, taking all things into consideration, I could + hardly blame Jupiter for his opinion respecting it; but + what to make of Legrand's agreement with that opinion, + I could not, for the life of me, tell. + [ The Gold Bug, by Edgar Allan Poe ] gold golem The bellows he set away from the fire, and gathered all the tools wherewith he wrought into a silver chest; and with a sponge wiped he his face and his two hands withal, and his mighty neck and @@ -1520,8 +1594,15 @@ himself what in the world a grid bug was, and hoping that the beam connection -- to which he'd given no thought whatsoever until this moment -- was healthy and sound." [ Tron, novel by Brian Daley, story by Steven Lisberger ] +grue + The grue is a sinister, lurking presence in the dark places + of the earth. Its favorite diet is adventurers, but its + insatiable appetite is tempered by its fear of light. No grue + has ever been seen by the light of day, and few have survived + its fearsome jaws to tell the tale. + [ Zork ] gunyoki The samurai's last meal before battle. It was usually made up of cooked chestnuts, dried seaweed, and sake. hachi @@ -1945,8 +2026,24 @@ With jellyfishes such as these; Particularly Portuguese. [ Lines on Meeting a Portuguese Man-o'-war while Bathing, by Michael Flanders ] +jubjub* + Then a scream, shrill and high, rent the shuddering sky, + And they knew that some danger was near: + The Beaver turned pale to the tip of its tail, + And even the Butcher felt queer. + + He thought of his childhood, left far, far behind- + That blissful and innocent state- + The sound so exactly recalled to his mind + A pencil that sqeaks on a slate! + + "'Tis the voice of the Jubjub!" he suddenly cried + (This man, that they used to call "Dunce"). + "As the Bellman would tell you," he added with pride, + "I have uttered that sentiment once." + [ The Hunting of the Snark, by Lewis Carroll ] juiblex jubilex Little is known about the Faceless Lord, even the correct spelling of his name. He does not have a physical form as @@ -2163,8 +2260,16 @@ Pongo, though a dog born to command, had a twinkle in his eye. They walked side by side with great dignity, only putting the Dearlys on the leash to lead them over crossings. [ The Hundred and One Dalmatians, by Dodie Smith ] +leshy + The leshy (also known as leshii or ljeschi) is a Slavic spirit + of the forest who leads hunters and other tresspassers astray. + They have long green beards, but are seldom seen because their + clothes blend in with the surrounding trees. The best defence + against a leshy is to where your clothes backwards and your + shoes on the wrong feet, keeping it from knowing whether you + are coming or going. lembas* In the morning, as they were beginning to pack their slender goods, Elves that could speak their tongue came to them and brought them many gifts of food and clothing for their @@ -2692,8 +2797,10 @@ hair, escaping as it could below and between the cross bandages, project in curious tails and horns, giving him the strangest appearance conceivable. [ The Invisible Man, by H.G. Wells ] +muskeg + A bog of Northern United States. *naga* *naja* The naga is a mystical creature with the body of a snake and the head of a man or woman. They will fiercely protect the @@ -2772,8 +2879,15 @@ the web to shreds. [ The Encyclopedia of Myths and Legends of All Nations by Herbert Spencer Robinson and Knox Wilson ] +nosferatu + From the bloody sins of mankind a creature will be born which + will seek revenge for the sin committed by the parents and + visited on their children and children's children. Whosoever + lusts after blood without reason is under his spell, the spell + of the vampire NOSFERATU. + [ from _Nosferatu_, written by Henrik Galeen, 1922 ] nunchaku A Japanese flail. *nymph A female creature from Roman and Greek mythology, the nymph @@ -3071,8 +3185,16 @@ ways) than you wandering hobbits have -- more sense in their noses. For they sniff danger ahead which you walk right into; and if they run to save themselves, then they run the right way." [ The Fellowship of the Ring, by J.R.R. Tolkien ] +pooka + Pooka: From old Celtic mythology. A fairy spirit in + animal form. Always very large. The pooka appears + here and there, now and then, to this one and that + one at his own caprice. A wise but mischievous + creature. Very fond of rum-pots, crack-pots, and + how are you, %u? + [ Harvey, by Mary Chase ] *portal Portals can be Mirrors, Pictures, Standing Stones, Stone Circles, Windows, and special gates set up for the purpose. You will travel through them both to distant parts of the @@ -3170,8 +3292,19 @@ due to the claws, hooves, or bites of such animals. quantum mechanic These creatures are not native to this universe; they seem to have strangely derived powers, and unknown motives. +quark + "Three quarks for Muster Mark! + Sure he hasn't got much of a bark + And sure any he has it's all beside the mark." + [ Finnegans Wake, by James Joyce ] + + Quarks are any of a group of hypothetical elementary particles + that are the basic constituents of all hadrons. The six variaties, + or flavours, are up, down, strange, charm, bottom, and top. + Murray Gell-Mann, the physicist who coined the name quark, originally + theorized only three flavors. quasit Quasits are small, evil creatures, related to imps. Their talons release a very toxic poison when used in an attack. quest @@ -3894,8 +4027,25 @@ rule in his place. Later, he too was challenged by his own son, Zeus, and he and his fellow titans were ousted from Mount Olympus. [ Greek Mythology, by Richard Patrick ] +tortoise + The Hare was once boasting of his speed before the other + animals. "I have never yet been beaten," said he, "when I put + forth my full speed. I challenge any one here to race with me." + The Tortoise said quietly, "I accept your challenge." + "That is a good joke," said the Hare; "I could dance round you + all the way." + "Keep your boasting till you've beaten," answered the + Tortoise. "Shall we race?" + So a course was fixed and a start was made. The Hare darted + almost out of sight at once, but soon stopped and, to show his + contempt for the Tortoise, lay down to have a nap. The Tortoise + plodded on and plodded on, and when the Hare awoke from his nap, + he saw the Tortoise just near the winning-post and could not run + up in time to save the race. Then said the Tortoise: + "Slow but steady wins the race." + [ Aesop's Fables ] touch*stone "Gold is tried by a touchstone, men by gold." [ Chilon (c. 560 BC) ] tourist @@ -4017,8 +4167,17 @@ It is made of hardened steel, and is manufactured using a special process, causing it to never rust. The tsurugi is rumored to be so sharp that it can occasionally cut opponents in half! +turtle + At first, the LOGO turtle was a hardware device that was + connected to a computer. Students would place the turtle on a + large piece of paper and then execute turtle commands such as + LEFT, RIGHT, FORWARD, and BACK to draw on the paper. In 1977 a + company called Terrapin Software even produced these hardware + turtles commercially. Later the turtle was a sprite on the + graphical computer screen that could draw lines and pictures + using the same turtle commands that directed the hardware turtles. twoflower guide "Rincewind!" Twoflower sprang off the bed. The wizard jumped back, diff -rwBEN -U4 nethack-3.4.2-test/dat/endgame.des nethack-3.4.2-diff/dat/endgame.des --- nethack-3.4.2-test/dat/endgame.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/endgame.des 2003-11-30 09:37:32.000000000 -0600 @@ -196,10 +196,10 @@ MONSTER:'E',random,random MONSTER:'E',random,random MONSTER:'E',random,random -MONSTER:'J',random,random -MONSTER:'J',random,random +MONSTER:'J',"jabberwock",random +MONSTER:'J',"jubjub bird",random MONSTER:'&',"djinni",random,hostile MONSTER:'&',"djinni",random,hostile MONSTER:'&',"djinni",random,hostile diff -rwBEN -U4 nethack-3.4.2-test/dat/gehennom.des nethack-3.4.2-diff/dat/gehennom.des --- nethack-3.4.2-test/dat/gehennom.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/gehennom.des 2003-11-30 09:37:32.000000000 -0600 @@ -253,8 +253,10 @@ MONSTER:'m',random,random MONSTER:'m',random,random MONSTER:';',"jellyfish",random MONSTER:';',"jellyfish",random +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random # Some random objects OBJECT:'!',random,random OBJECT:'!',random,random OBJECT:'!',random,random diff -rwBEN -U4 nethack-3.4.2-test/dat/medusa.des nethack-3.4.2-diff/dat/medusa.des --- nethack-3.4.2-test/dat/medusa.des 2003-11-30 05:56:50.000000000 -0600 +++ nethack-3.4.2-diff/dat/medusa.des 2003-11-30 09:37:32.000000000 -0600 @@ -94,8 +94,10 @@ MONSTER:'T',"water troll",(51,03) MONSTER:'T',"water troll",(64,11) MONSTER:'S',random,(38,07) MONSTER:'S',random,(38,12) +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random MONSTER:random,random,random MONSTER:random,random,random MONSTER:random,random,random MONSTER:random,random,random @@ -199,8 +201,10 @@ MONSTER:'S',"cobra",(64,10),asleep MONSTER:'S',"cobra",(65,10),asleep MONSTER:'A',random,(72,08) MONSTER:'y',"yellow light",(72,11),asleep +MONSTER:'y',"will o' wisp",random +MONSTER:'y',"will o' wisp",random MONSTER:random,random,(17,07) MONSTER:random,random,(28,11) MONSTER:random,random,(32,13) MONSTER:random,random,(49,09) diff -rwBEN -U4 nethack-3.4.2-test/dat/ttyoptions nethack-3.4.2-diff/dat/ttyoptions --- nethack-3.4.2-test/dat/ttyoptions 2003-11-30 05:59:20.000000000 -0600 +++ nethack-3.4.2-diff/dat/ttyoptions 2003-11-30 09:37:32.000000000 -0600 @@ -4,10 +4,11 @@ Options compiled into this edition: color, debug mode, Elbereth, experience points on status line, insurance files for recovering from crashes, Keystone Kops, - exclusive lock on level 0 file, log file, news file, redo command, - rogue level, saddles and riding, screen clipping, + monster biodiversity, TODO: more buildopts labels, + exclusive lock on level 0 file, log file, mail daemon, news file, + redo command, rogue level, saddles and riding, screen clipping, screen control via WIN32 console I/O, seduction, sinks, tourists, user sounds via pmatch, walled mazes, zero-compressed save files, basic NetHack features. diff -rwBEN -U4 nethack-3.4.2-test/include/config.h nethack-3.4.2-diff/include/config.h --- nethack-3.4.2-test/include/config.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/config.h 2003-11-30 09:37:32.000000000 -0600 @@ -349,9 +349,72 @@ * Enable any of these at your own risk -- there are almost certainly * bugs left here. */ -/*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ +/* #define GOLDOBJ /* Gold is kept on obj chains - Helge Hafting */ +#define WEBB_COLORS + +/*#define USER_SOUNDS /* Use sounds */ + +#define WEBB_FOOD_NAMES +#define WEBB_MUSIC +#define WEBB_WARG_STEED + +#define WEBB_WATERSPOUT_GARGOYLE +#define WEBB_DISINT + +#define WEBB_TREE +#define WEBB_ENVIRONMENT +#define WEBB_GOLDBUG +#define WEBB_TEXT_FIX +#define WEBB_ENGR_LIGHT +/* #define WEBB_AVATAR */ +#define WEBB_CARROLL +/*#define WEBB_TURTLE*/ +#define WEBB_LAME_MONSTERS +#define WEBB_BIODIVERSITY +#define WEBB_MCHARM +#define WEBB_SATYR +#define WEBB_MUTATED_MONST + +#ifdef WEBB_BIODIVERSITY +# ifndef WEBB_MCHARM +# define WEBB_MCHARM +# endif +# ifndef WEBB_SATYR +# define WEBB_SATYR +# endif +# ifndef WEBB_CARROLL +# define WEBB_CARROLL +# endif +# ifndef WEBB_TURTLE +# define WEBB_TURTLE +# endif +# ifndef WEBB_WATERSPOUT_GARGOYLE +# define WEBB_WATERSPOUT_GARGOYLE +# endif +# ifndef WEBB_GOLDBUG +# define WEBB_GOLDBUG +# endif +# ifndef WEBB_DISINT +# define WEBB_DISINT +# endif +# ifndef WEBB_TREE +# define WEBB_TREE +# endif +# ifndef WEBB_LAME_MONSTERS +# define WEBB_LAME_MONSTERS +# endif +#endif + +#ifdef WEBB_ENVIRONMENT +# ifndef WEBB_TREE +# define WEBB_TREE +# endif +#endif + +/* #define WEBB_MONEY */ +#define MAIL /* End of Section 5 */ #include "global.h" /* Define everything else according to choices above */ diff -rwBEN -U4 nethack-3.4.2-test/include/decl.h nethack-3.4.2-diff/include/decl.h --- nethack-3.4.2-test/include/decl.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/decl.h 2003-11-30 09:37:32.000000000 -0600 @@ -250,12 +250,55 @@ #include "you.h" E NEARDATA struct you u; #include "onames.h" +/* WEBB_MONEY quick fix */ +#ifndef GROSCHEN +# define GROSCHEN SILVER_PIECE +#endif +#ifndef GOLD_PIECE +# define GOLD_PIECE ZORKMID +#endif + #ifndef PM_H /* (pm.h has already been included via youprop.h) */ #include "pm.h" #endif +#ifdef WEBB_MUTATED_MONST + +#define PM_KOBOLD_LORD PM_KOBOLD_CHIEFTAIN +#define PM_WOOD_NYMPH PM_DRYAD + +#define PM_BABY_RED_DRAGON PM_BABY_FIREDRAKE +#define PM_BABY_WHITE_DRAGON PM_BABY_LINDWORM +#define PM_BABY_ORANGE_DRAGON PM_BABY_LUNG_DRAGON +#define PM_BABY_BLUE_DRAGON PM_BABY_LEVIATHAN +#define PM_BABY_GREEN_DRAGON PM_BABY_WYVERN +#define PM_BABY_YELLOW_DRAGON PM_BABY_GUIVRE +#define PM_RED_DRAGON PM_FIREDRAKE +#define PM_WHITE_DRAGON PM_LINDWORM +#define PM_ORANGE_DRAGON PM_LUNG_DRAGON +#define PM_BLUE_DRAGON PM_LEVIATHAN +#define PM_GREEN_DRAGON PM_WYVERN +#define PM_YELLOW_DRAGON PM_GUIVRE + + +#define RED_DRAGON_SCALE_MAIL FIREDRAKE_SCALE_MAIL +#define WHITE_DRAGON_SCALE_MAIL LINDWORM_SCALE_MAIL +#define ORANGE_DRAGON_SCALE_MAIL LUNG_DRAGON_SCALE_MAIL +#define BLUE_DRAGON_SCALE_MAIL LEVIATHAN_SCALE_MAIL +#define GREEN_DRAGON_SCALE_MAIL WYVERN_SCALE_MAIL +#define YELLOW_DRAGON_SCALE_MAIL GUIVRE_SCALE_MAIL + +#define RED_DRAGON_SCALES FIREDRAKE_SCALES +#define WHITE_DRAGON_SCALES LINDWORM_SCALES +#define ORANGE_DRAGON_SCALES LUNG_DRAGON_SCALES +#define BLUE_DRAGON_SCALES LEVIATHAN_SCALES +#define GREEN_DRAGON_SCALES WYVERN_SCALES +#define YELLOW_DRAGON_SCALES GUIVRE_SCALES + +#endif + E NEARDATA struct monst youmonst; /* init'd and defined in decl.c */ E NEARDATA struct monst *mydogs, *migrating_mons; E NEARDATA struct mvitals { diff -rwBEN -U4 nethack-3.4.2-test/include/engrave.h nethack-3.4.2-diff/include/engrave.h --- nethack-3.4.2-test/include/engrave.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/engrave.h 2003-11-30 09:37:32.000000000 -0600 @@ -17,9 +17,16 @@ #define BURN 3 #define MARK 4 #define ENGR_BLOOD 5 #define HEADSTONE 6 +#ifndef WEBB_ENGR_LIGHT #define N_ENGRAVE 6 +#else +#define ENGR_LIGHT 7 +#define N_ENGRAVE 7 + unsigned e_id; +#endif + }; #define newengr(lth) (struct engr *)alloc((unsigned)(lth) + sizeof(struct engr)) #define dealloc_engr(engr) free((genericptr_t) (engr)) diff -rwBEN -U4 nethack-3.4.2-test/include/extern.h nethack-3.4.2-diff/include/extern.h --- nethack-3.4.2-test/include/extern.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/extern.h 2003-11-30 09:37:32.000000000 -0600 @@ -320,8 +320,12 @@ /* ### do_name.c ### */ E int FDECL(getpos, (coord *,BOOLEAN_P,const char *)); E struct monst *FDECL(christen_monst, (struct monst *,const char *)); +#ifdef WEBB_BIODIVERSITY +E void FDECL(introduce_mons, (struct monst *)); +E const char * FDECL(rndqname,(int, int)); +#endif E int NDECL(do_mname); E struct obj *FDECL(oname, (struct obj *,const char *)); E int NDECL(ddocall); E void FDECL(docall, (struct obj *)); @@ -338,16 +342,22 @@ E char *FDECL(Amonnam, (struct monst *)); E char *FDECL(a_monnam, (struct monst *)); E char *FDECL(distant_monnam, (struct monst *,int,char *)); E const char *NDECL(rndmonnam); +#ifdef WEBB_ENVIRONMENT +E const char *NDECL(rndhalmonnam); +#endif E const char *FDECL(hcolor, (const char *)); E const char *NDECL(rndcolor); #ifdef REINCARNATION E const char *NDECL(roguename); #endif E struct obj *FDECL(realloc_obj, (struct obj *, int, genericptr_t, int, const char *)); E char *FDECL(coyotename, (struct monst *,char *)); +#ifdef WEBB_TREE +E char *FDECL(rmname, (struct rm *)); +#endif /* ### do_wear.c ### */ #ifdef USE_TRAMPOLI @@ -366,16 +376,24 @@ E int NDECL(Armor_gone); E int NDECL(Helmet_off); E int NDECL(Gloves_off); E int NDECL(Boots_off); +#ifdef WEBB_BIODIVERSITY +#ifndef USE_TRAMPOLI +E int NDECL(Boots_on); +#endif +#endif E int NDECL(Cloak_off); E int NDECL(Shield_off); E void NDECL(Amulet_off); E void FDECL(Ring_on, (struct obj *)); E void FDECL(Ring_off, (struct obj *)); E void FDECL(Ring_gone, (struct obj *)); E void FDECL(Blindf_on, (struct obj *)); E void FDECL(Blindf_off, (struct obj *)); +#ifdef WEBB_LAME_MONSTERS +E int FDECL(Blemmye_blindness, (struct monst *)); +#endif E int NDECL(dotakeoff); E int NDECL(doremring); E int FDECL(cursed, (struct obj *)); E int FDECL(armoroff, (struct obj *)); @@ -511,8 +529,12 @@ E int NDECL(eatmdone); E int NDECL(eatfood); E int NDECL(opentin); E int NDECL(unfaint); +#ifdef WEBB_BIODIVERSITY +E int NDECL(rehumanize_wrapper); +E int NDECL(windclock); +#endif #endif E boolean FDECL(is_edible, (struct obj *)); E void NDECL(init_uhunger); E int NDECL(Hear_again); @@ -535,9 +557,11 @@ E void FDECL(food_substitution, (struct obj *,struct obj *)); E void NDECL(fix_petrification); E void FDECL(consume_oeaten, (struct obj *,int)); E boolean FDECL(maybe_finished_meal, (BOOLEAN_P)); - +#ifdef WEBB_BIODIVERSITY +E int FDECL(start_clockwinding, (struct obj * )); +#endif /* ### end.c ### */ E void FDECL(done1, (int)); E int NDECL(done2); @@ -560,8 +584,11 @@ E boolean NDECL(can_reach_floor); E const char *FDECL(surface, (int,int)); E const char *FDECL(ceiling, (int,int)); E struct engr *FDECL(engr_at, (XCHAR_P,XCHAR_P)); +#ifdef WEBB_ENGR_LIGHT +E struct engr *FDECL(find_eid, (unsigned )); +#endif #ifdef ELBERETH E int FDECL(sengr_at, (const char *,XCHAR_P,XCHAR_P)); #endif E void FDECL(u_wipe_engr, (int)); @@ -660,9 +687,13 @@ /* ### fountain.c ### */ E void FDECL(floating_above, (const char *)); +#ifdef WEBB_WATERSPOUT_GARGOYLE +E void FDECL(dogushforth, (int, int, int)); +#else E void FDECL(dogushforth, (int)); +#endif # ifdef USE_TRAMPOLI E void FDECL(gush, (int,int,genericptr_t)); # endif E void FDECL(dryup, (XCHAR_P,XCHAR_P, BOOLEAN_P)); @@ -813,8 +844,15 @@ E int FDECL(count_buc, (struct obj *,int)); E void FDECL(carry_obj_effects, (struct obj *)); E const char *FDECL(currency, (long)); E void FDECL(silly_thing, (const char *,struct obj *)); +#ifdef WEBB_SATYR +E struct obj * FDECL(mon_has_item,(struct monst *, int, int)); +#endif +#ifdef WEBB_GOLDBUG +E struct obj * FDECL(ochain_has_material, + (struct obj *, unsigned int, unsigned int)); +#endif /* ### ioctl.c ### */ #if defined(UNIX) || defined(__BEOS__) @@ -831,8 +869,11 @@ E void FDECL(new_light_source, (XCHAR_P, XCHAR_P, int, int, genericptr_t)); E void FDECL(del_light_source, (int, genericptr_t)); E void FDECL(do_light_sources, (char **)); E struct monst *FDECL(find_mid, (unsigned, unsigned)); +#ifdef WEBB_ENGR_LIGHT +E struct ls_t *FDECL(find_ls, (unsigned)); +#endif E void FDECL(save_light_sources, (int, int, int)); E void FDECL(restore_light_sources, (int)); E void FDECL(relink_light_sources, (BOOLEAN_P)); E void FDECL(obj_move_light_source, (struct obj *, struct obj *)); @@ -910,8 +951,11 @@ E void NDECL(getmailstatus); # endif E void NDECL(ckmailstatus); E void FDECL(readmail, (struct obj *)); +#ifdef WEBB_BIODIVERSITY +E boolean FDECL(md_rush,(struct monst *,int,int)); +#endif #endif /* MAIL */ /* ### makemon.c ### */ @@ -928,8 +972,11 @@ E int FDECL(golemhp, (int)); E boolean FDECL(peace_minded, (struct permonst *)); E void FDECL(set_malign, (struct monst *)); E void FDECL(set_mimic_sym, (struct monst *)); +#ifdef WEBB_BIODIVERSITY +E int NDECL(pick_friendly); +#endif E int FDECL(mbirth_limit, (int)); E void FDECL(mimic_hit_msg, (struct monst *, SHORT_P)); #ifdef GOLDOBJ E void FDECL(mkmonmoney, (struct monst *, long)); @@ -952,8 +999,11 @@ E int FDECL(noattacks, (struct permonst *)); E int FDECL(sleep_monst, (struct monst *,int,int)); E void FDECL(slept_monst, (struct monst *)); E long FDECL(attk_protection, (int)); +#ifdef WEBB_MCHARM +E int FDECL(mcharmm, (struct monst *, struct monst *, int)); +#endif /* ### mhitu.c ### */ E const char *FDECL(mpoisons_subj, (struct monst *,struct attack *)); @@ -968,8 +1018,20 @@ E int FDECL(could_seduce, (struct monst *,struct monst *,struct attack *)); #ifdef SEDUCE E int FDECL(doseduce, (struct monst *)); #endif +#ifdef WEBB_WATERSPOUT_GARGOYLE +E void FDECL(hurtarmor, (int)); +#endif +#ifdef WEBB_MCHARM +E int FDECL(mcharmu, (struct monst *, int, int)); +#endif + +/* ### miditest.c ### */ + +#ifdef WEBB_MUSIC +E int FDECL(play_midi, (short, char*,short)); +#endif /* ### minion.c ### */ E void FDECL(msummon, (struct monst *)); @@ -987,11 +1049,17 @@ #ifdef USE_TRAMPOLI E int FDECL(do_comp, (genericptr_t,genericptr_t)); #endif E void NDECL(sort_rooms); +#ifdef WEBB_ENVIRONMENT +E void FDECL(add_room, (int,int,int,int,BOOLEAN_P,SCHAR_P,BOOLEAN_P,uchar)); +E void FDECL(add_subroom, (struct mkroom *,int,int,int,int, + BOOLEAN_P,SCHAR_P,BOOLEAN_P, uchar)); +#else E void FDECL(add_room, (int,int,int,int,BOOLEAN_P,SCHAR_P,BOOLEAN_P)); E void FDECL(add_subroom, (struct mkroom *,int,int,int,int, BOOLEAN_P,SCHAR_P,BOOLEAN_P)); +#endif E void NDECL(makecorridors); E void FDECL(add_door, (int,int,struct mkroom *)); E void NDECL(mklev); #ifdef SPECIALIZATION @@ -1008,9 +1076,13 @@ E void NDECL(mkinvokearea); /* ### mkmap.c ### */ +#ifdef WEBB_ENVIRONMENT +void FDECL(flood_fill_rm, (int,int,int,BOOLEAN_P,BOOLEAN_P,uchar)); +#else void FDECL(flood_fill_rm, (int,int,int,BOOLEAN_P,BOOLEAN_P)); +#endif void FDECL(remove_rooms, (int,int,int,int)); /* ### mkmaze.c ### */ @@ -1099,8 +1171,11 @@ E int FDECL(pm_to_cham, (int)); E int FDECL(minliquid, (struct monst *)); E int NDECL(movemon); E int FDECL(meatmetal, (struct monst *)); +#ifdef WEBB_GOLDBUG +E int FDECL(meatmetal_effects, (struct monst *, struct obj *)); +#endif E int FDECL(meatobj, (struct monst *)); E void FDECL(mpickgold, (struct monst *)); E boolean FDECL(mpickstuff, (struct monst *,const char *)); E int FDECL(curr_mon_load, (struct monst *)); @@ -1114,8 +1189,11 @@ E void FDECL(replmon, (struct monst *,struct monst *)); E void FDECL(relmon, (struct monst *)); E struct obj *FDECL(mlifesaver, (struct monst *)); E boolean FDECL(corpse_chance,(struct monst *,struct monst *,BOOLEAN_P)); +#ifdef WEBB_DISINT +E void FDECL(mondead_helper, (struct monst *, uchar)); +#endif E void FDECL(mondead, (struct monst *)); E void FDECL(mondied, (struct monst *)); E void FDECL(mongone, (struct monst *)); E void FDECL(monstone, (struct monst *)); @@ -1145,8 +1223,11 @@ E void NDECL(kill_genocided_monsters); E void FDECL(golemeffects, (struct monst *,int,int)); E boolean FDECL(angry_guards, (BOOLEAN_P)); E void NDECL(pacify_guards); +#ifdef WEBB_BIODIVERSITY +E int FDECL(cobble_there, (struct monst *)); +#endif /* ### mondata.c ### */ E void FDECL(set_mon_data, (struct monst *,struct permonst *,int)); @@ -1194,8 +1275,11 @@ E boolean FDECL(closed_door, (int,int)); E boolean FDECL(accessible, (int,int)); E void FDECL(set_apparxy, (struct monst *)); E boolean FDECL(can_ooze, (struct monst *)); +#ifdef WEBB_BIODIVERSITY +E int FDECL(wind_clockwork, (struct monst *, struct monst *)); +#endif /* ### monst.c ### */ E void NDECL(monst_init); @@ -1373,8 +1457,12 @@ E char *FDECL(makesingular, (const char *)); E struct obj *FDECL(readobjnam, (char *,struct obj *,BOOLEAN_P)); E int FDECL(rnd_class, (int,int)); E const char *FDECL(cloak_simple_name, (struct obj *)); +#ifdef WEBB_FOOD_NAMES +E boolean FDECL(culinary, (struct permonst *)); +E char *FDECL(culinary_name, (struct permonst *)); +#endif E const char *FDECL(mimic_obj_name, (struct monst *)); /* ### options.c ### */ @@ -1466,8 +1554,14 @@ #endif E void FDECL(add_valid_menu_class, (int)); E boolean FDECL(allow_all, (struct obj *)); E boolean FDECL(allow_category, (struct obj *)); +#ifdef WEBB_BIODIVERSITY +E boolean FDECL(allow_unused, (struct obj *)); +#endif +#ifdef WEBB_MONEY +E boolean FDECL(allow_cash, (struct obj *)); +#endif E boolean FDECL(is_worn_by_type, (struct obj *)); #ifdef USE_TRAMPOLI E int FDECL(ck_bag, (struct obj *)); E int FDECL(in_container, (struct obj *)); @@ -1519,8 +1613,11 @@ E int NDECL(doremove); E int NDECL(dospinweb); E int NDECL(dosummon); E int NDECL(dogaze); +#ifdef WEBB_MCHARM +E int NDECL(docharm); +#endif E int NDECL(dohide); E int NDECL(domindblast); E void FDECL(skinback, (BOOLEAN_P)); E const char *FDECL(mbodypart, (struct monst *,int)); @@ -1636,8 +1733,11 @@ #ifdef USE_TRAMPOLI E void FDECL(set_lit, (int,int,genericptr_t)); #endif E void FDECL(litroom, (BOOLEAN_P,struct obj *)); +#ifdef WEBB_BIODIVERSITY +E void FDECL(litroom_mon, (BOOLEAN_P, struct obj *, int, int)); +#endif E void FDECL(do_genocide, (int)); E void FDECL(punish, (struct obj *)); E void NDECL(unpunish); E boolean FDECL(cant_create, (int *, BOOLEAN_P)); @@ -1816,8 +1916,12 @@ E void FDECL(check_unpaid, (struct obj *)); E void FDECL(costly_gold, (XCHAR_P,XCHAR_P,long)); E boolean FDECL(block_door, (XCHAR_P,XCHAR_P)); E boolean FDECL(block_entry, (XCHAR_P,XCHAR_P)); +#ifdef WEBB_BIODIVERSITY +E long FDECL(get_cost, (struct obj *, struct monst *)); +E int FDECL(buy_minvent, (struct monst *)); +#endif E char *FDECL(shk_your, (char *,struct obj *)); E char *FDECL(Shk_Your, (char *,struct obj *)); /* ### shknam.c ### */ @@ -1855,10 +1959,15 @@ /* ### sp_lev.c ### */ E boolean FDECL(check_room, (xchar *,xchar *,xchar *,xchar *,BOOLEAN_P)); +#ifdef WEBB_ENVIRONMENT +E boolean FDECL(create_room, (XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P, + XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P, uchar)); +#else E boolean FDECL(create_room, (XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P, XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P)); +#endif E void FDECL(create_secret_door, (struct mkroom *,XCHAR_P)); E boolean FDECL(dig_corridor, (coord *,coord *,BOOLEAN_P,SCHAR_P,SCHAR_P)); E void FDECL(fill_room, (struct mkroom *,BOOLEAN_P)); E boolean FDECL(load_special, (const char *)); @@ -1997,8 +2106,12 @@ E void FDECL(seetrap, (struct trap *)); E int FDECL(mintrap, (struct monst *)); E void FDECL(instapetrify, (const char *)); E void FDECL(minstapetrify, (struct monst *,BOOLEAN_P)); +#ifdef WEBB_DISINT +E int FDECL(instadisintegrate, (const char *)); +E int FDECL(minstadisintegrate, (struct monst *)); +#endif E void FDECL(selftouch, (const char *)); E void FDECL(mselftouch, (struct monst *,const char *,BOOLEAN_P)); E void NDECL(float_up); E void FDECL(fill_pit, (int,int)); diff -rwBEN -U4 nethack-3.4.2-test/include/hack.h nethack-3.4.2-diff/include/hack.h --- nethack-3.4.2-test/include/hack.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/hack.h 2003-11-30 09:37:32.000000000 -0600 @@ -73,14 +73,24 @@ #define DISSOLVED 6 #define CRUSHING 7 #define STONING 8 #define TURNED_SLIME 9 +#ifdef WEBB_DISINT +# define DISINTEGRATED 10 +# define GENOCIDED 11 +# define PANICKED 12 +# define TRICKED 13 +# define QUIT 14 +# define ESCAPED 15 +# define ASCENDED 16 +#else #define GENOCIDED 10 #define PANICKED 11 #define TRICKED 12 #define QUIT 13 #define ESCAPED 14 #define ASCENDED 15 +#endif #include "align.h" #include "dungeon.h" #include "monsym.h" @@ -151,8 +161,11 @@ #define USE_INVLET 0x4 /* use object's invlet */ #define INVORDER_SORT 0x8 /* sort objects by packorder */ #define SIGNAL_NOMENU 0x10 /* return -1 rather than 0 if none allowed */ #define FEEL_COCKATRICE 0x20 /* engage cockatrice checks and react */ +#ifdef WEBB_BIODIVERSITY +#define PRICES 0x40 /* print out prices */ +#endif /* Flags to control query_category() */ /* BY_NEXTHERE used by query_category() too, so skip 0x01 */ #define UNPAID_TYPES 0x02 diff -rwBEN -U4 nethack-3.4.2-test/include/monattk.h nethack-3.4.2-diff/include/monattk.h --- nethack-3.4.2-test/include/monattk.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/monattk.h 2003-11-30 09:37:32.000000000 -0600 @@ -23,8 +23,11 @@ #define AT_EXPL 13 /* explodes - proximity */ #define AT_BOOM 14 /* explodes when killed */ #define AT_GAZE 15 /* gaze - ranged */ #define AT_TENT 16 /* tentacles */ +#ifdef WEBB_SATYR +#define AT_NTCH 17 /* adjacent, no touching */ +#endif #define AT_WEAP 254 /* uses weapon */ #define AT_MAGC 255 /* uses magic spell(s) */ @@ -78,8 +81,25 @@ #define AD_SLIM 40 /* turns you into green slime */ #define AD_ENCH 41 /* remove enchantment (disenchanter) */ #define AD_CORR 42 /* corrode armor (black pudding) */ + +#ifdef WEBB_GOLDBUG +#define AD_EGLD 43 /* eats gold (gold bug) */ +#endif +#ifdef WEBB_BIODIVERSITY +#define AD_SCLD 44 /* scald, similar to AD_FIRE */ +#define AD_FLVR 45 /* quark flavour attacks */ +#endif +#ifdef WEBB_MCHARM +#define AD_CHRM 46 /* monster charms you and other monsters */ +#endif +#ifdef WEBB_BIODIVERSITY +#define AD_SHOE 47 /* brownie damages, steals, or fixes shoes */ +#define AD_HNGY 48 /* a mini version of FAMN, should fake a higher + hunger rating instead */ +#endif + #define AD_CLRC 240 /* random clerical spell */ #define AD_SPEL 241 /* random magic spell */ #define AD_RBRE 242 /* random breath weapon */ diff -rwBEN -U4 nethack-3.4.2-test/include/mondata.h nethack-3.4.2-diff/include/mondata.h --- nethack-3.4.2-test/include/mondata.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/mondata.h 2003-11-30 09:37:32.000000000 -0600 @@ -45,8 +45,22 @@ #define nolimbs(ptr) (((ptr)->mflags1 & M1_NOLIMBS) == M1_NOLIMBS) #define notake(ptr) (((ptr)->mflags1 & M1_NOTAKE) != 0L) #define has_head(ptr) (((ptr)->mflags1 & M1_NOHEAD) == 0L) #define has_horns(ptr) (num_horns(ptr) > 0) +#ifdef WEBB_BIODIVERSITY +# define does_rust(ptr) ((ptr) == &mons[PM_IRON_GOLEM] || \ + ((ptr) == &mons[PM_CLOCKWORK_AUTOMATON] && rn2(2))) +# define is_insect(ptr) ((ptr)->mlet == S_ANT || (ptr)->mlet == S_SPIDER ||\ + (ptr)->mlet == S_XAN) + +# define has_bones(ptr) (has_head(ptr) && !(noncorporeal(ptr) || \ + is_insect(ptr) || (ptr)->mlet == S_PIERCER || \ + (ptr)->mlet == S_WORM || (ptr)->mlet == S_WORM_TAIL \ + || (ptr)->mlet == S_XORN || ((ptr)->mlet == S_GOLEM \ + && (ptr) != &mons[PM_FLESH_GOLEM])|| \ + (ptr) == &mons[PM_JELLYFISH] || \ + (ptr) == &mons[PM_KRAKEN])) +#endif #define is_whirly(ptr) ((ptr)->mlet == S_VORTEX || \ (ptr) == &mons[PM_AIR_ELEMENTAL]) #define is_silent(ptr) ((ptr)->msound == MS_SILENT) #define unsolid(ptr) (((ptr)->mflags1 & M1_UNSOLID) != 0L) @@ -157,8 +171,12 @@ #define touch_petrifies(ptr) ((ptr) == &mons[PM_COCKATRICE] || \ (ptr) == &mons[PM_CHICKATRICE]) +#ifdef WEBB_DISINT +# define touch_disintegrates(ptr) ((ptr) == &mons[PM_DISINTEGRATOR]) +#endif + #define is_mind_flayer(ptr) ((ptr) == &mons[PM_MIND_FLAYER] || \ (ptr) == &mons[PM_MASTER_MIND_FLAYER]) #define nonliving(ptr) (is_golem(ptr) || is_undead(ptr) || \ @@ -180,8 +198,15 @@ noncorporeal(ptr)) #define vegetarian(ptr) (vegan(ptr) || \ ((ptr)->mlet == S_PUDDING && \ (ptr) != &mons[PM_BLACK_PUDDING])) +#ifdef WEBB_CARROLL +#define yeasty_food(ptr) ((ptr)->mlet == S_BLOB || \ + (ptr)->mlet == S_JELLY || \ + (ptr)->mlet == S_FUNGUS || \ + (ptr)->mlet == S_PUDDING || \ + (ptr) == &mons[PM_JUIBLEX]) +#endif #define befriend_with_obj(ptr, obj) ((obj)->oclass == FOOD_CLASS && \ is_domestic(ptr)) diff -rwBEN -U4 nethack-3.4.2-test/include/monflag.h nethack-3.4.2-diff/include/monflag.h --- nethack-3.4.2-test/include/monflag.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/monflag.h 2003-11-30 09:37:32.000000000 -0600 @@ -47,8 +47,11 @@ #define MS_PRIEST 36 /* ask for contribution; do cleansing */ #define MS_SPELL 37 /* spellcaster not matching any of the above */ #define MS_WERE 38 /* lycanthrope in human form */ #define MS_BOAST 39 /* giants */ +#ifdef WEBB_AVATAR +#define MS_AVATAR 41 /* special text for the avatar of RNGs */ +#endif #define MR_FIRE 0x01 /* resists fire */ #define MR_COLD 0x02 /* resists cold */ @@ -159,8 +162,12 @@ /* Infravision is currently implemented for players only */ #define M3_INFRAVISION 0x0100 /* has infravision */ #define M3_INFRAVISIBLE 0x0200 /* visible by infravision */ +#ifdef WEBB_AVATAR +#define M3_AVATAR 0x0400 +#endif + #define MZ_TINY 0 /* < 2' */ #define MZ_SMALL 1 /* 2-4' */ #define MZ_MEDIUM 2 /* 4-7' */ #define MZ_HUMAN MZ_MEDIUM /* human-sized */ diff -rwBEN -U4 nethack-3.4.2-test/include/monst.h nethack-3.4.2-diff/include/monst.h --- nethack-3.4.2-test/include/monst.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/monst.h 2003-11-30 09:37:32.000000000 -0600 @@ -96,8 +96,12 @@ Bitfield(mcanmove,1); /* paralysis, similar to mblinded */ Bitfield(mfrozen,7); Bitfield(msleeping,1); /* asleep until woken */ +#ifdef WEBB_MCHARM + Bitfield(mpeacetim,7); /* if non-zero, peacefulness times out, + if 127, expires at monster's choice */ +#endif Bitfield(mstun,1); /* stunned (off balance) */ Bitfield(mconf,1); /* confused */ Bitfield(mpeaceful,1); /* does not attack unprovoked */ Bitfield(mtrapped,1); /* trapped in a pit, web or bear trap */ @@ -170,8 +174,19 @@ /* these are in mspeed */ #define MSLOW 1 /* slow monster */ #define MFAST 2 /* speeded monster */ +#ifdef WEBB_BIODIVERSITY +# define CLOCKWORK_PANIC 20 +# define CLOCKWORK_LOW 400 +# define CLOCKWORK_MED 1000 +# define CLOCKWORK_HIGH 1800 +# define CLOCKWORK_MAX 2000 +# define CLOCKWORK_WIND 50 +#endif + + + #define NAME(mtmp) (((char *)(mtmp)->mextra) + (mtmp)->mxlth) #define MON_WEP(mon) ((mon)->mw) #define MON_NOWEP(mon) ((mon)->mw = (struct obj *)0) diff -rwBEN -U4 nethack-3.4.2-test/include/monsym.h nethack-3.4.2-diff/include/monsym.h --- nethack-3.4.2-test/include/monsym.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/monsym.h 2003-11-30 09:37:32.000000000 -0600 @@ -66,13 +66,25 @@ #define S_GOLEM 55 #define S_DEMON 56 #define S_EEL 57 #define S_LIZARD 58 +#ifdef WEBB_TURTLE +#define S_TURTLE 59 + +#define S_WORM_TAIL 60 +#define S_MIMIC_DEF 61 + +#define MAXMCLASSES 62 /* number of monster classes */ +#else #define S_WORM_TAIL 59 #define S_MIMIC_DEF 60 #define MAXMCLASSES 61 /* number of monster classes */ +#endif + + + #if 0 /* moved to decl.h so that makedefs.c won't see them */ extern const char def_monsyms[MAXMCLASSES]; /* default class symbols */ extern uchar monsyms[MAXMCLASSES]; /* current class symbols */ @@ -138,8 +150,14 @@ #define DEF_GOLEM '\'' #define DEF_DEMON '&' #define DEF_EEL ';' #define DEF_LIZARD ':' +#ifdef WEBB_TURTLE +# if defined(ASCIIGRAPH) +# define IBM_TURTLE 0x1e /* up triangle, LOGO */ +#endif +# define DEF_TURTLE ',' /* what char avaliable in char sets? */ +#endif #define DEF_INVISIBLE 'I' #define DEF_WORM_TAIL '~' #define DEF_MIMIC_DEF ']' diff -rwBEN -U4 nethack-3.4.2-test/include/obj.h nethack-3.4.2-diff/include/obj.h --- nethack-3.4.2-test/include/obj.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/obj.h 2003-11-30 09:37:32.000000000 -0600 @@ -37,8 +37,11 @@ historic and gender for statues */ #define STATUE_HISTORIC 0x01 #define STATUE_MALE 0x02 #define STATUE_FEMALE 0x04 +#ifdef WEBB_ENVIRONMENT +#define STATUE_NONRENAMABLE 0x08 +#endif char oclass; /* object class */ char invlet; /* designation in inventory */ char oartifact; /* artifact array index */ @@ -151,12 +154,23 @@ objects[otmp->otyp].oc_skill <= -P_BOW) #define ammo_and_launcher(otmp,ltmp) \ (is_ammo(otmp) && (ltmp) && \ objects[(otmp)->otyp].oc_skill == -objects[(ltmp)->otyp].oc_skill) +#ifdef WEBB_TREE +# define throwable_nut(otmp) ((otmp->oclass == FOOD_CLASS) && \ + objects[(otmp)->otyp].oc_skill == -P_SLING && \ + !(otmp)->oeaten) +# define is_missile(otmp) ((otmp->oclass == WEAPON_CLASS || \ + throwable_nut(otmp) || \ + otmp->oclass == TOOL_CLASS) && \ + objects[otmp->otyp].oc_skill >= -P_BOOMERANG && \ + objects[otmp->otyp].oc_skill <= -P_DART) +#else #define is_missile(otmp) ((otmp->oclass == WEAPON_CLASS || \ otmp->oclass == TOOL_CLASS) && \ objects[otmp->otyp].oc_skill >= -P_BOOMERANG && \ objects[otmp->otyp].oc_skill <= -P_DART) +#endif #define is_weptool(o) ((o)->oclass == TOOL_CLASS && \ objects[(o)->otyp].oc_skill != P_NONE) #define bimanual(otmp) ((otmp->oclass == WEAPON_CLASS || \ otmp->oclass == TOOL_CLASS) && \ @@ -292,9 +306,19 @@ (otmp)->otyp == RUBBER_HOSE) #else #define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER) #endif +#ifdef WEBB_DISINT +# define oresist_disintegration(obj) \ + (objects[obj->otyp].oc_oprop == DISINT_RES || \ + obj_resists(obj, 5, 50) || is_quest_artifact(obj) ) +# define weight_dmg(i) { \ + i = (i<=100)?1:i/100; \ + i = rnd(i); \ + if(i > 6) i = 6; \ +} +#endif /* helpers, simple enough to be macros */ #define is_plural(o) ((o)->quan > 1 || \ (o)->oartifact == ART_EYES_OF_THE_OVERWORLD) diff -rwBEN -U4 nethack-3.4.2-test/include/objclass.h nethack-3.4.2-diff/include/objclass.h --- nethack-3.4.2-test/include/objclass.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/objclass.h 2003-11-30 09:37:32.000000000 -0600 @@ -66,8 +66,18 @@ #define is_organic(otmp) (objects[otmp->otyp].oc_material <= WOOD) #define is_metallic(otmp) (objects[otmp->otyp].oc_material >= IRON && \ objects[otmp->otyp].oc_material <= MITHRIL) +#ifdef WEBB_GOLDBUG +#define is_golden(otmp) (objects[otmp->otyp].oc_material == GOLD) +#endif +#ifdef WEBB_BIODIVERSITY +#define is_meaty(otmp) ((/*otmp->otyp == MEAT_RING || \ only HCoM rots + otmp->otyp == MEATBALL ||\ + otmp->otyp == MEAT_STICK ||*/ \ + otmp->otyp == HUGE_CHUNK_OF_MEAT)) +#endif + /* primary damage: fire/rust/--- */ /* is_flammable(otmp), is_rottable(otmp) in mkobj.c */ #define is_rustprone(otmp) (objects[otmp->otyp].oc_material == IRON) @@ -171,8 +181,11 @@ #define ROCK_SYM '`' #define BALL_SYM '0' #define CHAIN_SYM '_' #define VENOM_SYM '.' +#ifdef WEBB_MONEY +#define CENT_SYM (char)0x9B +#endif struct fruit { char fname[PL_FSIZ]; int fid; diff -rwBEN -U4 nethack-3.4.2-test/include/rm.h nethack-3.4.2-diff/include/rm.h --- nethack-3.4.2-test/include/rm.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/rm.h 2003-11-30 09:37:32.000000000 -0600 @@ -66,9 +66,16 @@ #define DRAWBRIDGE_DOWN 33 #define AIR 34 #define CLOUD 35 +#ifdef WEBB_ENVIRONMENT +# define SPOOL 36 +# define MAX_TYPE 37 +#else +/* if this every reaches 64, check the sky from + filemap in sp_lev:load_maze -Webb */ #define MAX_TYPE 36 +#endif #define INVALID_TYPE 127 /* * Avoid using the level types in inequalities: @@ -84,9 +91,14 @@ #define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */ #define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM, STAIRS, furniture.. */ #define ZAP_POS(typ) ((typ) >= POOL) #define SPACE_POS(typ) ((typ) > DOOR) +#ifdef WEBB_ENVIRONMENT +#define IS_POOL(typ) (((typ) >= POOL && (typ) <= DRAWBRIDGE_UP) ||\ + (typ) == SPOOL) +#else #define IS_POOL(typ) ((typ) >= POOL && (typ) <= DRAWBRIDGE_UP) +#endif #define IS_THRONE(typ) ((typ) == THRONE) #define IS_FOUNTAIN(typ) ((typ) == FOUNTAIN) #define IS_SINK(typ) ((typ) == SINK) #define IS_GRAVE(typ) ((typ) == GRAVE) @@ -95,8 +107,12 @@ #define IS_FURNITURE(typ) ((typ) >= STAIRS && (typ) <= ALTAR) #define IS_AIR(typ) ((typ) == AIR || (typ) == CLOUD) #define IS_SOFT(typ) ((typ) == AIR || (typ) == CLOUD || IS_POOL(typ)) +#ifdef WEBB_ENVIRONMENT +# define SKY_AT(x, y) (level.flags.skylevel && levl[x][y].rmsky) +#endif + /* * The screen symbols may be the default or defined at game startup time. * See drawing.c for defaults. * Note: {ibm|dec}_graphics[] arrays (also in drawing.c) must be kept in synch. @@ -258,8 +274,19 @@ /* * Trees have more than one kick result. */ +#ifdef WEBB_TREE +# define TREE_TYPE_MASK 0x1C +# define TREE_NONE 0x00 +# define TREE_APPLE 0x04 +# define TREE_ORANGE 0x08 +# define TREE_PEAR 0x0C +# define TREE_BANANA 0x10 +# define TREE_GUM 0x14 /* eucalyptus */ +# define TREE_OAK 0x18 +# define TREE_IRONWD 0x1C /* elven iron wood for elven blades */ +#endif /* WEBB_ENVIRONMENT or not */ #define TREE_LOOTED 1 #define TREE_SWARM 2 /* @@ -339,8 +366,11 @@ Bitfield(lit,1); /* speed hack for lit rooms */ Bitfield(waslit,1); /* remember if a location was lit */ Bitfield(roomno,6); /* room # for special rooms */ Bitfield(edge,1); /* marks boundaries for special rooms*/ +#ifdef WEBB_ENVIRONMENT + Bitfield(rmsky,1); /* no ceiling */ +#endif }; /* * Add wall angle viewing by defining "modes" for each wall type. Each @@ -464,8 +494,11 @@ Bitfield(is_maze_lev,1); Bitfield(is_cavernous_lev,1); Bitfield(arboreal, 1); /* Trees replace rock */ +#ifdef WEBB_ENVIRONMENT + Bitfield(skylevel,1); +#endif }; typedef struct { diff -rwBEN -U4 nethack-3.4.2-test/include/sp_lev.h nethack-3.4.2-diff/include/sp_lev.h --- nethack-3.4.2-test/include/sp_lev.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/sp_lev.h 2003-11-30 09:37:32.000000000 -0600 @@ -21,8 +21,11 @@ #define HARDFLOOR 2 #define NOMMAP 4 #define SHORTSIGHTED 8 #define ARBOREAL 16 +#ifdef WEBB_ENVIRONMENT +#define SKYLEVEL 32 +#endif /* special level types */ #define SP_LEV_ROOMS 1 #define SP_LEV_MAZE 2 @@ -40,8 +43,11 @@ boolean init_present, padding; char fg, bg; boolean smoothed, joined; xchar lit, walled; +#ifdef WEBB_ENVIRONMENT + xchar sky; +#endif } lev_init; typedef struct { xchar x, y, mask; @@ -99,10 +105,21 @@ typedef struct { xchar x1, y1, x2, y2; xchar rtype, rlit, rirreg; +#ifdef WEBB_ENVIRONMENT + xchar rsky; +#endif } region; +#ifdef WEBB_ENVIRONMENT +typedef struct { + xchar x1, y1, x2, y2; + xchar and_type, or_type; + xchar chance; +} trees; +#endif + /* values for rtype are defined in dungeon.h */ typedef struct { struct { xchar x1, y1, x2, y2; } inarea; struct { xchar x1, y1, x2, y2; } delarea; @@ -176,8 +193,12 @@ char nengraving; engraving **engravings; char nfountain; fountain **fountains; +#ifdef WEBB_ENVIRONMENT + char ntrees; + trees **treess; +#endif } mazepart; typedef struct { long flags; @@ -192,8 +213,11 @@ char *parent; xchar x, y, w, h; xchar xalign, yalign; xchar rtype, chance, rlit, filled; +#ifdef WEBB_ENVIRONMENT + xchar rsky; +#endif char ndoor; room_door **doors; char ntrap; trap **traps; @@ -214,8 +238,13 @@ char nsink; sink **sinks; char npool; pool **pools; +#ifdef WEBB_ENVIRONMENT + char ntrees; + trees **treess; +#endif + /* These three fields are only used when loading the level... */ int nsubroom; struct _room *subrooms[MAX_SUBROOMS]; struct mkroom *mkr; diff -rwBEN -U4 nethack-3.4.2-test/include/vision.h nethack-3.4.2-diff/include/vision.h --- nethack-3.4.2-test/include/vision.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/vision.h 2003-11-30 09:37:32.000000000 -0600 @@ -19,8 +19,11 @@ * Light source sources */ #define LS_OBJECT 0 #define LS_MONSTER 1 +#ifdef WEBB_ENGR_LIGHT +#define LS_ENGRAVING 2 +#endif /* * cansee() - Returns true if the hero can see the location. * diff -rwBEN -U4 nethack-3.4.2-test/include/you.h nethack-3.4.2-diff/include/you.h --- nethack-3.4.2-test/include/you.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/you.h 2003-11-30 09:37:32.000000000 -0600 @@ -146,8 +146,24 @@ as well as for character class */ #define ROLE_NONE (-1) #define ROLE_RANDOM (-2) +#ifdef WEBB_ENVIRONMENT +#define ROLE_ARCHEOLOGIST 0 +#define ROLE_BARBARIAN 1 +#define ROLE_CAVEMAN 2 +#define ROLE_HEALER 3 +#define ROLE_KNIGHT 4 +#define ROLE_MONK 5 +#define ROLE_PRIEST 6 +#define ROLE_ROGUE 7 +#define ROLE_RANGER 8 +#define ROLE_SAMURAI 9 +#define ROLE_TOURIST 10 +#define ROLE_VALKYRIE 11 +#define ROLE_WIZARD 12 +#endif + /*** Unified structure specifying race information ***/ struct Race { /*** Strings that name various things ***/ diff -rwBEN -U4 nethack-3.4.2-test/include/youprop.h nethack-3.4.2-diff/include/youprop.h --- nethack-3.4.2-test/include/youprop.h 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/include/youprop.h 2003-11-30 09:37:32.000000000 -0600 @@ -95,10 +95,16 @@ #define Blinded u.uprops[BLINDED].intrinsic #define Blindfolded (ublindf && ublindf->otyp != LENSES) /* ...means blind because of a cover */ +#ifdef WEBB_LAME_MONSTERS +#define Blind ((Blinded || Blindfolded || !haseyes(youmonst.data) \ + || Blemmye_blindness(&youmonst)) \ + && !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD)) +#else #define Blind ((Blinded || Blindfolded || !haseyes(youmonst.data)) && \ !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD)) +#endif /* ...the Eyes operate even when you really are blind or don't have any eyes */ #define Sick u.uprops[SICK].intrinsic diff -rwBEN -U4 nethack-3.4.2-test/src/Makefile nethack-3.4.2-diff/src/Makefile --- nethack-3.4.2-test/src/Makefile 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/src/Makefile 2003-11-30 09:37:32.000000000 -0600 @@ -79,12 +79,13 @@ # and flex), comment out the upper two macros and uncomment # the lower two. # -DO_YACC = YACC_MSG -DO_LEX = LEX_MSG -#DO_YACC = YACC_ACT -#DO_LEX = LEX_ACT +#DO_YACC = YACC_MSG +#DO_LEX = LEX_MSG +DO_YACC = YACC_ACT +DO_LEX = LEX_ACT +# the above change was made for cygwin for WEBB_ENVIRONMENT # - Specify your yacc and lex programs (or work-alikes) here. #YACC = bison -y @@ -100,11 +101,11 @@ FLEXSKEL = #FLEXSKEL = -S../tools/flex.ske -YTABC = y_tab.c -YTABH = y_tab.h -LEXYYC = lexyy.c +YTABC = y.tab.c +YTABH = y.tab.h +LEXYYC = lex.yy.c # # Optional high-quality BSD random number generation routines # (see pcconf.h). Set to nothing if not used. @@ -352,9 +353,9 @@ VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o VOBJ10 = $(O)mail.o $(O)pcmain.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o -VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)minion.o $(O)mklev.o +VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)miditest.o $(O)minion.o $(O)mklev.o VOBJ12 = $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o $(O)mkroom.o VOBJ13 = $(O)mon.o $(O)mondata.o $(O)monmove.o $(O)monst.o VOBJ14 = $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o VOBJ15 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o @@ -929,8 +930,9 @@ echo license >>dlb.lst for %%N in (*.lev) do echo %%N >>dlb.lst $(U)dlb_main cIf dlb.lst $(SRC)\nhdat cd $(SRC) + copy nhdat $(GAMEDIR) #========================================== # Recover Utility #========================================== diff -rwBEN -U4 nethack-3.4.2-test/src/botl.c nethack-3.4.2-diff/src/botl.c --- nethack-3.4.2-test/src/botl.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/botl.c 2003-11-30 09:37:32.000000000 -0600 @@ -6,8 +6,12 @@ #ifdef OVL0 extern const char *hu_stat[]; /* defined in eat.c */ +#ifdef WEBB_BIODIVERSITY +extern const char * cahu_stat[]; /* also defined in eat.c */ +#endif + const char * const enc_stat[] = { "", "Burdened", "Stressed", @@ -276,8 +280,13 @@ if(flags.time) Sprintf(nb = eos(nb), " T:%ld", moves); if(strcmp(hu_stat[u.uhs], " ")) { Sprintf(nb = eos(nb), " "); +#ifdef WEBB_BIODIVERSITY + if(Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON]) + Strcat(newbot2, cahu_stat[u.uhs]); + else +#endif Strcat(newbot2, hu_stat[u.uhs]); } if(Confusion) Sprintf(nb = eos(nb), " Conf"); if(Sick) { diff -rwBEN -U4 nethack-3.4.2-test/src/cmd.c nethack-3.4.2-diff/src/cmd.c --- nethack-3.4.2-test/src/cmd.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/cmd.c 2003-11-30 09:37:32.000000000 -0600 @@ -122,8 +122,9 @@ STATIC_PTR int NDECL(wiz_show_seenv); STATIC_PTR int NDECL(wiz_show_vision); STATIC_PTR int NDECL(wiz_mon_polycontrol); STATIC_PTR int NDECL(wiz_show_wmodes); +STATIC_PTR int NDECL(wiz_info); #if defined(__BORLANDC__) && !defined(_WIN32) extern void FDECL(show_borlandc_stats, (winid)); #endif STATIC_DCL void FDECL(count_obj, (struct obj *, long *, long *, BOOLEAN_P, BOOLEAN_P)); @@ -447,8 +448,12 @@ { if (can_breathe(youmonst.data)) return dobreathe(); else if (attacktype(youmonst.data, AT_SPIT)) return dospit(); else if (youmonst.data->mlet == S_NYMPH) return doremove(); +#ifdef WEBB_MCHARM + else if (attacktype_fordmg(youmonst.data, AT_ANY, AD_CHRM)) + return docharm(); +#endif else if (attacktype(youmonst.data, AT_GAZE)) return dogaze(); else if (is_were(youmonst.data)) return dosummon(); else if (webmaker(youmonst.data)) return dospinweb(); else if (is_hider(youmonst.data)) return dohide(); @@ -752,8 +757,21 @@ destroy_nhwindow(win); return 0; } +/*^Y defineable info function INFO */ +int +wiz_info(){ + register int tx, ty; + struct monst * mtmp; + if (!getdir("arm whom?")) + return 0; + tx = u.ux+u.dx; ty = u.uy+u.dy; + mtmp = m_at(tx, ty); + (void) mongets(mtmp, SCIMITAR); + + return 1; +} #endif /* WIZARD */ /* -enlightenment and conduct- */ @@ -1362,8 +1380,9 @@ {C('t'), TRUE, dotele}, #ifdef WIZARD {C('v'), TRUE, wiz_level_tele}, {C('w'), TRUE, wiz_wish}, + {C('y'), TRUE, wiz_info}, #endif {C('x'), TRUE, doattributes}, #ifdef SUSPEND {C('z'), TRUE, dosuspend}, diff -rwBEN -U4 nethack-3.4.2-test/src/dbridge.c nethack-3.4.2-diff/src/dbridge.c --- nethack-3.4.2-test/src/dbridge.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dbridge.c 2003-11-30 09:37:32.000000000 -0600 @@ -40,9 +40,13 @@ schar ltyp; if (!isok(x,y)) return FALSE; ltyp = levl[x][y].typ; - if (ltyp == POOL || ltyp == MOAT || ltyp == WATER) return TRUE; + if (ltyp == POOL || ltyp == MOAT || ltyp == WATER +#ifdef WEBB_ENVIRONMENT + || ltyp == SPOOL +#endif + ) return TRUE; if (ltyp == DRAWBRIDGE_UP && (levl[x][y].drawbridgemask & DB_UNDER) == DB_MOAT) return TRUE; return FALSE; } diff -rwBEN -U4 nethack-3.4.2-test/src/detect.c nethack-3.4.2-diff/src/detect.c --- nethack-3.4.2-test/src/detect.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/detect.c 2003-11-30 09:37:32.000000000 -0600 @@ -602,9 +602,19 @@ show_glyph(mtmp->mx,mtmp->my,mon_to_glyph(mtmp)); if (otmp && otmp->cursed && (mtmp->msleeping || !mtmp->mcanmove)) { mtmp->msleeping = mtmp->mfrozen = 0; +#ifdef WEBB_TURTLES + if(mtmp->data->mlet != S_TURTLE || !(mtmp->mflee))) +#endif mtmp->mcanmove = 1; +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !mtmp->mspec_used){ + mtmp->mfrozen = 1; + mtmp->mcanmove = 0; + } +#endif woken = TRUE; } } display_self(); @@ -892,8 +902,13 @@ if (lev->typ == SCORR) { lev->typ = CORR; unblock_point(x,y); } +#ifdef WEBB_ENVIRONMENT + else if (lev->typ == SPOOL) { + lev->typ = POOL; + } +#endif /* if we don't remember an object or trap there, map it */ if (lev->typ == ROOM ? (glyph_is_cmap(lev->glyph) && !glyph_is_trap(lev->glyph) && @@ -986,8 +1001,15 @@ unblock_point(zx,zy); magic_map_background(zx, zy, 0); newsym(zx, zy); (*(int*)num)++; +#ifdef WEBB_ENVIRONMENT + } else if(levl[zx][zy].typ == SPOOL) { + levl[zx][zy].typ = POOL; + magic_map_background(zx, zy, 0); + newsym(zx, zy); + (*(int*)num)++; +#endif } else if ((ttmp = t_at(zx, zy)) != 0) { if(!ttmp->tseen && ttmp->ttyp != STATUE_TRAP) { ttmp->tseen = 1; newsym(zx,zy); @@ -1172,8 +1194,16 @@ unblock_point(x,y); /* vision */ exercise(A_WIS, TRUE); nomul(0); newsym(x,y); +#ifdef WEBB_ENVIRONMENT + } else if(levl[x][y].typ == SPOOL) { + if(rnl(7-fund)) continue; + levl[x][y].typ = POOL; + exercise(A_WIS, TRUE); + nomul(0); + newsym(x,y); +#endif } else { /* Be careful not to find anything in an SCORR or SDOOR */ if((mtmp = m_at(x, y)) && !aflag) { if(mtmp->m_ap_type) { diff -rwBEN -U4 nethack-3.4.2-test/src/dig.c nethack-3.4.2-diff/src/dig.c --- nethack-3.4.2-test/src/dig.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dig.c 2003-11-30 09:37:32.000000000 -0600 @@ -213,8 +213,11 @@ register xchar dpx = digging.pos.x, dpy = digging.pos.y; register boolean ispick = uwep && is_pick(uwep); const char *verb = (!uwep || is_pick(uwep)) ? "dig into" : "chop through"; +#ifdef WEBB_TREE + char buf[40]; /* blah blah ironwood tree. */ +#endif lev = &levl[dpx][dpy]; /* perhaps a nymph stole your pick-axe while you were busy digging */ /* or perhaps you teleported away */ @@ -335,9 +338,14 @@ goto cleanup; } } if (IS_TREE(lev->typ)) { +#ifdef WEBB_TREE + Sprintf(buf,"You cut down the %s.", rmname(lev)); + digtxt = buf; +#else digtxt = "You cut down the tree."; +#endif lev->typ = ROOM; if (!rn2(5)) (void) rnd_treefruit_at(dpx, dpy); } else { digtxt = "You succeed in cutting away some rock."; @@ -424,8 +432,11 @@ } else if (!IS_ROCK(lev->typ) && dig_target == DIGTYP_ROCK) return(0); /* statue or boulder got taken */ if(!did_dig_msg) { You("hit the %s with all your might.", +#ifdef WEBB_TREE + (IS_TREE(lev->typ))?rmname(lev): +#endif d_target[dig_target]); did_dig_msg = TRUE; } } @@ -496,9 +507,13 @@ /* these furniture checks were in dighole(), but wand breaking bypasses that routine and calls us directly */ if (IS_FOUNTAIN(lev->typ)) { +#ifdef WEBB_WATERSPOUT_GARGOYLE + dogushforth(FALSE, u.ux, u.uy); +#else dogushforth(FALSE); +#endif SET_FOUNTAIN_WARNED(x,y); /* force dryup */ dryup(x, y, madeby_u); return; #ifdef SINKS @@ -1044,9 +1059,13 @@ if (IS_DOOR(lev->typ)) str = "door"; else if (IS_TREE(lev->typ)) +#ifdef WEBB_TREE + str = rmname(lev); +#else str = "tree"; +#endif else if (IS_ROCK(lev->typ)) str = "wall"; else str = "fountain"; @@ -1124,9 +1143,16 @@ (void) rnd_treefruit_at(mtmp->mx, mtmp->my); } else { here->typ = CORR; if (pile && pile < 5) - (void) mksobj_at((pile == 1) ? BOULDER : ROCK, + (void) mksobj_at((pile == 1) ? +#ifdef WEBB_BIODIVERSITY + (mtmp->data==&mons[PM_HUNGER_HULK])? HUGE_CHUNK_OF_MEAT: + BOULDER : + (mtmp->data==&mons[PM_HUNGER_HULK])? MEATBALL : ROCK, +#else + BOULDER : ROCK, +#endif mtmp->mx, mtmp->my, TRUE, FALSE); } newsym(mtmp->mx, mtmp->my); if (!sobj_at(BOULDER, mtmp->mx, mtmp->my)) @@ -1169,9 +1195,13 @@ return; } /* swallowed */ if (u.dz) { - if (!Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz) && !Underwater) { + if (!Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz) && !Underwater +#ifdef WEBB_ENVIRONMENT + && (!SKY_AT(u.ux, u.uy)) +#endif + ) { if (u.dz < 0 || On_stairs(u.ux, u.uy)) { if (On_stairs(u.ux, u.uy)) pline_The("beam bounces off the %s and hits the %s.", (u.ux == xdnladder || u.ux == xupladder) ? @@ -1236,9 +1266,13 @@ if (!(room->wall_info & W_NONDIGGABLE)) { room->typ = ROOM; unblock_point(zx,zy); /* vision */ } else if (!Blind) +#ifdef WEBB_TREE + pline_The("%s shudders but is unharmed.", rmname(room)); +#else pline_The("tree shudders but is unharmed."); +#endif break; } else if (room->typ == STONE || room->typ == SCORR) { if (!(room->wall_info & W_NONDIGGABLE)) { room->typ = CORR; @@ -1423,8 +1457,12 @@ if (on_floor) { x = obj->ox; y = obj->oy; +#ifdef WEBB_BIODIVERSITY + if (obj->owt>1000 && !rn2((2000 - obj->owt)/30) ) + mkclass('X',G_NOGEN); /* otyugh */ +#endif } else if (in_invent) { if (flags.verbose) { char *cname = corpse_xname(obj, FALSE); Your("%s%s %s away%c", @@ -1439,8 +1477,13 @@ stop_occupation(); } else if (obj == uquiver) { uqwepgone(); stop_occupation(); +#ifdef WEBB_BIODIVERSITY + } else if (obj->owornmask & W_RING) { + Ring_off(obj); + stop_occupation(); +#endif } } else if (obj->where == OBJ_MINVENT && obj->owornmask) { if (obj == MON_WEP(obj->ocarry)) { setmnotwielded(obj->ocarry,obj); diff -rwBEN -U4 nethack-3.4.2-test/src/display.c nethack-3.4.2-diff/src/display.c --- nethack-3.4.2-test/src/display.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/display.c 2003-11-30 09:37:32.000000000 -0600 @@ -1393,8 +1393,11 @@ case SCORR: case STONE: idx = level.flags.arboreal ? S_tree : S_stone; break; +#ifdef WEBB_ENVIRONMENT + case SPOOL: +#endif case ROOM: idx = S_room; break; case CORR: idx = (ptr->waslit || flags.lit_corridor) ? S_litcorr : S_corr; break; @@ -1555,8 +1558,11 @@ "DOOR", "CORR", "ROOM", "STAIRS", "LADDER", "FOUNTAIN", "THRONE", "SINK", "ALTAR", "ICE", "DRAWBRIDGE_DOWN","AIR", "CLOUD" +#ifdef WEBB_ENVIRONMENT + , "SPOOL" +#endif }; static const char * diff -rwBEN -U4 nethack-3.4.2-test/src/do.c nethack-3.4.2-diff/src/do.c --- nethack-3.4.2-test/src/do.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/do.c 2003-11-30 09:37:32.000000000 -0600 @@ -99,8 +99,11 @@ There("is a large splash as %s %s the %s.", the(xname(otmp)), fills_up? "fills":"falls into", lava ? "lava" : ltyp==POOL ? "pool" : +#ifdef WEBB_ENVIRONMENT + ltyp == SPOOL? "hidden quagmire" : +#endif moat ? "moat" : "water"); } else if (flags.soundok) You_hear("a%s splash.", lava ? " sizzling" : ""); wake_nearto(rx, ry, 40); @@ -745,8 +748,18 @@ return(0); } else #endif if (Levitation) { +#ifdef WEBB_MUTATED_MONST + if (ELevitation & W_ARMF){ + if ( (uarm && (uarm->otyp == LUNG_DRAGON_SCALE_MAIL || + uarm->otyp == LUNG_DRAGON_SCALES) && !uarm->cursed) + && !uarmf->cursed){ + if (float_down(TIMEOUT, W_ARMF)) + return (1); /* came down, so moved */ + } + } +#endif if ((HLevitation & I_SPECIAL) || (ELevitation & W_ARTI)) { /* end controlled levitation */ if (ELevitation & W_ARTI) { struct obj *obj; @@ -812,8 +825,20 @@ int doup() { +#ifdef WEBB_MUTATED_MONST + if (!Levitation){ + if ( (uarm && (uarm->otyp == LUNG_DRAGON_SCALE_MAIL || + uarm->otyp == LUNG_DRAGON_SCALES)) + && (uarmf && uarmf->otyp == LEVITATION_BOOTS )){ + ELevitation &= W_ARMF; + float_up(); + spoteffects(FALSE); + return (1); /* went up, so moved */ + } + } +#endif if( (u.ux != xupstair || u.uy != yupstair) && (!xupladder || u.ux != xupladder || u.uy != yupladder) && (!sstairs.sx || u.ux != sstairs.sx || u.uy != sstairs.sy || !sstairs.up) diff -rwBEN -U4 nethack-3.4.2-test/src/do_name.c nethack-3.4.2-diff/src/do_name.c --- nethack-3.4.2-test/src/do_name.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/do_name.c 2003-11-30 09:37:32.000000000 -0600 @@ -220,8 +220,19 @@ replmon(mtmp,mtmp2); return(mtmp2); } +#ifdef WEBB_BIODIVERSITY +void +introduce_mons(mtmp) +struct monst * mtmp; +{ + char * name = NAME(mtmp); + if (name && (uchar) name[0] >= (uchar)0x80) + name[0] &= 0x7F; +} +#endif + int do_mname() { char buf[BUFSZ]; @@ -320,8 +331,18 @@ pline("While engraving your %s slips.", body_part(HAND)); display_nhwindow(WIN_MESSAGE, FALSE); You("engrave: \"%s\".",buf); } +#ifdef WEBB_ENVIRONMENT + if (obj->otyp == STATUE && (obj->spe & STATUE_NONRENAMABLE)){ + if (strcmp(buf,ONAME(obj))) + if (obj->spe & STATUE_HISTORIC) + You_feel("history would not agree with you renaming this statue %s.", buf); + else + You("decide %s isn't a good name for this statue after all.", buf); + return; + } +#endif obj = oname(obj, buf); } /* @@ -547,8 +568,68 @@ { return rn2(7) ? ghostnames[rn2(SIZE(ghostnames))] : (const char *)plname; } +#ifdef WEBB_BIODIVERSITY +static const char * qmnames[] = { + "\302uckaroo", /* B. Bonzai */ + "\304ick", /* D. Feynman */ + "\305rwin", /* E. Schroedinger */ + "\314ouis", /* L. de Broglie */ + "\315ax", /* M. Born, M. Plank */ + "\316iels", /* N. Bohr */ + "\320ascual", /* P. Jordan */ + "\320aul", /* P. Dirac */ + "\323am", /* S. Beckett */ + "\323atyen", /* Satyendra Bose */ + "\327erner", /* W. Heisenberg */ + "\327olfgang", /* W. Pauli */ + + "\315arie", /* M. Curie */ + "\314ise", /* L. Meitner */ +}; + +static const char * canames[] = { + "\303tsesibus", /* C. built Waterclocks/Organs 270BC */ + "\301lbertus", /* A. Magnus created automaton servent c1200 */ + "\305ustorgio", /* E. church housing early weight driven clock c1270 */ + "\314eo", /* L. da Vinci, designed mechanical calc 1500s */ + "\327ilhelm", /* W. Schickard, built Calculating Clock 1623 */ + "\302laise", /* B. Pascal, built Pascaline 1642*/ + "\303hristiaan",/* C. Huygens, Pendulum Clock 1656, improved Spring clock */ + "\307ottfried", /* G. von Leibniz, built Step Reckoner 1673*/ + "\303harles", /* C. Babbage, Difference Engine 1822, Analytic Eng. 1823 */ + "\310ermann", /* H. Hollerith, Punch Card Tabulating Machine 1890 */ + "\327arren", /* W. Marrison, Quartz Clock 1927 */ + "\301lan", /* A. Turing, theorized Turing Machine c1938 */ + "\310oward", /* H. Aiken, Mark I, Mark II 1943-6 */ + + "\303lepsydra", /* C. name of Waterclock c1400BC */ + "\301da", /* A. Lovelace, first programmer, Analytic Eng. 1823 */ + "\307race", /* G. Hopper, Mark II, invented compilers */ + "\306utura", /* Metropolis */ + "\322achel" /* Bladerunner */ +}; + +const char * +rndqname(qtype, gender) +int qtype, gender; +{ + char * empty = ""; + if (qtype == PM_QUANTUM_MECHANIC){ + if (gender) /* history is not kind in recognizing women */ + return (rn2(3))?empty:qmnames[SIZE(qmnames)-rnd(2)]; + return ((rn2(3))?qmnames[rn2(SIZE(qmnames)-2)]:empty); + } else if (qtype == PM_CLOCKWORK_AUTOMATON){ + if (gender) + return (rn2(3))?empty:canames[SIZE(canames)-rnd(5)]; /* Clep. - end */ + return (rn2(3))?canames[rn2(SIZE(canames)-5)]:empty; + } else + return empty; +} +#endif + + /* Monster naming functions: * x_monnam is the generic monster-naming function. * seen unseen detected named * mon_nam: the newt it the invisible orc Fido @@ -592,8 +673,15 @@ struct permonst *mdat = mtmp->data; boolean do_hallu, do_invis, do_it, do_saddle; boolean name_at_start, has_adjectives; char *bp; +#ifdef WEBB_BIODIVERSITY + char *name = NAME(mtmp); + const char * mname = (mdat != &mons[PM_WIZARD_OF_YENDOR] && + mtmp->m_ap_type == M_AP_MONSTER)? + mons[mtmp->mappearance].mname : + mdat->mname; +#endif if (program_state.gameover) suppress |= SUPPRESS_HALLUCINATION; if (article == ARTICLE_YOUR && !mtmp->mtame) @@ -680,16 +768,26 @@ /* Be sure to remember whether the buffer starts with a name */ if (do_hallu) { Strcat(buf, rndmonnam()); name_at_start = FALSE; +#ifndef WEBB_BIODIVERSITY } else if (mtmp->mnamelth) { char *name = NAME(mtmp); +#else + } else if (mtmp->mnamelth && (uchar)name[0]<(uchar)0x80) { +#endif if (mdat == &mons[PM_GHOST]) { Sprintf(eos(buf), "%s ghost", s_suffix(name)); name_at_start = TRUE; } else if (called) { - Sprintf(eos(buf), "%s called %s", mdat->mname, name); + Sprintf(eos(buf), "%s called %s", +#ifdef WEBB_BIODIVERSITY + mname, +#else + mdat->mname, +#endif + name); name_at_start = (boolean)type_is_pname(mdat); } else if (is_mplayer(mdat) && (bp = strstri(name, " the ")) != 0) { /* the */ char pbuf[BUFSZ]; @@ -713,9 +811,15 @@ (boolean)mtmp->female)); Strcat(buf, lcase(pbuf)); name_at_start = FALSE; } else { - Strcat(buf, mdat->mname); + Strcat(buf, +#ifdef WEBB_BIODIVERSITY + mname +#else + mdat->mname +#endif + ); name_at_start = (boolean)type_is_pname(mdat); } if (name_at_start && (article == ARTICLE_YOUR || !has_adjectives)) { @@ -958,8 +1062,17 @@ if (name >= SPECIAL_PM) return bogusmons[name - SPECIAL_PM]; return mons[name].mname; } +#ifdef WEBB_ENVIRONMENT +const char * +rndhalmonnam() +{ + return bogusmons[rn2(SIZE(bogusmons))]; + +} +#endif + #ifdef REINCARNATION const char * roguename() /* Name of a Rogue player */ { @@ -1038,7 +1151,65 @@ mtmp->mcan ? coynames[SIZE(coynames)-1] : coynames[rn2(SIZE(coynames)-1)]); } return buf; } + +#ifdef WEBB_TREE +extern const int treefruits[]; + +char * +rmname(lev) +struct rm * lev; +{ + int ttyp = lev->flags & TREE_TYPE_MASK; + if (lev->typ != TREE) + return ""; + if (Hallucination) + switch (rn2(8)){ + case 0: + return "shrubbery"; /* Monty Python */ + case 1: + return "binary tree"; /* data structure */ + case 2: + return "truffula tree"; /* Dr. Seuss' The Lorax */ + case 3: + return "Tannenbaum"; /* Christmas song */ + case 4: + return "spaghetti and meatball tree"; /* Tom Glazer */ + case 5: + return "bonsai tree"; + case 6: + return "gumdrop tree"; /* lyric variation from "Kookaburra" */ + case 7: + { + char * buf = fruitname(1); + sprintf(buf+strlen(buf)-5, "tree"); + return buf; + } + } + + switch (ttyp){ + case 0: + return "tree"; + case TREE_GUM: + return "eucalyptus tree"; + case TREE_OAK: + return "oak tree"; + case TREE_IRONWD: + return "elven dogwood"; + case TREE_APPLE: + return "apple tree"; + case TREE_ORANGE: + return "orange tree"; + case TREE_PEAR: + return "pear tree"; + case TREE_BANANA: + return "banana tree"; + } + return "bad tree type"; +} +#endif + + #endif /* OVL2 */ /*do_name.c*/ diff -rwBEN -U4 nethack-3.4.2-test/src/do_wear.c nethack-3.4.2-diff/src/do_wear.c --- nethack-3.4.2-test/src/do_wear.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/do_wear.c 2003-11-30 09:37:32.000000000 -0600 @@ -42,9 +42,11 @@ WORN_BOOTS, W_SWAPWEP, W_QUIVER, 0L }; STATIC_DCL void FDECL(on_msg, (struct obj *)); STATIC_PTR int NDECL(Armor_on); +#ifndef WEBB_BIODIVERSITY STATIC_PTR int NDECL(Boots_on); +#endif STATIC_DCL int NDECL(Cloak_on); STATIC_PTR int NDECL(Helmet_on); STATIC_PTR int NDECL(Gloves_on); STATIC_DCL void NDECL(Amulet_on); @@ -85,9 +87,11 @@ * The Type_on() functions should be called *after* setworn(). * The Type_off() functions call setworn() themselves. */ +#ifndef WEBB_BIODIVERSITY STATIC_PTR +#endif int Boots_on() { long oldprop = @@ -122,8 +126,17 @@ if (!oldprop && !(HFumbling & ~TIMEOUT)) incr_itimeout(&HFumbling, rnd(20)); break; case LEVITATION_BOOTS: +#ifdef WEBB_MUTATED_MONST + if (!uarmf->cursed && uarm && + (uarm->otyp == LUNG_DRAGON_SCALES || + uarm->otyp == LUNG_DRAGON_SCALE_MAIL) && + uarm->blessed){ + You_feel("light-footed."); + break; + } +#endif if (!oldprop && !HLevitation) { makeknown(uarmf->otyp); float_up(); spoteffects(FALSE); @@ -243,11 +256,22 @@ { int otyp = uarmc->otyp; long oldprop = u.uprops[objects[otyp].oc_oprop].extrinsic & ~WORN_CLOAK; +#ifdef WEBB_LAME_MONSTERS + int was_blind = Blemmye_blindness(&youmonst); +#endif /* For mummy wrapping, taking it off first resets `Invisible'. */ setworn((struct obj *)0, W_ARMC); +#ifdef WEBB_LAME_MONSTERS + if (!Blind && was_blind) { + if (flags.verbose) You("can see again."); + if (Blind_telepat || Infravision) see_monsters(); + vision_full_recalc = 1; /* recalc vision limits */ + flags.botl = 1; + } +#endif switch (otyp) { case ELVEN_CLOAK: case ORCISH_CLOAK: case DWARVISH_CLOAK: @@ -508,16 +532,47 @@ STATIC_PTR int Armor_on() { +#ifdef WEBB_MUTATED_MONST + if (uarmf && uarmf->otyp == LEVITATION_BOOTS && + uarm && !uarm->cursed && + (uarm->otyp == LUNG_DRAGON_SCALE_MAIL || + uarm->otyp == LUNG_DRAGON_SCALES)) + You_feel("your loftiness is tempered."); +#endif return 0; } int Armor_off() { +#ifdef WEBB_LAME_MONSTERS + int was_blind = Blemmye_blindness(&youmonst); +#endif +#ifdef WEBB_MUTATED_MONST + if (uarm->otyp == LUNG_DRAGON_SCALE_MAIL || + uarm->otyp == LUNG_DRAGON_SCALES){ + if (Levitation && !uarm->cursed && !Is_airlevel(&u.uz)) + You("pine for terra firma."); + else if(!Levitation && uarmf && uarmf->otyp == LEVITATION_BOOTS){ + ELevitation &= W_ARMF; + float_up(); + spoteffects(FALSE); + } + } +#endif setworn((struct obj *)0, W_ARM); cancelled_don = FALSE; +#ifdef WEBB_LAME_MONSTERS + if (!Blind && was_blind) { + if (flags.verbose) You("can see again."); + if (Blind_telepat || Infravision) see_monsters(); + vision_full_recalc = 1; /* recalc vision limits */ + flags.botl = 1; + } +#endif + return 0; } /* The gone functions differ from the off functions in that if you die from @@ -525,10 +580,21 @@ */ int Armor_gone() { +#ifdef WEBB_LAME_MONSTERS + int was_blind = Blemmye_blindness(&youmonst); +#endif setnotworn(uarm); cancelled_don = FALSE; +#ifdef WEBB_LAME_MONSTERS + if (!Blind && was_blind) { + if (flags.verbose) You("can see again."); + if (Blind_telepat || Infravision) see_monsters(); + vision_full_recalc = 1; /* recalc vision limits */ + flags.botl = 1; + } +#endif return 0; } STATIC_OVL void @@ -924,8 +990,28 @@ flags.botl = 1; } } +#ifdef WEBB_LAME_MONSTERS +int +Blemmye_blindness(mon) +register struct monst * mon; +{ + struct obj * otmp; + if (mon->data != &mons[PM_BLEMMYE]) return 0; +#ifdef TOURIST + otmp = (mon == &youmonst) ? uarmu : which_armor(mon, W_ARMU); + if (otmp && otmp->otyp == T_SHIRT) return 1; +#endif + otmp = (mon == &youmonst) ? uarm : which_armor(mon, W_ARM); + if (otmp && (otmp->otyp != CRYSTAL_PLATE_MAIL)) return 1; + otmp = (mon == &youmonst) ? uarmc : which_armor(mon, W_ARMC); + if (otmp && (otmp->otyp == ROBE || otmp->otyp == ALCHEMY_SMOCK + || strcmp(OBJ_NAME(objects[otmp->otyp]), "ornamental cope"))) return 1; + return 0; +} +#endif + /* called in main to set intrinsics of worn start-up items */ void set_wear() { @@ -1217,8 +1303,12 @@ if (noisy) pline_The("%s won't fit over your horn%s.", c_helmet, plur(num_horns(youmonst.data))); err++; +#ifdef WEBB_LAME_MONSTERS + } else if (Upolyd && !has_head(youmonst.data)) { + You("cannot wear %s, because you have no head."); +#endif } else *mask = W_ARMH; } else if (is_shield(otmp)) { if (uarms) { @@ -1324,8 +1414,11 @@ { struct obj *otmp; int delay; long mask = 0; +#ifdef WEBB_LAME_MONSTERS + int was_blind = Blemmye_blindness(&youmonst); +#endif /* cantweararm checks for suits of armor */ /* verysmall or nohands checks for shields, gloves, etc... */ if ((verysmall(youmonst.data) || nohands(youmonst.data))) { @@ -1367,13 +1460,22 @@ if(is_boots(otmp)) afternmv = Boots_on; if(is_helmet(otmp)) afternmv = Helmet_on; if(is_gloves(otmp)) afternmv = Gloves_on; if(otmp == uarm) afternmv = Armor_on; +#ifdef WEBB_LAME_MONSTERS + if (!was_blind && Blemmye_blindness(&youmonst)) + nomovemsg = "You finish your dressing maneuver. You can no longer see."; + else +#endif nomovemsg = "You finish your dressing maneuver."; } else { if(is_cloak(otmp)) (void) Cloak_on(); /* if(is_shield(otmp)) (void) Shield_on(); */ on_msg(otmp); +#ifdef WEBB_LAME_MONSTERS + if (!was_blind && Blemmye_blindness(&youmonst)) + You("can no longer see."); +#endif } takeoff_mask = taking_off = 0L; return(1); } @@ -1825,10 +1927,23 @@ #ifdef TOURIST } else if (taking_off == WORN_SHIRT) { otmp = uarmu; if(!cursed(otmp)) +#ifdef WEBB_LAME_MONSTERS + { + int was_blind = Blind; setworn((struct obj *)0, uarmu->owornmask & W_ARMOR); -#endif + if (!Blind && was_blind) { + if (flags.verbose) You("can see again."); + if (Blind_telepat || Infravision) see_monsters(); + vision_full_recalc = 1; /* recalc vision limits */ + flags.botl = 1; + } + } +#else + setworn((struct obj *)0, uarmu->owornmask & W_ARMOR); +#endif /* Lame monsters */ +#endif /* tourist */ } else if (taking_off == WORN_AMUL) { otmp = uamul; if(!cursed(otmp)) Amulet_off(); } else if (taking_off == LEFT_RING) { diff -rwBEN -U4 nethack-3.4.2-test/src/dog.c nethack-3.4.2-diff/src/dog.c --- nethack-3.4.2-test/src/dog.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dog.c 2003-11-30 09:37:34.000000000 -0600 @@ -389,16 +389,27 @@ if (mtmp->mblinded) { if (imv >= (int) mtmp->mblinded) mtmp->mblinded = 1; else mtmp->mblinded -= imv; } - if (mtmp->mfrozen) { + if (mtmp->mfrozen +#ifdef WEBB_BIODIVERSITY + && (mtmp->data != &mons[PM_CLOCKWORK_AUTOMATON] || + !mtmp->mspec_used) +#endif + ) { if (imv >= (int) mtmp->mfrozen) mtmp->mfrozen = 1; else mtmp->mfrozen -= imv; } if (mtmp->mfleetim) { if (imv >= (int) mtmp->mfleetim) mtmp->mfleetim = 1; else mtmp->mfleetim -= imv; } +#ifdef WEBB_MCHARM + if (mtmp->mpeacetim && (mtmp->mpeacetim!=0x7f)) { + if (imv >= (int) mtmp->mpeacetim) mtmp->mpeacetim = 1; + else mtmp->mpeacetim -= imv; + } +#endif /* might recover from temporary trouble */ if (mtmp->mtrapped && rn2(imv + 1) > 40/2) mtmp->mtrapped = 0; if (mtmp->mconf && rn2(imv + 1) > 50/2) mtmp->mconf = 0; @@ -656,21 +667,33 @@ case CORPSE: if ((peek_at_iced_corpse_age(obj) + 50L <= monstermoves && obj->corpsenm != PM_LIZARD && obj->corpsenm != PM_LICHEN +#ifdef WEBB_BIODIVERSITY + && mon->data != &mons[PM_OTYUGH] +#endif && mon->data->mlet != S_FUNGUS) || (acidic(&mons[obj->corpsenm]) && !resists_acid(mon)) || (poisonous(&mons[obj->corpsenm]) && !resists_poison(mon))) return POISON; else if (vegan(fptr)) return (herbi ? CADAVER : MANFOOD); +#ifdef WEBB_BIODIVERSITY + else if (obj->corpsenm == PM_FLOATING_EYE && + mon->data == &mons[PM_RAVEN]) + return DOGFOOD; +#endif else return (carni ? CADAVER : MANFOOD); case CLOVE_OF_GARLIC: return (is_undead(mon->data) ? TABU : ((herbi || starving) ? ACCFOOD : MANFOOD)); case TIN: - return (metallivorous(mon->data) ? ACCFOOD : MANFOOD); + return (metallivorous(mon->data) +#ifdef WEBB_GOLDBUG + && !(mon->data == &mons[PM_GOLD_BUG]) +#endif + ? ACCFOOD : MANFOOD); case APPLE: case CARROT: return (herbi ? DOGFOOD : starving ? ACCFOOD : MANFOOD); case BANANA: @@ -690,8 +713,12 @@ objects[obj->otyp].oc_material == SILVER) return(TABU); if (mon->data == &mons[PM_GELATINOUS_CUBE] && is_organic(obj)) return(ACCFOOD); +#ifdef WEBB_GOLDBUG + if (mon->data == &mons[PM_GOLD_BUG] && is_golden(obj)) + return (ACCFOOD); +#endif if (metallivorous(mon->data) && is_metallic(obj) && (is_rustprone(obj) || mon->data != &mons[PM_RUST_MONSTER])) { /* Non-rustproofed ferrous based metals are preferred. */ return((is_rustprone(obj) && !obj->oerodeproof) ? DOGFOOD : ACCFOOD); @@ -721,8 +748,11 @@ return((struct monst *)0); /* worst case, at least it'll be peaceful. */ mtmp->mpeaceful = 1; +#ifdef WEBB_MCHARM + mtmp->mpeacetim = 0; +#endif set_malign(mtmp); if(flags.moonphase == FULL_MOON && night() && rn2(6) && obj && mtmp->data->mlet == S_DOG) return((struct monst *)0); diff -rwBEN -U4 nethack-3.4.2-test/src/dogmove.c nethack-3.4.2-diff/src/dogmove.c --- nethack-3.4.2-test/src/dogmove.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dogmove.c 2003-11-30 09:37:34.000000000 -0600 @@ -40,14 +40,23 @@ if (!item2 && obj->otyp == UNICORN_HORN && !obj->cursed) { item2 = TRUE; continue; } +#ifdef WEBB_BIODIVERSITY + if (mon->data == &mons[PM_CLOCKWORK_AUTOMATON] && + obj->otyp == SKELETON_KEY ) + continue; +#endif if (!obj->owornmask && obj != wep) return obj; } return (struct obj *)0; } -static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 }; +static NEARDATA const char nofetch[] = { BALL_CLASS, +#ifndef WEBB_BIODIVERSITY + CHAIN_CLASS, +#endif + ROCK_CLASS, 0 }; #endif /* OVL0 */ STATIC_OVL boolean FDECL(cursed_object_at, (int, int)); @@ -146,8 +155,11 @@ mtmp->mhpmax += edog->mhpmax_penalty; edog->mhpmax_penalty = 0; } if (mtmp->mflee && mtmp->mfleetim > 1) mtmp->mfleetim /= 2; +#ifdef WEBB_MCHARM + if (mtmp->mpeacetim) mtmp->mpeacetim = 0; +#endif if (mtmp->mtame < 20) mtmp->mtame++; if (x != mtmp->mx || y != mtmp->my) { /* moved & ate on same turn */ newsym(x, y); newsym(mtmp->mx, mtmp->my); @@ -289,8 +301,11 @@ if((obj=level.objects[omx][omy]) && !index(nofetch,obj->oclass) #ifdef MAIL && obj->otyp != SCR_MAIL #endif +#ifdef WEBB_BIODIVERSITY + && obj->otyp != IRON_CHAIN +#endif ){ int edible = dogfood(mtmp, obj); if (edible <= CADAVER || @@ -617,8 +632,12 @@ ((mtmp->mhp*4 < mtmp->mhpmax || mtmp2->data->msound == MS_GUARDIAN || mtmp2->data->msound == MS_LEADER) && mtmp2->mpeaceful && !Conflict) || +#ifdef WEBB_DISINT + (touch_disintegrates(mtmp2->data) && + !resists_disint(mtmp)) || +#endif (touch_petrifies(mtmp2->data) && !resists_ston(mtmp))) continue; diff -rwBEN -U4 nethack-3.4.2-test/src/dokick.c nethack-3.4.2-diff/src/dokick.c --- nethack-3.4.2-test/src/dokick.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dokick.c 2003-11-30 09:37:34.000000000 -0600 @@ -146,8 +146,27 @@ uattk = &youmonst.data->mattk[i]; /* we only care about kicking attacks here */ if (uattk->aatyp != AT_KICK) continue; +#ifdef WEBB_DISINT + if (touch_disintegrates(mon->data) && !mon->mcan && mon->mhp>6){ + if(uarmf) { + if(!oresist_disintegration(uarmf)){ + tmp = uarmf->owt; + weight_dmg(tmp); + destroy_arm(uarmf); + break; + } + } else { + char kbuf[BUFSZ]; + int dis_dmg; + Sprintf(kbuf, "barefootedly kicking %s", + an(mon->data->mname)); + dis_dmg = instadisintegrate(kbuf); + break; + } + } else +#endif if (mon->data == &mons[PM_SHADE] && (!uarmf || !uarmf->blessed)) { /* doesn't matter whether it would have hit or missed, and shades have no passive counterattack */ @@ -236,8 +255,22 @@ ghitm(mtmp, gold) register struct monst *mtmp; register struct obj *gold; { +#ifdef WEBB_DISINT + if( touch_disintegrates(mtmp->data) && !mtmp->mcan && mtmp->mhp >6 && +# ifdef GOLDOBJ + !oresist_disintegration(gold) +# else + rn2(20) +# endif + ){ + if(cansee(mtmp->mx, mtmp->my)) + pline_The("%s %s!", xname(gold), vtense(xname(gold),"disintegrate")); + dealloc_obj(gold); + return 1; + } +#endif if(!likes_gold(mtmp->data) && !mtmp->isshk && !mtmp->ispriest && !is_mercenary(mtmp->data)) { wakeup(mtmp); } else if (!mtmp->mcanmove) { @@ -884,8 +917,11 @@ struct obj *treefruit; /* nothing, fruit or trouble? 75:23.5:1.5% */ if (rn2(3)) { if ( !rn2(6) && !(mvitals[PM_KILLER_BEE].mvflags & G_GONE) ) +#ifdef WEBB_ENVIRONMENT + if(!(maploc->looted & TREE_SWARM)) +#endif You_hear("a low buzzing."); /* a warning */ goto ouch; } if (rn2(15) && !(maploc->looted & TREE_LOOTED) && diff -rwBEN -U4 nethack-3.4.2-test/src/dothrow.c nethack-3.4.2-diff/src/dothrow.c --- nethack-3.4.2-test/src/dothrow.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dothrow.c 2003-11-30 09:37:34.000000000 -0600 @@ -715,9 +715,13 @@ { const char *almost; /* note: obj->quan == 1 */ +#ifdef WEBB_ENVIRONMENT + if (hitsroof && SKY_AT(u.ux, u.uy)) { +#else if (hitsroof) { +#endif if (breaktest(obj)) { pline("%s hits the %s.", Doname2(obj), ceiling(u.ux, u.uy)); breakmsg(obj, !Blind); breakobj(obj, u.ux, u.uy, TRUE, TRUE); @@ -726,8 +730,14 @@ almost = ""; } else { almost = " almost"; } +#ifdef WEBB_ENVIRONMENT + if (SKY_AT(u.ux, u.uy)) + You("toss %s into the air, and it falls back on top of your %s.", + doname(obj), body_part(HEAD)); + else +#endif pline("%s%s hits the %s, then falls back on top of your %s.", Doname2(obj), almost, ceiling(u.ux,u.uy), body_part(HEAD)); /* object now hits you */ @@ -762,8 +772,25 @@ make_blinded(Blinded + (long)blindinc, FALSE); if (!Blind) Your(vision_clears); } break; +#ifdef WEBB_WATERSPOUT_GARGOYLE + case WATER_VENOM: + if (u.umonnum == PM_GREMLIN) { + (void)split_mon(&youmonst, (struct monst *)0); + } else if ( +#ifdef WEBB_BIODIVERSITY + does_rust(youmonst.data) +#else + u.umonnum == PM_IRON_GOLEM +#endif + ){ + You("rust!"); + rehumanize(); + } + (void)hurtarmor(AD_RUST); + break; +#endif default: break; } return FALSE; @@ -898,8 +925,14 @@ bhitpos.y = mon->my; } else if(u.dz) { if (u.dz < 0 && Role_if(PM_VALKYRIE) && obj->oartifact == ART_MJOLLNIR && !impaired) { +#ifdef WEBB_ENVIRONMENT + if (SKY_AT(u.ux, u.uy)) + pline("%s briefly in the air and returns to your hand!", + Tobjnam(obj, "spin")); + else +#endif pline("%s the %s and returns to your hand!", Tobjnam(obj, "hit"), ceiling(u.ux,u.uy)); obj = addinv(obj); (void) encumber_msg(); @@ -1113,10 +1146,20 @@ /* ditto for immobilized target */ if (!mon->mcanmove || !mon->data->mmove) { tmp += 4; if (mon_notices && mon->data->mmove && !rn2(10)) { +#ifdef WEBB_TURTLES + if(mon->data->mlet != S_TURTLE || !(mon->mflee))) +#endif mon->mcanmove = 1; mon->mfrozen = 0; +#ifdef WEBB_BIODIVERSITY + if(mon->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !mon->mspec_used){ + mon->mfrozen = 1; + mon->mcanmove = 0; + } +#endif } } /* some objects are more likely to hit than others */ switch (obj->otyp) { @@ -1172,8 +1215,12 @@ register int tmp; /* Base chance to hit */ register int disttmp; /* distance modifier */ int otyp = obj->otyp; boolean guaranteed_hit = (u.uswallow && mon == u.ustuck); +#ifdef WEBB_DISINT + boolean obj_disint = (touch_disintegrates(mon->data) && !mon->mcan && + (mon->mhp > 1) && !oresist_disintegration(obj)); +#endif /* Differences from melee weapons: * * Dex still gives a bonus, but strength does not. @@ -1321,9 +1368,13 @@ broken = !rn2(4); if (obj->blessed && !rnl(4)) broken = 0; - if (broken) { + if (broken +#ifdef WEBB_DISINT + || obj_disint +#endif + ) { if (*u.ushops) check_shop_obj(obj, bhitpos.x,bhitpos.y, TRUE); obfree(obj, (struct obj *)0); return 1; @@ -1343,8 +1394,16 @@ if (!hmon(mon,obj,1)) { /* mon killed */ if (was_swallowed && !u.uswallow && obj == uball) return 1; /* already did placebc() */ } +#ifdef WEBB_DISINT + if (obj_disint){ + if (*u.ushops) + check_shop_obj(obj, bhitpos.x,bhitpos.y, TRUE); + obfree(obj, (struct obj *)0); + return 1; + } +#endif } else { tmiss(obj, mon); } @@ -1352,14 +1411,26 @@ exercise(A_STR, TRUE); if (tmp >= rnd(20)) { exercise(A_DEX, TRUE); (void) hmon(mon,obj,1); +#ifdef WEBB_DISINT + if (obj_disint){ + if (*u.ushops) + check_shop_obj(obj, bhitpos.x,bhitpos.y, TRUE); + obfree(obj, (struct obj *)0); + return 1; + } +#endif } else { tmiss(obj, mon); } } else if ((otyp == EGG || otyp == CREAM_PIE || - otyp == BLINDING_VENOM || otyp == ACID_VENOM) && + otyp == BLINDING_VENOM || otyp == ACID_VENOM +#ifdef WEBB_WATERSPOUT_GARGOYLE + || otyp == WATER_VENOM +#endif + ) && (guaranteed_hit || ACURR(A_DEX) > rnd(25))) { (void) hmon(mon, obj, 1); return 1; /* hmon used it up */ @@ -1629,8 +1700,11 @@ case CREAM_PIE: case MELON: case ACID_VENOM: case BLINDING_VENOM: +#ifdef WEBB_WATERSPOUT_GARGOYLE + case WATER_VENOM: +#endif return 1; default: return 0; } @@ -1672,8 +1746,11 @@ if (in_view) pline("What a mess!"); break; case ACID_VENOM: case BLINDING_VENOM: +#ifdef WEBB_WATERSPOUT_GARGOYLE + case WATER_VENOM: +#endif pline("Splash!"); break; } } @@ -1719,8 +1796,14 @@ if(u.dz) { if (u.dz < 0 && !Is_airlevel(&u.uz) && !Underwater && !Is_waterlevel(&u.uz)) { +#ifdef WEBB_ENVIRONMENT + if (SKY_AT(u.ux, u.uy)) + You("throw the gold into the air, " + "and it falls back on top of your %s.", body_part(HEAD)); + else +#endif pline_The("gold hits the %s, then falls back on top of your %s.", ceiling(u.ux,u.uy), body_part(HEAD)); /* some self damage? */ if(uarmh) pline("Fortunately, you are wearing a helmet!"); diff -rwBEN -U4 nethack-3.4.2-test/src/drawing.c nethack-3.4.2-diff/src/drawing.c --- nethack-3.4.2-test/src/drawing.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/drawing.c 2003-11-30 09:37:34.000000000 -0600 @@ -65,9 +65,9 @@ "pile of coins", "gem or rock", "boulder or statue", /*15*/ "iron ball", - "iron chain", + "\'useless\' item (iron chain, plank ...)", "splash of venom" }; /* Object class names. Used in object_detect(). */ @@ -152,8 +152,11 @@ DEF_GOLEM, DEF_DEMON, DEF_EEL, DEF_LIZARD, +#ifdef WEBB_TURTLE + DEF_TURTLE, +#endif DEF_WORM_TAIL, DEF_MIMIC_DEF, /* 60 */ }; @@ -165,14 +168,22 @@ 0, "ant or other insect", "blob", "cockatrice", "dog or other canine", "eye or sphere", "cat or other feline", "gremlin", "humanoid", "imp or minor demon", +#ifdef WEBB_BIODIVERSITY + "jelly", "kobold", "leprechaun or other fae", +#else "jelly", "kobold", "leprechaun", +#endif "mimic", "nymph", "orc", "piercer", "quadruped", "rodent", "arachnid or centipede", "trapper or lurker above", "unicorn or horse", "vortex", "worm", "xan or other mythical/fantastic insect", +#ifdef WEBB_BIODIVERSITY + "light", "zruty or other Slavic monster", +#else "light", "zruty", +#endif "angelic being", "bat or bird", "centaur", "dragon", "elemental", "fungus or mold", "gnome", "giant humanoid", 0, @@ -184,8 +195,11 @@ "apelike creature", "zombie", "human or elf", "ghost", "golem", "major demon", "sea monster", "lizard", +#ifdef WEBB_TURTLE + "turtle", +#endif "long worm tail", "mimic" }; const struct symdef def_warnsyms[WARNCOUNT] = { @@ -654,8 +668,11 @@ void switch_graphics(gr_set_flag) int gr_set_flag; { +#ifdef WEBB_TURTLE + monsyms[S_TURTLE] = def_monsyms[S_TURTLE]; +#endif switch (gr_set_flag) { default: case ASCII_GRAPHICS: assign_graphics((uchar *)0, 0, MAXPCHARS, 0); @@ -674,8 +691,11 @@ */ iflags.IBMgraphics = TRUE; iflags.DECgraphics = FALSE; assign_graphics(ibm_graphics, SIZE(ibm_graphics), MAXPCHARS, 0); +#ifdef WEBB_TURTLE + monsyms[S_TURTLE] = IBM_TURTLE; +#endif #ifdef PC9800 if (ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)(); #endif break; diff -rwBEN -U4 nethack-3.4.2-test/src/dungeon.c nethack-3.4.2-diff/src/dungeon.c --- nethack-3.4.2-test/src/dungeon.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/dungeon.c 2003-11-30 09:51:18.000000000 -0600 @@ -843,8 +843,38 @@ /* This is where the name substitution on the * levels of the quest dungeon occur. */ Sprintf(x->proto, "%s%s", urole.filecode, &lev_map->lev_name[1]); +#if 0 && defined WEBB_ENVIRONMENT + /* remap to pantheon apropriate priest levels */ + if (!strcmp(urole.filecode,"Pri") && + !strcmp(&lev_map->lev_name[2],"strt")){ + switch (flags.pantheon){ + case ROLE_ARCHEOLOGIST: + x->proto[7] = 'a'; + break; + case ROLE_HEALER: + case ROLE_RANGER: + x->proto[7] = 'h'; + break; + case ROLE_KNIGHT: + x->proto[7] = 'k'; + break; + case ROLE_TOURIST: + x->proto[7] = 'T'; + break;*/ + case ROLE_VALKYRIE: + x->proto[7] = 'v'; + break; + case ROLE_WIZARD: + x->proto[7] = 'w'; + break; + default: + /* leave "strt" */ + break; + } + } +#endif } else if (lev_map->lev_spec == &knox_level) { branch *br; /* * Kludge to allow floating Knox entrance. We @@ -1186,9 +1216,13 @@ { /* can't rise up from inside the top of the Wizard's tower */ /* KMH -- or in sokoban */ if (In_endgame(lev) || In_sokoban(lev) || - (Is_wiz1_level(lev) && In_W_tower(x, y, lev))) + (Is_wiz1_level(lev) && In_W_tower(x, y, lev)) +#ifdef WEBB_ENVIRONMENT + || level.flags.skylevel +#endif + ) return FALSE; return (boolean)(lev->dlevel > 1 || (dungeons[lev->dnum].entry_lev == 1 && ledger_no(lev) != 1 && sstairs.sx && sstairs.up)); diff -rwBEN -U4 nethack-3.4.2-test/src/eat.c nethack-3.4.2-diff/src/eat.c --- nethack-3.4.2-test/src/eat.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/eat.c 2003-11-30 09:37:34.000000000 -0600 @@ -16,8 +16,13 @@ STATIC_PTR int NDECL(eatmdone); STATIC_PTR int NDECL(eatfood); STATIC_PTR int NDECL(opentin); STATIC_PTR int NDECL(unfaint); +#ifdef WEBB_BIODIVERSITY +STATIC_PTR int NDECL(windclock); +STATIC_PTR int NDECL(rehumanize_wrapper); +#endif + #ifdef OVLB STATIC_DCL const char *FDECL(food_xname, (struct obj *,BOOLEAN_P)); STATIC_DCL void FDECL(choke, (struct obj *)); @@ -85,8 +90,19 @@ "Fainting", "Fainted ", "Starved " }; +#ifdef WEBB_BIODIVERSITY + const char * cahu_stat[] = { + "Ovrwound", + " ", + "Waning ", + "Unwound ", + "Unwound ", + "Stopped ", + "Stopped " + }; +#endif /* Biodiversity */ #endif /* OVLB */ #ifdef OVL1 @@ -105,9 +121,13 @@ /* above also prevents the Amulet from being eaten, so we must never allow fake amulets to be eaten either [which is already the case] */ if (metallivorous(youmonst.data) && is_metallic(obj) && - (youmonst.data != &mons[PM_RUST_MONSTER] || is_rustprone(obj))) + (youmonst.data != &mons[PM_RUST_MONSTER] || is_rustprone(obj)) +#ifdef WEBB_GOLDBUG + && (youmonst.data != &mons[PM_GOLD_BUG] || is_golden(obj)) +#endif + ) return TRUE; if (u.umonnum == PM_GELATINOUS_CUBE && is_organic(obj) && /* [g.cubes can eat containers and retain all contents as engulfed items, but poly'd player can't do that] */ @@ -209,9 +229,14 @@ s_suffix(mons[mnum].mname)); result = bufp; } else { /* the ordinary case */ +#ifdef WEBB_FOOD_NAMES + result = culinary(&mons[mnum])? + culinary_name(&mons[mnum]):singular(food, xname); +#else result = singular(food, xname); +#endif if (the_pfx) result = the(result); } return result; } @@ -907,10 +932,14 @@ default: { register struct permonst *ptr = &mons[pm]; int i, count; - if (dmgtype(ptr, AD_STUN) || dmgtype(ptr, AD_HALU) || - pm == PM_VIOLET_FUNGUS) { + if ((dmgtype(ptr, AD_STUN) || dmgtype(ptr, AD_HALU) || + pm == PM_VIOLET_FUNGUS) +#ifdef WEBB_CARROLL + && (pm != PM_BANDERSNATCH) +#endif + ) { pline ("Oh wow! Great stuff!"); make_hallucinated(HHallucination + 200,FALSE,0L); } if(is_giant(ptr)) gainstr((struct obj *)0, 0); @@ -1020,13 +1049,24 @@ tin.tin->corpsenm == PM_LICHEN)) r = HOMEMADE_TIN; /* lizards don't rot */ else if (tin.tin->spe == -1 && !tin.tin->blessed && !rn2(7)) r = ROTTEN_TIN; /* some homemade tins go bad */ +#ifdef WEBB_BIODIVERSITY + else if(tin.tin->corpsenm == PM_OTYUGH) + r = ROTTEN_TIN; +#endif which = 0; /* 0=>plural, 1=>as-is, 2=>"the" prefix */ if (Hallucination) { what = rndmonnam(); } else { +#ifdef WEBB_FOOD_NAMES + what = culinary(&mons[tin.tin->corpsenm])? + culinary_name(&mons[tin.tin->corpsenm]): + mons[tin.tin->corpsenm].mname; + which = 1; +#else what = mons[tin.tin->corpsenm].mname; +#endif if (mons[tin.tin->corpsenm].geno & G_UNIQ) which = type_is_pname(&mons[tin.tin->corpsenm]) ? 1 : 2; } if (which == 0) what = makeplural(what); @@ -1035,13 +1075,24 @@ if (!Hallucination) tin.tin->dknown = tin.tin->known = TRUE; if (flags.verbose) You("discard the open tin."); goto use_me; } +#ifdef WEBB_BIODIVERSITY + if (Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] ){ + You("have no way to eat, so you discard the tin instead."); + if (!Hallucination) tin.tin->dknown = tin.tin->known = TRUE; + goto use_me; + } +#endif /* in case stop_occupation() was called on previous meal */ victual.piece = (struct obj *)0; victual.fullwarn = victual.eating = victual.doreset = FALSE; You("consume %s %s.", tintxts[r].txt, +#ifdef WEBB_FOOD_NAMES + culinary(&mons[tin.tin->corpsenm])? + culinary_name(&mons[tin.tin->corpsenm]): +#endif mons[tin.tin->corpsenm].mname); /* KMH, conduct */ u.uconduct.food++; @@ -1181,8 +1232,14 @@ STATIC_OVL int rottenfood(obj) struct obj *obj; { +#ifdef WEBB_BIODIVERSITY + if (youmonst.data == &mons[PM_OTYUGH]){ + pline ("Yum! Rotten %s!", foodword(obj)); + return 1; + } +#endif pline("Blecch! Rotten %s!", foodword(obj)); if(!rn2(4)) { if (Hallucination) You_feel("rather trippy."); else You_feel("rather %s.", body_part(LIGHT_HEADED)); @@ -1236,9 +1293,13 @@ if (otmp->cursed) rotted += 2L; else if (otmp->blessed) rotted -= 2L; } - if (mnum != PM_ACID_BLOB && !stoneable && rotted > 5L) { + if (mnum != PM_ACID_BLOB && !stoneable && rotted > 5L +#ifdef WEBB_BIODIVERSITY + && youmonst.data != &mons[PM_OTYUGH] +#endif + ) { pline("Ulch - that %s was tainted!", mons[mnum].mlet == S_FUNGUS ? "fungoid vegetation" : !vegetarian(&mons[mnum]) ? "meat" : "protoplasm"); if (Sick_resistance) { @@ -1273,8 +1334,15 @@ losestr(rnd(4)); losehp(rnd(15), "poisonous corpse", KILLED_BY_AN); } else You("seem unaffected by the poison."); /* now any corpse left too long will make you mildly ill */ +#ifdef WEBB_BIODIVERSITY + }else if (rotted && youmonst.data == &mons[PM_OTYUGH]){ + tp++; + pline("Yum - that %s was tainted!", + mons[mnum].mlet == S_FUNGUS ? "fungoid vegetation" : + !vegetarian(&mons[mnum]) ? "meat" : "protoplasm"); +#endif } else if ((rotted > 5L || (rotted > 3L && rn2(5))) && !Sick_resistance) { tp++; You_feel("%ssick.", (Sick) ? "very " : ""); @@ -1304,11 +1372,18 @@ } else { pline("%s%s %s!", !uniq ? "This " : !type_is_pname(&mons[mnum]) ? "The " : "", food_xname(otmp, FALSE), +#ifdef WEBB_FOOD_NAMES + (culinary(&mons[mnum])? + (herbivorous(youmonst.data) && vegan(&mons[mnum]) || + carnivorous(youmonst.data) && !vegan(&mons[mnum])): +#else + ( +#endif (vegan(&mons[mnum]) ? (!carnivorous(youmonst.data) && herbivorous(youmonst.data)) : - (carnivorous(youmonst.data) && !herbivorous(youmonst.data))) + (carnivorous(youmonst.data) && !herbivorous(youmonst.data)))) ? "is delicious" : "tastes terrible"); } return(retcode); @@ -1384,8 +1459,33 @@ case MEATBALL: case MEAT_STICK: case HUGE_CHUNK_OF_MEAT: case MEAT_RING: +#ifdef WEBB_BIODIVERSITY + { + int rotted = (monstermoves - peek_at_iced_corpse_age(otmp))/10L + + (otmp->cursed)?2L:(otmp->blessed)?-2L:0; + if ((rotted > 5L || (rotted >3L && rn2(5)))){ + pline("%s - that meat was tainted!", + (Upolyd && youmonst.data == &mons[PM_OTYUGH])? + "Yum":"Ulch"); + if (Sick_resistance) { + pline("It doesn't seem at all sickening, though..."); + } else { + char buf[BUFSZ]; + long sick_time = (long) rn1(10, 10); + /* make sure new ill doesn't result in improvement */ + if (Sick && (sick_time > Sick)) + sick_time = (Sick > 1L) ? Sick - 1L : 1L; + Sprintf(buf, "rotten %s", xname(otmp)); + make_sick(sick_time, buf, TRUE, SICK_VOMITABLE); + } + if (carried(otmp)) useup(otmp); + else useupf(otmp, 1L); + return; + } + } +#endif goto give_feedback; /* break; */ case CLOVE_OF_GARLIC: if (is_undead(youmonst.data)) { @@ -1720,8 +1820,11 @@ char buf[BUFSZ], foodsmell[BUFSZ], it_or_they[QBUFSZ], eat_it_anyway[QBUFSZ]; boolean cadaver = (otmp->otyp == CORPSE), +#ifdef WEBB_BIODIVERSITY + meat = is_meaty(otmp), +#endif stoneorslime = FALSE; int material = objects[otmp->otyp].oc_material, mnum = otmp->corpsenm; long rotted = 0L; @@ -1764,16 +1867,31 @@ Sprintf(buf, "%s like %s could be tainted! %s", foodsmell, it_or_they, eat_it_anyway); if (yn_function(buf,ynchars,'n')=='n') return 1; else return 2; +#ifdef WEBB_BIODIVERSITY + }else if (meat){ + rotted = (monstermoves - peek_at_iced_corpse_age(otmp))/10L + + (otmp->cursed)?2L:(otmp->blessed)?-2L:0; + if (rotted > 5L && !Sick_resistance){ + Sprintf(buf, "%s like %s could be tainted! %s", + foodsmell, it_or_they, eat_it_anyway); + if (yn_function(buf,ynchars,'n')=='n') return 1; + else return 2; + } +#endif } if (stoneorslime) { Sprintf(buf, "%s like %s could be something very dangerous! %s", foodsmell, it_or_they, eat_it_anyway); if (yn_function(buf,ynchars,'n')=='n') return 1; else return 2; } - if (otmp->orotten || (cadaver && rotted > 3L)) { + if (otmp->orotten || (cadaver && rotted > 3L) +#ifdef WEBB_BIODIVERSITY + || (meat && rotted > 3L) +#endif + ) { /* Rotten */ Sprintf(buf, "%s like %s could be rotten! %s", foodsmell, it_or_they, eat_it_anyway); if (yn_function(buf,ynchars,'n')=='n') return 1; @@ -1850,8 +1968,16 @@ if (Strangled) { pline("If you can't breathe air, how can you consume solids?"); return 0; } + +#ifdef WEBB_BIODIVERSITY + if (Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] ){ + pline("You can't eat anything in your current state."); + return 0; + } +#endif + if (!(otmp = floorfood("eat", 0))) return 0; if (check_capacity((char *)0)) return 0; if (u.uedibility) { @@ -2029,8 +2155,11 @@ (otmp->orotten || !rn2(7))))) { if (rottenfood(otmp)) { otmp->orotten = TRUE; +#ifdef WEBB_BIODIVERSITY + if (youmonst.data != &mons[PM_OTYUGH]) +#endif dont_start = TRUE; } consume_oeaten(otmp, 1); /* oeaten >>= 1 */ } else fprefx(otmp); @@ -2102,8 +2231,14 @@ gethungry() /* as time goes by - called by moveloop() and domove() */ { if (u.uinvulnerable) return; /* you don't feel hungrier */ +#ifdef WEBB_BIODIVERSITY + if (Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] && + (!u.usleep || !rn2(10)) ) + u.uhunger--; + else +#endif if ((!u.usleep || !rn2(10)) /* slow metabolic rate while asleep */ && (carnivorous(youmonst.data) || herbivorous(youmonst.data)) && !Slow_digestion) u.uhunger--; /* ordinary food consumption */ @@ -2207,8 +2342,86 @@ flags.botl = 1; return 0; } +#ifdef WEBB_BIODIVERSITY +int rehumanize_wrapper(){ + rehumanize(); + return 0; +} + +int +start_clockwinding(key) +struct obj * key; +{ + char buf[BUFSZ], qbuf[QBUFSZ]; + int turns,ret; + + if (key->otyp != SKELETON_KEY) + return 0; + You("use the key to wind up your clockwork."); + Sprintf(qbuf, "How many turns?"); + getlin(qbuf, buf); + (void)mungspaces(buf); + if (buf[0] == '\033' || buf[0] == '\0') ret = 0; + else ret = sscanf(buf, "%d", &turns); + + if (ret != 1 || turns <= 0){ + pline(Never_mind); + return 0; + } + victual.piece = key; + victual.canchoke = TRUE; + victual.usedtime = 0; + victual.fullwarn = FALSE; + victual.reqtime = turns; + Sprintf(msgbuf, "winding"); + set_occupation(windclock, msgbuf, 0); + return 1; +} + + + +STATIC_PTR +int +windclock() +{ + if (victual.reqtime == victual.usedtime){ + occupation = 0; + You("finish winding."); + newuhs(FALSE); + victual.piece = 0; + }else if (!carried(victual.piece)){ + newuhs(FALSE); + stop_occupation(); + victual.piece = 0; + return 0; + }else if(victual.canchoke && u.uhunger >= 2000) { + Your("mainspring is wound too tight!"); + Your("clockwork breaks apart!"); + killer_format = KILLED_BY; + killer = "overclocking"; + done(DISINTEGRATED); /* get the "reconstituted" life-saving */ + victual.piece = 0; + return 0; + }else if (u.uhunger >= 1500 && !victual.fullwarn) { + pline("You're having a hard time cranking the key."); + victual.fullwarn = TRUE; + if (yn_function("Stop winding?",ynchars,'y')=='y') { + victual.piece = 0; + stop_occupation(); + newuhs(FALSE); + return 0; + } + } else { + u.uhunger += 10; + victual.usedtime ++; + } + flags.botl = 1; + return 1; +} +#endif + #endif /* OVLB */ #ifdef OVL0 boolean @@ -2245,8 +2458,12 @@ unsigned newhs; static unsigned save_hs; static boolean saved_hs = FALSE; int h = u.uhunger; +#ifdef WEBB_BIODIVERSITY + boolean clockwork = (Upolyd && + youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] ); +#endif newhs = (h > 1000) ? SATIATED : (h > 150) ? NOT_HUNGRY : (h > 50) ? HUNGRY : @@ -2293,13 +2510,25 @@ if(u.uhs <= WEAK || rn2(20-u.uhunger/10) >= 19) { if(!is_fainted() && multi >= 0 /* %% */) { /* stop what you're doing, then faint */ stop_occupation(); +#ifdef WEBB_BIODIVERSITY + if (clockwork){ + Your("clockwork comes to a complete stop."); + flags.soundok=0; + nomul(-200); + nomovemsg = "Testing 1."; + afternmv = rehumanize_wrapper; + } else { +#endif You("faint from lack of food."); flags.soundok = 0; nomul(-10+(u.uhunger/10)); nomovemsg = "You regain consciousness."; afternmv = unfaint; +#ifdef WEBB_BIODIVERSITY + } +#endif newhs = FAINTED; } } else if(u.uhunger < -(int)(200 + 20*ACURR(A_CON))) { @@ -2321,8 +2550,21 @@ else if(newhs < WEAK && u.uhs >= WEAK) losestr(-1); switch(newhs){ case HUNGRY: +#ifdef WEBB_BIODIVERSITY + if (clockwork){ + if (Hallucination) + Your((!incr)? "cuckoo only feels hungry now.": + "cuckoo is feeling hungry."); + else + You_feel((!incr) ? "your mainspring tightening." : + "the power of your mainspring waning."); + if (incr && occupation && occupation != windclock) + stop_occupation(); + break; + } +#endif if (Hallucination) { You((!incr) ? "now have a lesser case of the munchies." : "are getting the munchies."); @@ -2334,8 +2576,20 @@ (occupation != eatfood && occupation != opentin)) stop_occupation(); break; case WEAK: +#ifdef WEBB_BIODIVERSITY + if (clockwork){ + You_feel("your mainspring %s and your gears %s.", + (Hallucination)?"sprunging":"unwinding", + (!incr)?"still slipping": + (u.uhunger < 45 ) ? "slipping": + "starting to slip"); + if (incr && occupation && occupation != windclock) + stop_occupation(); + break; + } +#endif if (Hallucination) pline((!incr) ? "You still have the munchies." : "The munchies are interfering with your motor capabilities."); diff -rwBEN -U4 nethack-3.4.2-test/src/end.c nethack-3.4.2-diff/src/end.c --- nethack-3.4.2-test/src/end.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/end.c 2003-11-30 09:37:34.000000000 -0600 @@ -71,17 +71,25 @@ static NEARDATA const char *deaths[] = { /* the array of death */ "died", "choked", "poisoned", "starvation", "drowning", "burning", "dissolving under the heat and pressure", "crushed", "turned to stone", "turned into slime", - "genocided", "panic", "trickery", + "genocided", +#ifdef WEBB_DISINT + "disintegrated", +#endif + "panic", "trickery", "quit", "escaped", "ascended" }; static NEARDATA const char *ends[] = { /* "when you..." */ "died", "choked", "were poisoned", "starved", "drowned", "burned", "dissolved in the lava", "were crushed", "turned to stone", "turned into slime", - "were genocided", "panicked", "were tricked", + "were genocided", +#ifdef WEBB_DISINT + "were disintegrated", +#endif + "panicked", "were tricked", "quit", "escaped", "ascended" }; extern const char * const killed_by_prefix[]; /* from topten.c */ @@ -219,11 +227,15 @@ killer = m_monnam(mtmp); Strcat(buf, killer); } else { Strcat(buf, mtmp->data->mname); - if (mtmp->mnamelth) + if (mtmp->mnamelth){ +#ifdef WEBB_BIODIVERSITY + introduce_mons(mtmp); +#endif Sprintf(eos(buf), " called %s", NAME(mtmp)); } + } if (multi) Strcat(buf, ", while helpless"); killer = buf; if (mtmp->data->mlet == S_WRAITH) @@ -572,9 +584,13 @@ makeknown(AMULET_OF_LIFE_SAVING); Your("medallion %s!", !Blind ? "begins to glow" : "feels warm"); if (how == CHOKING) You("vomit ..."); - You_feel("much better!"); +#ifdef WEBB_DISINT + if (how == DISINTEGRATED) You("reconstitute!"); + else +#endif + You_feel("much better!", how); pline_The("medallion crumbles to dust!"); if (uamul) useup(uamul); (void) adjattrib(A_CON, -1, TRUE); diff -rwBEN -U4 nethack-3.4.2-test/src/engrave.c nethack-3.4.2-diff/src/engrave.c --- nethack-3.4.2-test/src/engrave.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/engrave.c 2003-11-30 09:37:34.000000000 -0600 @@ -191,9 +191,13 @@ else if (*in_rooms(x,y,TEMPLE)) what = "temple's ceiling"; else if (*in_rooms(x,y,SHOPBASE)) what = "shop's ceiling"; - else if (IS_AIR(lev->typ)) + else if (IS_AIR(lev->typ) +#ifdef WEBB_ENVIRONMENT + || SKY_AT(x, y) +#endif + ) what = "sky"; else if (Underwater) what = "water's surface"; else if ((IS_ROOM(lev->typ) && !Is_earthlevel(&u.uz)) || @@ -218,8 +222,23 @@ } return((struct engr *) 0); } +#ifdef WEBB_ENGR_LIGHT +struct engr * +find_eid(id) +unsigned id; +{ + register struct engr *ep = head_engr; + while(ep) { + if(ep->e_id == id) + return(ep); + ep = ep->nxt_engr; + } + return((struct engr *) 0); +} +#endif + #ifdef ELBERETH /* Decide whether a particular string is engraved at a specified * location; a case-insensitive substring match used. * Ignore headstones, in case the player names herself "Elbereth". @@ -326,8 +345,17 @@ sensed = 1; You("see a message scrawled in blood here."); } break; +#ifdef WEBB_ENGR_LIGHT + case ENGR_LIGHT: + if(!Blind){ + sensed = 1; + You("see a glowing message etched on the %s here.", + surface(x,y)); + } + break; +#endif default: impossible("%s is written in a very strange way.", Something); sensed = 1; @@ -373,8 +401,13 @@ if (!in_mklev && !strcmp(s, "Elbereth")) exercise(A_WIS, TRUE); ep->engr_time = e_time; ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE-1); ep->engr_lth = strlen(s) + 1; +#ifdef WEBB_ENGR_LIGHT + ep->e_id = flags.ident++; + if (e_type == ENGR_LIGHT) + new_light_source(x, y, 1, LS_ENGRAVING, ep); +#endif } /* delete any engraving at location */ void @@ -547,9 +580,11 @@ switch (otmp->oclass) { default: case AMULET_CLASS: +#ifndef WEBB_BIODIVERSITY case CHAIN_CLASS: +#endif case POTION_CLASS: case COIN_CLASS: break; @@ -561,8 +596,15 @@ type = ENGRAVE; break; } break; +#ifdef WEBB_BIODIVERSITY + case CHAIN_CLASS: + if(otmp->otyp != IRON_CHAIN && otmp->owt < 200) + type = ENGRAVE; + break; + /* fall through */ +#endif case ARMOR_CLASS: if (is_boots(otmp)) { type = DUST; @@ -607,8 +649,20 @@ break; /* NODIR wands */ case WAN_LIGHT: +#ifdef WEBB_ENGR_LIGHT + type = ENGR_LIGHT; + if(!objects[otmp->otyp].oc_name_known && !Blind) { + if (flags.verbose) + pline("This %s is a wand of light!", xname(otmp)); + doknown = TRUE; + Sprintf(post_engr_text, "You write glowing words on the %s.", + surface(u.ux,u.uy)); + ptext = TRUE; + } + break; +#endif case WAN_SECRET_DOOR_DETECTION: case WAN_CREATE_MONSTER: case WAN_WISHING: case WAN_ENLIGHTENMENT: @@ -914,8 +968,12 @@ You( "cannot wipe out the message that is %s the %s here.", oep->engr_type == BURN ? (is_ice(u.ux,u.uy) ? "melted into" : "burned into") : +#ifdef WEBB_ENGR_LIGHT + oep->engr_type == ENGR_LIGHT ? + "glowing on" : +#endif "engraved in", surface(u.ux,u.uy)); return(1); } else if ( (type != oep->engr_type) || (c == 'n') ) { @@ -958,8 +1016,14 @@ case ENGR_BLOOD: everb = (oep && !eow ? "add to the scrawl on" : "scrawl on"); break; +#ifdef WEBB_ENGR_LIGHT + case ENGR_LIGHT: + everb = (oep && !eow ? "add to the glowing writing on" : + "write on"); + break; +#endif } /* Tell adventurer what is going on */ if (otmp != &zeroobj) @@ -1079,8 +1143,16 @@ case ENGR_BLOOD: multi = -(len/10); if (multi) nomovemsg = "You finish scrawling."; break; +#ifdef WEBB_ENGR_LIGHT + case ENGR_LIGHT: + /*levl[u.ux][u.uy].lit = TRUE; /* not bright enough to illuminate + also doesn't need to be possibly deluminated if message is erased */ + multi = -(len/10); + if (multi) nomovemsg = "You finish writing."; + break; +#endif } /* Chop engraving down to size if necessary */ if (len > maxelen) { @@ -1161,8 +1233,16 @@ void del_engr(ep) register struct engr *ep; { +#ifdef WEBB_ENGR_LIGHT + if (ep->engr_type == ENGR_LIGHT){ + light_source * ls = find_ls((unsigned)ep); + if (ls){ + del_light_source(LS_ENGRAVING, ep); + } + } +#endif if (ep == head_engr) { head_engr = ep->nxt_engr; } else { register struct engr *ept; @@ -1228,8 +1308,11 @@ "He always lied while on the earth and now he's lying in it", "I made an ash of myself", "Soon ripe. Soon rotten. Soon gone. But not forgotten.", "Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake.", +#ifdef WEBB_ENVIRONMENT + "Good frend, for Jesus sake forbeare/To digg the dust encloased heare;/Blese be ye man yt spares thes stones,/And curst be he yt moves my bones.", +#endif "Go away!" }; /* Create a headstone at the given location. diff -rwBEN -U4 nethack-3.4.2-test/src/extralev.c nethack-3.4.2-diff/src/extralev.c --- nethack-3.4.2-test/src/extralev.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/extralev.c 2003-11-30 09:37:34.000000000 -0600 @@ -256,9 +256,13 @@ * level 10, but since Rogue rooms are only * encountered below level 10, use !rn2(7). */ add_room(lowx, lowy, hix, hiy, - (boolean) !rn2(7), OROOM, FALSE); + (boolean) !rn2(7), OROOM, FALSE +#ifdef WEBB_ENVIRONMENT + , 0 +#endif + ); } } /* Now, add connecting corridors. */ diff -rwBEN -U4 nethack-3.4.2-test/src/fountain.c nethack-3.4.2-diff/src/fountain.c --- nethack-3.4.2-test/src/fountain.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/fountain.c 2003-11-30 09:37:34.000000000 -0600 @@ -86,15 +86,29 @@ You_hear("a loud pop."); } void +#ifdef WEBB_WATERSPOUT_GARGOYLE +dogushforth(drinking, x, y) /* Gushing forth along LOS from (x, y) */ +#else dogushforth(drinking) /* Gushing forth along LOS from (u.ux, u.uy) */ +#endif int drinking; { int madepool = 0; - do_clear_area(u.ux, u.uy, 7, gush, (genericptr_t)&madepool); - if (!madepool) { + do_clear_area( +#ifdef WEBB_WATERSPOUT_GARGOYLE + x, y, +#else + u.ux, u.uy, +#endif + 7, gush, (genericptr_t)&madepool); + if (!madepool +#ifdef WEBB_WATERSPOUT_GARGOYLE + && u.ux == x && u.uy == y +#endif + ) { if (drinking) Your("thirst is quenched."); else pline("Water sprays all over you."); @@ -228,8 +242,11 @@ } if (fate < 10) { pline_The("cool draught refreshes you."); +#ifdef WEBB_BIODIVERSITY + if (!(Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] )) +#endif u.uhunger += rnd(10); /* don't choke on water */ newuhs(FALSE); if(mgkftn) return; } else { @@ -334,9 +351,13 @@ break; case 30: /* Gushing forth in this room */ - dogushforth(TRUE); + dogushforth(TRUE +#ifdef WEBB_WATERSPOUT_GARGOYLE + , u.ux, u.uy +#endif + ); break; default: @@ -429,9 +450,13 @@ dofindgem(); break; } case 25: /* Water gushes forth */ - dogushforth(FALSE); + dogushforth(FALSE +#ifdef WEBB_WATERSPOUT_GARGOYLE + , u.ux, u.uy +#endif + ); break; case 26: /* Strange feeling */ pline("A strange tingling runs up your %s.", body_part(ARM)); diff -rwBEN -U4 nethack-3.4.2-test/src/hack.c nethack-3.4.2-diff/src/hack.c --- nethack-3.4.2-test/src/hack.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/hack.c 2003-11-30 09:37:34.000000000 -0600 @@ -321,9 +321,13 @@ (void) memset((genericptr_t)&digging, 0, sizeof digging); if (!boulder && IS_ROCK(lev->typ) && !may_dig(x,y)) { You("hurt your teeth on the %s.", +#ifdef WEBB_TREE + IS_TREE(lev->typ) ? rmname(lev) : "hard stone"); +#else IS_TREE(lev->typ) ? "tree" : "hard stone"); +#endif nomul(0); return 1; } else if (digging.pos.x != x || digging.pos.y != y || !on_level(&digging.level, &u.uz)) { @@ -334,9 +338,16 @@ digging.pos.y = y; assign_level(&digging.level, &u.uz); /* solid rock takes more work & time to dig through */ digging.effort = +#ifdef WEBB_TREE + (IS_ROCK(lev->typ) && + (!IS_TREE(lev->typ) || (lev->flags & TREE_TYPE_MASK == TREE_IRONWD)) + ? 30 : 60) + u.udaminc; +#else (IS_ROCK(lev->typ) && !IS_TREE(lev->typ) ? 30 : 60) + u.udaminc; +#endif + You("start chewing %s %s.", (boulder || IS_TREE(lev->typ)) ? "on a" : "a hole in the", boulder ? "boulder" : IS_TREE(lev->typ) ? "tree" : IS_ROCK(lev->typ) ? "rock" : "door"); @@ -346,9 +357,13 @@ if (flags.verbose) You("%s chewing on the %s.", digging.chew ? "continue" : "begin", boulder ? "boulder" : +#ifdef WEBB_TREE + IS_TREE(lev->typ) ? rmname(lev) : +#else IS_TREE(lev->typ) ? "tree" : +#endif IS_ROCK(lev->typ) ? "rock" : "door"); digging.chew = TRUE; watch_dig((struct monst *)0, x, y, FALSE); return 1; diff -rwBEN -U4 nethack-3.4.2-test/src/invent.c nethack-3.4.2-diff/src/invent.c --- nethack-3.4.2-test/src/invent.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/invent.c 2003-11-30 09:37:34.000000000 -0600 @@ -1128,8 +1128,60 @@ pline(silly_thing_to, word); } } +#ifdef WEBB_SATYR +struct obj * +mon_has_item(mtmp, item, which) +struct monst * mtmp; +int item, which; +{ + struct obj * otmp; + int quant = 0; + for(otmp = mtmp->minvent; otmp; otmp = otmp->nobj) + if (otmp->otyp == item) + if (++quant == which) + return otmp; + if (which) + which = quant; + else + which = rnd(quant); + for(otmp = mtmp->minvent; otmp; otmp = otmp->nobj) + if (otmp->otyp == item) + if (++quant == which) + return otmp; + return 0; +} +#endif /* WEBB_SATYR */ +#ifdef WEBB_GOLDBUG +struct obj * +ochain_has_material(ochain, material, which) +struct obj * ochain; +unsigned int material, which; +{ + struct obj * otmp; + unsigned int quant = 0; + if (!ochain) return (struct obj *) 0; + for(otmp = ochain; otmp; otmp = otmp->nobj) + if (objects[otmp->otyp].oc_material == material) + if (++quant == which) + return otmp; + if (!quant) + return 0; + if (which) + which = quant; + else + which = rnd(quant); + quant = 0; + for(otmp = ochain; otmp; otmp = otmp->nobj) + if (objects[otmp->otyp].oc_material == material) + if (++quant == which){ + return otmp; + } + return 0; +} +#endif + #endif /* OVL1 */ #ifdef OVLB STATIC_PTR int @@ -2139,9 +2191,13 @@ cmap = S_vcdbridge; /* "raised drawbridge" */ else if (IS_GRAVE(ltyp)) cmap = S_grave; /* "grave" */ else if (ltyp == TREE) +#ifdef WEBB_TREE + dfeature = rmname(lev); +#else cmap = S_tree; /* "tree" */ +#endif else if (ltyp == IRONBARS) dfeature = "set of iron bars"; if (cmap >= 0) dfeature = defsyms[cmap].explanation; diff -rwBEN -U4 nethack-3.4.2-test/src/light.c nethack-3.4.2-diff/src/light.c --- nethack-3.4.2-test/src/light.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/light.c 2003-11-30 09:37:34.000000000 -0600 @@ -101,8 +101,12 @@ case LS_OBJECT: tmp_id = (genericptr_t)(((struct obj *)id)->o_id); break; case LS_MONSTER: tmp_id = (genericptr_t)(((struct monst *)id)->m_id); break; +#ifdef WEBB_ENGR_LIGHT + case LS_ENGRAVING: tmp_id = (genericptr_t)(((struct engr *)id)->e_id); + break; +#endif default: tmp_id = 0; break; } @@ -148,8 +152,18 @@ } else if (ls->type == LS_MONSTER) { if (get_mon_location((struct monst *) ls->id, &ls->x, &ls->y, 0)) ls->flags |= LSF_SHOW; } +#ifdef WEBB_ENGR_LIGHT + else if(ls->type == LS_ENGRAVING) { + if (((struct engr *) (ls->id))->engr_x > 0){ + struct engr * e = (struct engr *) ls->id; + ls->x = e->engr_x; + ls->y = e->engr_y; + ls->flags |= LSF_SHOW; + } + } +#endif /* minor optimization: don't bother with duplicate light sources */ /* at hero */ if (ls->x == u.ux && ls->y == u.uy) { @@ -225,8 +239,20 @@ if (mtmp->m_id == nid) return mtmp; return (struct monst *) 0; } +#ifdef WEBB_ENGR_LIGHT +light_source * +find_ls(id) +unsigned id; +{ + light_source *ls; + for (ls = light_base; ls; ls = ls->next) + if ((unsigned)ls->id == id) return ls; + return ls; /* is 0 */ +} +#endif + /* Save all light sources of the given range. */ void save_light_sources(fd, mode, range) int fd, mode, range; @@ -255,8 +281,13 @@ break; case LS_MONSTER: is_global = !mon_is_local((struct monst *)curr->id); break; +#ifdef WEBB_ENGR_LIGHT + case LS_ENGRAVING: + is_global = 0; + break; +#endif default: is_global = 0; impossible("save_light_sources: bad type (%d) [range=%d]", curr->type, range); @@ -305,17 +336,26 @@ light_source *ls; for (ls = light_base; ls; ls = ls->next) { if (ls->flags & LSF_NEEDS_FIXUP) { - if (ls->type == LS_OBJECT || ls->type == LS_MONSTER) { + if (ls->type == LS_OBJECT || ls->type == LS_MONSTER +#ifdef WEBB_ENGR_LIGHT + || ls->type == LS_ENGRAVING +#endif + ){ if (ghostly) { if (!lookup_id_mapping((unsigned)ls->id, &nid)) impossible("relink_light_sources: no id mapping"); } else nid = (unsigned) ls->id; if (ls->type == LS_OBJECT) { which = 'o'; ls->id = (genericptr_t) find_oid(nid); +#ifdef WEBB_ENGR_LIGHT + } else if (ls->type == LS_ENGRAVING) { + which = 'e'; + ls->id = (genericptr_t) find_eid(nid); +#endif } else { which = 'm'; ls->id = (genericptr_t) find_mid(nid, FM_EVERYWHERE); } @@ -354,8 +394,13 @@ break; case LS_MONSTER: is_global = !mon_is_local((struct monst *)ls->id); break; +#ifdef WEBB_ENGR_LIGHT + case LS_ENGRAVING: + is_global = 0; + break; +#endif default: is_global = 0; impossible("maybe_write_ls: bad type (%d) [range=%d]", ls->type, range); @@ -379,10 +424,17 @@ { genericptr_t arg_save; struct obj *otmp; struct monst *mtmp; +#ifdef WEBB_ENGR_LIGHT + struct engr *etmp; +#endif - if (ls->type == LS_OBJECT || ls->type == LS_MONSTER) { + if (ls->type == LS_OBJECT || ls->type == LS_MONSTER +#ifdef WEBB_ENGR_LIGHT + || ls->type == LS_ENGRAVING +#endif + ) { if (ls->flags & LSF_NEEDS_FIXUP) bwrite(fd, (genericptr_t)ls, sizeof(light_source)); else { /* replace object pointer with id for write, then put back */ @@ -393,8 +445,17 @@ #ifdef DEBUG if (find_oid((unsigned)ls->id) != otmp) panic("write_ls: can't find obj #%u!", (unsigned)ls->id); #endif +#ifdef WEBB_ENGR_LIGHT + }else if (ls->type == LS_ENGRAVING) { + etmp = (struct engr *)ls->id; + ls->id = (genericptr_t)etmp->e_id; +#ifdef DEBUG + if (find_eid((unsigned)ls->id) != otmp) + panic("write_ls: can't find engr #%u!", (unsigned)ls->id); +#endif +#endif } else { /* ls->type == LS_MONSTER */ mtmp = (struct monst *)ls->id; ls->id = (genericptr_t)mtmp->m_id; #ifdef DEBUG @@ -441,11 +502,21 @@ snuff_light_source(x, y) int x, y; { light_source *ls; +#ifdef WEBB_ENGR_LIGHT + light_source *nxt_ls; +#endif struct obj *obj; - for (ls = light_base; ls; ls = ls->next) + for (ls = light_base; ls; +#ifndef WEBB_ENGR_LIGHT + ls = ls->next +#endif + ){ +#ifdef WEBB_ENGR_LIGHT + nxt_ls = ls->next; +#endif /* Is this position check valid??? Can I assume that the positions will always be correct because the objects would have been updated with the last vision update? [Is that recent enough???] @@ -467,8 +538,18 @@ */ return; } } +#ifdef WEBB_ENGR_LIGHT + else if(ls->type == LS_ENGRAVING){ + struct engr * etmp = (struct engr *)ls->id; + if (etmp) { + del_engr(etmp); + } + } + ls = nxt_ls; +#endif + } } /* Return TRUE if object sheds any light at all. */ boolean @@ -600,8 +681,11 @@ for (ls = light_base; ls; ls = ls->next) { Sprintf(buf, " %2d,%2d %2d 0x%04x %s %s", ls->x, ls->y, ls->range, ls->flags, (ls->type == LS_OBJECT ? "obj" : +#ifdef WEBB_ENGR_LIGHT + ls->type == LS_ENGRAVING ? "engr" : +#endif ls->type == LS_MONSTER ? (mon_is_local((struct monst *)ls->id) ? "mon" : ((struct monst *)ls->id == &youmonst) ? "you" : "") : /* migrating monster */ diff -rwBEN -U4 nethack-3.4.2-test/src/lock.c nethack-3.4.2-diff/src/lock.c --- nethack-3.4.2-test/src/lock.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/lock.c 2003-11-30 09:37:34.000000000 -0600 @@ -189,9 +189,13 @@ continue; } useup(otmp); } - if (xlock.box->otyp == ICE_BOX && otmp->otyp == CORPSE) { + if (xlock.box->otyp == ICE_BOX && (otmp->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(otmp) +#endif + )) { otmp->age = monstermoves - otmp->age; /* actual age */ start_corpse_timeout(otmp); } place_object(otmp, u.ux, u.uy); @@ -282,8 +286,16 @@ if (u.dz < 0) { There("isn't any sort of lock up %s.", Levitation ? "here" : "there"); return 0; +#ifdef WEBB_BIODIVERSITY + }else if(Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] && + picktyp == SKELETON_KEY){ + Sprintf(qbuf, "Wind up your clockwork?"); + c = ynq(qbuf); + if(c == 'q') return(0); + if(c == 'y' && start_clockwinding(pick)) return (1); +#endif } else if (is_lava(u.ux, u.uy)) { pline("Doing that would probably melt your %s.", xname(pick)); return 0; diff -rwBEN -U4 nethack-3.4.2-test/src/mail.c nethack-3.4.2-diff/src/mail.c --- nethack-3.4.2-test/src/mail.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mail.c 2003-11-30 09:37:34.000000000 -0600 @@ -32,9 +32,11 @@ */ STATIC_DCL boolean FDECL(md_start,(coord *)); STATIC_DCL boolean FDECL(md_stop,(coord *, coord *)); +#ifndef WEBB_BIODIVERSITY STATIC_DCL boolean FDECL(md_rush,(struct monst *,int,int)); +#endif STATIC_DCL void FDECL(newmail, (struct mail_info *)); extern char *viz_rmin, *viz_rmax; /* line-of-sight limits (vision.c) */ @@ -268,9 +270,12 @@ * any monsters that are in its path, but will replace them later. Return * FALSE if the md gets stuck in a position where there is a monster. Return * TRUE otherwise. */ -STATIC_OVL boolean +#ifndef WEBB_BIODIVERSITY +STATIC_OVL +#endif +boolean md_rush(md,tx,ty) struct monst *md; register int tx, ty; /* destination of mail daemon */ { diff -rwBEN -U4 nethack-3.4.2-test/src/makemon.c nethack-3.4.2-diff/src/makemon.c --- nethack-3.4.2-test/src/makemon.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/makemon.c 2003-11-30 09:37:34.000000000 -0600 @@ -317,8 +317,39 @@ (void)mongets(mtmp, !rn2(3) ? PICK_AXE : DAGGER); } } break; +#ifdef WEBB_BIODIVERSITY + case S_QUANTMECH: + if (mm == PM_CLOCKWORK_AUTOMATON) { + (void) mongets(mtmp, rn2(2)? BROADSWORD : SCIMITAR); + (void) mongets(mtmp, BRONZE_PLATE_MAIL); + } + break; + + case S_LEPRECHAUN: + if (mm == PM_POOKA){ +#ifdef TOURIST + if (!rn2(8)) (void) mongets(mtmp, HAWAIIAN_SHIRT); +#endif + if (!rn2(4)) (void)mongets(mtmp, ELVEN_LEATHER_HELM); + switch (rn2(3)) { + case 0: + if (!rn2(4)) (void)mongets(mtmp, ELVEN_SHIELD); + if (rn2(2)) (void)mongets(mtmp, ELVEN_SHORT_SWORD); + case 1: + (void)mongets(mtmp, ELVEN_DAGGER); + break; + case 2: + if (rn2(2)) { + (void)mongets(mtmp, ELVEN_SPEAR); + (void)mongets(mtmp, ELVEN_SHIELD); + } + break; + } + } + break; +#endif # ifdef KOPS case S_KOP: /* create Keystone Kops with cream pies to * throw. As suggested by KAA. [MRS] */ @@ -389,8 +420,21 @@ if (!rn2(4)) (void)mongets(mtmp, LEATHER_ARMOR); if (!rn2(4)) (void)mongets(mtmp, (rn2(3) ? KNIFE : SHORT_SWORD)); break; +#ifdef WEBB_BIODIVERSITY + case S_GHOST: + if (mm == PM_POLTERGEIST) + m_initthrow(mtmp, KNIFE, 12); + break; +#endif +#ifdef WEBB_SATYR + case S_NYMPH: + if (mm == PM_SATYR) + if (rn2(2)) + (void) mongets(mtmp, DAGGER); + break; +#endif case S_LIZARD: if (mm == PM_SALAMANDER) (void)mongets(mtmp, (rn2(7) ? SPEAR : rn2(3) ? TRIDENT : STILETTO)); @@ -575,14 +619,87 @@ mtmp->mgold = (long)rn1(10,20); #else mkmonmoney(mtmp,(long)rn1(10,20)); #endif +#ifdef WEBB_BIODIVERSITY + } else if (ptr == &mons[PM_GUIDE] && + (!In_quest(&u.uz) || !Role_if(PM_TOURIST))){ + if(rn2(2)) + otmp = mksobj(BRASS_LANTERN, TRUE, FALSE); + else if(rn2(3)) + otmp = mksobj(POT_OIL, TRUE, FALSE); + else + otmp = mksobj(rn2(5)?TALLOW_CANDLE:WAX_CANDLE, TRUE, FALSE); + mpickobj(mtmp, otmp); + begin_burn(otmp, 0); + if (!rn2(3)){ + otmp = mksobj((rn2(5))?TALLOW_CANDLE:WAX_CANDLE, TRUE, FALSE); + otmp->quan = rnd(5); + otmp->owt = weight(otmp); + } + for(cnt = rn1(4, 2); cnt; --cnt){ + int type = 0; + switch (rn2(20)){ + case 0: + type = SPE_MAGIC_MAPPING; + break; + case 1: + type = SPE_DETECT_TREASURE; + break; + case 2: + type = SPE_KNOCK; + break; + case 3: + case 4: + type = SCR_LIGHT; + break; + case 5: + case 6: + type = SCR_GOLD_DETECTION; + break; + case 7: + type = SCR_TELEPORTATION; + break; + case 8: + case 9: + type = SCR_AMNESIA; + break; + case 10: + type = WAN_SECRET_DOOR_DETECTION; + break; + case 11: + type = WAN_LIGHT; + break; + case 12: + type = WAN_DIGGING; + break; + case 13: + type = WAN_OPENING; + break; + case 14: + case 15: + type = T_SHIRT; + break; + default: + type = SCR_MAGIC_MAPPING; + break; + } + (void) mongets(mtmp, type); + } +#endif } else if (quest_mon_represents_role(ptr,PM_MONK)) { (void) mongets(mtmp, rn2(11) ? ROBE : CLOAK_OF_MAGIC_RESISTANCE); } break; case S_NYMPH: +#ifdef WEBB_SATYR + if(mtmp->data == &mons[PM_SATYR]){ + if(!rn2(2)) (void) mongets(mtmp, POT_BOOZE); + (void) mongets(mtmp, WOODEN_FLUTE); + break; + } +#endif if(!rn2(2)) (void) mongets(mtmp, MIRROR); if(!rn2(2)) (void) mongets(mtmp, POT_OBJECT_DETECTION); break; case S_GIANT: @@ -620,22 +737,66 @@ case S_MUMMY: if (rn2(7)) (void)mongets(mtmp, MUMMY_WRAPPING); break; case S_QUANTMECH: +#ifdef WEBB_BIODIVERSITY + { + char * ame = (mtmp->mnamelth && + (uchar)NAME(mtmp)[0] > (uchar)0x80)?NAME(mtmp)+1:0; + if (ptr == &mons[PM_QUANTUM_MECHANIC]){ + if (!rn2(20) || (ame && !strcmp(ame,"rwin"))) { + otmp = mksobj(LARGE_BOX, FALSE, FALSE); + otmp->spe = 1; /* flag for special box */ + otmp->owt = weight(otmp); + (void) mpickobj(mtmp, otmp); + } + } else if (ptr == &mons[PM_CLOCKWORK_AUTOMATON]){ + if (!rn2(13) || (ame && !strcmp(ame, "arren")) ){ + (void) mongets(mtmp, QUARTZ); + } else if (!rn2(12) || (ame && + !(strcmp(ame, "tsesibus") && strcmp(ame, "lepsydra")) )){ + (void) mongets(mtmp, POT_WATER); + } else if (!rn2(11) || (ame && !strcmp(ame, "lan"))){ + (void) mongets(mtmp, SCR_BLANK_PAPER); + } + + if (!rn2(13)) + (void) mongets(mtmp, LAST_GEM+1); /* wpo white glass */ + (void) mongets(mtmp,SKELETON_KEY); + } + } +#else if (!rn2(20)) { otmp = mksobj(LARGE_BOX, FALSE, FALSE); otmp->spe = 1; /* flag for special box */ otmp->owt = weight(otmp); (void) mpickobj(mtmp, otmp); } +#endif break; case S_LEPRECHAUN: +#ifdef WEBB_BIODIVERSITY + if (ptr == &mons[PM_POOKA]){ + if(!rn2(5)) (void) mongets(mtmp, CARROT); + } + if (ptr == &mons[PM_LEPRECHAUN]) +#endif #ifndef GOLDOBJ mtmp->mgold = (long) d(level_difficulty(), 30); #else mkmonmoney(mtmp, (long) d(level_difficulty(), 30)); #endif break; +#ifdef WEBB_BIODIVERSITY + case S_ZRUTY: + if (ptr == &mons[PM_BANNIK] && !rn2(5)) + mongets(mtmp, TOWEL); +#ifdef WEBB_TREE + else if (ptr == &mons[PM_LESHY]) + mongets(mtmp, rnl(7)?ACORN:APPLE); +#endif + break; +#endif case S_DEMON: /* moved here from m_initweap() because these don't have AT_WEAP so m_initweap() is not called for them */ if (ptr == &mons[PM_ICE_DEVIL] && !rn2(4)) { @@ -912,8 +1073,12 @@ mtmp->mcansee = mtmp->mcanmove = TRUE; mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(ptr); switch(ptr->mlet) { +#ifdef WEBB_BIODIVERSITY + case S_TRAPPER: + if(ptr != &mons[PM_LABYRINTH_TRAPPER]) break; +#endif case S_MIMIC: set_mimic_sym(mtmp); break; case S_SPIDER: @@ -924,10 +1089,24 @@ if(hides_under(ptr) && OBJ_AT(x, y)) mtmp->mundetected = TRUE; break; case S_LIGHT: +#ifdef WEBB_BIODIVERSITY + if (mndx == PM_WILL_O__WISP){ + mtmp->m_ap_type = + ((mtmp->mappearance = pick_friendly()) == NON_PM )? + M_AP_NOTHING:M_AP_MONSTER; + break; + } +#endif case S_ELEMENTAL: +#ifdef WEBB_BIODIVERSITY + case S_GHOST: + if (mndx == PM_STALKER || mndx == PM_BLACK_LIGHT || + mndx == PM_POLTERGEIST) { +#else if (mndx == PM_STALKER || mndx == PM_BLACK_LIGHT) { +#endif mtmp->perminvis = TRUE; mtmp->minvis = TRUE; } break; @@ -935,13 +1114,28 @@ if (is_pool(x, y)) mtmp->mundetected = TRUE; break; case S_LEPRECHAUN: +#ifdef WEBB_BIODIVERSITY + if (ptr == &mons[PM_POOKA] && !rn2(3)){ + mtmp->perminvis = TRUE; + mtmp->minvis = TRUE; + } else if (ptr == &mons[PM_LEPRECHAUN]) +#endif mtmp->msleeping = 1; break; case S_JABBERWOCK: +#ifdef WEBB_CARROLL + if (ptr != &mons[PM_JABBERWOCK]) + break; +#endif case S_NYMPH: +#ifdef WEBB_SATYR + if (rn2(5) && !u.uhave.amulet && ptr != &mons[PM_SATYR]) + mtmp->msleeping = 1; +#else if (rn2(5) && !u.uhave.amulet) mtmp->msleeping = 1; +#endif break; case S_ORC: if (Race_if(PM_ELF)) mtmp->mpeaceful = FALSE; break; @@ -953,8 +1147,16 @@ case S_BAT: if (Inhell && is_bat(ptr)) mon_adjust_speed(mtmp, 2, (struct obj *)0); break; +#ifdef WEBB_BIODIVERSITY + case S_QUANTMECH: + if (ptr == &mons[PM_CLOCKWORK_AUTOMATON]){ + mtmp->permspeed = MFAST; + mtmp->mspec_used = CLOCKWORK_MAX; + } + break; +#endif } if ((ct = emits_light(mtmp->data)) > 0) new_light_source(mtmp->mx, mtmp->my, ct, LS_MONSTER, (genericptr_t)mtmp); @@ -980,8 +1182,18 @@ } else if (mndx == PM_GHOST) { flags.ghost_count++; if (!(mmflags & MM_NONAME)) mtmp = christen_monst(mtmp, rndghostname()); +#ifdef WEBB_BIODIVERSITY + } else if (mndx == PM_QUANTUM_MECHANIC || + mndx == PM_CLOCKWORK_AUTOMATON) { + if(!(mmflags & MM_NONAME)) + mtmp = christen_monst(mtmp, rndqname(mndx, mtmp->female)); + } else if (mndx == PM_GUIDE && (Inhell) && + !(mvitals[PM_GUIDE].mvflags & MV_KNOWS_EGG)){ + mtmp = christen_monst(mtmp, "\326irgil"); + mvitals[PM_GUIDE].mvflags |= MV_KNOWS_EGG; +#endif } else if (mndx == PM_VLAD_THE_IMPALER) { mitem = CANDELABRUM_OF_INVOCATION; } else if (mndx == PM_CROESUS) { mitem = TWO_HANDED_SWORD; @@ -1640,9 +1852,165 @@ else if (IS_ROOM(typ)) rt = OROOM, roomno = 0; #endif else rt = 0; /* roomno < 0 case for GCC_WARN */ +#ifdef WEBB_BIODIVERSITY + if (mtmp->data == &mons[PM_LABYRINTH_TRAPPER]){ + if ( (IS_WALL(typ) && ( rn2(8) || !may_dig(mx, my) )) + || typ == SDOOR || typ == SCORR){ /* don't hide in STONE */ + mtmp->mundetected = 1; + return; + } else if (IS_WALL(typ)){ + ap_type = M_AP_FURNITURE; + appear = typ; + levl[mx][my].typ = ROOM; + } else if (typ == CORR){ + ap_type = M_AP_FURNITURE; + appear = S_stone; + } else if (typ == ROOM){ +#ifndef W_NORTH +# define W_NORTH 1 +# define W_SOUTH 2 +# define W_EAST 4 +# define W_WEST 8 +#endif + uchar adj = 0; + schar adj_type; + if (isok(mx-1, my) && IS_WALL(levl[mx-1][my].typ)) adj |= W_WEST; + if (isok(mx+1, my) && IS_WALL(levl[mx+1][my].typ)) adj |= W_EAST; + if (isok(mx, my-1) && IS_WALL(levl[mx][my-1].typ)) adj |= W_NORTH; + if (isok(mx, my+1) && IS_WALL(levl[mx][my+1].typ)) adj |= W_SOUTH; + switch (adj){ + case (W_NORTH): + case (W_SOUTH): + case (W_NORTH|W_SOUTH): + appear = S_vwall; + break; + case (W_EAST): + case (W_WEST): + case (W_EAST|W_WEST): + appear = S_hwall; + break; + case (W_EAST|W_SOUTH): + appear = S_tlcorn; + break; + case (W_WEST|W_SOUTH): + appear = S_trcorn; + break; + case (W_EAST|W_NORTH): + appear = S_blcorn; + break; + case (W_WEST|W_NORTH): + appear = S_brcorn; + break; + case(W_WEST|W_EAST|W_NORTH|W_SOUTH): + appear = S_crwall; + break; + case(W_WEST|W_EAST|W_NORTH): + appear = S_tuwall; + break; + case(W_WEST|W_EAST|W_SOUTH): + appear = S_tdwall; + break; + case(W_WEST|W_NORTH|W_SOUTH): + appear = S_tlwall; + break; + case(W_EAST|W_NORTH|W_SOUTH): + appear = S_trwall; + default: + if(!isok(mx-1,my) || !isok(mx+1,my)) + appear = S_vwall; + else + appear = S_hwall; + break; + } + ap_type = M_AP_FURNITURE; + /* this should run through a reset_seenv */ + if (adj | W_NORTH){ + switch(adj_type = levl[mx][my-1].typ){ + case (HWALL): + adj_type = TDWALL; + break; + case (BRCORNER): + adj_type = TLWALL; + break; + case (BLCORNER): + adj_type = TRWALL; + break; + case (TUWALL): + adj_type = CROSSWALL; + break; + } + levl[mx][my-1].typ = adj_type; + levl[mx][my-1].seenv &= ~SV5; + } + if (adj | W_SOUTH){ + switch(adj_type = levl[mx][my+1].typ){ + case (HWALL): + adj_type = TUWALL; + break; + case (TRCORNER): + adj_type = TLWALL; + break; + case (TLCORNER): + adj_type = TRWALL; + break; + case (TDWALL): + adj_type = CROSSWALL; + break; + } + levl[mx][my+1].typ = adj_type; + levl[mx][my+1].seenv &= ~SV1; + } + if (adj | W_EAST){ + switch(adj_type = levl[mx+1][my].typ){ + case (VWALL): + adj_type = TLWALL; + break; + case (TLCORNER): + adj_type = TDWALL; + break; + case (BLCORNER): + adj_type = TUWALL; + break; + case (TRWALL): + adj_type = CROSSWALL; + break; + } + levl[mx+1][my].typ = adj_type; + levl[mx+1][my].seenv &= ~SV3; + } + if (adj | W_WEST){ + switch(adj_type = levl[mx-1][my].typ){ + case (VWALL): + adj_type = TRWALL; + break; + case (BRCORNER): + adj_type = TUWALL; + break; + case (TRCORNER): + adj_type = TDWALL; + break; + case (TLWALL): + adj_type = CROSSWALL; + break; + } + levl[mx-1][my].typ = adj_type; + levl[mx-1][my].seenv &= ~SV7; + } + if(!rn2(8) && IS_WALL(appear)){ + levl[mx][my].typ = appear; + mtmp->mundetected = 1; + return; + } + } + block_point(mx,my); /* vision */ + mtmp->m_ap_type = ap_type; + mtmp->mappearance = appear; + return; + } +#endif if (OBJ_AT(mx, my)) { ap_type = M_AP_OBJECT; appear = level.objects[mx][my]->otyp; } else if (IS_DOOR(typ) || IS_WALL(typ) || @@ -1727,8 +2095,42 @@ mtmp->m_ap_type = ap_type; mtmp->mappearance = appear; } +#ifdef WEBB_BIODIVERSITY +static int friendlies[] = { + PM_ACID_BLOB, PM_HOBBIT, PM_BUGBEAR, PM_GNOME, + PM_GNOME_LORD, PM_GNOME_KING, PM_DWARF, PM_DWARF_LORD, + PM_DWARF_KING, PM_HOMUNCULUS, PM_TENGU, PM_GOBLIN, + PM_HOBGOBLIN, PM_HILL_ORC, PM_ORC_SHAMAN, PM_ORC_CAPTAIN, + PM_ANGEL, PM_ARCHON, PM_GOLDEN_NAGA, PM_GREEN_ELF, + PM_ELF_LORD, PM_ELVENKING, PM_MONKEY, PM_SASQUATCH }; + +static int very_friendlies[] = { + PM_LITTLE_DOG, PM_DOG, PM_LARGE_DOG, + PM_KITTEN, PM_HOUSECAT, PM_LARGE_CAT, + PM_PONY, PM_HORSE, PM_WARHORSE, /* each uisge? */ + PM_NURSE, PM_GUIDE, PM_SUCCUBUS, PM_INCUBUS, + PM_BLACK_UNICORN, PM_GRAY_UNICORN, PM_WHITE_UNICORN }; + +int +pick_friendly() +{ + int pm, i=8; + do{ + if (rn2(3)) + pm = very_friendlies[rn2(SIZE(very_friendlies))]; + else + pm = friendlies[rn2(SIZE(friendlies))]; + if (!rn2(12)) + pm = PM_GUIDE; + if (!peace_minded(&mons[pm])) + pm = NON_PM; + }while (pm == NON_PM || !(--i)); + return pm; +} +#endif + /* release a monster from a bag of tricks */ void bagotricks(bag) struct obj *bag; diff -rwBEN -U4 nethack-3.4.2-test/src/mhitm.c nethack-3.4.2-diff/src/mhitm.c --- nethack-3.4.2-test/src/mhitm.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mhitm.c 2003-11-30 09:37:34.000000000 -0600 @@ -23,8 +23,12 @@ STATIC_DCL int FDECL(gazemm, (struct monst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(gulpmm, (struct monst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(explmm, (struct monst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(mdamagem, (struct monst *,struct monst *,struct attack *)); +#ifdef WEBB_DISINT +STATIC_DCL int FDECL(defdisintagr, + (struct monst *,struct monst *,struct attack *)); +#endif STATIC_DCL void FDECL(mswingsm, (struct monst *, struct monst *, struct obj *)); STATIC_DCL void FDECL(noises,(struct monst *,struct attack *)); STATIC_DCL void FDECL(missmm,(struct monst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(passivemm, (struct monst *, struct monst *, BOOLEAN_P, int)); @@ -111,9 +115,14 @@ #ifdef LINT nmon = 0; #endif /* perhaps the monster will resist Conflict */ - if(resist(mtmp, RING_CLASS, 0, 0)) + if(resist(mtmp, RING_CLASS, 0, 0) +#ifdef WEBB_MCHARM + /* if a monster is charmed by a baddie, it's immune to conflict */ + || (!mtmp->mpeaceful && mtmp->mpeacetim) +#endif + ) return(0); if(u.ustuck == mtmp) { /* perhaps we're holding it... */ @@ -205,8 +214,11 @@ /* Calculate the armour class differential. */ tmp = find_mac(mdef) + magr->m_lev; if (mdef->mconf || !mdef->mcanmove || mdef->msleeping) { +#ifdef WEBB_TURTLE + if(mdef->data->mlet != S_TURTLE || mdef->mcanmove || !mdef->mflee) +#endif tmp += 4; mdef->msleeping = 0; } @@ -235,8 +247,19 @@ /* Now perform all attacks for the monster. */ for (i = 0; i < NATTK; i++) { res[i] = MM_MISS; mattk = getmattk(pa, i, res, &alt_attk); +#ifdef WEBB_BIODIVERSITY + if (magr->data == & mons[PM_CLOCKWORK_AUTOMATON]){ + if ((magr->mspec_used < CLOCKWORK_PANIC) || + (magr->mspec_used < CLOCKWORK_LOW && i) || + (magr->mspec_used < CLOCKWORK_MED && i>=2) || + (magr->mspec_used < CLOCKWORK_HIGH && i>=4) ) + continue; + else + magr->mspec_used -= 15; + } +#endif otmp = (struct obj *)0; attk = 1; switch (mattk->aatyp) { case AT_WEAP: /* "hand to hand" attacks */ @@ -258,17 +281,24 @@ case AT_STNG: case AT_TUCH: case AT_BUTT: case AT_TENT: +#ifdef WEBB_CARROLL +use_natural: +#endif /* Nymph that teleported away on first attack? */ if (distmin(magr->mx,magr->my,mdef->mx,mdef->my) > 1) return MM_MISS; /* Monsters won't attack cockatrices physically if they * have a weapon instead. This instinct doesn't work for * players, or under conflict or confusion. */ - if (!magr->mconf && !Conflict && otmp && - mattk->aatyp != AT_WEAP && touch_petrifies(mdef->data)) { + if (!magr->mconf && !Conflict && otmp && ( +#ifdef WEBB_DISINT + (touch_disintegrates(mdef->data) && + (mattk->aatyp == AT_WEAP || !(resists_disint(magr))) ) || +#endif + mattk->aatyp != AT_WEAP && touch_petrifies(mdef->data))) { strike = 0; break; } dieroll = rnd(20 + i); @@ -293,9 +323,21 @@ } } else missmm(magr, mdef, mattk); break; - +#ifdef WEBB_SATYR + case AT_NTCH: /* generic adjacent non-touching attack */ + dieroll = rnd(20 + i); + strike = (tmp > dieroll); + /* KMH -- don't accumulate to-hit bonuses */ + if (otmp) + tmp -= hitval(otmp, mdef); + if (strike) + res[i] = hitmm(magr, mdef, mattk); + else + missmm(magr, mdef, mattk); + break; +#endif case AT_HUGS: /* automatic if prev two attacks succeed */ strike = (i >= 2 && res[i-1] == MM_HIT && res[i-2] == MM_HIT); if (strike) res[i] = hitmm(magr, mdef, mattk); @@ -325,8 +367,18 @@ #endif /* Engulfing attacks are directed at the hero if * possible. -dlc */ +#ifdef WEBB_CARROLL + if((magr->data == &mons[PM_BANDERSNATCH]) && + !yeasty_food(mdef->data)) { + mattk->aatyp = AT_BITE; + mattk->adtyp = AD_PHYS; + mattk->damn = 1; + mattk->damd = 5; + goto use_natural; + } +#endif if (u.uswallow && magr == u.ustuck) strike = 0; else { if ((strike = (tmp > rnd(20+i)))) @@ -383,9 +435,13 @@ Sprintf(buf, "%s %s", Monnam(magr), mdef->mcansee ? "smiles at" : "talks to"); pline("%s %s %s.", buf, mon_nam(mdef), compat == 2 ? - "engagingly" : "seductively"); + "engagingly" : +#ifdef WEBB_SATYR + !humanoid(mdef->data)? "real friendly-like" : +#endif + "seductively"); } else { char magr_name[BUFSZ]; Strcpy(magr_name, Monnam(magr)); @@ -427,8 +483,24 @@ struct attack *mattk; { char buf[BUFSZ]; +#ifdef WEBB_CARROLL + if (mattk->adtyp == AD_DRIN){ + if(canseemon(magr)){ + Sprintf(buf, "%s screeches at", Monnam(magr)); + pline("%s %s...",buf, mon_nam(mdef)); + } else if (!u.uswallow && !Underwater && flags.soundok) { + You_hear("screeching."); + } + mdef->msleeping = 0; + if(!mindless(mdef->data)){ + mattk->adtyp = AD_CONF; + return(mdamagem(magr, mdef, mattk)); + } + return 0; + } +#endif if(vis) { Sprintf(buf,"%s gazes at", Monnam(magr)); pline("%s %s...", buf, mon_nam(mdef)); } @@ -565,8 +637,138 @@ return result; } +#ifdef WEBB_DISINT +STATIC_OVL int +defdisintagr(magr, mdef, mattk) + register struct monst *magr, *mdef; + register struct attack *mattk; +{ + int tmp=-1; /* -1 a miss, -MM_AGR_DIED aggre died, -2 do nothing, + >=0 store as tmp. */ + + if (mdef->mhp>6 && !mdef->mcan){ + int touched = 0; + int mass = 0; + struct obj * otch = 0; + switch (attk_protection((int)mattk->aatyp)){ + case (W_ARMC|W_ARMG): + if (otch = which_armor(magr, W_ARMG)){ + if(!oresist_disintegration(otch)){ + if(canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + otch = 0; + touched = 1; + } + } else touched = 1; + if (otch = which_armor(magr, W_ARMC)) { + if(!oresist_disintegration(otch)) { + if(canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + touched = 1; + } + } else touched = 1; + if (!(magr->misc_worn_check & W_ARMC) && + (otch = which_armor(magr,W_ARM)) && + (!oresist_disintegration(otch))) { + if (canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + } +#ifdef TOURIST + if (!(magr->misc_worn_check & (W_ARMC|W_ARM)) && + (otch = which_armor(magr,W_ARMU)) && + (!oresist_disintegration(otch))) { + if (canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + } +#endif + break; + case (W_ARMG): + if(otmp){ + if(!oresist_disintegration(otmp)){ + if (canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otmp, xname)); + mass += otmp->owt; + m_useup(magr,otmp); + tmp = 0; + } + } else if (otch = which_armor(magr,W_ARMG)){ + if(!oresist_disintegration(otch)){ + if(canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + touched = 1; + } + } else touched = 1; + break; + case (W_ARMH): + if (otch = which_armor(magr,W_ARMH)){ + if(!oresist_disintegration(otch)){ + if(canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + touched = 1; + } + } else touched = 1; + break; + case (W_ARMF): + if (otch = which_armor(magr,W_ARMF)){ + if(!oresist_disintegration(otch)){ + if(canseemon(magr)) + pline("%s %s disintegrates!", + s_suffix(Monnam(magr)), distant_name(otch, xname)); + mass += otch->owt; + m_useup(magr,otch); + touched = 1; + } + } else touched = 1; + break; + case (0L): + touched = 1; + break; + default: + break; + } + if (!touched || resists_disint(magr)) { + if(mass) + weight_dmg(mass); + tmp = mass; + } else { + struct obj * lifesave = mlifesaver(magr); + mass += magr->data->cwt; + weight_dmg(mass); + if(mass) + mdef->mhp -= mass ; + if (vis) pline("%s disintegrates!", Monnam(magr)); + mondead_helper(magr,mattk->adtyp); + if (magr->mhp > 0) return -1; + else if (magr->mtame && !vis) + You(brief_feeling, "peculiarly sad"); + return -MM_AGR_DIED; + } + } + return tmp; +} +#endif + /* * See comment at top of mattackm(), for return values. */ STATIC_OVL int @@ -579,8 +781,24 @@ struct permonst *pa = magr->data, *pd = mdef->data; int armpro, num, tmp = d((int)mattk->damn, (int)mattk->damd); boolean cancelled; +#ifdef WEBB_DISINT + int def_disintegrated; + if (touch_disintegrates(pd) && + (def_disintegrated = defdisintagr(magr, mdef, mattk)) != -2 ) + switch (def_disintegrated){ + case -MM_AGR_DIED: + return MM_AGR_DIED; + break; + case -1: + return 0; + break; + default: + tmp = def_disintegrated; + break; + } +#endif if (touch_petrifies(pd) && !resists_ston(magr)) { long protector = attk_protection((int)mattk->aatyp), wornitems = magr->misc_worn_check; @@ -777,16 +995,25 @@ if (!rn2(6)) erode_obj(MON_WEP(mdef), TRUE, TRUE); break; case AD_RUST: if (magr->mcan) break; - if (pd == &mons[PM_IRON_GOLEM]) { +#ifdef WEBB_BIODIVERSITY + if (does_rust(pd)) +#else + if (pd == &mons[PM_IRON_GOLEM]) +#endif + { if (vis) pline("%s falls to pieces!", Monnam(mdef)); mondied(mdef); if (mdef->mhp > 0) return 0; else if (mdef->mtame && !vis) pline("May %s rust in peace.", mon_nam(mdef)); return (MM_DEF_DIED | (grow_up(magr,mdef) ? 0 : MM_AGR_DIED)); +#ifdef WEBB_WATERSPOUT_GARGOYLE + } else if (mattk->aatyp == AT_SPIT && pd == &mons[PM_GREMLIN]){ + (void)split_mon(mdef, (struct monst *) 0); +#endif } hurtmarmor(mdef, AD_RUST); mdef->mstrategy &= ~STRAT_WAITFORU; tmp = 0; @@ -893,9 +1120,13 @@ mdef->mstrategy &= ~STRAT_WAITFORU; } break; case AD_BLND: - if (can_blnd(magr, mdef, mattk->aatyp, (struct obj*)0)) { + if (can_blnd(magr, mdef, mattk->aatyp, (struct obj*)0) +#ifdef WEBB_BIODIVERSITY + && (magr->data != &mons[PM_UMBRAL_HULK] || !magr->mspec_used) +#endif + ) { register unsigned rnd_tmp; if (vis && mdef->mcansee) pline("%s is blinded.", Monnam(mdef)); @@ -973,8 +1204,111 @@ if (vis && !canspotmon(magr)) pline("%s suddenly disappears!", buf); } break; +#ifdef WEBB_GOLDBUG + case AD_EGLD: + if (pd == &mons[PM_GOLD_GOLEM]){ + Strcpy(buf, Monnam(magr)); + if (vis) pline("%s %s %s.", buf, + (magr->mcan)?"gnaws on":"chews through",mon_nam(mdef)); + (magr->mcan)?mdef->mhp-=tmp:mondied(mdef); + if (mdef->mhp > 0) return 0; + else if (mdef->mtame && !vis) + pline("May %s rest in (gold)peices.", mon_nam(mdef)); + return (MM_DEF_DIED | (grow_up(magr,mdef) ? + 0 : MM_AGR_DIED)); + } + else{ + struct obj * geatme; + int how = 0; + tmp = 0; +#ifndef GOLDOBJ + geatme = g_at(mdef->mx, mdef->my); + if (geatme){ + if(magr->mcan){ + magr->mgold += geatme->quan; + } else { + int metab_time = magr->mhpmax - magr->mhp; + if (geatme->quan < metab_time) metab_time = geatme->quan; + magr->mspec_used += metab_time/2 + 1; /* instead of meating */ + } + if (meatmetal_effects(magr, geatme) == 3) return MM_AGR_DIED; + newsym(mdef->mx, mdef->my); + if(cansee(mdef->mx, mdef->my)){ + if (canseemon(mdef)) + Sprintf(buf, "from under %s", mon_nam(mdef)); + pline("%s quickly %s some gold%s!", + Monnam(magr), (magr->mcan)?"nabs":"gnoshes on", buf); + break; + } + } +#endif /*GOLDOBJ */ + if (geatme = + ochain_has_material(level.objects[mdef->mx][mdef->my], GOLD, 0)){ + obj_extract_self(geatme); + if (canseemon(mdef)) + Sprintf(buf, "from under %s", mon_nam(mdef)); + } else if ( geatme = ochain_has_material(mdef->minvent, GOLD, 0)){ +#ifdef GOLDOBJ + if (geatme->otyp == GOLD_PIECE){ + int tmp; + const int gold_price = objects[GOLD_PIECE].oc_cost; + Strcpy(buf, s_suffix(mon_nam(mdef))); + if (mdef->data == &mons[PM_LEPRECHAUN] ){ + pline("%s tries to get %s money, but fails...", + Monnam(magr), buf); + break; + } + tmp = (somegold(money_cnt(mdef->minvent)) + gold_price - 1) + / gold_price; + tmp = min(tmp, geatme->quan); + if (tmp < geatme->quan) geatme = splitobj(geatme, tmp); + obj_extract_self(geatme); + } else +#endif + obj_extract_self(geatme); + } + if (geatme){ + if (!(magr->mcan || geatme->otyp == AMULET_OF_STRANGULATION || + geatme->otyp == RIN_SLOW_DIGESTION)){ + magr->mspec_used += geatme->owt/2 + 1; /* instead of meating */ + how = 1; + } + pline("%s %s %s%s!", + Monnam(magr), (how)?"gobbles":"nabs", yname(geatme), buf); + if (how){ + if (meatmetal_effects(magr, geatme) == 3) return MM_AGR_DIED; + } else + mpickobj(magr, geatme); + + break; + } +#ifndef GOLDOBJ + if (mdef->mgold) { + int tmp = mdef->mgold; + if (mdef->data == &mons[PM_LEPRECHAUN] ){ + Strcpy(buf, s_suffix(mon_nam(mdef))); + pline("%s tries to get %s money, but fails...", + Monnam(magr), buf); + break; + } + mdef->mgold = 0; + Your("purse feels lighter."); + if (magr->mcan){ + magr->mgold += tmp; + break; + } else if (tmp > magr->mhpmax - magr->mhp){ + tmp = magr->mhpmax - magr->mhp; + magr->mspec_used = tmp; + magr->mhp+=tmp; + break; + } + } +#endif /*GOLDOBJ */ + } + break; +#endif /* WEBB_GOLDBUG */ case AD_DRLI: if (!cancelled && !rn2(3) && !resists_drli(mdef)) { tmp = d(2,6); if (vis) @@ -992,8 +1326,20 @@ case AD_SITM: /* for now these are the same */ case AD_SEDU: if (magr->mcan) break; /* find an object to steal, non-cursed if magr is tame */ +#ifdef WEBB_SATYR + else if(magr->data == &mons[PM_SATYR]){ + if (obj = mon_has_item(magr, WOODEN_FLUTE, 1)){ + Strcpy(buf, Monnam(magr)); + pline("%s plays the %s for %s.", buf, + distant_name(obj, xname), mon_nam(mdef)); + mcharmm(magr, mdef, tmp); + } + tmp = 0; + break; + } +#endif for (obj = mdef->minvent; obj; obj = obj->nobj) if (!magr->mtame || !obj->cursed) break; @@ -1113,11 +1459,142 @@ case AD_ENCH: /* there's no msomearmor() function, so just do damage */ /* if (cancelled) break; */ break; +#ifdef WEBB_DISINT + case AD_DISN: /* only hit torso aromor */ + if (!magr->mcan && magr->mhp > 6){ + struct obj * otch = 0; + int recip_dam = 0; + if (otch = which_armor(mdef, W_ARMS)){ + if(oresist_disintegration(otch)) + otch = 0; + } else if (otch = which_armor(mdef, W_ARMC)) { + if (oresist_disintegration(otch)) + otch = 0; + } else if (otch = which_armor(mdef, W_ARM)) { + if (oresist_disintegration(otch)) + otch = 0; +#ifdef TOURIST + } else if (otch = which_armor(mdef, W_ARMU)) { + if (oresist_disintegration(otch)) + otch = 0; +#endif + } else { + recip_dam = minstadisintegrate(mdef); + } + if (recip_dam) { + tmp = 0; + } else if (otch) { + recip_dam = otch->owt; + weight_dmg(recip_dam); + if(canseemon(mdef)) + pline("%s %s disintegrates!", + s_suffix(Monnam(mdef)), distant_name(otch, xname)); + m_useup(mdef,otch); + tmp = 0; + } + magr->mhp -= recip_dam; + if (!mdef->mhp) + return (MM_DEF_DIED | (grow_up(magr,mdef) ? + 0 : MM_AGR_DIED)); + } + break; +#endif +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + if (cancelled) { + tmp = 0; + break; + } + if (vis) + pline("%s is %s!", Monnam(mdef), + on_fire(mdef->data, mattk)); + if (resists_fire(mdef)) { + if (vis) + pline_The("steam doesn't seem to burn %s much!", + mon_nam(mdef)); + shieldeff(mdef->mx, mdef->my); + tmp = 0; + } + /* only potions damage resistant players in destroy_item */ + tmp += destroy_mitem(mdef, POTION_CLASS, AD_FIRE); + if(!rn2(10)) hurtmarmor(mdef, AD_RUST); + break; + case AD_HNGY: + tmp = 0; + if (cancelled || !mdef->mtame) break; + EDOG(mdef)->hungrytime -= 50; + + magr->mspec_used = magr->mspec_used + 50; + if (canseemon(mdef)) + pline("%s %s rumbles.", + s_suffix(Monnam(mdef)), mbodypart(mdef,STOMACH)); + break; + case AD_FLVR: + if (cancelled){ tmp = 0; break;} + switch (rn2(6)){ + case 0: /* up, copied from muse: MUSE_POT_GAIN_LEVEL */ + if (Can_rise_up(mdef->mx, mdef->my, &u.uz)){ + register int tolev=depth(&u.uz)-1; + d_level tolevel; + get_level(&tolevel, tolev); + if(on_level(&tolevel, &u.uz)) goto mhitm_flvr_strange; + if (vis) + pline("%s rises up, through the %s!", + Monnam(mdef), ceiling(mdef->mx, mdef->my)); + migrate_to_level(mdef, ledger_no(&tolevel), + MIGR_RANDOM, (coord *)0); + break; + } + else{goto mhitm_flvr_strange;} + break; + case 1: /* down */ + if (Can_fall_thru(&u.uz) /* && !In_sokoban(&u.uz)*/ ){ + register int tolev=depth(&u.uz)+1; + d_level tolevel; + get_level(&tolevel, tolev); + if (mon_has_amulet(mdef) || In_endgame(&u.uz) + || on_level(&tolevel, &u.uz)) + goto mhitm_flvr_strange; + if (vis) + pline("%s sinks down, through the %s!", + Monnam(mdef), surface(mdef->mx, mdef->my)); + migrate_to_level(mdef,ledger_no(&tolevel), + MIGR_RANDOM, (coord *)0); + break; + } + else goto mhitm_flvr_strange; + case 2: /* top, teleport to dlev1, top level of branch? */ + case 3: /* bottom, teleport to Moloch's sanctum, bot lev of branch? */ + case 4: /* strange */ +mhitm_flvr_strange: + if (vis) pline("%s reacts strangely.", Monnam(mdef)); + mdef->mconf = 1; + mdef->mstrategy &= ~STRAT_WAITFORU; + break; + case 5: /* charm, fall through */ +#ifdef WEBB_MCHARM + magr->mspec_used += mcharmm(magr, mdef, tmp); + tmp = 0; +#else + goto mhitm_flvr_strange; +#endif + } + break; +#endif +#ifdef WEBB_MCHARM + case AD_CHRM: + magr->mspec_used += mcharmm(magr, mdef, tmp); + tmp = 0; + break; +#endif default: tmp = 0; break; } +#ifdef WEBB_TURTLE + if(mdef->data->mlet == S_TURTLE && mdef->mflee) tmp=tmp/2; +#endif if(!tmp) return(MM_MISS); if((mdef->mhp -= tmp) < 1) { if (m_at(mdef->mx, mdef->my) == magr) { /* see gulpmm() */ @@ -1361,8 +1838,12 @@ makeplural(stagger(magr->data, "stagger"))); } tmp = 0; break; +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + if(!rn2(3)) hurtmarmor(mdef, AD_RUST); +#endif case AD_FIRE: if (resists_fire(magr)) { if (canseemon(magr)) { pline("%s is mildly warmed.", Monnam(magr)); @@ -1441,8 +1922,59 @@ } return w_mask; } +#ifdef WEBB_MCHARM +/* the return value represents how much value to add to the mspec_used of + the agressor */ +int +mcharmm(magr, mdef, tmp) +struct monst * magr, * mdef; +int tmp; +{ + if (magr->mcan || magr->mspec_used) { + return 0; + } else { + int mresistm = resist(mdef, -(char)magr->m_lev, 0, 0); + char mdef_Name[BUFSZ]; + Strcpy(mdef_Name, Monnam(mdef)); + if (Conflict && (magr->mpeaceful || !(magr->mpeacetim))){ + if (!mresistm){ + mdef->mtame = mdef->mpeaceful = 0; + if (mdef->mpeacetim < 0x7e){ + if (canseemon(mdef)) + pline("%s is charmed by %s.", mdef_Name, mon_nam(magr)); + } + if (mdef->mpeacetim != 0x7f){ + int p = mdef->mpeacetim+rnd(magr->m_lev)*20; + mdef->mpeacetim = min(0x7e,p); + } + return 10 + rnd(10); + } + } else if (mdef->mtame){ + if (!mresistm){ + mdef->mtame = 0; + if (canseemon(mdef)) + pline("%s finds %s more charming than you.", + mdef_Name, mon_nam(magr)); + return 10+rnd(10); + } + } else if (magr->mtame){ + if (!mresistm){ + if (mdef->mpeacetim) { + mdef->mpeacetim = 0; + if (mdef->mpeaceful && canseemon(mdef)) + pline("%s is charmed by %s.", + mdef_Name, mon_nam(magr)); + return 10+rnd(10); + } + } + } + } + return 0; +} +#endif /* WEBB_MCHARM */ + #endif /* OVLB */ /*mhitm.c*/ diff -rwBEN -U4 nethack-3.4.2-test/src/mhitu.c nethack-3.4.2-diff/src/mhitu.c --- nethack-3.4.2-test/src/mhitu.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mhitu.c 2003-11-30 09:37:34.000000000 -0600 @@ -25,10 +25,11 @@ STATIC_DCL int FDECL(explmu, (struct monst *,struct attack *,BOOLEAN_P)); STATIC_DCL void FDECL(missmu,(struct monst *,BOOLEAN_P,struct attack *)); STATIC_DCL void FDECL(mswings,(struct monst *,struct obj *)); STATIC_DCL void FDECL(wildmiss, (struct monst *,struct attack *)); - +#ifndef WEBB_WATERSPOUT_GARGOYLE /* moved to include/extern.h otherwise */ STATIC_DCL void FDECL(hurtarmor,(int)); +#endif STATIC_DCL void FDECL(hitmsg,(struct monst *,struct attack *)); /* See comment in mhitm.c. If we use this a lot it probably should be */ /* changed to a parameter to mhitu. */ @@ -72,8 +73,13 @@ case AT_TENT: pline("%s tentacles suck you!", s_suffix(Monnam(mtmp))); break; +#ifdef WEBB_BIODIVERSITY + case AT_HUGS: + pline("%s squeezes you!", Monnam(mtmp)); + break; +#endif case AT_EXPL: case AT_BOOM: pline("%s explodes!", Monnam(mtmp)); break; @@ -171,9 +177,15 @@ mattk->aatyp == AT_BUTT || nolimbs(mtmp->data)) ? "lunges" : "swings"; if (compat) +#ifdef WEBB_SATYR + pline("%s tries to %s and misses!", Monnam(mtmp), + (mattk->aatyp == AT_NTCH)?"hit the high note": /* satyr */ + "touch you"); +#else pline("%s tries to touch you and misses!", Monnam(mtmp)); +#endif else switch(rn2(3)) { case 0: pline("%s %s wildly and misses!", Monnam(mtmp), swings); @@ -438,9 +450,10 @@ return(0); } /* player might be mimicking an object */ - if (youmonst.m_ap_type == M_AP_OBJECT && !range2 && foundyou && !u.uswallow) { + if (youmonst.m_ap_type == M_AP_OBJECT && + !range2 && foundyou && !u.uswallow) { if (!youseeit) pline("%s %s!", Something, (likes_gold(mtmp->data) && youmonst.mappearance == GOLD_PIECE) ? "tries to pick you up" : "disturbs you"); @@ -526,11 +539,25 @@ for(i = 0; i < NATTK; i++) { sum[i] = 0; mattk = getmattk(mdat, i, sum, &alt_attk); +#ifdef WEBB_BIODIVERSITY + if (mdat == & mons[PM_CLOCKWORK_AUTOMATON]){ + if ((mtmp->mspec_used < CLOCKWORK_PANIC) || + (mtmp->mspec_used < CLOCKWORK_LOW && i) || + (mtmp->mspec_used < CLOCKWORK_MED && i>=2) || + (mtmp->mspec_used < CLOCKWORK_HIGH && i>=4) ) + continue; + else + mtmp->mspec_used -= 15; + } +#endif if (u.uswallow && (mattk->aatyp != AT_ENGL)) continue; switch(mattk->aatyp) { +#ifdef WEBB_CARROLL + use_natural: +#endif case AT_CLAW: /* "hand to hand" attacks */ case AT_KICK: case AT_BITE: case AT_STNG: @@ -550,8 +577,21 @@ wildmiss(mtmp, mattk); } break; +#ifdef WEBB_SATYR + case AT_NTCH: + if(!range2){ + if (foundyou){ + if(tmp > (j = rnd(20+1))){ + sum[i] = hitmu(mtmp, mattk); + } else + missmu(mtmp, (tmp == j), mattk); + } else + wildmiss(mtmp, mattk); + } + break; +#endif case AT_HUGS: /* automatic if prev two attacks succeed */ /* Note: if displaced, prev attacks never succeeded */ if((!range2 && i>=2 && sum[i-1] && sum[i-2]) || mtmp == u.ustuck) @@ -570,8 +610,18 @@ if(!range2) sum[i] = explmu(mtmp, mattk, foundyou); break; case AT_ENGL: +#ifdef WEBB_CARROLL + if (mdat == &mons[PM_BANDERSNATCH] && !yeasty_food(youmonst.data)){ + mattk->aatyp = AT_BITE; + mattk->adtyp = AD_PHYS; + mattk->damn = 1; + mattk->damd = 5; + goto use_natural; + break; + } +#endif if (!range2) { if(foundyou) { if(u.uswallow || tmp > (j = rnd(20+i))) { /* Force swallowing monster to be @@ -603,9 +653,13 @@ if(range2) sum[i] = spitmu(mtmp, mattk); /* Note: spitmu takes care of displacement */ break; case AT_WEAP: - if(range2) { + if(range2 +#ifdef WEBB_BIODIVERSITY + || mtmp->data == &mons[PM_POLTERGEIST] +#endif + ) { #ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) #endif thrwmu(mtmp); @@ -664,8 +718,11 @@ } } if(sum[i] == 2) return 1; /* attacker dead */ if(sum[i] == 3) break; /* attacker teleported, no more attacks */ +#ifdef WEBB_BIODIVERSITY + if(sum[i] == 4) return -1; /* you teleported, no more attacks at all */ +#endif /* sum[i] == 0: unsuccessful attack */ } return(0); } @@ -676,9 +733,12 @@ /* * helper function for some compilers that have trouble with hitmu */ -STATIC_OVL void +#ifndef WEBB_WATERSPOUT_GARGOYLE +STATIC_OVL +#endif + void hurtarmor(attk) int attk; { int hurt; @@ -858,14 +918,23 @@ /* If the monster is undetected & hits you, you should know where * the attack came from. */ - if(mtmp->mundetected && (hides_under(mdat) || mdat->mlet == S_EEL)) { + if(mtmp->mundetected && (hides_under(mdat) || mdat->mlet == S_EEL +#ifdef WEBB_BIODIVERSITY + || mdat == &mons[PM_LABYRINTH_TRAPPER] +#endif + )) { mtmp->mundetected = 0; if (!(Blind ? Blind_telepat : Unblind_telepat)) { struct obj *obj; const char *what; +#ifdef WEBB_BIODIVERSITY + if( mdat == &mons[PM_LABYRINTH_TRAPPER] ) + pline("%s came out the wall!", Amonnam(mtmp)); + else +#endif if ((obj = level.objects[mtmp->mx][mtmp->my]) != 0) { if (Blind && !obj->dknown) what = something; else if (is_pool(mtmp->mx, mtmp->my) && !Underwater) @@ -1236,8 +1305,100 @@ if (youmonst.data->mlet == mdat->mlet) break; if(!mtmp->mcan) stealgold(mtmp); break; +#ifdef WEBB_GOLDBUG + case AD_EGLD: + if (u.umonnum == PM_GOLD_GOLEM){ + pline("%s gnaws on you!", Monnam(mtmp)); + (mtmp->mcan)?dmg=1:rehumanize(); + } else{ + struct obj * geatme; + int how = 0; + dmg = 0; + buf[0] = 0; +#ifndef GOLDOBJ + geatme = g_at(u.ux, u.uy); + if (geatme){ + if(mtmp->mcan){ + mtmp->mgold += geatme->quan; + } else { + int metab_time = mtmp->mhpmax - mtmp->mhp; + if (geatme->quan < metab_time) metab_time = geatme->quan; + mtmp->mhp += metab_time; + mtmp->mspec_used += metab_time/2 + 1; /* instead of meating */ + } + if(!Blind) + pline("%s quickly %s some gold from %s your %s!", + Monnam(mtmp), (mtmp->mcan)?"nabs":"gnoshes on", + (Levitation)?"beneath":"between", makeplural(body_part(FOOT))); + if (meatmetal_effects(mtmp, geatme) == 3) return 2; + newsym(u.ux, u.uy); + break; + } +#endif /* !GOLDOBJ */ + if (geatme = + ochain_has_material(level.objects[u.ux][u.uy], GOLD, 0)){ + obj_extract_self(geatme); + Sprintf(buf, "from %s your %s", + (Levitation)?"beneath":"between", makeplural(body_part(FOOT))); + } else if ( geatme = ochain_has_material(invent, GOLD, 0)){ +#ifdef GOLDOBJ + if (geatme->otyp == GOLD_PIECE){ + int tmp; + const int gold_price = objects[GOLD_PIECE].oc_cost; + if (u.umonnum == PM_LEPRECHAUN){ + pline("%s tries to get your money, but fails...", + Monnam(mtmp)); + break; + } + tmp = (somegold(money_cnt(invent)) + gold_price - 1) / gold_price; + tmp = min(tmp, geatme->quan); + if (tmp < geatme->quan) geatme = splitobj(geatme, tmp); + freeinv(geatme); + flags.botl = 1; + } else +#endif + obj_extract_self(geatme); + } + if (geatme){ + if (!(mtmp->mcan || geatme->otyp == AMULET_OF_STRANGULATION || + geatme->otyp == RIN_SLOW_DIGESTION)){ + mtmp->mspec_used += geatme->owt/2 + 1; /* instead of meating */ + how = 1; + } + pline("%s %s %s%s!", + Monnam(mtmp), (how)?"gobbles":"nabs", + yname(geatme), buf); + if (how){ + if (meatmetal_effects(mtmp, geatme) == 3) return 2; + } else + mpickobj(mtmp, geatme); + break; + } +#ifndef GOLDOBJ + if (u.ugold) { + int tmp; + if (u.umonnum == PM_LEPRECHAUN){ + pline("%s tries to get your money, but fails...", + Monnam(mtmp)); + break; + } + u.ugold -= (tmp = somegold()); + Your("purse feels lighter."); + if (mtmp->mcan){ + mtmp->mgold += tmp; + break; + } + if (tmp > mtmp->mhpmax - mtmp->mhp) + tmp = mtmp->mhpmax - mtmp->mhp; + mtmp->mspec_used = tmp; + mtmp->mhp+=tmp; + } +#endif /*GOLDOBJ */ + } + break; +#endif /* WEBB_GOLDBUG */ case AD_SITM: /* for now these are the same */ case AD_SEDU: if (is_animal(mtmp->data)) { hitmsg(mtmp, mattk); @@ -1250,30 +1411,71 @@ ) { pline("%s %s.", Monnam(mtmp), mtmp->minvent ? "brags about the goods some dungeon explorer provided" : "makes some remarks about how difficult theft is lately"); +#ifdef WEBB_SATYR + if (mtmp->data == &mons[PM_SATYR] && !mtmp->mspec_used){ + struct obj * o; + if(o = mon_has_item(mtmp, WOODEN_FLUTE, 1)){ + pline("%s plays %s %s.", + Monnam(mtmp), mhis(mtmp), distant_name(o,xname)); + mcharmu(mtmp, dmg, TRUE); + dmg = 0; + } + }else +#endif if (!tele_restrict(mtmp)) rloc(mtmp); return 3; } else if (mtmp->mcan) { if (!Blind) { pline("%s tries to %s you, but you seem %s.", +#ifndef WEBB_SATYR Adjmonnam(mtmp, "plain"), flags.female ? "charm" : "seduce", flags.female ? "unaffected" : "uninterested"); } - if(rn2(3)) { +#else + Adjmonnam(mtmp, "plain"), + (!flags.female)^(!mtmp->female) ? "seduce" : "charm", + (!flags.female)^(!mtmp->female) ? "uninterested" : "unaffected"); + } +#endif + if(rn2(3) +#ifdef WEBB_SATYR + && mtmp->data != &mons[PM_SATYR] +#endif + ) { if (!tele_restrict(mtmp)) rloc(mtmp); return 3; } break; } +#ifdef WEBB_SATYR + if (mtmp->data == &mons[PM_SATYR]){ + struct obj * o; + if(o = mon_has_item(mtmp, WOODEN_FLUTE, 1)){ + pline("%s plays %s %s.", Monnam(mtmp), + mhis(mtmp), distant_name(o,xname)); + if (!mcharmu(mtmp,dmg, TRUE)) break; + dmg=0; + } else + break; + } +#endif buf[0] = '\0'; switch (steal(mtmp, buf)) { case -1: return 2; case 0: break; default: +#ifdef WEBB_SATYR + if(mtmp->data == &mons[PM_SATYR]){ + pline("%s thanks you for the gift.", Monnam(mtmp)); + return 3; + break; + } +#endif if (!is_animal(mtmp->data) && !tele_restrict(mtmp)) rloc(mtmp); if (is_animal(mtmp->data) && *buf) { if (canseemon(mtmp)) @@ -1313,9 +1515,13 @@ break; case AD_RUST: hitmsg(mtmp, mattk); if (mtmp->mcan) break; +#ifdef WEBB_BIODIVERSITY + if (does_rust(youmonst.data)){ +#else if (u.umonnum == PM_IRON_GOLEM) { +#endif You("rust!"); /* KMH -- this is okay with unchanging */ rehumanize(); break; @@ -1519,11 +1725,280 @@ if (drain_item(obj)) { Your("%s less effective.", aobjnam(obj, "seem")); } + } break; - default: dmg = 0; +#ifdef WEBB_DISINT + case AD_DISN: + hitmsg(mtmp, mattk); + if (!mtmp->mcan && mtmp->mhp>6){ + int mass = 0, touched = 0; + struct obj * destroyme = 0; + if (Disint_resistance) { + break; + } + if (uarms) { + if(!oresist_disintegration(uarms)) + destroyme = uarms; + } else { + switch (rn2(10)){ /* where it hits you */ + case 0: /* head */ + case 1: + if (uarmc && (uarmc->otyp == DWARVISH_CLOAK || + uarmc->otyp == MUMMY_WRAPPING)){ + if(!oresist_disintegration(uarmc)){ + destroyme = uarmc; + } + } else if (uarmh) { + if(!oresist_disintegration(uarmh)){ + destroyme = uarmh; + } + } else + touched = 1; + break; + case 2: /* feet */ + if (uarmf) { + if(!oresist_disintegration(uarmf)) + destroyme = uarmf; + } else + touched = 1; + break; + case 3: /* hands (right) */ + case 4: + if (uwep) { + if (!oresist_disintegration(uwep)){ + struct obj * otmp = uwep; + mass = otmp->owt; + u.twoweap = FALSE; + uwepgone(); + useup(otmp); + dmg = 0; + } + } else if (uarmg) { + if (!oresist_disintegration(uarmg)) + destroyme = uarmg; + } else + touched = 1; + break; + default: /* main body hit */ + if (uarmc){ + if(!oresist_disintegration(uarmc)) + destroyme = uarmc; + } else if (uarm){ + if(!oresist_disintegration(uarm)) + destroyme = uarm; +#ifdef TOURIST + } else if (uarmu) { + if(!oresist_disintegration(uarmu)) + destroyme = uarmu; +#endif + } else + touched = 1; + break; + } + } + if (destroyme){ + mass = destroyme->owt; + destroy_arm(destroyme); + dmg = 0; + } else if(touched){ + int recip_damage = instadisintegrate(mtmp->data->mname); + if (recip_damage){ + dmg=0; + mtmp->mhp -= recip_damage; + } + } + if (mass){ + weight_dmg(mass); + mtmp->mhp -= mass; + } + } + break; +#endif +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + hitmsg(mtmp,mattk); + if (uncancelled) { + pline("You're %s!", on_fire(youmonst.data, mattk)); + if (Fire_resistance) { + pline_The("steam doesn't feel hot."); + dmg = 0; + } + if((int) mtmp->m_lev > rn2(20)) + destroy_item(POTION_CLASS, AD_FIRE); + if(!rn2(10)) hurtarmor(AD_RUST); + } else dmg = 0; + break; + case AD_SHOE: + /* curse shoes, steal alt shoes, fumblize shoes, damage shoes */ + if (uarmf && !mtmp->mcan){ + dmg = 0; + if (canseemon(mtmp)) + pline("%s damages %s with %s little tools!", + Monnam(mtmp), yname(uarmf), mhis(mtmp)); + else + You_feel("some malicious cobbling!"); + switch(rnd(3)){ + case 0: + if (uarmf->otyp != LOW_BOOTS && uarmf->otyp != HIGH_BOOTS && + uarmf->otyp != IRON_SHOES && uarmf->otyp != FUMBLE_BOOTS){ + otmp = uarmf; + Boots_off(); + otmp->otyp = (!rn2(4)) ? FUMBLE_BOOTS : + (otmp->otyp == KICKING_BOOTS) ? IRON_SHOES : LOW_BOOTS; + setworn(otmp, W_ARMF); + Boots_on(); + break; + } + case 1: + if (uarmf->blessed){ + unbless(uarmf); + break; + } else if(!(uarmf->cursed)){ + curse(uarmf); + break; + } + case 2: + --uarmf->spe; + adj_abon(uarmf, -1); /* in case a boot is added that needs it */ + break; + } + } + hitmsg(mtmp, mattk); + break; + case AD_FLVR: + if (mtmp->mcan || (rn2(5) > armpro) || !rn2(50) || mtmp->mspec_used){ + dmg = 0; + break; + } + hitmsg(mtmp, mattk); + switch (rn2(6)){ + case 0: /* up, copied from muse: MUSE_POT_GAIN_LEVEL */ + if((ledger_no(&u.uz) == 1 && u.uhave.amulet) || + Can_rise_up(u.ux, u.uy, &u.uz)) { + const char *riseup ="rise up, through the %s!"; + mtmp->mspec_used = mtmp->mspec_used + (dmg + rn2(6)); + if(ledger_no(&u.uz) == 1) { + You(riseup, ceiling(u.ux,u.uy)); + schedule_goto(&earth_level, FALSE, FALSE, FALSE, 0, 0); + return 4; + break; + } else { + register int newlev = depth(&u.uz)-1; + d_level newlevel; + get_level(&newlevel, newlev); + if(on_level(&newlevel, &u.uz)) { + goto mhitu_flvr_strange; + break; + } else You(riseup, ceiling(u.ux,u.uy)); + schedule_goto(&newlevel, FALSE, FALSE, FALSE, 0, 0); + return 4; + break; + } + } else + goto mhitu_flvr_strange; + break; + case 1: /* down */ + if (Can_fall_thru(&u.uz) && !In_sokoban(&u.uz) ){ + d_level dtmp; + mtmp->mspec_used = mtmp->mspec_used + (dmg + rn2(6)); + pline("You sink down, through the %s!",surface(u.ux,u.uy)); + if(*u.ushops) shopdig(1); + if (Is_stronghold(&u.uz)) { + find_hell(&dtmp); + } else { + dtmp.dnum = u.uz.dnum; + dtmp.dlevel = dunlev(&u.uz)+1; + } + schedule_goto(&dtmp, FALSE, FALSE, FALSE, 0, 0); + return 4; + break; + } else + goto mhitu_flvr_strange; + break; + case 2: /* top, teleport to dlev1, top level of branch? */ + case 3: /* bottom, teleport to sanctum, bot lev of branch? */ + if(!In_sokoban(&u.uz) && !(In_quest(&u.uz)) && !In_endgame(&u.uz)){ + int i,j; + struct monst * mamu; + d_level newlev; + if (u.uhave.amulet) + mamu = 0; + else { + for(i=u.ux-1;iiswiz && mon_has_amulet(mtmp))){ + i=u.ux+2; + break; + } else { + mamu = 0; + } + } + j = 0; /* Truth of Truth/Beauty */ + if (u.uhave.amulet || mamu){ + sprintf(buf, "are back at the bottom!"); + newlev = sanctum_level; + } else if ((u.uevent.invoked && !mamu) || rn2(2)){ + if (Is_knox(&u.uz)) goto mhitu_flvr_strange; + sprintf(buf,"are back at the top!"); + get_level(&newlev, 1); + j = 1; + } else { + get_level(&newlev, deepest_lev_reached(FALSE)); + sprintf(buf,"have reached the %s", + on_level(&newlev,&sanctum_level)?"bottom!":"...bottom?"); + } + if(on_level(&newlev,&u.uz)) goto mhitu_flvr_strange; + schedule_goto(&newlev, FALSE, FALSE, FALSE, 0, 0); + You(buf); + if (j){ + if (Hallucination) + make_hallucinated(0,FALSE,0); + exercise(A_WIS, TRUE); + You("see the Truth!"); + } else { + if (adjattrib, A_CHA, 1) + pline("You gain an air of Beauty."); + } + return 4; + } + break; + case 4: /* strange */ +mhitu_flvr_strange: + mtmp->mspec_used = mtmp->mspec_used + (dmg + rn2(6)); + if(Confusion||Hallucination) + pline("Things are getting even stranger."); + else + pline("Things are getting strage."); + make_confused(HConfusion + dmg + rn2(3), FALSE); + if (!(u.umonnum == PM_BLACK_LIGHT || + u.umonnum == PM_VIOLET_FUNGUS || + dmgtype(youmonst.data, AD_STUN))){ + make_hallucinated(HHallucination + (long)dmg+rn2(3),FALSE,0L); + } + break; + case 5: /* charm */ +#ifdef WEBB_MCHARM + if (!mtmp->mpeaceful || mtmp->mpeacetim) + mcharmu(mtmp, dmg, TRUE); + else +#endif + goto mhitu_flvr_strange; + } + dmg=0; + break; +#endif +#ifdef WEBB_MCHARM + case AD_CHRM: + mcharmu(mtmp, dmg, FALSE); + dmg=0; + break; +#endif + default: + dmg = 0; break; } if(u.uhp < 1) done_in_by(mtmp); @@ -1746,8 +2221,21 @@ } else You("are burning to a crisp!"); burn_away_slime(); } else tmp = 0; break; +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + if(!mtmp->mcan && rn2(2)) { + if (Fire_resistance) { + shieldeff(u.ux, u.uy); + You_feel("mildly hot."); + tmp=0; + }else + pline("You're %s!", on_fire(youmonst.data, mattk)); + if(!rn2(3)) hurtarmor(AD_RUST); + } else tmp = 0; + break; +#endif case AD_DISE: if (!diseasemu(mtmp->data)) tmp = 0; break; default: @@ -1796,8 +2284,11 @@ switch (mattk->adtyp) { case AD_COLD: not_affected |= Cold_resistance; goto common; +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: +#endif case AD_FIRE: not_affected |= Fire_resistance; goto common; case AD_ELEC: @@ -1921,8 +2412,15 @@ s_suffix(Monnam(mtmp))); else You("are getting more and more confused."); make_confused(HConfusion + conf, FALSE); +#ifdef WEBB_TREE + if(mtmp->data == &mons[PM_LESHY] && !rn2(5)){ + You_feel("a little lost"); + forget_map(0); + docrt(); + } +#endif stop_occupation(); } break; case AD_STUN: @@ -1937,8 +2435,20 @@ stop_occupation(); } break; case AD_BLND: +#ifdef WEBB_BIODIVERSITY + if (mtmp->data == &mons[PM_UMBRAL_HULK]){ + if (!mtmp->mspec_used && !Blind && couldsee(mtmp->mx, mtmp->my) && + can_blnd(mtmp, &youmonst, mattk->aatyp, (struct obj*)0)) { + pline("You meet %s gaze! The shadows merge into utter darkness!", + s_suffix(mon_nam(mtmp)) ); + make_blinded(Blinded + d((int)mattk->damn, (int)mattk->damd), FALSE); + if (!Blind) Your(vision_clears); + } + break; + } +#endif if (!mtmp->mcan && canseemon(mtmp) && !resists_blnd(&youmonst) && distu(mtmp->mx,mtmp->my) <= BOLT_LIM*BOLT_LIM) { int blnd = d((int)mattk->damn, (int)mattk->damd); @@ -1974,8 +2484,67 @@ destroy_item(SPBOOK_CLASS, AD_FIRE); if (dmg) mdamageu(mtmp, dmg); } break; +#ifdef WEBB_BIODIVERSITY + case AD_PLYS: + if(!mtmp->mcan && mtmp->mcansee && !mtmp->mspec_used && rn2(4) && + multi>=0 && !((is_undead(youmonst.data)||is_demon(youmonst.data)) + && is_undead(mtmp->data))){ + pline("%s aberrant stare frightens you to the %s!", + s_suffix(Monnam(mtmp)), has_bones(youmonst.data)?"marrow":"core"); + if(Free_action){ + pline("But you quickly regain composure."); + } + else { + int prlys = d((int)mattk->damn, (int)mattk->damd); + nomul(-prlys); + nomovemsg = 0; /* default: "you can move again" */ + + if(!mtmp->cham && mtmp->data == &mons[PM_NOSFERATU] && + !mtmp->mcan && !rn2(3)){ + pline("%s summons help!", Monnam(mtmp)); + if (!were_summon(&mons[PM_WERERAT], FALSE)) + pline("But none comes."); + } + mtmp->mspec_used += prlys*3/2 + rn2(prlys); + } + } + break; + case AD_HNGY: + if(!mtmp->mcan && canseemon(mtmp) && + couldsee(mtmp->mx, mtmp->my) && !is_fainted() && + mtmp->mcansee && !mtmp->mspec_used && rn2(5)) { + int hunger = 20 + d(3,4); + + mtmp->mspec_used = mtmp->mspec_used + (hunger + rn2(6)); + pline("%s gaze reminds you of delicious %s.", + s_suffix(Monnam(mtmp)), fruitname(FALSE)); + morehungry(hunger); + } + break; +#endif +#ifdef WEBB_CARROLL + case AD_DRIN: /* not gaze/sight based. */ + if(!mtmp->mcan && couldsee(mtmp->mx, mtmp->my) && + (!ublindf || ublindf->otyp != TOWEL) && + !mtmp->mspec_used){ + pline("%s screeches at you!", Monnam(mtmp)); + if (u.usleep){ + multi = -1; + nomovemsg = "You wake."; + } + if (ABASE(A_INT) > ATTRMIN(A_INT) && !rn2(3)) { + /* adjattrib gives dunce cap message when appropriate */ + (void) adjattrib(A_INT, -1, FALSE); + losespells(); + forget_map(0); + docrt(); + } + mtmp->mspec_used += ABASE(A_INT) * rn1(1,3); + } + break; +#endif #ifdef PM_BEHOLDER /* work in progress */ case AD_SLEE: if(!mtmp->mcan && canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee && @@ -2000,8 +2569,37 @@ } return(0); } +#ifdef WEBB_MCHARM +/* return 1 charmed, 0 uncharmed */ +int +mcharmu(mtmp, amt, always) +struct monst * mtmp; +int amt; +int always; +{ + if(!mtmp->mcan && !mtmp->mspec_used && + (always || ( (mtmp->mhp<=mtmp->mhpmax/2 || mtmp->mhp<=10) && + (!mtmp->mpeaceful || mtmp->mpeacetim)) )){ + mtmp->mspec_used = mtmp->mspec_used + (amt + rn2(6)); + if (rn2(30)+mtmp->m_lev > ACURR(A_CHA) + ACURR(A_INT)) { + mtmp->malign = -15; + mtmp->mpeaceful=1; + if(!rnd(3)) mtmp->mpeacetim=0x7f; + if (mtmp->mpeacetim != 0x7f){ + int p = mtmp->mpeacetim+30*(1+rnd(mtmp->m_lev)); + mtmp->mpeacetim = min(0x7e,p); + } + You("find %s charming.", mon_nam(mtmp)); + return 1; + } else + You("find %s uncharming.", mon_nam(mtmp)); + } + return 0; +} +#endif /* WEBB_MCHARM */ + #endif /* OVLB */ #ifdef OVL1 void @@ -2533,8 +3131,11 @@ makeplural(stagger(mtmp->data, "stagger"))); } tmp = 0; break; +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: +#endif case AD_FIRE: /* Red mold */ if (resists_fire(mtmp)) { shieldeff(mtmp->mx, mtmp->my); pline("%s is mildly warm.", Monnam(mtmp)); diff -rwBEN -U4 nethack-3.4.2-test/src/miditest.c nethack-3.4.2-diff/src/miditest.c --- nethack-3.4.2-test/src/miditest.c 1969-12-31 18:00:00.000000000 -0600 +++ nethack-3.4.2-diff/src/miditest.c 2003-11-30 09:37:34.000000000 -0600 @@ -0,0 +1,284 @@ +#include "hack.h" +#ifdef WEBB_MUSIC +#ifdef WIN32 + + +#include +#include +#include +#include "onames.h" + +MMRESULT (_stdcall *fpMidiOutOpen)(LPHMIDIOUT,unsigned int,unsigned long,unsigned long,unsigned long); +MMRESULT (_stdcall *fpMidiOutShortMsg)(HMIDIOUT, DWORD); +MMRESULT (_stdcall *fpMidiOutClose)(HMIDIOUT); + +DWORD instruments[]={ 0x004EC0, 0x005DC0, 0x004BC0, 0x0055C0, + 0x003CC0, 0x007AC0, 0x7F7EC0, 0x000000, + 0x0018C0, 0x002EC0, 0x000EC0, 0x0039C0, + 0x002FC0, 0x0074C0, 0x0068C0, 0x000000, + 0x003CC1, 0x0034C1}; +/* {TIN_WHISTLE, MAGIC_WHISTLE, WOODEN_FLUTE, MAGIC_FLUTE, + TOOLED_HORN, FROST_HORN, FIRE_HORN, PLENTY, + WOODEN_HARP, MAGIC_HARP, BELL, BUGLE, + EATHER_DRUM, DRUM_OF_EARTHQUAKE, DIVINE, BLANK, + ROST_HORN_B, DIVINE_B}; + there just happens to be 4 objects between drum of earthquake and bell of opening. we use the indices for special sounds. */ + +#define DIVINE DRUM_OF_EARTHQUAKE+1 +#define FROST_HORN_B DIVINE+2 +#define DIVINE_B FROST_HORN_B+1 + +#define FIRE_HORN_B FROST_HORN_B + + DWORD notes[]= + {0x403C90,0x403D90,0x403E90,0x403F90,0x404090,0x404190, + 0x404290,0x404390,0x404490,0x404590,0x404690,0x404790,0x000090}; + + enum{ C_NAT, C_SHARP, D_NAT, D_SHARP, E_NAT, F_NAT, + F_SHARP, G_NAT, G_SHARP, A_NAT, A_SHARP, B_NAT, REST}; + + enum{B_SHARP, D_FLAT, D_NT2, E_FLAT, F_FLAT, E_SHARP, + G_FLAT, G_NT2, A_FLAT, A_NT2, B_FLAT, C_FLAT}; + #define STOP 0x10 + + DWORD effects[] = {0x607FFF,0x007FD0}; + enum{MASTER_VOL,AFTERTOUCH}; + + + + + + +struct midi_inst { + int instrument; + int tempo; + HMIDIOUT midi_handle; +}; + +void +playNote(int note, float length, struct midi_inst,int note2); + + + + +int play_midi(short instrument,char * song,short known){ + + int keytune[5];// = int[5]; + float rhythym[5];// = float[5]; + unsigned int scale=B_NAT; + int i,j; + HMIDIOUT midi_out_handle; + struct midi_inst chosen_inst; + HANDLE hLibrary; /* handle for winmm.dll */ + + if(!(hLibrary = LoadLibrary("WINMM.DLL"))) return 1; + fpMidiOutOpen=GetProcAddress(hLibrary,"midiOutOpen"); + fpMidiOutShortMsg = GetProcAddress(hLibrary,"midiOutShortMsg"); + fpMidiOutClose= GetProcAddress(hLibrary,"midiOutClose"); +// fpMidiOutGetVolume = GetProcAddress(hLibrary,"midiOutGetVolume"); + if (!(fpMidiOutOpen && fpMidiOutShortMsg && fpMidiOutClose)){return 2;} + + for(i=0;i<5;i++){ + j=song[i]; + j-='C'; + if (j<-2||j>4){j=REST;} //REST + else if (j<0&&j>-3){j=7+j;} //A and B + + + switch (j){ + case(6): //6 = B(+A#+) + ++j; + case(5): //5 = A(+G#+) + ++j; + case(4): //4 = G(+F#+) + ++j; + case(3): //3 = F + case(2): //2 = E(+D#+) + ++j; + case(1): //1 = D(+C#+) + ++j; + default: //C and REST + break; + } + if(!i){ + switch(j){ + case C_NAT: + case E_NAT: + case G_NAT: + scale=C_NAT; + break; + case A_NAT: + scale=A_NAT; + break; + default: + scale=B_NAT; + break; + } + } + if ((scale==B_NAT)&&(j==F_NAT||j==C_NAT)){++j;} + keytune[i]=j; + } + /*cout<>8)&0x000000FF; + switch (mi.instrument){ + case FIRE_HORN: + tone+=(start_tone<=0x48)?0x00002400:(start_tone<=0x54)?0x00001800:(start_tone<=0x60)?0x00000C00:0; + break; + case MAGIC_HARP: + break; + case DIVINE: + //tone+=0x00100000; + tone-=0x00000C00; + break; + case BUGLE: + case WOODEN_HARP: + tone+=(start_tone<=0x60)?0x00000C00:0; + break; +/* case DRUM_OF_EARTHQUAKE: + tone|=0x007F0000; + tone-=(start_tone<0x0C)?0:0x00000C00; + break; + case LEATHER_DRUM: + tone-=0x0001800; + break; +*/ + case FROST_HORN: + tone|=0x00600000; + break; + case TOOLED_HORN: + tone|=0x007F0000; + default: + break; + } + + + if (mi.instrument==FIRE_HORN){ + fpMidiOutShortMsg(mi.midi_handle, (notes[note]+0x00000001)|(0x00000000)); + } + else if(mi.instrument==FROST_HORN ){ + fpMidiOutShortMsg(mi.midi_handle, (notes[note]+0x00000C01)|(0x00000000)); + } + + fpMidiOutShortMsg(mi.midi_handle, tone); + + Sleep((int)(1000*length*60/mi.tempo)); + + if (mi.instrument!=MAGIC_HARP&&mi.instrument!=WOODEN_HARP){ + + fpMidiOutShortMsg(mi.midi_handle, tone-STOP); + + if (mi.instrument==FIRE_HORN){ + fpMidiOutShortMsg(mi.midi_handle, (notes[note]+0x00000001)-STOP); + } + else if(mi.instrument==FROST_HORN){ + fpMidiOutShortMsg(mi.midi_handle, (notes[note]+0x00000C01)-STOP); + } + } + else{ + + tone = notes[note]; + start_tone= tone&0x0000FF00 >>8; + switch (mi.instrument){ + case MAGIC_HARP: + tone+=(start_tone<=0x54)?0x00001800:(start_tone<=0x60)?0x00000C00:0; + break; + case WOODEN_HARP: + tone+=(start_tone<=0x60)?0x00000C00:0; + break; + default: + break; + } + fpMidiOutShortMsg(mi.midi_handle, tone-STOP); + } + return; +} +#endif +#endif diff -rwBEN -U4 nethack-3.4.2-test/src/mklev.c nethack-3.4.2-diff/src/mklev.c --- nethack-3.4.2-test/src/mklev.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mklev.c 2003-11-30 09:37:34.000000000 -0600 @@ -38,16 +38,25 @@ STATIC_PTR int FDECL( CFDECLSPEC do_comp,(const genericptr,const genericptr)); STATIC_DCL void FDECL(dosdoor,(XCHAR_P,XCHAR_P,struct mkroom *,int)); STATIC_DCL void FDECL(join,(int,int,BOOLEAN_P)); +#ifdef WEBB_ENVIRONMENT +STATIC_DCL void FDECL(do_room_or_subroom, (struct mkroom *,int,int,int,int, + BOOLEAN_P,SCHAR_P,BOOLEAN_P,BOOLEAN_P, uchar)); +#else STATIC_DCL void FDECL(do_room_or_subroom, (struct mkroom *,int,int,int,int, BOOLEAN_P,SCHAR_P,BOOLEAN_P,BOOLEAN_P)); +#endif STATIC_DCL void NDECL(makerooms); STATIC_DCL void FDECL(finddpos,(coord *,XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P)); STATIC_DCL void FDECL(mkinvpos, (XCHAR_P,XCHAR_P,int)); STATIC_DCL void FDECL(mk_knox_portal, (XCHAR_P,XCHAR_P)); +#ifdef WEBB_ENVIRONMENT +# define create_vault() create_room(-1, -1, 2, 2, -1, -1, VAULT, TRUE, 2) +#else #define create_vault() create_room(-1, -1, 2, 2, -1, -1, VAULT, TRUE) +#endif #define init_vault() vault_x = -1 #define do_vault() (vault_x != -1) static xchar vault_x, vault_y; boolean goldseen; @@ -114,16 +123,24 @@ #endif } STATIC_OVL void +#ifdef WEBB_ENVIRONMENT +do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, + rtype, special, is_room, has_sky) +#else do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, rtype, special, is_room) +#endif register struct mkroom *croom; int lowx, lowy; register int hix, hiy; boolean lit; schar rtype; boolean special; boolean is_room; +#ifdef WEBB_ENVIRONMENT + uchar has_sky; +#endif { register int x, y; struct rm *lev; @@ -143,8 +160,18 @@ croom->rlit = 1; } else croom->rlit = 0; +#ifdef WEBB_ENVIRONMENT + if (has_sky != 2) { /* don't care == 2 */ + for(x = lowx-1; x <= hix+1; x++) { + lev = &levl[x][max(lowy-1,0)]; + for(y = lowy-1; y <= hiy+1; y++) + lev++->rmsky = 1; + } + } +#endif + croom->lx = lowx; croom->hx = hix; croom->ly = lowy; croom->hy = hiy; @@ -186,38 +213,67 @@ } } +#ifdef WEBB_ENVIRONMENT +void +add_room(lowx, lowy, hix, hiy, lit, rtype, special, has_sky) +register int lowx, lowy, hix, hiy; +boolean lit; +schar rtype; +boolean special; +uchar has_sky; +#else void add_room(lowx, lowy, hix, hiy, lit, rtype, special) register int lowx, lowy, hix, hiy; boolean lit; schar rtype; boolean special; +#endif { register struct mkroom *croom; croom = &rooms[nroom]; do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, - rtype, special, (boolean) TRUE); + rtype, special, (boolean) TRUE +#ifdef WEBB_ENVIRONMENT + , has_sky +#endif + ); croom++; croom->hx = -1; nroom++; } +#ifdef WEBB_ENVIRONMENT +void +add_subroom(proom, lowx, lowy, hix, hiy, lit, rtype, special, has_sky) +struct mkroom *proom; +register int lowx, lowy, hix, hiy; +boolean lit; +schar rtype; +boolean special; +uchar has_sky; +#else void add_subroom(proom, lowx, lowy, hix, hiy, lit, rtype, special) struct mkroom *proom; register int lowx, lowy, hix, hiy; boolean lit; schar rtype; boolean special; +#endif { register struct mkroom *croom; croom = &subrooms[nsubroom]; do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, - rtype, special, (boolean) FALSE); + rtype, special, (boolean) FALSE +#ifdef WEBB_ENVIRONMENT + , has_sky +#endif + ); proom->sbrooms[proom->nsubrooms++] = croom; croom++; croom->hx = -1; nsubroom++; @@ -238,9 +294,13 @@ vault_y = rooms[nroom].ly; rooms[nroom].hx = -1; } } else - if (!create_room(-1, -1, -1, -1, -1, -1, OROOM, -1)) + if (!create_room(-1, -1, -1, -1, -1, -1, OROOM, -1 +#ifdef WEBB_ENVIRONMENT + , 0 /* assume if it has walls, it has a ceiling */ +#endif + )) return; } return; } @@ -482,8 +542,12 @@ if(trap_type) { if((trap_type == HOLE || trap_type == TRAPDOOR) && !Can_fall_thru(&u.uz)) trap_type = ROCKTRAP; +#ifdef WEBB_ENVIRONMENT + if (SKY_AT(xx, yy+dy) && trap_type == ROCKTRAP) + trap_type = SPIKED_PIT; +#endif ttmp = maketrap(xx, yy+dy, trap_type); if (ttmp) { if (trap_type != ROCKTRAP) ttmp->once = 1; if (trap_engravings[trap_type]) { @@ -701,9 +765,13 @@ h = 1; if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) { fill_vault: add_room(vault_x, vault_y, vault_x+w, - vault_y+h, TRUE, VAULT, FALSE); + vault_y+h, TRUE, VAULT, FALSE +#ifdef WEBB_ENVIRONMENT + ,0 +#endif + ); level.flags.has_vault = 1; ++room_threshold; fill_room(&rooms[nroom - 1], FALSE); mk_knox_portal(vault_x+w, vault_y+h); @@ -788,11 +856,28 @@ if(!rn2(x)) mkgrave(croom); /* put statues inside */ if(!rn2(20)) +#ifdef WEBB_WATERSPOUT_GARGOYLE + { + struct obj * otmp; + otmp = mkcorpstat(STATUE, (struct monst *)0, + (struct permonst *)0, + somex(croom), somey(croom), TRUE); + if(otmp->corpsenm==PM_WATERSPOUT_GARGOYLE){ + levl[otmp->ox][otmp->oy].typ = FOUNTAIN; + level.flags.nfountains++; + } + } +#else (void) mkcorpstat(STATUE, (struct monst *)0, (struct permonst *)0, somex(croom), somey(croom), TRUE); +#endif + + + + /* put box/chest inside; * 40% chance for at least 1 box, regardless of number * of rooms; about 5 - 7.5% for 2 boxes, least likely * when few rooms; chance for 3 or more is neglible. diff -rwBEN -U4 nethack-3.4.2-test/src/mkmap.c nethack-3.4.2-diff/src/mkmap.c --- nethack-3.4.2-test/src/mkmap.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mkmap.c 2003-11-30 09:37:34.000000000 -0600 @@ -15,9 +15,13 @@ STATIC_DCL void FDECL(pass_two,(SCHAR_P,SCHAR_P)); STATIC_DCL void FDECL(pass_three,(SCHAR_P,SCHAR_P)); STATIC_DCL void NDECL(wallify_map); STATIC_DCL void FDECL(join_map,(SCHAR_P,SCHAR_P)); +#ifdef WEBB_ENVIRONMENT +STATIC_DCL void FDECL(finish_map,(SCHAR_P,SCHAR_P,XCHAR_P,XCHAR_P,uchar)); +#else STATIC_DCL void FDECL(finish_map,(SCHAR_P,SCHAR_P,XCHAR_P,XCHAR_P)); +#endif STATIC_DCL void FDECL(remove_room,(unsigned)); void FDECL(mkmap, (lev_init *)); char *new_locations; @@ -157,14 +161,21 @@ * if anyroom is TRUE, use IS_ROOM to check room membership instead of * exactly matching levl[sx][sy].typ and walls are included as well. */ void -flood_fill_rm(sx, sy, rmno, lit, anyroom) +flood_fill_rm(sx, sy, rmno, lit, anyroom +#ifdef WEBB_ENVIRONMENT + ,sky +#endif + ) int sx; register int sy; register int rmno; boolean lit; boolean anyroom; +#ifdef WEBB_ENVIRONMENT + uchar sky; +#endif { register int i; int nx; schar fg_typ = levl[sx][sy].typ; @@ -182,8 +193,12 @@ for(i=sx; i<=WIDTH && levl[i][sy].typ == fg_typ; i++) { levl[i][sy].roomno = rmno; levl[i][sy].lit = lit; +#ifdef WEBB_ENVIRONMENT + if(sky<2) + levl[i][sy].rmsky = sky; +#endif if(anyroom) { /* add walls to room as well */ register int ii,jj; for(ii= (i == sx ? i-1 : i); ii <= i+1; ii++) @@ -204,37 +219,61 @@ if(isok(sx,sy-1)) { for(i=sx; isx || isok(i-1,sy-1)) && levl[i-1][sy-1].typ == fg_typ) { if ((int) levl[i-1][sy-1].roomno != rmno) - flood_fill_rm(i-1,sy-1,rmno,lit,anyroom); + flood_fill_rm(i-1,sy-1,rmno,lit,anyroom +#ifdef WEBB_ENVIRONMENT + , sky +#endif + ); } if((isx || isok(i-1,sy+1)) && levl[i-1][sy+1].typ == fg_typ) { if ((int) levl[i-1][sy+1].roomno != rmno) - flood_fill_rm(i-1,sy+1,rmno,lit,anyroom); + flood_fill_rm(i-1,sy+1,rmno,lit,anyroom +#ifdef WEBB_ENVIRONMENT + , sky +#endif + ); } if((i 3) { add_room(min_rx, min_ry, max_rx, max_ry, - FALSE, OROOM, TRUE); + FALSE, OROOM, TRUE +#ifdef WEBB_ENVIRONMENT + , 2 +#endif + ); rooms[nroom-1].irregular = TRUE; if(nroom >= (MAXNROFROOMS*2)) goto joinm; } else { @@ -335,11 +382,18 @@ } } STATIC_OVL void -finish_map(fg_typ, bg_typ, lit, walled) +finish_map(fg_typ, bg_typ, lit, walled +#ifdef WEBB_ENVIRONMENT + , sky +#endif + ) schar fg_typ, bg_typ; boolean lit, walled; +#ifdef WEBB_ENVIRONMENT + uchar sky; +#endif { int i, j; if(walled) wallify_map(); @@ -356,11 +410,16 @@ rooms[i].rlit = 1; } /* light lava even if everything's otherwise unlit */ for(i=1; isky +#endif + ); /* a walled, joined level is cavernous, not mazelike -dlc */ if (walled && join) { level.flags.is_maze_lev = FALSE; level.flags.is_cavernous_lev = TRUE; diff -rwBEN -U4 nethack-3.4.2-test/src/mkobj.c nethack-3.4.2-diff/src/mkobj.c --- nethack-3.4.2-test/src/mkobj.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mkobj.c 2003-11-30 09:37:34.000000000 -0600 @@ -409,15 +409,22 @@ case CORPSE: /* possibly overridden by mkcorpstat() */ tryct = 50; do otmp->corpsenm = undead_to_corpse(rndmonnum()); - while ((mvitals[otmp->corpsenm].mvflags & G_NOCORPSE) && (--tryct > 0)); + while ((mvitals[otmp->corpsenm].mvflags & G_NOCORPSE) + && (--tryct > 0)); if (tryct == 0) { /* perhaps rndmonnum() only wants to make G_NOCORPSE monsters on this level; let's create an adventurer's corpse instead, then */ otmp->corpsenm = PM_HUMAN; } /* timer set below */ +#ifdef WEBB_BIODIVERSITY + if (otmp->corpsenm == PM_OTYUGH){ + otmp->orotten = TRUE; + otmp->age -= 100; + } +#endif break; case EGG: otmp->corpsenm = NON_PM; /* generic egg */ if (!rn2(3)) for (tryct = 200; tryct > 0; --tryct) { @@ -603,9 +610,18 @@ switch (otmp->otyp) { case STATUE: /* possibly overridden by mkcorpstat() */ otmp->corpsenm = rndmonnum(); +#ifdef WEBB_ENVIRONMENT + if (!rn2(NUMMONS+1)){ + otmp->corpsenm = NON_PM; + otmp = oname(otmp, rndhalmonnam()); + otmp->spe |= STATUE_NONRENAMABLE; + } + if (otmp->corpsenm == NON_PM || !verysmall(&mons[otmp->corpsenm]) && +#else if (!verysmall(&mons[otmp->corpsenm]) && +#endif rn2(level_difficulty()/2 + 10) > 10) (void) add_to_container(otmp, mkobj(SPBOOK_CLASS,FALSE)); } @@ -620,8 +636,14 @@ /* Some things must get done (timers) even if init = 0 */ switch (otmp->otyp) { case CORPSE: +#ifdef WEBB_BIODIVERSITY + case MEATBALL: + case MEAT_STICK: + case MEAT_RING: + case HUGE_CHUNK_OF_MEAT: +#endif start_corpse_timeout(otmp); break; } @@ -854,15 +876,27 @@ return((int)(obj->owt)); /* kludge for "very" heavy iron ball */ return(wt ? wt*(int)obj->quan : ((int)obj->quan + 1)>>1); } +#ifndef WEBB_TREE static int treefruits[] = {APPLE,ORANGE,PEAR,BANANA,EUCALYPTUS_LEAF}; +#else +extern const int treefruits[] = +{APPLE,ORANGE,PEAR,BANANA,EUCALYPTUS_LEAF, ACORN}; +#endif struct obj * rnd_treefruit_at(x,y) int x, y; { +#ifdef WEBB_TREE + int typ = (levl[x][y].flags & TREE_TYPE_MASK)>>2; + return mksobj_at( + treefruits[ (typ) ? ((typ)-1) : rn2(SIZE(treefruits)) ], + x, y, TRUE, FALSE); +#else return mksobj_at(treefruits[rn2(SIZE(treefruits))], x, y, TRUE, FALSE); +#endif } #endif /* OVL0 */ #ifdef OVLB @@ -1164,9 +1198,13 @@ struct obj *otmp; { long age, retval = otmp->age; - if (otmp->otyp == CORPSE && ON_ICE(otmp)) { + if ((otmp->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(otmp) +#endif + ) && ON_ICE(otmp)) { /* Adjust the age; must be same as obj_timer_checks() for off ice*/ age = monstermoves - otmp->age; retval = otmp->age + (age / ROT_ICE_ADJUSTMENT); #ifdef DEBUG_EFFECTS @@ -1191,9 +1229,13 @@ boolean on_floor = (otmp->where == OBJ_FLOOR); boolean buried = (otmp->where == OBJ_BURIED); /* Check for corpses just placed on or in ice */ - if (otmp->otyp == CORPSE && (on_floor || buried) && is_ice(x,y)) { + if ((otmp->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(otmp) +#endif + ) && (on_floor || buried) && is_ice(x,y)) { tleft = stop_timer(action, (genericptr_t)otmp); if (tleft == 0L) { action = REVIVE_MON; tleft = stop_timer(action, (genericptr_t)otmp); @@ -1216,9 +1258,13 @@ } } /* Check for corpses coming off ice */ else if ((force < 0) || - (otmp->otyp == CORPSE && ON_ICE(otmp) && + ((otmp->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(otmp) +#endif + ) && ON_ICE(otmp) && ((on_floor && !is_ice(x,y)) || !on_floor))) { tleft = stop_timer(action, (genericptr_t)otmp); if (tleft == 0L) { action = REVIVE_MON; @@ -1321,9 +1367,9 @@ case OBJ_ONBILL: extract_nobj(obj, &billobjs); break; default: - panic("obj_extract_self"); + panic("obj_extract_self: %s", xname(obj)); break; } } diff -rwBEN -U4 nethack-3.4.2-test/src/mkroom.c nethack-3.4.2-diff/src/mkroom.c --- nethack-3.4.2-test/src/mkroom.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mkroom.c 2003-11-30 09:37:34.000000000 -0600 @@ -470,12 +470,24 @@ : &mons[PM_ELECTRIC_EEL], sx, sy, NO_MM_FLAGS); eelct++; } - } else + } else { if(!rn2(4)) /* swamps tend to be moldy */ (void) makemon(mkclass(S_FUNGUS,0), sx, sy, NO_MM_FLAGS); +#ifdef WEBB_BIODIVERSITY + else if(!rn2(16)){ + struct monst * mtmp = makemon(rn2(3) ? &mons[PM_WILL_O__WISP] + : &mons[PM_GUIDE], + sx, sy, NO_MM_FLAGS); + if (mtmp->data == &mons[PM_GUIDE]){ + mongets(mtmp, WATER_WALKING_BOOTS); + m_dowear(mtmp, TRUE); + } + } +#endif + } } level.flags.has_swamp = 1; } } diff -rwBEN -U4 nethack-3.4.2-test/src/mon.c nethack-3.4.2-diff/src/mon.c --- nethack-3.4.2-test/src/mon.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mon.c 2003-11-30 09:37:34.000000000 -0600 @@ -15,8 +15,11 @@ STATIC_DCL boolean FDECL(restrap,(struct monst *)); STATIC_DCL long FDECL(mm_aggression, (struct monst *,struct monst *)); #ifdef OVL2 STATIC_DCL int NDECL(pick_animal); +#ifdef WEBB_BIODIVERSITY +STATIC_DCL int FDECL(refakem, (struct monst *)); +#endif STATIC_DCL int FDECL(select_newcham_form, (struct monst *)); STATIC_DCL void FDECL(kill_eggs, (struct obj *)); #endif @@ -49,10 +52,13 @@ STATIC_VAR short cham_to_pm[]; #else STATIC_DCL struct obj *FDECL(make_corpse,(struct monst *)); STATIC_DCL void FDECL(m_detach, (struct monst *, struct permonst *)); +#ifdef WEBB_DISINT +STATIC_DCL void FDECL(lifesaved_monster, (struct monst *, uchar)); +#else STATIC_DCL void FDECL(lifesaved_monster, (struct monst *)); - +#endif /* convert the monster index of an undead to its living counterpart */ int undead_to_corpse(mndx) int mndx; @@ -69,8 +75,11 @@ case PM_ELF_ZOMBIE: case PM_ELF_MUMMY: mndx = PM_ELF; break; case PM_VAMPIRE: case PM_VAMPIRE_LORD: +#ifdef WEBB_BIODIVERSITY + case PM_NOSFERATU: +#endif #if 0 /* DEFERRED */ case PM_VAMPIRE_MAGE: #endif case PM_HUMAN_ZOMBIE: @@ -205,8 +214,11 @@ (void) mksobj_at(WORM_TOOTH, x, y, TRUE, FALSE); goto default_1; case PM_VAMPIRE: case PM_VAMPIRE_LORD: +#ifdef WEBB_BIODIVERSITY + case PM_NOSFERATU: +#endif /* include mtmp in the mkcorpstat() call */ num = undead_to_corpse(mndx); obj = mkcorpstat(CORPSE, mtmp, &mons[num], x, y, TRUE); obj->age -= 100; /* this is an *OLD* corpse */ @@ -230,14 +242,38 @@ num = undead_to_corpse(mndx); obj = mkcorpstat(CORPSE, mtmp, &mons[num], x, y, TRUE); obj->age -= 100; /* this is an *OLD* corpse */ break; +#ifdef WEBB_BIODIVERSITY + case PM_CLOCKWORK_AUTOMATON: + num = d(2,4); + while (num--) + obj = mksobj_at(SPROCKET, x, y, TRUE, FALSE); + num = d(1,3); + while (num--) + obj = mksobj_at(COGWHEEL, x, y, TRUE, FALSE); + mtmp->mnamelth = 0; + break; + case PM_IRON_GOLEM: /* if rusted, should rust droppings */ + num = rnd(6); + while (num--) + obj = mksobj_at(IRON_CHAIN, x, y, TRUE, FALSE); + num = rn2(3); + while (num--) + obj = mksobj_at(LARGE_SHIELD, x, y, TRUE, FALSE); + num = rnd(4); + while (num--) + obj = mksobj_at(COGWHEEL, x, y, TRUE, FALSE); + mtmp->mnamelth = 0; + break; +#else case PM_IRON_GOLEM: num = d(2,6); while (num--) obj = mksobj_at(IRON_CHAIN, x, y, TRUE, FALSE); mtmp->mnamelth = 0; break; +#endif case PM_GLASS_GOLEM: num = d(2,4); /* very low chance of creating all glass gems */ while (num--) obj = mksobj_at((LAST_GEM + rnd(9)), x, y, TRUE, FALSE); @@ -291,9 +327,13 @@ /* if polymorph or undead turning has killed this monster, prevent the same attack beam from hitting its corpse */ if (flags.bypasses) bypass_obj(obj); - if (mtmp->mnamelth) + if (mtmp->mnamelth +#ifdef WEBB_BIODIVERSITY + && (uchar)NAME(mtmp)[0] < (uchar) 0x80 +#endif + ) obj = oname(obj, NAME(mtmp)); /* Avoid "It was hidden under a green mold corpse!" * during Blind combat. An unseen monster referred to as "it" @@ -397,9 +437,15 @@ if (split_mon(mtmp, (struct monst *)0)) dryup(mtmp->mx, mtmp->my, FALSE); if (inpool) water_damage(mtmp->minvent, FALSE, FALSE); return (0); - } else if (mtmp->data == &mons[PM_IRON_GOLEM] && inpool && !rn2(5)) { + } else if ( +#ifdef WEBB_BIODIVERSITY + does_rust(mtmp->data) +#else + mtmp->data == &mons[PM_IRON_GOLEM] +#endif + && inpool && !rn2(5)) { int dam = d(2,6); if (cansee(mtmp->mx,mtmp->my)) pline("%s rusts.", Monnam(mtmp)); mtmp->mhp -= dam; @@ -451,8 +497,14 @@ if (!is_clinger(mtmp->data) && !is_swimmer(mtmp->data) && !amphibious(mtmp->data)) { if (cansee(mtmp->mx,mtmp->my)) { pline("%s drowns.", Monnam(mtmp)); +#ifdef WEBB_ENVIRONMENT + if (levl[mtmp->mx][mtmp->my].typ == SPOOL){ + levl[mtmp->mx][mtmp->my].typ = POOL; + magic_map_background(mtmp->mx, mtmp->my, 1); + } +#endif } if (u.ustuck && u.uswallow && u.ustuck == mtmp) { /* This can happen after a purple worm plucks you off a flying steed while you are over water. */ @@ -537,9 +589,15 @@ if (mtmp->mfrozen && !--mtmp->mfrozen) mtmp->mcanmove = 1; if (mtmp->mfleetim && !--mtmp->mfleetim) mtmp->mflee = 0; - +#ifdef WEBB_MCHARM + if (mtmp->mpeacetim && (mtmp->mpeacetim != 0x7f) + && !--mtmp->mpeacetim){ + if(mtmp->mpeaceful) mtmp->malign = mtmp->data->maligntyp; + mtmp->mpeaceful = 0; + } +#endif /* FIXME: mtmp->mlstmv ought to be updated here */ } } @@ -596,8 +654,12 @@ mtmp->m_ap_type == M_AP_OBJECT) continue; if(mtmp->mundetected) continue; } +#ifdef WEBB_BIODIVERSITY + if (mtmp->data == & mons[PM_WILL_O__WISP]) + refakem(mtmp); +#endif /* continue if the monster died fighting */ if (Conflict && !mtmp->iswiz && mtmp->mcansee) { /* Note: @@ -612,10 +674,19 @@ (distu(mtmp->mx,mtmp->my) <= BOLT_LIM*BOLT_LIM) && fightm(mtmp)) continue; /* mon might have died */ } +#ifdef WEBB_BIODIVERSITY + switch(dochugw(mtmp)){ + case -1: /* abort all monsters further action */ + break; + case 1: + continue; + } +#else if(dochugw(mtmp)) /* otherwise just move the monster */ continue; +#endif } #if 0 /* part of the original warning code which was replaced in 3.3.1 */ if(warnlevel > 0) @@ -681,10 +752,17 @@ pline("%s spits %s out in disgust!", Monnam(mtmp), distant_name(otmp,doname)); } /* KMH -- Don't eat indigestible/choking objects */ - } else if (otmp->otyp != AMULET_OF_STRANGULATION && + } +#ifdef WEBB_GOLDBUG + else if ((otmp->otyp != AMULET_OF_STRANGULATION && + otmp->otyp != RIN_SLOW_DIGESTION)&& + (mtmp->data != &mons[PM_GOLD_BUG] || is_golden(otmp))){ /*if a gold bug, then only eats goldenthings -Webb */ +#else + else if (otmp->otyp != AMULET_OF_STRANGULATION && otmp->otyp != RIN_SLOW_DIGESTION) { +#endif if (cansee(mtmp->mx,mtmp->my) && flags.verbose) pline("%s eats %s!", Monnam(mtmp), distant_name(otmp,doname)); else if (flags.soundok && flags.verbose) @@ -738,8 +816,57 @@ } return 0; } + +#ifdef WEBB_GOLDBUG +int +meatmetal_effects(mtmp, otmp) +register struct monst * mtmp; +register struct obj * otmp; +{ + int poly, grow, heal, mstone; + struct permonst *ptr; + if (mtmp->mhp < mtmp->mhpmax) { + mtmp->mhp += objects[otmp->otyp].oc_weight; + if (mtmp->mhp > mtmp->mhpmax) mtmp->mhp = mtmp->mhpmax; + } + if(otmp == uball) { + unpunish(); + delobj(otmp); + } else if (otmp == uchain) { + unpunish(); /* frees uchain */ + } else { + poly = polyfodder(otmp); + grow = mlevelgain(otmp); + heal = mhealup(otmp); + mstone = mstoning(otmp); + delobj(otmp); + ptr = mtmp->data; + if (poly) { + if (newcham(mtmp, (struct permonst *)0, FALSE, FALSE)) + ptr = mtmp->data; + } else if (grow) { + ptr = grow_up(mtmp, (struct monst *)0); + } else if (mstone) { + if (poly_when_stoned(ptr)) { + mon_to_stone(mtmp); + ptr = mtmp->data; + } else if (!resists_ston(mtmp)) { + if (canseemon(mtmp)) + pline("%s turns to stone!", Monnam(mtmp)); + monstone(mtmp); + ptr = (struct permonst *)0; + } + } else if (heal) { + mtmp->mhp = mtmp->mhpmax; + } + if (!ptr) return 2; /* it died */ + } + return 1; +} +#endif + int meatobj(mtmp) /* for gelatinous cubes */ register struct monst *mtmp; { @@ -780,9 +907,13 @@ /* contents of eaten containers become engulfed; this is arbitrary, but otherwise g.cubes are too powerful */ while ((otmp3 = otmp->cobj) != 0) { obj_extract_self(otmp3); - if (otmp->otyp == ICE_BOX && otmp3->otyp == CORPSE) { + if (otmp->otyp == ICE_BOX && (otmp3->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(otmp) +#endif + )) { otmp3->age = monstermoves - otmp3->age; start_corpse_timeout(otmp3); } (void) mpickobj(mtmp, otmp3); @@ -828,8 +959,108 @@ } return ((count > 0) || (ecount > 0)) ? 1 : 0; } +#ifdef WEBB_BIODIVERSITY +/* 0 nothing happened + 1 eating happened, pancakes and lembas only + 2 cobbling happened + */ +int +cobble_there(mtmp) +register struct monst * mtmp; +{ + int cobbling = 0; + if (mtmp->data != &mons[PM_BROWNIE]) + return 0; + if (!mtmp->mcan && mtmp->mspec_used && + (!cansee(mtmp->mx, mtmp->my) || Sleeping)){ + /* brownies don't like to be watched, mspec_used means ok to + fix shoes */ + struct obj * oboots = level.objects[mtmp->mx][mtmp->my]; + while (oboots){ + if (is_boots(oboots)) break; + oboots = oboots->nexthere; + } + if (!oboots) + return 0; + switch(rn2(5)){ + case 0: + if (oboots->oeroded || oboots->oeroded2){ + oboots->oeroded = oboots->oeroded2 = 0; + cobbling = 2; + } + if (rn2(3)) + break; + case 1: + if (cursed(oboots)){ + uncurse(oboots); + cobbling = 2; + } + if (rn2(3)) + break; + case 2: + if (oboots->otyp == IRON_SHOES){ + oboots->otyp = KICKING_BOOTS; + cobbling = 2; + } + if (rn2(3)) + break; + case 3: + oboots->oerodeproof = 1; + cobbling = 2; + if (rn2(4)) + break; + case 4: + if (oboots->spe <= 0){ + (Luck && Luck>0) ? + rnd(mtmp->mspec_used/2) + (oboots->spe < -1)?rn2(Luck/3):0 : + 1; + cobbling = 2; + } + if (rn2(3)) + break; + case 5: /* only reached by falling through */ + if (oboots->otyp == FUMBLE_BOOTS) { + oboots->otyp = rn2(2) ? LOW_BOOTS : HIGH_BOOTS; + cobbling = 2; + } + if (rn2(2)) + break; + default: + if ( oboots->otyp == LOW_BOOTS || oboots->otyp == HIGH_BOOTS){ + oboots->otyp = SPEED_BOOTS + rn2(LEVITATION_BOOTS - SPEED_BOOTS - 2); + if (oboots->otyp == KICKING_BOOTS) oboots->otyp = LEVITATION_BOOTS; + cobbling = 2; + } + break; + } + mtmp->mspec_used = 0; + if (cobbling) + oboots->known = oboots->bknown = oboots->rknown = 0; + return cobbling; + } else { + struct obj * ofood = level.objects[mtmp->mx][mtmp->my]; + while (ofood){ + if (ofood->otyp >= CREAM_PIE && ofood->otyp <= LEMBAS_WAFER) + break; + ofood = ofood->nexthere; + } + if (!ofood) + return 0; + mtmp->meating = objects[ofood->otyp].oc_delay; + if (ofood->invlet && !ofood->oeaten) + mtmp->mspec_used = mtmp->meating + + objects[ofood->otyp].oc_nutrition/100; + mtmp->mhp += objects[ofood->otyp].oc_nutrition/40; + if (mtmp->mhp < mtmp->mhpmax) mtmp->mhpmax = mtmp->mhp; + delobj(ofood); + newsym(mtmp->mx, mtmp->my); + return 1; + } +} +#endif + void mpickgold(mtmp) register struct monst *mtmp; { @@ -969,9 +1200,13 @@ /* Steeds don't pick up stuff (to avoid shop abuse) */ if (mtmp == u.usteed) return (FALSE); #endif if (mtmp->isshk) return(TRUE); /* no limit */ - if (mtmp->mpeaceful && !mtmp->mtame) return(FALSE); + if (mtmp->mpeaceful && !mtmp->mtame +#ifdef WEBB_MCHARM + && !mtmp->mpeacetim +#endif + ) return(FALSE); /* otherwise players might find themselves obligated to violate * their alignment if the monster takes something they need */ @@ -1048,8 +1283,18 @@ maxy = min(y+1,ROWNO-1); for(nx = max(1,x-1); nx <= maxx; nx++) for(ny = max(0,y-1); ny <= maxy; ny++) { if(nx == x && ny == y) continue; +#ifdef WEBB_TREE + if (mon->data == &mons[PM_LESHY]) { + treeok = 1; + rockok = 0; + if (IS_TREE(levl[nx][ny].typ)) + flag |= ALLOW_WALL; + else + flag &= ~ALLOW_WALL; + } +#endif if(IS_ROCK(ntyp = levl[nx][ny].typ) && !((flag & ALLOW_WALL) && may_passwall(nx,ny)) && !((IS_TREE(ntyp) ? treeok : rockok) && may_dig(nx,ny))) continue; /* KMH -- Added iron bars */ @@ -1155,9 +1400,13 @@ impossible("A monster looked at a very strange trap of type %d.", ttmp->ttyp); continue; } if ((ttmp->ttyp != RUST_TRAP +#ifdef WEBB_BIODIVERSITY + || does_rust(mdat)) +#else || mdat == &mons[PM_IRON_GOLEM]) +#endif && ttmp->ttyp != STATUE_TRAP && ((ttmp->ttyp != PIT && ttmp->ttyp != SPIKED_PIT && ttmp->ttyp != TRAPDOOR @@ -1361,10 +1610,16 @@ return (struct obj *)0; } STATIC_OVL void +#ifdef WEBB_DISINT +lifesaved_monster(mtmp,adtyp) +struct monst *mtmp; +uchar adtyp; +#else lifesaved_monster(mtmp) struct monst *mtmp; +#endif { struct obj *lifesave = mlifesaver(mtmp); if (lifesave) { @@ -1377,9 +1632,13 @@ pline("%s medallion begins to glow!", s_suffix(Monnam(mtmp))); makeknown(AMULET_OF_LIFE_SAVING); if (attacktype(mtmp->data, AT_EXPL) - || attacktype(mtmp->data, AT_BOOM)) + || attacktype(mtmp->data, AT_BOOM) +#ifdef WEBB_DISINT + || adtyp == AD_DISN +#endif + ) pline("%s reconstitutes!", Monnam(mtmp)); else pline("%s looks much better!", Monnam(mtmp)); pline_The("medallion crumbles to dust!"); @@ -1401,21 +1660,39 @@ } mtmp->mhp = 0; } +#ifndef WEBB_DISINT +void +mondead(mtmp) +register struct monst * mtmp; +#else void mondead(mtmp) register struct monst *mtmp; { + mondead_helper(mtmp, 0); /* mmm... default parameter values */ +} + +void +mondead_helper(mtmp, adtyp) +register struct monst * mtmp; +uchar adtyp; +#endif +{ struct permonst *mptr; int tmp; if(mtmp->isgd) { /* if we're going to abort the death, it *must* be before * the m_detach or there will be relmon problems later */ if(!grddead(mtmp)) return; } +#ifdef WEBB_DISINT + lifesaved_monster(mtmp, adtyp); +#else lifesaved_monster(mtmp); +#endif if (mtmp->mhp > 0) return; #ifdef STEED /* Player is thrown from his steed when it dies */ @@ -1488,9 +1765,13 @@ { struct permonst *mdat = mon->data; int i, tmp; - if (mdat == &mons[PM_VLAD_THE_IMPALER] || mdat->mlet == S_LICH) { + if (mdat == &mons[PM_VLAD_THE_IMPALER] || mdat->mlet == S_LICH +#ifdef WEBB_DISINT + || mdat == &mons[PM_DISINTEGRATOR] +#endif + ) { if (cansee(mon->mx, mon->my) && !was_swallowed) pline("%s body crumbles into dust.", s_suffix(Monnam(mon))); return FALSE; } @@ -1593,9 +1874,13 @@ /* we have to make the statue before calling mondead, to be able to * put inventory in it, and we have to check for lifesaving before * making the statue.... */ +#ifdef WEBB_DISINT + lifesaved_monster(mdef, AD_STON); +#else lifesaved_monster(mdef); +#endif if (mdef->mhp > 0) return; mdef->mtrapped = 0; /* (see m_detach) */ @@ -1627,9 +1912,13 @@ /* defer statue creation until after inventory removal so that saved monster traits won't retain any stale item-conferred attributes */ otmp = mkcorpstat(STATUE, mdef, mdef->data, x, y, FALSE); - if (mdef->mnamelth) otmp = oname(otmp, NAME(mdef)); + if (mdef->mnamelth +#ifdef WEBB_BIODIVERSITY + && ((uchar)NAME(mdef)[0]) < (uchar)0x80 +#endif + ) otmp = oname(otmp, NAME(mdef)); while ((obj = oldminvent) != 0) { oldminvent = obj->nobj; (void) add_to_container(otmp, obj); } @@ -1685,10 +1974,16 @@ else be_sad = (mdef->mtame != 0); /* no corpses if digested or disintegrated */ - if(how == AD_DGST || how == -AD_RBRE) + if(how == AD_DGST || how == -AD_RBRE +#ifdef WEBB_DISINT + || how == AD_DISN) + mondead_helper(mdef, how); +#else + ) mondead(mdef); +#endif else mondied(mdef); if (be_sad && mdef->mhp <= 0) @@ -2090,15 +2385,23 @@ mtmp->mstrategy &= ~STRAT_WAITMASK; if(!mtmp->mpeaceful) return; if(mtmp->mtame) return; mtmp->mpeaceful = 0; +#ifdef WEBB_MCHARM + mtmp->mpeacetim = 0; +#endif if(mtmp->ispriest) { if(p_coaligned(mtmp)) adjalign(-5); /* very bad */ else adjalign(2); } else adjalign(-1); /* attacking peaceful monsters is bad */ if (couldsee(mtmp->mx, mtmp->my)) { +#ifdef WEBB_BIODIVERSITY + if ((humanoid(mtmp->data) && mtmp->mcanmove) + || mtmp->isshk || mtmp->isgd) +#else if (humanoid(mtmp->data) || mtmp->isshk || mtmp->isgd) +#endif pline("%s gets angry!", Monnam(mtmp)); else if (flags.verbose && flags.soundok) growl(mtmp); } @@ -2179,10 +2482,13 @@ /* * Discovered mimics don't block light. */ - if (((old_ap_type == M_AP_FURNITURE && - (old_app == S_hcdoor || old_app == S_vcdoor)) || + if (((old_ap_type == M_AP_FURNITURE && ( +#ifdef WEBB_BIODIVERSITY + IS_WALL(old_app) || +#endif + old_app == S_hcdoor || old_app == S_vcdoor)) || (old_ap_type == M_AP_OBJECT && old_app == BOULDER)) && !does_block(mtmp->mx, mtmp->my, &levl[mtmp->mx][mtmp->my])) unblock_point(mtmp->mx, mtmp->my); @@ -2263,9 +2569,19 @@ cansee(mtmp->mx, mtmp->my) || rn2(3) || (mtmp == u.ustuck) || (sensemon(mtmp) && distu(mtmp->mx, mtmp->my) <= 2)) return(FALSE); +#ifdef WEBB_ENVIRONMENT + if ((mtmp->data->mlet == S_PIERCER || mtmp->data == &mons[PM_LURKER_ABOVE]) + && (Is_airlevel(&u.uz) || SKY_AT(mtmp->mx, mtmp->my))) + return (FALSE); +#endif +#ifdef WEBB_BIODIVERSITY + if (mtmp->data->mlet == S_MIMIC || + mtmp->data == &mons[PM_LABYRINTH_TRAPPER]){ +#else if(mtmp->data->mlet == S_MIMIC) { +#endif set_mimic_sym(mtmp); return(TRUE); } else if(levl[mtmp->mx][mtmp->my].typ == ROOM) { @@ -2275,8 +2591,26 @@ return(FALSE); } +#ifdef WEBB_BIODIVERSITY +int +refakem(mtmp) +struct monst * mtmp; +{ + if ((cansee(mtmp->mx, mtmp->my) || mtmp->mcan) || + ((mtmp->m_ap_type == M_AP_MONSTER) && rn2(8))) + return FALSE; + if ((mtmp->mappearance = pick_friendly()) != NON_PM ){ + mtmp->m_ap_type = M_AP_MONSTER; + return TRUE; + } else { + mtmp->m_ap_type = M_AP_NOTHING; + return FALSE; + } +} +#endif + short *animal_list = 0; /* list of PM values for animal monsters */ int animal_list_count; void @@ -2743,8 +3077,11 @@ slct++; mtmp->msleeping = mtmp->mfrozen = 0; } mtmp->mpeaceful = 0; +#ifdef WEBB_MCHARM + mtmp->mpeacetim =0; +#endif } } if(ct) { if(!silent) { /* do we want pline msgs? */ @@ -2773,8 +3110,11 @@ if (DEADMONSTER(mtmp)) continue; if (mtmp->data == &mons[PM_WATCHMAN] || mtmp->data == &mons[PM_WATCH_CAPTAIN]) mtmp->mpeaceful = 1; +#ifdef WEBB_MCHARM + mtmp->mpeacetim = 0; +#endif } } void diff -rwBEN -U4 nethack-3.4.2-test/src/mondata.c nethack-3.4.2-diff/src/mondata.c --- nethack-3.4.2-test/src/mondata.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mondata.c 2003-11-30 09:37:34.000000000 -0600 @@ -36,9 +36,14 @@ { struct attack *a; for (a = &ptr->mattk[0]; a < &ptr->mattk[NATTK]; a++) +#ifdef WEBB_MCHARM + if ((atyp == AT_ANY || a->aatyp == atyp) + && (dtyp == AD_ANY || a->adtyp == dtyp)) +#else if (a->aatyp == atyp && (dtyp == AD_ANY || a->adtyp == dtyp)) +#endif return a; return (struct attack *)0; } @@ -447,8 +452,20 @@ { "baby grey dragon", PM_BABY_GRAY_DRAGON }, { "grey unicorn", PM_GRAY_UNICORN }, { "grey ooze", PM_GRAY_OOZE }, { "gray-elf", PM_GREY_ELF }, +#ifdef WEBB_FOOD_NAMES + /* possible culinary names of corpses and tins */ +#ifdef WEBB_CARROLL + { "whitefood", PM_BANDERSNATCH }, +#endif + { "kurage", PM_JELLYFISH }, + { "unagi", PM_GIANT_EEL }, + { "denki-unagi", PM_ELECTRIC_EEL }, + { "denki unagi", PM_ELECTRIC_EEL }, + { "fuka", PM_SHARK }, + { "ika", PM_KRAKEN }, +#endif /* Hyphenated names */ { "ki rin", PM_KI_RIN }, { "uruk hai", PM_URUK_HAI }, { "orc captain", PM_ORC_CAPTAIN }, @@ -475,8 +492,24 @@ { "mumakil", PM_MUMAK }, { "erinyes", PM_ERINYS }, /* falsely caught by -ves check above */ { "master of thief", PM_MASTER_OF_THIEVES }, +#ifdef WEBB_MUTATED_MONST + { "kobold lord", PM_KOBOLD_CHIEFTAIN }, + { "wood nymph", PM_DRYAD }, + { "baby red dragon", PM_BABY_FIREDRAKE }, + { "baby white dragon", PM_BABY_LINDWORM }, + { "baby orange dragon", PM_BABY_LUNG_DRAGON }, + { "baby blue dragon", PM_BABY_LEVIATHAN }, + { "baby green dragon", PM_BABY_WYVERN }, + { "baby yellow dragon", PM_BABY_GUIVRE }, + { "red dragon", PM_FIREDRAKE }, + { "white dragon", PM_LINDWORM }, + { "orange dragon", PM_LUNG_DRAGON }, + { "blue dragon", PM_LEVIATHAN }, + { "green dragon", PM_WYVERN }, + { "yellow dragon", PM_GUIVRE }, +#endif /* end of list */ { 0, 0 } }; register const struct alt_spl *namep; @@ -569,8 +602,11 @@ {PM_ELF_LORD, PM_ELVENKING}, {PM_LICH, PM_DEMILICH}, {PM_DEMILICH, PM_MASTER_LICH}, {PM_MASTER_LICH, PM_ARCH_LICH}, {PM_VAMPIRE, PM_VAMPIRE_LORD}, {PM_BAT, PM_GIANT_BAT}, +#ifdef WEBB_BIODIVERSITY + {PM_VAMPIRE_LORD, PM_NOSFERATU}, +#endif {PM_BABY_GRAY_DRAGON, PM_GRAY_DRAGON}, {PM_BABY_SILVER_DRAGON, PM_SILVER_DRAGON}, #if 0 /* DEFERRED */ {PM_BABY_SHIMMERING_DRAGON, PM_SHIMMERING_DRAGON}, @@ -740,9 +776,13 @@ case PM_ENERGY_VORTEX: what = "heating up"; break; default: - what = (mattk->aatyp == AT_HUGS) ? "being roasted" : "on fire"; + what = +#ifdef WEBB_BIODIVERSITY + (mattk->adtyp == AD_SCLD)?"being scalded": +#endif + (mattk->aatyp == AT_HUGS) ? "being roasted" : "on fire"; break; } return what; } diff -rwBEN -U4 nethack-3.4.2-test/src/monmove.c nethack-3.4.2-diff/src/monmove.c --- nethack-3.4.2-test/src/monmove.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/monmove.c 2003-11-30 09:37:34.000000000 -0600 @@ -85,8 +85,11 @@ { register int x = mtmp->mx, y = mtmp->my; boolean already_saw_mon = !occupation ? 0 : canspotmon(mtmp); int rd = dochug(mtmp); +#ifdef WEBB_BIODIVERSITY + if (rd == -1) return rd; +#endif #if 0 /* part of the original warning code which was replaced in 3.3.1 */ int dd; @@ -131,9 +134,13 @@ int x, y; struct monst *mtmp; { if (mtmp->isshk || mtmp->isgd || mtmp->iswiz || !mtmp->mcansee || - mtmp->mpeaceful || mtmp->data->mlet == S_HUMAN || + (mtmp->mpeaceful +#ifdef WEBB_MCHARM + && !mtmp->mpeacetim +#endif + ) || mtmp->data->mlet == S_HUMAN || is_lminion(mtmp) || mtmp->data == &mons[PM_ANGEL] || is_rider(mtmp->data) || mtmp->data == &mons[PM_MINOTAUR]) return(FALSE); @@ -189,9 +196,14 @@ || mtmp->data == &mons[PM_JABBERWOCK] #if 0 /* DEFERRED */ || mtmp->data == &mons[PM_VORPAL_JABBERWOCK] #endif - || mtmp->data->mlet == S_LEPRECHAUN) || !rn2(50)) && +#ifdef WEBB_BIODIVERSITY + || mtmp->data == &mons[PM_LEPRECHAUN] +#else + || mtmp->data->mlet == S_LEPRECHAUN +#endif + ) || !rn2(50)) && (Aggravate_monster || (mtmp->data->mlet == S_DOG || mtmp->data->mlet == S_HUMAN) || (!rn2(7) && mtmp->m_ap_type != M_AP_FURNITURE && @@ -230,9 +242,21 @@ /* ensure monster flees long enough to visibly stop fighting */ if (fleetime == 1) fleetime++; mtmp->mfleetim = min(fleetime, 127); } - if (!mtmp->mflee && fleemsg && canseemon(mtmp)) + +#ifdef WEBB_TURTLE + if( !mtmp->mflee && mtmp->data->mlet == S_TURTLE){ + mtmp->mcanmove=0; + if(canseemon(mtmp)) + pline("%s hides in %s shell!",Monnam(mtmp),mhis(mtmp)); + }else +#endif + if (!mtmp->mflee && fleemsg && canseemon(mtmp) +#ifdef WEBB_BIODIVERSITY + && mtmp->mcanmove +#endif + ) pline("%s turns to flee!", (Monnam(mtmp))); mtmp->mflee = 1; } } @@ -317,8 +341,26 @@ /* update quest status flags */ quest_stat_check(mtmp); +#ifdef WEBB_BIODIVERSITY /* labyrinth trapper might jump out at you. */ + if ( mdat == &mons[PM_LABYRINTH_TRAPPER] && + (mtmp->m_ap_type || mtmp->mundetected) + && distmin(mtmp->mx, mtmp->my, u.ux, u.uy)<=1){ + if (mtmp->mundetected){ + mtmp->mundetected=0; + newsym(mtmp->mx, mtmp->my); + } + if (mtmp->m_ap_type) + seemimic(mtmp); + + if (cansee(mtmp->mx, mtmp->my)) + pline("The wall beside you comes alive!"); + } +#endif +#ifdef WEBB_TURTLES + if (mdat->mlet != S_TURTLE || !mtmp->mflee) +#endif if (!mtmp->mcanmove || (mtmp->mstrategy & STRAT_WAITMASK)) { if (Hallucination) newsym(mtmp->mx,mtmp->my); if (mtmp->mcanmove && (mtmp->mstrategy & STRAT_CLOSE) && !mtmp->msleeping && monnear(mtmp, u.ux, u.uy)) @@ -354,10 +396,42 @@ if (mtmp->mhp <= 0) return(1); /* m_respond gaze can kill medusa */ /* fleeing monsters might regain courage */ if (mtmp->mflee && !mtmp->mfleetim - && mtmp->mhp == mtmp->mhpmax && !rn2(25)) mtmp->mflee = 0; + && mtmp->mhp == mtmp->mhpmax && !rn2(25)){ + mtmp->mflee = 0; +#ifdef WEBB_TURTLE + if(canseemon(mtmp) && (mdat->mlet == S_TURTLE) && !(mtmp->mfrozen)){ + pline("%s comes out of %s shell.", Monnam(mtmp), mhis(mtmp)); + mtmp->mcanmove=1; + } +#endif + } +#ifdef WEBB_TURTLE + else if (mdat->mlet == S_TURTLE && !mtmp->mcanmove) + return (0); +#endif +#ifdef WEBB_MCHARM + /* charming monster might decide to hate you again */ + if (mtmp->mpeaceful && mtmp->mpeacetim && +#ifdef WEBB_SATYR + mtmp->data != &mons[PM_SATYR] && +#endif + (mtmp->mhp >= mtmp->mhpmax*0.8)) { + int bias = Wounded_legs?1:0 + Confusion?2:0 + Sleeping?4:0 + + (Hallucination||Blinded)?2:0 + Punished?2:0 + Aggravate_monster?2:0 + - Adornment - (Half_spell_damage||Half_physical_damage)?3:0 + - Regeneration?1:0 - Fast?1:0 - Very_fast?2:0 + near_capacity(); + if (mtmp->m_lev + bias > u.ulevel){ + mtmp->malign = mtmp->data->maligntyp; + mtmp->mpeaceful = 0; + mtmp->mpeacetim = 0; + if(canseemon(mtmp)) + pline("%s seems less friendly.", Monnam(mtmp)); + } + } +#endif set_apparxy(mtmp); /* Must be done after you move and before the monster does. The * set_apparxy() call in m_move() doesn't suffice since the variables * inrange, etc. all depend on stuff set by set_apparxy(). @@ -450,9 +524,13 @@ /* If monster is nearby you, and has to wield a weapon, do so. This * costs the monster a move, of course. */ - if((!mtmp->mpeaceful || Conflict) && inrange && + if((!mtmp->mpeaceful || Conflict +#ifdef WEBB_MCHARM + || mtmp->mpeacetim /* only acting peaceful */ +#endif + ) && inrange && dist2(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) <= 8 && attacktype(mdat, AT_WEAP)) { struct obj *mw_tmp; @@ -469,21 +547,27 @@ } /* Now the actual movement phase */ +#ifdef WEBB_BIODIVERSITY +# define is_leprechaun(mdat) ((mdat) == &mons[PM_LEPRECHAUN]) +#else +# define is_leprechaun(mdat) ((mdat)->mlet == S_LEPRECHAUN) +#endif + #ifndef GOLDOBJ if(!nearby || mtmp->mflee || scared || mtmp->mconf || mtmp->mstun || (mtmp->minvis && !rn2(3)) || - (mdat->mlet == S_LEPRECHAUN && !u.ugold && (mtmp->mgold || rn2(2))) || + ( (is_leprechaun(mdat)) && !u.ugold && (mtmp->mgold || rn2(2))) || #else - if (mdat->mlet == S_LEPRECHAUN) { + if (is_leprechaun(mdat)) { ygold = findgold(invent); lepgold = findgold(mtmp->minvent); } if(!nearby || mtmp->mflee || scared || mtmp->mconf || mtmp->mstun || (mtmp->minvis && !rn2(3)) || - (mdat->mlet == S_LEPRECHAUN && !ygold && (lepgold || rn2(2))) || + (is_leprechaun(mdat) && !ygold && (lepgold || rn2(2))) || #endif (is_wanderer(mdat) && !rn2(4)) || (Conflict && !mtmp->iswiz) || (!mtmp->mcansee && !rn2(4)) || mtmp->mpeaceful) { /* Possibly cast an undirected spell if not attacking you */ @@ -495,16 +579,73 @@ if (dist2(mtmp->mx, mtmp->my, u.ux, u.uy) <= 49 && !mtmp->mspec_used) { struct attack *a; for (a = &mdat->mattk[0]; a < &mdat->mattk[NATTK]; a++) { - if (a->aatyp == AT_MAGC && (a->adtyp == AD_SPEL || a->adtyp == AD_CLRC)) { + if (a->aatyp == AT_MAGC && + (a->adtyp == AD_SPEL || a->adtyp == AD_CLRC)) { if (castmu(mtmp, a, FALSE, FALSE)) { tmp = 3; break; } } } } +#ifdef WEBB_SATYR /* this should be moved into mcastu */ + if (Conflict && mtmp->data == &mons[PM_SATYR] && + !mtmp->mspec_used && !mtmp->mcan && + distmin(mtmp->mx, mtmp->my, u.ux, u.uy) <= 6 ) { + int spec_used; + struct obj * inst = mon_has_item(mtmp, WOODEN_FLUTE, 1); + if (inst){ + int i,j; + struct monst * mdef; + if canseemon(mtmp) + pline("%s plays %s %s.", Monnam(mtmp), + mhis(mtmp), distant_name(inst, xname)); + else + You_hear("%s music.", Hallucination?"organ grinder":"panpipe"); + mcharmu(mtmp, d(2,6), TRUE); + spec_used = mtmp->mspec_used; + mtmp->mspec_used = 0; + for(i = mtmp->mx - 5; i <= mtmp->mx + 5; ++i){ + for(j = mtmp->my - 5; j <= mtmp->my + 5; ++j){ + if(!isok(i,j)) continue; + if((mdef = m_at(i,j)) != 0) + spec_used += mcharmm(mtmp, mdef, d(2,6)); + } + } + mtmp->mspec_used = max(spec_used/(mtmp->m_lev),10); + } + } +#endif +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_UMBRAL_HULK] && + !mtmp->mcan && !mtmp->mspec_used && levl[mtmp->mx][mtmp->my].lit){ + litroom_mon(0, 0, mtmp->mx, mtmp->my); + mtmp->mspec_used = 5 + rn2(11); + } + if (mtmp->data == &mons[PM_WILL_O__WISP] && + !mtmp->mcan && !mtmp->mspec_used && !rn2(10)){ + struct rm * there = &levl[mtmp->mx][mtmp->my]; + if (cansee(mtmp->mx, mtmp->my)){ + if(there->typ == ROOM){ +#ifdef WEBB_ENVIRONMENT + there->typ = SPOOL; +#else + maketrap(mtmp->mx, mtmp->my, rn2(3)?SPIKED_PIT:WATER_TRAP); +#endif + } + mtmp->mspec_used += rn1(15,15); + } +#ifdef WEBB_ENVIRONMENT + else if (IS_POOL(there->typ)) { + there->typ = rn2(8)?there->typ: + (!rn2(4))?ROOM:(rn2(3))?SPOOL:POOL ; + mtmp->mspec_used += rn1(7,7); + } +#endif + } +#endif tmp = m_move(mtmp, 0); distfleeck(mtmp,&inrange,&nearby,&scared); /* recalc */ @@ -545,9 +686,20 @@ if (!mtmp->mpeaceful || (Conflict && !resist(mtmp, RING_CLASS, 0, 0))) { if(inrange && !noattacks(mdat) && u.uhp > 0 && !scared && tmp != 3) +#ifdef WEBB_BIODIVERSITY + { int mattackedu = mattacku(mtmp); + switch(mattackedu){ + case 0: + break; + default: + return mattackedu; + } + } +#else if(mattacku(mtmp)) return(1); /* monster died (e.g. exploded) */ +#endif if(mtmp->wormno) wormhitu(mtmp); } /* special speeches for quest monsters */ @@ -617,8 +769,40 @@ if (mtmp->meating) { mtmp->meating--; return 3; /* still eating */ } +#ifdef WEBB_BIODIVERSITY + if (ptr == &mons[PM_CLOCKWORK_AUTOMATON]){ + int has_key = (int)(m_carrying(mtmp,SKELETON_KEY)); + int sees_you = m_canseeu(mtmp); + if (!mtmp->mspec_used && !mtmp->mfrozen){ + mtmp->mfrozen = 0; + mtmp->mcanmove = 0; + if(canseemon(mtmp)) + pline("%s jerks to a halt.", Monnam(mtmp)); + return 3; + } else if (mtmp->mspec_used <= CLOCKWORK_PANIC) { + if (has_key) + return (wind_clockwork(mtmp,mtmp))?2:3; + monflee(mtmp, 20, FALSE, TRUE); + } else if(mtmp->mspec_used <= CLOCKWORK_LOW) { + if ((!monnear(mtmp,u.ux,u.uy) || !sees_you) && has_key) + return (wind_clockwork(mtmp,mtmp))?2:3; + else if(mtmp->permspeed != MSLOW) + mon_adjust_speed(mtmp, -2, 0); + } else if (mtmp->mspec_used <= CLOCKWORK_MED) { + if((distu(mtmp->mx, mtmp->my) >=5 || !sees_you) && has_key) + return (wind_clockwork(mtmp,mtmp))?2:3; + else if(mtmp->permspeed == MFAST) + mon_adjust_speed(mtmp,-1,0); + } else if(mtmp->mspec_used <= (CLOCKWORK_HIGH-(CLOCKWORK_WIND*2)) + && !sees_you && has_key && mtmp->mstrategy == STRAT_HEAL){ + return (wind_clockwork(mtmp,mtmp))?2:3; + } + mtmp->mstrategy = STRAT_NONE; /* removes STRAT_HEAL if finished winding */ + } +#endif + if (hides_under(ptr) && OBJ_AT(mtmp->mx, mtmp->my) && rn2(10)) return 0; /* do not leave hiding place */ set_apparxy(mtmp); @@ -822,10 +1006,16 @@ !mtoo->data->mmove)) continue; if(((likegold && otmp->oclass == COIN_CLASS) || (likeobjs && index(practical, otmp->oclass) && - (otmp->otyp != CORPSE || (ptr->mlet == S_NYMPH + (otmp->otyp != CORPSE || ((ptr->mlet == S_NYMPH +#ifdef WEBB_BIODIVERSITY + || ptr == &mons[PM_POLTERGEIST] + /* poltergeist throws anything */ +#endif + ) && !is_rider(&mons[otmp->corpsenm])))) || + (likemagic && index(magical, otmp->oclass)) || (uses_items && searches_for_item(mtmp, otmp)) || (likerock && otmp->otyp == BOULDER) || (likegems && otmp->oclass == GEM_CLASS && @@ -1059,9 +1249,13 @@ if(here->doormask & (D_LOCKED|D_CLOSED) && amorphous(ptr)) { if (flags.verbose && canseemon(mtmp)) pline("%s %s under the door.", Monnam(mtmp), (ptr == &mons[PM_FOG_CLOUD] || +#ifdef WEBB_BIODIVERSITY + ptr == &mons[PM_QUARK] || ptr->mlet == S_LIGHT) +#else ptr == &mons[PM_YELLOW_LIGHT]) +#endif ? "flows" : "oozes"); } else if(here->doormask & D_LOCKED && can_unlock) { if(btrapped) { here->doormask = D_NODOOR; @@ -1143,8 +1337,27 @@ swallowed(0); } else newsym(mtmp->mx,mtmp->my); } + +#ifdef WEBB_GOLDBUG + /* eat golden items its carrying, if gold bug..*/ + if(ptr==&mons[PM_GOLD_BUG] && mtmp->mcanmove){ + struct obj * geatme; + if ((geatme = ochain_has_material(mtmp->minvent, GOLD, 0)) && + geatme->otyp != AMULET_OF_STRANGULATION && + geatme->otyp != RIN_SLOW_DIGESTION){ + if (meatmetal_effects(mtmp, geatme) == 2) return 2; + mtmp->meating = geatme->owt/2 + 1; +#ifndef GOLDOBJ + } else if (mtmp->mgold){ + mtmp->meating = 1; + mtmp->mgold -= 5; + if (mtmp->mgold < 0) mtmp->mgold = 0; +#endif + } + } +#endif if(OBJ_AT(mtmp->mx, mtmp->my) && mtmp->mcanmove) { /* recompute the likes tests, in case we polymorphed * or if the "likegold" case got taken above */ if (setlikes) { @@ -1173,8 +1386,13 @@ /* Maybe a cube ate just about anything */ if (ptr == &mons[PM_GELATINOUS_CUBE]) { if (meatobj(mtmp) == 2) return 2; /* it died */ } +#ifdef WEBB_BIODIVERSITY + if (ptr == &mons[PM_BROWNIE]){ + (void) cobble_there(mtmp); + } +#endif if(!*in_rooms(mtmp->mx, mtmp->my, SHOPBASE) || !rn2(25)) { boolean picked = FALSE; @@ -1202,8 +1420,26 @@ OBJ_AT(mtmp->mx, mtmp->my) : (is_pool(mtmp->mx, mtmp->my) && !Is_waterlevel(&u.uz)); newsym(mtmp->mx, mtmp->my); } +#ifdef WEBB_TREE + if (ptr == &mons[PM_LESHY]) { + struct rm * there = &levl[mtmp->mx][mtmp->my]; + if (there->typ == TREE){ + if (!(there->flags & TREE_LOOTED)){ + struct obj * otmp = rnd_treefruit_at(mtmp->mx, mtmp->my); + otmp->quan = rnd(3); + otmp->owt = weight(otmp); + there->flags |= TREE_LOOTED; + obj_extract_self(otmp); + (void) mpickobj(mtmp, otmp); + return 2; + }/* + if (mmoved == 1) + mtmp->mundetected = TRUE;*/ + } + } +#endif if (mtmp->isshk) { after_shk_move(mtmp); } } @@ -1359,7 +1595,39 @@ } return TRUE; } +#ifdef WEBB_BIODIVERSITY +int /* 0: windee ok, 1: windee bit it */ +wind_clockwork(winder, windee) +struct monst * winder; +struct monst * windee; +{ + if (winder != windee) return 0; /* so far, not doable */ + if (!winder->mcanmove || !m_carrying(winder, SKELETON_KEY)) return 0; + windee->mfrozen += 3; + windee->mcanmove = 0; + windee->mspec_used += CLOCKWORK_WIND; + if (windee->mstrategy != STRAT_HEAL){ + windee->mstrategy = STRAT_HEAL; + if (canseemon(windee)) + pline("%s starts winding up %sself.", Monnam(windee), mhim(windee)); + } + if (windee->mspec_used > CLOCKWORK_HIGH) + if (rn2(CLOCKWORK_MAX - CLOCKWORK_HIGH) < + windee->mspec_used - CLOCKWORK_HIGH){ + if(canseemon(windee)) + pline("%s is wound up too tight!", Monnam(windee)); + mondied(windee); + return 1; + } + if (windee->mspec_used > CLOCKWORK_MED && windee->permspeed !=MFAST) + mon_adjust_speed(windee, 2, 0); + else if(windee->mspec_used >= CLOCKWORK_LOW && windee->permspeed == MSLOW) + mon_adjust_speed(windee, 1, 0); + return 0; +} +#endif + #endif /* OVL0 */ /*monmove.c*/ diff -rwBEN -U4 nethack-3.4.2-test/src/monst.c nethack-3.4.2-diff/src/monst.c --- nethack-3.4.2-test/src/monst.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/monst.c 2003-11-30 09:39:26.000000000 -0600 @@ -22,8 +22,11 @@ #include "color.h" #define C(color) color #define HI_DOMESTIC CLR_WHITE /* use for player + friendlies */ #define HI_LORD CLR_MAGENTA +#ifdef WEBB_AVATAR +#define HI_AVATAR CLR_BRIGHT_MAGENTA +#endif #else #define C(color) #endif @@ -425,8 +428,18 @@ ATTK(AT_BITE, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK), SIZ(1000, 200, 0, MS_GRUNT, MZ_HUMAN), MR_STONE, MR_STONE, M1_HUMANOID|M1_THICK_HIDE|M1_BREATHLESS, M2_HOSTILE|M2_STRONG, 0, CLR_BROWN), +#ifdef WEBB_WATERSPOUT_GARGOYLE + MON("waterspout gargoyle", S_GREMLIN, + LVL(8, 10, -4, 0, -10), (G_GENO|1), + A(ATTK(AT_CLAW, AD_PHYS, 2, 6), ATTK(AT_CLAW, AD_PHYS, 2, 6), + ATTK(AT_BITE, AD_PHYS, 2, 4), ATTK(AT_SPIT, AD_RUST, 0, 0), + NO_ATTK, NO_ATTK), + SIZ(1100,250, 0, MS_GURGLE, MZ_HUMAN), MR_STONE, MR_STONE, + M1_SWIM|M1_HUMANOID|M1_AMPHIBIOUS|M1_THICK_HIDE|M1_BREATHLESS, + M2_HOSTILE|M2_STRONG, 0, CLR_BLUE), +#endif MON("winged gargoyle", S_GREMLIN, LVL(9, 15, -2, 0, -12), (G_GENO|1), A(ATTK(AT_CLAW, AD_PHYS, 3, 6), ATTK(AT_CLAW, AD_PHYS, 3, 6), ATTK(AT_BITE, AD_PHYS, 3, 4), NO_ATTK, NO_ATTK, NO_ATTK), @@ -579,16 +592,27 @@ NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(450, 150, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_OMNIVORE, M2_HOSTILE|M2_COLLECT, M3_INFRAVISIBLE|M3_INFRAVISION, CLR_RED), +#ifdef WEBB_MUTATED_MONST + MON("kobold chieftain", S_KOBOLD, + LVL(2, 6, 10, 0, -4), (G_GENO|1), + A(ATTK(AT_WEAP, AD_PHYS, 2, 4), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(500, 200, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, + M1_HUMANOID|M1_POIS|M1_OMNIVORE, + M2_HOSTILE|M2_LORD|M2_MALE|M2_COLLECT, M3_INFRAVISIBLE|M3_INFRAVISION, + HI_LORD), +#else MON("kobold lord", S_KOBOLD, LVL(2, 6, 10, 0, -4), (G_GENO|1), A(ATTK(AT_WEAP, AD_PHYS, 2, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(500, 200, 0, MS_ORC, MZ_SMALL), MR_POISON, 0, M1_HUMANOID|M1_POIS|M1_OMNIVORE, M2_HOSTILE|M2_LORD|M2_MALE|M2_COLLECT, M3_INFRAVISIBLE|M3_INFRAVISION, HI_LORD), +#endif MON("kobold shaman", S_KOBOLD, LVL(2, 6, 6, 10, -4), (G_GENO|1), A(ATTK(AT_MAGC, AD_SPEL, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -603,8 +627,22 @@ A(ATTK(AT_CLAW, AD_SGLD, 1, 2), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(60, 30, 0, MS_LAUGH, MZ_TINY), 0, 0, M1_HUMANOID|M1_TPORT, M2_HOSTILE|M2_GREEDY, M3_INFRAVISIBLE, CLR_GREEN), +#ifdef WEBB_BIODIVERSITY + MON("brownie", S_LEPRECHAUN, + LVL(6, 15, 8, 20, 0), (G_GENO|G_SGROUP|2), + A( ATTK(AT_CLAW, AD_SHOE, 1, 2), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(60, 30, 0, MS_MUMBLE, MZ_TINY), 0, 0, + M1_HUMANOID|M1_HERBIVORE, M2_COLLECT, M3_INFRAVISIBLE, CLR_BROWN), + MON("pooka", S_LEPRECHAUN, + LVL(8,12,8,20,-4), (G_GENO|1), + A( ATTK(AT_WEAP, AD_PHYS, 2, 4), ATTK(AT_TUCH,AD_CHRM,0,0), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_ELF, 350, 0, MS_LAUGH, MZ_HUMAN), 0, 0, + M1_HUMANOID|M1_HERBIVORE, M2_HOSTILE, M3_INFRAVISIBLE, CLR_WHITE), +#endif /* * mimics */ MON("small mimic", S_MIMIC, @@ -633,15 +671,25 @@ M2_HOSTILE|M2_STRONG, 0, HI_LORD), /* * nymphs */ +#if defined WEBB_MUTATED_MONST + MON("dryad", S_NYMPH, + LVL(3, 12, 9, 20, 0), (G_GENO|2), + A(ATTK(AT_CLAW, AD_SITM, 0, 0), ATTK(AT_CLAW, AD_SEDU, 0, 0), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(600, 300, 0, MS_SEDUCE, MZ_HUMAN), 0, 0, + M1_HUMANOID|M1_TPORT, M2_HOSTILE|M2_FEMALE|M2_COLLECT, M3_INFRAVISIBLE, + CLR_GREEN), +#else MON("wood nymph", S_NYMPH, LVL(3, 12, 9, 20, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_SITM, 0, 0), ATTK(AT_CLAW, AD_SEDU, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(600, 300, 0, MS_SEDUCE, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_TPORT, M2_HOSTILE|M2_FEMALE|M2_COLLECT, M3_INFRAVISIBLE, CLR_GREEN), +#endif MON("water nymph", S_NYMPH, LVL(3, 12, 9, 20, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_SITM, 0, 0), ATTK(AT_CLAW, AD_SEDU, 0, 0), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -654,8 +702,17 @@ NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(600, 300, 0, MS_SEDUCE, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_TPORT, M2_HOSTILE|M2_FEMALE|M2_COLLECT, M3_INFRAVISIBLE, CLR_BROWN), +#ifdef WEBB_SATYR + MON("satyr", S_NYMPH, + LVL(5, 12, 9, 20, 0), (G_GENO|2), + A( ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_NTCH, AD_SITM, 2, 4), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(600, 300, 0, MS_LAUGH, MZ_HUMAN), 0, 0, + M1_HUMANOID, M2_HOSTILE|M2_COLLECT, + M3_INFRAVISIBLE, CLR_BROWN), +#endif /* * orcs */ MON("goblin", S_ORC, @@ -885,8 +942,17 @@ NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(800, 350, 0, MS_SILENT, MZ_HUGE), 0, 0, M1_HIDE|M1_ANIMAL|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_CARNIVORE, M2_HOSTILE|M2_STALK|M2_STRONG, 0, CLR_GREEN), +#ifdef WEBB_BIODIVERSITY + MON("labyrinth trapper", S_TRAPPER, + LVL(14, 3, 3, 0, 0), (G_GENO|G_HELL|2), + A(ATTK(AT_TUCH, AD_STCK, 0, 0), ATTK(AT_ENGL, AD_DGST, 2, 8), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(800, 350, 0, MS_SILENT, MZ_HUGE), MR_STONE, 0, + M1_HIDE|M1_ANIMAL|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_CARNIVORE| + M1_WALLWALK|M1_THICK_HIDE, M2_HOSTILE|M2_STALK|M2_STRONG, 0, HI_LORD), +#endif /* * unicorns and horses */ MON("white unicorn", S_UNICORN, @@ -965,11 +1031,14 @@ MR_ELEC|MR_SLEEP|MR_DISINT|MR_POISON|MR_STONE, 0, M1_FLY|M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS| M1_UNSOLID, M2_HOSTILE|M2_NEUTER, 0, HI_ZAP), +#ifndef AD_SCLD +# define AD_SCLD AD_FIRE +#endif MON("steam vortex", S_VORTEX, LVL(7, 22, 2, 30, 0), (G_HELL|G_GENO|G_NOCORPSE|2), - A(ATTK(AT_ENGL, AD_FIRE, 1, 8), + A(ATTK(AT_ENGL, AD_SCLD, 1, 8), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(0, 0, 0, MS_SILENT, MZ_HUGE), MR_FIRE|MR_SLEEP|MR_POISON|MR_STONE, 0, M1_FLY|M1_BREATHLESS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD|M1_MINDLESS| @@ -1030,8 +1099,17 @@ NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(300, 300, 0, MS_BUZZ, MZ_TINY), MR_POISON, MR_POISON, M1_FLY|M1_ANIMAL|M1_NOHANDS|M1_POIS, M2_HOSTILE, M3_INFRAVISIBLE, CLR_RED), +#ifdef WEBB_GOLDBUG + MON("gold bug", S_XAN, + LVL(8, 16, -6, 0, 0), (G_GENO), + A(ATTK(AT_BITE, AD_PHYS, 2, 4),ATTK(AT_CLAW, AD_EGLD, 1, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(300, 50, 0, MS_SILENT, MZ_TINY), MR_POISON, 0, + M1_FLY|M1_ANIMAL|M1_NOHANDS|M1_METALLIVORE, + M2_HOSTILE|M2_GREEDY, 0,HI_GOLD), +#endif /* * lights */ MON("yellow light", S_LIGHT, @@ -1053,11 +1131,37 @@ MR_STONE, 0, M1_FLY|M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| M1_MINDLESS|M1_UNSOLID|M1_SEE_INVIS|M1_NOTAKE, M2_HOSTILE|M2_NEUTER, 0, CLR_BLACK), +#ifdef WEBB_BIODIVERSITY + MON("will o' wisp", S_LIGHT, + LVL(7, 15, 0, 20, 0), (G_NOCORPSE|G_GENO|1), + A(ATTK(AT_EXPL, AD_CONF, 10,20), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(0, 0, 0, MS_SILENT, MZ_SMALL), + MR_FIRE|MR_COLD|MR_ELEC|MR_DISINT|MR_SLEEP|MR_POISON|MR_ACID| + MR_STONE, 0, + M1_FLY|M1_BREATHLESS|M1_AMORPHOUS|M1_NOEYES|M1_NOLIMBS|M1_NOHEAD| + M1_MINDLESS|M1_UNSOLID|M1_NOTAKE, + M2_PEACEFUL|M2_NEUTER|M2_NOPOLY, M3_INFRAVISIBLE, CLR_WHITE), +#endif /* * zruty */ +#ifdef WEBB_BIODIVERSITY + MON("bannik", S_ZRUTY, + LVL(5, 10, 5, 15, 0), (G_GENO|1), + A(ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_CLAW, AD_PHYS, 1, 6), + ATTK(AT_HUGS, AD_SCLD, 2, 8), NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_HUMAN, 300, 0, MS_MUMBLE, MZ_HUMAN), MR_FIRE|MR_POISON, 0, + M1_HUMANOID|M1_CARNIVORE,M2_HOSTILE,M3_INFRAVISIBLE, CLR_BLUE), + MON("leshy", S_ZRUTY, + LVL(7, 15, 7, 25, 0), (G_GENO|1), + A(ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_GAZE, AD_CONF, 0, 0), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_HUMAN, 400, 0, MS_LAUGH, MZ_HUMAN), 0,0, + M1_HUMANOID|M1_HERBIVORE,0,M3_INFRAVISIBLE, CLR_GREEN), +#endif MON("zruty", S_ZRUTY, LVL(9, 8, 3, 0, 0), (G_GENO|2), A(ATTK(AT_CLAW, AD_PHYS, 3, 4), ATTK(AT_CLAW, AD_PHYS, 3, 4), ATTK(AT_BITE, AD_PHYS, 3, 6), NO_ATTK, NO_ATTK, NO_ATTK), @@ -1180,8 +1284,170 @@ * * As reptiles, dragons are cold-blooded and thus aren't seen * with infravision. Red dragons are the exception. */ +/* biodiversity: + * gray -> + * silver -> + * red -> fire drake + * white -> lindworm, remove fly, increase speed + * orange -> eastern/lung dragon + * black -> + * blue -> leviathan, remove fly, add swim + * green -> wyvern, remove claw attk, add sting + * yellow -> guivre, remove fly, claw attks, add hug + */ + +#if defined WEBB_MUTATED_MONST + MON("baby gray dragon", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), 0, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_GRAY), + MON("baby silver dragon", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), 0, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, DRAGON_SILVER), + MON("baby firedrake", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_FIRE, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, M3_INFRAVISIBLE, CLR_RED), + MON("baby lindworm", S_DRAGON, + LVL(12, 12, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_COLD, 0, + M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_WHITE), + MON("baby lung dragon", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_SLEEP, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_ORANGE), + MON("baby black dragon", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_DISINT, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_BLACK), + MON("baby leviathan", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_ELEC, 0, + M1_SWIM|M1_AMPHIBIOUS|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_BLUE), + MON("baby wyvern", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_POISON, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE|M1_POIS, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_GREEN), + MON("baby guivre", S_DRAGON, + LVL(12, 9, 2, 10, 0), G_GENO, + A(ATTK(AT_BITE, AD_PHYS, 2, 6), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1500, 500, 0, MS_ROAR, MZ_HUGE), MR_ACID|MR_STONE, 0, + M1_THICK_HIDE|M1_NOLIMBS|M1_CARNIVORE|M1_SLITHY|M1_ACID, + M2_HOSTILE|M2_STRONG|M2_GREEDY|M2_JEWELS, 0, CLR_YELLOW), + MON("gray dragon", S_DRAGON, + LVL(15, 9, -1, 20, 4), (G_GENO|1), + A(ATTK(AT_BREA, AD_MAGM, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), 0, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, CLR_GRAY), + MON("silver dragon", S_DRAGON, + LVL(15, 9, -1, 20, 4), (G_GENO|1), + A(ATTK(AT_BREA, AD_COLD, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_COLD, 0, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, + 0, DRAGON_SILVER), + MON("firedrake", S_DRAGON, + LVL(15, 9, -1, 20, -4), (G_GENO|1), + A(ATTK(AT_BREA, AD_FIRE, 6, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_FIRE, MR_FIRE, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, + M3_INFRAVISIBLE, CLR_RED), + MON("lindworm", S_DRAGON, + LVL(15, 18, -1, 20, -5), (G_GENO|1), + A(ATTK(AT_BREA, AD_COLD, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_COLD, MR_COLD, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, CLR_WHITE), + MON("lung dragon", S_DRAGON, + LVL(15, 9, -1, 20, 5), (G_GENO|1), + A(ATTK(AT_BREA, AD_SLEE, 4,25), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_SLEEP, MR_SLEEP, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, + 0, CLR_ORANGE), + MON("black dragon", S_DRAGON, + LVL(15, 9, -1, 20, -6), (G_GENO|1), + A(ATTK(AT_BREA, AD_DISN, 4,10), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_DISINT, MR_DISINT, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, CLR_BLACK), + MON("leviathan", S_DRAGON, + LVL(15, 9, -1, 20, -7), (G_GENO|1), + A(ATTK(AT_BREA, AD_ELEC, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_ELEC, MR_ELEC, + M1_SWIM|M1_AMPHIBIOUS|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, CLR_BLUE), + MON("wyvern", S_DRAGON, + LVL(15, 9, -1, 20, 6), (G_GENO|1), + A(ATTK(AT_BREA, AD_DRST, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_STNG, AD_DRST, 1, 4), + NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), MR_POISON, MR_POISON, + M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_CARNIVORE|M1_POIS, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, CLR_GREEN), + MON("guivre", S_DRAGON, + LVL(15, 9, -1, 20, 7), (G_GENO|1), + A(ATTK(AT_BREA, AD_ACID, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8), + ATTK(AT_TUCH, AD_PHYS, 0, 0), ATTK(AT_HUGS, AD_WRAP, 1, 4), + ATTK(AT_HUGS, AD_PHYS, 2, 4), NO_ATTK), + SIZ(WT_DRAGON, 1500, 0, MS_ROAR, MZ_GIGANTIC), + MR_ACID|MR_STONE, MR_STONE, + M1_THICK_HIDE|M1_NOLIMBS|M1_SEE_INVIS|M1_OVIPAROUS| + M1_SLITHY|M1_CARNIVORE|M1_ACID, + M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, + 0, CLR_YELLOW), +#else MON("baby gray dragon", S_DRAGON, LVL(12, 9, 2, 10, 0), G_GENO, A(ATTK(AT_BITE, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -1350,8 +1616,9 @@ M1_FLY|M1_THICK_HIDE|M1_NOHANDS|M1_SEE_INVIS|M1_OVIPAROUS| M1_CARNIVORE|M1_ACID, M2_HOSTILE|M2_STRONG|M2_NASTY|M2_GREEDY|M2_JEWELS|M2_MAGIC, 0, CLR_YELLOW), +#endif /* * Elementals */ MON("stalker", S_ELEMENTAL, @@ -1580,8 +1847,27 @@ NO_ATTK, NO_ATTK), SIZ(1300, 600, 0, MS_BURBLE, MZ_LARGE), 0, 0, M1_ANIMAL|M1_FLY|M1_CARNIVORE, M2_HOSTILE|M2_STRONG|M2_NASTY|M2_COLLECT, M3_INFRAVISIBLE, CLR_ORANGE), +#ifdef WEBB_CARROLL + MON("bandersnatch", S_JABBERWOCK, + LVL(20, 8, 0, 65, 0 ), (G_GENO|1), + A(ATTK(AT_BUTT, AD_STUN, 2, 10), ATTK(AT_ENGL, AD_DGST, 1, 10), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_DRAGON, 1800, 0, MS_BURBLE, MZ_GIGANTIC), + MR_FIRE|MR_COLD|MR_SLEEP|MR_ELEC|MR_POISON|MR_ACID|MR_STONE, 0, + M1_SWIM|M1_AMPHIBIOUS|M1_NOTAKE|M1_NOHANDS|M1_NOLIMBS|M1_ANIMAL| + M1_THICK_HIDE|M1_REGEN|M1_HERBIVORE, M2_NEUTER, M3_CLOSE|M3_INFRAVISIBLE, + CLR_WHITE), + MON("jubjub bird", S_JABBERWOCK, + LVL(12, 20, -2, 10, 0), (G_GENO|0), + A(ATTK(AT_GAZE, AD_DRIN, 0, 0), ATTK(AT_BITE, AD_PHYS, 1, 10), + ATTK(AT_CLAW, AD_PHYS, 2, 5), ATTK(AT_CLAW, AD_PHYS, 2, 5), + NO_ATTK, NO_ATTK), + SIZ(1500, 800, 0, MS_SQAWK, MZ_LARGE), 0, 0, + M1_FLY|M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, + M2_WANDER|M2_HOSTILE|M2_NASTY, M3_INFRAVISIBLE, CLR_BROWN), +#endif #if 0 /* DEFERRED */ MON("vorpal jabberwock", S_JABBERWOCK, LVL(20, 12, -2, 50, 0), (G_GENO|1), A(ATTK(AT_BITE, AD_PHYS, 3, 10), ATTK(AT_BITE, AD_PHYS, 3, 10), @@ -1851,15 +2137,37 @@ M2_HOSTILE|M2_NEUTER, 0, CLR_GREEN), /* * Quantum mechanics */ +#ifdef WEBB_BIODIVERSITY + MON("clockwork automaton", S_QUANTMECH, + LVL(6, 12, 8, 30, 0), (G_GENO|G_NOCORPSE|1), + A( ATTK(AT_WEAP, AD_PHYS, 2, 6), ATTK(AT_WEAP, AD_PHYS, 2, 6), + ATTK(AT_WEAP, AD_PHYS, 2, 6), ATTK(AT_WEAP, AD_PHYS, 2, 6), + ATTK(AT_WEAP, AD_PHYS, 2, 6), ATTK(AT_WEAP, AD_PHYS, 2, 6)), + SIZ(WT_HUMAN, 0, 0, MS_HUMANOID, MZ_HUMAN), + MR_STONE|MR_COLD|MR_SLEEP|MR_POISON, 0, + M1_HUMANOID|M1_BREATHLESS, M2_STALK|M2_COLLECT, M3_CLOSE, + HI_COPPER), +#endif MON("quantum mechanic", S_QUANTMECH, LVL(7, 12, 3, 10, 0), (G_GENO|3), A(ATTK(AT_CLAW, AD_TLPT, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(WT_HUMAN, 20, 0, MS_HUMANOID, MZ_HUMAN), MR_POISON, 0, M1_HUMANOID|M1_OMNIVORE|M1_POIS|M1_TPORT, M2_HOSTILE, M3_INFRAVISIBLE, CLR_CYAN), +#ifdef WEBB_BIODIVERSITY + MON("quark", S_QUANTMECH, + LVL(9, 18, 0, 50, 0), (G_GENO|G_NOCORPSE|1), + A(ATTK(AT_CLAW, AD_FLVR, 1, 4), ATTK(AT_CLAW, AD_DREN,1 ,4), + ATTK(AT_CLAW, AD_ELEC, 1, 4), NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(0, 0, 0, MS_SILENT, MZ_TINY), + MR_POISON|MR_ELEC|MR_DISINT|MR_SLEEP|MR_ACID, 0, + M1_TPORT|M1_UNSOLID|M1_MINDLESS|M1_NOHEAD|M1_NOLIMBS|M1_NOEYES|M1_NOTAKE| + M1_BREATHLESS|M1_AMORPHOUS|M1_FLY,M2_HOSTILE|M2_NEUTER,0, + HI_ZAP), +#endif /* * Rust monster or disenchanter */ MON("rust monster", S_RUSTMONST, @@ -1875,8 +2183,19 @@ NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), SIZ(750, 200, 0, MS_GROWL, MZ_LARGE), 0, 0, M1_ANIMAL|M1_CARNIVORE, M2_HOSTILE, M3_INFRAVISIBLE, CLR_BLUE), +#ifdef WEBB_DISINT + MON("disintegrator", S_RUSTMONST, + LVL(18, 8, 0, 20, -3), (G_HELL|G_GENO|G_NOCORPSE), + A(ATTK(AT_CLAW, AD_DISN, 4, 4), /* don't want passive, disintegration + has to intercept attacks */ + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(1000, 0, 0, MS_HISS, MZ_LARGE), MR_DISINT|MR_STONE, 0, + M1_ANIMAL|M1_TUNNEL|M1_NOTAKE|M1_NOHANDS|M1_REGEN, + M2_NOPOLY|M2_HOSTILE|M2_WANDER|M2_NASTY, + M3_INFRAVISIBLE, CLR_BRIGHT_GREEN), +#endif /* * Snakes */ MON("garter snake", S_SNAKE, @@ -1982,8 +2301,24 @@ ATTK(AT_BITE, AD_PHYS, 2, 5), ATTK(AT_GAZE, AD_CONF, 0, 0), NO_ATTK, NO_ATTK), SIZ(1200, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, M1_TUNNEL|M1_CARNIVORE, M2_STRONG, M3_INFRAVISIBLE, CLR_BROWN), +#ifdef WEBB_BIODIVERSITY + MON("umbral hulk", S_UMBER, + LVL(10, 6, 2, 25, -3), (G_GENO|2), + A(ATTK(AT_CLAW, AD_PHYS, 3, 4), ATTK(AT_CLAW, AD_PHYS, 3, 4), + ATTK(AT_BITE, AD_CONF, 2, 5), ATTK(AT_GAZE, AD_BLND, 3, 4), + NO_ATTK, NO_ATTK), + SIZ(1200, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, + M1_CARNIVORE, M2_STRONG|M2_WANDER|M2_HOSTILE, M3_INFRAVISIBLE, CLR_BLACK), + MON("hunger hulk", S_UMBER, + LVL(11, 6, 2, 25, -3), (G_GENO|2), + A(ATTK(AT_CLAW, AD_PHYS, 3, 4), ATTK(AT_CLAW, AD_PHYS, 3, 4), + ATTK(AT_BITE, AD_CONF, 2, 5), ATTK(AT_GAZE, AD_HNGY, 0, 0), + NO_ATTK, NO_ATTK), + SIZ(1200, 500, 0, MS_SILENT, MZ_LARGE), 0, 0, + M1_CARNIVORE|M1_TUNNEL, M2_STRONG, M3_INFRAVISIBLE, CLR_RED), +#endif /* * Vampires */ MON("vampire", S_VAMPIRE, @@ -2011,8 +2346,18 @@ M1_FLY|M1_BREATHLESS|M1_HUMANOID|M1_POIS|M1_REGEN, M2_UNDEAD|M2_STALK|M2_HOSTILE|M2_STRONG|M2_NASTY|M2_LORD|M2_MALE| M2_MAGIC, M3_INFRAVISIBLE, HI_ZAP), #endif +#ifdef WEBB_BIODIVERSITY + MON("nosferatu", S_VAMPIRE, + LVL(20, 14, -4, 50, -9), (G_GENO|G_NOCORPSE|1), + A(ATTK(AT_CLAW, AD_DRLI, 2, 8), ATTK(AT_BITE, AD_DRLI, 1, 8), + ATTK(AT_GAZE, AD_PLYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_HUMAN, 400, 0, MS_VAMPIRE, MZ_HUMAN), MR_SLEEP|MR_POISON, 0, + M1_FLY|M1_BREATHLESS|M1_HUMANOID|M1_POIS|M1_REGEN, + M2_UNDEAD|M2_STALK|M2_HOSTILE|M2_STRONG|M2_NASTY|M2_LORD|M2_MALE| + M2_MAGIC, M3_INFRAVISIBLE, CLR_GRAY), +#endif MON("Vlad the Impaler", S_VAMPIRE, LVL(14, 18, -3, 80, -10), (G_NOGEN|G_NOCORPSE|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 1, 10), ATTK(AT_BITE, AD_DRLI, 1, 10), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), @@ -2058,8 +2403,28 @@ SIZ(1200, 700, 0, MS_ROAR, MZ_MEDIUM), MR_FIRE|MR_COLD|MR_STONE, MR_STONE, M1_BREATHLESS|M1_WALLWALK|M1_THICK_HIDE|M1_METALLIVORE, M2_HOSTILE|M2_STRONG, 0, CLR_BROWN), +#ifdef WEBB_LAME_MONSTERS + MON("blemmye", S_XORN, + LVL(12, 12, 10, 40, -1), (G_GENO|G_LGROUP|2), + A(ATTK(AT_WEAP, AD_PHYS, 4,10), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_HUMAN, 400, 0, MS_GRUNT, MZ_HUMAN), 0, 0, + M1_HUMANOID|M1_OMNIVORE|M1_NOHEAD, M2_STRONG|M2_COLLECT, + M3_INFRAVISIBLE, CLR_GRAY), +#endif +#ifdef WEBB_BIODIVERSITY + MON("otyugh", S_XORN, + LVL(14, 12, -4, 40, 0), (G_GENO|G_NOGEN), + A(ATTK(AT_CLAW, AD_PHYS, 1, 6), ATTK(AT_CLAW, AD_PHYS, 1, 6), + ATTK(AT_HUGS, AD_PHYS, 2, 6), ATTK(AT_TENT, AD_DRST, 2, 6), + NO_ATTK, NO_ATTK), + SIZ(WT_HUMAN, 100, 0, MS_SILENT, MZ_LARGE), + MR_FIRE|MR_COLD|MR_ACID, 0, + M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS|M1_OMNIVORE|M1_NOHEAD|M1_POIS, + M2_STRONG|M2_HOSTILE|M2_NEUTER, 0, CLR_GREEN), +#endif /* * Apelike beasts */ MON("monkey", S_YETI, @@ -2524,8 +2889,19 @@ MR_COLD|MR_DISINT|MR_SLEEP|MR_POISON|MR_STONE, 0, M1_FLY|M1_BREATHLESS|M1_WALLWALK|M1_HUMANOID|M1_UNSOLID|M1_SEE_INVIS, M2_NOPOLY|M2_UNDEAD|M2_WANDER|M2_STALK|M2_HOSTILE|M2_NASTY, M3_INFRAVISION, CLR_BLACK), +#ifdef WEBB_BIODIVERSITY + MON("poltergeist", S_GHOST, + LVL(14, 10, -5, 75, -9), (G_SGROUP|G_NOCORPSE|1), + A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), + ATTK(AT_NONE, AD_COLD, 1, 10), NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(WT_HUMAN, 0, 0, MS_SILENT, MZ_MEDIUM), + MR_COLD|MR_DISINT|MR_SLEEP|MR_POISON|MR_STONE, 0, + M1_FLY|M1_BREATHLESS|M1_UNSOLID|M1_SEE_INVIS|M1_NOHEAD|M1_AMORPHOUS| + M1_NOEYES, M2_NOPOLY|M2_UNDEAD|M2_WANDER|M2_COLLECT|M2_MAGIC| + M2_STALK|M2_HOSTILE|M2_NEUTER|M2_STRONG, M3_INFRAVISION, CLR_YELLOW), +#endif /* * (major) demons */ MON("water demon", S_DEMON, @@ -2895,8 +3271,27 @@ NO_ATTK, NO_ATTK), SIZ(1500, 400, 0, MS_MUMBLE, MZ_HUMAN), MR_SLEEP|MR_FIRE, MR_FIRE, M1_HUMANOID|M1_SLITHY|M1_THICK_HIDE|M1_POIS, M2_STALK|M2_HOSTILE|M2_COLLECT|M2_MAGIC, M3_INFRAVISIBLE, CLR_ORANGE), +#ifdef WEBB_TURTLE +/* + * turtles + */ + MON("tortoise", S_TURTLE, + LVL(0, 3, -1, 0, 0), G_GENO|0, + A(ATTK(AT_BITE, AD_PHYS, 1, 2), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(120, 40, 0, MS_SILENT, MZ_TINY), 0, 0, + M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS, 0,0, CLR_GREEN), + MON("alligator snapping turtle", S_TURTLE, + LVL(6, 3, -3, 0, 0), (G_GENO|0), + A(ATTK(AT_BITE, AD_STCK, 4, 2), ATTK(AT_CLAW, AD_PHYS, 1,12), + NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK), + SIZ(500, 100, 0, MS_SILENT, MZ_MEDIUM), 0, 0, + M1_SWIM|M1_AMPHIBIOUS|M1_ANIMAL|M1_THICK_HIDE|M1_NOHANDS| + M1_OVIPAROUS|M1_CARNIVORE, + M2_STRONG|M2_HOSTILE, 0, CLR_BROWN), + /* kappa or ridable turtle */ +#endif /* * dummy monster needed for visual interface */ diff -rwBEN -U4 nethack-3.4.2-test/src/mthrowu.c nethack-3.4.2-diff/src/mthrowu.c --- nethack-3.4.2-test/src/mthrowu.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/mthrowu.c 2003-11-30 09:37:34.000000000 -0600 @@ -177,8 +177,20 @@ mtmp->msleeping = 0; if (vis) hit(distant_name(otmp,mshot_xname), mtmp, exclam(damage)); else if (verbose) pline("%s is hit%s", Monnam(mtmp), exclam(damage)); +#ifdef WEBB_DISINT + if (touch_disintegrates(mtmp->data) && !mtmp->mcan && mtmp->mhp>6 && + !oresist_disintegration(otmp)){ + damage = otmp->owt; + weight_dmg(damage); + mtmp->mhp-=damage; + if(vis) + pline("It disintegrates!"); + obfree(otmp, (struct obj*) 0); + return 1; + } +#endif if (otmp->opoisoned && is_poisonable(otmp)) { if (resists_poison(mtmp)) { if (vis) pline_The("poison doesn't seem to affect %s.", mon_nam(mtmp)); @@ -206,8 +218,24 @@ if (vis) pline_The("acid burns %s!", mon_nam(mtmp)); else if (verbose) pline("It is burned!"); } } +#ifdef WEBB_WATERSPOUT_GARGOYLE + else if (otmp->otyp == WATER_VENOM){ +#ifdef WEBB_BIODIVERSITY + if (does_rust(mtmp->data)){ +#else + if (mtmp->data == &mons[PM_IRON_GOLEM]){ +#endif + if (canseemon(mtmp)) pline("%s rusts.", Monnam(mtmp)); + damage=d(1,6); + } else if(mtmp->data == &mons[PM_GREMLIN]){ + (void)split_mon(mtmp,(struct monst *)0); + } + hurtmarmor(mtmp,AD_RUST); + } +#endif + mtmp->mhp -= damage; if (mtmp->mhp < 1) { if (vis || verbose) pline("%s is %s!", Monnam(mtmp), @@ -360,8 +388,11 @@ } /* fall through */ case CREAM_PIE: case BLINDING_VENOM: +#ifdef WEBB_WATERSPOUT_GARGOYLE + case WATER_VENOM: +#endif hitu = thitu(8, 0, singleobj, (char *)0); break; default: dam = dmgval(singleobj, &youmonst); @@ -407,8 +438,24 @@ makeplural(body_part(EYE)), (num_eyes == 1) ? "s" : ""); } } + +#ifdef WEBB_WATERSPOUT_GARGOYLE + if (hitu && singleobj->otyp == WATER_VENOM) { + if (u.umonnum == PM_GREMLIN){ + (void)split_mon(&youmonst, (struct monst *)0); +#ifdef WEBB_BIODIVERSITY + } else if (does_rust(youmonst.data)){ +#else + } else if ( u.umonnum == PM_IRON_GOLEM){ +#endif + You("rust!"); + rehumanize(); + } + (void)hurtarmor(AD_RUST); + } +#endif if (hitu && singleobj->otyp == EGG) { if (!Stone_resistance && !(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))) { @@ -491,19 +538,33 @@ int multishot; const char *onm; /* Rearranged beginning so monsters can use polearms not in a line */ +#ifdef WEBB_BIODIVERSITY + if (mtmp->data != &mons[PM_POLTERGEIST] && + (mtmp->weapon_check == NEED_WEAPON || !MON_WEP(mtmp))) { +#else if (mtmp->weapon_check == NEED_WEAPON || !MON_WEP(mtmp)) { +#endif mtmp->weapon_check = NEED_RANGED_WEAPON; /* mon_wield_item resets weapon_check as appropriate */ if(mon_wield_item(mtmp) != 0) return; } /* Pick a weapon */ otmp = select_rwep(mtmp); - if (!otmp) return; + if (!otmp){ +#ifdef WEBB_BIODIVERSITY + if (mtmp->data == &mons[PM_POLTERGEIST]) monflee(mtmp, 3, TRUE, FALSE); +#endif + return; + } - if (is_pole(otmp)) { + if (is_pole(otmp) +#ifdef WEBB_BIODIVERSITY + && mtmp->data != &mons[PM_POLTERGEIST] +#endif + ) { int dam, hitv; if (dist2(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) > POLE_LIM || !couldsee(mtmp->mx, mtmp->my)) @@ -535,8 +596,11 @@ * chase, but if you are getting too far away, throw. */ if (!lined_up(mtmp) || (URETREATING(x,y) && +#ifdef WEBB_BIODIVERSITY + mtmp->data != &mons[PM_POLTERGEIST] && +#endif rn2(BOLT_LIM - distmin(x,y,mtmp->mux,mtmp->muy)))) return; skill = objects[otmp->otyp].oc_skill; @@ -572,8 +636,12 @@ (is_orc(mtmp->data) && otmp->otyp == ORCISH_ARROW && mwep && mwep->otyp == ORCISH_BOW)) multishot++; +#ifdef WEBB_BIODIVERSITY + if( mtmp->data == &mons[PM_POLTERGEIST]) + multishot += (curr_mon_load(mtmp) * 2) / max_mon_load(mtmp); +#endif if ((long)multishot > otmp->quan) multishot = (int)otmp->quan; if (multishot < 1) multishot = 1; else multishot = rnd(multishot); @@ -633,8 +701,13 @@ case AD_BLND: case AD_DRST: otmp = mksobj(BLINDING_VENOM, TRUE, FALSE); break; +#ifdef WEBB_WATERSPOUT_GARGOYLE + case AD_RUST: + otmp = mksobj(WATER_VENOM, TRUE, FALSE); + break; +#endif default: impossible("bad attack type in spitmu"); /* fall through */ case AD_ACID: @@ -642,9 +715,13 @@ break; } if(!rn2(BOLT_LIM-distmin(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy))) { if (canseemon(mtmp)) +#ifdef WEBB_WATERSPOUT_GARGOYLE + pline("%s spits %s!", Monnam(mtmp),(mattk->adtyp==AD_RUST?"water":"venom")); +#else pline("%s spits venom!", Monnam(mtmp)); +#endif m_throw(mtmp, mtmp->mx, mtmp->my, sgn(tbx), sgn(tby), distmin(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy), otmp); nomul(0); return 0; diff -rwBEN -U4 nethack-3.4.2-test/src/muse.c nethack-3.4.2-diff/src/muse.c --- nethack-3.4.2-test/src/muse.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/muse.c 2003-11-30 09:37:34.000000000 -0600 @@ -1558,8 +1558,12 @@ #define MUSE_POT_SPEED 6 #define MUSE_WAN_SPEED_MONSTER 7 #define MUSE_BULLWHIP 8 #define MUSE_POT_POLYMORPH 9 +#ifdef WEBB_TREE +# define MUSE_SEED 10 +extern const int treefruits[]; +#endif boolean find_misc(mtmp) struct monst *mtmp; @@ -1665,8 +1669,23 @@ && monstr[monsndx(mdat)] < 6) { m.misc = obj; m.has_misc = MUSE_POT_POLYMORPH; } +#ifdef WEBB_TREE + nomore(MUSE_SEED); + if(mtmp->data == &mons[PM_LESHY] && !mtmp->mcan && !mtmp->mspec_used && + ((mtmp->mx + mtmp->my) & 1) && /* only on odd squares */ + obj->oclass == FOOD_CLASS && !obj->oeaten ){ + int i; + for(i=0; i< 7 ; ++i){ + if (obj->otyp == treefruits[i]){ + m.misc = obj; + m.has_misc = MUSE_SEED; + break; + } + } + } +#endif /* WEBB_TREE */ } return((boolean)(!!m.has_misc)); #undef nomore } @@ -1869,8 +1888,29 @@ } return 1; } return 0; +#ifdef WEBB_TREE + case MUSE_SEED: + if(!rn2(5) || 1){ + int i, tx = mtmp->mx, ty = mtmp->my; + struct rm * there = &levl[tx][ty]; + if (!IS_ROOM(there->typ)) return 0; + for(i=0; i < 7 ; ++i) + if (otmp->otyp == treefruits[i]) break; + there->typ = TREE; + there->flags = TREE_SWARM | ((i+1)<<2); + block_point(tx, ty); + newsym(tx, ty); + if (vis) + pline("Suddenly %s springs out of the ground!", + an(rmname(there))); + m_useup(mtmp, otmp); + mtmp->mspec_used += rn1(20, (SKY_AT(tx, ty))?20:60); + return 2; + } + return 0; +#endif case 0: return 0; /* i.e. an exploded wand */ default: impossible("%s wanted to perform action %d?", Monnam(mtmp), m.has_misc); break; @@ -1955,8 +1995,23 @@ return (boolean)(!mon->minvis && !mon->invis_blkd && !attacktype(mon->data, AT_GAZE)); if (typ == WAN_SPEED_MONSTER || typ == POT_SPEED) return (boolean)(mon->mspeed != MFAST); +#ifdef WEBB_BIODIVERSITY + /* some monsters only want certain items */ + switch (mon->data->mlet){ + case S_QUANTMECH: + if(mon->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !m_carrying(mon,SKELETON_KEY) && + obj->oclass == SKELETON_KEY) + return TRUE; + return FALSE; + break; + default: + break; + } +#endif + switch (obj->oclass) { case WAND_CLASS: if (obj->spe <= 0) return FALSE; diff -rwBEN -U4 nethack-3.4.2-test/src/music.c nethack-3.4.2-diff/src/music.c --- nethack-3.4.2-test/src/music.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/music.c 2003-11-30 09:37:34.000000000 -0600 @@ -68,10 +68,20 @@ if (!DEADMONSTER(mtmp)) { distm = distu(mtmp->mx, mtmp->my); if (distm < distance) { mtmp->msleeping = 0; +#ifdef WEBB_TURTLES + if(mtmp->data->mlet != S_TURTLE || !(mtmp->mflee))) +#endif mtmp->mcanmove = 1; mtmp->mfrozen = 0; +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !mtmp->mspec_used){ + mtmp->mfrozen = 1; + mtmp->mcanmove = 0; + } +#endif /* May scare some monsters */ if (distm < distance/3 && !resist(mtmp, TOOL_CLASS, 0, NOTELL)) monflee(mtmp, 0, FALSE, TRUE); @@ -391,8 +401,14 @@ exercise(A_DEX, TRUE); break; } /* else FALLTHRU */ case WOODEN_FLUTE: /* May charm snakes */ +#ifdef WEBB_SATYR + if (youmonst.data == &mons[PM_SATYR]){ + docharm(); + break; + } +#endif do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25); pline("%s.", Tobjnam(instr, do_spec ? "trill" : "toot")); if (do_spec) charm_snakes(u.ulevel * 3); exercise(A_DEX, TRUE); @@ -520,8 +536,14 @@ #endif #ifdef PCMUSIC pc_speaker ( instr, buf ); #endif +#if defined WEBB_MUSIC && defined WIN32 + if (!flags.silent){ + play_midi(instr->otyp, buf, objects[instr->otyp].oc_name_known); + } +#endif + #ifdef AMIGA { char nbuf[ 20 ]; int i; diff -rwBEN -U4 nethack-3.4.2-test/src/o_init.c nethack-3.4.2-diff/src/o_init.c --- nethack-3.4.2-test/src/o_init.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/o_init.c 2003-11-30 09:37:34.000000000 -0600 @@ -190,9 +190,17 @@ if (OBJ_DESCR(objects[first]) != (char *)0 && oclass != TOOL_CLASS && oclass != WEAPON_CLASS && oclass != ARMOR_CLASS && - oclass != GEM_CLASS) { + oclass != GEM_CLASS + +#ifdef WEBB_WATERSPOUT_GARGOYLE + && oclass != VENOM_CLASS /* venom class not shuffled at all */ +#endif +#ifdef WEBB_MONEY + && oclass != COIN_CLASS +#endif + ) { int j = last-1; if (oclass == POTION_CLASS) j -= 1; /* only water has a fixed description */ diff -rwBEN -U4 nethack-3.4.2-test/src/objects.c nethack-3.4.2-diff/src/objects.c --- nethack-3.4.2-test/src/objects.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/objects.c 2003-11-30 09:37:34.000000000 -0600 @@ -328,8 +328,29 @@ * the same defined in monst.c. */ #define DRGN_ARMR(name,mgc,power,cost,ac,color) \ ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color) +#ifdef WEBB_MUTATED_MONST +DRGN_ARMR("gray dragon scale mail", 1, ANTIMAGIC, 1200, 1, CLR_GRAY), +DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER), +DRGN_ARMR("firedrake scale mail", 1, FIRE_RES, 900, 1, CLR_RED), +DRGN_ARMR("lindworm scale mail", 1, COLD_RES, 900, 1, CLR_WHITE), +DRGN_ARMR("lung dragon scale mail", 1, SLEEP_RES, 900, 1, CLR_ORANGE), +DRGN_ARMR("black dragon scale mail", 1, DISINT_RES, 1200, 1, CLR_BLACK), +DRGN_ARMR("leviathan scale mail", 1, SHOCK_RES, 900, 1, CLR_BLUE), +DRGN_ARMR("wyvern scale mail", 1, POISON_RES, 900, 1, CLR_GREEN), +DRGN_ARMR("guivre scale mail", 1, ACID_RES, 900, 1, CLR_YELLOW), + +DRGN_ARMR("gray dragon scales", 0, ANTIMAGIC, 700, 7, CLR_GRAY), +DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER), +DRGN_ARMR("firedrake scales", 0, FIRE_RES, 500, 7, CLR_RED), +DRGN_ARMR("lindworm scales", 0, COLD_RES, 500, 7, CLR_WHITE), +DRGN_ARMR("lung dragon scales", 0, SLEEP_RES, 500, 7, CLR_ORANGE), +DRGN_ARMR("black dragon scales", 0, DISINT_RES, 700, 7, CLR_BLACK), +DRGN_ARMR("leviathan scales", 0, SHOCK_RES, 500, 7, CLR_BLUE), +DRGN_ARMR("wyvern scales", 0, POISON_RES, 500, 7, CLR_GREEN), +DRGN_ARMR("guivre scales", 0, ACID_RES, 500, 7, CLR_YELLOW), +#else /* 3.4.1: dragon scale mail reclassified as "magic" since magic is needed to create them */ DRGN_ARMR("gray dragon scale mail", 1, ANTIMAGIC, 1200, 1, CLR_GRAY), DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER), @@ -358,8 +379,9 @@ DRGN_ARMR("black dragon scales", 0, DISINT_RES, 700, 7, CLR_BLACK), DRGN_ARMR("blue dragon scales", 0, SHOCK_RES, 500, 7, CLR_BLUE), DRGN_ARMR("green dragon scales", 0, POISON_RES, 500, 7, CLR_GREEN), DRGN_ARMR("yellow dragon scales", 0, ACID_RES, 500, 7, CLR_YELLOW), +#endif /* WEBB_MUTATED_MONST */ #undef DRGN_ARMR ARMOR("plate mail", (char *)0, 1, 0, 1, 0, 44, 5, 450, 600, 3, 2, ARM_SUIT, IRON, HI_METAL), @@ -704,8 +726,17 @@ FOOD("sprig of wolfsbane", 7, 1, 1, 0, VEGGY, 40, CLR_GREEN), FOOD("clove of garlic", 7, 1, 1, 0, VEGGY, 40, CLR_WHITE), FOOD("slime mold", 75, 1, 5, 0, VEGGY, 250, HI_ORGANIC), +#ifdef WEBB_TREE +# define NUT(name,desc,prob,kn,delay,wt,gval,nutr,sdam,ldam,color) \ +OBJECT( OBJ(name,desc), \ + BITS(kn, 1, 0, 0,0,0,0,0,0,0,0,-P_SLING,VEGGY), 0, \ + FOOD_CLASS, /*prob*/ 0, delay, wt, gval, sdam, ldam, 0, 0, nutr, color) +NUT("acorn", (char *) 0, 0, 1, 1, 10, 0, 5, 2, 0, HI_WOOD), +#undef NUT +#endif + /* people food */ FOOD("lump of royal jelly", 0, 1, 2, 0, VEGGY, 200, CLR_YELLOW), FOOD("cream pie", 25, 1, 10, 0, VEGGY, 100, CLR_WHITE), FOOD("candy bar", 13, 1, 2, 0, VEGGY, 100, CLR_BROWN), @@ -874,16 +905,30 @@ WAND("lightning", "curved", 40, 175, 1, RAY, IRON, HI_METAL), WAND((char *)0, "forked", 0, 150, 1, 0, WOOD, HI_WOOD), WAND((char *)0, "spiked", 0, 150, 1, 0, IRON, HI_METAL), WAND((char *)0, "jeweled", 0, 150, 1, 0, IRON, HI_MINERAL), +#ifdef WEBB_GOLDBUG +WAND((char *)0, "golden", 0, 150, 1, 0, GOLD, HI_GOLD), +#endif + #undef WAND /* coins ... - so far, gold is all there is */ +#ifdef WEBB_MONEY +# define COIN(name,desc,prob,metal,worth,color) OBJECT( \ + OBJ(name,desc), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \ + COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0,color ) + COIN( "gold piece", "zorkmid", 91, GOLD,10,HI_GOLD), + COIN( "silver piece", "groschen", 909, SILVER,1,HI_SILVER), +/* COIN("penny", "copper piece", 900, COPPER,1,HI_COPPER),*/ +# undef COIN +#else #define COIN(name,prob,metal,worth) OBJECT( \ OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \ COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD ) COIN("gold piece", 1000, GOLD,1), #undef COIN +#endif /* gems ... - includes stones and rocks but not boulders */ #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \ OBJ(name,desc), \ @@ -913,8 +958,11 @@ GEM("jasper", "red", 15, 1, 500, 15, 7, GEMSTONE, CLR_RED), GEM("fluorite", "violet", 15, 1, 400, 15, 4, GEMSTONE, CLR_MAGENTA), GEM("obsidian", "black", 9, 1, 200, 15, 6, GEMSTONE, CLR_BLACK), GEM("agate", "orange", 12, 1, 200, 15, 6, GEMSTONE, CLR_ORANGE), +#ifdef WEBB_BIODIVERSITY +GEM("quartz", "white", 0, 1, 200, 15, 7, GEMSTONE, CLR_WHITE), +#endif GEM("jade", "green", 10, 1, 300, 15, 6, GEMSTONE, CLR_GREEN), GEM("worthless piece of white glass", "white", 77, 1, 0, 6, 5, GLASS, CLR_WHITE), GEM("worthless piece of blue glass", "blue", 77, 1, 0, 6, 5, GLASS, CLR_BLUE), GEM("worthless piece of red glass", "red", 77, 1, 0, 6, 5, GLASS, CLR_RED), @@ -951,15 +999,32 @@ OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0, BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL), /* +d4 when "very heavy" */ +#ifndef WEBB_BIODIVERSITY OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0, CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL), +#else +OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0, + CHAIN_CLASS, 500, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL), +OBJECT(OBJ("cogwheel", "toothed disc"), BITS(0,1,0,0, 0,0,0,0, 0,0,WHACK,P_NONE,IRON), 0, + CHAIN_CLASS, 250, 0, 30, 0, 2, 2, 0, 0, 30, HI_METAL), +OBJECT(OBJ("sprocket", "small toothed disc"), BITS(0,1,0,0, 0,0,0,0, 0,0,PIERCE, -P_SHURIKEN,IRON), 0, + CHAIN_CLASS, 250, 0, 2, 0, 6, 4, 0, 0, 30, HI_METAL), +#endif /* +1 both l & s */ - +#ifdef WEBB_WATERSPOUT_GARGOYLE +OBJECT(OBJ("blinding venom", "splash of venom"), + BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0, + VENOM_CLASS, 499, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC), +OBJECT(OBJ("water venom", "splash of water"), + BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0, + VENOM_CLASS, 1, 0, 1, 0, 0, 0, 0, 0, 0, CLR_BLUE), +#else OBJECT(OBJ("blinding venom", "splash of venom"), BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0, VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC), +#endif OBJECT(OBJ("acid venom", "splash of venom"), BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0, VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC), /* +d6 small or large */ diff -rwBEN -U4 nethack-3.4.2-test/src/objnam.c nethack-3.4.2-diff/src/objnam.c --- nethack-3.4.2-test/src/objnam.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/objnam.c 2003-11-30 09:37:34.000000000 -0600 @@ -353,8 +353,12 @@ if(obj->spe > 0) Strcat(buf, " of spinach"); else if (obj->corpsenm == NON_PM) Strcpy(buf, "empty tin"); +#ifdef WEBB_FOOD_NAMES + else if (culinary(&mons[obj->corpsenm])) + Sprintf(eos(buf), " of %s",culinary_name(&mons[obj->corpsenm])); +#endif else if (vegetarian(&mons[obj->corpsenm])) Sprintf(eos(buf), " of %s", mons[obj->corpsenm].mname); else Sprintf(eos(buf), " of %s meat", mons[obj->corpsenm].mname); @@ -365,8 +369,19 @@ Strcpy(buf, actualn); break; case ROCK_CLASS: if (typ == STATUE) +#ifdef WEBB_ENVIRONMENT + if(obj->corpsenm == NON_PM){ + Sprintf(buf, "%s%s of %s", + (Role_if(PM_ARCHEOLOGIST) && (obj->spe & STATUE_HISTORIC)) ? "historic " : "" , + actualn, + (obj->spe & STATUE_HISTORIC) ? "" : + (index(vowels,*ONAME(obj)) ? + "an " : "a ")); + goto nameit; + }else +#endif Sprintf(buf, "%s%s of %s%s", (Role_if(PM_ARCHEOLOGIST) && (obj->spe & STATUE_HISTORIC)) ? "historic " : "" , actualn, type_is_pname(&mons[obj->corpsenm]) ? "" : @@ -716,8 +731,14 @@ (type_is_pname(&mons[obj->corpsenm]) ? "" : "the "), s_suffix(mons[obj->corpsenm].mname)); if (obj->oeaten) Strcat(prefix, "partly eaten "); +#ifdef WEBB_FOOD_NAMES + } else if (culinary(&mons[obj->corpsenm])) { + Strcat(prefix,(obj->quan<2)?"piece of ":"pieces of "); + Strcat(prefix,culinary_name(&mons[obj->corpsenm])); + bp[0]='\0'; +#endif } else { Strcat(prefix, mons[obj->corpsenm].mname); Strcat(prefix, " "); } @@ -734,8 +755,13 @@ if (obj->spe) Strcat(bp, " (laid by you)"); } } +#ifdef WEBB_BIODIVERSITY + if (is_meaty(obj)) + start_corpse_timeout(obj); +#endif + if (obj->otyp == MEAT_RING) goto ring; break; case BALL_CLASS: case CHAIN_CLASS: @@ -835,8 +861,13 @@ boolean ignore_oquan; /* to force singular */ { char *nambuf = nextobuf(); +#ifdef WEBB_FOOD_NAMES + if (culinary(&mons[otmp->corpsenm])){ + Sprintf(nambuf, "piece of %s",culinary_name(&mons[otmp->corpsenm])); + } else +#endif Sprintf(nambuf, "%s corpse", mons[otmp->corpsenm].mname); if (ignore_oquan || otmp->quan < 2) return nambuf; @@ -1335,12 +1366,20 @@ (len >= 5 && (!strcmp(spot-4, "sheep") || !strcmp(spot-4, "ninja") || !strcmp(spot-4, "ronin") || !strcmp(spot-4, "shito") || - !strcmp(spot-7, "shuriken") || + !strcmp(spot-7, "shuriken") || /* shouldn't this check be lower? */ !strcmp(spot-4, "tengu") || !strcmp(spot-4, "manes"))) || - (len >= 6 && !strcmp(spot-5, "ki-rin")) || + (len >= 6 && (!strcmp(spot-5, "ki-rin") +#ifdef WEBB_TEXT_FIX + || !strcmp(spot-5, "danish") +#endif + )) || + +#ifdef WEBB_MONEY + (len >= 8 && !strcmp(spot-7, "groschen")) || +#endif (len >= 7 && !strcmp(spot-6, "gunyoki"))) goto bottom; /* man/men ("Wiped out all cavemen.") */ @@ -1382,8 +1421,16 @@ *(spot--) = (char)0; *spot = 'a'; goto bottom; } +#ifdef WEBB_BIODIVERSITY + /* automata, possibly: criteria, phenomena */ + if (len >= 9 && !strcmp(spot-8, "automaton")) { + *(spot--) = (char) 0; + *spot = 'a'; + goto bottom; + } +#endif /* algae, larvae, hyphae (another fungus part) */ if ((len >= 4 && !strcmp(spot-3, "alga")) || (len >= 5 && @@ -1613,8 +1660,11 @@ !BSTRCMP(bp, p-10, "eucalyptus") || #ifdef WIZARD !BSTRCMP(bp, p-9, "iron bars") || #endif +#ifdef WEBB_TEXT_FIX + !BSTRCMP(bp, p-5, "lotus") || +#endif !BSTRCMP(bp, p-5, "aklys") || !BSTRCMP(bp, p-6, "fungus")) return bp; mins: @@ -1631,8 +1681,15 @@ Strcpy(p-5, "fungus"); return bp; } +#ifdef WEBB_BIODIVERSITY + if (!BSTRCMP(bp, p-9, "automata")){ + Strcpy(p-8, "automaton"); + return bp; + } +#endif + /* here we cannot find the plural suffix */ } return bp; } @@ -1714,8 +1771,23 @@ { "silver sabre", SILVER_SABER }, { "smooth shield", SHIELD_OF_REFLECTION }, { "grey dragon scale mail", GRAY_DRAGON_SCALE_MAIL }, { "grey dragon scales", GRAY_DRAGON_SCALES }, +#ifdef WEBB_MUTATED_MONST + { "red dragon scale mail", FIREDRAKE_SCALE_MAIL}, + { "white dragon scale mail", LINDWORM_SCALE_MAIL}, + { "orange dragon scale mail", LUNG_DRAGON_SCALE_MAIL}, + { "blue dragon scale mail", LEVIATHAN_SCALE_MAIL}, + { "green dragon scale mail", WYVERN_SCALE_MAIL}, + { "yellow dragon scale mail", GUIVRE_SCALE_MAIL}, + + { "red dragon scales", FIREDRAKE_SCALES}, + { "white dragon scales", LINDWORM_SCALES}, + { "orange dragon scales", LUNG_DRAGON_SCALES}, + { "blue dragon scales", LEVIATHAN_SCALES}, + { "green dragon scales", WYVERN_SCALES}, + { "yellow dragon scales", GUIVRE_SCALES}, +#endif { "enchant armour", SCR_ENCHANT_ARMOR }, { "destroy armour", SCR_DESTROY_ARMOR }, { "scroll of enchant armour", SCR_ENCHANT_ARMOR }, { "scroll of destroy armour", SCR_DESTROY_ARMOR }, @@ -2003,12 +2075,25 @@ */ if (!strstri(bp, "wand ") && !strstri(bp, "spellbook ") && !strstri(bp, "finger ")) { +#ifdef WEBB_ENVIRONMENT + if (p = strstri(bp, " of ")){ + if ((mntmp = name_to_mon(p+4)) >= LOW_PM) + *p = 0; + else if (mntmp == NON_PM && strstri(bp, "statue ")){ + name = p+4; + *p = 0; + } + } +#else if ((p = strstri(bp, " of ")) != 0 && (mntmp = name_to_mon(p+4)) >= LOW_PM) *p = 0; +#endif } +#ifdef WEBB_FOOD_NAMES +#endif /* Find corpse type w/o "of" (red dragon scale mail, yeti corpse) */ if (strncmpi(bp, "samurai sword", 13)) /* not the "samurai" monster! */ if (strncmpi(bp, "wizard lock", 11)) /* not the "wizard" monster! */ if (strncmpi(bp, "ninja-to", 8)) /* not the "ninja" rank */ @@ -2346,8 +2431,24 @@ newsym(u.ux, u.uy); return &zeroobj; } # endif +#ifdef WEBB_ENVIRONMENT + if(!BSTRCMP(bp, p-6, "muskeg")) { + levl[u.ux][u.uy].typ = SPOOL; + del_engr_at(u.ux, u.uy); + pline("A muskeg."); + water_damage(level.objects[u.ux][u.uy], FALSE, TRUE); + newsym(u.ux, u.uy); + return &zeroobj; + } + if(!BSTRCMP(bp, p-5, "cloud")) { + levl[u.ux][u.uy].typ = CLOUD; + pline("A cloud."); + newsym(u.ux, u.uy); + return &zeroobj; + } +#endif if(!BSTRCMP(bp, p-4, "pool")) { levl[u.ux][u.uy].typ = POOL; del_engr_at(u.ux, u.uy); pline("A pool."); @@ -2597,8 +2698,14 @@ mntmp - PM_GRAY_DRAGON; break; } } +#ifdef WEBB_ENVIRONMENT + if (typ == STATUE && mntmp == NON_PM && name && strlen(name)){ + otmp->corpsenm = NON_PM; + otmp->spe = STATUE_HISTORIC | STATUE_NONRENAMABLE; + } +#endif /* set blessed/cursed -- setting the fields directly is safe * since weight() is called below and addinv() will take care * of luck */ @@ -2717,8 +2824,65 @@ return(otmp); } +#ifdef WEBB_FOOD_NAMES +/**** + * This allows for deer corpses being venison, and pigs becoming ham + * perhaps cooking meat (burnt) should be explored. + * For now, it mostly just turns fish into sushi for Samurai + * -NWebb + ****/ +boolean +culinary(mdat) +struct permonst * mdat; +{ + if (Role_if(PM_SAMURAI) && (mdat->mlet == S_EEL) && (mdat != &mons[PM_PIRANHA])){ + return 1; +#ifdef WEBB_CARROLL + } else if (mdat == &mons[PM_BANDERSNATCH]) { + return 1; +#endif + } else + return 0; +} + +char * +culinary_name(mdat) + struct permonst * mdat; +{ + char * result = nextobuf(); + int pm = monsndx(mdat); + switch (pm){ +#ifdef WEBB_CARROLL + case PM_BANDERSNATCH: + return "whitefood"; + break; +#endif + case PM_JELLYFISH: + if (Role_if(PM_SAMURAI)) { return "kurage";} + break; + case PM_GIANT_EEL: + if (Role_if(PM_SAMURAI)) { return "unagi";} + break; + case PM_ELECTRIC_EEL: + if (Role_if(PM_SAMURAI)) { return "denki-unagi";} + break; + case PM_SHARK: + if (Role_if(PM_SAMURAI)) { return "fuka";} + break; + case PM_KRAKEN: + if (Role_if(PM_SAMURAI)) { return "ika";} + break; + default: + break; + } + Sprintf(result,"%s%s", mdat->mname,(vegetarian(mdat))?"":" meat"); + return result; +} +#endif + + int rnd_class(first,last) int first,last; { diff -rwBEN -U4 nethack-3.4.2-test/src/pager.c nethack-3.4.2-diff/src/pager.c --- nethack-3.4.2-test/src/pager.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/pager.c 2003-11-30 09:37:34.000000000 -0600 @@ -6,16 +6,23 @@ /* a few other help related facilities */ #include "hack.h" #include "dlb.h" +#if defined(WEBB_BIODIVERSITY) && defined(UNIX) +#include +#endif STATIC_DCL boolean FDECL(is_swallow_sym, (int)); STATIC_DCL int FDECL(append_str, (char *, const char *)); STATIC_DCL struct permonst * FDECL(lookat, (int, int, char *, char *)); STATIC_DCL void FDECL(checkfile, (char *,struct permonst *,BOOLEAN_P,BOOLEAN_P)); STATIC_DCL int FDECL(do_look, (BOOLEAN_P)); STATIC_DCL boolean FDECL(help_menu, (int *)); +#ifdef WEBB_BIODIVERSITY +STATIC_DCL void FDECL(convert_param,(char, char *)); +STATIC_DCL void FDECL(convert_pbuf,(char *)); +#endif #ifdef PORT_HELP extern void NDECL(port_help); #endif @@ -126,8 +133,13 @@ mtmp = m_at(x,y); if (mtmp != (struct monst *) 0) { char *name, monnambuf[BUFSZ]; boolean accurate = !Hallucination; +#ifdef WEBB_BIODIVERSITY /* You read their mind, you learn an unknown name */ + if (mtmp->mnamelth && (uchar)(name = NAME(mtmp))[0] >= (uchar)0x80 && + accurate && (tp_sensemon(mtmp)) ) + introduce_mons(mtmp); +#endif if (mtmp->data == &mons[PM_COYOTE] && accurate) name = coyotename(mtmp, monnambuf); else @@ -246,8 +258,16 @@ } } else Strcpy(buf, distant_name(otmp, xname)); +#ifdef WEBB_ENVIRONMENT + if ((In_quest(&u.uz)) && (flags.pantheon == ROLE_KNIGHT) && + (urole.malenum == PM_PRIEST) && + (levl[x][y].typ == HWALL) && (otmp->otyp == BOULDER) && + (dunlev(&u.uz) == 1)) + Strcpy(buf, "standing stone"); + else +#endif if (levl[x][y].typ == STONE || levl[x][y].typ == SCORR) Strcat(buf, " embedded in stone"); else if (IS_WALL(levl[x][y].typ) || levl[x][y].typ == SDOOR) Strcat(buf, " embedded in a wall"); @@ -279,8 +299,13 @@ break; case S_cloud: Strcpy(buf, Is_airlevel(&u.uz) ? "cloudy area" : "fog/vapor cloud"); break; +#ifdef WEBB_TREE + case S_tree: + Strcpy(buf,rmname(&levl[x][y])); + break; +#endif default: Strcpy(buf,defsyms[glyph_to_cmap(glyph)].explanation); break; } @@ -431,8 +456,11 @@ } datawin = create_nhwindow(NHW_MENU); for (i = 0; i < entry_count; i++) { if (!dlb_fgets(buf, BUFSZ, fp)) goto bad_data_file; +#ifdef WEBB_BIODIVERSITY + convert_pbuf(buf); +#endif if ((ep = index(buf, '\n')) != 0) *ep = 0; if (index(buf+1, '\t') != 0) (void) tabexpand(buf+1); putstr(datawin, 0, buf+1); } @@ -654,9 +682,13 @@ article == 1 ? an(x_str) : x_str); if (is_cmap_trap(i)) hit_trap = TRUE; } - if (i == S_altar || is_cmap_trap(i)) + if (i == S_altar || is_cmap_trap(i) +#ifdef WEBB_TREE + || i == S_tree +#endif + ) need_to_look = TRUE; } } @@ -960,5 +992,100 @@ display_file(HISTORY, TRUE); return 0; } + +#ifdef WEBB_BIODIVERSITY +STATIC_OVL void +convert_param(c, str) + char c; + char * str; +{ + switch(c){ + case 'u': +#ifdef WIN32 + Strcpy(str,get_username(0)); +#else +# ifdef UNIX /*this needs testing */ + struct passwd * pw = getpwuid(getuid()); + char * gecos = pw->pw_gecos; + char buf[64]; + char buf2[64]; + + if (!gecos){ + Strcpy(str,plname); + } else { + char * ch = strchr(gecos,','); + if(ch) + *ch = 0; + if (*gecos == '*') ++gecos; /* don't know why, this was in an example, + which also didn't know why. shame on us */ + strncpy(buf,gecos,63); + buf[63]=0; + while (ch = strchr(buf,'&')){ + strcpy(buf2,ch); + strncpy(ch,pw->pw_name,64-(ch-buf)); + *ch = (char)toupper(ch); + ch += strlen(ch); + strncpy(ch,buf2,64 - (ch-buf)); + } + ch = buf; + while (*ch == ' ') ++ch; + if (ch != buf) { + strcpy (buf2, ch); + strcpy(buf,buf2); + } + if (strlen(buf) > 32){ + if(ch = (strchr(buf,' '))) *ch = 0; + } + if(!strlen(buf)) + Strcpy(str,plname); + else + Strcpy(str,buf); + } +# else + Strcpy(str,plname); +#endif +#endif + break; + case '%': + Strcpy(str,"%"); + break; + default: + str[0]=0; + break; + } +} + +STATIC_OVL void +convert_pbuf(out_buf) +char * out_buf; +{ + static char small_buf[64]; + char * in_c, * out_c; + char in_buf[BUFSZ]; + + in_c = in_buf; + out_c = out_buf; + + Strcpy(in_buf,out_buf); + while(1){ + switch (*in_c){ + case 0: + *(out_c)=0; + return; + break; + case '%': + convert_param(*(++in_c),small_buf); + Strcpy(out_c,small_buf); + out_c += strlen(small_buf); + ++in_c; + break; + default: + *(out_c++) = *(in_c++); + break; + } + } +} + +#endif /*pager.c*/ diff -rwBEN -U4 nethack-3.4.2-test/src/pickup.c nethack-3.4.2-diff/src/pickup.c --- nethack-3.4.2-test/src/pickup.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/pickup.c 2003-11-30 09:37:34.000000000 -0600 @@ -319,8 +319,29 @@ { return TRUE; } +#ifdef WEBB_BIODIVERSITY +boolean +allow_unused(obj) +struct obj * obj; +{ + if (obj->oeroded || obj->oeroded2 || obj->in_use || + obj->lamplit || obj->oeaten || obj->owornmask || + (obj->otyp == LEASH && obj->leashmon)) + return FALSE; + return TRUE; +} +#endif +#ifdef WEBB_MONEY +boolean +allow_cash(obj) + struct obj * obj; +{ + return (obj->otyp == COIN_CLASS); +} +#endif + boolean allow_category(obj) struct obj *obj; { @@ -648,11 +669,18 @@ struct obj *curr, *last; char *pack; anything any; boolean printed_type_name; +#ifdef WEBB_BIODIVERSITY + char buf[BUFSZ]; +#endif *pick_list = (menu_item *) 0; +#ifdef WEBB_BIODIVERSITY + if (!olist) return (qflags & SIGNAL_NOMENU) ? -1 : 0; +#else if (!olist) return 0; +#endif /* count the number of items allowed */ for (n = 0, last = 0, curr = olist; curr; curr = FOLLOW(curr, qflags)) if ((*allow)(curr)) { @@ -701,12 +729,28 @@ printed_type_name = TRUE; } any.a_obj = curr; +#ifdef WEBB_BIODIVERSITY + if ((qflags & PRICES) + && curr->oclass != COIN_CLASS && !curr->no_charge) { + int cost = get_cost(curr, (struct monst *)0); + /* assume no containters + if(Has_contents(curr)) cost+= contained_cost(curr, */ + sprintf(buf, "%s, %ld %s%s", doname(curr), + cost, currency(cost), curr->quan > 1L ? " each" : ""); + } else + Strcpy(buf, doname(curr)); + add_menu(win, obj_to_glyph(curr), &any, + qflags & USE_INVLET ? curr->invlet : 0, + def_oc_syms[(int)objects[curr->otyp].oc_class], + ATR_NONE, buf, MENU_UNSELECTED); +#else add_menu(win, obj_to_glyph(curr), &any, qflags & USE_INVLET ? curr->invlet : 0, def_oc_syms[(int)objects[curr->otyp].oc_class], ATR_NONE, doname(curr), MENU_UNSELECTED); +#endif } } pack++; } while (qflags & INVORDER_SORT && *pack); @@ -1821,9 +1865,13 @@ } if (Icebox && !age_is_relative(obj)) { obj->age = monstermoves - obj->age; /* actual age */ /* stop any corpse timeouts when frozen */ - if (obj->otyp == CORPSE && obj->timed) { + if ((obj->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(obj) +#endif + ) && obj->timed) { long rot_alarm = stop_timer(ROT_CORPSE, (genericptr_t)obj); (void) stop_timer(REVIVE_MON, (genericptr_t)obj); /* mark a non-reviving corpse as such */ if (rot_alarm) obj->norevive = 1; @@ -1921,9 +1969,13 @@ current_container->owt = weight(current_container); if (Icebox && !age_is_relative(obj)) { obj->age = monstermoves - obj->age; /* actual age */ - if (obj->otyp == CORPSE) + if (obj->otyp == CORPSE +#ifdef WEBB_BIODIVERSITY + || is_meaty(obj) +#endif + ) start_corpse_timeout(obj); } /* simulated point of time */ diff -rwBEN -U4 nethack-3.4.2-test/src/polyself.c nethack-3.4.2-diff/src/polyself.c --- nethack-3.4.2-test/src/polyself.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/polyself.c 2003-11-30 09:37:34.000000000 -0600 @@ -309,8 +309,14 @@ if (!uarmg) selftouch("No longer petrify-resistant, you"); made_change: +#ifdef WEBB_CARROLL + if(youmonst.data == &mons[PM_BANDERSNATCH]) { + HUnchanging=-1L; + pline("You have a feeling of permanency."); + } +#endif new_light = Upolyd ? emits_light(youmonst.data) : 0; if (old_light != new_light) { if (old_light) del_light_source(LS_MONSTER, (genericptr_t)&youmonst); @@ -495,11 +501,34 @@ static const char monsterc[] = "monster"; if (can_breathe(youmonst.data)) pline(use_thec,monsterc,"use your breath weapon"); if (attacktype(youmonst.data, AT_SPIT)) +#ifdef WEBB_WATERSPOUT_GARGOYLE + { + if (u.umonnum == PM_WATERSPOUT_GARGOYLE){ + pline(use_thec,monsterc,"spit water"); + }else { pline(use_thec,monsterc,"spit venom"); - if (youmonst.data->mlet == S_NYMPH) + } + } +#else + pline(use_thec,monsterc,"spit venom"); +#endif + if (youmonst.data->mlet == S_NYMPH +#ifdef WEBB_SATYR + && youmonst.data != &mons[PM_SATYR] +#endif + ) pline(use_thec,monsterc,"remove an iron ball"); +#ifdef WEBB_MCHARM + if (attacktype_fordmg(youmonst.data, AT_ANY, AD_CHRM)) + pline(use_thec,monsterc,"charm monsters"); +#endif +#ifdef WEBB_CARROLL + if (youmonst.data == &mons[PM_JUBJUB_BIRD]) + pline(use_thec,monsterc,"screech at monsters"); + else +#endif if (attacktype(youmonst.data, AT_GAZE)) pline(use_thec,monsterc,"gaze at monsters"); if (is_hider(youmonst.data)) pline(use_thec,monsterc,"hide"); @@ -655,9 +684,13 @@ dropx(otmp); } } if (nohands(youmonst.data) || verysmall(youmonst.data) || - slithy(youmonst.data) || youmonst.data->mlet == S_CENTAUR) { + slithy(youmonst.data) || (youmonst.data->mlet == S_CENTAUR +#ifdef WEBB_SATYR + || youmonst.data == &mons[PM_SATYR]) +#endif + ) { if ((otmp = uarmf) != 0) { if (donning(otmp)) cancel_don(); if (is_whirly(youmonst.data)) Your("boots fall away!"); @@ -710,8 +743,23 @@ killer_format = NO_KILLER_PREFIX; killer = "killed while stuck in creature form"; done(DIED); } +#ifdef WEBB_BIODIVERSITY + if (Unchanging && + youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] && + u.uhs >= 4 ){ /* FAINTING */ + char kbuf[20]; + u.uhs = 6; /* STARVED */ + flags.botl = 1; + bot(); + Your("clockwork completely unwinds."); + killer_format = NO_KILLER_PREFIX; + Sprintf(kbuf, "%s ticker stopped", uhis()); + killer = kbuf; + done(STARVING); + } +#endif if (emits_light(youmonst.data)) del_light_source(LS_MONSTER, (genericptr_t)&youmonst); polyman("return to %s form!", urace.adj); @@ -764,10 +812,24 @@ { struct obj *otmp; if (!getdir((char *)0)) return(0); +#ifdef WEBB_WATERSPOUT_GARGOYLE + switch (u.umonnum){ + case (PM_COBRA): + otmp = mksobj( BLINDING_VENOM, TRUE, FALSE); + break; + case (PM_WATERSPOUT_GARGOYLE): + otmp = mksobj( WATER_VENOM, TRUE, FALSE); + break; + default: + otmp = mksobj( ACID_VENOM, TRUE, FALSE); + break; + } +#else otmp = mksobj(u.umonnum==PM_COBRA ? BLINDING_VENOM : ACID_VENOM, TRUE, FALSE); +#endif otmp->spe = 1; /* to indicate it's yours */ throwit(otmp, 0L, FALSE); return(1); } @@ -915,8 +977,48 @@ pline("But none arrive."); return(1); } +#ifdef WEBB_MCHARM +int +docharm() +{ + uchar aatyp=0; + struct obj * pseudo; + int charisma = ACURR(A_CHA); + int energy = (objects[SPE_CHARM_MONSTER].oc_level * ((charisma>10)?7:10) )/2 + - ((charisma>15)?(charisma-15):0); + + if (Confusion){ + pline("What? You're too confused for that."); + return 0; + } + if (u.uenmattk[i].adtyp; break; } } - if (adtyp != AD_CONF && adtyp != AD_FIRE) { +#ifdef WEBB_BIODIVERSITY + if (adtyp == AD_HNGY) adtyp = AD_CONF; +#endif + + if (adtyp != AD_CONF && adtyp != AD_FIRE +#ifdef WEBB_BIODIVERSITY + && adtyp != AD_PLYS +#endif +#ifdef WEBB_CARROLL + && adtyp != AD_DRIN +#endif + ) { impossible("gaze attack %d?", adtyp); return 0; } - if (Blind) { + if (Blind +#ifdef WEBB_CARROLL + && adtyp != AD_DRIN +#endif + ) { You_cant("see anything to gaze at."); return 0; } if (u.uen < 15) { +#ifdef WEBB_CARROLL + You("lack the energy to use your special %s!", + (adtyp == AD_DRIN)?"squawk":"gaze"); +#else You("lack the energy to use your special gaze!"); +#endif return(0); } u.uen -= 15; flags.botl = 1; for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) continue; +#ifdef WEBB_CARROLL + if (adtyp == AD_DRIN && couldsee(mtmp->mx, mtmp->my)){ + looked++; + mtmp->msleeping = 0; + if(mindless(mtmp->data)) + pline("%s doesn't seems to care about your squawk.", Monnam(mtmp)); + else if (flags.safe_dog && !Confusion && !Hallucination && + mtmp->mtame) + You("avoid squaking too loudly at %s.", y_monnam(mtmp)); + else { + if(flags.confirm && mtmp->mpeaceful && !Confusion + && !Hallucination) { + Sprintf(qbuf, "Really screech at %s?", mon_nam(mtmp)); + if (yn(qbuf) != 'y') continue; + setmangry(mtmp); + if (!mtmp->mconf) + Your("screech confuses %s!", mon_nam(mtmp)); + else + pline("%s is getting more and more confused.", + Monnam(mtmp)); + mtmp->mconf = 1; + if (! resist(mtmp, SPBOOK_CLASS, 0, NOTELL)) + monflee(mtmp, 0, FALSE, FALSE); + else pline("But %s is not afraid.", mon_nam(mtmp)); + } + } + continue; + } +#endif if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) { looked++; if (Invis && !perceives(mtmp->data)) pline("%s seems not to notice your gaze.", Monnam(mtmp)); @@ -966,9 +1117,13 @@ } else { if (flags.confirm && mtmp->mpeaceful && !Confusion && !Hallucination) { Sprintf(qbuf, "Really %s %s?", - (adtyp == AD_CONF) ? "confuse" : "attack", + (adtyp == AD_CONF) ? "confuse" : +#ifdef WEBB_BIODIVERSITY + (adtyp == AD_PLYS)? "frighten" : +#endif + "attack", mon_nam(mtmp)); if (yn(qbuf) != 'y') continue; setmangry(mtmp); } @@ -1002,8 +1157,16 @@ (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE); if (dmg && !DEADMONSTER(mtmp)) mtmp->mhp -= dmg; if (mtmp->mhp <= 0) killed(mtmp); } +#ifdef WEBB_BIODIVERSITY + else if (adtyp == AD_PLYS) { /* really it's frighten */ + if (! resist(mtmp, SPBOOK_CLASS, 0, NOTELL) || + is_undead(mtmp->data) || is_demon(mtmp->data)) + monflee(mtmp, 0, FALSE, FALSE); + else pline("%s is not afraid.", Monnam(mtmp)); + } +#endif /* For consistency with passive() in uhitm.c, this only * affects you if the monster is still alive. */ if (!DEADMONSTER(mtmp) && @@ -1038,9 +1201,14 @@ } } } } +#ifdef WEBB_CARROLL + if (!looked) You("%s at no place in particular.", + (adtyp == AD_DRIN)?"squawk":"gaze"); +#else if (!looked) You("gaze at no place in particular."); +#endif return 1; } int @@ -1056,8 +1224,16 @@ /* should bring up a dialog "what would you like to imitate?" */ youmonst.m_ap_type = M_AP_OBJECT; youmonst.mappearance = STRANGE_OBJECT; } else +#ifdef WEBB_ENVIRONMENT + if ((youmonst.data->mlet == S_PIERCER || + youmonst.data == &mons[PM_LURKER_ABOVE]) && + (Is_airlevel(&u.uz) || SKY_AT(u.ux,u.uy))){ + pline("There is no ceiling here!"); + return (FALSE); + } else +#endif u.uundetected = 1; newsym(u.ux,u.uy); return(1); } @@ -1184,16 +1360,34 @@ struct permonst *mptr = mon->data; if (part == HAND || part == HANDED) { /* some special cases */ if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE || +#ifdef WEBB_BIODIVERSITY + mptr == &mons[PM_POOKA] || +#endif mptr->mlet == S_YETI) return part == HAND ? "paw" : "pawed"; if (humanoid(mptr) && attacktype(mptr, AT_CLAW) && +#ifdef WEBB_BIODIVERSITY + (!index(not_claws, mptr->mlet) || + mptr == &mons[PM_NOSFERATU]) && +#else !index(not_claws, mptr->mlet) && +#endif mptr != &mons[PM_STONE_GOLEM] && +#ifdef WEBB_LAME_MONSTERS + mptr != &mons[PM_BLEMMYE] && +#endif mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS]) return part == HAND ? "claw" : "clawed"; } +#ifdef WEBB_LAME_MONSTERS + if (mptr == &mons[PM_BLEMMYE] ){ + if (part == HEAD) return "shoulders"; + else if (part == NECK) return "torso"; + else if (part == LIGHT_HEADED) return "addlebrained"; + } +#endif if ((mptr == &mons[PM_MUMAK] || mptr == &mons[PM_MASTODON]) && part == NOSE) return "trunk"; if (mptr == &mons[PM_SHARK] && part == HAIR) @@ -1208,12 +1402,19 @@ part == HAND || part == HANDED)) return humanoid_parts[part]; if (mptr == &mons[PM_RAVEN]) return bird_parts[part]; - if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN || - (mptr == &mons[PM_ROTHE] && part != HAIR)) + if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN || (( +#ifdef WEBB_SATYR + mptr == &mons[PM_SATYR] || +#endif + mptr == &mons[PM_ROTHE]) && part != HAIR)) return horse_parts[part]; - if (mptr->mlet == S_LIGHT) { + if (mptr->mlet == S_LIGHT +#ifdef WEBB_BIODIVERSITY + || mptr == &mons[PM_QUARK] /* rays of gluons */ +#endif + ) { if (part == HANDED) return "rayed"; else if (part == ARM || part == FINGER || part == FINGERTIP || part == HAND) return "ray"; else return "beam"; diff -rwBEN -U4 nethack-3.4.2-test/src/potion.c nethack-3.4.2-diff/src/potion.c --- nethack-3.4.2-test/src/potion.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/potion.c 2003-11-30 09:37:34.000000000 -0600 @@ -447,8 +447,11 @@ break; case POT_WATER: if(!otmp->blessed && !otmp->cursed) { pline("This tastes like water."); +#ifdef WEBB_BIODIVERSITY + if (!Upolyd || youmonst.data != &mons[PM_CLOCKWORK_AUTOMATON] ) +#endif u.uhunger += rnd(10); newuhs(FALSE); break; } @@ -501,8 +504,11 @@ if (!otmp->blessed) make_confused(itimeout_incr(HConfusion, d(3,8)), FALSE); /* the whiskey makes us feel better */ if (!otmp->odiluted) healup(1, 0, FALSE, FALSE); +#ifdef WEBB_BIODIVERSITY + if (!Upolyd || youmonst.data != &mons[PM_CLOCKWORK_AUTOMATON] ) +#endif u.uhunger += 10 * (2 + bcsign(otmp)); newuhs(FALSE); exercise(A_WIS, FALSE); if(otmp->cursed) { @@ -565,8 +571,11 @@ "This tastes like %s%s.", otmp->odiluted ? "reconstituted " : "", fruitname(TRUE)); if (otmp->otyp == POT_FRUIT_JUICE) { +#ifdef WEBB_BIODIVERSITY + if (!Upolyd || youmonst.data != &mons[PM_CLOCKWORK_AUTOMATON] ) +#endif u.uhunger += (otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp)); newuhs(FALSE); break; } @@ -828,8 +837,11 @@ if (otmp->cursed && !Is_waterlevel(&u.uz)) { if((u.ux != xupstair || u.uy != yupstair) && (u.ux != sstairs.sx || u.uy != sstairs.sy || !sstairs.up) && (!xupladder || u.ux != xupladder || u.uy != yupladder) +#ifdef WEBB_ENVIRONMENT + && (!Is_airlevel(&u.uz) && !SKY_AT(u.ux, u.uy)) +#endif ) { You("hit your %s on the %s.", body_part(HEAD), ceiling(u.ux,u.uy)); @@ -965,17 +977,26 @@ { register const char *botlnam = bottlename(); boolean isyou = (mon == &youmonst); int distance; +#ifdef WEBB_DISINT + boolean disint = (touch_disintegrates(mon->data) && + !oresist_disintegration(obj) && !mon->mcan && mon->mhp>6); +#endif + if(isyou) { distance = 0; pline_The("%s crashes on your %s and breaks into shards.", botlnam, body_part(HEAD)); losehp(rnd(2), "thrown potion", KILLED_BY_AN); } else { distance = distu(mon->mx,mon->my); +#ifdef WEBB_DISINT + if (!cansee(mon->mx,mon->my)) pline(disint?"Vip!":"Crash!"); +#else if (!cansee(mon->mx,mon->my)) pline("Crash!"); +#endif else { char *mnam = mon_nam(mon); char buf[BUFSZ]; @@ -985,17 +1006,26 @@ (notonhead ? "body" : "head")); } else { Strcpy(buf, mnam); } - pline_The("%s crashes on %s and breaks into shards.", +#ifdef WEBB_DISINT + pline_The("%s crashes on %s and %s.", + botlnam, buf, disint?"disintegrates":"breaks into shards"); +#else + pline_The("%s crashes on %s breaks into shards.", botlnam, buf); +#endif } if(rn2(5) && mon->mhp > 1) mon->mhp--; } /* oil doesn't instantly evaporate */ - if (obj->otyp != POT_OIL && cansee(mon->mx,mon->my)) + if (obj->otyp != POT_OIL && cansee(mon->mx,mon->my) +#ifdef WEBB_DISINT + && !disint +#endif + ) pline("%s.", Tobjnam(obj, "evaporate")); if (isyou) { switch (obj->otyp) { @@ -1019,8 +1049,12 @@ } else { boolean angermon = TRUE; if (!your_fault) angermon = FALSE; +#ifdef WEBB_DISINT + if (!disint) +#endif + { switch (obj->otyp) { case POT_HEALING: case POT_EXTRA_HEALING: case POT_FULL_HEALING: @@ -1114,9 +1148,13 @@ } } else if(mon->data == &mons[PM_GREMLIN]) { angermon = FALSE; (void)split_mon(mon, (struct monst *)0); +#ifdef WEBB_BIODIVERSITY + } else if( does_rust(mon->data)){ +#else } else if(mon->data == &mons[PM_IRON_GOLEM]) { +#endif if (canseemon(mon)) pline("%s rusts.", Monnam(mon)); mon->mhp -= d(1,6); /* should only be by you */ @@ -1151,21 +1189,28 @@ case POT_OBJECT_DETECTION: break; */ } + } + if (angermon) wakeup(mon); else mon->msleeping = 0; } +#ifdef WEBB_DISINT + if (!disint) +#endif + { /* Note: potionbreathe() does its own docall() */ if ((distance==0 || ((distance < 3) && rn2(5))) && (!breathless(youmonst.data) || haseyes(youmonst.data))) potionbreathe(obj); else if (obj->dknown && !objects[obj->otyp].oc_name_known && !objects[obj->otyp].oc_uname && cansee(mon->mx,mon->my)) docall(obj); + } if(*u.ushops && obj->unpaid) { register struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE)); diff -rwBEN -U4 nethack-3.4.2-test/src/pray.c nethack-3.4.2-diff/src/pray.c --- nethack-3.4.2-test/src/pray.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/pray.c 2003-11-30 09:37:34.000000000 -0600 @@ -303,8 +303,13 @@ case TROUBLE_STARVING: losestr(-1); /* fall into... */ case TROUBLE_HUNGRY: +#ifdef WEBB_BIODIVERSITY + if (Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] ) + You_feel("your mainspring wind up."); + else +#endif Your("%s feels content.", body_part(STOMACH)); init_uhunger(); flags.botl = 1; break; @@ -907,8 +912,13 @@ } else if (u.uevent.uheard_tune < 2) { You_hear("a divine music..."); pline("It sounds like: \"%s\".", tune); u.uevent.uheard_tune++; +#ifdef WEBB_MUSIC +#ifdef WIN32 + if(!flags.silent) play_midi(BUGLE+3,tune,0); +#endif +#endif break; } } /* Otherwise, falls into next case */ diff -rwBEN -U4 nethack-3.4.2-test/src/read.c nethack-3.4.2-diff/src/read.c --- nethack-3.4.2-test/src/read.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/read.c 2003-11-30 09:37:34.000000000 -0600 @@ -33,8 +33,12 @@ static void FDECL(forget, (int)); static void FDECL(maybe_tame, (struct monst *,struct obj *)); STATIC_PTR void FDECL(set_lit, (int,int,genericptr_t)); +#ifdef WEBB_BIODIVERSITY +STATIC_PTR void FDECL(set_dark, (int,int,genericptr_t)); +#endif + int doread() { @@ -864,8 +868,15 @@ if(cansee(mtmp->mx,mtmp->my)) { if(confused || sobj->cursed) { mtmp->mflee = mtmp->mfrozen = mtmp->msleeping = 0; mtmp->mcanmove = 1; +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !mtmp->mspec_used){ + mtmp->mfrozen = 1; + mtmp->mcanmove = 0; + } +#endif } else if (! resist(mtmp, sobj->oclass, 0, NOTELL)) monflee(mtmp, 0, FALSE, FALSE); if(!mtmp->mtame) ct++; /* pets don't laugh at you */ @@ -1423,8 +1434,113 @@ vision_full_recalc = 1; /* delayed vision recalculation */ } +#ifdef WEBB_BIODIVERSITY +STATIC_PTR void +set_dark(x,y,val) +int x, y; +genericptr_t val; +/* *val comes in as 0 if blind, -1, 1, or 2 otherwise + *val leaves as 0 if blind + -1 if darkness hit you at sometime + 2 if you saw darkness, but it hasn't + 1 if you haven't seen darkness yet + yet hit you */ +{ + char * nblind = (char *) val; + register struct obj *otmp; + if (u.ux == x && u.uy == y){ + if (* nblind) { + *nblind = -1; + if (uwep && artifact_light(uwep) && uwep->lamplit) + pline("Suddenly, the only light left comes from %s!", + the(xname(uwep))); + else + You("are surrounded by darkness!"); + } + /* the magic douses lamps, et al, too */ + for(otmp = invent; otmp; otmp = otmp->nobj) + if (otmp->lamplit) + (void) snuff_lit(otmp); + } else { + struct monst * mlit = m_at(x,y); + if (*nblind == 1 && levl[x][y].lit && cansee(x,y)) + *nblind = 2; + if (mlit) + for(otmp = mlit->minvent; otmp; otmp = otmp->nobj) + if (otmp->lamplit) + (void) snuff_lit(otmp); + } + levl[x][y].lit = 0; + snuff_light_source(x, y); +} +/* can be used even if no mon is at xx, yy */ +void +litroom_mon(on,obj, xx, yy) +register boolean on; +struct obj *obj; +int xx, yy; +{ + struct monst * mlit = m_at(xx,yy); + char u_see_effects = !Blind; + + /* + * If we are darkening the room and the hero is punished but not + * blind, then we have to pick up and replace the ball and chain so + * that we don't remember them if they are out of sight. + */ + if (Punished && !on && !Blind) + move_bc(1, 0, uball->ox, uball->oy, uchain->ox, uchain->oy); + +#ifdef REINCARNATION + if (Is_rogue_level(&u.uz)) { + /* Can't use do_clear_area because MAX_RADIUS is too small */ + /* rogue lighting must light the entire room */ + int rnum = levl[xx][yy].roomno - ROOMOFFSET; + int rx, ry; + if(rnum >= 0) { + for(rx = rooms[rnum].lx-1; rx <= rooms[rnum].hx+1; rx++) + for(ry = rooms[rnum].ly-1; ry <= rooms[rnum].hy+1; ry++){ + if (on) + set_lit(rx, ry, (genericptr_t)(&u_see_effects)); + else + set_dark(rx, ry, (genericptr_t)(&u_see_effects)); + } + rooms[rnum].rlit = on; + } + /* hallways remain dark on the rogue level */ + } else +#endif + do_clear_area(xx,yy, + (obj && obj->oclass==SCROLL_CLASS && obj->blessed) ? 5 : 3, + (on)?set_lit:set_dark, (genericptr_t)&u_see_effects ); + + /* + * If we are not blind, then force a redraw on all positions in sight + * by temporarily blinding the hero. The vision recalculation will + * correctly update all previously seen positions *and* correctly + * set the waslit bit [could be messed up from above]. + */ + if (!Blind) { + vision_recalc(2); + + /* replace ball&chain */ + if (Punished && !on) + move_bc(0, 0, uball->ox, uball->oy, uchain->ox, uchain->oy); + } + if (on && canseemon(mlit)){ + pline("A lit field surrounds %s!", mon_nam(mlit)); + } + if (!on && u_see_effects==2){ + pline("A shroud of darkness settles %s!", + (distu(xx,yy) > 15)?"in the distance":"nearby"); + } + + vision_full_recalc = 1; /* delayed vision recalculation */ +} +#endif + static void do_class_genocide() { int i, j, immunecnt, gonecnt, goodcnt, class, feel_dead = 0; @@ -1744,9 +1860,13 @@ pline("A ball and chain appears, then falls away."); dropy(mkobj(BALL_CLASS, TRUE)); return; } +#ifdef WEBB_BIODIVERSITY + setworn(mksobj(IRON_CHAIN, TRUE, TRUE), W_CHAIN); +#else setworn(mkobj(CHAIN_CLASS, TRUE), W_CHAIN); +#endif setworn(mkobj(BALL_CLASS, TRUE), W_BALL); uball->spe = 1; /* special ball (see save) */ /* diff -rwBEN -U4 nethack-3.4.2-test/src/shk.c nethack-3.4.2-diff/src/shk.c --- nethack-3.4.2-test/src/shk.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/shk.c 2003-11-30 09:37:34.000000000 -0600 @@ -38,9 +38,11 @@ STATIC_DCL char *FDECL(mon_owns, (char *,struct obj *)); STATIC_DCL void FDECL(clear_unpaid,(struct obj *)); STATIC_DCL long FDECL(check_credit, (long, struct monst *)); STATIC_DCL void FDECL(pay, (long, struct monst *)); +#ifndef WEBB_BIODIVERSITY STATIC_DCL long FDECL(get_cost, (struct obj *, struct monst *)); +#endif STATIC_DCL long FDECL(set_cost, (struct obj *, struct monst *)); STATIC_DCL const char *FDECL(shk_embellish, (struct obj *, long)); STATIC_DCL long FDECL(cost_per_charge, (struct monst *,struct obj *,BOOLEAN_P)); STATIC_DCL long FDECL(cheapest_item, (struct monst *)); @@ -1836,9 +1838,12 @@ #endif /*OVLB*/ #ifdef OVL3 /* calculate the value that the shk will charge for [one of] an object */ -STATIC_OVL long +#ifndef WEBB_BIODIVERSITY +STATIC_OVL +#endif +long get_cost(obj, shkp) register struct obj *obj; register struct monst *shkp; /* if angry, impose a surcharge */ { @@ -1963,9 +1968,13 @@ /* accumulate contained gold */ for (otmp = obj->cobj; otmp; otmp = otmp->nobj) if (otmp->oclass == COIN_CLASS) +#ifdef WEBB_MONEY + value += otmp->quan * objects[otmp->otyp].oc_cost; +#else value += otmp->quan; +#endif else if (Has_contents(otmp)) value += contained_gold(otmp); return(value); @@ -2596,9 +2605,13 @@ return; } if(eshkp->robbed) { /* shkp is not angry? */ +#ifdef WEBB_MONEY + if(isgold) offer = obj->quan * objects[obj->otyp].oc_cost; +#else if(isgold) offer = obj->quan; +#endif else if(cgold) offer += cgold; if((eshkp->robbed -= offer < 0L)) eshkp->robbed = 0L; if(offer) verbalize( @@ -2607,9 +2620,13 @@ return; } if(isgold || cgold) { +#ifdef WEBB_MONEY + if(!cgold) gltmp = obj->quan * objects[obj->otyp].oc_cost; +#else if(!cgold) gltmp = obj->quan; +#endif if(eshkp->debit >= gltmp) { if(eshkp->loan) { /* you carry shop's gold */ if(eshkp->loan >= gltmp) @@ -4027,8 +4044,95 @@ } return(FALSE); } +#ifdef WEBB_BIODIVERSITY +int +buy_minvent(merch) +struct monst * merch; +{ + int n, j, price = 0; + menu_item *pick_list; + if ( merch->mnamelth && (uchar)NAME(merch)[0] >= (uchar)0x80){ + introduce_mons(merch); + verbalize("%s, I'm %s. Perhaps I can help you.", + Hello(merch), Monnam(merch)); + } + n = query_objlist("What would you like to buy?", merch->minvent, + INVORDER_SORT|SIGNAL_NOMENU|PRICES, &pick_list, + PICK_ANY, allow_unused); + if (n <= 0){ + if (!merch->mspec_used){ + verbalize("The surrounding area has a fascinating history!"); + do_vicinity_map(); + merch->mspec_used += 64; + } else if (n) { /* n == -1 */ + pline("Sorry, I don't have anything to sell."); + } else { + pline("Tell me if you change your mind."); + } + return (0); + } + for (j = 0; j < n; j++) + price += get_cost(pick_list[j].item.a_obj, 0) * pick_list[j].count; + pline("Your total would be %ld %s.", price, currency(price)); + if (yn_function("Purchase?", ynchars, 'y') == 'n'){ + pline("I'll be here if you change your mind."); + return 0; + } else { + struct obj * bobj; +#ifndef GOLDOBJ + if (price > u.ugold) { + pline("You don't have enough money!"); + return 0; + } else { + u.ugold -= price; + merch->mgold += price; + } +#else + if (!money2mon(merch, price)) + return 0; +#endif + for (j = 0; j < n; ++j){ + if (pick_list[j].count == pick_list[j].item.a_obj->quan){ + bobj = pick_list[j].item.a_obj; + } else { + bobj = splitobj(pick_list[j].item.a_obj, pick_list[j].count); + } + obj_extract_self(bobj); + bobj = hold_another_object(bobj, + "You drop %s in the exchange.", aobjnam(bobj,0), 0); + if (bobj->otyp == CORPSE) { + if ( (touch_petrifies(&mons[bobj->corpsenm])) && !uarmg + && !Stone_resistance) { + if (poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM)) + display_nhwindow(WIN_MESSAGE, FALSE); + else { + char kbuf[BUFSZ]; + Strcpy(kbuf, an(corpse_xname(bobj, TRUE))); + pline("Touching %s is a fatal mistake.", kbuf); + instapetrify(kbuf); + return -1; + } + } + } + } + verbalize("Pleasure doing business with you."); + if(!mon_has_amulet(merch)){ + verbalize("%s!", Goodbye()); +#ifdef MAIL + if (In_W_tower(merch->mx, merch->my, &u.uz) || + (!xupstair)) + (void)md_rush(merch,xupstair,yupstair); +#endif + mongone(merch); + return 1; + } + return 0; + } +} +#endif + #endif /* OVLB */ #ifdef OVL2 char * diff -rwBEN -U4 nethack-3.4.2-test/src/sounds.c nethack-3.4.2-diff/src/sounds.c --- nethack-3.4.2-test/src/sounds.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/sounds.c 2003-11-30 09:37:34.000000000 -0600 @@ -41,8 +41,26 @@ int xx; #endif struct monst *mtmp; +#ifdef WEBB_CARROLL + if(!rn2(200) && !u.uswallow && !Underwater && + (!ublindf || ublindf->otyp != TOWEL) ){ + for (mtmp = fmon; mtmp; mtmp = mtmp->nmon){ + if (mtmp->data == &mons[PM_JUBJUB_BIRD] && + !mtmp->mcan && !mtmp->mspec_used && + !couldsee(mtmp->mx, mtmp->my)){ + if(flags.soundok) + You_hear("a sound like a pencil that squeaks on a slate!"); + else + You("are befuddled by a terrifying shriek!"); + make_confused(HConfusion + rn1(8,8), FALSE); + mtmp->mspec_used += 8; + break; + } + } + } +#endif if (!flags.soundok || u.uswallow || Underwater) return; hallu = Hallucination ? 1 : 0; @@ -440,8 +458,16 @@ int mndx = monsndx(ptr); ptr = &mons[genus(mndx,1)]; } +#ifdef WEBB_BIODIVERSITY + if (ptr == &mons[PM_GUIDE] && !In_quest(&u.uz)){ + /*tourists can lead guides through the portal, but those guides have + no special inventory */ + buy_minvent(mtmp); + return 1; + } +#endif /* be sure to do this before talking; the monster might teleport away, in * which case we want to check its pre-teleport position */ if (!canspotmon(mtmp)) @@ -465,8 +491,11 @@ { /* vampire messages are varied by tameness, peacefulness, and time of night */ boolean isnight = night(); boolean kindred = (Upolyd && (u.umonnum == PM_VAMPIRE || +#ifdef WEBB_BIODIVERSITY + u.umonnum == PM_NOSFERATU || +#endif u.umonnum == PM_VAMPIRE_LORD)); boolean nightchild = (Upolyd && (u.umonnum == PM_WOLF || u.umonnum == PM_WINTER_WOLF || u.umonnum == PM_WINTER_WOLF_CUB)); @@ -669,8 +698,17 @@ if (!mtmp->mpeaceful) { if (In_endgame(&u.uz) && is_mplayer(ptr)) { mplayer_talk(mtmp); break; +#ifdef WEBB_BIODIVERSITY + } else if (mtmp->mnamelth && (uchar)NAME(mtmp)[0] >= (uchar)0x80){ + introduce_mons(mtmp); + verbalize("Hello, my name is %s. Prepare to %s.", NAME(mtmp), + (ptr == &mons[PM_QUANTUM_MECHANIC])? + "have your waveform collapsed": + "die"); + break; +#endif } else return 0; /* no sound */ } /* Generic peaceful humanoid behaviour. */ if (mtmp->mflee) @@ -691,8 +729,17 @@ else if (mtmp->mtame && !mtmp->isminion && moves > EDOG(mtmp)->hungrytime) verbl_msg = "I'm hungry."; /* Specific monsters' interests */ +#ifdef WEBB_BIODIVERSITY + else if (mtmp->mnamelth && (uchar)NAME(mtmp)[0] >= (uchar)0x80){ + introduce_mons(mtmp); + verbalize("%s, I'm %s. %s?", Hello(mtmp), NAME(mtmp), + (ptr == &mons[PM_QUANTUM_MECHANIC])? + "Perhaps you can help me with this proof": + (Inhell)?"Hot enough for ya":"Dank enough for ya"); + } +#endif else if (is_elf(ptr)) pline_msg = "curses orcs."; else if (is_dwarf(ptr)) pline_msg = "talks about mining."; diff -rwBEN -U4 nethack-3.4.2-test/src/sp_lev.c nethack-3.4.2-diff/src/sp_lev.c --- nethack-3.4.2-test/src/sp_lev.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/sp_lev.c 2003-11-30 09:37:34.000000000 -0600 @@ -41,10 +41,16 @@ XCHAR_P, int)); STATIC_DCL void NDECL(fix_stair_rooms); STATIC_DCL void FDECL(create_corridor, (corridor *)); +#ifdef WEBB_ENVIRONMENT +STATIC_DCL void FDECL(create_trees, (trees *, struct mkroom *)); +STATIC_DCL boolean FDECL(create_subroom, (struct mkroom *, XCHAR_P, XCHAR_P, + XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, uchar)); +#else STATIC_DCL boolean FDECL(create_subroom, (struct mkroom *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)); +#endif #define LEFT 1 #define H_LEFT 2 #define CENTER 3 @@ -359,13 +365,20 @@ * This is still very incomplete... */ boolean -create_room(x,y,w,h,xal,yal,rtype,rlit) +create_room(x,y,w,h,xal,yal,rtype,rlit +#ifdef WEBB_ENVIRONMENT + ,rsky +#endif + ) xchar x,y; xchar w,h; xchar xal,yal; xchar rtype, rlit; +#ifdef WEBB_ENVIRONMENT +uchar rsky; +#endif { xchar xabs, yabs; int wtmp, htmp, xaltmp, yaltmp, xtmp, ytmp; NhRect *r1 = 0, r2; @@ -515,9 +528,13 @@ if (!vault) { smeq[nroom] = nroom; add_room(xabs, yabs, xabs+wtmp-1, yabs+htmp-1, - rlit, rtype, FALSE); + rlit, rtype, FALSE +#ifdef WEBB_ENVIRONMENT + , rsky +#endif + ); } else { rooms[nroom].lx = xabs; rooms[nroom].ly = yabs; } @@ -529,13 +546,20 @@ * x & y are relative to the parent room. */ STATIC_OVL boolean -create_subroom(proom, x, y, w, h, rtype, rlit) +create_subroom(proom, x, y, w, h, rtype, rlit +#ifdef WEBB_ENVIRONMENT + ,rsky +#endif + ) struct mkroom *proom; xchar x,y; xchar w,h; xchar rtype, rlit; +#ifdef WEBB_ENVIRONMENT +uchar rsky; +#endif { xchar width, height; width = proom->hx - proom->lx + 1; @@ -568,9 +592,13 @@ if (rlit == -1) rlit = (rnd(1+abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE; add_subroom(proom, proom->lx + x, proom->ly + y, proom->lx + x + w - 1, proom->ly + y + h - 1, - rlit, rtype, FALSE); + rlit, rtype, FALSE +#ifdef WEBB_ENVIRONMENT + , rsky +#endif + ); return TRUE; } /* @@ -726,8 +754,41 @@ mktrap(t->type, 1, (struct mkroom*) 0, &tm); } } +#ifdef WEBB_ENVIRONMENT +STATIC_OVL void +create_trees(t,croom) +trees *t; +struct mkroom *croom; +{ + schar lx = t->x1; + schar ly = t->y1; + int w = t->x2-lx; + int h = t->y2-ly; + int i,j; + + if (croom) + get_room_loc(&lx, &ly, croom); + + for(i=lx; i< lx+w; i++ ){ + for(j=ly; j< ly+h; j++ ){ + if (levl[i][j].typ == TREE){ + if (rn2(100) < t->chance) { + levl[i][j].flags &= t->and_type; + if ((t->or_type & 0x20) && rn2(2)) + levl[i][j].flags |= TREE_SWARM; + if ((t->or_type & 0x40) && rn2(2)) + levl[i][j].flags |= TREE_LOOTED; + if ((t->or_type & 0x80) && rn2(2)) + levl[i][j].flags |= rn2(8); + levl[i][j].flags |= (t->or_type & 0x1f); + } + } + } + } +} +#endif /* * Create a monster in a room. */ @@ -964,8 +1025,16 @@ /* corpsenm is "empty" if -1, random if -2, otherwise specific */ if (o->corpsenm == NON_PM - 1) otmp->corpsenm = rndmonnum(); else if (o->corpsenm != NON_PM) otmp->corpsenm = o->corpsenm; +#ifdef WEBB_ENVIRONMENT + else{ + otmp->corpsenm = NON_PM; + if (!named && otmp->otyp == STATUE) + otmp = oname(otmp, rndhalmonnam()); + otmp->spe |= STATUE_NONRENAMABLE; + } +#endif /* assume we wouldn't be given an egg corpsenm unless it was hatchable */ if (otmp->otyp == EGG && otmp->corpsenm != NON_PM) { @@ -1602,13 +1671,21 @@ if(pr) { aroom = &subrooms[nsubroom]; okroom = create_subroom(pr->mkr, r->x, r->y, r->w, r->h, - rtype, r->rlit); + rtype, r->rlit +#ifdef WEBB_ENVIRONMENT + , r->rsky +#endif + ); } else { aroom = &rooms[nroom]; okroom = create_room(r->x, r->y, r->w, r->h, r->xalign, - r->yalign, rtype, r->rlit); + r->yalign, rtype, r->rlit +#ifdef WEBB_ENVIRONMENT + , r->rsky +#endif + ); r->mkr = aroom; } if (okroom) { @@ -1654,8 +1731,14 @@ /* The engravings */ for (i = 0; i < r->nengraving; i++) create_engraving(r->engravings[i], aroom); +#ifdef WEBB_ENVIRONMENT + for(i = 0; intrees; i++) + create_trees(r->treess[i], aroom); + +#endif + #ifdef SPECIALIZATION topologize(aroom,FALSE); /* set roomno */ #else topologize(aroom); /* set roomno */ @@ -1681,8 +1764,21 @@ register int x, y; register struct rm *lev; int lowy = tmpregion->y1; int lowx = tmpregion->x1, hix = tmpregion->x2; +#ifdef WEBB_ENVIRONMENT + if(tmpregion->rsky <2){ + litstate = tmpregion->rsky; + for(x = lowx; x <= hix; x++) { + lev = &levl[x][lowy]; + for(y = lowy; y <= hiy; y++) { + lev->rmsky = litstate; + lev++; + } + } + litstate = tmpregion->rlit ? 1 : 0; /* register back to proper use*/ + } +#endif if(litstate) { /* adjust region size for walls, but only if lighted */ lowx = max(lowx-1,1); @@ -1738,8 +1834,13 @@ if (lev_flags & SHORTSIGHTED) level.flags.shortsighted = 1; if (lev_flags & ARBOREAL) level.flags.arboreal = 1; +#ifdef WEBB_ENVIRONMENT + if (lev_flags & SKYLEVEL) + level.flags.skylevel = 1; +#endif + /* Read message */ Fread((genericptr_t) &n, 1, sizeof(n), fd); if (n) { @@ -1984,8 +2085,20 @@ } } else r->engravings = 0; +#ifdef WEBB_ENVIRONMENT + /* read the traps */ + Fread((genericptr_t) &r->ntrees, 1, sizeof(r->ntrees), fd); + if ((n = r->ntrees) != 0) + r->treess = NewTab(trees, n); + while(n--) { + r->treess[(int)n] = New(trees); + Fread((genericptr_t) r->treess[(int)n], 1, sizeof(trees), fd); + } + +#endif + } /* Now that we have loaded all the rooms, search the * subrooms and create the links. @@ -2087,8 +2200,11 @@ altar tmpaltar; gold tmpgold; fountain tmpfountain; engraving tmpengraving; +#ifdef WEBB_ENVIRONMENT + trees tmptrees; +#endif xchar mustfill[(MAXNROFROOMS+1)*2]; struct trap *badtrap; boolean has_bounds; @@ -2166,8 +2282,14 @@ for(y = ystart; y < ystart+ysize; y++) for(x = xstart; x < xstart+xsize; x++) { levl[x][y].typ = Fgetc(fd); levl[x][y].lit = FALSE; +#ifdef WEBB_ENVIRONMENT /* sky from filemap */ + if(levl[x][y].typ == (0x40 | ROOM)){ + levl[x][y].rmsky = 1; + levl[x][y].typ = ROOM; + } +#endif /* clear out levl: load_common_data may set them */ levl[x][y].flags = 0; levl[x][y].horizontal = 0; levl[x][y].roomno = 0; @@ -2313,18 +2435,29 @@ if(tmpregion.rirreg) { min_rx = max_rx = tmpregion.x1; min_ry = max_ry = tmpregion.y1; +#ifdef WEBB_ENVIRONMENT + flood_fill_rm(tmpregion.x1, tmpregion.y1, + nroom+ROOMOFFSET, tmpregion.rlit, TRUE, tmpregion.rsky); + add_room(min_rx, min_ry, max_rx, max_ry, + FALSE, tmpregion.rtype, TRUE, tmpregion.rsky ); +#else flood_fill_rm(tmpregion.x1, tmpregion.y1, nroom+ROOMOFFSET, tmpregion.rlit, TRUE); add_room(min_rx, min_ry, max_rx, max_ry, FALSE, tmpregion.rtype, TRUE); +#endif troom->rlit = tmpregion.rlit; troom->irregular = TRUE; } else { add_room(tmpregion.x1, tmpregion.y1, tmpregion.x2, tmpregion.y2, - tmpregion.rlit, tmpregion.rtype, TRUE); + tmpregion.rlit, tmpregion.rtype, TRUE +#ifdef WEBB_ENVIRONMENT + , tmpregion.rsky +#endif + ); #ifdef SPECIALIZATION topologize(troom,FALSE); /* set roomno */ #else topologize(troom); /* set roomno */ @@ -2513,8 +2646,16 @@ load_one_engraving(fd, &tmpengraving); create_engraving(&tmpengraving, (struct mkroom *)0); } +#ifdef WEBB_ENVIRONMENT + /* trees groups */ + Fread((genericptr_t) &n, 1, sizeof(n), fd); + while(n--){ + Fread((genericptr_t)&tmptrees, 1, sizeof(tmptrees), fd); + create_trees(&tmptrees, (struct mkroom *) 0); + } +#endif } /* numpart loop */ nwalk_sav = nwalk; diff -rwBEN -U4 nethack-3.4.2-test/src/spell.c nethack-3.4.2-diff/src/spell.c --- nethack-3.4.2-test/src/spell.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/spell.c 2003-11-30 09:37:34.000000000 -0600 @@ -735,8 +735,14 @@ Your("knowledge of this spell is growing faint."); } energy = (spellev(spell) * 5); /* 5 <= energy <= 35 */ +#ifdef WEBB_BIODIVERSITY + if (Upolyd && youmonst.data == &mons[PM_CLOCKWORK_AUTOMATON] && + u.uhunger <= 10) + You("are too wound down to cast that spell."); + else +#endif if (u.uhunger <= 10 && spellid(spell) != SPE_DETECT_FOOD) { You("are too hungry to cast that spell."); return(0); } else if (ACURR(A_STR) < 4) { diff -rwBEN -U4 nethack-3.4.2-test/src/steal.c nethack-3.4.2-diff/src/steal.c --- nethack-3.4.2-test/src/steal.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/steal.c 2003-11-30 09:37:34.000000000 -0600 @@ -46,10 +46,16 @@ if (gold && ( !u.ugold || gold->quan > u.ugold || !rn2(5))) { mtmp->mgold += gold->quan; delobj(gold); newsym(u.ux, u.uy); +#ifdef WEBB_TEXT_FIX + pline("%s quickly snatches some gold from %s your %s!", + Monnam(mtmp), (Levitation)?"beneath":"between", + makeplural(body_part(FOOT))); +#else pline("%s quickly snatches some gold from between your %s!", Monnam(mtmp), makeplural(body_part(FOOT))); +#endif if(!u.ugold || !rn2(5)) { if (!tele_restrict(mtmp)) rloc(mtmp); /* do not set mtmp->mavenge here; gold on the floor is fair game */ monflee(mtmp, 0, FALSE, FALSE); @@ -115,10 +121,16 @@ if (fgold && ( !ygold || fgold->quan > ygold->quan || !rn2(5))) { obj_extract_self(fgold); add_to_minv(mtmp, fgold); newsym(u.ux, u.uy); +#ifdef WEBB_TEXT_FIX + pline("%s quickly snatches some gold from %s your %s!", + Monnam(mtmp), (Levitation)?"beneath":"between", + makeplural(body_part(FOOT))); +#else pline("%s quickly snatches some gold from between your %s!", Monnam(mtmp), makeplural(body_part(FOOT))); +#endif if(!ygold || !rn2(5)) { if (!tele_restrict(mtmp)) rloc(mtmp); monflee(mtmp, 0, FALSE, FALSE); } @@ -253,9 +265,13 @@ return(1); /* let her flee */ } monkey_business = is_animal(mtmp->data); +#ifdef WEBB_BIODIVERSITY + if (monkey_business || (mtmp->data == &mons[PM_POOKA])) { +#else if (monkey_business) { +#endif ; /* skip ring special cases */ } else if (Adornment & LEFT_RING) { otmp = uleft; goto gotobj; @@ -362,8 +378,24 @@ otmp->cursed = 0; /* can't charm you without first waking you */ if (multi < 0 && is_fainted()) unmul((char *)0); slowly = (armordelay >= 1 || multi < 0); +#ifdef WEBB_SATYR + if( mtmp->data->mlet == S_NYMPH && + ((!flags.female) ^ (!mtmp->female))) + pline("%s seduces you and %s off your %s.", + !seen ? mtmp->female?"She":"He" : + Adjmonnam(mtmp, mtmp->female?"beautiful":"hansome"), + curssv ? "helps you to take" : + slowly ? "you start taking" : "you take", + equipname(otmp)); + else + pline("%s charms you. You gladly %s your %s.", + !seen ? mtmp->female?"She":"He" : Monnam(mtmp), + curssv ? mtmp->female?"let her take":"let him take" : + slowly ? "start removing" : "hand over", + equipname(otmp)); +#else if(flags.female) pline("%s charms you. You gladly %s your %s.", !seen ? "She" : Monnam(mtmp), curssv ? "let her take" : @@ -374,8 +406,9 @@ !seen ? "She" : Adjmonnam(mtmp, "beautiful"), curssv ? "helps you to take" : slowly ? "you start taking" : "you take", equipname(otmp)); +#endif named++; /* the following is to set multi for later on */ nomul(-armordelay); remove_worn_item(otmp, TRUE); @@ -408,9 +441,15 @@ */ mtmp->mavenge = 1; freeinv(otmp); +#ifdef WEBB_SATYR + pline("%s %s %s.", + named ? mtmp->female ? "She" : "He" : Monnam(mtmp), + (mtmp->data == &mons[PM_SATYR])?"took":"stole", doname(otmp)); +#else pline("%s stole %s.", named ? "She" : Monnam(mtmp), doname(otmp)); +#endif could_petrify = (otmp->otyp == CORPSE && touch_petrifies(&mons[otmp->corpsenm])); (void) mpickobj(mtmp,otmp); /* may free otmp */ if (could_petrify && !(mtmp->misc_worn_check & W_ARMG)) { diff -rwBEN -U4 nethack-3.4.2-test/src/steed.c nethack-3.4.2-diff/src/steed.c --- nethack-3.4.2-test/src/steed.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/steed.c 2003-11-30 09:37:34.000000000 -0600 @@ -8,8 +8,11 @@ #ifdef STEED /* Monsters that might be ridden */ static NEARDATA const char steeds[] = { +#ifdef WEBB_WARG_STEED + S_DOG, +#endif S_QUADRUPED, S_UNICORN, S_ANGEL, S_CENTAUR, S_DRAGON, S_JABBERWOCK, '\0' }; STATIC_DCL boolean FDECL(landing_spot, (coord *, int, int)); @@ -30,8 +33,11 @@ { struct permonst *ptr = mtmp->data; return (index(steeds, ptr->mlet) && (ptr->msize >= MZ_MEDIUM) && +#ifdef WEBB_WARG_STEED + (!(ptr->mlet == S_DOG) || (ptr == &mons[PM_WARG])) && +#endif (!humanoid(ptr) || ptr->mlet == S_CENTAUR) && !amorphous(ptr) && !noncorporeal(ptr) && !is_whirly(ptr) && !unsolid(ptr)); } @@ -87,8 +93,20 @@ Sprintf(kbuf, "attempting to saddle %s", an(mtmp->data->mname)); instapetrify(kbuf); } } +#ifdef WEBB_DISINT + if (touch_disintegrates(ptr)){ + char kbuf[BUFSZ]; + if(!oresist_disintegration(otmp)){ + pline("%s disintegrates!", Yname2(otmp)); + useup(otmp); + } + Sprintf(kbuf,"attempting to saddle %s", a_monnam(mtmp)); + instadisintegrate(kbuf); + } +#endif + if (ptr == &mons[PM_INCUBUS] || ptr == &mons[PM_SUCCUBUS]) { pline("Shame on you!"); exercise(A_WIS, FALSE); return 1; @@ -108,8 +126,15 @@ chance += u.ulevel * (mtmp->mtame ? 20 : 5); if (!mtmp->mtame) chance -= 10*mtmp->m_lev; if (Role_if(PM_KNIGHT)) chance += 20; +#ifdef WEBB_WARG_STEED + /* because "orcs like to eat horses and the like" - src/mhitu.c + only applied against horse/unicorn class. Balances Warg riding + */ + if (is_orc(youmonst.data) && (mtmp->data)->mlet == S_UNICORN) + chance -= 20; +#endif switch (P_SKILL(P_RIDING)) { case P_ISRESTRICTED: case P_UNSKILLED: default: @@ -162,8 +187,11 @@ struct monst *mtmp; { return (mtmp->mtame && humanoid(youmonst.data) && !verysmall(youmonst.data) && !bigmonst(youmonst.data) && +#ifdef WEBB_WARG_STEED + (is_orc(youmonst.data) || (mtmp->data != &mons[PM_WARG])) && +#endif (!Underwater || is_swimmer(mtmp->data))); } @@ -288,8 +316,16 @@ mtmp->mleashed ? " and its leash comes off" : ""); if (mtmp->mleashed) m_unleash(mtmp, FALSE); return (FALSE); } + +#ifdef WEBB_WARG_STEED + /* Does this type of steed approve of your species? */ + if ((ptr == &mons[PM_WARG]) && (!is_orc(youmonst.data))){ + pline("%s growls at you disapprovingly.", Monnam(mtmp)); + return (FALSE); + } +#endif if (!force && Underwater && !is_swimmer(ptr)) { You_cant("ride that creature while under water."); return (FALSE); } @@ -629,8 +665,20 @@ impossible("placing %s onto map?", (mon == u.usteed) ? "steed" : "defunct monster"); return; } +#ifdef WEBB_ENVIRONMENT + if (levl[x][y].typ == SPOOL && cansee(x,y) && !is_clinger(mon->data) && + !is_flyer(mon->data) && !is_floater(mon->data)){ + if(!is_swimmer(mon->data) || canseemon(mon) || + !IS_POOL(levl[mon->mx][mon->my].typ)){ + pline("%s %s into a quagmire.", Monnam(mon), + (is_swimmer(mon->data))?"slips":"sinks"); + levl[x][y].typ = POOL; /* water walking boots don't work on monsters */ + magic_map_background(mon->mx, mon->my, 1); + } + } +#endif mon->mx = x, mon->my = y; level.monsters[x][y] = mon; } diff -rwBEN -U4 nethack-3.4.2-test/src/topten.c nethack-3.4.2-diff/src/topten.c --- nethack-3.4.2-test/src/topten.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/topten.c 2003-11-30 09:37:34.000000000 -0600 @@ -78,9 +78,13 @@ /* must fit with end.c; used in rip.c */ NEARDATA const char * const killed_by_prefix[] = { "killed by ", "choked on ", "poisoned by ", "died of ", "drowned in ", "burned by ", "dissolved in ", "crushed to death by ", "petrified by ", - "turned to slime by ", "killed by ", "", "", "", "", "" + "turned to slime by ", "killed by ", +#ifdef WEBB_DISINT + "disintegrated by ", +#endif + "", "", "", "", "" }; static winid toptenwin = WIN_ERR; diff -rwBEN -U4 nethack-3.4.2-test/src/trap.c nethack-3.4.2-diff/src/trap.c --- nethack-3.4.2-test/src/trap.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/trap.c 2003-11-30 09:37:34.000000000 -0600 @@ -305,8 +305,13 @@ level.flags.is_cavernous_lev ? CORR : DOOR; unearth_objs(x, y); break; +#ifdef WEBB_ENVIRONMENT + case ROCKTRAP: + if(SKY_AT(x,y)) ttmp->ttyp = DART_TRAP; + break; +#endif } if (ttmp->ttyp == HOLE) ttmp->tseen = 1; /* You can't hide a hole */ else ttmp->tseen = 0; ttmp->once = 0; @@ -425,8 +430,35 @@ /* statue of any golem hit with stone-to-flesh becomes flesh golem */ if (is_golem(&mons[statue->corpsenm]) && cause == ANIMATE_SPELL) mptr = &mons[PM_FLESH_GOLEM]; else +#ifdef WEBB_ENVIRONMENT + if (statue->corpsenm == NON_PM){ + if (cause != ANIMATE_SPELL) { + if (fail_reason) *fail_reason = AS_MON_IS_UNIQUE; + return (struct monst *)0; + } + if(cansee(x,y)) + pline("Glowing cracks extend over %s! It explodes with a preternatural scream!", statuename ); + else + You_hear("a preternatural scream!"); + delobj(statue); + if(rn2(2)) mksobj_at(TRIPE_RATION,x,y,TRUE,FALSE); + item = mksobj_at(MEATBALL,x,y,TRUE,FALSE); + item->quan = rn1(30,7); + item->owt = weight(item); + + scatter(x,y,4,VIS_EFFECTS|MAY_HIT|MAY_DESTROY,0); + + + if (historic && cause != ANIMATE_NORMAL) { + You_feel("guilty that the historic statue is now gone."); + adjalign(-1); + } + if (fail_reason) *fail_reason = AS_OK; + return (struct monst *)-1; /* (monst*)0 means make a corpse */ + } +#endif mptr = &mons[statue->corpsenm]; /* * Guard against someone wishing for a statue of a unique monster * (which is allowed in normal play) and then tossing it onto the @@ -501,8 +533,17 @@ else { /* cause == ANIMATE_NORMAL */ You("find %s posing as a statue.", canspotmon(mon) ? a_monnam(mon) : something); stop_occupation(); +#ifdef WEBB_WATERSPOUT_GARGOYLE + if (mon->data == &mons[PM_WATERSPOUT_GARGOYLE] && + levl[x][y].typ == FOUNTAIN){ + pline("%s breaks free from the fountain.", + canspotmon(mon) ? Monnam(mon) : something); + dogushforth(FALSE,x,y); + dryup(x,y, (cause == ANIMATE_SHATTER || cause == ANIMATE_SPELL)); + } +#endif } /* avoid hiding under nothing */ if (x == u.ux && y == u.uy && Upolyd && hides_under(youmonst.data) && !OBJ_AT(x, y)) @@ -791,9 +832,13 @@ break; case RUST_TRAP: seetrap(trap); +#ifdef WEBB_BIODIVERSITY + if (does_rust(youmonst.data)) { +#else if (u.umonnum == PM_IRON_GOLEM) { +#endif pline("%s you!", A_gush_of_water_hits); You("are covered with rust!"); rehumanize(); break; @@ -1644,8 +1689,12 @@ register struct trap *trap = t_at(mtmp->mx, mtmp->my); boolean trapkilled = FALSE; struct permonst *mptr = mtmp->data; struct obj *otmp; +#ifdef WEBB_DISINT + boolean can_disint =(touch_disintegrates(mtmp->data) && + !mtmp->mcan && mtmp->mhp>6 && rn2(20)); +#endif if (!trap) { mtmp->mtrapped = 0; /* perhaps teleported? */ } else if (mtmp->mtrapped) { /* is currently in the trap */ @@ -1688,8 +1737,11 @@ } } else { register int tt = trap->ttyp; boolean in_sight, tear_web, see_it, +#ifdef WEBB_DISINT + trap_visible = (trap->tseen && cansee(trap->tx,trap->ty)) , +#endif inescapable = ((tt == HOLE || tt == PIT) && In_sokoban(&u.uz) && !trap->madeby_u); const char *fallverb; @@ -1784,8 +1836,24 @@ case BEAR_TRAP: if(mptr->msize > MZ_SMALL && !amorphous(mptr) && !is_flyer(mptr) && !is_whirly(mptr) && !unsolid(mptr)) { +#ifdef WEBB_DISINT + if (can_disint){ + if (in_sight) + pline("%s beartrap disintegrates on %s leg!", + A_Your[trap->madeby_u], s_suffix(mon_nam(mtmp))); + else if(trap_visible) + pline("%s beartrap disintegrates!", + A_Your[trap->madeby_u]); + deltrap(trap); + newsym(mtmp->mx,mtmp->my); + mtmp->mhp -= rnd(2); /* beartrap weighs 200 */ + } + else { +#else + { +#endif mtmp->mtrapped = 1; if(in_sight) { pline("%s is caught in %s bear trap!", Monnam(mtmp), a_your[trap->madeby_u]); @@ -1796,8 +1864,9 @@ && flags.soundok) You_hear("the roaring of an angry bear!"); } } + } break; case SLP_GAS_TRAP: if (!resists_sleep(mtmp) && !breathless(mptr) && @@ -1866,17 +1935,25 @@ } #endif } } +#ifdef WEBB_BIODIVERSITY + if (does_rust(mptr)) { +#else if (mptr == &mons[PM_IRON_GOLEM]) { +#endif if (in_sight) pline("%s falls to pieces!", Monnam(mtmp)); else if(mtmp->mtame) pline("May %s rust in peace.", mon_nam(mtmp)); mondied(mtmp); if (mtmp->mhp <= 0) trapkilled = TRUE; +#ifdef WEBB_DISINT + } else if (can_disint){ + pline("The water vanishes in a green twinkling."); +#endif } else if (mptr == &mons[PM_GREMLIN] && rn2(3)) { (void)split_mon(mtmp, (struct monst *)0); } break; @@ -1950,8 +2027,16 @@ if (mptr == &mons[PM_PIT_VIPER] || mptr == &mons[PM_PIT_FIEND]) pline("How pitiful. Isn't that the pits?"); seetrap(trap); } +#ifdef WEBB_DISINT + if(can_disint && tt == SPIKED_PIT){ + trap->ttyp = PIT; + if(trap_visible){ + pline("Some spikes dinsintegrate."); + } + } +#endif mselftouch(mtmp, "Falling, ", FALSE); if (mtmp->mhp <= 0 || thitm(0, mtmp, (struct obj *)0, rnd((tt == PIT) ? 6 : 10), FALSE)) @@ -1996,8 +2081,22 @@ case WEB: /* Monster in a web. */ if (webmaker(mptr)) break; +#ifdef WEBB_DISINT + if (can_disint){ + if (in_sight){ + pline("%s dissolves %s spider web!", Monnam(mtmp), + a_your[trap->madeby_u]); + } else if (trap_visible){ + pline("%s spider web disintegrates in a green twinkling!", + A_Your[trap->madeby_u]); + } + deltrap(trap); + newsym(mtmp->mx, mtmp->my); + break; + } else +#endif if (amorphous(mptr) || is_whirly(mptr) || unsolid(mptr)){ if(acidic(mptr) || mptr == &mons[PM_GELATINOUS_CUBE] || mptr == &mons[PM_FIRE_ELEMENTAL]) { @@ -2191,8 +2290,53 @@ xkilled(mon,0); } else monstone(mon); } +#ifdef WEBB_DISINT +int +instadisintegrate(str) +const char * str; +{ + int result; + if(Disint_resistance || !rn2(20)) + return 0; + You("disintegrate!"); + result = (youmonst.data->cwt); + weight_dmg(result); + result = min(6, result); + killer_format = KILLED_BY; + killer = str; + u.ugrave_arise = -3; + done(DISINTEGRATED); + + return (result); +} + +int +minstadisintegrate(mon) +struct monst *mon; +{ + int result = mon->data->cwt; + if (resists_disint(mon) || !rn2(20)) return 0; + weight_dmg(result); + if (canseemon(mon)) + pline("%s disintegrates!", Monnam(mon)); + if (is_rider(mon->data)){ + if (canseemon(mon)){ + pline("%s body reintegrates before your %s!", + s_suffix(Monnam(mon)), + (eyecount(youmonst.data) == 1)? + body_part(EYE) : makeplural(body_part(EYE))); + mon->mhp = mon->mhpmax; + } + return result; + } else { + mondead_helper(mon, AD_DISN); + return result; + } +} +#endif + void selftouch(arg) const char *arg; { @@ -2810,9 +2954,15 @@ drown() { boolean inpool_ok = FALSE, crawl_ok; int i, x, y; - +#ifdef WEBB_ENVIRONMENT + if (levl[u.ux][u.uy].typ == SPOOL) { + Your("%s start to sink in a muskeg.", makeplural(body_part(FOOT))); + levl[u.ux][u.uy].typ = POOL; + levl[u.ux][u.uy].glyph = cmap_to_glyph(S_pool); + } +#endif /* happily wading in the same contiguous pool */ if (u.uinwater && is_pool(u.ux-u.dx,u.uy-u.dy) && (Swimming || Amphibious)) { /* water effects on objects every now and then */ @@ -3293,8 +3443,13 @@ { int wt; struct obj *otmp; boolean uprob; +#ifdef WEBB_DISINT + boolean udied; + boolean can_disint =(touch_disintegrates(mtmp->data) && + !mtmp->mcan && mtmp->mhp>6); +#endif /* * This works when levitating too -- consistent with the ability * to hit monsters while levitating. @@ -3337,8 +3492,22 @@ } } /* need to do cockatrice check first if sleeping or paralyzed */ if (uprob) { +#ifdef WEBB_DISINT + if(can_disint && (!(uarmg) || !oresist_disintegration(uarmg))){ + char kbuf[BUFSZ]; + Sprintf(kbuf, "trying to help %s out of a pit", + an(mtmp->data->mname)); + You("try to grab %s, but...", mon_nam(mtmp)); + if (uarmg) { + destroy_arm(uarmg); + } else { + if (!instadisintegrate(kbuf)) + You("cannot get a firm grasp."); + } + } else +#endif You("try to grab %s, but cannot get a firm grasp.", mon_nam(mtmp)); if (mtmp->msleeping) { mtmp->msleeping = 0; @@ -3349,8 +3518,23 @@ You("reach out your %s and grab %s.", makeplural(body_part(ARM)), mon_nam(mtmp)); +#ifdef WEBB_DISINT + if(can_disint){ + char kbuf[BUFSZ]; + Sprintf(kbuf, "trying to help %s out of a pit", + an(mtmp->data->mname)); + if(uarmg){ + if(!oresist_disintegration(uarmg)){ + destroy_arm(uarmg); + udied = (instadisintegrate(kbuf))?1:0; + } + } else + udied = (instadisintegrate(kbuf))?1:0; + } +#endif + if (mtmp->msleeping) { mtmp->msleeping = 0; pline("%s awakens.", Monnam(mtmp)); } else if (mtmp->mfrozen && !rn2(mtmp->mfrozen)) { @@ -3358,9 +3542,11 @@ mtmp->mcanmove = 1; mtmp->mfrozen = 0; pline("%s stirs.", Monnam(mtmp)); } - +#ifdef WEBB_DISINT + if (udied) return 1; +#endif /* is the monster too heavy? */ wt = inv_weight() + mtmp->data->cwt; if (!try_lift(mtmp, ttmp, wt, FALSE)) return 1; @@ -3873,8 +4059,21 @@ else if (obj) { dam = dmgval(obj, mon); if (dam < 1) dam = 1; } + +#ifdef WEBB_DISINT + if(obj && touch_disintegrates(mon->data) && + !mon->mcan && (mon->mhp > 6) && !oresist_disintegration(obj)){ + dam = obj->owt; + weight_dmg(dam); + if (cansee(mon->mx, mon->my)) + pline("It disintegrates!"); + dealloc_obj(obj); + obj = 0; + } +#endif + if ((mon->mhp -= dam) <= 0) { int xx = mon->mx; int yy = mon->my; diff -rwBEN -U4 nethack-3.4.2-test/src/uhitm.c nethack-3.4.2-diff/src/uhitm.c --- nethack-3.4.2-test/src/uhitm.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/uhitm.c 2003-11-30 09:37:34.000000000 -0600 @@ -144,10 +144,14 @@ } wakeup(mtmp); /* always necessary; also un-mimics mimics */ return TRUE; } - +#ifdef WEBB_BIODIVERSITY + if (mtmp->m_ap_type && (mtmp->m_ap_type != M_AP_MONSTER) + && !Protection_from_shape_changers && +#else if (mtmp->m_ap_type && !Protection_from_shape_changers && +#endif !sensemon(mtmp) && !glyph_is_warning(glyph_at(u.ux+u.dx,u.uy+u.dy))) { /* If a hidden mimic was in a square where a player remembers * some (probably different) unseen monster, the player is in @@ -256,12 +260,27 @@ } if(!mtmp->mcanmove) { tmp += 4; if(!rn2(10)) { +#ifdef WEBB_TURTLES + if(mtmp->data->mlet != S_TURTLE || !(mtmp->mflee))) +#endif mtmp->mcanmove = 1; mtmp->mfrozen = 0; +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !mtmp->mspec_used){ + mtmp->mfrozen = 1; + mtmp->mcanmove = 0; + } +#endif } } +#ifdef WEBB_TURTLES + if(mtmp->data->mlet == S_TURTLE && mtmp->mflee && !mtmp->mcanmove) + tmp -=6; /* don't penalize enshelled turtles */ +#endif + if (is_orc(mtmp->data) && maybe_polyd(is_elf(youmonst.data), Race_if(PM_ELF))) tmp++; if(Role_if(PM_MONK) && !Upolyd) { @@ -380,9 +399,15 @@ /* andrew@orca: prevent unlimited pick-axe attacks */ u_wipe_engr(3); /* Is the "it died" check actually correct? */ - if(mdat->mlet == S_LEPRECHAUN && !mtmp->mfrozen && !mtmp->msleeping && + if( +#ifdef WEBB_BIODIVERSITY + mdat == &mons[PM_LEPRECHAUN] +#else + mdat->mlet == S_LEPRECHAUN +#endif + && !mtmp->mfrozen && !mtmp->msleeping && !mtmp->mconf && mtmp->mcansee && !rn2(7) && (m_move(mtmp, 0) == 2 || /* it died */ mtmp->mx != u.ux+u.dx || mtmp->my != u.uy+u.dy)) /* it moved */ return(FALSE); @@ -520,8 +545,14 @@ boolean hittxt = FALSE, destroyed = FALSE, already_killed = FALSE; boolean get_dmg_bonus = TRUE; boolean ispoisoned = FALSE, needpoismsg = FALSE, poiskilled = FALSE; boolean silvermsg = FALSE; +#ifdef WEBB_WATERSPOUT_GARGOYLE + boolean needrustmsg = FALSE; +#endif +#ifdef WEBB_DISINT + boolean disint_obj = FALSE; +#endif boolean valid_weapon_attack = FALSE; boolean unarmed = !uwep && !uarm && !uarms; #ifdef STEED int jousting = 0; @@ -555,10 +586,50 @@ if (barehand_silver_rings && hates_silver(mdat)) { tmp += rnd(20); silvermsg = TRUE; } +#ifdef WEBB_DISINT + if (touch_disintegrates(mdat) && !mon->mcan && (mon->mhp>6)){ + int dis_dmg; + valid_weapon_attack =0; + Sprintf(unconventional,"barehandedly striking %s", + an(mdat->mname)); + if (!flags.verbose) You("hit it."); + else You("%s %s%s", Role_if(PM_BARBARIAN) ? "smite" : "hit", + mon_nam(mon), canseemon(mon) ? exclam(tmp) : "."); + dis_dmg = instadisintegrate(unconventional); + tmp = min( dis_dmg, tmp); + unconventional[0] = '\0'; + disint_obj = TRUE; + hittxt = TRUE; } } else { + if(touch_disintegrates(mdat) && !mon->mcan && (mon->mhp>6) && + !oresist_disintegration(uarmg)){ + int dis_dmg = uarmg->owt; + weight_dmg(dis_dmg); + if (!flags.verbose) You("hit it."); + else You("%s %s%s", Role_if(PM_BARBARIAN) ? "smite" : "hit", + mon_nam(mon), canseemon(mon) ? exclam(tmp) : "."); + hittxt = TRUE; + destroy_arm(uarmg); + tmp = min( dis_dmg, tmp); + disint_obj = TRUE; + valid_weapon_attack =0; + } +#endif + } + } else { +#ifdef WEBB_DISINT + if (touch_disintegrates(mdat) && !oresist_disintegration(obj) && + mon->mhp>6 && !mon->mcan){ + disint_obj = TRUE; + valid_weapon_attack = FALSE; + tmp = obj->owt; + weight_dmg(tmp); + } else +#endif + { if(obj->oclass == WEAPON_CLASS || is_weptool(obj) || obj->oclass == GEM_CLASS) { /* is it not a melee weapon? */ @@ -855,8 +926,21 @@ else useup(obj); hittxt = TRUE; get_dmg_bonus = FALSE; break; +#ifdef WEBB_WATERSPOUT_GARGOYLE + case WATER_VENOM: /* thrown (or spit) */ + tmp = 0; +#ifdef WEBB_BIODIVERSITY + if (does_rust(mdat)){ +#else + if (mdat == &mons[PM_IRON_GOLEM]){ +#endif + tmp = d(1,6); + } + needrustmsg = TRUE; + break; +#endif default: /* non-weapons can damage because of their weight */ /* (but not too much) */ tmp = obj->owt/100; @@ -866,8 +950,9 @@ } } } } + } /****** NOTE: perhaps obj is undefined!! (if !thrown && BOOMERANG) * *OR* if attacking bare-handed!! */ @@ -905,8 +990,13 @@ obj->opoisoned = FALSE; Your("%s %s no longer poisoned.", xname(obj), otense(obj, "are")); } +#ifdef WEBB_DISINT + if (disint_obj) + ; + else +#endif if (resists_poison(mon)) needpoismsg = TRUE; else if (rn2(10)) tmp += rnd(6); @@ -927,9 +1017,28 @@ } else { if (get_dmg_bonus) tmp = 1; } } - +#ifdef WEBB_DISINT + if(disint_obj && obj){ /* all the hit msgs, no object destruction */ + if(obj->oclass == POTION_CLASS || obj->oclass == VENOM_CLASS || + obj->otyp == EGG || obj->otyp == CREAM_PIE){ + if (cansee(mon->mx, mon->my)) + pline_The("%s %s in a %s of green light!", + xname(obj), vtense(xname(obj),"vanish"), + (obj->oclass == VENOM_CLASS)?"twinkle":"flash"); + else + pline("Vip!"); + hittxt=TRUE; + } else if (u.usteed && !thrown && tmp > 0 && + weapon_type(obj) == P_LANCE && mon != u.ustuck && joust(mon,obj)) { + You("joust %s%s", + mon_nam(mon), canseemon(mon) ? exclam(tmp) : "."); + Your("%s vanishes on impact!", xname(obj)); + hittxt = TRUE; + } + } else +#endif #ifdef STEED if (jousting) { tmp += d(2, (obj == uwep) ? 10 : 2); /* [was in dmgval()] */ You("joust %s%s", @@ -953,9 +1062,10 @@ } else #endif /* VERY small chance of stunning opponent if unarmed. */ - if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) { + if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd + ) { if (rnd(100) < P_SKILL(P_BARE_HANDED_COMBAT) && !bigmonst(mdat) && !thick_skinned(mdat)) { if (canspotmon(mon)) pline("%s %s from your powerful strike!", Monnam(mon), @@ -998,8 +1108,29 @@ else You("%s %s%s", Role_if(PM_BARBARIAN) ? "smite" : "hit", mon_nam(mon), canseemon(mon) ? exclam(tmp) : "."); } +#ifdef WEBB_DISINT + if (disint_obj && obj) { + if(!hittxt){ + if(cansee(mon->mx,mon->my)){ + pline_The("%s %s!", mshot_xname(obj), + (obj->oartifact)?"dissolves":"disintegrates"); + } else { + pline("Vip!%s", + (!thrown)? " Your weapon vanishes from your grip!":""); + } + } + if (!thrown) { + u.twoweap = FALSE; /* untwoweapon() is too verbose here */ + if (obj == uwep) uwepgone(); /* set unweapon */ + useupall(obj); + obj = 0; + } else { + /*obfree(obj, (struct obj *) 0 ); handled: elsewhere */ + } + } +#endif if (silvermsg) { const char *fmt; char *whom = mon_nam(mon); @@ -1019,8 +1150,24 @@ whom = strcat(s_suffix(whom), " flesh"); pline(fmt, whom); } +#ifdef WEBB_WATERSPOUT_GARGOYLE + if (needrustmsg){ + hurtmarmor(mon,AD_RUST); + if(mdat == &mons[PM_GREMLIN]){ + (void)split_mon(mon, (struct monst *)0); +#ifdef WEBB_BIODIVERSITY + } else if ( does_rust(mdat) ) { +#else + } else if ( mdat == &mons[PM_IRON_GOLEM] ) { +#endif + if (canseemon(mon))pline("%s rusts.", Monnam(mon)); + setmangry(mon); + abuse_dog(mon); + } + } +#endif if (needpoismsg) pline_The("poison doesn't seem to affect %s.", mon_nam(mon)); if (poiskilled) { pline_The("poison was deadly..."); @@ -1374,13 +1521,19 @@ case AD_SITM: steal_it(mdef, mattk); tmp = 0; break; +#ifdef WEBB_GOLDBUG + case AD_EGLD: +#endif case AD_SGLD: #ifndef GOLDOBJ if (mdef->mgold) { u.ugold += mdef->mgold; mdef->mgold = 0; +#ifdef WEBB_GOLDBUG + (mattk->adtyp)?You("nab some gold."): +#endif Your("purse feels heavier."); } #else /* This you as a leprechaun, so steal @@ -1390,8 +1543,11 @@ if (mongold) { obj_extract_self(mongold); if (merge_choice(invent, mongold) || inv_cnt() < 52) { addinv(mongold); +#ifdef WEBB_GOLDBUG + (mattk->adtyp)?You("nab some gold."): +#endif Your("purse feels heavier."); } else { You("grab %s's gold, but find no room in your knapsack.", mon_nam(mdef)); dropy(mongold); @@ -1453,9 +1609,13 @@ tmp = 0; } break; case AD_RUST: +#ifdef WEBB_BIODIVERSITY + if (does_rust(pd)){ +#else if (pd == &mons[PM_IRON_GOLEM]) { +#endif pline("%s falls to pieces!", Monnam(mdef)); xkilled(mdef,0); } hurtmarmor(mdef, AD_RUST); @@ -1515,8 +1675,14 @@ if (touch_petrifies(mdef->data) && !Stone_resistance && !Stoned) { Stoned = 5; killer_format = KILLED_BY_AN; delayed_killer = mdef->data->mname; +#ifdef WEBB_DISINT +/* handled in tohit + + } else if (touch_disintegrates(mdef->data)) { + tmp += instadisintegrate(mdef->data->mname); */ +#endif } if (!vegan(mdef->data)) u.uconduct.unvegan++; if (!vegetarian(mdef->data)) @@ -1611,12 +1777,87 @@ pline("%s looks confused.", Monnam(mdef)); mdef->mconf = 1; } break; + +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + if (negated) { + tmp = 0; + break; + } + if (!Blind) + pline("%s is being steamed!", Monnam(mdef)); + if (resists_fire(mdef)) { + if (!Blind) + pline_The("steam doesn't scald %s!", mon_nam(mdef)); + shieldeff(mdef->mx, mdef->my); + tmp = 0; + } + /* only potions damage resistant players in destroy_item */ + tmp += destroy_mitem(mdef, POTION_CLASS, AD_FIRE); + if(!rn2(10)) hurtmarmor(mdef, AD_RUST); + break; + case AD_FLVR: + if (negated){ tmp = 0; break;} + switch (rn2(6)){ + case 0: /* up, copied from muse: MUSE_POT_GAIN_LEVEL */ + if (Can_rise_up(mdef->mx, mdef->my, &u.uz)){ + register int tolev=depth(&u.uz)-1; + d_level tolevel; + get_level(&tolevel, tolev); + if(on_level(&tolevel, &u.uz)) goto uhitm_flvr_strange; + if (canseemon(mdef)) + pline("%s rises up, through the %s!", + Monnam(mdef), ceiling(mdef->mx, mdef->my)); + migrate_to_level(mdef, ledger_no(&tolevel), + MIGR_RANDOM, (coord *)0); + break; + } + else{goto uhitm_flvr_strange;} + break; + case 1: /* down */ + if (Can_fall_thru(&u.uz) /* && !In_sokoban(&u.uz)*/ ){ + register int tolev=depth(&u.uz)+1; + d_level tolevel; + get_level(&tolevel, tolev); + if (mon_has_amulet(mdef) || In_endgame(&u.uz) + || on_level(&tolevel, &u.uz)) + goto uhitm_flvr_strange; + if (canseemon(mdef)) + pline("%s sinks down, through the %s!", + Monnam(mdef), surface(mdef->mx, mdef->my)); + migrate_to_level(mdef,ledger_no(&tolevel), + MIGR_RANDOM, (coord *)0); + break; + } + else goto uhitm_flvr_strange; + case 2: /* top, teleport to dlev1, top level of branch? */ + case 3: /* bottom, teleport to Moloch's sanctum, bot lev of branch? */ + case 4: /* strange */ +uhitm_flvr_strange: + if (canseemon(mdef)) pline("%s reacts strangely.", Monnam(mdef)); + mdef->mconf = 1; + mdef->mstrategy &= ~STRAT_WAITFORU; + break; + case 5: /* charm, fall through */ + (void)docharm(); + } + break; +#endif +#ifdef WEBB_MCHARM +/* this should be #monster-able, not attack */ + case AD_CHRM: + tmp=0; + break; +#endif default: tmp = 0; break; } +#ifdef WEBB_TURTLE + if (mdef->data->mlet == S_TURTLE && mdef->mflee) tmp = tmp/2; +#endif mdef->mstrategy &= ~STRAT_WAITFORU; /* in case player is very fast */ if((mdef->mhp -= tmp) < 1) { if (mdef->mtame && !cansee(mdef->mx,mdef->my)) { You_feel("embarrassed for a moment."); @@ -1659,8 +1900,11 @@ case AD_COLD: resistance = resists_cold(mdef); goto common; case AD_FIRE: +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: +#endif resistance = resists_fire(mdef); goto common; case AD_ELEC: resistance = resists_elec(mdef); @@ -1731,9 +1975,13 @@ if(u.uhunger < 1500 && !u.uswallow) { for (otmp = mdef->minvent; otmp; otmp = otmp->nobj) (void) snuff_lit(otmp); - if(!touch_petrifies(mdef->data) || Stone_resistance) { + if((!touch_petrifies(mdef->data) || Stone_resistance) +#ifdef WEBB_DISINT + && (!touch_disintegrates(mdef->data) || Disint_resistance) +#endif + ) { #ifdef LINT /* static char msgbuf[BUFSZ]; */ char msgbuf[BUFSZ]; #else static char msgbuf[BUFSZ]; @@ -1856,8 +2104,21 @@ pline("%s is burning to a crisp!",Monnam(mdef)); golemeffects(mdef,(int)mattk->adtyp,dam); } else dam = 0; break; +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + if (rn2(2)) { + if (resists_fire(mdef)) { + pline("%s seems mildly hot.", Monnam(mdef)); + dam = 0; + } else + pline("%s is severly scalded!", Monnam(mdef)); + if(!rn2(3)) hurtmarmor(mdef, AD_RUST); + }else dam=0; + break; +#endif + } end_engulf(); if ((mdef->mhp -= dam) <= 0) { killed(mdef); @@ -1875,8 +2136,11 @@ You("bite into %s.", mon_nam(mdef)); Sprintf(kbuf, "swallowing %s whole", an(mdef->data->mname)); instapetrify(kbuf); +#ifdef WEBB_DISINT + instadisintegrate(kbuf); +#endif } } return(0); } @@ -1958,8 +2222,16 @@ case AT_STNG: case AT_TUCH: case AT_BUTT: case AT_TENT: +#ifdef WEBB_SATYR + case AT_NTCH: /* currently stopped at "compat", so no touching + may require moving if non-tempting monsters + get the non-touching attack */ +#endif +#ifdef WEBB_CARROLL + use_natural: +#endif if (i==0 && uwep && (youmonst.data->mlet==S_LICH)) goto use_weapon; if ((dhit = (tmp > rnd(20) || u.uswallow)) != 0) { int compat; @@ -1995,8 +2267,40 @@ You("touch %s.", mon_nam(mon)); else if (mattk->aatyp == AT_TENT) Your("tentacles suck %s.", mon_nam(mon)); else You("hit %s.", mon_nam(mon)); +#ifdef WEBB_DISINT + if (touch_disintegrates(mon->data) && !mon->mcan && mon->mhp>1){ + int dis_dmg = 0; + if(mattk->aatyp == AT_KICK && uarmf){ + if(!oresist_disintegration(uarmf)){ + dis_dmg += uarmf->owt; + destroy_arm(uarmf); + } + } else if(uarmg && (mattk->aatyp == AT_WEAP || + mattk->aatyp == AT_CLAW || mattk->aatyp == AT_TUCH)){ + if(!oresist_disintegration(uarmg)){ + dis_dmg += uarmg->owt; + destroy_arm(uarmg); + } + } else if(mattk->aatyp == AT_BUTT && uarmh) { + if(!oresist_disintegration(uarmh)){ + dis_dmg += (uarmh->owt); + destroy_arm(uarmh); + } + } else { + char kbuf[BUFSZ]; + Sprintf(kbuf, "touching %s", an(mon->data->mname)); + mon->mhp -= instadisintegrate(kbuf); + } + sum[i] = 1; + if(dis_dmg){ + weight_dmg(dis_dmg); + } + mon->mhp -= dis_dmg; + if (mon->mhp < 1) mon->mhp = 1; + } else +#endif sum[i] = damageum(mon, mattk); } else missum(mon, mattk); break; @@ -2030,8 +2334,19 @@ sum[i] = explum(mon, mattk); break; case AT_ENGL: +#ifdef WEBB_CARROLL + if((youmonst.data == &mons[PM_BANDERSNATCH]) && + !yeasty_food(mon->data)) { + mattk->aatyp = AT_BITE; + mattk->adtyp = AD_PHYS; + mattk->damn = 1; + mattk->damd = 5; + goto use_natural; + } +#endif + if((dhit = (tmp > rnd(20+i)))) { wakeup(mon); if (mon->data == &mons[PM_SHADE]) Your("attempt to surround %s is harmless.", @@ -2272,8 +2587,12 @@ case AD_STUN: /* specifically yellow mold */ if(!Stunned) make_stunned((long)tmp, TRUE); break; +#ifdef WEBB_BIODIVERSITY + case AD_SCLD: + if(!rn2(10)) hurtmarmor(mon, AD_RUST); +#endif case AD_FIRE: if(monnear(mon, u.ux, u.uy)) { if(Fire_resistance) { shieldeff(u.ux, u.uy); diff -rwBEN -U4 nethack-3.4.2-test/src/version.c nethack-3.4.2-diff/src/version.c --- nethack-3.4.2-test/src/version.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/version.c 2003-11-30 09:37:34.000000000 -0600 @@ -81,11 +81,12 @@ (VERSION_FEATURES & ~IGNORED_FEATURES) || #endif version_data->entity_count != VERSION_SANITY1 || version_data->struct_sizes != VERSION_SANITY2) { - if (complain) - pline("Configuration incompatibility for file \"%s\".", + if (complain){ + pline("Configuration incompatibility for file \"%s\". Verify data and executable are same version.", filename); + } return FALSE; } return TRUE; } diff -rwBEN -U4 nethack-3.4.2-test/src/weapon.c nethack-3.4.2-diff/src/weapon.c --- nethack-3.4.2-test/src/weapon.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/weapon.c 2003-11-30 09:37:34.000000000 -0600 @@ -282,8 +282,11 @@ } /* Put weapon vs. monster type damage bonuses in below: */ if (Is_weapon || otmp->oclass == GEM_CLASS || +#ifdef WEBB_TREE + throwable_nut(otmp) || +#endif otmp->oclass == BALL_CLASS || otmp->oclass == CHAIN_CLASS) { int bonus = 0; if (otmp->blessed && (is_undead(ptr) || is_demon(ptr))) @@ -327,9 +330,13 @@ { struct obj *otmp; for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) { - if (otmp->otyp == x && + if ((otmp->otyp == x +#ifdef WEBB_BIODIVERSITY + || x == STRANGE_OBJECT /* no ANY object */ +#endif + )&& /* never select non-cockatrice corpses */ !((x == CORPSE || x == EGG) && !touch_petrifies(&mons[otmp->corpsenm])) && (!otmp->oartifact || touch_artifact(otmp,mtmp))) @@ -409,10 +416,14 @@ /* (shooting rocks is already handled via the rwep[] ordering) */ if (rwep[i] == DART && !likes_gems(mtmp->data) && m_carrying(mtmp, SLING)) { /* propellor */ for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) - if (otmp->oclass == GEM_CLASS && - (otmp->otyp != LOADSTONE || !otmp->cursed)) { + if ((otmp->oclass == GEM_CLASS && + (otmp->otyp != LOADSTONE || !otmp->cursed)) +#ifdef WEBB_TREE + || throwable_nut(otmp) +#endif + ) { propellor = m_carrying(mtmp, SLING); return otmp; } } @@ -420,9 +431,13 @@ /* KMH -- This belongs here so darts will work */ propellor = &zeroobj; prop = (objects[rwep[i]]).oc_skill; - if (prop < 0) { + if (prop < 0 +#ifdef WEBB_BIODIVERSITY + && mtmp->data != &mons[PM_POLTERGEIST] +#endif + ) { switch (-prop) { case P_BOW: propellor = (oselect(mtmp, YUMI)); if (!propellor) propellor = (oselect(mtmp, ELVEN_BOW)); @@ -458,9 +473,12 @@ return otmp; } } } - +#ifdef WEBB_BIODIVERSITY + if (mtmp->data == &mons[PM_POLTERGEIST]) + return oselect(mtmp, STRANGE_OBJECT); +#endif /* failure */ return (struct obj *)0; } @@ -1073,9 +1091,13 @@ if (!obj) /* Not using a weapon */ return (P_BARE_HANDED_COMBAT); if (obj->oclass != WEAPON_CLASS && obj->oclass != TOOL_CLASS && - obj->oclass != GEM_CLASS) + obj->oclass != GEM_CLASS +#ifdef WEBB_TREE + && !throwable_nut(obj) +#endif + ) /* Not a weapon, weapon-tool, or ammo */ return (P_NONE); type = objects[obj->otyp].oc_skill; return ((type < 0) ? -type : type); diff -rwBEN -U4 nethack-3.4.2-test/src/wizard.c nethack-3.4.2-diff/src/wizard.c --- nethack-3.4.2-test/src/wizard.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/wizard.c 2003-11-30 09:37:34.000000000 -0600 @@ -352,9 +352,9 @@ if ((otmp = on_ground(which_arti(targ))) != 0) { if (cansee(mtmp->mx, mtmp->my)) pline("%s picks up %s.", Monnam(mtmp), - (distu(mtmp->my, mtmp->my) <= 5) ? + (distu(mtmp->mx, mtmp->my) <= 5) ? doname(otmp) : distant_name(otmp, doname)); obj_extract_self(otmp); (void) mpickobj(mtmp, otmp); return(1); @@ -383,9 +383,19 @@ if (!DEADMONSTER(mtmp)) { mtmp->msleeping = 0; if(!mtmp->mcanmove && !rn2(5)) { mtmp->mfrozen = 0; +#ifdef WEBB_TURTLES + if(mtmp->data->mlet != S_TURTLE || !(mtmp->mflee))) +#endif mtmp->mcanmove = 1; +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_CLOCKWORK_AUTOMATON] && + !mtmp->mspec_used){ + mtmp->mfrozen = 1; + mtmp->mcanmove = 0; + } +#endif } } } diff -rwBEN -U4 nethack-3.4.2-test/src/worn.c nethack-3.4.2-diff/src/worn.c --- nethack-3.4.2-test/src/worn.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/worn.c 2003-11-30 09:37:34.000000000 -0600 @@ -110,8 +110,11 @@ register struct obj *obj; { register const struct worn *wp; register int p; +#ifdef WEBB_LAME_MONSTERS + int was_blind = Blemmye_blindness(&youmonst); +#endif if (!obj) return; if (obj == uwep || obj == uswapwep) u.twoweap = 0; for(wp = worn; wp->w_mask; wp++) @@ -124,8 +127,17 @@ set_artifact_intrinsic(obj, 0, wp->w_mask); if ((p = w_blocks(obj,wp->w_mask)) != 0) u.uprops[p].blocked &= ~wp->w_mask; } +#ifdef WEBB_LAME_MONSTERS + if ( was_blind && !Blind){ + You("can see again."); + /* blindness has just been toggled */ + if (Blind_telepat || Infravision) see_monsters(); + vision_full_recalc = 1; /* recalc vision limits */ + flags.botl = 1; + } +#endif update_inventory(); } void @@ -386,9 +398,14 @@ m_dowear_type(mon, W_ARMH, creation, FALSE); if (!MON_WEP(mon) || !bimanual(MON_WEP(mon))) m_dowear_type(mon, W_ARMS, creation, FALSE); m_dowear_type(mon, W_ARMG, creation, FALSE); +#ifdef WEBB_SATYR + if (!slithy(mon->data) && mon->data->mlet != S_CENTAUR && + mon->data != &mons[PM_SATYR]) +#else if (!slithy(mon->data) && mon->data->mlet != S_CENTAUR) +#endif m_dowear_type(mon, W_ARMF, creation, FALSE); if (!cantweararm(mon->data)) m_dowear_type(mon, W_ARM, creation, FALSE); else @@ -437,8 +454,11 @@ case W_ARMH: if (!is_helmet(obj)) continue; /* (flimsy exception matches polyself handling) */ if (has_horns(mon->data) && !is_flimsy(obj)) continue; +#ifdef WEBB_LAME_MONSTERS + if (!has_head(mon->data)) continue; +#endif break; case W_ARMS: if (!is_shield(obj)) continue; break; @@ -450,8 +470,11 @@ break; case W_ARM: if (!is_suit(obj)) continue; if (racialexception && (racial_exception(mon, obj) < 1)) continue; +#ifdef WEBB_LAME_MONSTERS + if (!has_head(mon->data)) continue; +#endif break; } if (obj->owornmask) continue; /* I'd like to define a VISIBLE_ARM_BONUS which doesn't assume the @@ -696,9 +719,13 @@ if (polyspot) bypass_obj(otmp); m_lose_armor(mon, otmp); } } +#ifdef WEBB_LAME_MONSTERS + if (!has_head(mdat) || verysmall(mdat) || has_horns(mdat)){ +#else if (handless_or_tiny || has_horns(mdat)) { +#endif if ((otmp = which_armor(mon, W_ARMH)) != 0 && /* flimsy test for horns matches polyself handling */ (handless_or_tiny || !is_flimsy(otmp))) { if (vis) @@ -709,9 +736,13 @@ if (polyspot) bypass_obj(otmp); m_lose_armor(mon, otmp); } } - if (handless_or_tiny || slithy(mdat) || mdat->mlet == S_CENTAUR) { + if (handless_or_tiny || slithy(mdat) || mdat->mlet == S_CENTAUR +#ifdef WEBB_SATYR + || mdat == &mons[PM_SATYR] +#endif + ) { if ((otmp = which_armor(mon, W_ARMF)) != 0) { if (vis) { if (is_whirly(mon->data)) pline("%s boots fall away!", diff -rwBEN -U4 nethack-3.4.2-test/src/zap.c nethack-3.4.2-diff/src/zap.c --- nethack-3.4.2-test/src/zap.c 2003-11-30 05:56:52.000000000 -0600 +++ nethack-3.4.2-diff/src/zap.c 2003-11-30 09:37:34.000000000 -0600 @@ -173,9 +173,13 @@ break; case WAN_POLYMORPH: case SPE_POLYMORPH: case POT_POLYMORPH: - if (resists_magm(mtmp)) { + if (resists_magm(mtmp) +#ifdef WEBB_CARROLL + || (mtmp->data == &mons[PM_BANDERSNATCH]) +#endif + ) { /* magic resistance protects from polymorph traps, so make it guard against involuntary polymorph attacks too... */ shieldeff(mtmp->mx, mtmp->my); } else if (!resist(mtmp, otmp->oclass, 0, NOTELL)) { @@ -506,9 +510,22 @@ mtmp2->mleashed = 0; mtmp2->mtrapped = 0; mtmp2->msleeping = 0; mtmp2->mfrozen = 0; +#ifdef WEBB_TURTLES + if(mtmp->data->mlet == S_TURTLE && (mtmp->mflee))) + mtmp2->mcanmove=0; + else +#endif mtmp2->mcanmove = 1; +#ifdef WEBB_BIODIVERSITY + if(mtmp->data == &mons[PM_CLOCKWORK_AUTOMATON]){ + if(!(mtmp2->mspec_used = mtmp->mspec_used)){ + mtmp2->mfrozen = 1; + mtmp2->mcanmove = 0; + } + } +#endif /* most cancelled monsters return to normal, but some need to stay cancelled */ if (!dmgtype(mtmp2->data, AD_SEDU) #ifdef SEDUCE @@ -2330,9 +2347,15 @@ destroy_drawbridge(xx, yy); disclose = TRUE; } else if (striking && u.dz < 0 && rn2(3) && !Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz) && - !Underwater && !Is_qstart(&u.uz)) { + !Underwater && +#ifdef WEBB_ENVIRONMENT + !SKY_AT(u.ux, u.uy) +#else + !Is_qstart(&u.uz) +#endif + ) { /* similar to zap_dig() */ pline("A rock is dislodged from the %s and falls on your %s.", ceiling(x, y), body_part(HEAD)); losehp(rnd((uarmh && is_metallic(uarmh)) ? 2 : 6), @@ -2360,8 +2383,11 @@ } break; case SPE_STONE_TO_FLESH: if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) || +#ifdef WEBB_ENVIRONMENT + SKY_AT(u.ux, u.uy) || +#endif Underwater || (Is_qstart(&u.uz) && u.dz < 0)) { pline(nothing_happens); } else if (u.dz < 0) { /* we should do more... */ pline("Blood drips on your %s.", body_part(FACE)); @@ -3137,9 +3163,13 @@ killer_format = KILLED_BY_AN; killer = fltxt; /* when killed by disintegration breath, don't leave corpse */ u.ugrave_arise = (type == -ZT_BREATH(ZT_DEATH)) ? -3 : NON_PM; +#ifdef WEBB_DISINT + done((type== -ZT_BREATH(ZT_DEATH)) ? DISINTEGRATED : DIED); +#else done(DIED); +#endif return; /* lifesaved */ case ZT_LIGHTNING: if (Shock_resistance) { shieldeff(sx, sy); @@ -3381,16 +3411,21 @@ mon->mgold = 0L; #endif /* note: worn amulet of life saving must be preserved in order to operate */ +#ifndef oresist_disintegration #define oresist_disintegration(obj) \ (objects[obj->otyp].oc_oprop == DISINT_RES || \ obj_resists(obj, 5, 50) || is_quest_artifact(obj) || \ obj == m_amulet) - +#endif for (otmp = mon->minvent; otmp; otmp = otmp2) { otmp2 = otmp->nobj; - if (!oresist_disintegration(otmp)) { + if ( +#ifdef WEBB_DISINT + otmp == m_amulet || +#endif + !oresist_disintegration(otmp)) { obj_extract_self(otmp); obfree(otmp, (struct obj *)0); } } @@ -4044,8 +4079,13 @@ int resisted; int alev, dlev; /* attack level */ +#ifdef WEBB_MCHARM /* if its resisting some other thing. */ + if (oclass<=0) + alev = -oclass; + else +#endif switch (oclass) { case WAND_CLASS: alev = 12; break; case TOOL_CLASS: alev = 10; break; /* instrument */ case WEAPON_CLASS: alev = 10; break; /* artifact */ diff -rwBEN -U4 nethack-3.4.2-test/sys/winnt/Makefile.msc nethack-3.4.2-diff/sys/winnt/Makefile.msc --- nethack-3.4.2-test/sys/winnt/Makefile.msc 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/sys/winnt/Makefile.msc 2003-11-30 09:37:34.000000000 -0600 @@ -352,9 +352,9 @@ VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o VOBJ10 = $(O)mail.o $(O)pcmain.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o -VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)minion.o $(O)mklev.o +VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)miditest.o $(O)minion.o $(O)mklev.o VOBJ12 = $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o $(O)mkroom.o VOBJ13 = $(O)mon.o $(O)mondata.o $(O)monmove.o $(O)monst.o VOBJ14 = $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o VOBJ15 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o @@ -1343,8 +1343,9 @@ $(O)mapglyph.o: mapglyph.c $(HACK_H) $(O)mcastu.o: mcastu.c $(HACK_H) $(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h +$(O)miditest.o: miditest.o $(HACK_H) $(O)minion.o: minion.c $(HACK_H) $(INCL)\emin.h $(INCL)\epri.h $(O)mklev.o: mklev.c $(HACK_H) $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)\sp_lev.h $(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h diff -rwBEN -U4 nethack-3.4.2-test/sys/winnt/nttty.c nethack-3.4.2-diff/sys/winnt/nttty.c --- nethack-3.4.2-test/sys/winnt/nttty.c 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/sys/winnt/nttty.c 2003-11-30 09:37:34.000000000 -0600 @@ -621,9 +621,13 @@ ttycolors[CLR_BLACK] = FOREGROUND_INTENSITY; /* fix by Quietust */ ttycolors[CLR_RED] = FOREGROUND_RED; ttycolors[CLR_GREEN] = FOREGROUND_GREEN; ttycolors[CLR_BROWN] = FOREGROUND_GREEN|FOREGROUND_RED; +#ifdef WEBB_COLORS + ttycolors[CLR_BLUE] = FOREGROUND_BLUE; +#else ttycolors[CLR_BLUE] = FOREGROUND_BLUE|FOREGROUND_INTENSITY; +#endif ttycolors[CLR_MAGENTA] = FOREGROUND_BLUE|FOREGROUND_RED; ttycolors[CLR_CYAN] = FOREGROUND_GREEN|FOREGROUND_BLUE; ttycolors[CLR_GRAY] = FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE; ttycolors[BRIGHT] = FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED|\ @@ -634,9 +638,14 @@ FOREGROUND_INTENSITY; ttycolors[CLR_BRIGHT_BLUE] = FOREGROUND_BLUE|FOREGROUND_INTENSITY; ttycolors[CLR_BRIGHT_MAGENTA] = FOREGROUND_BLUE|FOREGROUND_RED|\ FOREGROUND_INTENSITY; +#ifdef WEBB_COLORS + ttycolors[CLR_BRIGHT_CYAN] = FOREGROUND_GREEN|FOREGROUND_BLUE|\ + FOREGROUND_INTENSITY; +#else ttycolors[CLR_BRIGHT_CYAN] = FOREGROUND_GREEN|FOREGROUND_BLUE; +#endif ttycolors[CLR_WHITE] = FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED|\ FOREGROUND_INTENSITY; } # endif /* TEXTCOLOR */ diff -rwBEN -U4 nethack-3.4.2-test/util/lev_comp.l nethack-3.4.2-diff/util/lev_comp.l --- nethack-3.4.2-test/util/lev_comp.l 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/util/lev_comp.l 2003-11-30 09:37:34.000000000 -0600 @@ -87,9 +87,9 @@ yylval.map[map_cnt] = 0; map_cnt = 0; return MAP_ID; } -[-|}{+ABCISHKPLWTF\\#. 0123456789]*\r?\n { +[-|}{+ABCISHKPLWTF,\\#. 0123456789]*\r?\n { /* comma = opensky WEBB */ int len = yyleng; /* convert \r\n to \n */ if (len >= 2 && yytext[len - 2] == '\r') len -= 1; line_number++; @@ -128,8 +128,9 @@ BRANCH return BRANCH_ID; FOUNTAIN return FOUNTAIN_ID; SINK return SINK_ID; POOL return POOL_ID; +TREES return TREES_ID; /* WEBB */ NON_DIGGABLE return NON_DIGGABLE_ID; NON_PASSWALL return NON_PASSWALL_ID; ROOM return ROOM_ID; SUBROOM return SUBROOM_ID; @@ -165,8 +166,10 @@ lit { yylval.i=1; return LIGHT_STATE; } unlit { yylval.i=0; return LIGHT_STATE; } filled { yylval.i=0; return FILLING; } unfilled { yylval.i=1; return FILLING; } +inside { yylval.i=0; return SKY_STATE; } /*WEBB*/ +outside { yylval.i=1; return SKY_STATE; } /*WEBB*/ noalign { yylval.i= AM_NONE; return ALIGNMENT; } law { yylval.i= AM_LAWFUL; return ALIGNMENT; } neutral { yylval.i= AM_NEUTRAL; return ALIGNMENT; } chaos { yylval.i= AM_CHAOTIC; return ALIGNMENT; } @@ -197,8 +200,9 @@ noteleport { yylval.i=NOTELEPORT; return FLAG_TYPE; } hardfloor { yylval.i=HARDFLOOR; return FLAG_TYPE; } nommap { yylval.i=NOMMAP; return FLAG_TYPE; } arboreal { yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */ +skylevel { yylval.i=SKYLEVEL; return FLAG_TYPE; } /* WEBB */ shortsighted { yylval.i=SHORTSIGHTED; return FLAG_TYPE; } \[\ *[0-9]+\%\ *\] { yylval.i = atoi(yytext + 1); return PERCENT; } [+\-]?[0-9]+ { yylval.i=atoi(yytext); return INTEGER; } \"[^"]*\" { yytext[yyleng-1] = 0; /* Discard the trailing \" */ diff -rwBEN -U4 nethack-3.4.2-test/util/lev_comp.y nethack-3.4.2-diff/util/lev_comp.y --- nethack-3.4.2-test/util/lev_comp.y 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/util/lev_comp.y 2003-11-30 09:44:18.000000000 -0600 @@ -44,8 +44,11 @@ extern int FDECL(get_floor_type, (CHAR_P)); extern int FDECL(get_room_type, (char *)); extern int FDECL(get_trap_type, (char *)); +#ifdef WEBB_ENVIRONMENT +extern int FDECL(get_tree_type, (char *)); +#endif /* WEBB_ENVIRONMENT */ extern int FDECL(get_monster_id, (char *,CHAR_P)); extern int FDECL(get_object_id, (char *,CHAR_P)); extern boolean FDECL(check_monster_char, (CHAR_P)); extern boolean FDECL(check_object_char, (CHAR_P)); @@ -96,8 +99,11 @@ engraving *tmpengraving[MAX_OF_TYPE]; fountain *tmpfountain[MAX_OF_TYPE]; sink *tmpsink[MAX_OF_TYPE]; pool *tmppool[MAX_OF_TYPE]; +#ifdef WEBB_ENVIRONMENT +trees *tmptrees[MAX_OF_TYPE]; +#endif mazepart *tmppart[10]; room *tmproom[MAXNROFROOMS*2]; corridor *tmpcor[MAX_OF_TYPE]; @@ -114,8 +120,11 @@ unsigned int nlreg = 0, nreg = 0, ndoor = 0, ntrap = 0, nmons = 0, nobj = 0; unsigned int ndb = 0, nwalk = 0, npart = 0, ndig = 0, nlad = 0, nstair = 0; unsigned int naltar = 0, ncorridor = 0, nrooms = 0, ngold = 0, nengraving = 0; unsigned int nfountain = 0, npool = 0, nsink = 0, npass = 0; +#ifdef WEBB_ENVIRONMENT +unsigned int ntrees =0; +#endif static int lev_flags = 0; unsigned int max_x_map, max_y_map; @@ -136,8 +145,12 @@ xchar room; xchar wall; xchar door; } corpos; + struct { /* WEBB_ENVIRONMENT */ + uchar a; + uchar b; + } pair; } %token CHAR INTEGER BOOLEAN PERCENT @@ -153,17 +166,21 @@ %token ALIGNMENT LEFT_OR_RIGHT CENTER TOP_OR_BOT ALTAR_TYPE UP_OR_DOWN %token SUBROOM_ID NAME_ID FLAGS_ID FLAG_TYPE MON_ATTITUDE MON_ALERTNESS %token MON_APPEARANCE %token CONTAINED +%token SKY_STATE TREES_ID /* WEBB_ENVIRONMENT */ %token ',' ':' '(' ')' '[' ']' %token STRING MAP_ID %type h_justif v_justif trap_name room_type door_state light_state -%type alignment altar_type a_register roomfill filling door_pos +%type alignment altar_type a_register filling door_pos %type door_wall walled secret amount chance -%type engraving_type flags flag_list prefilled lev_region lev_init +%type engraving_type flags flag_list lev_region lev_init %type monster monster_c m_register object object_c o_register +%type sky_state %type string maze_def level_def m_name o_name %type corr_spec +%type opt_prefilled opt_roomfill /* WEBB_ENVIRONMENT */ +/* %type roomfill prefilled !WEBB_ENVIRONMENT */ %start file %% file : /* nothing */ @@ -262,9 +279,9 @@ sizeof init_lev); init_lev.init_present = FALSE; $$ = 0; } - | LEV_INIT_ID ':' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled + | LEV_INIT_ID ':' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled sky_state /* WEBB_ENVIRONMENT */ { init_lev.init_present = TRUE; init_lev.fg = what_map_char((char) $3); if (init_lev.fg == INVALID_TYPE) @@ -278,8 +295,9 @@ init_lev.fg != CORR && init_lev.fg != ROOM) yyerror("Invalid foreground type for joined map."); init_lev.lit = $11; init_lev.walled = $13; + init_lev.sky = $14; /* WEBB_ENVIRONMENT */ $$ = 1; } ; @@ -363,8 +381,9 @@ tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->parent = (char *) 0; tmproom[nrooms]->rtype = 0; tmproom[nrooms]->rlit = 0; + tmproom[nrooms]->rsky = 2; /* WEBB_ENVIRONMENT */ tmproom[nrooms]->xalign = ERR; tmproom[nrooms]->yalign = ERR; tmproom[nrooms]->x = 0; tmproom[nrooms]->y = 0; @@ -445,16 +464,17 @@ store_room(); } ; -subroom_def : SUBROOM_ID ':' room_type ',' light_state ',' subroom_pos ',' room_size ',' string roomfill +subroom_def : SUBROOM_ID ':' room_type ',' light_state ',' subroom_pos ',' room_size ',' string opt_roomfill /* WEBB_ENVIRONMENT */ { tmproom[nrooms] = New(room); tmproom[nrooms]->parent = $11; tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->rtype = $3; tmproom[nrooms]->rlit = $5; - tmproom[nrooms]->filled = $12; + tmproom[nrooms]->rsky = $12.b; /* WEBB_ENVIRONMENT */ + tmproom[nrooms]->filled = $12.a; /* WEBB_ENVIRONMENT */ tmproom[nrooms]->xalign = ERR; tmproom[nrooms]->yalign = ERR; tmproom[nrooms]->x = current_coord.x; tmproom[nrooms]->y = current_coord.y; @@ -463,16 +483,17 @@ in_room = 1; } ; -room_def : ROOM_ID ':' room_type ',' light_state ',' room_pos ',' room_align ',' room_size roomfill +room_def : ROOM_ID ':' room_type ',' light_state ',' room_pos ',' room_align ',' room_size opt_roomfill /* WEBB_ENVIRONMENT */ { tmproom[nrooms] = New(room); tmproom[nrooms]->name = (char *) 0; tmproom[nrooms]->parent = (char *) 0; tmproom[nrooms]->rtype = $3; tmproom[nrooms]->rlit = $5; - tmproom[nrooms]->filled = $12; + tmproom[nrooms]->rsky = $12.b; /* WEBB_ENVIRONMENT */ + tmproom[nrooms]->filled = $12.a; /* WEBB_ENVIRONMENT */ tmproom[nrooms]->xalign = current_align.x; tmproom[nrooms]->yalign = current_align.y; tmproom[nrooms]->x = current_coord.x; tmproom[nrooms]->y = current_coord.y; @@ -481,16 +502,27 @@ in_room = 1; } ; -roomfill : /* nothing */ +/* !WEBB_ENVIRONMENT roomfill : /*nothing* / { $$ = 1; } | ',' BOOLEAN { $$ = $2; } + ; */ +opt_roomfill : sky_state + { + $$.a = 1; + $$.b = (uchar)($1); + } + | ',' BOOLEAN sky_state + { + $$.a = $2; + $$.b = (uchar)($3); + } ; room_pos : '(' INTEGER ',' INTEGER ')' { @@ -809,8 +841,9 @@ | gold_detail | engraving_detail | diggable_detail | passwall_detail + | trees_detail /* WEBB_ENVIRONMENT */ ; monster_detail : MONSTER_ID chance ':' monster_c ',' m_name ',' coordinate { @@ -966,12 +999,25 @@ monster_id : STRING { int token = get_monster_id($1, (char)0); - if (token == ERR) /* "random" */ + /* WEBB_ENVIRONMENT*/ + if (token != ERR) + tmpobj[nobj]->corpsenm = token; + else if (!strcmp($1,"none")) + tmpobj[nobj]->corpsenm = NON_PM; + else /*if (strcmp($1,"random"))*/ + tmpobj[nobj]->corpsenm = NON_PM - 1; + + +/* not WEBB_ENVIRONMENT */ +/* if (token == ERR)*/ /* "random" */ +/* tmpobj[nobj]->corpsenm = NON_PM - 1; else tmpobj[nobj]->corpsenm = token; + */ + Free($1); } ; @@ -1345,19 +1391,24 @@ } } ; -region_detail : REGION_ID ':' region ',' light_state ',' room_type prefilled +region_detail : REGION_ID ':' region ',' light_state ',' room_type opt_prefilled { tmpreg[nreg] = New(region); tmpreg[nreg]->x1 = current_region.x1; tmpreg[nreg]->y1 = current_region.y1; tmpreg[nreg]->x2 = current_region.x2; tmpreg[nreg]->y2 = current_region.y2; tmpreg[nreg]->rlit = $5; tmpreg[nreg]->rtype = $7; + /* !WEBB_ENVIRONMENT if($8 & 1) tmpreg[nreg]->rtype += MAXRTYPE+1; tmpreg[nreg]->rirreg = (($8 & 2) != 0); + */ + tmpreg[nreg]->rsky = $8.b ; /* WEBB */ + if(($8.a) & (uchar)1) tmpreg[nreg]->rtype += MAXRTYPE+1; + tmpreg[nreg]->rirreg = ((($8.a) & (uchar)2) != 0); /*end WEBB*/ if(current_region.x1 > current_region.x2 || current_region.y1 > current_region.y2) yyerror("Region start > end!"); if(tmpreg[nreg]->rtype == VAULT && @@ -1445,8 +1496,27 @@ ngold--; } } ; +/* WEBB_ENVIRONMENT */ +trees_detail : TREES_ID chance ':' tree_desc ',' lev_region + { + tmptrees[ntrees] = New(trees); /* am I supposed to use lregions? */ + tmptrees[ntrees]->x1 = current_region.x1; + tmptrees[ntrees]->y1 = current_region.y1; + tmptrees[ntrees]->x2 = current_region.x2; + tmptrees[ntrees]->y2 = current_region.y2; + tmptrees[ntrees]->or_type = $4 % 256; + tmptrees[ntrees]->and_type = $4 / 256; + tmptrees[ntrees]->chance = $2; + ntrees++; + if (ntrees >= MAX_OF_TYPE) { + yyerror("Too many tree regions in room or mazeport!"); + ntrees--; + } + } + ; +/* end WEBB_ENVIRONMENT */ engraving_detail: ENGRAVING_ID ':' coordinate ',' engraving_type ',' string { tmpengraving[nengraving] = New(engraving); @@ -1505,8 +1575,20 @@ } | RANDOM_TYPE ; +/* WEBB_ENVIRONMENT */ +tree_desc : string + { + int token = get_tree_type($1); + if (token == ERR) + yyerror("Unknown tree description!"); + $$ = token; + Free($1); + } + ; +/* end WEBB_ENVIRONMENT */ + room_type : string { int token = get_room_type($1); if (token == ERR) { @@ -1518,8 +1600,9 @@ } | RANDOM_TYPE ; +/* !WEBB - prefilled : /* empty */ + prefilled : /* empty * / { $$ = 0; } @@ -1530,8 +1613,36 @@ | ',' FILLING ',' BOOLEAN { $$ = $2 + ($4 << 1); } + ; */ + +opt_prefilled : sky_state /* WEBB */ + { + $$.a = 0; + $$.b = $1; + } + | ',' FILLING sky_state + + { + $$.a = $2; + $$.b = $3; + } + | ',' FILLING ',' BOOLEAN sky_state + { + $$.a = $2 + ($4 << 1); + $$.b = $5; + } + ; + +sky_state : /* empty *//* WEBB */ + { + $$ = 2; /* don't care */ + } + | ',' SKY_STATE + { + $$ = $2; /* true^false */ + } ; coordinate : coord | p_register diff -rwBEN -U4 nethack-3.4.2-test/util/lev_main.c nethack-3.4.2-diff/util/lev_main.c --- nethack-3.4.2-test/util/lev_main.c 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/util/lev_main.c 2003-11-30 09:37:34.000000000 -0600 @@ -165,8 +165,34 @@ { "candle shop", CANDLESHOP }, { 0, 0 } }; +#ifdef WEBB_ENVIRONMENT +static struct { + const char *name; + char or_type; + char and_type; +} tree_types[] = { + { "swarmed", TREE_SWARM, 0x1f }, + { "looted", TREE_LOOTED, 0x1f }, + { "hive", 0x00, ~TREE_SWARM }, + { "loot", 0x00, ~TREE_LOOTED }, + { "swarm-rand", 0x20, ~TREE_SWARM }, + { "loot-rand", 0x40, ~TREE_LOOTED }, + { "notype", TREE_NONE, ~TREE_TYPE_MASK }, + { "apple", TREE_APPLE, ~TREE_TYPE_MASK }, + { "pear", TREE_PEAR, ~TREE_TYPE_MASK }, + { "orange", TREE_ORANGE, ~TREE_TYPE_MASK }, + { "banana", TREE_BANANA, ~TREE_TYPE_MASK }, + { "eucalyptus", TREE_GUM, ~TREE_TYPE_MASK }, + { "oak", TREE_OAK, ~TREE_TYPE_MASK }, + { "elvish", TREE_IRONWD, ~TREE_TYPE_MASK }, + { "type-rand", 0x80, ~TREE_TYPE_MASK }, + { 0, 0, 0xff} +}; +#endif + + const char *fname = "(stdin)"; int fatal_error = 0; int want_warnings = 0; @@ -197,14 +223,20 @@ extern pool *tmppool[]; extern engraving *tmpengraving[]; extern mazepart *tmppart[]; extern room *tmproom[]; +#ifdef WEBB_ENVIRONMENT +extern trees * tmptrees[]; +#endif extern int n_olist, n_mlist, n_plist; extern unsigned int nlreg, nreg, ndoor, ntrap, nmons, nobj; extern unsigned int ndb, nwalk, npart, ndig, npass, nlad, nstair; extern unsigned int naltar, ncorridor, nrooms, ngold, nengraving; +#ifdef WEBB_ENVIRONMENT +extern unsigned int ntrees; +#endif extern unsigned int nfountain, npool, nsink; extern unsigned int max_x_map, max_y_map; @@ -262,8 +294,9 @@ if (argc == 1) { /* Read standard input */ init_yyin(stdin); (void) yyparse(); if (fatal_error > 0) { + fprintf(stderr, "fatal error a!\n"); errors_encountered = TRUE; } } else { /* Otherwise every argument is a filename */ for(i=1; i 0) { + fprintf(stderr, "fatal error b!\n"); errors_encountered = TRUE; fatal_error = 0; } } @@ -383,8 +417,78 @@ return trap_types[i].type; return ERR; } +#ifdef WEBB_ENVIRONMENT +int +get_tree_type(s) +char * s; +{ + register char and=0xff, or=0x00; + int i, length, last = 0; + char * offset = s; + + SpinCursor(3); + do{ + length = strchr(offset, ',') - offset ; + if (length<0){ + length = strlen(offset); + last = 1; + } + for (i = 0; tree_types[i].name; i++) + if (!strncmp(offset,tree_types[i].name,length)) + break; + if (!tree_types[i].name) return ERR; + and &= tree_types[i].and_type; + or |= tree_types[i].or_type; + offset += length+1; + }while (!last); + return (and*256 + or); +} +#endif + +#ifdef WEBB_TEXT_FIX +/* a subset of alt spellings from src/mondata.c */ +static const struct alt_spl { const char* name; short pm_val; } +alt_names[] = { + /* Alternate spellings */ + { "grey dragon", PM_GRAY_DRAGON }, + { "baby grey dragon", PM_BABY_GRAY_DRAGON }, + { "grey unicorn", PM_GRAY_UNICORN }, + { "grey ooze", PM_GRAY_OOZE }, + { "gray-elf", PM_GREY_ELF }, + /* Hyphenated names */ + { "ki rin", PM_KI_RIN }, + { "uruk hai", PM_URUK_HAI }, + { "orc captain", PM_ORC_CAPTAIN }, + { "woodland elf", PM_WOODLAND_ELF }, + { "green elf", PM_GREEN_ELF }, + { "grey elf", PM_GREY_ELF }, + { "gray elf", PM_GREY_ELF }, + { "elf lord", PM_ELF_LORD }, + { "olog hai", PM_OLOG_HAI }, + { "arch lich", PM_ARCH_LICH }, +#ifdef WEBB_MUTATED_MONST + { "kobold lord", PM_KOBOLD_CHIEFTAIN }, + { "wood nymph", PM_DRYAD }, + { "baby red dragon", PM_BABY_FIREDRAKE }, + { "baby white dragon", PM_BABY_LINDWORM }, + { "baby orange dragon", PM_BABY_LUNG_DRAGON }, + { "baby blue dragon", PM_BABY_LEVIATHAN }, + { "baby green dragon", PM_BABY_WYVERN }, + { "baby yellow dragon", PM_BABY_GUIVRE }, + { "red dragon", PM_FIREDRAKE }, + { "white dragon", PM_LINDWORM }, + { "orange dragon", PM_LUNG_DRAGON }, + { "blue dragon", PM_LEVIATHAN }, + { "green dragon", PM_WYVERN }, + { "yellow dragon", PM_GUIVRE }, +#endif + /* end of list */ + { 0, 0 } +}; +#endif + /* * Find the index of a monster in the table, knowing its name. */ int @@ -400,8 +504,13 @@ for (i = LOW_PM; i < NUMMONS; i++) if (!class || class == mons[i].mlet) if (!strcmp(s, mons[i].mname)) return i; +#ifdef WEBB_MUTATED_MONST + for (i = 0; alt_names[i].name; ++i) + if (!class || class == mons[alt_names[i].pm_val].mlet) + if (!strcmp(s, alt_names[i].name)) return i; +#endif return ERR; } /* @@ -498,8 +607,11 @@ case 'I' : return(ICE); case 'W' : return(WATER); case 'T' : return (TREE); case 'F' : return (IRONBARS); /* Fe = iron */ +#ifdef WEBB_ENVIRONMENT + case ',' : return (ROOM|0x40); +#endif } return(INVALID_TYPE); } @@ -845,8 +957,17 @@ } else tmppart[npart]->engravings = 0; nengraving = 0; +#ifdef WEBB_ENVIRONMENT + if ((tmppart[npart]->ntrees = ntrees) != 0) { + tmppart[npart]->treess = NewTab(trees, ntrees); + for(i=0;itreess[i] = tmptrees[i]; + } + ntrees=0; +#endif + npart++; n_plist = n_mlist = n_olist = 0; } @@ -960,8 +1081,17 @@ } else tmproom[nrooms]->engravings = 0; nengraving = 0; +#ifdef WEBB_ENVIRONMENT + if ((tmproom[nrooms]->ntrees = ntrees) != 0) { + tmproom[nrooms]->treess = NewTab(trees, ntrees); + for(i=0;itreess[i] = tmptrees[i]; + } + ntrees = 0; +#endif + nrooms++; } /* @@ -1340,8 +1470,18 @@ /* The engravings */ if (!write_engravings(fd, &pt->nengraving, &pt->engravings)) return FALSE; +#ifdef WEBB_ENVIRONMENT + Write(fd, &(pt->ntrees), sizeof(pt->ntrees)); + for(j=0;jntrees;j++) { + Write(fd, pt->treess[j], sizeof(trees)); + Free(pt->treess[j]); + } + if (pt->ntrees) + Free(pt->treess); +#endif /*WEBB_ENVIRONMENT*/ + Free(pt); } Free(maze->parts); @@ -1452,8 +1592,14 @@ /* The engravings */ if (!write_engravings(fd, &pt->nengraving, &pt->engravings)) return FALSE; +#ifdef WEBB_ENVIRONMENT + Write(fd, &(pt->ntrees), sizeof(pt->ntrees)); + for(j=0; j < pt->ntrees; j++) + Write(fd, pt->treess[j], sizeof(gold)); +#endif + } /* The corridors */ Write(fd, &lev->ncorr, sizeof(lev->ncorr)); diff -rwBEN -U4 nethack-3.4.2-test/util/makedefs.c nethack-3.4.2-diff/util/makedefs.c --- nethack-3.4.2-test/util/makedefs.c 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/util/makedefs.c 2003-11-30 09:37:34.000000000 -0600 @@ -644,8 +644,11 @@ #endif #ifdef KOPS "Keystone Kops", #endif +#ifdef WEBB_BIODIVERSITY + "monster biodiversity, TODO: more buildopts labels", +#endif #ifdef HOLD_LOCKFILE_OPEN "exclusive lock on level 0 file", #endif #ifdef LOGFILE diff -rwBEN -U4 nethack-3.4.2-test/win/share/monsters.txt nethack-3.4.2-diff/win/share/monsters.txt --- nethack-3.4.2-test/win/share/monsters.txt 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/win/share/monsters.txt 2003-11-30 09:37:34.000000000 -0600 @@ -830,8 +830,27 @@ MMMMMPMAPMAAMMMM MMMMPFAMFPAMMMMM MMMMMMMMMMMMMMMM } +# tile 43 (waterspout gargoyle) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMPAPPPPAPMMMMM + MMPAMMMMMMAPMMMM + MMPMBBMMBBAPMMMM + MMMMPBMMBPAMMMMM + MMMMPMMMMPAMMAAM + MMMMAPMMMAMAAAAA + MMMPMABBAMMMAAAA + MMPMPMEBMMAMAAAA + MMPAMPMAPAAMAAAA + MMPAMPMMMMAMAAMM + MMMMMPMMMMAAAAMM + MMMMMPMAPMAAMMMM + MMMMPFAMFPAMMMMM + MMMMMMMMMMMMMMMM +} # tile 43 (winged gargoyle) { MMMKMMMMMMKMMMMM MMMKJMMMMKJMMMMM @@ -1248,8 +1267,46 @@ MMMGFAAMGFAKMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 64 (brownie) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMKMMMMMMMMM + MMMMMMJMMMMMMMMM + MMMMMKJJMMMMMMMM + MMMMKJJJJMMPPAMM + MMMMMLLLAMPPPAMM + MMLJJJLJJJLLAMMM + MMAKAJJJAAJPAMMM + MMMMMKJKKAMPAMMM + MMMJJJAJKJAMMMMM + MMMKJAAMJJAMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} +# tile 64 (pooka) +{ + MMMMMMMMMMMMMMMM + MMMMNMMNMMMMMMMM + MMMMONMNOMMMMMMM + MMMMMNMMNMMMMMMM + MMMMMONNNOAMMMMM + MMMMMMNENEAMMMMM + MMMMMMNNNNAMMMMM + MMMMMMANNAMMMMAM + MMMMMMCAACMMAAAM + MMMMMNCCNCNAAAAM + MMMMNACCNCANAAAM + MMMMNAONOOANAAMM + MMMMMMOAAOAAMAMM + MMMMMNNAMNNAMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 65 (small mimic) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1362,8 +1419,27 @@ MMMMLOOOOOLAMMMM MMMMOLOLOLOLMMMM MMMMMMMMMMMMMMMM } +# tile 70 (satyr) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMAMAMMMMMMMM + MMMMMALALMMMMMMM + MMMMMMLLLMMMMMMM + MMMMMMKKAMMMMMMM + MMMMLLKLLLMMMMMM + MMMMLCLLLCLMMMMM + MMMLCALLCALMMMMM + MMMLMAKKLALAAAMM + MMMMMAKKKAAAAAMM + MMMMMKKKKKAAAMMM + MMMMMJKAJKAAMMMM + MMMMMJAAJAAMMMMM + MMMMMMMMMMMMMMMM +} # tile 71 (goblin) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1932,8 +2008,27 @@ MMMAAAAAAAAAAAMM MMMAAGFAAGFAAAMM MAAAAAAAAAAAAAAA } +# tile 100 (labyrinth trapper) +{ + AAANOOAAAAANOOAA + OOONOOAMOOONOOAM + POOMMMAMPOOMMMAM + PPPMPPPPOOMPPPPO + PPPMPPPPPPMPPPPP + MMMMMMMMMMMMMMMM + PPPPPAMPAPPPMAMP + PPMAMAMAPAMAMAMP + AMAAAAAAAAAAAAMA + PAMAFGFAFGFAAMAP + PPAAAAAAAAAAPAPP + MAMANDNDNDNMAMAM + MOAPPPMPPPPAMAPP + MPPPPPAPPPPPMPPP + MMMMMMMMMMMMMMMM + PPPMPPPPPMPPPPPM +} # tile 101 (white unicorn) { MMMMMMMMMMMMMMMM MMHPMMMMMMMMMMMM @@ -2274,8 +2369,27 @@ MGGGANNNAAMAMAMM MMGMMAAAAAAMMMMM MMMMMMAAMAAMMMMM } +# tile 119 (gold bug) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MHMMHMMMMMMMMMMM + MHMHMMMMMMMMMMMM + MMHMMMMMMMMMMMMM + MMMHMHHHHHHMMMMM + MMMMHHHHNNHHMMMM + MMMHHCHONONCMMMM + MMHHCHCHCHCHCMMM + MMHCCKCKCKCKCAMM + MMAAAHAHAHAAAAMM + MMMMMCACACAMAMMM + MMMMMAAAAAAAMAMM + MMMMMMMMMMMMMMMM +} # tile 119 (yellow light) { MMMMMMMMMMMMMMMM MMMMMMNAMMMMMMMM @@ -2312,8 +2426,65 @@ MMMMMMAAMMMMMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 120 (will o' wisp) +{ + MMMMMMMMMMMMMMMM + MMMMMMPAMMMMMMMM + MMMMMMNAMMMMMMMM + MMPAMPNPAMPAMMMM + MMMOAONOAOAMMMMM + MMMMPNNNPAMMMMMM + MMPONNNNNOPAMMMM + PNNNNNNNNNNNPAMM + MMPONNNNNOPAMMMM + MMMMPNNNPAMMMMMM + MMMOAONOAOAMMMMM + MMPAMPPPAMPAMMMM + MMMMMMNAMMMMMMMM + MMMMMMPAMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} +# tile 120 (bannik) +{ + MMMMMMMMMMMMMMMM + MMMMMMPMMPMPMMMM + MMMLLAPMMPMPMMMM + MMLLLLAMPMMPMMMM + MMLDLOAMPMPMMMMM + MLLLLOOMMMPMMMMM + MMOOOOLLMMMAAMMM + MOOOOAMLLAAAAMMM + MOOOAMMLLAAAAMMM + MMMMMMMLCAAAMMMM + MMMMMMLLLAAAMMMM + MMMMMMIILIAAMMMM + MMMMMMIIIIAMMMMM + MMMMMMAALAAMMMMM + MMMMMMLLLAMMMMMM + MMMMMMMMMMMMMMMM +} +# tile 120 (leshy) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMGGAMMMMMM + MMMMMMGGGGAMMMMM + MMMMMMGFGFAMMMMM + MMMMMMFGGGAMMMMM + MMMMMMFFFFAMMMMM + MMMMMGGFFFGMAAAM + MMMMGGGGFGGGAAAM + MMMMGAGGGGAGAAAM + MMMMGAAGGAAGAAAM + MMMMGAFFFFAGAAAM + MMMMMMGFFGAAAAMM + MMMMMMGGAGAAMAMM + MMMMMGGAMGGAMMMM + MMMMMMMMMMMMMMMM +} # tile 121 (zruty) { MMMMMMMMMMMMMMMM MMMMMMFFGFMMMMMM @@ -3433,8 +3604,46 @@ MMMMIDAAIDAAMMMM MMMIDAAMMIDMMMMM MMMMMMMMMMMMMMMM } +# tile 179 (bandersnatch) +{ + MMMMMMMMMMMMMMMM + MNNMMMMMMMMMMMMM + MONNMMMMMMMMMMMM + MOOOMMMMMMMMMMMM + MMMOMMMMMMMMMMMM + MMMOOMMMMMMMMMMM + MMMOONNNNNAAAMMM + MMNOOONNNNOAAAMM + MMNNOOONNNOOAAMM + MMNNOOONNNNNOAAM + MANNOOOOOOOOLAAM + MAONOOOOOOOOLAAM + AOOOOOOOOOOLLLAM + ALLLLLLLLLLLLLAA + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} +# tile 179 (jubjub bird) +{ + MMMMMMMMMMMMMMMM + MMMMMMJMMMMMMMMM + MMMMJJJJJMMMMMMM + MMMHJJJJMMMMMMMM + MMHHCDJJMMAJMMMM + MHHHCCJJJMAAJMMM + MHHCCMMJJAAAAMMM + MHCCMMAAJJAAAJMM + MHCMAAAAJJJAAJMM + MCJAAAAAJJJAAJMM + MMJAAAAAJJJMAJJM + MMJAAMMCCMCCAAJM + MJJAMMCMCMCMCJJM + MJJMMMMMMMMMMJJM + MJJMMMMMMMMMMJJM + MMMMMMMMMMMMMMMM +} # tile 180 (vorpal jabberwock) { MMMMMMMMMMMMMMMM MMMGPMMMMMMMMMMM @@ -4041,8 +4250,27 @@ NGGGGFGGFGMGMMGF NGGFGGFMMGFMMMMM MMGGFMMGGFMMGMMM } +# tile 211 (clockwork automaton) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMCHMMMMMMM + MMMMMMCCCHAMMMMM + MMMMMMOCOCAMMMMM + MOMMMMCCCCAMMMMM + MOMMMMACCAMMCHCM + MOOMMCCAACAAHMHM + MMOMCCKCCKCHHHCM + MMOOKAACKACAHAHM + MMPOPAMPPMKAKHKM + MMMPMMPPPPAAAAMM + MMMMMMPAAPAAAAMM + MMMMMJJAMJJAMMMM + MMMMMMMMMMMMMMMM +} # tile 212 (quantum mechanic) { MMMMMMMMMMMMMMMM MMMMMMLLLLMMMMMM @@ -4060,8 +4288,27 @@ MMMMMNBEBENNMMMM MMMMNAAEBAANNMMM MMMMMMMMMMMMMMMM } +# tile 212 (quark) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMOOOMMMMMMM + MMMMMONNOOMMMMMM + MMMMONNNOOOMMMMM + MMMMONNOOOPMMMMM + MMMMOOOOOPPMMMMM + MMMMMOOOPPMMMMMM + MMMMMMPPPMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 213 (rust monster) { MMMMMMMMMMMMMMMM MMMMEEEEMMMMMMMM @@ -4098,8 +4345,27 @@ MMMMMPPPPPAAMMAM MMMMMMAAAAMMMMMM MMMMMMMMMMMMMMMM } +# tile 214 (disintegrator) +{ + MMMMMMMMMMMMMMMM + MMMMGAGGMMMMMMMM + MMMGADFDAMMMMMMM + MMMAGFAFGMMMMMMM + MMMGFFAFGMMMMMMM + MMMGFNANFMMMGMMM + MMMMNFFFNGMGGMMM + MMMMGAFAGAMAAGMM + MMMGFFAFAGAGAAGM + MMGFGAFAFAAAGMMM + MMGGFGAFAFAFAGMM + MMAAGGFAFAFGGAAM + MMMMAAGGAGGGAAGM + MMMMMGAGGGAAMMGM + MMMMMMGAGAMMMMMM + MMMMMMMMMMMMMMMM +} # tile 215 (garter snake) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -4326,8 +4592,46 @@ MMAAAPAAAPPMMMMM MAAAPMMAAPMMMMMM MMMMMMMMMMMMMMMM } +# tile 226 (umbral hulk) +{ + AAAAMMMMMAAAAAAA + AAAMAAAAAMAAAAAA + AAMAAAAAAAMAAAAA + AMACACACACAMMAAA + AMAAAAAAAAAMAMAA + AMAAAPAPAAAMAAMA + AMAMAPAPAMAAAMAA + AMAMAAAAAMAAMAAA + AMAAAAAAAMMMAAAA + AMAMAAAAAMAAAAAA + AAMMAAMAAMAAAAAA + AAAMAAMAAMAAAAAA + AAAMAAMAAMAAAAAA + AAMAAAMAAAMAAAAA + AMAAAMMMAAAMAAAA + AAMMMMAMMMMAAAAA +} +# tile 226 (hunger hulk) +{ + MMMMMMMMMMMMMMMM + MMMDDDDJMMMMMMMM + MMDDDDDDJMMMMMMM + MDADADADADMMMMMM + MDDDDDDDDDMDMMMM + MDDDODODDDMDDMMM + MDMDODOJMDDJJMMM + MDMDDDDDADJMMMMM + MDJDDDDDAJMMMMMM + MDMDDDDJMAAAAAAM + MMMDJMDJJAAAAAMM + MMMDJMDJAAAAAAAM + MMMDJADJAAAAMMMM + MMDDJADDJAAMMMMM + MDDJAMMDDJAMMMMM + MMMMMMMMMMMMMMMM +} # tile 227 (vampire) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -4364,8 +4668,27 @@ MNMMMAAAPAAPPMMM MNMMAAPPMMAPMMMM MMMMMMMMMMMMMMMM } +# tile 228 (nosferatu) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMOOMMMMMMM + MMMMMMOOOOMMMMMM + MMMMMMDODOOMMMMM + MMMMMMOOOOMMMMMM + MHOOAANANAAMMMMM + MMMOAAAAAAAAMMMM + MMMMAHOOAAAAMMMM + MMMMMAAOAAAPPPPP + MMMMMMAAAAAPPPPM + MMMMMMAAAAAPPPMM + MMMMMMAAPAAPPMMM + MMMMMAAPMMAPMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 229 (vampire mage) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -4478,8 +4801,46 @@ MMMBOMBPMPPAMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 234 (blemmye) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMLLLLLLMMMMM + MMMMLLLPLPLLAAAM + MMMMLLLLLLLLAAAM + MMMMLALCCCALAAAM + MMMMLAALLAALAAAM + MMMMLAJJKJALAAAM + MMMMMMLJJLAAAAMM + MMMMMMLLALAAMAMM + MMMMMLLAMLLAMMMM + MMMMMMMMMMMMMMMM +} +# tile 234 (otyugh) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MKMMMMMMMMCKMMMM + MJCMMMMMMMCKMMMM + MJKCMMMMMMCKMMMM + MMJKMMMMMMJJMMMM + MMKMMMMMMMJMMMMM + MMKMMMMMMMJMMMMM + MMKMJJKMAMJMAMMM + MMKKAAAKAJJAAAMM + MMJKAAAAKJAAAAMM + MMJJKKAKKAAAACCC + MMKKJJJJJJJJJCKA + MMJJKKJKKAAAAAAM + MJJAJAAAJKKAMMMM + MMMMMMMMMMMMMMMM +} # tile 235 (monkey) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -5561,8 +5922,27 @@ MAAAAAAAAAAAAAMM AAAAMAAAAJAMMMMM MMMMMMMMMMMMMMMM } +# tile 291 (poltergeist) +{ + MMMMMMMMMMMMMMMM + MMMPMPMMMMMMMMMM + MMPMPMPMMMMMMMMM + MMMPMPMMMMMMMMMM + MMPMPMPMMPMMMMMM + MMMPMPPPPMPPMMMM + MMMPPPPPPPPMPMMM + MMPPPPPMPPMPMPPM + MPMPMPPPMMMMMMMM + MMPMPPPPPMMMMMMM + MPMMPPPPPMMMMMMM + MMPMMPMPPPMMMMMM + MPMMPPMMPPMMMMMM + MMMPMPMPPMPMMMMM + MMPMPMMMPPMPMMMM + MMMMMMMMMMMMMMMM +} # tile 292 (water demon) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -6359,8 +6739,46 @@ MDAADAAACCAMMMMM MMACCAMMMMMMMMMM MMMAAAMMMMMMMMMM } +# tile 333 (tortoise) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMHHHHHHMMMMM + MMMMHHHHHHHHMMMM + MMMHHHHHHHHHHMMM + MMMHHAHHHHAHHMMM + MMMHHHHHHHHHHMMM + MMMHHHHHHHHHHMMM + MMMHHAHHHHAHHMMM + MMMHHHAAAAHHHMMM + MMMMHHHHHHHHMMMM + MMMMMHHHHHHMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} +# tile 333 (alligator snapping turtle) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMHHHHHHMMMMM + MMMMHHHHHHHHMMMM + MMMHHHHHHHHHHMMM + MMMHHAHHHHAHHMMM + MMMHHHHHHHHHHMMM + MMMHHHHHHHHHHMMM + MMMHHAHHHHAHHMMM + MMMHHHAAAAHHHMMM + MMMMHHHHHHHHMMMM + MMMMMHHHHHHMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 334 (long worm tail) { MMMMMMMMILLLLMMM MMMMMMIILLAAMMMM diff -rwBEN -U4 nethack-3.4.2-test/win/share/objects.txt nethack-3.4.2-diff/win/share/objects.txt --- nethack-3.4.2-test/win/share/objects.txt 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/win/share/objects.txt 2003-11-30 09:37:34.000000000 -0600 @@ -4934,8 +4934,27 @@ MMMMMAAAAAMMMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 258 (acorn) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMAMMMMMMMM + MMMMMMMJMMMMMMMM + MMMMJAJAJAJMMMMM + MMMMAJAJAJAMMMMM + MMMMMKCCKJAAMMMM + MMMMMKCKKJAAMMMM + MMMMMKKKKJAAMMMM + MMMMMJKKJJAAMMMM + MMMMMMJJJAAMMMMM + MMMMMMMJAMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 259 (lump of royal jelly) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7461,8 +7480,27 @@ MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 392 (golden) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMHKMM + MMMMMMMMMMMHKAMM + MMMMMMMMMHHKAMMM + MMMMMMMMHHKAMMMM + MMMMMMMHCKAMMMMM + MMMMMMHCKAMMMMMM + MMMMHHCKAMMMMMMM + MMMKHCKAMMMMMMMM + MMMKHKAMMMMMMMMM + MMMAAAMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 392 (gold piece) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7480,8 +7518,27 @@ MMMMMMHAMMMMMMMM MMMMMMMMMHAMMMMM MMMMMMMMMMMHAMMM } +# tile 392 (silver piece) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MJKKKJMJJMMMMMMM + JKCKKKJKKKJMMMMM + KCKKKJKAAAKAMMMM + KKKKKJANAOKAAMMM + KKKKJKNPOPANAMMM + MKKJJKONPAOAMMMM + MAAAJKPAONPANAMM + MMMAAKANANMMMMMM + MMMMAAAAPANAMNAM + MMMMMMNAMMMMMMMM + MMMMMMMMMNAMMMMM + MMMMMMMMMMMNAMMM +} # tile 393 (white / dilithium crystal) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7879,8 +7936,27 @@ MMMMMMMCAAMMMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 413 (white / quartz) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMPMMMMMMMM + MMPMMMMPMMMMPMMM + MMMPMMMMMMMPMMMM + MMMMMONOOOMMMMMM + MMMMONOOOBOMMMMM + MMMNNNONONBBMMMM + MMMMONOOOBOAAMMM + MMMMMONOBOAAAAMM + MMMMMMOOOAAAMMMM + MMMMMMMOAAMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 414 (green / jade) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8240,8 +8316,46 @@ MMMMMMMMMMPMAPAP MMMMMMMMMMMPPMPA MMMMMMMMMMMMAAMM } +# tile 432 (cogwheel) +{ + MMMMMMAAAAMMMMMM + MMMAMMAPPAMMAMMM + MMAPAMAPMAMAPAMM + MAPMMAPMMPAPMMAM + MMAMMMMMMMMMMAMM + MMMAMMMMMMMMAMMM + AAAPMMMMMMMMMAAA + APPMMMMAAMPMMPPA + APMMMMMAAMPMMMMA + AAAPMMMMMPMMMAAA + MMMAMMMPPMMMAMMM + MMAPMMMMMMMMMAMM + MAPMMAMMMMAMPMAM + MMAMAMAPMAMAMAMM + MMMAMMAMMAMMAMMM + MMMMMMAAAAMMMMMM +} +# tile 432 (sprocket) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMAMMAMMMMMM + MMMMMAPAAPAMMMMM + MMMMAPPPPPPAMMMM + MMMMMAPMAPAMMMMM + MMMMMAPAAPAMMMMM + MMMMAPPPPPPAMMMM + MMMMMAPAAPAMMMMM + MMMMMMAMMAMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} # tile 433 (splash of venom / blinding venom) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8259,8 +8373,28 @@ MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } +# tile 434 (splash of water / water venom) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMBBBBMMMMM + MMMMMBBEEEEBBMMM + MMMMBEEEEEEEBMMM + MMMMBEEEEEEEBMMM + MMMMBEEEEBBBMMMM + MMMMMBBBBMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM +} + # tile 434 (splash of venom / acid venom) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM diff -rwBEN -U4 nethack-3.4.2-test/win/share/tilemap.c nethack-3.4.2-diff/win/share/tilemap.c --- nethack-3.4.2-test/win/share/tilemap.c 2003-11-30 05:56:54.000000000 -0600 +++ nethack-3.4.2-diff/win/share/tilemap.c 2003-11-30 09:37:34.000000000 -0600 @@ -67,8 +67,48 @@ { MON_GLYPH, PM_NEANDERTHAL, "High-elf" }, #ifndef TOURIST { MON_GLYPH, PM_ROSHI, "guide" }, #endif + +#ifndef WEBB_BIODIVERSITY + { MON_GLYPH, PM_LEPRECHAUN, "brownie"}, + { MON_GLYPH, PM_LEPRECHAUN, "pooka"}, + { MON_GLYPH, PM_TRAPPER, "labyrinth trapper"}, + { MON_GLYPH, PM_BLACK_LIGHT, "will o' wisp"}, + { MON_GLYPH, PM_BLACK_LIGHT, "bannik"}, + { MON_GLYPH, PM_BLACK_LIGHT, "leshy"}, + { MON_GLYPH, PM_GREEN_SLIME, "clockwork automaton" }, + { MON_GLYPH, PM_QUANTUM_MECHANIC, "quark" }, + { MON_GLYPH, PM_UMBER_HULK, "umbral hulk" }, + { MON_GLYPH, PM_UMBER_HULK, "hunger hulk" }, + { MON_GLYPH, PM_VAMPIRE_LORD, "nosferatu" }, + { MON_GLYPH, PM_XORN, "otyugh" }, + { MON_GLYPH, PM_SHADE, "poltergeist" }, +#endif +#ifndef WEBB_WATERSPOUT_GARGOYLE + { MON_GLYPH, PM_GARGOYLE, "waterspout gargoyle" }, +#endif +#ifndef WEBB_SATYR + { MON_GLYPH, PM_MOUNTAIN_NYMPH, "satyr"}, +#endif +#ifndef WEBB_GOLD_BUG + { MON_GLYPH, PM_XAN, "gold bug"}, +#endif +#ifndef WEBB_CARROLL + { MON_GLYPH, PM_JABBERWOCK, "bandersnatch" }, + { MON_GLYPH, PM_JABBERWOCK, "jubjub bird" }, +#endif +#ifndef WEBB_DISINT + { MON_GLYPH, PM_DISENCHANTER, "disintegrator" }, +#endif +#ifndef WEBB_LAME_MONSTERS + { MON_GLYPH, PM_XORN, "blemmye" }, +#endif +#ifdef WEBB_TURTLE + { MON_GLYPH, PM_SALAMANDER, "tortoise" }, + { MON_GLYPH, PM_SALAMANDER, "alligator snapping turtle" }, +#endif + #ifndef KOPS { OBJ_GLYPH, CLUB, "rubber hose" }, #endif /* objects commented out in objects.c at present */ @@ -88,8 +128,27 @@ */ #ifndef MAIL { OBJ_GLYPH, SCR_STINKING_CLOUD+4, "stamped / mail" }, #endif + +#ifndef WEBB_BIODIVERSITY + { OBJ_GLYPH, AGATE, "quartz" }, + { OBJ_GLYPH, IRON_CHAIN, "cogwheel" }, + { OBJ_GLYPH, IRON_CHAIN, "sprocket" }, +#endif +#ifndef WEBB_TREE + { OBJ_GLYPH, SLIME_MOLD, "acorn" }, +#endif +#ifndef WEBB_GOLD_BUG + { OBJ_GLYPH, WAN_LIGHTNING+3, "golden" }, +#endif +#ifndef WEBB_MONEY + { OBJ_GLYPH, GOLD_PIECE, "silver piece" }, +#endif +#ifndef WEBB_WATERSPOUT_GARGOYLE + { OBJ_GLYPH, BLINDING_VENOM, "splash of water / water venom" }, +#endif + { 0, 0, 0} };