From 5a65031b5a1d0c144ba3baa9e940676bbf3ab029 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Fri, 30 Oct 2009 13:03:06 +0100 Subject: Blessed Blades created the round before shouldn't be "ancient artifacts". I didn't make them "new artifacts" either -- they're enchantable now. --- crawl-ref/source/artefact.cc | 43 ------------------------------------------- crawl-ref/source/artefact.h | 1 - crawl-ref/source/enum.h | 3 +-- crawl-ref/source/itemname.cc | 6 ++++++ crawl-ref/source/religion.cc | 2 +- 5 files changed, 8 insertions(+), 47 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index 7f6f43e6d7..feccab1ca1 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -1916,49 +1916,6 @@ bool randart_is_bad( const item_def &item ) return randart_is_bad( item, proprt); } -bool make_item_blessed_blade( item_def &item ) -{ - if (item.base_type != OBJ_WEAPONS) - return (false); - - // already is an artefact - if (is_artefact(item)) - return (false); - - // mark as a random artefact - item.flags |= ISFLAG_RANDART; - - ASSERT(!item.props.exists( KNOWN_PROPS_KEY )); - item.props[KNOWN_PROPS_KEY].new_vector(SV_BOOL).resize(ART_PROPERTIES); - CrawlVector &known = item.props[KNOWN_PROPS_KEY].get_vector(); - known.set_max_size(ART_PROPERTIES); - for (vec_size i = 0; i < ART_PROPERTIES; i++) - known[i] = (bool) false; - - ASSERT(!item.props.exists( ARTEFACT_PROPS_KEY )); - item.props[ARTEFACT_PROPS_KEY].new_vector(SV_SHORT).resize(ART_PROPERTIES); - CrawlVector &rap = item.props[ARTEFACT_PROPS_KEY].get_vector(); - rap.set_max_size(ART_PROPERTIES); - for (vec_size i = 0; i < ART_PROPERTIES; i++) - rap[i] = (short) 0; - - // blessed blade of the Shining One - rap[ARTP_BRAND] = (short) SPWPN_HOLY_WRATH; - - // set artefact name - ASSERT(!item.props.exists( ARTEFACT_NAME_KEY )); - item.props[ARTEFACT_NAME_KEY].get_string() = "Blessed Blade"; - - // set artefact appearance - ASSERT(!item.props.exists( ARTEFACT_APPEAR_KEY )); - item.props[ARTEFACT_APPEAR_KEY].get_string() = "brightly glowing blade"; - - // in case this is ever needed anywhere - item.special = (random_int() & RANDART_SEED_MASK); - - return (true); -} - bool make_item_randart( item_def &item ) { if (item.base_type != OBJ_WEAPONS diff --git a/crawl-ref/source/artefact.h b/crawl-ref/source/artefact.h index a336fc60d9..117959064e 100644 --- a/crawl-ref/source/artefact.h +++ b/crawl-ref/source/artefact.h @@ -247,7 +247,6 @@ bool artefact_wpn_known_prop( const item_def &item, artefact_prop_type prop ); /* *********************************************************************** * called from: dungeon * *********************************************************************** */ -bool make_item_blessed_blade( item_def &item ); bool make_item_randart( item_def &item ); bool make_item_unrandart( item_def &item, int unrand_index ); diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index d569fc6291..8ab8a7af63 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1433,10 +1433,9 @@ enum item_status_flag_type // per item flags: ie. ident status, cursed status ISFLAG_EQ_JEWELLERY_MASK = 0x0000000F, // mask of flags for known jewellery ISFLAG_CURSED = 0x00000100, // cursed - ISFLAG_RESERVED_1 = 0x00000200, // reserved + ISFLAG_BLESSED_BLADE = 0x00000200, // personalized TSO's gift ISFLAG_RESERVED_2 = 0x00000400, // reserved ISFLAG_RESERVED_3 = 0x00000800, // reserved - ISFLAG_CURSE_MASK = 0x00000F00, // mask of all curse related flags ISFLAG_RANDART = 0x00001000, // special value is seed ISFLAG_UNRANDART = 0x00002000, // is an unrandart diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index fade7228bc..913cc8ffaf 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -1060,6 +1060,12 @@ std::string item_def::name_aux(description_level_type desc, buff << get_artefact_name(*this); break; } + else if (flags & ISFLAG_BLESSED_BLADE && !dbname) + { // since Daevas can get blessed base items, we need a separate + // flag for this, so they can still have their eudemon blades + buff << "Blessed Blade"; + break; + } // Now that we can have "glowing elven" weapons, it's // probably a good idea to cut out the descriptive diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index cfcf1eb48e..2b78310e15 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -6183,7 +6183,7 @@ static bool _bless_weapon(god_type god, brand_type brand, int colour) if (is_blessed_blade_convertible(wpn)) { origin_acquired(wpn, GOD_SHINING_ONE); - make_item_blessed_blade(wpn); + wpn.flags |= ISFLAG_BLESSED_BLADE; } burden_change(); -- cgit v1.2.3-54-g00ecf