Attached Files |
evoke_confuse_g9530a8b1e.patch [^] (2,653 bytes) 2013-11-23 05:58 [Show Content] [Hide Content]From e6c4349d3c9cb9d2468cd4c1710af8dd05f836cd Mon Sep 17 00:00:00 2001
From: gammafunk <gammafunk@gmail.com>
Date: Fri, 22 Nov 2013 22:37:51 -0600
Subject: [PATCH] Make player confusion affect all targeted evocables.
All damaging targeted evocables now have target fuzzing when the player is
confused. This commit adds target fuzzing to the lamp of fire, phial of floods,
and the targeted damage cards from the deck of destruction. Also, the warp card
now always does a random blink when the player is confused.
---
crawl-ref/source/decks.cc | 11 +++++++++--
crawl-ref/source/evoke.cc | 8 ++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 0abd576..a190049 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1492,9 +1492,10 @@ static void _warp_card(int power, deck_rarity_type rarity)
}
const int control_level = _get_power_level(power, rarity);
- if (control_level >= 2)
+ if (!you.confused() && control_level >= 2)
blink(1000, false);
- else if (control_level == 1 && allow_control_teleport(true))
+ else if (!you.confused() && control_level == 1
+ && allow_control_teleport(true))
cast_semi_controlled_blink(power / 4, false, false);
else
random_blink(false);
@@ -1760,6 +1761,12 @@ static void _damaging_card(card_type card, int power, deck_rarity_type rarity,
LOS_RADIUS, true, true, false, NULL, prompt.c_str())
&& player_tracer(ZAP_DEBUGGING_RAY, power/6, beam))
{
+ if (you.confused())
+ {
+ target.confusion_fuzz();
+ beam.set_target(target);
+ }
+
if (ztype == ZAP_IOOD)
{
if (power_level == 1)
diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc
index 25f6cbf..fa66b03 100644
--- a/crawl-ref/source/evoke.cc
+++ b/crawl-ref/source/evoke.cc
@@ -1086,6 +1086,9 @@ static bool _lamp_of_fire()
true, true, false, NULL,
"Aim the lamp in which direction?", true, NULL))
{
+ if (you.confused())
+ target.confusion_fuzz();
+
mpr("The flames dance!");
vector<bolt> beams;
@@ -1524,6 +1527,11 @@ static bool _phial_of_floods()
LOS_RADIUS, true, true, false, NULL,
"Aim the phial where?"))
{
+ if (you.confused())
+ {
+ target.confusion_fuzz();
+ beam.set_target(target);
+ }
beam.fire();
vector<coord_def> elementals;
--
1.8.4.1
|