diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-12 23:10:14 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-12 23:10:14 +0000 |
commit | 995e9fc728b24c9dd5a821c6e9c490b3d4682177 (patch) | |
tree | 97c663d36d6e1456b6e8b9d35bdefc495db4f7e2 /crawl-ref | |
parent | 3e1bc33f1ea93a6eb20afa216a15ca562c707ab4 (diff) | |
download | crawl-ref-995e9fc728b24c9dd5a821c6e9c490b3d4682177.tar.gz crawl-ref-995e9fc728b24c9dd5a821c6e9c490b3d4682177.zip |
FR 2823234: Note getting the Blessed Blade right away
FR 2433928: Holy wrath weapons cannot be cursed.
The message could stand to be improved.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10530 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/artefact.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/itemprop.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 19 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 42 |
4 files changed, 67 insertions, 13 deletions
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index e170ce540b..a1deb2c363 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -1815,6 +1815,13 @@ static bool _randart_is_redundant( const item_def &item, static bool _randart_is_conflicting( const item_def &item, artefact_properties_t &proprt ) { + if (item.base_type == OBJ_WEAPONS + && get_weapon_brand(item) == SPWPN_HOLY_WRATH + && proprt[ARTP_CURSED] != 0) + { + return (true); + } + if (item.base_type != OBJ_JEWELLERY) return (false); diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index fc4548158c..ab3a066612 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -484,6 +484,18 @@ void do_curse_item( item_def &item, bool quiet ) if (item.flags & ISFLAG_CURSED) return; + // Holy weapons cannot be cursed. + if (item.base_type == OBJ_WEAPONS + && get_weapon_brand(item) == SPWPN_HOLY_WRATH) + { + if (!quiet) + { + mprf("Your %s glows golden for a moment.", + item.name(DESC_PLAIN).c_str()); + } + return; + } + if (!quiet) { mprf("Your %s glows black for a moment.", diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 2fa2200023..937912fbd9 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -3709,7 +3709,15 @@ static item_make_species_type _give_weapon(monsters *mon, int level, case MONS_DONALD: case MONS_JOSEPHINE: item.base_type = OBJ_WEAPONS; - item.sub_type = WPN_DAGGER; + item.sub_type = WPN_DAGGER; + + if (mon->type == MONS_PSYCHE) + { + set_item_ego_type(item, OBJ_WEAPONS, + random_choose_weighted(3, SPWPN_CHAOS, + 1, SPWPN_DISTORTION, + 0)); + } break; case MONS_AGNES: @@ -4162,7 +4170,6 @@ void give_armour(monsters *mon, int level) case MONS_JOZEF: case MONS_NORBERT: case MONS_PSYCHE: - case MONS_TERENCE: if (x_chance_in_y(2, 5)) { item.base_type = OBJ_ARMOUR; @@ -4177,6 +4184,14 @@ void give_armour(monsters *mon, int level) return; break; + case MONS_TERENCE: + item.base_type = OBJ_ARMOUR; + item.sub_type = random_choose_weighted(1, ARM_RING_MAIL, + 3, ARM_SCALE_MAIL, + 2, ARM_CHAIN_MAIL, + 0); + break; + case MONS_URUG: item_race = MAKE_ITEM_ORCISH; // deliberate fall through {dlb} diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 9fe5f95fe9..5832a03752 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -413,7 +413,7 @@ static void _god_smites_you(god_type god, const char *message = NULL, static bool _beogh_idol_revenge(); static void _tso_blasts_cleansing_flame(const char *message = NULL); static bool _tso_holy_revenge(); -static void _altar_prayer(); +static bool _altar_prayer(); static bool _god_likes_item(god_type god, const item_def& item); static void _dock_piety(int piety_loss, int penance); static bool _make_god_gifts_disappear(bool level_only = true); @@ -1839,7 +1839,7 @@ bool bless_follower(monsters *follower, _beogh_blessing_reinforcements(); _delayed_monster_done("Beogh blesses you with " - "reinforcements.", ""); + "reinforcements.", ""); // Return true, even though the reinforcements might // not be placed. @@ -2387,6 +2387,7 @@ void pray() const bool was_praying = !!you.duration[DUR_PRAYER]; + bool something_happened = false; const god_type altar_god = grid_altar_god(grd(you.pos())); if (altar_god != GOD_NO_GOD) { @@ -2399,7 +2400,7 @@ void pray() if (you.religion != GOD_NO_GOD && altar_god == you.religion) { - _altar_prayer(); + something_happened = _altar_prayer(); } else if (altar_god != GOD_NO_GOD) { @@ -2427,8 +2428,11 @@ void pray() } else if (!_god_accepts_prayer(you.religion)) { - simple_god_message(" ignores your prayer."); - you.turn_is_over = false; + if (!something_happened) + { + simple_god_message(" ignores your prayer."); + you.turn_is_over = false; + } return; } @@ -3721,7 +3725,10 @@ void gain_piety(int pgn) else if (you.religion == GOD_SHINING_ONE || you.religion == GOD_LUGONU) { - simple_god_message(" will now bless your weapon at an altar... once."); + mprf("%s will now %s your weapon at an altar... once.", + god_name(you.religion).c_str(), + you.religion == GOD_SHINING_ONE ? "bless" : "corrupt", + MSGCH_GOD, you.religion); } } @@ -6760,6 +6767,7 @@ static bool _bless_weapon(god_type god, brand_type brand, int colour) you.duration[DUR_WEAPON_BRAND] = 0; // just in case + std::string old_name = wpn.name(DESC_NOCAP_A); set_equip_desc(wpn, ISFLAG_GLOWING); set_item_ego_type(wpn, OBJ_WEAPONS, brand); wpn.colour = colour; @@ -6794,7 +6802,14 @@ static bool _bless_weapon(god_type god, brand_type brand, int colour) you.wield_change = true; you.num_gifts[god]++; - take_note(Note(NOTE_GOD_GIFT, you.religion)); + std::string desc = old_name + " "; + desc += (god == GOD_SHINING_ONE ? "blessed by the Shining One" : + god == GOD_LUGONU ? "corrupted by Lugonu" + : "touched by the gods"); + + take_note(Note(NOTE_ID_ITEM, 0, 0, + wpn.name(DESC_NOCAP_A).c_str(), desc.c_str())); + wpn.flags |= ISFLAG_NOTED_ID; you.flash_colour = colour; viewwindow(true, false); @@ -6881,16 +6896,18 @@ static void _print_sacrifice_message(god_type god, const item_def &item, formatted_message_history(msg, MSGCH_GOD); } -static void _altar_prayer() +static bool _altar_prayer() { // Different message from when first joining a religion. mpr("You prostrate yourself in front of the altar and pray."); if (you.religion == GOD_XOM) - return; + return (false); god_acting gdact; + bool did_bless = false; + // TSO blesses weapons with holy wrath, and long blades specially. if (you.religion == GOD_SHINING_ONE && !you.num_gifts[GOD_SHINING_ONE] @@ -6903,7 +6920,8 @@ static void _altar_prayer() && (get_weapon_brand(you.inv[wpn]) != SPWPN_HOLY_WRATH || is_blessed_blade_convertible(you.inv[wpn]))) { - _bless_weapon(GOD_SHINING_ONE, SPWPN_HOLY_WRATH, YELLOW); + did_bless = _bless_weapon(GOD_SHINING_ONE, SPWPN_HOLY_WRATH, + YELLOW); } } @@ -6916,10 +6934,12 @@ static void _altar_prayer() const int wpn = get_player_wielded_weapon(); if (wpn != -1 && get_weapon_brand(you.inv[wpn]) != SPWPN_DISTORTION) - _bless_weapon(GOD_LUGONU, SPWPN_DISTORTION, RED); + did_bless = _bless_weapon(GOD_LUGONU, SPWPN_DISTORTION, RED); } offer_items(); + + return (did_bless); } bool god_hates_attacking_friend(god_type god, const actor *fr) |