core: a Tag team on Master Rule 4/5 has a Field slot per partner (TICKET-384, v1.5.0)
Proposal 45. field::has_two_fields() (DUEL_TAG_MODE on Master Rule 4 or 5) gives each team Spell/Trap sequence 5 for the partner who plays the team's first turn and 6 for the other; player_info::tag_partner flips in tag_swap and get_szone_size is 7 there. A Field Spell lands in the playing partner's slot (get_fzone_landing) and replaces only that card; a control change takes the free slot when the playing partner's is taken; a Set offers only the landing slot's bit. LOCATION_FZONE covers both slots in card_state::is_location, filter_matching_card, filter_field_card, is_location_useable and Duel.IsEnvironment; get_field_card(p, LOCATION_FZONE, 0) is the playing partner's field, else the other, and 1 the remaining one. Singles, Match and Master Rule 3 (slot 6 = a Pendulum Zone) are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
10ade7fc41
commit
bcd19c9cd0
5 files changed
+98
-44
No files matched your search
+10
-11
@@ -1575,17 +1575,16 @@ int32_t scriptlib::duel_is_environment(lua_State *L) {
|
||||
duel* pduel = interpreter::get_duel_info(L);
|
||||
int32_t ret = 0, fc = 0;
|
||||
if(loc & (LOCATION_FZONE + LOCATION_SZONE)) {
|
||||
card* pcard = pduel->game_field->player[0].list_szone[5];
|
||||
if(pcard && pcard->is_position(POS_FACEUP)) {
|
||||
fc = 1;
|
||||
if(code == pcard->get_code() && (playerid == 0 || playerid == PLAYER_ALL))
|
||||
ret = 1;
|
||||
}
|
||||
pcard = pduel->game_field->player[1].list_szone[5];
|
||||
if(pcard && pcard->is_position(POS_FACEUP)) {
|
||||
fc = 1;
|
||||
if(code == pcard->get_code() && (playerid == 1 || playerid == PLAYER_ALL))
|
||||
ret = 1;
|
||||
field* pfield = pduel->game_field;
|
||||
for(uint8_t p = 0; p < 2; ++p) {
|
||||
for(uint8_t fseq = 0, fzones = pfield->has_two_fields() ? 2 : 1; fseq < fzones; ++fseq) { // [YGOL] proposal 45: both Field slots
|
||||
card* pcard = pfield->player[p].list_szone[pfield->get_fzone_sequence(p, fseq)];
|
||||
if(pcard && pcard->is_position(POS_FACEUP)) {
|
||||
fc = 1;
|
||||
if(code == pcard->get_code() && (playerid == p || playerid == PLAYER_ALL))
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!ret && (loc & LOCATION_SZONE)) {
|
||||
|
||||
Reference in new issue
Block a user