Skip to content

Card.IsPreviousSetCard ​

Signature ​

lua
Card.IsPreviousSetCard(Card c, int setcode1, [int setcode2], [... int]) -> bool

Description ​

Checks whether c's previous card-code or added previous set-code data matches any supplied setcode value. Nil setcode arguments are skipped. This uses the previous state recorded before the last relevant field or position update, not c's current Set membership.

Parameters ​

  • c Card
  • setcode1 int
  • setcode2 int optional
  • ... int optional

Returns ​

  • bool

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3445

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 77 indexed script(s).
  • Search this function in the Script Explorer with Card.IsPreviousSetCard.
CardIDScriptDetected Calls
D/D/D/D Super-Dimensional Sovereign Emperor Zero Paradox97417863Scripts/c97417863.lua1
Fossil Fusion59419719Scripts/c59419719.lua1
Ursarctic Quint Charge15758127Scripts/c15758127.lua1
Gem-Knight Master Diamond Dispersion25342956Scripts/c25342956.lua1
Gunkan Sushipyard Seaside Supper Spot62200831Scripts/c62200831.lua1
Angelechy Problem17782288Scripts/c17782288.lua1
Unification of the Cubic Lords34325937Scripts/c34325937.lua1
Salamangreat Zebroid X44161893Scripts/c44161893.lua1
Ultimate Crystal Magic36328300Scripts/c36328300.lua2
PSY-Frame Accelerator51053997Scripts/c51053997.lua1
Evil HERO Inferno Wing - Backfire59893882Scripts/c59893882.lua1
Nerva the Power Patron of Creation53589300Scripts/c53589300.lua1
Battle Shogun of the Six Samurai74752631Scripts/c74752631.lua1
Fandora, the Flying Fighting Furtress26162470Scripts/c26162470.lua1
Mementotlan Akihiron54207171Scripts/c54207171.lua1
Xtra HERO Wonder Driver1948619Scripts/c1948619.lua1
Draco Awakening66092596Scripts/c66092596.lua1
Sunvine Thrasher91557476Scripts/c91557476.lua1
D/D/D Zero Doom Queen Machinex20715411Scripts/c20715411.lua1
Parametalfoes Azortless37491810Scripts/c37491810.lua1
Icejade Manifestation72776252Scripts/c72776252.lua1
Alviss of the Nordic Alfar27024795Scripts/c27024795.lua1
Centur-Ion Primera Primus8841431Scripts/c8841431.lua1
Mythical Institution94599451Scripts/c94599451.lua1
...and 53 more

Script Examples ​

D/D/D/D Super-Dimensional Sovereign Emperor Zero Paradox (97417863) ​

Source: Scripts/c97417863.lua

lua
function c97417863.lefilter(c,tp,re)
	return re and re:IsActiveType(TYPE_SPELL) and c:IsReason(REASON_EFFECT)
		and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x10af)
end
function c97417863.atkcon(e,tp,eg,ep,ev,re,r,rp)

Fossil Fusion (59419719) ​

Source: Scripts/c59419719.lua

lua
end
function c59419719.cfilter(c,tp)
	return c:IsPreviousSetCard(0x149) and c:GetPreviousTypeOnField()&TYPE_FUSION~=0
		and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
end

Ursarctic Quint Charge (15758127) ​

Source: Scripts/c15758127.lua

lua
end
function c15758127.cfilter(c,tp)
	return c:IsPreviousSetCard(0x163) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0 and c:GetPreviousControler()==tp
end
function c15758127.tdcon(e,tp,eg,ep,ev,re,r,rp)