Commit 2803adff authored by VanillaSalt's avatar VanillaSalt

fix

parent 3c75ed71
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
const unsigned short PRO_VERSION = 0x1320; const unsigned short PRO_VERSION = 0x1321;
namespace ygo { namespace ygo {
......
...@@ -155,7 +155,7 @@ int32 effect::is_activateable(uint8 playerid, tevent& e, int32 neglect_cond, int ...@@ -155,7 +155,7 @@ int32 effect::is_activateable(uint8 playerid, tevent& e, int32 neglect_cond, int
return FALSE; return FALSE;
} else if(!(type & EFFECT_TYPE_CONTINUOUS)) { } else if(!(type & EFFECT_TYPE_CONTINUOUS)) {
if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED)) if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED))
&& !(code & EVENT_FLIP) && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED))) && (code != EVENT_FLIP) && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED)))
return FALSE; return FALSE;
if(!(type & (EFFECT_TYPE_FLIP | EFFECT_TYPE_TRIGGER_F))) { if(!(type & (EFFECT_TYPE_FLIP | EFFECT_TYPE_TRIGGER_F))) {
if((code < 1132 || code > 1149) && pduel->game_field->infos.phase == PHASE_DAMAGE && !(flag & EFFECT_FLAG_DAMAGE_STEP)) if((code < 1132 || code > 1149) && pduel->game_field->infos.phase == PHASE_DAMAGE && !(flag & EFFECT_FLAG_DAMAGE_STEP))
......
...@@ -413,7 +413,8 @@ public: ...@@ -413,7 +413,8 @@ public:
#define EVENT_LEVEL_UP 1200 #define EVENT_LEVEL_UP 1200
#define EVENT_PAY_LPCOST 1201 #define EVENT_PAY_LPCOST 1201
#define EVENT_DETACH_MATERIAL 1202 #define EVENT_DETACH_MATERIAL 1202
#define EVENT_CONFIRM 1203 #define EVENT_CONFIRM_DECKTOP 1203
#define EVENT_CONFIRM_CARDS 1204
#define EVENT_TURN_END 1210 #define EVENT_TURN_END 1210
#define EVENT_PHASE 0x1000 #define EVENT_PHASE 0x1000
#define EVENT_PHASE_START 0x2000 #define EVENT_PHASE_START 0x2000
......
...@@ -649,7 +649,7 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) { ...@@ -649,7 +649,7 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) {
pduel->write_buffer8((*cit)->current.sequence); pduel->write_buffer8((*cit)->current.sequence);
cset.insert(*cit); cset.insert(*cit);
} }
pduel->game_field->raise_event(&cset, EVENT_CONFIRM, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0); pduel->game_field->raise_event(&cset, EVENT_CONFIRM_DECKTOP, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0);
pduel->game_field->process_instant_event(); pduel->game_field->process_instant_event();
return lua_yield(L, 0); return lua_yield(L, 0);
} }
...@@ -689,9 +689,9 @@ int32 scriptlib::duel_confirm_cards(lua_State *L) { ...@@ -689,9 +689,9 @@ int32 scriptlib::duel_confirm_cards(lua_State *L) {
} }
} }
if(pcard) if(pcard)
pduel->game_field->raise_event(pcard, EVENT_CONFIRM, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0); pduel->game_field->raise_event(pcard, EVENT_CONFIRM_CARDS, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0);
else else
pduel->game_field->raise_event(&pgroup->container, EVENT_CONFIRM, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0); pduel->game_field->raise_event(&pgroup->container, EVENT_CONFIRM_CARDS, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0);
pduel->game_field->process_instant_event(); pduel->game_field->process_instant_event();
return lua_yield(L, 0); return lua_yield(L, 0);
} }
......
...@@ -503,6 +503,8 @@ EVENT_TOSS_DICE_NEGATE =1153 ...@@ -503,6 +503,8 @@ EVENT_TOSS_DICE_NEGATE =1153
EVENT_LEVEL_UP =1200 EVENT_LEVEL_UP =1200
EVENT_PAY_LPCOST =1201 EVENT_PAY_LPCOST =1201
EVENT_DETACH_MATERIAL =1202 EVENT_DETACH_MATERIAL =1202
EVENT_CONFIRM_DECKTOP =1203
EVENT_CONFIRM_CARDS =1204
EVENT_TURN_END =1210 EVENT_TURN_END =1210
EVENT_PHASE =0x1000 EVENT_PHASE =0x1000
EVENT_PHASE_START =0x2000 EVENT_PHASE_START =0x2000
......
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