Skip to content

Duel.GetFusionMaterial ​

Signature ​

lua
Duel.GetFusionMaterial(int player, [int location]) -> Group,Group

Description ​

Returns two Groups for player: all currently usable Fusion Material candidates, then the base material pool from the requested locations. location defaults to LOCATION_HAND + LOCATION_MZONE. Extra Fusion Material effects in the Spell & Trap Zone or GY are added to the first returned Group, while the second Group contains only cards from location.

Parameters ​

  • player int - Player whose Fusion Material pool is collected.
  • location int optional - Location mask for the base pool; default: LOCATION_HAND + LOCATION_MZONE.

Returns ​

  • Group - All currently usable Fusion Material candidates, including extra Fusion Material effects.
  • Group - Base material pool from the requested locations only.

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:5000

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 187 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetFusionMaterial.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua2
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua1
Artmage Non-Finito74631897Scripts/c74631897.lua2
Lady's Dragonmaid48658295Scripts/c48658295.lua2
Eternal Favorite87532344Scripts/c87532344.lua2
Surprise Fusion35167375Scripts/c35167375.lua2
Spellbook of the Grand Circle11911336Scripts/c11911336.lua2
Ultra Polymerization76647978Scripts/c76647978.lua2
Melffy Playtime Surprise58036097Scripts/c58036097.lua1
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua2
Yomagna the Fire Phantom17350692Scripts/c17350692.lua2
Mementotlan Fusion66518509Scripts/c66518509.lua2
Favorite HERO Flame Wingman13243124Scripts/c13243124.lua2
Mixousia the Confounder80843006Scripts/c80843006.lua2
Gem-Knight Dispersion24220368Scripts/c24220368.lua2
Invoked Sorath43989315Scripts/c43989315.lua2
Spirit Illusion71939275Scripts/c71939275.lua2
Destratification Dino Stratiae3841104Scripts/c3841104.lua2
Hecahands Tartaros57809669Scripts/c57809669.lua2
Aiwass, Divine Spirit of the Law84288367Scripts/c84288367.lua1
Tohushaddoll Grysta95072744Scripts/c95072744.lua2
GMX 55th Experiment Report38984832Scripts/c38984832.lua2
Predaplant Bal Teah66787942Scripts/c66787942.lua2
Teleport Fusion36494597Scripts/c36494597.lua2
...and 163 more

Script Examples ​

Salamandra with Chain (62091148) ​

Source: Scripts/c62091148.lua

lua
	if chk==0 then
		local chkf=tp
		local mg1=Duel.GetFusionMaterial(tp)
		local mg2=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE,0,nil)
		mg1:Merge(mg2)

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
	Duel.Release(c,REASON_EFFECT)
	local chkf=tp
	local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter0,nil,e)
	local mg2=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_EXTRA,0,nil,e)
	mg1:Merge(mg2)

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
	if chk==0 then
		local chkf=tp
		local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
		local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
		if not res then