Skip to content

Card.SetMaterial ​

Signature ​

lua
Card.SetMaterial(Card c, [Group|nil g]) -> void

Description ​

Sets g as c's material group for a Summon, or clears c's materials when g is nil.

Parameters ​

  • c Card
  • g Group|nil optional

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 488 indexed script(s).
  • Search this function in the Script Explorer with Card.SetMaterial.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua1
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua1
Artmage Non-Finito74631897Scripts/c74631897.lua1
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua1
Lady's Dragonmaid48658295Scripts/c48658295.lua2
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua1
Eternal Favorite87532344Scripts/c87532344.lua1
Surprise Fusion35167375Scripts/c35167375.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua1
Spellbook of the Grand Circle11911336Scripts/c11911336.lua1
Ultra Polymerization76647978Scripts/c76647978.lua1
Accel Synchro Stardust Dragon30983281Scripts/c30983281.lua1
Melffy Playtime Surprise58036097Scripts/c58036097.lua1
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua1
Yomagna the Fire Phantom17350692Scripts/c17350692.lua1
Fiendsmith's Sequence49867899Scripts/c49867899.lua1
D/D/D Alfred the Divine Sage King11852093Scripts/c11852093.lua1
Mementotlan Fusion66518509Scripts/c66518509.lua1
Meteoroa Drytron24166324Scripts/c24166324.lua1
Favorite HERO Flame Wingman13243124Scripts/c13243124.lua1
Mixousia the Confounder80843006Scripts/c80843006.lua1
Gem-Knight Dispersion24220368Scripts/c24220368.lua1
Invoked Sorath43989315Scripts/c43989315.lua1
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
...and 464 more

Script Examples ​

Salamandra with Chain (62091148) ​

Source: Scripts/c62091148.lua

lua
		if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
			local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
			tc:SetMaterial(mat1)
			if mat1:IsExists(s.fdfilter,1,nil) then
				local cg=mat1:Filter(s.fdfilter,nil)

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
		if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce~=nil and not Duel.SelectYesNo(tp,ce:GetDescription())) then
			local mat=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
			tc:SetMaterial(mat)
			if mat:IsExists(Card.IsFacedown,1,nil) then
				local cg=mat:Filter(Card.IsFacedown,nil)

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
		if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
			local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
			tc:SetMaterial(mat1)
			Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
			Duel.BreakEffect()