diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-13 20:40:39 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-13 20:40:39 +0000 |
commit | 9fecb788095cc5315ef5f1485e0b736563a21460 (patch) | |
tree | 4dd717741b428607d8b91ce4a5dd05044c2e0d2f /crawl-ref/source/itemprop.cc | |
parent | cab797009b47f77520b8db9f8b427ba9ea14f63c (diff) | |
download | crawl-ref-9fecb788095cc5315ef5f1485e0b736563a21460.tar.gz crawl-ref-9fecb788095cc5315ef5f1485e0b736563a21460.zip |
* Add stair repelling as a bad Xom effect.
* Experimentally make tension increase the odds for good effects.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9600 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 829b6ca1b9..21fd25c77c 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -484,6 +484,17 @@ void do_curse_item( item_def &item, bool quiet ) if (item.flags & ISFLAG_CURSED) return; + if (!quiet) + { + mprf("Your %s glows black for a moment.", + item.name(DESC_PLAIN).c_str()); + + // If we get the message, we know the item is cursed now. + item.flags |= ISFLAG_KNOW_CURSE; + } + + item.flags |= ISFLAG_CURSED; + // Xom is amused by the player's items being cursed, especially // if they're worn/equipped. if (in_inventory(item)) @@ -508,17 +519,6 @@ void do_curse_item( item_def &item, bool quiet ) } xom_is_stimulated(amusement); } - - if (!quiet) - { - mprf("Your %s glows black for a moment.", - item.name(DESC_PLAIN).c_str()); - - // If we get the message, we know the item is cursed now. - item.flags |= ISFLAG_KNOW_CURSE; - } - - item.flags |= ISFLAG_CURSED; } void do_uncurse_item( item_def &item ) @@ -1389,7 +1389,7 @@ int wand_charge_value(int type) } } -bool is_enchantable_weapon(const item_def &wpn, bool uncurse) +bool is_enchantable_weapon(const item_def &wpn, bool uncurse, bool first) { if (wpn.base_type != OBJ_WEAPONS && wpn.base_type != OBJ_MISSILES) return (false); @@ -1399,7 +1399,8 @@ bool is_enchantable_weapon(const item_def &wpn, bool uncurse) if (wpn.base_type == OBJ_WEAPONS) { if (is_artefact(wpn) - || wpn.plus >= MAX_WPN_ENCHANT && wpn.plus2 >= MAX_WPN_ENCHANT) + || first && wpn.plus >= MAX_WPN_ENCHANT + || !first && wpn.plus2 >= MAX_WPN_ENCHANT) { return (uncurse && item_cursed(wpn)); } |