Commit 7188b8bc authored by salix5's avatar salix5
parent 33a232b8
...@@ -389,6 +389,9 @@ public: ...@@ -389,6 +389,9 @@ public:
#define SUMMON_TYPE_PENDULUM 0x4a000000 #define SUMMON_TYPE_PENDULUM 0x4a000000
#define SUMMON_TYPE_LINK 0x4c000000 #define SUMMON_TYPE_LINK 0x4c000000
#define SUMMON_TYPE_MAIN 0xf0000000
#define SUMMON_TYPE_LOCATION 0x00ff0000
//Counter //Counter
#define COUNTER_WITHOUT_PERMIT 0x1000 #define COUNTER_WITHOUT_PERMIT 0x1000
//#define COUNTER_NEED_ENABLE 0x2000 //#define COUNTER_NEED_ENABLE 0x2000
...@@ -403,7 +406,7 @@ public: ...@@ -403,7 +406,7 @@ public:
#define ASSUME_ATTACK 7 #define ASSUME_ATTACK 7
#define ASSUME_DEFENSE 8 #define ASSUME_DEFENSE 8
//Summon info //Special Summon effect info
#define SUMMON_INFO_CODE 0x01 #define SUMMON_INFO_CODE 0x01
#define SUMMON_INFO_CODE2 0x02 #define SUMMON_INFO_CODE2 0x02
#define SUMMON_INFO_TYPE 0x04 #define SUMMON_INFO_TYPE 0x04
......
...@@ -24,6 +24,10 @@ typedef signed char int8; ...@@ -24,6 +24,10 @@ typedef signed char int8;
#define ADD_BIT(x,y) ((x)|=(y)) #define ADD_BIT(x,y) ((x)|=(y))
#define REMOVE_BIT(x,y) ((x)&=~(y)) #define REMOVE_BIT(x,y) ((x)&=~(y))
constexpr bool match_all(uint32 x, uint32 y) {
return (x & y) == y;
}
#define OPERATION_SUCCESS 1 #define OPERATION_SUCCESS 1
#define OPERATION_FAIL 0 #define OPERATION_FAIL 0
#define OPERATION_CANCELED -1 #define OPERATION_CANCELED -1
......
...@@ -1824,14 +1824,14 @@ int32 scriptlib::duel_disable_summon(lua_State *L) { ...@@ -1824,14 +1824,14 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
sumplayer = pcard->summon_player; sumplayer = pcard->summon_player;
pcard->set_status(STATUS_SUMMONING, FALSE); pcard->set_status(STATUS_SUMMONING, FALSE);
pcard->set_status(STATUS_SUMMON_DISABLED, TRUE); pcard->set_status(STATUS_SUMMON_DISABLED, TRUE);
if((pcard->summon_info & SUMMON_TYPE_PENDULUM) != SUMMON_TYPE_PENDULUM) if (!match_all(pcard->summon_info, SUMMON_TYPE_FLIP) && !match_all(pcard->summon_info, SUMMON_TYPE_DUAL))
pcard->set_status(STATUS_PROC_COMPLETE, FALSE); pcard->set_status(STATUS_PROC_COMPLETE, FALSE);
} else { } else {
for(auto& pcard : pgroup->container) { for(auto& pcard : pgroup->container) {
sumplayer = pcard->summon_player; sumplayer = pcard->summon_player;
pcard->set_status(STATUS_SUMMONING, FALSE); pcard->set_status(STATUS_SUMMONING, FALSE);
pcard->set_status(STATUS_SUMMON_DISABLED, TRUE); pcard->set_status(STATUS_SUMMON_DISABLED, TRUE);
if((pcard->summon_info & SUMMON_TYPE_PENDULUM) != SUMMON_TYPE_PENDULUM) if (!match_all(pcard->summon_info, SUMMON_TYPE_FLIP) && !match_all(pcard->summon_info, SUMMON_TYPE_DUAL))
pcard->set_status(STATUS_PROC_COMPLETE, FALSE); pcard->set_status(STATUS_PROC_COMPLETE, FALSE);
} }
} }
......
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