Commit 3008a77c authored by Chen Bill's avatar Chen Bill Committed by GitHub

add TYPES_EXTRA_DECK (#617)

parent ca6f8413
...@@ -3244,12 +3244,12 @@ int32 card::check_cost_condition(int32 ecode, int32 playerid, int32 sumtype) { ...@@ -3244,12 +3244,12 @@ int32 card::check_cost_condition(int32 ecode, int32 playerid, int32 sumtype) {
pduel->game_field->core.reason_player = op; pduel->game_field->core.reason_player = op;
return res; return res;
} }
int32 card::is_summonable_card() { int32 card::is_summonable_card() const {
if(!(data.type & TYPE_MONSTER)) if(!(data.type & TYPE_MONSTER))
return FALSE; return FALSE;
return !(data.type & (TYPE_RITUAL | TYPE_SPSUMMON if (data.type & TYPES_EXTRA_DECK)
| TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK return FALSE;
| TYPE_TOKEN | TYPE_TRAPMONSTER)); return !(data.type & (TYPE_RITUAL | TYPE_SPSUMMON | TYPE_TOKEN));
} }
int32 card::is_spsummonable_card() { int32 card::is_spsummonable_card() {
if(!(data.type & TYPE_MONSTER)) if(!(data.type & TYPE_MONSTER))
......
...@@ -212,7 +212,7 @@ public: ...@@ -212,7 +212,7 @@ public:
explicit card(duel* pd); explicit card(duel* pd);
~card() = default; ~card() = default;
static bool card_operation_sort(card* c1, card* c2); static bool card_operation_sort(card* c1, card* c2);
const bool is_extra_deck_monster() { return !!(data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)); } bool is_extra_deck_monster() const { return !!(data.type & TYPES_EXTRA_DECK); }
int32 get_infos(byte* buf, uint32 query_flag, int32 use_cache = TRUE); int32 get_infos(byte* buf, uint32 query_flag, int32 use_cache = TRUE);
uint32 get_info_location(); uint32 get_info_location();
...@@ -341,7 +341,7 @@ public: ...@@ -341,7 +341,7 @@ public:
void get_unique_target(card_set* cset, int32 controler, card* icard = nullptr); void get_unique_target(card_set* cset, int32 controler, card* icard = nullptr);
int32 check_cost_condition(int32 ecode, int32 playerid); int32 check_cost_condition(int32 ecode, int32 playerid);
int32 check_cost_condition(int32 ecode, int32 playerid, int32 sumtype); int32 check_cost_condition(int32 ecode, int32 playerid, int32 sumtype);
int32 is_summonable_card(); int32 is_summonable_card() const;
int32 is_spsummonable_card(); int32 is_spsummonable_card();
int32 is_fusion_summonable_card(uint32 summon_type); int32 is_fusion_summonable_card(uint32 summon_type);
int32 is_spsummonable(effect* proc, material_info info = null_info); int32 is_spsummonable(effect* proc, material_info info = null_info);
......
...@@ -110,6 +110,8 @@ typedef signed char int8; ...@@ -110,6 +110,8 @@ typedef signed char int8;
#define TYPE_SPSUMMON 0x2000000 // #define TYPE_SPSUMMON 0x2000000 //
#define TYPE_LINK 0x4000000 // #define TYPE_LINK 0x4000000 //
#define TYPES_EXTRA_DECK (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)
//Attributes //Attributes
#define ATTRIBUTE_ALL 0x7f // #define ATTRIBUTE_ALL 0x7f //
#define ATTRIBUTE_EARTH 0x01 // #define ATTRIBUTE_EARTH 0x01 //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment