git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3987 c06c8d41-db1a-0410-9941-cceddc491573
44YRMW5JNVUBYX3M6UFQOPENNHGO7G2CRZ7SGPIIUTQGYWTRWENAC XXZGTB5UAFMP2SW2WWUHCTDY5TEM7LZEPAASEXKQLT7BSLBY3OTQC KA5FM5FELFEKHCCICIQCKVKOLHOYXOCODGK4NFJWRSPJ4UXULC2AC ED62QWGKBPORWVKDFOQRKJXEIWZVNGR3O4KWQBDSRNPT36AYOQYAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC UU5EKED2RA2U3CFZ3UEJQEWSWHQPEU7ZD4KH3I22IIVZFHD4Y67QC AUXHSGS4EFOPZ6TVZYWNVOUDO7NYKUKE3HBKGQQWTALSVFOE3HAAC 7Y5HSDFKA5TPLS2TWTRFMQVX6UXUDHXU5MUMXQSDFAIY4THQ3BIQC RGHXFBNIULRVRYLBGG5JZDMYVM2E2JJ2Y5KQPMU6PUS3V26G6ZXQC H3552BCIAVBLKAYKE4DHFLBLFW5RGRMYBMRRYHYEB5IPIJRUVU5QC VCISXSXE6WGRO6PQN7Y6IFZ7C4VFUMKQK6KGAXA6YZ5RCZIB64WAC W52PCSHX72WAMWKG6L4BPUBVMO6E72KYYBNKAA7554KNOTY6V7WQC // This is assuming the royal jelly is a unique monster. Is it?// FIXME: Needs check for being at bottom level of the branch.if (monster->type == MONS_ROYAL_JELLY&& player_in_branch( BRANCH_SLIME_PITS )){mpr("Suddenly, all colour oozes out of the surrounding stone!",MSGCH_MONSTER_ENCHANT);replace_area_wrapper(DNGN_STONE_WALL, DNGN_CLEAR_ROCK_WALL);}
-- Special effects for Slime:6function slime_wall_morph(x)local stone = dgn.feature_number('stone_wall')local inlos = falsefor x = 0, dgn.GXM - 1 dofor y = 0, dgn.GYM - 1 doif dgn.grid(x, y) == stone and you.see_grid(x, y) theninlos = truebreakendendif inlos then break endenddgn.replace_feat { stone_wall= "clear_rock_wall" }if inlos thencrawl.mpr("Suddenly all colour oozes out of the stone walls.","monster_enchant")elsecrawl.mpr("You feel a strange vibration for a moment.","monster_enchant")endend}}
function dgn.fnum(feat)if type(feat) == 'string' thenreturn dgn.feature_number(feat)elsereturn featendendfunction dgn.fnum_map(map)local fnmap = { }for k, v in pairs(map) dofnmap[dgn.fnum(k)] = dgn.fnum(v)endreturn fnmapend-- Replaces all features matchingfunction dgn.replace_feat(rmap)local cmap = dgn.fnum_map(rmap)for x = 0, dgn.GXM - 1 dofor y = 0, dgn.GYM - 1 dolocal grid = dgn.grid(x, y)local repl = cmap[grid]if repl thendgn.terrain_changed(x, y, repl)endendendend