Commit b1f7d56a authored by nanahira's avatar nanahira

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

parents a78b48f3 4d2e3603
...@@ -10,3 +10,9 @@ else () ...@@ -10,3 +10,9 @@ else ()
endif () endif ()
add_library (ocgcore STATIC ${AUTO_FILES_RESULT}) add_library (ocgcore STATIC ${AUTO_FILES_RESULT})
if (MSVC)
target_link_libraries (ocgcore lua)
else ()
target_link_libraries (ocgcore ${LUA_LIBRARIES})
endif ()
...@@ -1986,8 +1986,12 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui ...@@ -1986,8 +1986,12 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core.units.begin()->step = 14; core.units.begin()->step = 14;
return FALSE; return FALSE;
} }
if(proc) if(proc) {
remove_oath_effect(proc); remove_oath_effect(proc);
if(proc->is_flag(EFFECT_FLAG_COUNT_LIMIT) && (proc->count_code & EFFECT_COUNT_CODE_OATH)) {
dec_effect_code(proc->count_code, sumplayer);
}
}
if(target->current.location == LOCATION_MZONE) if(target->current.location == LOCATION_MZONE)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0); send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
adjust_instant(); adjust_instant();
...@@ -2855,7 +2859,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin ...@@ -2855,7 +2859,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
core.units.begin()->step = 14; core.units.begin()->step = 14;
return FALSE; return FALSE;
} }
remove_oath_effect(core.units.begin()->peffect); effect* peffect = core.units.begin()->peffect;
remove_oath_effect(peffect);
if(peffect->is_flag(EFFECT_FLAG_COUNT_LIMIT) && (peffect->count_code & EFFECT_COUNT_CODE_OATH)) {
dec_effect_code(peffect->count_code, sumplayer);
}
if(target->current.location == LOCATION_MZONE) if(target->current.location == LOCATION_MZONE)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0); send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
adjust_instant(); adjust_instant();
...@@ -3031,7 +3039,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin ...@@ -3031,7 +3039,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
adjust_instant(); adjust_instant();
} }
if(pgroup->container.size() == 0) { if(pgroup->container.size() == 0) {
remove_oath_effect(core.units.begin()->peffect); effect* peffect = core.units.begin()->peffect;
remove_oath_effect(peffect);
if(peffect->is_flag(EFFECT_FLAG_COUNT_LIMIT) && (peffect->count_code & EFFECT_COUNT_CODE_OATH)) {
dec_effect_code(peffect->count_code, sumplayer);
}
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0);
return TRUE; return TRUE;
} }
......
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