Commit f29d5d87 authored by DailyShana's avatar DailyShana

extra bottom

parent 56921480
......@@ -182,8 +182,18 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
break;
}
case LOCATION_EXTRA: {
extra[controler].push_back(pcard);
pcard->sequence = extra[controler].size() - 1;
if (sequence != 0 || extra[controler].size() == 0) {
extra[controler].push_back(pcard);
pcard->sequence = extra[controler].size() - 1;
} else {
extra[controler].push_back(0);
for(int i = extra[controler].size() - 1; i > 0; --i) {
extra[controler][i] = extra[controler][i - 1];
extra[controler][i]->sequence++;
}
extra[controler][0] = pcard;
pcard->sequence = 0;
}
break;
}
}
......
......@@ -148,6 +148,7 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
return;
if((pcard->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) && (location & (LOCATION_HAND | LOCATION_DECK))) {
location = LOCATION_EXTRA;
sequence = 1;
pcard->operation_param = (pcard->operation_param & 0x00ffffff) | (POS_FACEDOWN_DEFENCE << 24);
}
pcard->current.controler = playerid;
......@@ -193,8 +194,13 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
pcard->current.sequence = player[playerid].list_remove.size() - 1;
break;
case LOCATION_EXTRA:
player[playerid].list_extra.push_back(pcard);
pcard->current.sequence = player[playerid].list_extra.size() - 1;
if (sequence == 1) {
player[playerid].list_extra.insert(player[playerid].list_extra.begin(), pcard);
reset_sequence(playerid, LOCATION_EXTRA);
} else {
player[playerid].list_extra.push_back(pcard);
pcard->current.sequence = player[playerid].list_extra.size() - 1;
}
break;
}
pcard->apply_field_effect();
......@@ -260,6 +266,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
uint8 presequence = pcard->current.sequence;
if((pcard->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) && (location & (LOCATION_HAND | LOCATION_DECK))) {
location = LOCATION_EXTRA;
sequence = 1;
pcard->operation_param = (pcard->operation_param & 0x00ffffff) | (POS_FACEDOWN_DEFENCE << 24);
}
if (pcard->current.location) {
......@@ -367,6 +374,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
&& (((pcard->current.location == LOCATION_MZONE) && !pcard->is_status(STATUS_SUMMON_DISABLED))
|| ((pcard->current.location == LOCATION_SZONE) && !pcard->is_status(STATUS_ACTIVATE_DISABLED)))) {
location = LOCATION_EXTRA;
sequence = 0;
pcard->operation_param = (pcard->operation_param & 0x00ffffff) | (POS_FACEUP_DEFENCE << 24);
}
remove_card(pcard);
......
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