From 892868004cdb7228bf4ec44cc791ed29c29fea97 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 18 Jul 2009 23:10:43 +0000 Subject: Fix the check for the player's being undead when giving mutations from Jiyva, and avoid "nothing has changed" message spam under those circumstances. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10292 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 21 +++++++++++---------- crawl-ref/source/player.cc | 9 +++++---- crawl-ref/source/tags.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index aa390087eb..935b0bd4ff 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -7816,29 +7816,30 @@ static bool _handle_pickup(monsters *monster) && random2(you.piety) > 50 && one_chance_in(4)) { - bool success = false; - if (!you.is_undead) + if (you.can_safely_mutate()) { simple_god_message(" alters your body."); more(); + bool success = false; const int rand = random2(100); + if (rand < 40) success = mutate(RANDOM_MUTATION); else if (rand < 60) success = delete_mutation(RANDOM_MUTATION); else success = mutate(RANDOM_GOOD_MUTATION); - } - if (success) - { - timeout = (100 + roll_dice(2, 4)); - you.num_gifts[you.religion]++; - take_note(Note(NOTE_GOD_GIFT, you.religion)); + if (success) + { + timeout = (100 + roll_dice(2, 4)); + you.num_gifts[you.religion]++; + take_note(Note(NOTE_GOD_GIFT, you.religion)); + } + else + mpr("You feel as though nothing has changed."); } - else - mpr("You feel as though nothing has changed."); } } diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 09c925f2d2..da6f72f4a6 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3824,10 +3824,11 @@ void jiyva_stat_action() (*base_statp[stat_up_choice])++; (*base_statp[stat_down_choice])--; - mprf(MSGCH_GOD, "Jiyva's power touches on your attributes."); - you.redraw_strength = true; - you.redraw_intelligence = true; - you.redraw_dexterity = true; + simple_god_message("'s power touches on your attributes."); + + you.redraw_strength = true; + you.redraw_intelligence = true; + you.redraw_dexterity = true; burden_change(); } diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index 24f4f9f41d..c9df422832 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -64,7 +64,7 @@ enum tag_minor_version TAG_MINOR_PORTEXT = 14, // Keep track of portal vault extensions. TAG_MINOR_RELIGION = 15, // Keep track of ghosts' religions. TAG_MINOR_ARTEFACT = 16, // Turned fixed arts into unrandarts. - TAG_MINOR_JIYVA = 17, // Addes some player bits for Jiyva. + TAG_MINOR_JIYVA = 17, // Added some player bits for Jiyva. TAG_MINOR_VERSION = 17 // Current version. (Keep equal to max.) }; -- cgit v1.2.3-54-g00ecf