summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 05:53:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 05:53:26 +0000
commit7263979a671796f35dbce5cb280839bdba2f548a (patch)
tree6aac9f2f8b5562d97b87cde62a40155f439dfa6f /crawl-ref/source/religion.cc
parentebd096b476329f03e359dd537a8fc3cb34292798 (diff)
downloadcrawl-ref-7263979a671796f35dbce5cb280839bdba2f548a.tar.gz
crawl-ref-7263979a671796f35dbce5cb280839bdba2f548a.zip
Don't allow the branding blessings to override existing brands, unless
they're brands the blessing god doesn't like. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4515 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 223f8eca13..50e45a985a 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -891,8 +891,16 @@ static bool _tso_blessing_holy_wpn(monsters *mon)
item_def& wpn(mitm[weapon]);
- if (is_artefact(wpn) || get_weapon_brand(wpn) == SPWPN_HOLY_WRATH)
+ const int wpn_brand = get_weapon_brand(wpn);
+
+ // Override certain brands.
+ if (is_artefact(wpn)
+ || (wpn_brand != SPWPN_NORMAL && wpn_brand != SPWPN_DRAINING
+ && wpn_brand != SPWPN_PAIN && wpn_brand != SPWPN_VAMPIRICISM
+ && wpn_brand != SPWPN_VENOM))
+ {
return false;
+ }
// And make it holy.
set_equip_desc(wpn, ISFLAG_GLOWING);
@@ -928,7 +936,10 @@ static bool _tso_blessing_holy_arm(monsters* mon)
item_def& arm(mitm[slot]);
- if (is_artefact(arm) || get_armour_ego_type(arm) == SPARM_POSITIVE_ENERGY)
+ const int arm_brand = get_armour_ego_type(arm);
+
+ // Override certain brands.
+ if (is_artefact(arm) || arm_brand != SPARM_NORMAL)
return false;
// And make it resistant to negative energy.
@@ -1043,8 +1054,14 @@ static bool _beogh_blessing_elec_wpn(monsters *mon)
item_def& wpn(mitm[weapon]);
- if (is_artefact(wpn) || get_weapon_brand(wpn) == SPWPN_ELECTROCUTION)
+ const int wpn_brand = get_weapon_brand(wpn);
+
+ // Override certain brands.
+ if (is_artefact(wpn)
+ || (wpn_brand != SPWPN_NORMAL && wpn_brand != SPWPN_ORC_SLAYING))
+ {
return false;
+ }
// And make it electric.
set_equip_desc(wpn, ISFLAG_GLOWING);