From 1fd2d77a2e7c7faf13f8c226f43d07292737f215 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 12 Jan 2010 09:15:39 +0100 Subject: 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. --- src/cmd2.c | 4 +--- src/cmd7.c | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3