Duel.GetChainMaterial
Signature
lua
Duel.GetChainMaterial(int player) -> Effect|nilDescription
Returns the first EFFECT_CHAIN_MATERIAL effect currently applying to player, or nil if none applies. Fusion-style scripts use the returned effect's target and operation callbacks to handle Chain Material alternatives.
Parameters
playerint- Player checked for an applying EFFECT_CHAIN_MATERIAL effect.
Returns
Effect|nil- First applying EFFECT_CHAIN_MATERIAL effect; no Lua value is pushed if player is invalid or no such effect exists, which behaves as nil in normal assignment.
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:4889
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 219 indexed script(s).
- Search this function in the Script Explorer with
Duel.GetChainMaterial.
Script Examples
Salamandra with Chain (62091148)
Source: Scripts/c62091148.lua
lua
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()Artmage Non-Finito (74631897)
Source: Scripts/c74631897.lua
lua
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()