git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6746 c06c8d41-db1a-0410-9941-cceddc491573
Z7FLGOQODOWQ2FDJRMCNM6MM3FOVORG6BMJZ3AA5HADPNJTYZD2QC SIDH2P7NBIG5KEOE27XHD3ZT2NQ2OJZFN6VZXWNWYFFY5YVXSSVQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC TGJZXTUIAKCFZQJ54ZQEBGFBVZSJCAX6AWDRSH3TP7UJRLGUM5SAC RX6575DZOHRUXQUZH34YZGPZJF4STUPLBQDIVTINA2L6LVCKRIGQC B62ICMDTN5V7R7RBL4JALFVKEMVOOVLRSJASRNYS6CGFWBEEF5JQC T7CUIVICB74342RA32BR37T36FOX4RBSQIB5PNOHTGTGUYGDKSTQC LUNOTEIMYZJ7JL5P55GEHUVSDEZMYX3TWYUB2ABRHAYJEWQSSXIAC QYQKV4R47PTERXVFQNNWWQVICGSOMBHW6WM5TAZAKLIYOLLPUAJAC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC X5WLJCJVW55SXZVP7IKP7ADCJIGNKN4PKAXFECVR6TNK7XSMZR7QC X7XW2G6JZTAZEW3DZOD5ZFKQVQTTFDLQ63WF6N4ODEQLO7TNZA6QC MFONX2CQ4V7HA5NSD6P5NDDBXYDSKIOCYUKRZXJ4ZER2OKJWT2HQC MIMVAKQXKJMHYLKXKY2TJEBL4HCOHKLDQYX6J5H4MWCI442NWEHAC PI5BATR2SER3RFE76IUGHM2AGXVFOUM3PLU7WC2K2Q2BA5K2E73QC if (chance < 45)chance2 = 45;if (chance < 42)chance2 = 43;if (chance < 38)chance2 = 41;if (chance < 35)chance2 = 40;if (chance < 32)chance2 = 38;if (chance < 28)chance2 = 36;if (chance < 22)chance2 = 34;if (chance < 16)chance2 = 32;if (chance < 10)chance2 = 30;if (chance < 2)chance2 = 28;if (chance < -7)chance2 = 26;if (chance < -12)chance2 = 24;if (chance < -18)chance2 = 22;if (chance < -24)chance2 = 20;if (chance < -30)chance2 = 18;if (chance < -38)chance2 = 16;if (chance < -46)chance2 = 14;if (chance < -60)chance2 = 12;if (chance < -80)chance2 = 10;if (chance < -100)chance2 = 8;if (chance < -120)chance2 = 6;if (chance < -140)chance2 = 4;if (chance < -160)chance2 = 2;if (chance < -180)chance2 = 0;
const int chance_breaks[][2] = {{45, 45}, {42, 43}, {38, 41}, {35, 40}, {32, 38}, {28, 36},{22, 34}, {16, 32}, {10, 30}, {2, 28}, {-7, 26}, {-12, 24},{-18, 22}, {-24, 20}, {-30, 18}, {-38, 16}, {-46, 14},{-60, 12}, {-80, 10}, {-100, 8}, {-120, 6}, {-140, 4},{-160, 2}, {-180, 0}};for ( unsigned int i = 0; i < ARRAYSZ(chance_breaks); ++i )if ( chance < chance_breaks[i][0] )chance2 = chance_breaks[i][1];
int adx = 0;int ady = 0;int minx = you.pos().x - 6;int maxx = you.pos().x + 7;int miny = you.pos().y - 6;int maxy = you.pos().y + 7;int xinc = 1;int yinc = 1;if (coinflip()){minx = you.pos().x + 6;maxx = you.pos().x - 7;xinc = -1;}
miny = you.pos().y + 6;maxy = you.pos().y - 7;yinc = -1;}for (adx = minx; adx != maxx; adx += xinc)for (ady = miny; ady != maxy; ady += yinc)
if (see_grid_no_trans(*ri) && !is_sanctuary(*ri)&& env.cgrid(*ri) == EMPTY_CLOUD)
if (env.cgrid(ad) != EMPTY_CLOUD)continue;for ( stack_iterator si(ad); si; ++si )
if (si->base_type == OBJ_CORPSES && si->sub_type == CORPSE_BODY)
if (si->base_type == OBJ_CORPSES&& si->sub_type == CORPSE_BODY){// Found a corpse. Skeletify it if possible.if (!mons_skeleton(si->plus))destroy_item(si->index());elseturn_corpse_into_skeleton(*si);place_cloud(CLOUD_MIASMA, ad,4 + random2avg(16, 3), KC_YOU);// Don't look for more corpses here.break;}
// Found a corpse. Skeletify it if possible.if (!mons_skeleton(si->plus))destroy_item(si->index());elseturn_corpse_into_skeleton(*si);place_cloud(CLOUD_MIASMA, *ri, 4+random2avg(16, 3), KC_YOU);// Don't look for more corpses here.break;