summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 22:35:28 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 22:35:28 +0000
commite9fd95f6c3dccee78f770c32757da8cd0f938011 (patch)
treed8db42feea3b77f5e4d3c46a85bab0d2c13a8201 /crawl-ref/source/fight.cc
parentbf2a59fd761571998062b21409ee678e2852254b (diff)
downloadcrawl-ref-e9fd95f6c3dccee78f770c32757da8cd0f938011.tar.gz
crawl-ref-e9fd95f6c3dccee78f770c32757da8cd0f938011.zip
Add ASSERT(!crawl_state.arena) to a number of places.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8184 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 945fe5efad..fc6afaffa3 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -4854,6 +4854,8 @@ static bool wielded_weapon_check(const item_def *weapon)
// Returns true if you hit the monster.
bool you_attack(int monster_attacked, bool unarmed_attacks)
{
+ ASSERT(!crawl_state.arena);
+
monsters *defender = &menv[monster_attacked];
melee_attack attk(&you, defender, unarmed_attacks);
@@ -4912,6 +4914,8 @@ static void mons_lose_attack_energy(monsters *attacker, int wpn_speed,
// A monster attacking the player.
bool monster_attack(int monster_attacking, bool allow_unarmed)
{
+ ASSERT(!crawl_state.arena);
+
monsters *attacker = &menv[monster_attacking];
// Friendly and good neutral monsters won't attack unless confused.