Attached Files |
stasis-haste.patch [^] (1,877 bytes) 2014-01-31 23:16 [Show Content] [Hide Content]From 7364cbb5f207418d9e4a92561413b443ea32c2fe Mon Sep 17 00:00:00 2001
From: Sage <SageBasilMint@gmail.com>
Date: Fri, 31 Jan 2014 22:04:33 +0000
Subject: [PATCH] Prevent /haste or haste spell from wasting your turn under
stasis.
...Provided you know you are static (Fo or identified amulet of stasis).
Otherwise, the amulet whistles as usual and contaminates you a bit.
---
crawl-ref/source/item_use.cc | 9 +++++++++
crawl-ref/source/spl-cast.cc | 11 +++++++++++
2 files changed, 20 insertions(+)
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 5efcee4..ae513e7 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1899,6 +1899,15 @@ void zap_wand(int slot)
mpr("You cannot teleport right now.");
return;
}
+ else if (wand.sub_type == WAND_HASTING
+ && you.stasis(false))
+ {
+ if (you.species == SP_FORMICID)
+ mpr("You cannot haste.");
+ else
+ mpr("You cannot haste right now.");
+ return;
+ }
else if (wand.sub_type == WAND_INVISIBILITY
&& _dont_use_invis())
{
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 1cd2de5..69efed8 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1254,6 +1254,17 @@ spret_type your_spells(spell_type spell, int powc,
return SPRET_ABORT;
}
+
+ if (spell == SPELL_HASTE
+ && you.stasis(false))
+ {
+ if (you.species == SP_FORMICID)
+ mpr("You cannot haste.");
+ else
+ mpr("You cannot haste right now.");
+
+ return SPRET_ABORT;
+ }
}
// Enhancers only matter for calc_spell_power() and spell_fail().
--
1.7.9.5
|