summaryrefslogtreecommitdiff
path: root/src/spells2.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commitf035201f330a3b1f50a2041ea9ad3f854f7d4e00 (patch)
tree7ef58d3a83ec4b50a0fe469a704773e5e1e77606 /src/spells2.cc
parent7f147b21e23662c89bd28479ea67ee7c6a94fc0c (diff)
Move all options to a struct instead of using globals
Diffstat (limited to 'src/spells2.cc')
-rw-r--r--src/spells2.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/spells2.cc b/src/spells2.cc
index 5fd21698..bfd513e6 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -3938,7 +3938,7 @@ bool_ genocide_aux(bool_ player_cast, char typ)
{
int i;
bool_ result = FALSE;
- int msec = delay_factor * delay_factor * delay_factor;
+ auto const msec = options->delay_factor_ms();
int dam = 0;
/* Delete the monsters of that "type" */
@@ -4055,13 +4055,11 @@ bool_ mass_genocide(bool_ player_cast)
{
int i;
bool_ result = FALSE;
- int msec = delay_factor * delay_factor * delay_factor;
+ auto const msec = options->delay_factor_ms();
int dam = 0;
- if (dungeon_flags & DF_NO_GENO) return (FALSE);
-
- /* Hack -- when you are fated to die, you cant cheat :) */
- if (dungeon_type == DUNGEON_DEATH)
+ /* Prevented? */
+ if ((dungeon_flags & DF_NO_GENO) || (dungeon_type == DUNGEON_DEATH))
{
msg_print("A mysterious force stops the genocide.");
return FALSE;