From c8abbb6f1236d147674c8d88065b8400756ce686 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 4 Apr 2009 18:06:05 +0000 Subject: * Change TARG_NOT_SELF to TARG_HOSTILE (not to confused with TARG_ENEMY that also includes neutral monsters) for Ely's Heal Other powers. * Update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9579 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/docs/changes.stone_soup | 4 ++-- crawl-ref/source/abl-show.cc | 4 ++-- crawl-ref/source/directn.cc | 17 +++++++++++------ crawl-ref/source/enum.h | 4 ++-- crawl-ref/source/xom.cc | 3 ++- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup index 357336c229..c2f3649219 100644 --- a/crawl-ref/docs/changes.stone_soup +++ b/crawl-ref/docs/changes.stone_soup @@ -88,6 +88,7 @@ Interface * Switch off autopickup and autoswap if you see a monster turn invisible. * Shops now use shopping cart behaviour. * Wizard commands can now be used from the wizard help screen. +* Allow quivering/firing of wielded missiles and wielded weapons of returning. * With a full pack, check entire list of selected items to allow for merging. * Added an option to make menu colours apply to shops. * Use menu colours for announcements of items found while travelling. @@ -117,7 +118,6 @@ Items * Ammo that IDs through throwing now merges in your pack instantaneously. * ?immolation doesn't burn scrolls anymore. * ?summoning creates a permanent abomination. -* ?fear doesn't turn allies hostile anymore. * ?random uselessness now autoIDs. * ?vorpalise weapon now fixes temporary brands instead of EWIII. * Nemelex-gifted decks now ID after drawing one card. @@ -132,7 +132,7 @@ Gods * Xom is more interesting and more useful in combat. * Cleansing Flame centers on the player and deals less damage. * Killing a holy being is now sometimes avenged by TSO. -* Split Elyvilon's healing powers in self and other versions. +* Split Elyvilon's healing powers in "heal self" and "heal other" versions. * Move Divine Robustness from Zin to Elyvilon, replacing Incredible Healing. * Make Zin's retribution-summoned plagues permanent. * Sif Muna no longer gifts Kiku/Vehumet specific books, spells still possible. diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index d7a2d1e501..a9fea0082f 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -1690,7 +1690,7 @@ static bool _do_ability(const ability_def& abil) const bool self = (abil.ability == ABIL_ELYVILON_LESSER_HEALING_SELF); if (cast_healing(3 + (you.skills[SK_INVOCATIONS] / 6), true, self ? you.pos() : coord_def(0,0), - self ? TARG_NUM_MODES : TARG_NOT_SELF) < 0) + self ? TARG_NUM_MODES : TARG_HOSTILE) < 0) { return (false); } @@ -1709,7 +1709,7 @@ static bool _do_ability(const ability_def& abil) const bool self = (abil.ability == ABIL_ELYVILON_GREATER_HEALING_SELF); if (cast_healing(10 + (you.skills[SK_INVOCATIONS] / 3), true, self ? you.pos() : coord_def(0,0), - self ? TARG_NUM_MODES : TARG_NOT_SELF) < 0) + self ? TARG_NUM_MODES : TARG_HOSTILE) < 0) { return (false); } diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index e95e57787e..a151b45e99 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1048,7 +1048,7 @@ void direction(dist& moves, targeting_type restricts, bool target_unshifted = Options.target_unshifted_dirs; // Find a default target. - if (Options.default_target && (mode == TARG_ENEMY || mode == TARG_NOT_SELF)) + if (Options.default_target && (mode == TARG_ENEMY || mode == TARG_HOSTILE)) { skip_iter = true; // Skip first iteration...XXX mega-hack if (you.prev_targ != MHITNOT && you.prev_targ != MHITYOU) @@ -1056,7 +1056,8 @@ void direction(dist& moves, targeting_type restricts, const monsters *montarget = &menv[you.prev_targ]; if (you.can_see(montarget) // not made friendly since then - && (mode == TARG_NOT_SELF || !mons_friendly(montarget)) + && (mons_attitude(montarget) == ATT_HOSTILE + || mode == TARG_ENEMY && !mons_friendly(montarget)) && _is_target_in_range(montarget->pos(), range)) { found_autotarget = true; @@ -1330,9 +1331,10 @@ void direction(dist& moves, targeting_type restricts, case CMD_TARGET_CYCLE_TARGET_MODE: mode = static_cast((mode + 1) % TARG_NUM_MODES); mprf( "Targeting mode is now: %s", - (mode == TARG_ANY) ? "any" : - (mode == TARG_ENEMY) ? "enemies" - : "friends" ); + (mode == TARG_ANY) ? "any" : + (mode == TARG_ENEMY) ? "enemies" : + (mode == TARG_HOSTILE) ? "hostiles" + : "friends" ); break; case CMD_TARGET_PREV_TARGET: @@ -2004,9 +2006,12 @@ static bool _find_monster( const coord_def& where, int mode, bool need_path, return (false); // Now compare target modes. - if (mode == TARG_ANY || mode == TARG_NOT_SELF) + if (mode == TARG_ANY) return (true); + if (mode == TARG_HOSTILE) + return (mons_attitude(mon) == ATT_HOSTILE); + if (mode == TARG_FRIEND) return (mons_friendly(mon)); diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index dc1e511346..8420349fb3 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1584,9 +1584,9 @@ enum mon_holy_type enum targ_mode_type { TARG_ANY, - TARG_ENEMY, + TARG_ENEMY, // hostile + neutral TARG_FRIEND, - TARG_NOT_SELF, + TARG_HOSTILE, TARG_NUM_MODES }; diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 82abc823f1..66745cc71c 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -280,7 +280,8 @@ void xom_tick() xom_acts(abs(you.piety - MAX_PIETY/2), tension); return; } - else if (you.gift_timeout <= 1 && x_chance_in_y(chance-1, 4)) + else if (you.gift_timeout <= 1 && chance > 0 + && x_chance_in_y(chance-1, 4)) { // During tension, Xom may briefly forget about being bored. const int interest = random2(chance*15); -- cgit v1.2.3-54-g00ecf