careful checks for habitat were ignored (default is HT_LAND) because the base type for undead wasn't chosen until after the position. I now added another habitat check during the base type selection loop and now everything works. :)
Add a warning inscription !D that ignores such items during actions like sacrificing items, destroying weapons (Ely), burning books (Trog) or casting sticks to snakes. The failure messages are very clumsy now, but they do get the point across, I hope.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5472 c06c8d41-db1a-0410-9941-cceddc491573
MDFQRJ6QZNFUBVSFWLXUJ6EBXOU47T3CVDI2XKBGNNRF4DXDKESQC RGE3P266JGL6TUMCAMIJB3AIVU5GSQGIH43ZITKXF5WCCXLHKKVQC EVDZD4MDODICQF3ZEN3EVR3IKQHN7O2GWIHYIZZZXBBXQIY3UPOQC ABLV37FMURRJPEZV2VRKOUYAKEMLI7E6RA4PDAII2EJ5L7WBHKZQC VIHJ3Z75JN7BXWNOPWV3CWQZEA7K5DK36EKHCYMZC7SOSJYH2XHQC 4LNIHTHZTCOEZEHZ4GW6WCZH4UCDWKK5UVUKEDODEBBS4YH2KONQC R2DQBWKIW7YUJB5SOQ7J274JIYRVX4H3ISFRPAL5RG2RVVP4G2KAC PDOFPXD2X6VI23AHKCGQ5RVDBG74CNP2E3YOHKXLOARHHBXEK3HQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC J6APXOT4QOGQFONWB7G546VTVF6QG42HVOROMHF7YBDJPR4K26OAC WZNB427K3EUNV3FMVXLQTM4UIHER4FIKQXWLUUXRNQC3OQ33VQYAC V4F3SDV2H4HBH6G6W5M3REN3BDSSE4IDF2RNM7PJMKRW3IDJ7PNAC KYVZGUJXV23ELA4CKPVQZO3NTJCODXMCWYAZJYWVWJVLPETNHLGQC LZUTEJNAVTXSZJX35HC4VIHNIHPCJ7WNQUNWB2SUE6IY7A5HAC7AC XDHIIBQZLHLXAHIPJMXWH3FJ2X5PO7IB7HXQMVZDWM5JZFAG3HAQC FS4MVTH4EEEECLEAO2FTNK5CLF2PHFY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S4CGHQO4QXGJIJU4RLBPAC BRCSZ3GW5VFJW2OGZSUVYJTOOS4NGEX63DNFBJYEILHSCLAA4C4QC UFGBNLXSCQWIKCFRAPQNAMQOW3KGAIFXSNQ26PH5CXGF3DXXJ4SQC // burn only squares in sightif (!see_grid(xpos, ypos))continue;
// If a grid is blocked, books lying there will be ignored.// Allow bombing of monsters.const int cloud = env.cgrid[xpos][ypos];if (grid_is_solid(grd[ xpos ][ ypos ])|| cloud != EMPTY_CLOUD && env.cloud[cloud].type != CLOUD_FIRE){continue;}
// if a grid is blocked, books lying there will be ignored// allow bombing of monstersconst int cloud = env.cgrid[xpos][ypos];if (grid_is_solid(grd[ xpos ][ ypos ]) ||// mgrd[ xpos ][ ypos ] != NON_MONSTER ||(cloud != EMPTY_CLOUD && env.cloud[cloud].type != CLOUD_FIRE)){continue;}
int count = 0;int rarity = 0;i = igrd[xpos][ypos];while (i != NON_ITEM){const int next = mitm[i].link; // in case we can't get it later
int count = 0;int rarity = 0;i = igrd[xpos][ypos];while (i != NON_ITEM){const int next = mitm[i].link; // in case we can't get it later.
if (mitm[i].base_type != OBJ_BOOKS|| mitm[i].sub_type == BOOK_MANUAL|| mitm[i].sub_type == BOOK_DESTRUCTION){i = next;continue;}
if (mitm[i].base_type != OBJ_BOOKS|| mitm[i].sub_type == BOOK_MANUAL|| mitm[i].sub_type == BOOK_DESTRUCTION){i = next;continue;}
// Ignore {!D} inscribed books.if (!check_warning_inscriptions(mitm[i], OPER_DESTROY)){mpr("Won't ignite {!D} inscribed book.");i = next;continue;}
if ( _is_risky_sacrifice(item)|| item.inscription.find("=p") != std::string::npos)
// Ignore {!D} inscribed items.if (!check_warning_inscriptions(item, OPER_DESTROY)){mpr("Won't sacrifice {!D} inscribed item.");i = next;continue;}if (_is_risky_sacrifice(item)|| item.inscription.find("=p") != std::string::npos)
static monster_type resolve_monster_type(monster_type mon_type,proximity_type proximity,monster_type base_type,coord_def &pos,unsigned mmask,dungeon_char_type *stair_type,int *lev_mons)
static monster_type _resolve_monster_type(monster_type mon_type,proximity_type proximity,monster_type base_type,coord_def &pos,unsigned mmask,dungeon_char_type *stair_type,int *lev_mons)
// Let's recheck these even for PROX_NEAR_STAIRS, just in case// occupied?
// Let's recheck these even for PROX_NEAR_STAIRS, just in case.// Occupied?
// setting attitude will always make the// monster wander.. if you want sleeping// hostiles, use BEH_SLEEP since the default
// Setting attitude will always make the monster wander...// If you want sleeping hostiles, use BEH_SLEEP since the default
!D prompt before performing an action that might destroy this itemIf you're attempting to destroy an item thus inscribed bysacrificing it, destroying a weapon, or burning a book in thename of various deities, the game won't even ask you forconfirmation but silently ignore this item. It also protectsagainst accidentally casting Sticks to Snakes on your favouriteweapon. Won't protect against lava accidents or hungry jellies.