diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-23 10:19:28 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-23 10:19:28 +0000 |
commit | 31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3 (patch) | |
tree | 3b981f5efc06e3a5e46cf9b1a395f7e35f2ddd9a /crawl-ref/source/beam.cc | |
parent | 00af6cae236018eae3c659ae02cd8c017549bd15 (diff) | |
download | crawl-ref-31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3.tar.gz crawl-ref-31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3.zip |
Cleaned up a lot of code which was using info[] to use mprf() directly
instead.
Fixed a bug with affix_weapon_enchantment messaging (mea culpa.)
Fixed shatter() messages getting surpressed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1347 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 38dbf92dac..188307de76 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -200,8 +200,7 @@ void zapping(char ztype, int power, struct bolt &pbolt) { #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, "zapping: power=%d", power ); - mpr( info, MSGCH_DIAGNOSTICS ); + mprf(MSGCH_DIAGNOSTICS, "zapping: power=%d", power ); #endif // GDL: note that rangeMax is set to 0, which means that max range is @@ -3242,10 +3241,8 @@ static int affect_player( struct bolt &beam ) } #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, "Player damage: rolled=%d; after AC=%d", - roll, hurted ); - - mpr( info, MSGCH_DIAGNOSTICS ); + mprf(MSGCH_DIAGNOSTICS, + "Player damage: rolled=%d; after AC=%d", roll, hurted ); #endif if (you.equip[EQ_BODY_ARMOUR] != -1) @@ -3321,8 +3318,7 @@ static int affect_player( struct bolt &beam ) expose_player_to_element(BEAM_SPORE, burn_power); #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, "Damage: %d", hurted ); - mpr( info, MSGCH_DIAGNOSTICS ); + mprf(MSGCH_DIAGNOSTICS, "Damage: %d", hurted ); #endif beam_ouch( hurted, beam ); @@ -3757,10 +3753,8 @@ static int affect_monster_enchantment(struct bolt &beam, struct monsters *mon) && mons_holiness(mon) == MH_UNDEAD) { #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, "HD: %d; pow: %d", - mon->hit_dice, beam.ench_power ); - - mpr( info, MSGCH_DIAGNOSTICS ); + mprf(MSGCH_DIAGNOSTICS, + "HD: %d; pow: %d", mon->hit_dice, beam.ench_power ); #endif if (check_mons_resist_magic( mon, beam.ench_power )) @@ -3778,10 +3772,8 @@ static int affect_monster_enchantment(struct bolt &beam, struct monsters *mon) && mons_holiness(mon) == MH_DEMONIC) { #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, "HD: %d; pow: %d", - mon->hit_dice, beam.ench_power ); - - mpr( info, MSGCH_DIAGNOSTICS ); + mprf(MSGCH_DIAGNOSTICS, + "HD: %d; pow: %d", mon->hit_dice, beam.ench_power ); #endif if (mon->hit_dice * 7 >= random2(beam.ench_power) @@ -4103,13 +4095,11 @@ void explosion( struct bolt &beam, bool hole_in_the_middle ) beam.in_explosion_phase = true; #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, - "explosion at (%d, %d) : t=%d c=%d f=%d hit=%d dam=%dd%d", - beam.target_x, beam.target_y, - beam.type, beam.colour, beam.flavour, - beam.hit, beam.damage.num, beam.damage.size ); - - mpr( info, MSGCH_DIAGNOSTICS ); + mprf(MSGCH_DIAGNOSTICS, + "explosion at (%d, %d) : t=%d c=%d f=%d hit=%d dam=%dd%d", + beam.target_x, beam.target_y, + beam.type, beam.colour, beam.flavour, + beam.hit, beam.damage.num, beam.damage.size ); #endif // for now, we don't support explosions greater than 9 radius |