and radius_iterator.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5876 c06c8d41-db1a-0410-9941-cceddc491573
AXRXY7RSEN3QHQRK6SFEH2OZAAYJRR5RBBBFF4YJF756V2FPFJ3AC JBZ7NU4BB5PGQWCOSZHD5OQUHQIVOD4XGJLSJQ7BUGQEGPRTVGZQC D54BYIF6H4WYWDUFPAEPH3HFZLRFCWSATJ2JBS3I4S2JYKZFB34QC GF5VGZLKKWIATLVLTUJR4LVEQZAKR7CWMLNFMJXA67WLHP7JNUUAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC VJDLV4PF2ZJ46NERO4LZUX5JE2CD5XBOBQCYYPTFWTHLUEYDUOYAC IQGGFC563RBS7GDOACKCLXK752EE5RC3T6G5L6H446SXTMSA7T2AC WZNB427K3EUNV3FMVXLQTM4UIHER4FIKQXWLUUXRNQC3OQ33VQYAC FS4MVTH4EEEECLEAO2FTNK5CLF2PHFYO2JZHC2YEOKYLWXRDRU6AC C7Q5QY7S5TTMJ3XO2SIO3FY5ZENWYYETS4NKEKCAJMENEHJC6Y2AC MDFQRJ6QZNFUBVSFWLXUJ6EBXOU47T3CVDI2XKBGNNRF4DXDKESQC KYVZGUJXV23ELA4CKPVQZO3NTJCODXMCWYAZJYWVWJVLPETNHLGQC LZUTEJNAVTXSZJX35HC4VIHNIHPCJ7WNQUNWB2SUE6IY7A5HAC7AC UWMN4HLG6YA2YFQEVIVMDISD6APKEPIZXMMPMNUYCBQDSAUYSXPQC VJPJ34M3NKHTKLKVCH7VEHQRIALQYRIBL7MFVVIVA2AO2FHGNT7AC JN4GPMQCXOY5ICTLPLWP6DXBFULN4GMAEK7T4GXTZVIJAUUKBBYAC IQFLSXLOKMSMM65BL7XOEI5ZP55WKZ7BFBOIA44AMTPNJ7DAQXBQC WZTIVJJVK7CAHU5D2IYPH7TWGTLBBYPJZJYPGWKCDGM3JQ6Z6VKAC 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)
if ( si->base_type == OBJ_BOOKS&& si->sub_type != BOOK_MANUAL&& si->sub_type != BOOK_DESTRUCTION )
for (int xpos = you.x_pos - 8; xpos < you.x_pos + 8; xpos++)for (int ypos = you.y_pos - 8; ypos < you.y_pos + 8; ypos++)
for (radius_iterator ri(you.pos(), LOS_RADIUS, true, true, true); ri; ++ri){// If a grid is blocked, books lying there will be ignored.// Allow bombing of monsters.const unsigned short cloud = env.cgrid(*ri);if (grid_is_solid(grd(*ri))|| cloud != EMPTY_CLOUD && env.cloud[cloud].type != CLOUD_FIRE)
// 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)
int count = 0;int rarity = 0;for ( stack_iterator si(*ri); si; ++si ){if ( si->base_type != OBJ_BOOKS|| si->sub_type == BOOK_MANUAL|| si->sub_type == BOOK_DESTRUCTION )
const int next = mitm[i].link; // in case we can't get it later
mpr("Won't ignite {!D} inscribed book.");continue;}rarity += book_rarity( si->sub_type );// Piety increases by 2 for books never cracked open, else 1.// Conversely, rarity influences the duration of the pyre.if (!item_type_known(*si))totalpiety += 2;elsetotalpiety++;
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;}rarity += book_rarity(mitm[i].sub_type);// Piety increases by 2 for books never cracked open, else 1.// Conversely, rarity influences the duration of the pyre.if (!item_type_known(mitm[i]))totalpiety += 2;elsetotalpiety++;
if (cloud != EMPTY_CLOUD){// Reinforce the cloud.mpr( "The fire roars with new energy!" );const int extra_dur = count + random2(rarity/2);env.cloud[cloud].decay += extra_dur * 5;env.cloud[cloud].whose = KC_YOU;continue;}int durat = 4 + count + random2(rarity/2);
// Reinforce the cloud.mpr( "The fire roars with new energy!" );const int extra_dur = count + random2(rarity/2);env.cloud[cloud].decay += extra_dur * 5;env.cloud[cloud].whose = KC_YOU;continue;}
radius_iterator ri(you.pos(), range);for ( ; ri; ++ri )
for ( radius_iterator ri(you.pos(), range); ri; ++ri )