summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-19 20:51:51 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-19 20:51:51 +0000
commit5e05ffc14e57fff49b1f8a9700fa3623b4f1f343 (patch)
tree2cb6bb13f8b3c7b0af877542b1325ee7e3d1bc6e /crawl-ref/source/fight.cc
parent3ecc52d48d75321c18bd0969f461f26e253c6537 (diff)
downloadcrawl-ref-5e05ffc14e57fff49b1f8a9700fa3623b4f1f343.tar.gz
crawl-ref-5e05ffc14e57fff49b1f8a9700fa3623b4f1f343.zip
monam(), moname() and ptr_monam() are gone.
The replacement is str_monam() and mons_type_name(). str_monam() should probably be folded into actor::name. I think. Deaths from zombies, skeletons and simulacra will not handle the name correctly; needs a further hack. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1484 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc31
1 files changed, 14 insertions, 17 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index d3ec6e3725..79f1946632 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -849,12 +849,11 @@ void melee_attack::player_announce_hit()
if (!verb_degree.empty() && verb_degree[0] != ' ')
verb_degree = " " + verb_degree;
- mprf("You %s %s%s%s%s",
- attack_verb.c_str(),
- ptr_monam(def, DESC_NOCAP_THE),
- verb_degree.c_str(),
- debug_damage_number().c_str(),
- attack_strength_punctuation().c_str());
+ msg::stream << "You " << attack_verb << ' '
+ << str_monam(*def, DESC_NOCAP_THE)
+ << verb_degree << debug_damage_number()
+ << attack_strength_punctuation()
+ << std::endl;
}
std::string melee_attack::player_why_missed()
@@ -873,9 +872,8 @@ void melee_attack::player_warn_miss()
if (def->behaviour != BEH_SLEEP)
behaviour_event( def, ME_WHACK, MHITYOU );
- mprf("%s%s.",
- player_why_missed().c_str(),
- ptr_monam(def, DESC_NOCAP_THE));
+ msg::stream << player_why_missed() << str_monam(*def, DESC_NOCAP_THE)
+ << std::endl;
}
bool melee_attack::player_hits_monster()
@@ -1999,9 +1997,8 @@ bool melee_attack::player_check_monster_died()
player_monattk_hit_effects(true);
if (def->type == MONS_GIANT_SPORE || def->type == MONS_BALL_LIGHTNING)
- mprf("You %s %s.", attack_verb.c_str(),
- ptr_monam(def, DESC_NOCAP_THE));
-
+ msg::stream << "You " << attack_verb << ' '
+ << str_monam(*def, DESC_NOCAP_THE) << '.' << std::endl;
monster_die(def, KILL_YOU, 0);
return (true);
@@ -3378,29 +3375,29 @@ static void stab_message( struct monsters *defender, int stab_bonus )
if (r<3)
{
mprf( "You strike %s from a blind spot!",
- ptr_monam(defender, DESC_NOCAP_THE) );
+ str_monam(*defender, DESC_NOCAP_THE).c_str() );
}
else
{
mprf( "You catch %s momentarily off-guard.",
- ptr_monam(defender, DESC_NOCAP_THE) );
+ str_monam(*defender, DESC_NOCAP_THE).c_str() );
}
break;
case 2: // confused/fleeing
if (r<4)
{
mprf( "You catch %s completely off-guard!",
- ptr_monam(defender, DESC_NOCAP_THE) );
+ str_monam(*defender, DESC_NOCAP_THE).c_str() );
}
else
{
mprf( "You strike %s from behind!",
- ptr_monam(defender, DESC_NOCAP_THE) );
+ str_monam(*defender, DESC_NOCAP_THE).c_str() );
}
break;
case 1:
mprf( "%s fails to defend %s.",
- ptr_monam(defender, DESC_CAP_THE),
+ str_monam(*defender, DESC_CAP_THE).c_str(),
mons_pronoun( defender->type, PRONOUN_REFLEXIVE ) );
break;
} // end switch