Skip to content

Duel.SwapSequence ​

Signature ​

lua
Duel.SwapSequence(Card c1, Card c2) -> void

Description ​

Swaps the Monster Zone sequences of c1 and c2 when both are controlled by the same player, both are affected by the current reason effect, and both are in the Monster Zone. The core raises move events for the swapped cards when the swap occurs.

Parameters ​

  • c1 Card
  • c2 Card

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4885

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 7 indexed script(s).
  • Search this function in the Script Explorer with Duel.SwapSequence.
CardIDScriptDetected Calls
Arktos XII - Chronochasm Vaylantz50687050Scripts/c50687050.lua1
Elfnote Tinia59581480Scripts/c59581480.lua1
Elfnote Lucina13597785Scripts/c13597785.lua1
Elfnote Fortuna85976588Scripts/c85976588.lua1
Appliancer Dryer Drake3507053Scripts/c3507053.lua1
World Legacy's Nightmare25163979Scripts/c25163979.lua1
Castle Link22198672Scripts/c22198672.lua1

Script Examples ​

Arktos XII - Chronochasm Vaylantz (50687050) ​

Source: Scripts/c50687050.lua

lua
		local tc1=sg:GetFirst()
		local tc2=sg:GetNext()
		Duel.SwapSequence(tc1,tc2)
	end
end

Elfnote Tinia (59581480) ​

Source: Scripts/c59581480.lua

lua
	if g:GetCount()==1 then
		local tc=g:GetFirst()
		Duel.SwapSequence(c,tc)
		if c:GetSequence()==cs then return end
		if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)

Elfnote Lucina (13597785) ​

Source: Scripts/c13597785.lua

lua
	if g:GetCount()==1 then
		local tc=g:GetFirst()
		Duel.SwapSequence(c,tc)
		if c:GetSequence()==cs then return end
		if Duel.IsExistingMatchingCard(s.rthfilter,tp,0,LOCATION_MZONE,1,nil)