Commit 9a643368 authored by DailyShana's avatar DailyShana

update move to field

parent 83d1ccf9
...@@ -310,7 +310,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc ...@@ -310,7 +310,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
if (playerid == preplayer && sequence == presequence) if (playerid == preplayer && sequence == presequence)
return; return;
if((location == LOCATION_MZONE && (sequence < 0 || sequence > 4 || player[playerid].list_mzone[sequence])) if((location == LOCATION_MZONE && (sequence < 0 || sequence > 4 || player[playerid].list_mzone[sequence]))
|| (location == LOCATION_SZONE && (sequence < 0 || sequence > 4 || player[playerid].list_szone[sequence]))) || (location == LOCATION_SZONE && (sequence < 0 || sequence > 7 || player[playerid].list_szone[sequence])))
return; return;
if(preplayer == playerid) { if(preplayer == playerid) {
pduel->write_buffer8(MSG_MOVE); pduel->write_buffer8(MSG_MOVE);
......
...@@ -3794,12 +3794,14 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret ...@@ -3794,12 +3794,14 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
} }
} else if(!is_equip && location == LOCATION_SZONE && (target->data.type & TYPE_PENDULUM)) { } else if(!is_equip && location == LOCATION_SZONE && (target->data.type & TYPE_PENDULUM)) {
uint32 flag = 0; uint32 flag = 0;
if(!get_field_card(playerid, LOCATION_SZONE, 6)) if(is_location_useable(playerid, LOCATION_SZONE, 6))
flag |= 1 << 14; flag |= 1 << 14;
if(!get_field_card(playerid, LOCATION_SZONE, 7)) if(is_location_useable(playerid, LOCATION_SZONE, 7))
flag |= 1 << 15; flag |= 1 << 15;
if(move_player != playerid)
flag = flag << 16;
pduel->write_buffer8(MSG_SELECT_PLACE); pduel->write_buffer8(MSG_SELECT_PLACE);
pduel->write_buffer8(playerid); pduel->write_buffer8(move_player);
pduel->write_buffer8(1); pduel->write_buffer8(1);
pduel->write_buffer32(~flag); pduel->write_buffer32(~flag);
} else { } else {
......
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