Commit 5ad51909 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro-core

parents 5d11f91d 889a3bd9
...@@ -218,7 +218,7 @@ enum effect_flag : uint32 { ...@@ -218,7 +218,7 @@ enum effect_flag : uint32 {
EFFECT_FLAG_IMMEDIATELY_APPLY = 0x80000000, EFFECT_FLAG_IMMEDIATELY_APPLY = 0x80000000,
}; };
enum effect_flag2 : uint32 { enum effect_flag2 : uint32 {
EFFECT_FLAG2_MILLENNIUM_RESTRICT = 0x0001, // EFFECT_FLAG2_MILLENNIUM_RESTRICT = 0x0001,
EFFECT_FLAG2_COF = 0x0002, EFFECT_FLAG2_COF = 0x0002,
EFFECT_FLAG2_WICKED = 0x0004, EFFECT_FLAG2_WICKED = 0x0004,
EFFECT_FLAG2_OPTION = 0x0008, EFFECT_FLAG2_OPTION = 0x0008,
......
...@@ -3433,8 +3433,9 @@ int32 field::get_cteffect(effect* peffect, int32 playerid, int32 store) { ...@@ -3433,8 +3433,9 @@ int32 field::get_cteffect(effect* peffect, int32 playerid, int32 store) {
continue; continue;
uint32 code = efit.first; uint32 code = efit.first;
if(code == EVENT_FREE_CHAIN || code == EVENT_PHASE + infos.phase) { if(code == EVENT_FREE_CHAIN || code == EVENT_PHASE + infos.phase) {
nil_event.event_code = code; tevent test_event;
if(get_cteffect_evt(feffect, playerid, nil_event, store) && !store) test_event.event_code = code;
if(get_cteffect_evt(feffect, playerid, test_event, store) && !store)
return TRUE; return TRUE;
} else { } else {
for(const auto& ev : core.point_event) { for(const auto& ev : core.point_event) {
...@@ -3483,8 +3484,9 @@ int32 field::check_cteffect_hint(effect* peffect, uint8 playerid) { ...@@ -3483,8 +3484,9 @@ int32 field::check_cteffect_hint(effect* peffect, uint8 playerid) {
continue; continue;
uint32 code = efit.first; uint32 code = efit.first;
if(code == EVENT_FREE_CHAIN || code == EVENT_PHASE + infos.phase) { if(code == EVENT_FREE_CHAIN || code == EVENT_PHASE + infos.phase) {
nil_event.event_code = code; tevent test_event;
if(get_cteffect_evt(feffect, playerid, nil_event, FALSE) test_event.event_code = code;
if(get_cteffect_evt(feffect, playerid, test_event, FALSE)
&& (code != EVENT_FREE_CHAIN || check_hint_timing(feffect))) && (code != EVENT_FREE_CHAIN || check_hint_timing(feffect)))
return TRUE; return TRUE;
} else { } else {
......
...@@ -5148,8 +5148,9 @@ int32 field::activate_effect(uint16 step, effect* peffect) { ...@@ -5148,8 +5148,9 @@ int32 field::activate_effect(uint16 step, effect* peffect) {
case 0: { case 0: {
card* phandler = peffect->get_handler(); card* phandler = peffect->get_handler();
int32 playerid = phandler->current.controler; int32 playerid = phandler->current.controler;
nil_event.event_code = EVENT_FREE_CHAIN; tevent test_event;
if(!peffect->is_activateable(playerid, nil_event)) test_event.event_code = EVENT_FREE_CHAIN;
if(!peffect->is_activateable(playerid, test_event))
return TRUE; return TRUE;
chain newchain; chain newchain;
newchain.flag = 0; newchain.flag = 0;
......
This diff is collapsed.
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