Attached Files |
0001-Don-t-display-action-cancelled-message-if-a-reaching.patch [^] (890 bytes) 2012-09-13 11:38 [Show Content] [Hide Content]From df21fc67a733dcda233e50c46c66108ac0eeadc5 Mon Sep 17 00:00:00 2001
From: Danny Spencer <daniel.patrick.spencer@gmail.com>
Date: Thu, 13 Sep 2012 02:32:22 -0700
Subject: [PATCH] Don't display action cancelled message if a reaching attack
was blocked by fumbling.
---
crawl-ref/source/evoke.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc
index d6eeb44..89cb2da 100644
--- a/crawl-ref/source/evoke.cc
+++ b/crawl-ref/source/evoke.cc
@@ -197,7 +197,9 @@ static bool _reaching_weapon_attack(const item_def& wpn)
{
if (!fight_melee(&you, mons))
{
- canned_msg(MSG_OK);
+ // Only display a message if the player cancelled an action
+ if (!you.turn_is_over)
+ canned_msg(MSG_OK);
return false;
}
}
--
1.7.11.5
0001-Fumbling-a-melee-attack-with-a-weapon-of-reaching-co.patch [^] (1,748 bytes) 2013-04-04 22:41 [Show Content] [Hide Content]From b6ec21691fd44c7a771509ef0af36ef9224d38bc Mon Sep 17 00:00:00 2001
From: Policarpo Caballero <policarpocp@gmail.com>
Date: Thu, 4 Apr 2013 21:40:46 +0200
Subject: [PATCH] Fumbling a melee attack with a weapon of reaching costs a
turn.
---
crawl-ref/source/evoke.cc | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc
index 0fb3f01..a85be5e 100644
--- a/crawl-ref/source/evoke.cc
+++ b/crawl-ref/source/evoke.cc
@@ -200,19 +200,24 @@ static bool _reaching_weapon_attack(const item_def& wpn)
mpr("You attack empty space.");
return true;
}
- else if (!fight_melee(&you, mons))
+ else
{
- if (targ_mid)
- {
- // turn_is_over may have been reset to false by fight_melee, but
- // a failed attempt to reach further should not be free; instead,
- // charge the same as a successful attempt.
- you.turn_is_over = true;
- }
- else
+ you.turn_is_over = true;
+ if (!fight_melee(&you, mons))
{
- canned_msg(MSG_OK);
- return false;
+ if (targ_mid)
+ {
+ // turn_is_over may have been reset to false by fight_melee, but
+ // a failed attempt to reach further should not be free; instead,
+ // charge the same as a successful attempt.
+ you.turn_is_over = true;
+ }
+ else
+ {
+ // FIXME: Skip this message for attacks that were not cancelled (fumbling)
+ canned_msg(MSG_OK);
+ return false;
+ }
}
}
--
1.8.2
reach.patch [^] (1,756 bytes) 2013-04-04 22:49 [Show Content] [Hide Content]From 06a3ef9ed15ca4ce750bd770f12c17614db78ad2 Mon Sep 17 00:00:00 2001
From: Policarpo Caballero <policarpocp@gmail.com>
Date: Thu, 4 Apr 2013 21:50:47 +0200
Subject: [PATCH] Fumbling a melee attack with a weapon of reaching costs a
turn.
---
crawl-ref/source/evoke.cc | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc
index 0fb3f01..860f853 100644
--- a/crawl-ref/source/evoke.cc
+++ b/crawl-ref/source/evoke.cc
@@ -200,19 +200,24 @@ static bool _reaching_weapon_attack(const item_def& wpn)
mpr("You attack empty space.");
return true;
}
- else if (!fight_melee(&you, mons))
+ else
{
- if (targ_mid)
- {
- // turn_is_over may have been reset to false by fight_melee, but
- // a failed attempt to reach further should not be free; instead,
- // charge the same as a successful attempt.
- you.turn_is_over = true;
- }
- else
+ you.turn_is_over = true;
+ if (!fight_melee(&you, mons))
{
- canned_msg(MSG_OK);
- return false;
+ if (targ_mid)
+ {
+ // turn_is_over may have been reset to false by fight_melee, but
+ // a failed attempt to reach further should not be free; instead,
+ // charge the same as a successful attempt.
+ you.turn_is_over = true;
+ }
+ else if (!you.turn_is_over)
+ {
+ // Only display a message if the player cancelled an action
+ canned_msg(MSG_OK);
+ return false;
+ }
}
}
--
1.8.2
|