diff options
-rw-r--r-- | crawl-ref/source/acr.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 27 |
2 files changed, 24 insertions, 16 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index e8b5d42c1e..4cbe25c13d 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -963,7 +963,11 @@ static void input() { } command_type cmd = get_next_cmd(); - do_action( cmd ); + + // [dshaligram] If get_next_cmd encountered a Lua macro binding, your turn + // may be ended by the first invoke of the macro. + if (!you.turn_is_over) + do_action( cmd ); if ( you.turn_is_over ) { @@ -2378,7 +2382,12 @@ static command_type get_next_cmd() { if (you.running < 0) { // Travel and explore command_type result = travel(); if ( result != CMD_NO_CMD ) + { + // Clear messages before each round of travel so that more prompts + // don't interrupt. + mesclr(); return result; + } } if (you.running > 0) { command_type result = get_running_command(); @@ -2399,7 +2408,7 @@ static command_type get_next_cmd() { if (is_userfunction(keyin)) { run_macro(get_userfunction(keyin)); - //return get_next_cmd(); + return (CMD_REST); } return keycode_to_command(keyin); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 65f7ee2d58..27031419f0 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1698,20 +1698,6 @@ bool throw_it(struct bolt &pbolt, int throw_2, monsters *dummy_target) exercise(SK_DARTS, 1 + random2avg(3, 2)); } - if (wepClass == OBJ_MISSILES && wepType == MI_NEEDLE) - { - // Throwing needles is now seriously frowned upon; it's difficult - // to grip a fiddly little needle, and not penalising it cheapens - // blowguns. [ds] Increased the penalty further after rgrmisc - // reports of being able to use thrown needles. - exHitBonus -= (30 - you.skills[SK_DARTS]); - baseHit -= (45 - you.skills[SK_DARTS]) / 2; -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Needle base hit = %d, exHitBonus = %d", - baseHit, exHitBonus); -#endif - } - // exercise skill if (coinflip()) exercise(SK_RANGED_COMBAT, 1); @@ -1763,6 +1749,19 @@ bool throw_it(struct bolt &pbolt, int throw_2, monsters *dummy_target) exercise(SK_RANGED_COMBAT, 1); exHitBonus = you.dex / 4; + + if (wepClass == OBJ_MISSILES && wepType == MI_NEEDLE) + { + // Throwing needles is now seriously frowned upon; it's difficult + // to grip a fiddly little needle, and not penalising it cheapens + // blowguns. + exHitBonus -= (30 - you.skills[SK_DARTS]) / 3; + baseHit -= (30 - you.skills[SK_DARTS]) / 3; +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "Needle base hit = %d, exHitBonus = %d", + baseHit, exHitBonus); +#endif + } } // FINALIZE tohit and damage |