Commit d99cd148 authored by VanillaSalt's avatar VanillaSalt

fix

parent 038ecdfe
...@@ -2527,7 +2527,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui ...@@ -2527,7 +2527,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
} }
case 23: { case 23: {
effect* peffect = core.units.begin()->peffect; effect* peffect = core.units.begin()->peffect;
card* pcard = *core.units.begin()->ptarget->it; group* pgroup = core.units.begin()->ptarget;
card* pcard = *pgroup->it;
pcard->enable_field_effect(false); pcard->enable_field_effect(false);
pcard->current.reason = REASON_SPSUMMON; pcard->current.reason = REASON_SPSUMMON;
pcard->current.reason_effect = peffect; pcard->current.reason_effect = peffect;
...@@ -2535,7 +2536,26 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui ...@@ -2535,7 +2536,26 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
pcard->summon_player = sumplayer; pcard->summon_player = sumplayer;
pcard->summon_info = (peffect->get_value(pcard) & 0xff00ffff) | SUMMON_TYPE_SPECIAL | ((uint32)pcard->current.location << 16); pcard->summon_info = (peffect->get_value(pcard) & 0xff00ffff) | SUMMON_TYPE_SPECIAL | ((uint32)pcard->current.location << 16);
check_card_counter(pcard, 3, sumplayer); check_card_counter(pcard, 3, sumplayer);
move_to_field(pcard, sumplayer, sumplayer, LOCATION_MZONE, POS_FACEUP); uint32 zone = 0xff;
if(core.duel_rule >= 4) {
uint32 flag1, flag2;
int32 ct1 = pduel->game_field->get_tofield_count(sumplayer, LOCATION_MZONE, zone, &flag1);
int32 ct2 = pduel->game_field->get_spsummonable_count_fromex(pcard, sumplayer, zone, &flag2);
for(auto it = pgroup->it; it != pgroup->container.end(); ++it) {
if((*it)->current.location != LOCATION_EXTRA)
ct1--;
else
ct2--;
}
if(pcard->current.location != LOCATION_EXTRA) {
if(ct2 == 0)
zone = ~flag1 & flag2;
} else {
if(ct1 == 0)
zone = flag1 & ~flag2;
}
}
move_to_field(pcard, sumplayer, sumplayer, LOCATION_MZONE, POS_FACEUP, FALSE, 0, FALSE, zone);
return FALSE; return FALSE;
} }
case 24: { case 24: {
......
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