Skip to content

Card.IsRelateToEffect ​

Signature ​

lua
Card.IsRelateToEffect(Card c, Effect e) -> bool

Description ​

Checks whether c is still related to effect e. When an effect enters the Chain, its handler and cards selected with Duel.SetTargetCard or Duel.SelectTarget are related to that effect. That relation is normally lost once the card leaves its expected place.

Parameters ​

  • c Card - Card whose relation is checked.
  • e Effect - Effect relation to test against.

Returns ​

  • bool - True if c still has relation to e.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

More guided lessons (4)

Used By ​

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

  • Detected in 6854 indexed script(s).
  • Search this function in the Script Explorer with Card.IsRelateToEffect.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua2
Pendulum Evolution55795155Scripts/c55795155.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua2
Ultra Polymerization76647978Scripts/c76647978.lua1
Goyo Emperor59255742Scripts/c59255742.lua2
Fiendsmith's Sequence49867899Scripts/c49867899.lua2
El Shaddoll Apkallone50907446Scripts/c50907446.lua1
Meteoroa Drytron24166324Scripts/c24166324.lua1
Invoked Sorath43989315Scripts/c43989315.lua1
Performage Cup Tricker6812770Scripts/c6812770.lua5
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
Spirit Illusion71939275Scripts/c71939275.lua3
Lubellion the Searing Dragon70534340Scripts/c70534340.lua1
Ghostrick Renovation61818176Scripts/c61818176.lua2
Prank-Kids Weather Washer44509529Scripts/c44509529.lua1
Odd-Eyes Revolution Dragon16306932Scripts/c16306932.lua2
Resurgam Xyz49082032Scripts/c49082032.lua1
Converging Wishes20007374Scripts/c20007374.lua2
Tohushaddoll Grysta95072744Scripts/c95072744.lua1
PSY-Framelord Omega74586817Scripts/c74586817.lua4
Graydle Split75361204Scripts/c75361204.lua3
D/D Count Surveyor5997110Scripts/c5997110.lua2
Shining Draw35906693Scripts/c35906693.lua2
Dark End Evaporation Dragon62002838Scripts/c62002838.lua3
...and 6830 more

Script Examples ​

Salamandra with Chain (62091148) ​

Source: Scripts/c62091148.lua

lua
function s.operation(e,tp,eg,ep,ev,re,r,rp)
	local c=e:GetHandler()
	if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
	local tc=Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
function c55795155.atkop(e,tp,eg,ep,ev,re,r,rp)
	local tc=Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) then
		local e1=Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)

Astrograph Sorcerer (76794549) ​

Source: Scripts/c76794549.lua

lua
function c76794549.rpop(e,tp,eg,ep,ev,re,r,rp)
	local c=e:GetHandler()
	if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
		Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(76794549,6))
		local g=Duel.SelectMatchingCard(tp,c76794549.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)