From: <gi...@cr...> - 2012-06-28 00:12:09
|
via e4d1e0a573215917183eba0e81a2d743d997f07b (commit) via a7102461fab3b99b9bbb2ba55cf6135bad8f310d (commit) from 0c8e6fc58f795c23f28994764781d757048206de (commit) ----------------------------------------------------------------------- commit e4d1e0a573215917183eba0e81a2d743d997f07b Author: Adam Borowski <kil...@an...> Date: Thu Jun 28 02:11:15 2012 +0200 Fix all weapons having reaching. commit a7102461fab3b99b9bbb2ba55cf6135bad8f310d Author: Adam Borowski <kil...@an...> Date: Thu Jun 28 02:04:05 2012 +0200 Fix tutorial end not working. ----------------------------------------------------------------------- Summary of changes: .../source/dat/des/tutorial/tutorial_lesson5.des | 4 ++-- crawl-ref/source/evoke.cc | 6 +++--- crawl-ref/source/invent.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crawl-ref/source/dat/des/tutorial/tutorial_lesson5.des b/crawl-ref/source/dat/des/tutorial/tutorial_lesson5.des index 6c8abbe..0651aa1 100644 --- a/crawl-ref/source/dat/des/tutorial/tutorial_lesson5.des +++ b/crawl-ref/source/dat/des/tutorial/tutorial_lesson5.des @@ -12,12 +12,12 @@ function tutorial5.msg(text) end function tutorial5.exit() - return tutorial5.msg("exit") + crawl.tutorial_msg("tutorial5 exit", true) end function tutorial5.win() crawl.mark_game_won() - return tutorial5.msg("exit") + tutorial5.exit() end }} diff --git a/crawl-ref/source/evoke.cc b/crawl-ref/source/evoke.cc index ada01b3..f2263ba 100644 --- a/crawl-ref/source/evoke.cc +++ b/crawl-ref/source/evoke.cc @@ -660,7 +660,7 @@ bool evoke_item(int slot) if (you.berserk() && (slot == -1 || slot != you.equip[EQ_WEAPON] - || !weapon_reach(*you.weapon()))) + || weapon_reach(*you.weapon()) <= 2)) { canned_msg(MSG_TOO_BERSERK); return (false); @@ -690,7 +690,7 @@ bool evoke_item(int slot) if (!item_is_evokable(item, true, false, false, true)) return (false); - if (you.suppressed() && !weapon_reach(item)) + if (you.suppressed() && weapon_reach(item) <= 2) { canned_msg(MSG_EVOCATION_SUPPRESSED); return false; @@ -723,7 +723,7 @@ bool evoke_item(int slot) case OBJ_WEAPONS: ASSERT(wielded); - if (weapon_reach(item)) + if (weapon_reach(item) > 2) { if (_reaching_weapon_attack(item)) { diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 65ff4b2..1d6d7d0 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -2030,7 +2030,7 @@ bool item_is_evokable(const item_def &item, bool reach, bool known, if ((!wielded || !reach) && !msg) return (false); - if (reach && weapon_reach(item) && item_type_known(item)) + if (reach && weapon_reach(item) > 2 && item_type_known(item)) { if (!wielded) { -- Dungeon Crawl Stone Soup |