Commit cfe8df33 authored by mercury233's avatar mercury233
parents 2f0094c1 438d791f
...@@ -3312,6 +3312,8 @@ int32 card::is_spsummonable_card() { ...@@ -3312,6 +3312,8 @@ int32 card::is_spsummonable_card() {
int32 card::is_fusion_summonable_card(uint32 summon_type) { int32 card::is_fusion_summonable_card(uint32 summon_type) {
if(!(data.type & TYPE_FUSION)) if(!(data.type & TYPE_FUSION))
return FALSE; return FALSE;
if((data.type & TYPE_PENDULUM) && current.location == LOCATION_EXTRA && (current.position & POS_FACEUP))
return FALSE;
summon_type |= SUMMON_TYPE_FUSION; summon_type |= SUMMON_TYPE_FUSION;
effect_set eset; effect_set eset;
filter_effect(EFFECT_SPSUMMON_CONDITION, &eset); filter_effect(EFFECT_SPSUMMON_CONDITION, &eset);
......
...@@ -24,10 +24,6 @@ typedef signed char int8; ...@@ -24,10 +24,6 @@ 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
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "group.h" #include "group.h"
#include "ocgapi.h" #include "ocgapi.h"
inline void write_buffer_vector(std::vector<byte>& buffer, const void* data, int size) { inline void write_buffer_vector(std::vector<byte>& buffer, const void*& data, int size) {
if (size > 0) { if (size > 0) {
const auto len = buffer.size(); const auto len = buffer.size();
buffer.resize(len + size); buffer.resize(len + size);
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
#include "common.h" #include "common.h"
#include "interpreter.h" #include "interpreter.h"
constexpr bool match_all(uint32 x, uint32 y) {
return (x & y) == y;
}
class scriptlib { class scriptlib {
public: public:
static int32 check_param(lua_State* L, int32 param_type, int32 index, int32 retfalse = FALSE); static int32 check_param(lua_State* L, int32 param_type, int32 index, int32 retfalse = 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