summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-06 04:33:03 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-06 04:33:03 +0000
commit9443fbbfd47e2e51e606258aac12584f244f3476 (patch)
treeb87aee484c0a7c5054eaec30ade9f49065269cf4 /crawl-ref
parent013fcc5c5517025e5a4c2544230fa185c3a5eb89 (diff)
downloadcrawl-ref-9443fbbfd47e2e51e606258aac12584f244f3476.tar.gz
crawl-ref-9443fbbfd47e2e51e606258aac12584f244f3476.zip
Don't use the random_uselessness() miscast effect during arena mode.
If a melee miscast kills the attacker don't let it get any more hits in. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8261 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/fight.cc4
-rw-r--r--crawl-ref/source/spl-cast.cc4
2 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index fb6ea3a03d..c2b93ebb82 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -4725,6 +4725,10 @@ void melee_attack::mons_perform_attack_rounds()
if (miscast_target == attacker)
do_miscast();
+
+ // Miscast might haved killed the attacker.
+ if (!attacker->alive())
+ break;
}
item_def *weap = atk->mslot_item(MSLOT_WEAPON);
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index eccf5fe505..917e9a7b40 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -3147,7 +3147,7 @@ void MiscastEffect::_enchantment(int severity)
break;
case 1: // slightly annoying
- switch (random2(2))
+ switch (random2(crawl_state.arena ? 1 : 2))
{
case 0:
_potion_effect(POT_LEVITATION, 20);
@@ -4001,7 +4001,7 @@ void MiscastEffect::_transmigration(int severity)
break;
case 1: // slightly annoying
- switch (random2(2))
+ switch (random2(crawl_state.arena ? 1 : 2))
{
case 0:
you_msg = "Your body is twisted painfully.";