summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-13 08:04:42 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-13 08:04:42 +0000
commitcab797009b47f77520b8db9f8b427ba9ea14f63c (patch)
tree3257807bf2686cfb1a5f2f9d9f66040eb2df6ef4 /crawl-ref/source/fight.cc
parent659553d325a49df4870dcfa18af7f9bece5cbf16 (diff)
downloadcrawl-ref-cab797009b47f77520b8db9f8b427ba9ea14f63c.tar.gz
crawl-ref-cab797009b47f77520b8db9f8b427ba9ea14f63c.zip
* Allow panlords to have the chaos-branded weapons.
* update stash tracker after Xom's teleportation journey. * A few tweaks to Xom debug noting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9599 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc29
1 files changed, 18 insertions, 11 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index d92bc31dfe..f673ba2435 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -62,7 +62,11 @@ REVISION("$Rev$");
#include "view.h"
#include "xom.h"
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_BRAND
+ #define NOTE_DEBUG_CHAOS_EFFECTS
+#endif
+
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
#include "notes.h"
#endif
@@ -1263,8 +1267,8 @@ bool melee_attack::player_aux_unarmed()
else
{
mprf("Your %s misses %s.",
- miss_verb.empty()? unarmed_attack.c_str()
- : miss_verb.c_str(),
+ miss_verb.empty() ? unarmed_attack.c_str()
+ : miss_verb.c_str(),
defender->name(DESC_NOCAP_THE).c_str());
}
@@ -2343,7 +2347,7 @@ void melee_attack::chaos_affects_defender()
beam.flavour = BEAM_NONE;
int choice = choose_random_weighted(probs, probs + NUM_CHAOS_TYPES);
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
std::string chaos_effect = "CHAOS effect: ";
switch (choice)
{
@@ -2569,7 +2573,7 @@ void melee_attack::chaos_affects_attacker()
// Move stairs out from under the attacker.
if (one_chance_in(100) && _move_stairs(attacker, defender))
{
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
take_note(Note(NOTE_MESSAGE, 0, 0,
"CHAOS affects attacker: move stairs"), true);
#endif
@@ -2583,7 +2587,7 @@ void melee_attack::chaos_affects_attacker()
&& one_chance_in(1000))
{
(void) attacker->do_shaft();
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
take_note(Note(NOTE_MESSAGE, 0, 0,
"CHAOS affects attacker: shaft effect"), true);
#endif
@@ -2596,7 +2600,7 @@ void melee_attack::chaos_affects_attacker()
mprf("Smoke pours forth from %s!", wep_name(DESC_NOCAP_YOUR).c_str());
big_cloud(random_smoke_type(), KC_OTHER, attacker->pos(), 20,
4 + random2(8));
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
take_note(Note(NOTE_MESSAGE, 0, 0,
"CHAOS affects attacker: smoke"), true);
#endif
@@ -2629,7 +2633,7 @@ void melee_attack::chaos_affects_attacker()
{
mpr(msg.c_str(), MSGCH_SOUND);
noisy(15, attacker->pos());
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
take_note(Note(NOTE_MESSAGE, 0, 0,
"CHAOS affects attacker: noise"), true);
#endif
@@ -2798,7 +2802,7 @@ void melee_attack::chaos_killed_defender(monsters* mon)
&& _make_zombie(mon, corpse_class, corpse_index, fake_corpse,
last_item))
{
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_EFFECTS
take_note(Note(NOTE_MESSAGE, 0, 0,
"CHAOS killed defender: zombified monster"), true);
#endif
@@ -2943,7 +2947,7 @@ int melee_attack::random_chaos_brand()
if (susceptible)
break;
}
-#ifdef DEBUG_CHAOS
+#ifdef NOTE_DEBUG_CHAOS_BRAND
std::string brand_name = "CHAOS brand: ";
switch (brand)
{
@@ -2967,7 +2971,10 @@ int melee_attack::random_chaos_brand()
default: brand_name += "(other)"; break;
}
- take_note(Note(NOTE_MESSAGE, 0, 0, brand_name.c_str()), true);
+ // Pretty much duplicated by the chaos effect note,
+ // which will be much more informative.
+ if (brand != SPWPN_CHAOS)
+ take_note(Note(NOTE_MESSAGE, 0, 0, brand_name.c_str()), true);
#endif
return (brand);
}