diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 20:48:29 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 20:48:29 +0000 |
commit | 28595dfdcc32c09e67c728eb3cba0af9acab38fe (patch) | |
tree | 5d3b5afb89c605408fcd26899a01d46224bea7e4 /crawl-ref/source/spells2.cc | |
parent | cc51da7ff0cb08088672b6ee566671a08b2105d9 (diff) | |
download | crawl-ref-28595dfdcc32c09e67c728eb3cba0af9acab38fe.tar.gz crawl-ref-28595dfdcc32c09e67c728eb3cba0af9acab38fe.zip |
Clean up "Twisted Resurrection" some more.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5610 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 3fb26d3153..72ea70af2f 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -653,109 +653,6 @@ static int raise_corpse( int corps, int corx, int cory, return returnVal; } // end raise_corpse() -void cast_twisted_resurrection(int pow, bool god_gift) -{ - if (igrd[you.x_pos][you.y_pos] == NON_ITEM) - { - mpr("There's nothing here!"); - return; - } - - int objl = igrd[you.x_pos][you.y_pos]; - int next; - - int total_mass = 0; - int num_corpses = 0; - int rotted = 0; - - while (objl != NON_ITEM) - { - next = mitm[objl].link; - - if (mitm[objl].base_type == OBJ_CORPSES - && mitm[objl].sub_type == CORPSE_BODY) - { - total_mass += mons_weight(mitm[objl].plus); - - num_corpses++; - - if (food_is_rotten(mitm[objl])) - rotted++; - - destroy_item(objl); - } - - objl = next; - } - -#if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Mass for abomination: %d", total_mass); -#endif - - // This is what the old statement pretty much boils down to, - // the average will be approximately 10 * pow (or about 1000 - // at the practical maximum). That's the same as the mass - // of a hippogriff, a spiny frog, or a steam dragon. Thus, - // material components are far more important to this spell. -- bwr - total_mass += roll_dice(20, pow); - -#if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Mass including power bonus: %d", total_mass); -#endif - - if (total_mass < 400 + roll_dice(2, 500) - || num_corpses < (coinflip() ? 3 : 2)) - { - mpr("The spell fails."); - - mprf("The corpse%s collapse%s into a pulpy mess.", - num_corpses > 1 ? "s": "", num_corpses > 1 ? "": "s"); - return; - } - - monster_type mon = - (total_mass > 500 + roll_dice(3, 1000)) ? MONS_ABOMINATION_LARGE - : MONS_ABOMINATION_SMALL; - - char colour = (rotted == num_corpses) ? BROWN : - (rotted >= random2(num_corpses)) ? RED - : LIGHTRED; - - int monster = create_monster( - mgen_data(mon, BEH_FRIENDLY, 0, - you.pos(), you.pet_target, - god_gift ? MF_GOD_GIFT : 0, - MONS_PROGRAM_BUG, 0, colour)); - - if (monster == -1) - { - mpr("The corpses collapse into a pulpy mess."); - return; - } - - // This was probably intended, but it's really boring. (jpeg) - // Use menv[mon].number instead (set in create_monster()). -// menv[mon].colour = colour; - mpr("The heap of corpses melds into an agglomeration of writhing flesh!"); - - if (mon == MONS_ABOMINATION_LARGE) - { - menv[monster].hit_dice = 8 + total_mass / ((colour == LIGHTRED) ? 500 : - (colour == RED) ? 1000 - : 2500); - - if (menv[monster].hit_dice > 30) - menv[monster].hit_dice = 30; - - // XXX: No convenient way to get the hit dice size right now. - menv[monster].hit_points = hit_points(menv[monster].hit_dice, 2, 5); - menv[monster].max_hit_points = menv[monster].hit_points; - - if (colour == LIGHTRED) - menv[monster].ac += total_mass / 1000; - } -} - bool brand_weapon(brand_type which_brand, int power) { int temp_rand; // probability determination {dlb} |