From 8b56de83116cdcc9084e703fd3136d9e5e25071f Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 23 Apr 2008 05:13:46 +0000 Subject: Reorder TSO blessings a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4513 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'crawl-ref/source/religion.cc') diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 3800a3845a..34050bcdf1 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -881,6 +881,31 @@ static bool _blessing_healing(monsters *mon, bool extra) return heal_monster(mon, mon->max_hit_points, extra); } +static bool _tso_blessing_holy_wpn(monsters *mon) +{ + // Pick a monster's weapon. + const int weapon = mon->inv[MSLOT_WEAPON]; + + if (weapon == NON_ITEM) + return false; + + item_def& wpn(mitm[weapon]); + + if (is_artefact(wpn) || get_weapon_brand(wpn) == SPWPN_HOLY_WRATH) + return false; + + // And make it holy. + set_equip_desc(wpn, ISFLAG_GLOWING); + set_item_ego_type(wpn, OBJ_WEAPONS, SPWPN_HOLY_WRATH); + wpn.colour = YELLOW; + + // Convert demonic weapons into non-demonic weapons. + if (is_demonic(wpn)) + convert2good(wpn, false); + + return true; +} + static bool _tso_blessing_holy_arm(monsters* mon) { if (mons_res_negative_energy(mon) == 3) @@ -914,31 +939,6 @@ static bool _tso_blessing_holy_arm(monsters* mon) return true; } -static bool _tso_blessing_holy_wpn(monsters *mon) -{ - // Pick a monster's weapon. - const int weapon = mon->inv[MSLOT_WEAPON]; - - if (weapon == NON_ITEM) - return false; - - item_def& wpn(mitm[weapon]); - - if (is_artefact(wpn) || get_weapon_brand(wpn) == SPWPN_HOLY_WRATH) - return false; - - // And make it holy. - set_equip_desc(wpn, ISFLAG_GLOWING); - set_item_ego_type(wpn, OBJ_WEAPONS, SPWPN_HOLY_WRATH); - wpn.colour = YELLOW; - - // Convert demonic weapons into non-demonic weapons. - if (is_demonic(wpn)) - convert2good(wpn, false); - - return true; -} - static bool _tso_blessing_extend_stay(monsters *mon) { if (!mon->has_ench(ENCH_ABJ)) @@ -1127,22 +1127,22 @@ bool bless_follower(monsters* follower, switch (god) { case GOD_SHINING_ONE: - // Brand a monster's armour with positive energy, if + // Brand a monster's weapon with holy wrath, if // possible. - if (_tso_blessing_holy_arm(mon)) + if (_tso_blessing_holy_wpn(mon)) { - result = "life defence"; + result = "holy attack power"; goto blessing_done; } + break; - // Brand a monster's weapon with holy wrath, if + // Brand a monster's armour with positive energy, if // possible. - if (_tso_blessing_holy_wpn(mon)) + if (_tso_blessing_holy_arm(mon)) { - result = "holy attack power"; + result = "life defence"; goto blessing_done; } - break; case GOD_BEOGH: // Turn a monster into a priestly monster, if possible. -- cgit v1.2.3-54-g00ecf