git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1453 c06c8d41-db1a-0410-9941-cceddc491573
2ESKXYN266CEMLSL6DNCKG4REDO34FXL4ODVGMWDJTNJRKMXWCRQC 2IJDLTWK74ULETLFTIPUIY2MSG6RNONVAFNFE7MADPT6UNYSSBDAC 7NDXS36TE7QVXTXJWMYSVG5UHCCLPIO4VL6NXFGTDK3ZNKE3A2IAC 77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC RCU52DRCPWJVQ6HME4QR6V6EVQWTBKZTPWDI47UGUDAUBPOO5YNAC JW2KRJHES33W7UTWZ6NDO4TLMK4EFU4HKZXBWR2UJOMPCCOTR4CQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC VJMZ3UWE4TY2RPKX32HI2K6OAZJKULKWJISAOTU2W5UHKUJ463NQC CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC WHY6LRRJ5T2NSBE3IUCR4X3TOAH7TTK5NPUPUIFT7TPNJ6J4HBDAC TJRYL3NXPW5IUGEV3YOC7JYWEXCZDBFPLT4AUG4P227WVKVB72ZAC QKGDOYIYKE6B36ION5O2DRW65DWWPZMYNWJVH7LJJ7FPGGM2MYAQC std::string text;text = "To move your character, use the numpad; try Numlock both on and off. ""If your system has no number pad, or if you are familiar with the vi ""keys, movement is also possible with <w>hjklyubn<magenta>. A basic ""command list can be found under <w>?<magenta>, and the most important ""commands will be explained to you as it becomes necessary. ";
std::string text ="To move your character, use the numpad; try Numlock both on and off. ""If your system has no number pad, or if you are familiar with the vi ""keys, movement is also possible with <w>hjklyubn<magenta>. A basic ""command list can be found under <w>?<magenta>, and the most ""important commands will be explained to you as it becomes necessary.";
snprintf(prompt, sizeof prompt, "Really choose %s?",item.name(DESC_INVENTORY).c_str());return yesno(prompt, false, 'n');
std::string prompt = "Really choose ";prompt += item.name(DESC_INVENTORY);prompt += '?';return yesno(prompt.c_str(), false, 'n');
};enum card_type{CARD_BLANK = 0, // 0CARD_BUTTERFLY,CARD_WRAITH,CARD_EXPERIENCE,CARD_WEALTH,CARD_INTELLIGENCE, // 5CARD_STRENGTH,CARD_QUICKSILVER,CARD_STUPIDITY,CARD_WEAKNESS,CARD_SLOTH, // 10CARD_SHUFFLE,CARD_FREAK,CARD_DEATH,CARD_NORMALITY,CARD_SHADOW, // 15CARD_GATE,CARD_STATUE,CARD_ACQUISITION,CARD_HASTEN,CARD_DEMON_LESSER, // 20CARD_DEMON_COMMON,CARD_DEMON_GREATER,CARD_DEMON_SWARM,CARD_YAK,CARD_FIEND, // 25CARD_DRAGON,CARD_GOLEM,CARD_THING_FUGLY,CARD_LICH,CARD_HORROR_UNSEEN, // 30CARD_BLINK,CARD_TELEPORT,CARD_TELEPORT_NOW,CARD_RAGE,CARD_LEVITY, // 35CARD_VENOM,CARD_XOM,CARD_SLOW,CARD_DECAY,CARD_HEALING, // 40CARD_HEAL_WOUNDS,CARD_TORMENT,CARD_FOUNTAIN,CARD_ALTAR,CARD_FAMINE, // 45CARD_FEAST,CARD_WILD_MAGIC,CARD_VIOLENCE,CARD_PROTECTION,CARD_KNOWLEDGE, // 50CARD_MAZE,CARD_PANDEMONIUM,CARD_IMPRISONMENT,CARD_RULES_FOR_BRIDGE, // 54NUM_CARDS, // must remain last regular member {dlb}CARD_RANDOM = 255 // must remain final member {dlb}
// last updated 12may2000 {dlb}/* ************************************************************************ called from: it_use_3 - religion* *********************************************************************** */
#include "externs.h"const char* card_name(card_type card);void evoke_deck(item_def& deck);
enum card_type{CARD_BLANK = 0, // 0CARD_BUTTERFLY,CARD_WRAITH,CARD_EXPERIENCE,CARD_WEALTH,CARD_INTELLIGENCE, // 5CARD_STRENGTH,CARD_QUICKSILVER,CARD_STUPIDITY,CARD_WEAKNESS,CARD_SLOTH, // 10CARD_SHUFFLE,CARD_FREAK,CARD_DEATH,CARD_NORMALITY,CARD_SHADOW, // 15CARD_GATE,CARD_STATUE,CARD_ACQUISITION,CARD_HASTEN,CARD_DEMON_LESSER, // 20CARD_DEMON_COMMON,CARD_DEMON_GREATER,CARD_DEMON_SWARM,CARD_YAK,CARD_FIEND, // 25CARD_DRAGON,CARD_GOLEM,CARD_THING_FUGLY,CARD_LICH,CARD_HORROR_UNSEEN, // 30CARD_BLINK,CARD_TELEPORT,CARD_TELEPORT_NOW,CARD_RAGE,CARD_LEVITY, // 35CARD_VENOM,CARD_XOM,CARD_SLOW,CARD_DECAY,CARD_HEALING, // 40CARD_HEAL_WOUNDS,CARD_TORMENT,CARD_FOUNTAIN,CARD_ALTAR,CARD_FAMINE, // 45CARD_FEAST,CARD_WILD_MAGIC,CARD_VIOLENCE,CARD_PROTECTION,CARD_KNOWLEDGE, // 50CARD_MAZE,CARD_PANDEMONIUM,CARD_IMPRISONMENT,CARD_RULES_FOR_BRIDGE, // 54NUM_CARDS, // must remain last regular member {dlb}CARD_RANDOM = 255 // must remain final member {dlb}};
if (you.equip[EQ_WEAPON] == -1)
if ( you.equip[EQ_WEAPON] == -1 )return false;const item_def& item = you.inv[you.equip[EQ_WEAPON]];return ( item.base_type == OBJ_MISCELLANY &&subtype_to_decktype(item.sub_type) != DECK_OF_PUNISHMENT );}bool deck_peek(){if ( !wielding_deck() )
if ( item.special != 0 ){mpr("You already know what the next card will be.");return false;}const deck_type dtype = subtype_to_decktype(item.sub_type);const card_type chosen = choose_one_card(dtype, false);msg::stream << "You see " << card_name(chosen) << '.' << std::endl;item.special = chosen + 1;you.wield_change = true;return true;}
const card_type chosen = choose_one_card(which_deck, true);cards(chosen);// Decks of punishment aren't objects in the game,// its just Nemelex's form of punishment -- bwrif (which_deck != DECK_OF_PUNISHMENT)
if ( deck.special == 0 )
you.inv[you.equip[EQ_WEAPON]].plus--;if (you.inv[you.equip[EQ_WEAPON]].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 );
deck_of_cards(which_deck);}else{cards(static_cast<card_type>(deck.special - 1));deck.special = 0;you.wield_change = true;}deck.plus--;
// these bonuses happen only when the deck expires {dlb}:brownie_points = (coinflip()? 2 : 1);
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 );
did_god_conduct(DID_CARDS, brownie_points);}
// this bonus happens with every use {dlb}:if (which_deck == DECK_OF_WONDERS || one_chance_in(3))brownie_points++;did_god_conduct(DID_CARDS, brownie_points);}