diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-06 00:26:25 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-06 00:26:25 -0800 |
commit | caef806e73b82bef9136b09f672b60d36b7f6ca0 (patch) | |
tree | f68ab9a8a36378517288c2e585419d00ca03997e /crawl-ref/source/arena.cc | |
parent | 657c92b43571bd0d7be48cbc8893ee3eb6bc056c (diff) | |
download | crawl-ref-caef806e73b82bef9136b09f672b60d36b7f6ca0.tar.gz crawl-ref-caef806e73b82bef9136b09f672b60d36b7f6ca0.zip |
arena.cc: different msgs for respawns and summons
Say "A monster respawns!" or "A monster is summoned!" instead of "A
monster enters the arena!" for respawns and (non-real) summons.
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r-- | crawl-ref/source/arena.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc index d6ae03e1ef..91ee452b32 100644 --- a/crawl-ref/source/arena.cc +++ b/crawl-ref/source/arena.cc @@ -78,6 +78,8 @@ namespace arena bool contest_canceled = false; + bool is_respawning = false; + int trials_done = 0; int team_a_wins = 0; int ties = 0; @@ -768,6 +770,7 @@ namespace arena void do_respawn(faction &fac) { + is_respawning = true; for (unsigned int _i = fac.respawn_list.size(); _i > 0; _i--) { unsigned int i = _i - 1; @@ -832,6 +835,7 @@ namespace arena // space will open up later. } } + is_respawning = false; } void do_fight() @@ -1178,8 +1182,14 @@ void arena_placed_monster(monsters *monster) arena::b_spawners.push_back(monster->mindex()); } + const bool summoned = monster->is_summoned(); + #ifdef DEBUG_DIAGNOSTICS - mprf("%s enters the arena!", monster->full_name(DESC_CAP_A, true).c_str()); + mprf("%s %s!", + monster->full_name(DESC_CAP_A, true).c_str(), + arena::is_respawning ? "respawns" : + (summoned && ! arena::real_summons) ? "is summoned" + : "enters the arena"); #endif for (int i = 0; i < NUM_MONSTER_SLOTS; i++) @@ -1205,7 +1215,7 @@ void arena_placed_monster(monsters *monster) if (arena::name_monsters && !monster->is_named()) monster->mname = make_name(random_int(), false); - if (monster->is_summoned()) + if (summoned) { // Real summons drop corpses and items. if (arena::real_summons) |