summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2010-01-12 09:15:39 +0100
committerBardur Arantsson <bardur@scientician.net>2010-01-12 09:15:39 +0100
commit1fd2d77a2e7c7faf13f8c226f43d07292737f215 (patch)
tree91c2a29acd553f664ca69b9d2b3fdde0bc94e7dc /src
parentbe3a6e4cab9e0458ac2bb16c9521269a14fa7e3f (diff)
Import Killerbunnies patch: Trying to activate Piercing Shots now displays a message if the player is too low-level.
Changed from the original patch: Moved logic for the check instead of just duplicating it.
Diffstat (limited to 'src')
-rw-r--r--src/cmd2.c4
-rw-r--r--src/cmd7.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/src/cmd2.c b/src/cmd2.c
index c962926e..532245d6 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -3289,9 +3289,7 @@ void do_cmd_fire(void)
energy_use = (100 / thits);
/* piercing shots ? */
- if (p_ptr->use_piercing_shots &&
- ((get_skill(SKILL_BOW) > 25) || (get_skill(SKILL_XBOW) > 25) ||
- (get_skill(SKILL_SLING) > 25)))
+ if (p_ptr->use_piercing_shots)
{
num_pierce = (get_skill(SKILL_COMBAT) / 10) - 1;
num_pierce = (num_pierce < 0) ? 0 : num_pierce;
diff --git a/src/cmd7.c b/src/cmd7.c
index a6ae232f..71f0c759 100644
--- a/src/cmd7.c
+++ b/src/cmd7.c
@@ -5447,6 +5447,13 @@ void do_cmd_set_piercing(void)
char ch;
char com[80];
+ if ((get_skill(SKILL_BOW) <= 25) && (get_skill(SKILL_XBOW) <= 25) &&
+ (get_skill(SKILL_SLING) <= 25))
+ {
+ msg_print("You can't fire piercing shots yet.");
+ return;
+ }
+
strnfmt(com, 80, "Allow shots to pierce? ");
while (TRUE)
@@ -5459,11 +5466,13 @@ void do_cmd_set_piercing(void)
if ((ch == 'Y') || (ch == 'y'))
{
p_ptr->use_piercing_shots = 1;
+ msg_print("Piercing shots activated.");
break;
}
if ((ch == 'N') || (ch == 'n'))
{
p_ptr->use_piercing_shots = 0;
+ msg_print("Piercing shots deactivated.");
break;
}
}