Commit a5de4ce1 authored by Edoardo Lolletti's avatar Edoardo Lolletti Committed by GitHub

Don't put extra deck monsters above faceup pendulums in swap_deck_and_grave (#380)

parent b585a1dc
......@@ -1048,6 +1048,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
++clit;
}
for(auto& pcard : player[playerid].list_grave) {
pcard->current.position = POS_FACEUP;
pcard->current.location = LOCATION_GRAVE;
pcard->current.reason = REASON_EFFECT;
pcard->current.reason_effect = core.reason_effect;
......@@ -1057,6 +1058,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
pcard->reset(RESET_TOGRAVE, RESET_EVENT);
}
for(auto& pcard : player[playerid].list_main) {
pcard->current.position = POS_FACEDOWN_DEFENSE;
pcard->current.location = LOCATION_DECK;
pcard->current.reason = REASON_EFFECT;
pcard->current.reason_effect = core.reason_effect;
......@@ -1066,6 +1068,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
pcard->reset(RESET_TODECK, RESET_EVENT);
}
for(auto& pcard : ex) {
pcard->current.position = POS_FACEDOWN_DEFENSE;
pcard->current.location = LOCATION_EXTRA;
pcard->current.reason = REASON_EFFECT;
pcard->current.reason_effect = core.reason_effect;
......@@ -1074,7 +1077,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
pcard->enable_field_effect(true);
pcard->reset(RESET_TODECK, RESET_EVENT);
}
player[playerid].list_extra.insert(player[playerid].list_extra.end(), ex.begin(), ex.end());
player[playerid].list_extra.insert(player[playerid].list_extra.end() - player[playerid].extra_p_count, ex.begin(), ex.end());
reset_sequence(playerid, LOCATION_GRAVE);
reset_sequence(playerid, LOCATION_EXTRA);
pduel->write_buffer8(MSG_SWAP_GRAVE_DECK);
......
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