summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-08 21:52:14 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-08 21:52:14 +0000
commit4bfca1ba104c7d445c644543a81fea9614cc2ad1 (patch)
treea14f40269038eb94b73ceced312e8e1698a734d4 /crawl-ref/source/spells1.cc
parentc61e0f454a342b46ef5c893e27aa41c0ca103751 (diff)
downloadcrawl-ref-4bfca1ba104c7d445c644543a81fea9614cc2ad1.tar.gz
crawl-ref-4bfca1ba104c7d445c644543a81fea9614cc2ad1.zip
Really fix the fallthrough bugs in Zin's Revitalisation.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4935 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc51
1 files changed, 24 insertions, 27 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 362df2d17b..389f165ad0 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -831,12 +831,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 1;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
// Remove poisoning.
case 1:
if (you.duration[DUR_POISONING])
@@ -846,12 +846,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 2;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
// Remove sickness.
case 2:
if (you.disease)
@@ -861,12 +861,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 3;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
// Remove rotting.
case 3:
if (you.rotting)
@@ -876,12 +876,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 4;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
// Restore rotted HP.
case 4:
if (player_rotted())
@@ -891,12 +891,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 5;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
// Restore more rotted HP.
case 5:
if (player_rotted())
@@ -906,9 +906,6 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 6;
// Deliberate fall through.
@@ -966,12 +963,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 1;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
case 1:
if (you.strength < you.max_strength || you.intel < you.max_intel
|| you.dex < you.max_dex)
@@ -983,12 +980,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 2;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
case 2:
if (you.strength < you.max_strength || you.intel < you.max_intel
|| you.dex < you.max_dex)
@@ -1000,12 +997,12 @@ int cast_revitalisation(int pow)
break;
}
- if (step == step_max)
- break;
-
step = 3;
// Deliberate fall through.
+ if (step == step_max)
+ break;
+
// XXX: Temporary stat boosting is not implemented yet.
default:
break;