summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-28 22:47:14 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-28 22:47:14 +0000
commitf8aebd518b618b923f021edb395e23e5702db1e1 (patch)
treec99cb9f7e0e4c9415fa7aba601ae9fc1a65d2666
parent152a03a16aaf7bed6bb21fd5bc0567c2ff1f1427 (diff)
downloadcrawl-ref-f8aebd518b618b923f021edb395e23e5702db1e1.tar.gz
crawl-ref-f8aebd518b618b923f021edb395e23e5702db1e1.zip
For TSO, make the rarest blessing that of branding a monster's weapon
with holy wrath (where Beogh would promote an orc to an orc priest). This is not used yet. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3921 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/itemprop.cc8
-rw-r--r--crawl-ref/source/religion.cc47
2 files changed, 46 insertions, 9 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index b1420070d0..1feee1460f 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -830,17 +830,17 @@ void set_helmet_random_desc( item_def &item )
if (is_hard_helmet(item))
item.plus2 = random2(THELM_NUM_DESCS);
- else
+ else
item.plus2 = random2(THELM_DESC_MAX_SOFT + 1);
}
-//
+//
// Ego item functions:
//
bool set_item_ego_type( item_def &item, int item_type, int ego_type )
{
- if (item.base_type == item_type
- && !is_random_artefact( item )
+ if (item.base_type == item_type
+ && !is_random_artefact( item )
&& !is_fixed_artefact( item ))
{
item.special = ego_type;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 9dff7464af..83204da7b3 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -840,6 +840,27 @@ 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 (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;
+
+ return true;
+}
+
static bool beogh_blessing_reinforcement()
{
bool success = false;
@@ -944,13 +965,29 @@ void bless_follower(god_type god,
blessed = (follower && !mons_near(follower)) ? "a follower"
: mon->name(DESC_NOCAP_A).c_str();
- // Turn a monster into a priestly monster, if possible.
- if (god == GOD_BEOGH && chance == 0)
+ if (chance == 0)
{
- if (beogh_blessing_priesthood(mon))
+ switch (god)
{
- result = "priesthood";
- goto blessing_done;
+ case GOD_SHINING_ONE:
+ // Brand a monster's weapon with holy wrath, if
+ // possible.
+ if (tso_blessing_holy_wpn(mon))
+ {
+ result = "holy attack power";
+ goto blessing_done;
+ }
+ break;
+ case GOD_BEOGH:
+ // Turn a monster into a priestly monster, if possible.
+ if (beogh_blessing_priesthood(mon))
+ {
+ result = "priesthood";
+ goto blessing_done;
+ }
+ break;
+ default:
+ break;
}
}