Card.IsRelateToChain
Signature
lua
Card.IsRelateToChain(Card c, [int chainc]) -> boolDescription
Checks whether c is still related to chainc. The activating card and cards selected as targets with Duel.SetTargetCard or Duel.SelectTarget automatically become related to that Chain. The relation is lost when the card leaves the expected place.
Parameters
cCardchaincintoptional - default: 0
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3618
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 632 indexed script(s).
- Search this function in the Script Explorer with
Card.IsRelateToChain.
Script Examples
Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
function s.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
if Duel.Destroy(c,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)Azure Ocean Dragon Lord - Neo-Daedalus Rage (41570943)
Source: Scripts/c41570943.lua
lua
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if c:IsRelateToChain() and zone~=0 or ft>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft>3 then ft=3 endSurprise Fusion (35167375)
Source: Scripts/c35167375.lua
lua
local race,att=e:GetLabel()
local ec=Duel.GetFirstTarget()
if ec:IsRelateToChain() and ec:IsFaceup() and ec:IsType(TYPE_MONSTER) then
local cres=ec:GetRace()~=race or ec:GetAttribute()~=att
local e1=Effect.CreateEffect(c)