From 1066dfb75a2e07bc860ef737f6a8339bea501835 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 23 Dec 2006 18:30:26 +0000 Subject: Implemented David Ploog's "Lucy" abyssal god. An altar has a 20% chance of showing up in each Abyss area. Many things still need to be done: better naming, better descriptive text, differentiation from Makhleb in preferences, etc. Playtesting and debugging required. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@698 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 140 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 115 insertions(+), 25 deletions(-) (limited to 'crawl-ref/source/religion.cc') diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 74991b80c7..583a8a7dd8 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -75,6 +75,7 @@ const char *sacrifice[] = { " glows faintly for a moment, then is gone.", " is consumed in a roaring column of flame.", " glows with a rainbow of weird colours and disappears.", + " is consumed by the void.", " evaporates." }; @@ -107,8 +108,7 @@ const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] = "drain ambient lifeforce", "control the undead" }, // Xom - { "", "", "", - "", "" }, + { "", "", "", "", "" }, // Vehumet { "gain power from killing in Vehumet's name", "You can call upon Vehumet to aid your destructive magics with prayer.", @@ -139,14 +139,19 @@ const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] = "haste yourself", "" }, // Nemelex - { "", "", "", - "", "" }, + { "", "", "", "", "" }, // Elyvilon { "call upon Elyvilon for minor healing", "call upon Elyvilon for purification", "call upon Elyvilon for moderate healing", "call upon Elyvilon to restore your abilities", - "call upon Elyvilon for incredible healing" } + "call upon Elyvilon for incredible healing" }, + // Lucy + { "depart the Abyss - at a permanent cost", + "", + "summon the demons of the Abyss to your aid", + "", + "gate yourself to the Abyss" } }; const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] = @@ -178,8 +183,7 @@ const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] = "drain ambient lifeforce", "control the undead" }, // Xom - { "", "", "", - "", "" }, + { "", "", "", "", "" }, // Vehumet { "gain power from killing in Vehumet's name", "Vehumet will no longer aid your destructive magics.", @@ -211,14 +215,19 @@ const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] = "haste yourself", "" }, // Nemelex - { "", "", "", - "", "" }, + { "", "", "", "", "" }, // Elyvilon { "call upon Elyvilon for minor healing", "call upon Elyvilon for purification", "call upon Elyvilon for moderate healing", "call upon Elyvilon to restore your abilities", - "call upon Elyvilon for incredible healing" } + "call upon Elyvilon for incredible healing" }, + // Lucy + { "depart the Abyss at will", + "", + "summon the demons of the Abyss to your aid", + "", + "gate yourself to the Abyss" } }; @@ -228,6 +237,16 @@ void divine_retribution(int god); void inc_penance(int god, int val); void inc_penance(int val); +static bool is_evil_god(int god) +{ + return + god == GOD_KIKUBAAQUDGHA || + god == GOD_MAKHLEB || + god == GOD_YREDELEMNUL || + god == GOD_VEHUMET || + god == GOD_LUCY; +} + void dec_penance(int god, int val) { if (you.penance[god] > 0) @@ -735,6 +754,9 @@ char *god_name( int which_god, bool long_name ) // mv - rewritten case GOD_ELYVILON: sprintf(godname_buff, "Elyvilon%s", long_name ? " the Healer" : ""); break; + case GOD_LUCY: + sprintf(godname_buff, "Lucy"); + break; default: sprintf(godname_buff, "The Buggy One (%d)", which_god); } @@ -1221,6 +1243,7 @@ bool did_god_conduct( int thing_done, int level ) case GOD_OKAWARU: case GOD_MAKHLEB: case GOD_TROG: + case GOD_LUCY: simple_god_message(" accepts your offering."); ret = true; if (random2(level + 10) > 5) @@ -1245,6 +1268,7 @@ bool did_god_conduct( int thing_done, int level ) case GOD_VEHUMET: case GOD_MAKHLEB: case GOD_TROG: + case GOD_LUCY: simple_god_message(" accepts your kill."); ret = true; if (random2(level + 18) > 5) @@ -1261,6 +1285,7 @@ bool did_god_conduct( int thing_done, int level ) case GOD_OKAWARU: case GOD_VEHUMET: case GOD_MAKHLEB: + case GOD_LUCY: simple_god_message(" accepts your kill."); ret = true; if (random2(level + 18) > 4) @@ -1313,6 +1338,7 @@ bool did_god_conduct( int thing_done, int level ) case GOD_KIKUBAAQUDGHA: case GOD_YREDELEMNUL: case GOD_MAKHLEB: + case GOD_LUCY: snprintf( info, INFO_SIZE, " accepts your %skill.", (thing_done == DID_KILL_ANGEL) ? "" : "collateral " ); @@ -1349,6 +1375,7 @@ bool did_god_conduct( int thing_done, int level ) case GOD_KIKUBAAQUDGHA: // note: reapers aren't undead case GOD_VEHUMET: case GOD_MAKHLEB: + case GOD_LUCY: simple_god_message(" accepts your collateral kill."); ret = true; if (random2(level + 10) > 5) @@ -1364,6 +1391,7 @@ bool did_god_conduct( int thing_done, int level ) case GOD_SHINING_ONE: case GOD_VEHUMET: case GOD_MAKHLEB: + case GOD_LUCY: simple_god_message(" accepts your collateral kill."); ret = true; if (random2(level + 10) > 5) @@ -1566,8 +1594,8 @@ void gain_piety(char pgn) } if ( you.piety > 160 && old_piety <= 160 && - (you.religion == GOD_SHINING_ONE || you.religion == GOD_ZIN) && - you.num_gifts[you.religion] == 0 ) + (you.religion == GOD_SHINING_ONE || you.religion == GOD_ZIN || + you.religion == GOD_LUCY) && you.num_gifts[you.religion] == 0 ) simple_god_message( " will now bless your weapon at an altar...once."); } @@ -1586,8 +1614,8 @@ void lose_piety(char pgn) if (!player_under_penance() && you.piety != old_piety) { if (you.piety <= 160 && old_piety > 160 && - (you.religion == GOD_SHINING_ONE || you.religion == GOD_ZIN) && - you.num_gifts[you.religion] == 0) + (you.religion == GOD_SHINING_ONE || you.religion == GOD_ZIN || + you.religion == GOD_LUCY) && you.num_gifts[you.religion] == 0) simple_god_message(" is no longer ready to bless your weapon."); for ( int i = 0; i < MAX_GOD_ABILITIES; ++i ) @@ -1651,8 +1679,7 @@ void divine_retribution( int god ) case GOD_SHINING_ONE: // daeva/smiting theme // Doesn't care unless you've gone over to evil/destructive gods - if (you.religion == GOD_KIKUBAAQUDGHA || you.religion == GOD_MAKHLEB - || you.religion == GOD_YREDELEMNUL || you.religion == GOD_VEHUMET) + if (is_evil_god(you.religion)) { if (coinflip()) { @@ -1704,8 +1731,7 @@ void divine_retribution( int god ) case GOD_ZIN: // angels/creeping doom theme: // Doesn't care unless you've gone over to evil - if (you.religion == GOD_KIKUBAAQUDGHA || you.religion == GOD_MAKHLEB - || you.religion == GOD_YREDELEMNUL || you.religion == GOD_VEHUMET) + if (is_evil_god(you.religion)) { if (random2(you.experience_level) > 7 && !one_chance_in(5)) { @@ -2074,6 +2100,42 @@ void divine_retribution( int god ) } break; + case GOD_LUCY: + // abyssal servant theme + if (random2(you.experience_level) > 7 && !one_chance_in(5)) + { + if (create_monster(MONS_GREEN_DEATH + random2(3), 0, + BEH_HOSTILE, you.x_pos, you.y_pos, + MHITYOU, 250) != -1) + { + simple_god_message(" sends a demon after you!", god); + } + else + { + simple_god_message("'s demon is unavoidably detained.", god); + } + } + else + { + success = false; + how_many = 1 + (you.experience_level / 7); + + for (loopy = 0; loopy < how_many; loopy++) + { + if (create_monster(MONS_NEQOXEC + random2(5), 0, BEH_HOSTILE, + you.x_pos, you.y_pos, MHITYOU, 250) != -1) + { + success = true; + } + } + + if (success) + simple_god_message(" sends minions to punish you.", god); + else + simple_god_message("'s minions fail to arrive.", god); + } + break; + case GOD_ELYVILON: // Elyvilon doesn't seek revenge default: return; @@ -2098,6 +2160,7 @@ void divine_retribution( int god ) } } + return; } // end divine_retribution() @@ -2155,7 +2218,7 @@ void excommunication(void) case GOD_TROG: simple_god_message( " does not appreciate desertion!", old_god ); - // Penence has to come before retribution to prevent "mollify" + // Penance has to come before retribution to prevent "mollify" inc_penance( old_god, 50 ); divine_retribution( old_god ); break; @@ -2166,12 +2229,21 @@ void excommunication(void) inc_penance( old_god, 50 ); break; - default: - inc_penance( old_god, 25 ); + case GOD_LUCY: + if ( you.level_type == LEVEL_DUNGEON ) + { + simple_god_message(" casts you back into the Abyss!", old_god); + banished(DNGN_ENTER_ABYSS); + } + inc_penance(old_god, 50); break; case GOD_ELYVILON: // never seeks revenge break; + + default: + inc_penance( old_god, 25 ); + break; } } // end excommunication() @@ -2204,8 +2276,9 @@ static bool bless_weapon( int god, int brand, int colour ) mprf( MSGCH_GOD, "Your weapon shines brightly!" ); simple_god_message( " booms: Use this gift wisely!" ); - // as currently only Zin and TSO do this is our permabrand effect: - holy_word( 100, true ); + if ( god != GOD_LUCY ) + holy_word( 100, true ); + delay(1000); return (true); @@ -2272,6 +2345,18 @@ void altar_prayer(void) } } + // Lucy blesses weapons with distortion + if (you.religion == GOD_LUCY + && !you.num_gifts[GOD_LUCY] + && !player_under_penance() + && you.piety > 160) + { + const int wpn = get_player_wielded_weapon(); + + if (wpn != -1 && get_weapon_brand(you.inv[wpn]) != SPWPN_DISTORTION) + bless_weapon(GOD_LUCY, SPWPN_DISTORTION, RED); + } + i = igrd[you.x_pos][you.y_pos]; while (i != NON_ITEM) { @@ -2424,8 +2509,7 @@ void god_pitch(unsigned char which_god) // Currently penance is just zeroed, this could be much more interesting. you.penance[you.religion] = 0; - if (you.religion == GOD_KIKUBAAQUDGHA || you.religion == GOD_YREDELEMNUL - || you.religion == GOD_VEHUMET || you.religion == GOD_MAKHLEB) + if (is_evil_god(you.religion)) { // Note: Using worshipped[] we could make this sort of grudge // permanent instead of based off of penance. -- bwr @@ -2435,6 +2519,10 @@ void god_pitch(unsigned char which_god) god_speaks(GOD_SHINING_ONE, "\"You will pay for your evil ways, mortal!\""); } } + + if ( you.religion == GOD_LUCY ) + gain_piety(20); // allow instant access to first power + redraw_skill( you.your_name, player_title() ); } // end god_pitch() @@ -2536,6 +2624,7 @@ void handle_god_time(void) break; case GOD_MAKHLEB: + case GOD_LUCY: if (one_chance_in(16)) lose_piety(1); if (you.piety < 1) @@ -2601,6 +2690,7 @@ char god_colour( char god ) //mv - added case GOD_MAKHLEB: case GOD_VEHUMET: case GOD_TROG: + case GOD_LUCY: return(LIGHTRED); case GOD_XOM: -- cgit v1.2.3-54-g00ecf