00001
00002
00003
00004
00005
00006
00007 #ifndef DECKS_H
00008 #define DECKS_H
00009
00010 #include "enum.h"
00011
00012 #include "externs.h"
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 enum deck_rarity_type
00028 {
00029 DECK_RARITY_COMMON,
00030 DECK_RARITY_RARE,
00031 DECK_RARITY_LEGENDARY,
00032 };
00033
00034 enum deck_type
00035 {
00036
00037 DECK_OF_ESCAPE,
00038 DECK_OF_DESTRUCTION,
00039 DECK_OF_DUNGEONS,
00040 DECK_OF_SUMMONING,
00041 DECK_OF_WONDERS,
00042 };
00043
00044 enum card_flags_type
00045 {
00046 CFLAG_ODDITY = (1 << 0),
00047 CFLAG_SEEN = (1 << 1),
00048 CFLAG_MARKED = (1 << 2),
00049 };
00050
00051 enum card_type
00052 {
00053 CARD_PORTAL,
00054 CARD_WARP,
00055 CARD_SWAP,
00056 CARD_VELOCITY,
00057
00058 CARD_TOMB,
00059 CARD_BANSHEE,
00060 CARD_DAMNATION,
00061 CARD_SOLITUDE,
00062 CARD_WARPWRIGHT,
00063 CARD_FLIGHT,
00064
00065 CARD_VITRIOL,
00066 CARD_FLAME,
00067 CARD_FROST,
00068 CARD_VENOM,
00069 CARD_HAMMER,
00070 CARD_SPARK,
00071 CARD_PAIN,
00072 CARD_TORMENT,
00073
00074 CARD_ELIXIR,
00075 CARD_BATTLELUST,
00076 CARD_METAMORPHOSIS,
00077 CARD_HELM,
00078 CARD_BLADE,
00079 CARD_SHADOW,
00080
00081 CARD_CRUSADE,
00082 CARD_SUMMON_ANIMAL,
00083 CARD_SUMMON_DEMON,
00084 CARD_SUMMON_WEAPON,
00085 CARD_SUMMON_FLYING,
00086 CARD_SUMMON_SKELETON,
00087 CARD_SUMMON_UGLY,
00088 CARD_SUMMON_ANY,
00089
00090 CARD_POTION,
00091 CARD_FOCUS,
00092 CARD_SHUFFLE,
00093
00094 CARD_EXPERIENCE,
00095 CARD_WILD_MAGIC,
00096 CARD_SAGE,
00097 CARD_HELIX,
00098
00099 CARD_WATER,
00100 CARD_GLASS,
00101 CARD_MAP,
00102 CARD_DOWSING,
00103 CARD_SPADE,
00104 CARD_TROWEL,
00105 CARD_MINEFIELD,
00106 CARD_STAIRS,
00107
00108 CARD_GENIE,
00109 CARD_BARGAIN,
00110 CARD_WRATH,
00111 CARD_WRAITH,
00112 CARD_XOM,
00113 CARD_FEAST,
00114 CARD_FAMINE,
00115 CARD_CURSE,
00116 CARD_SWINE,
00117
00118 NUM_CARDS
00119 };
00120
00121 const char* card_name(card_type card);
00122 void evoke_deck(item_def& deck);
00123 bool deck_triple_draw();
00124 bool deck_peek();
00125 bool deck_mark();
00126 bool deck_stack();
00127 bool choose_deck_and_draw();
00128 void nemelex_shuffle_decks();
00129 void shuffle_all_decks_on_level();
00130
00131
00132 bool card_effect(card_type which_card, deck_rarity_type rarity,
00133 uint8_t card_flags = 0, bool tell_card = true);
00134 void draw_from_deck_of_punishment();
00135
00136 bool top_card_is_known(const item_def &item);
00137 card_type top_card(const item_def &item);
00138
00139 bool is_deck(const item_def &item);
00140 bool bad_deck(const item_def &item);
00141 deck_rarity_type deck_rarity(const item_def &item);
00142 uint8_t deck_rarity_to_color(deck_rarity_type rarity);
00143 void init_deck(item_def &item);
00144
00145 int cards_in_deck(const item_def &deck);
00146 card_type get_card_and_flags(const item_def& deck, int idx,
00147 uint8_t& _flags);
00148
00149
00150 void create_pond(const coord_def& center, int radius, bool allow_deep);
00151 void sage_card(int power, deck_rarity_type rarity);
00152
00153 const std::vector<card_type> get_drawn_cards(const item_def& deck);
00154
00155 #endif