Commit 1d378cf9 authored by DailyShana's avatar DailyShana

disable extra monster zone

parent ea67cf7e
...@@ -541,9 +541,9 @@ int32 field::get_useable_count_fromex(uint8 playerid, uint8 uplayer, uint32 zone ...@@ -541,9 +541,9 @@ int32 field::get_useable_count_fromex(uint8 playerid, uint8 uplayer, uint32 zone
if(player[playerid].list_mzone[5] || player[playerid].list_mzone[6] || !(zone & ((1u << 5) | (1u << 6)))) { if(player[playerid].list_mzone[5] || player[playerid].list_mzone[6] || !(zone & ((1u << 5) | (1u << 6)))) {
flag |= (1u << 5) | (1u << 6); flag |= (1u << 5) | (1u << 6);
maxcount = 5; maxcount = 5;
} else if(player[1 - playerid].list_mzone[5] || !(zone & (1u << 6))) } else if(player[1 - playerid].list_mzone[5] || !is_location_useable(playerid, LOCATION_MZONE, 6) || !(zone & (1u << 6)))
flag |= 1u << 6; flag |= 1u << 6;
else if(player[1 - playerid].list_mzone[6] || !(zone & (1u << 5))) else if(player[1 - playerid].list_mzone[6] || !is_location_useable(playerid, LOCATION_MZONE, 5) || !(zone & (1u << 5)))
flag |= 1u << 5; flag |= 1u << 5;
if(list) if(list)
*list = flag; *list = flag;
......
...@@ -4832,8 +4832,8 @@ void field::refresh_location_info_instant() { ...@@ -4832,8 +4832,8 @@ void field::refresh_location_info_instant() {
filter_field_effect(EFFECT_DISABLE_FIELD, &eset); filter_field_effect(EFFECT_DISABLE_FIELD, &eset);
for (int32 i = 0; i < eset.size(); ++i) { for (int32 i = 0; i < eset.size(); ++i) {
value = eset[i]->get_value(); value = eset[i]->get_value();
player[0].disabled_location |= value & 0x1f1f; player[0].disabled_location |= value & 0x1f7f;
player[1].disabled_location |= (value >> 16) & 0x1f1f; player[1].disabled_location |= (value >> 16) & 0x1f7f;
} }
eset.clear(); eset.clear();
filter_field_effect(EFFECT_USE_EXTRA_MZONE, &eset); filter_field_effect(EFFECT_USE_EXTRA_MZONE, &eset);
...@@ -4849,6 +4849,8 @@ void field::refresh_location_info_instant() { ...@@ -4849,6 +4849,8 @@ void field::refresh_location_info_instant() {
value = eset[i]->get_value(); value = eset[i]->get_value();
player[p].disabled_location |= (value >> 8) & 0x1f00; player[p].disabled_location |= (value >> 8) & 0x1f00;
} }
player[0].disabled_location |= ((player[1].disabled_location >> 5) << 6) | ((player[1].disabled_location >> 6) << 5);
player[1].disabled_location |= ((player[0].disabled_location >> 5) << 6) | ((player[0].disabled_location >> 6) << 5);
uint32 dis2 = player[0].disabled_location | (player[1].disabled_location << 16); uint32 dis2 = player[0].disabled_location | (player[1].disabled_location << 16);
if(dis1 != dis2) { if(dis1 != dis2) {
pduel->write_buffer8(MSG_FIELD_DISABLED); pduel->write_buffer8(MSG_FIELD_DISABLED);
...@@ -4877,8 +4879,8 @@ int32 field::refresh_location_info(uint16 step) { ...@@ -4877,8 +4879,8 @@ int32 field::refresh_location_info(uint16 step) {
for (int32 i = 0; i < eset.size(); ++i) { for (int32 i = 0; i < eset.size(); ++i) {
value = eset[i]->get_value(); value = eset[i]->get_value();
if(value) { if(value) {
player[0].disabled_location |= value & 0x1f1f; player[0].disabled_location |= value & 0x1f7f;
player[1].disabled_location |= (value >> 16) & 0x1f1f; player[1].disabled_location |= (value >> 16) & 0x1f7f;
} else } else
core.disfield_effects.add_item(eset[i]); core.disfield_effects.add_item(eset[i]);
} }
...@@ -4920,17 +4922,17 @@ int32 field::refresh_location_info(uint16 step) { ...@@ -4920,17 +4922,17 @@ int32 field::refresh_location_info(uint16 step) {
return FALSE; return FALSE;
} }
case 2: { case 2: {
returns.ivalue[0] &= 0x1f1f1f1f; returns.ivalue[0] &= 0x1f7f1f7f;
if(returns.ivalue[0] == 0) if(returns.ivalue[0] == 0)
returns.ivalue[0] = 0x80; returns.ivalue[0] = 0x80;
if(core.units.begin()->peffect->get_handler_player() == 0) { if(core.units.begin()->peffect->get_handler_player() == 0) {
core.units.begin()->peffect->value = returns.ivalue[0]; core.units.begin()->peffect->value = returns.ivalue[0];
player[0].disabled_location |= returns.ivalue[0] & 0x1f1f; player[0].disabled_location |= returns.ivalue[0] & 0x1f7f;
player[1].disabled_location |= (returns.ivalue[0] >> 16) & 0x1f1f; player[1].disabled_location |= (returns.ivalue[0] >> 16) & 0x1f7f;
} else { } else {
core.units.begin()->peffect->value = ((returns.ivalue[0] << 16) | (returns.ivalue[0] >> 16)); core.units.begin()->peffect->value = ((returns.ivalue[0] << 16) | (returns.ivalue[0] >> 16));
player[1].disabled_location |= returns.ivalue[0] & 0x1f1f; player[1].disabled_location |= returns.ivalue[0] & 0x1f7f;
player[0].disabled_location |= (returns.ivalue[0] >> 16) & 0x1f1f; player[0].disabled_location |= (returns.ivalue[0] >> 16) & 0x1f7f;
} }
core.units.begin()->step = 0; core.units.begin()->step = 0;
return FALSE; return FALSE;
...@@ -5016,6 +5018,8 @@ int32 field::refresh_location_info(uint16 step) { ...@@ -5016,6 +5018,8 @@ int32 field::refresh_location_info(uint16 step) {
return FALSE; return FALSE;
} }
case 7: { case 7: {
player[0].disabled_location |= ((player[1].disabled_location >> 5) << 6) | ((player[1].disabled_location >> 6) << 5);
player[1].disabled_location |= ((player[0].disabled_location >> 5) << 6) | ((player[0].disabled_location >> 6) << 5);
uint32 dis = player[0].disabled_location | (player[1].disabled_location << 16); uint32 dis = player[0].disabled_location | (player[1].disabled_location << 16);
if(dis != (uint32)core.units.begin()->arg2) { if(dis != (uint32)core.units.begin()->arg2) {
pduel->write_buffer8(MSG_FIELD_DISABLED); pduel->write_buffer8(MSG_FIELD_DISABLED);
......
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