He will blink and teleport away any allies, and resort to blinking himself only if there's something else blocking the tomb.
The tomb is dropped when he emerges from it, as teleporting out could leave the player stranded and having unlimited means of digging shouldn't be mandatory.
LP64I7OHAOEUYCSK5LAWCB335GDIRAJHUVTKTJGOJ4V2NWFLDIGAC
SLMVARIRGVV3R3BN6WQBGVCJQXYAGPAM2RMLTJM4J5TWP5WS3FAQC
PS3OYZOHCD464IMPYTISQO2NDD4WLHZHKAT5TBB2VMAU2JBNPYRQC
JESCFNNBKC7BW3XYLJLAF6RLMP5VCXIUUXQUGEZBF4FYPNMEGNJAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
PPUOTH5Z7TV4OLVIFYAXNAXXH2WUMJNFDOZK2QN6B6WJYTFBMNOAC
QFWRKRPFS7TWZYFMIXWU24RS6DAUQPJS47O4HY456PXQJDOYNDWQC
3DQXSE4YGFBBDUWK4YEOFWW4UPWILWELFSLP37SL6BERGAZJC5YAC
ASH5CK6CPBKMLGGIRJ5GKTWMS5W3OBVHTL66RTYZIPFM6KFBYA3QC
ZGUJWUFJ4NFFJ6PGXLFGQWCWBCZHPWGWI44NJHJEVPRG5L36PADQC
NFOXLH722RGWYY5D63VV6SF2XEJBEOQEFQME6FSA4HZRK3CPLSRQC
OP6CTAKWCAU64JXQ3USQYR5E5IFHQHNCACII5UMVRXUTZXJQOAZAC
DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC
PL4TZU6HM2KZA45CNHNHZZSBXB2VFWZWQULDSVS5G5GD5XVERFTAC
DMAHEX6B3PA6ALJAOQUBF2OWOIKJXHYARWNRIN64252SECR23N4QC
CCDQMJMMVC6MIZRZ6JSKKCMEDPUGEVVSFPJUOC5WP63J6SX35MXAC
Q6QWWEURCCP5CRAMRDPFPMM7B6FLLOQZZMI553QKG4KEYVMXARCAC
BZEWV25XPRJVYXP2XOE2HTY45POFP6BWHPDSYFKWYHIPKE6TJVVAC
2FHNLTLN3DVVD67N4QMAQ2LO7YY4GVZWXJAOIWGCCYYGIX7UHSVQC
QSPLWL6QWR5RGGORC4XJ3ICIII5JY6MLQFSD7JOI2QL664KNK5VQC
PQYLCUBDA6P4UY7X3NLIUUKMJ5GTQTB5X64VNSQVMCFS6ONMXXOQC
NHCEH7ZFP3IFRMZMC25ZA2X5ZSS3MOCHCYLVCSVY7RTY62WX7UAQC
BGJ7P65JV2OFVXMGAJDHV5Y36TR7JOFDWJUZJBHUBD7SCQMDRBEAC
CB7U6IEEN2Z74672EYQQHWTB4GXVNNMAYDRQYAGY6K3QSDYYEHYAC
Y56C5OMUQ5XF2G6DKDV4R5MED44UOIUPTBBQVWQBUHYIXYA5MOZAC
BMHUBADDGIOZRVN4P3O5QKIDUYD4RFWBS7MP5X6LZWAYHUBRVD2QC
UWYK2M6I6P6EFAVHLWQGDK77STFO3SPO5SVOF5WZTOKUH2O6BBHQC
JZCODQCOUBBBPPR4TLOAPIB4BQLDY3ORTJXTWEQSUJVJ7DMK7FVAC
}
break;
}
case SPELL_TOMB_OF_DOROKLOHE:
{
sumcount = 0;
for(adjacent_iterator ai(monster->pos()); ai; ++ai)
{
// we can blink away the crowd, but only our allies
if (mgrd(*ai) != NON_MONSTER
&& monster_at(*ai)->attitude != monster->attitude)
sumcount++;
if (grd(*ai) != DNGN_FLOOR && grd(*ai) > DNGN_MAX_NONREACH
&& !grid_is_trap(grd(*ai)))
sumcount++;
}
if (abs(you.pos().x-monster->pos().x)<=1 &&
abs(you.pos().y-monster->pos().y)<=1)
sumcount++;
if (sumcount)
{
monster->blink();
return;
}
sumcount = 0;
for(adjacent_iterator ai(monster->pos()); ai; ++ai)
{
if (mgrd(*ai) != NON_MONSTER && monster_at(*ai) != monster)
{
monster_at(*ai)->blink();
if (mgrd(*ai) != NON_MONSTER)
{
monster_at(*ai)->teleport(true);
if (mgrd(*ai) != NON_MONSTER)
continue;
}
}
if (grd(*ai) == DNGN_FLOOR || grid_is_trap(grd(*ai)))
{
grd(*ai) = DNGN_ROCK_WALL;
sumcount++;
}
}
static void _khufu_drop_tomb(monsters *monster)
{
int count = 0;
monster->behaviour = BEH_SEEK; // don't wander on duty!
for(adjacent_iterator ai(monster->pos()); ai; ++ai)
{
if (grd(*ai) == DNGN_ROCK_WALL)
{
grd(*ai) = DNGN_FLOOR;
count++;
}
}
if (count)
if (mons_near(monster))
mpr("The walls disappear!");
else
mpr("You hear a deep rumble.");
monster->number = 0;
monster->lose_energy(EUT_SPELL);
{
MONS_KHUFU, 'M', LIGHTRED, "Khufu",
M_SPELLCASTER | M_ACTUAL_SPELLS | M_SEE_INVIS | M_EVIL | M_SPEAKS
| M_UNIQUE,
MR_RES_POISON | MR_RES_COLD | MR_RES_ELEC,
0, 20, MONS_MUMMY, MONS_MUMMY, MH_UNDEAD, MAG_IMMUNE,
{ {AT_HIT, AF_PLAIN, 35}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 18, 5, 3, 100 },
10, 6, MST_KHUFU, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_HIGH,
HT_LAND, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM
},
%%%%
############ KHUFU ### mummy emperor with delusions of godhood
Khufu
@The_monster@ booms, "Everyone will worship Khufu but you!"
SPELL:@The_monster@ smites.
@The_monster@ declares, "When I'm finished with you, I will take on the gods!"
@The_monster@ queries, "My people built me a pyramid -- what did your people build for you?"
@The_monster@ says, "This hit and run is way beneath me."
@The_monster@ says, "I am transcendence, you are transpiration."
@The_monster@ says @to_foe@, "Your corpse would blemish any mausoleum."
@The_monster@ says @to_foe@, "You'll be the most ugly mummy ever seen."
@The_monster@ says, "I follow the Polar star."
@The_monster@ yells @to_foe@, "Into the Nile with you!"
## END Khufu ##