From cb3497134b22bd2a2d413fdbdb41324e8e7070d7 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 6 May 2008 21:06:34 +0000 Subject: * 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 --- crawl-ref/source/effects.cc | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/effects.cc') 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 -- cgit v1.2.3-54-g00ecf