From c0c39501b9e2d8bfa156b06c59dac918856ba5a9 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 23 Jun 2007 14:42:02 +0000 Subject: Nemelex pleasing updated. All previously-unknown cards now give 1-2 points of piety; finishing a deck (even if marked) gives an extra point. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1627 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 1 - crawl-ref/source/decks.cc | 22 ++++++++++++++-------- crawl-ref/source/externs.h | 4 ++-- crawl-ref/source/player.cc | 2 +- crawl-ref/source/religion.cc | 4 ++-- crawl-ref/source/religion.h | 2 +- 6 files changed, 20 insertions(+), 15 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 1a4ebbbf7f..e8adf54bc1 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1721,7 +1721,6 @@ static void decrement_durations() break; } - //you.attribute[ATTR_WEAPON_BRAND] = 0; mpr(msg.c_str(), MSGCH_DURATION); you.wield_change = true; } diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 814736c9a3..0444fabd69 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -382,10 +382,19 @@ void draw_from_deck_of_punishment() // card could clobber the sign bit in special. void evoke_deck( item_def& deck ) { + int brownie_points = 0; mpr("You draw a card..."); if ( deck.plus2 == 0 ) { card_effect( choose_one_card(deck, true), deck_rarity(deck) ); + + if ( deck.sub_type != MISC_DECK_OF_PUNISHMENT ) + { + // Nemelex likes gamblers. + brownie_points = 1; + if (one_chance_in(3)) + brownie_points++; + } } else { @@ -407,19 +416,16 @@ void evoke_deck( item_def& deck ) you.wield_change = true; } deck.plus--; - - int brownie_points = 0; + if ( deck.plus == 0 ) { mpr("The deck of cards disappears in a puff of smoke."); unwield_item(you.equip[EQ_WEAPON]); dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 ); - - brownie_points = (coinflip() ? 2 : 1); - } - - if (one_chance_in(3)) + // Finishing the deck will earn a point, even if it + // was marked or stacked. brownie_points++; + } did_god_conduct(DID_CARDS, brownie_points); } @@ -992,6 +998,7 @@ void card_effect(card_type which_card, deck_rarity_type rarity) case CARD_WRAITH: drain_exp(); lose_level(); break; case CARD_WRATH: godly_wrath(); break; case CARD_SUMMON_DEMON: summon_demon_card(power, rarity); break; + case CARD_XOM: xom_acts(5 + random2(power/10)); break; case CARD_SPADE: mpr("Sorry, this card is not yet available."); @@ -1020,7 +1027,6 @@ void card_effect(card_type which_card, deck_rarity_type rarity) case CARD_SUMMON_ANIMAL: break; case CARD_SUMMON_WEAPON: break; case CARD_SUMMON_ANY: break; - case CARD_XOM: xom_acts(5 + random2(power/10)); break; case CARD_FAMINE: if (you.is_undead == US_UNDEAD) diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 8b1568fcc5..aeb1c2025f 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -199,7 +199,7 @@ public: virtual bool asleep() const { return (false); } virtual bool backlit() const = 0; - virtual void god_conduct(int thing_done, int level) { } + virtual void god_conduct(conduct_type thing_done, int level) { } virtual bool incapacitated() const { @@ -838,7 +838,7 @@ public: void drain_stat(int stat, int amount); void expose_to_element(beam_type element, int strength = 0); - void god_conduct(int thing_done, int level); + void god_conduct(conduct_type thing_done, int level); int hunger_level() const { return hunger_state; } void make_hungry(int nutrition, bool silent = true); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 979166c9be..635ac234c8 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4949,7 +4949,7 @@ bool player::can_go_berserk(bool verbose) const return (true); } -void player::god_conduct(int thing_done, int level) +void player::god_conduct(conduct_type thing_done, int level) { ::did_god_conduct(thing_done, level); } diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 47d95d5028..78a37976f9 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -915,7 +915,7 @@ void god_speaks( god_type god, const char *mesg ) // This function is the merger of done_good() and naughty(). // Returns true if god was interested (good or bad) in conduct. -bool did_god_conduct( int thing_done, int level ) +bool did_god_conduct( conduct_type thing_done, int level ) { bool ret = false; int piety_change = 0; @@ -1271,7 +1271,7 @@ bool did_god_conduct( int thing_done, int level ) case DID_DEDICATED_KILL_NATURAL_EVIL: // unused case DID_NATURAL_EVIL_KILLED_BY_SERVANT: // unused case DID_SPELL_NONUTILITY: // unused - default: + case NUM_CONDUCTS: break; } diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index a1ec62a17c..ce70316288 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -22,7 +22,7 @@ int piety_breakpoint(int i); const char *god_name(god_type which_god, bool long_name = false); //mv void dec_penance(int val); void dec_penance(god_type god, int val); -bool did_god_conduct(int thing_done, int pgain); +bool did_god_conduct(conduct_type thing_done, int pgain); void excommunication(void); void gain_piety(int pgn); void god_speaks(god_type god, const char *mesg ); -- cgit v1.2.3-54-g00ecf