summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-01 21:47:10 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-01 21:47:10 +0000
commit83ca5514f458bd3309aaa0fe42741aebb6dd2cab (patch)
tree4880ec30e2ecc0c8b3c87de65bf9b4a2789579b8 /crawl-ref/source
parentca398a84ec096c87596397c75e4eb923d3410611 (diff)
downloadcrawl-ref-83ca5514f458bd3309aaa0fe42741aebb6dd2cab.tar.gz
crawl-ref-83ca5514f458bd3309aaa0fe42741aebb6dd2cab.zip
Add still more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8088 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/delay.cc35
-rw-r--r--crawl-ref/source/effects.cc10
-rw-r--r--crawl-ref/source/misc.cc13
3 files changed, 29 insertions, 29 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 3d4cda5f72..dca5a3c009 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -464,19 +464,20 @@ void stop_delay( bool stop_stair_travel )
item_def &corpse = (delay.parm1 ? you.inv[delay.parm2]
: mitm[delay.parm2]);
- if (!mons_skeleton( corpse.plus ))
- {
- if (delay.parm1)
- dec_inv_item_quantity( delay.parm2, 1 );
- else
- dec_mitm_item_quantity( delay.parm2, 1 );
- }
- else
+ if (mons_skeleton(corpse.plus))
{
mpr("All blood oozes out of the corpse!");
bleed_onto_floor(you.pos(), corpse.plus, delay.duration, false);
turn_corpse_into_skeleton(corpse, 90);
}
+ else
+ {
+ if (delay.parm1)
+ dec_inv_item_quantity(delay.parm2, 1);
+ else
+ dec_mitm_item_quantity(delay.parm2, 1);
+ }
+
did_god_conduct(DID_DRINK_BLOOD, 8);
delay.duration = 0;
_pop_delay();
@@ -1064,7 +1065,7 @@ static void _finish_delay(const delay_queue_item &delay)
}
}
- unwear_armour( delay.parm1 );
+ unwear_armour(delay.parm1);
you.redraw_armour_class = true;
you.redraw_evasion = true;
@@ -1087,17 +1088,18 @@ static void _finish_delay(const delay_queue_item &delay)
item_def &corpse = (delay.parm1 ? you.inv[delay.parm2]
: mitm[delay.parm2]);
+
vampire_nutrition_per_turn(corpse, 1);
- if (!mons_skeleton( corpse.plus ) || one_chance_in(4))
+ if (mons_skeleton(corpse.plus) && one_chance_in(4))
+ turn_corpse_into_skeleton(corpse, 90);
+ else
{
if (delay.parm1)
- dec_inv_item_quantity( delay.parm2, 1 );
+ dec_inv_item_quantity(delay.parm2, 1);
else
- dec_mitm_item_quantity( delay.parm2, 1 );
+ dec_mitm_item_quantity(delay.parm2, 1);
}
- else
- turn_corpse_into_skeleton(corpse, 90);
break;
}
case DELAY_MEMORISE:
@@ -1173,7 +1175,7 @@ static void _finish_delay(const delay_queue_item &delay)
if (delay.type == DELAY_BOTTLE_BLOOD)
{
mpr("You finish bottling this corpse's blood.");
- turn_corpse_into_blood_potions( mitm[ delay.parm1 ] );
+ turn_corpse_into_blood_potions(mitm[delay.parm1]);
}
else
{
@@ -1205,7 +1207,8 @@ static void _finish_delay(const delay_queue_item &delay)
{
mpr("What a waste.");
}
- turn_corpse_into_chunks( mitm[ delay.parm1 ] );
+
+ turn_corpse_into_chunks(mitm[delay.parm1]);
if (you.duration[DUR_BERSERKER]
&& you.berserk_penalty != NO_BERSERK_PENALTY)
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index c07a8bec86..8607e4fa55 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -3585,7 +3585,7 @@ void update_corpses(double elapsedTime)
const long rot_time = static_cast<long>(elapsedTime / 20.0);
- for (int c = 0; c < MAX_ITEMS; c++)
+ for (int c = 0; c < MAX_ITEMS; ++c)
{
item_def &it = mitm[c];
@@ -3601,13 +3601,11 @@ void update_corpses(double elapsedTime)
if (rot_time >= it.special && !is_being_butchered(it))
{
if (it.base_type == OBJ_FOOD)
- {
destroy_item(c);
- }
else
{
if (it.sub_type == CORPSE_SKELETON
- || !mons_skeleton( it.plus ))
+ || !mons_skeleton(it.plus))
{
destroy_item(c);
}
@@ -3616,16 +3614,14 @@ void update_corpses(double elapsedTime)
}
}
else
- {
it.special -= rot_time;
- }
}
int fountain_checks = static_cast<int>(elapsedTime / 1000.0);
if (x_chance_in_y(static_cast<int>(elapsedTime) % 1000, 1000))
fountain_checks += 1;
- // dry fountains may start flowing again
+ // Dry fountains may start flowing again.
if (fountain_checks > 0)
{
for (rectangle_iterator ri(1); ri; ++ri)
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index f9f415e7c4..8442ad9c2b 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -132,19 +132,20 @@ static void _create_monster_hide(int mons_class)
move_item_to_grid(&o, you.pos());
}
-// Vampire draining corpses currently leaves them a time of 90, while the
-// default time is 200. I'm not sure whether this is for balancing reasons
-// or just an arbitrary difference. (jpeg)
+// Vampire draining corpses currently leaves them a time of 90, while
+// the default time is 200. I'm not sure whether this is for balancing
+// reasons or just an arbitrary difference. (jpeg)
void turn_corpse_into_skeleton(item_def &item, int time)
{
ASSERT(item.base_type == OBJ_CORPSES && item.sub_type == CORPSE_BODY);
- // Some monsters' corpses lack the structure to leave skeletons behind.
+ // Some monsters' corpses lack the structure to leave skeletons
+ // behind.
if (!mons_skeleton(item.plus))
return;
- // While it is possible to distinguish draconian corpses by colour, their
- // skeletons are indistinguishable.
+ // While it is possible to distinguish draconian corpses by colour,
+ // their skeletons are indistinguishable.
if (mons_genus(item.plus) == MONS_DRACONIAN && item.plus != MONS_DRACONIAN)
item.plus = MONS_DRACONIAN;
// The same goes for rat corpses.