Commit b4d52a70 authored by VanillaSalt's avatar VanillaSalt

update Duel.GetControl

parent 38cbc1c7
...@@ -793,14 +793,16 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe ...@@ -793,14 +793,16 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
return TRUE; return TRUE;
if(pcard->current.location != LOCATION_MZONE) if(pcard->current.location != LOCATION_MZONE)
return TRUE; return TRUE;
if(get_useable_count(playerid, LOCATION_MZONE, playerid, LOCATION_REASON_CONTROL) <= 0)
return TRUE;
if((pcard->get_type() & TYPE_TRAPMONSTER) && get_useable_count(playerid, LOCATION_SZONE, playerid, LOCATION_REASON_CONTROL) <= 0)
return TRUE;
if(!pcard->is_capable_change_control()) if(!pcard->is_capable_change_control())
return TRUE; return TRUE;
if(!pcard->is_affect_by_effect(reason_effect)) if(!pcard->is_affect_by_effect(reason_effect))
return TRUE; return TRUE;
if(get_useable_count(playerid, LOCATION_MZONE, playerid, LOCATION_REASON_CONTROL) <= 0) {
core.units.begin()->step = 3;
return FALSE;
}
if((pcard->get_type() & TYPE_TRAPMONSTER) && get_useable_count(playerid, LOCATION_SZONE, playerid, LOCATION_REASON_CONTROL) <= 0)
return TRUE;
pcard->filter_disable_related_cards(); pcard->filter_disable_related_cards();
if(pcard->unique_code && (pcard->unique_location & LOCATION_MZONE)) if(pcard->unique_code && (pcard->unique_location & LOCATION_MZONE))
remove_unique_card(pcard); remove_unique_card(pcard);
...@@ -828,6 +830,10 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe ...@@ -828,6 +830,10 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
returns.ivalue[0] = 1; returns.ivalue[0] = 1;
return TRUE; return TRUE;
} }
case 4: {
destroy(pcard, 0, REASON_RULE, PLAYER_NONE);
return TRUE;
}
} }
return TRUE; return TRUE;
} }
......
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