Commit 2f5fe624 authored by fallenstardust's avatar fallenstardust

sync ocgcore

parent 765fcc87
......@@ -3227,8 +3227,6 @@ int32 field::check_chain_target(uint8 chaincount, card * pcard) {
uint8 tp = pchain->triggering_player;
if(!peffect->is_flag(EFFECT_FLAG_CARD_TARGET) || !peffect->target)
return FALSE;
if(!pcard->is_capable_be_effect_target(peffect, tp))
return false;
pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT);
pduel->lua->add_param(tp, PARAM_TYPE_INT);
pduel->lua->add_param(pchain->evt.event_cards , PARAM_TYPE_GROUP);
......
......@@ -1961,8 +1961,12 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core.units.begin()->step = 14;
return FALSE;
}
if(proc)
if(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)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
adjust_instant();
......@@ -2826,7 +2830,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
core.units.begin()->step = 14;
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)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
adjust_instant();
......@@ -2999,7 +3007,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
adjust_instant();
}
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);
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