diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-25 08:03:14 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-25 08:03:14 +0000 |
commit | 94d9e1a1dbf297d9882754d07021ddb2793657b2 (patch) | |
tree | b67b575eb17c6cdfa6f86ca6e83556a67306600c /crawl-ref | |
parent | 351920562e07b657499a7f2c3a65377fd10e49a6 (diff) | |
download | crawl-ref-94d9e1a1dbf297d9882754d07021ddb2793657b2.tar.gz crawl-ref-94d9e1a1dbf297d9882754d07021ddb2793657b2.zip |
* Tweak Xom's (non)tension spell selection.
* Skip the harmless effects when Xom is BORED.
* &^ for Xom randomizes piety and has a 10% chance of making Xom bored.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9545 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 16 | ||||
-rw-r--r-- | crawl-ref/source/xom.cc | 39 |
3 files changed, 40 insertions, 19 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 4092c6198e..d68d7a8742 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -546,7 +546,7 @@ static void _do_wizard_command(int wiz_command, bool silent_fail) if (you.religion == GOD_XOM) xom_acts(abs(you.piety - 100)); else - xom_acts(coinflip(), random_range(0, MAX_PIETY - 100)); + xom_acts(coinflip(), random_range(0, MAX_PIETY/2)); break; case 'p': @@ -2678,7 +2678,7 @@ void world_reacts() if (you.cannot_act() && any_messages()) more(); -#ifdef DEBUG_TENSION | DEBUG_RELIGION +#if defined(DEBUG_TENSION) || defined(DEBUG_RELIGION) if (you.religion != GOD_NO_GOD) mprf(MSGCH_DIAGNOSTICS, "TENSION = %d", get_tension()); #endif diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index f8c473e42e..a17888f2c4 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -2422,9 +2422,21 @@ void wizard_gain_piety() mpr("You are not religious!"); return; } - else if (you.religion == GOD_XOM) // increase amusement instead + else if (you.religion == GOD_XOM) { - xom_is_stimulated(50, XM_NORMAL, true); + const std::string old_xom_favour = describe_xom_favour(); + you.piety = random2(MAX_PIETY+1); // reroll mood + if (one_chance_in(10)) + you.gift_timeout = 0; + else + you.gift_timeout = random2(256); // reroll interest + + const std::string new_xom_favour = describe_xom_favour(); + if (old_xom_favour != new_xom_favour) + { + const std::string msg = "Your title is now: " + new_xom_favour; + god_speaks(you.religion, msg.c_str()); + } return; } diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 2d05ac57c8..23badaf49c 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -57,17 +57,15 @@ REVISION("$Rev$"); // roughly ascending order of power. static const spell_type _xom_nontension_spells[] = { - SPELL_BLINK, SPELL_MAGIC_MAPPING, SPELL_DETECT_ITEMS, - SPELL_DETECT_CREATURES, SPELL_RING_OF_FLAMES, SPELL_OLGREBS_TOXIC_RADIANCE, - SPELL_EXCRUCIATING_WOUNDS, SPELL_SUMMON_BUTTERFLIES, + SPELL_MAGIC_MAPPING, SPELL_DETECT_ITEMS, SPELL_DETECT_CREATURES, + SPELL_OLGREBS_TOXIC_RADIANCE, SPELL_SUMMON_BUTTERFLIES, SPELL_FLY, SPELL_SPIDER_FORM, SPELL_STATUE_FORM, SPELL_ICE_FORM, - SPELL_DRAGON_FORM, SPELL_ANIMATE_DEAD, SPELL_NECROMUTATION + SPELL_DRAGON_FORM, SPELL_NECROMUTATION }; static const spell_type _xom_tension_spells[] = { - SPELL_BLINK, SPELL_CONFUSING_TOUCH, SPELL_MAGIC_MAPPING, - SPELL_DETECT_ITEMS, SPELL_DETECT_CREATURES, SPELL_CAUSE_FEAR, + SPELL_BLINK, SPELL_CONFUSING_TOUCH, SPELL_CAUSE_FEAR, SPELL_MASS_SLEEP, SPELL_DISPERSAL, SPELL_STONESKIN, SPELL_RING_OF_FLAMES, SPELL_OLGREBS_TOXIC_RADIANCE, SPELL_TUKIMAS_VORPAL_BLADE, SPELL_MAXWELLS_SILVER_HAMMER, SPELL_FIRE_BRAND, SPELL_FREEZING_AURA, @@ -1154,7 +1152,7 @@ static bool _xom_is_good(int sever, int tension) done = _xom_do_potion(); else if (x_chance_in_y(3, sever)) { - if (tension || coinflip()) + if (tension || one_chance_in(3)) { _xom_makes_you_cast_random_spell(sever, tension); done = true; @@ -1407,6 +1405,13 @@ static void _xom_zero_miscast() && (transform == TRAN_NONE || transform == TRAN_BLADE_HANDS)) { messages.push_back("Your eyebrows briefly feel incredibly bushy."); + messages.push_back("Your eyebrows wriggle."); + } + + if (you.species != SP_NAGA + && (you.species != SP_MERFOLK || !player_is_swimming())) + { + messages.push_back("You do an impromptu tapdance."); } /////////////////////////// @@ -1444,8 +1449,6 @@ static void _xom_zero_miscast() std::string str = "You compulsively click the heels of your "; str += name; str += " together three times."; - - messages.push_back(str); } if ((item = _tran_get_eq(EQ_SHIELD))) @@ -1455,6 +1458,11 @@ static void _xom_zero_miscast() str += " spins!"; messages.push_back(str); + + str = "Your "; + str += item->name(DESC_BASENAME, false, false, false); + str += " briefly flashes a lurid colour!"; + messages.push_back(str); } if ((item = _tran_get_eq(EQ_BODY_ARMOUR))) @@ -1487,8 +1495,8 @@ static void _xom_zero_miscast() str += pluralise(name); str += "."; } - else if (item->sub_type >= ARM_RING_MAIL && - item->sub_type <= ARM_PLATE_MAIL) + else if (item->sub_type >= ARM_RING_MAIL + && item->sub_type <= ARM_PLATE_MAIL) { str = "Your "; str += name; @@ -1803,7 +1811,7 @@ static bool _xom_summon_hostiles(int sever) static bool _xom_is_bad(int sever, int tension) { bool done = false; - bool nasty = _xom_feels_nasty(); + bool nasty = (sever >= 5 && _xom_feels_nasty()); god_acting gdact(GOD_XOM); @@ -1813,12 +1821,12 @@ static bool _xom_is_bad(int sever, int tension) if (_player_is_dead()) return (true); - if (x_chance_in_y(3, sever)) + if (!nasty && x_chance_in_y(3, sever)) { _xom_miscast(0, nasty); done = true; } - else if (x_chance_in_y(4, sever)) + else if (!nasty && x_chance_in_y(4, sever)) { _xom_miscast(1, nasty); done = true; @@ -1830,7 +1838,8 @@ static bool _xom_is_bad(int sever, int tension) _xom_miscast(2, nasty); done = true; } - else if (x_chance_in_y(7, sever) && you.level_type != LEVEL_ABYSS) + else if ((!nasty || coinflip()) + && x_chance_in_y(7, sever) && you.level_type != LEVEL_ABYSS) { // The Xom teleportation train takes you on instant // teleportation to a few random areas, stopping if either |