Commit fe720055 authored by salix5's avatar salix5

Merge branch 'DailyShana-SendPtoExtra'

parents 62ee9cfb ab4948f2
......@@ -322,7 +322,7 @@ static const struct luaL_Reg duellib[] = {
{ "SendtoGrave", scriptlib::duel_sendto_grave },
{ "SendtoHand", scriptlib::duel_sendto_hand },
{ "SendtoDeck", scriptlib::duel_sendto_deck },
{ "SendtoExtra", scriptlib::duel_sendto_extra },
{ "PSendtoExtra", scriptlib::duel_sendto_extra },
{ "GetOperatedGroup", scriptlib::duel_get_operated_group },
{ "Summon", scriptlib::duel_summon },
{ "SpecialSummonRule", scriptlib::duel_special_summon_rule },
......
......@@ -235,8 +235,12 @@ void field::send_to(card_set* targets, effect* reason_effect, uint32 reason, uin
if(destination & LOCATION_ONFIELD)
return;
uint32 p, pos;
for(auto cit = targets->begin(); cit != targets->end(); ++cit) {
card* pcard = *cit;
for(auto cit = targets->begin(); cit != targets->end(); ) {
card* pcard = *cit++;
if((destination & LOCATION_EXTRA) && !(pcard->data.type & TYPE_PENDULUM)) {
targets->erase(pcard);
continue;
}
pcard->temp.reason = pcard->current.reason;
pcard->temp.reason_effect = pcard->current.reason_effect;
pcard->temp.reason_player = pcard->current.reason_player;
......
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