summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-06 21:06:34 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-06 21:06:34 +0000
commitcb3497134b22bd2a2d413fdbdb41324e8e7070d7 (patch)
treecb9f2059879e48d60f053136c608496c8c30baf7 /crawl-ref/source/effects.cc
parent5d559d519c41f7f6d621afb15f567c44a4f6311d (diff)
downloadcrawl-ref-cb3497134b22bd2a2d413fdbdb41324e8e7070d7.tar.gz
crawl-ref-cb3497134b22bd2a2d413fdbdb41324e8e7070d7.zip
* Fix god gift randarts being named after *other* gods.
* Reallow monster placement of bands (at least for Beogh's retribution; it might be similarly buggy for normal generation). * Extend documentation on orc naming, and sometimes name the band leader of a band sent after you for retribution. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4894 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc34
1 files changed, 20 insertions, 14 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index b68dda8cd7..8d5860b3fc 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1554,10 +1554,10 @@ bool acquirement(object_class_type class_wanted, int agent,
continue;
const item_def &doodad(mitm[thing_created]);
- if ((doodad.base_type == OBJ_WEAPONS
- && !can_wield(&doodad, false, true))
- || (doodad.base_type == OBJ_ARMOUR
- && !can_wear_armour(doodad, false, true)))
+ if (doodad.base_type == OBJ_WEAPONS
+ && !can_wield(&doodad, false, true)
+ || doodad.base_type == OBJ_ARMOUR
+ && !can_wear_armour(doodad, false, true))
{
destroy_item(thing_created, true);
thing_created = NON_ITEM;
@@ -1566,14 +1566,11 @@ bool acquirement(object_class_type class_wanted, int agent,
// Only TSO gifts blessed blades, and currently not through
// acquirement, but make sure of this anyway
- if (agent != GOD_SHINING_ONE)
+ if (agent != GOD_SHINING_ONE && is_blessed_blade(doodad))
{
- if (is_blessed_blade(doodad))
- {
- destroy_item(thing_created, true);
- thing_created = NON_ITEM;
- continue;
- }
+ destroy_item(thing_created, true);
+ thing_created = NON_ITEM;
+ continue;
}
// Trog does not gift the Wrath of Trog, nor weapons of pain
@@ -1602,9 +1599,9 @@ bool acquirement(object_class_type class_wanted, int agent,
// check vs stats. positive stats will automatically fall
// through. As will negative stats that won't kill you.
- if (-proprt[RAP_STRENGTH] >= you.strength ||
- -proprt[RAP_INTELLIGENCE] >= you.intel ||
- -proprt[RAP_DEXTERITY] >= you.dex)
+ if (-proprt[RAP_STRENGTH] >= you.strength
+ || -proprt[RAP_INTELLIGENCE] >= you.intel
+ || -proprt[RAP_DEXTERITY] >= you.dex)
{
// try again
destroy_item(thing_created);
@@ -1771,7 +1768,16 @@ bool acquirement(object_class_type class_wanted, int agent,
}
if (agent == you.religion)
+ {
thing.inscription = "god gift";
+ if (is_random_artefact(thing))
+ {
+ origin_acquired(mitm[thing_created], agent);
+ // give another name that takes god gift into account
+ thing.props["randart_name"].get_string() =
+ randart_name(thing, false);
+ }
+ }
move_item_to_grid( &thing_created, you.x_pos, you.y_pos );
// This should never actually be NON_ITEM because of the way