Skip to content

Card.IsDestructable ​

Signature ​

lua
Card.IsDestructable(Card c, [Effect e]) -> bool

Description ​

Checks whether c can be destroyed. Without e, the core only rejects Xyz Materials and cards already in the GY or banished. With e, it checks whether c is affected by e and whether effect-destruction protection applies for the current reason player.

Parameters ​

  • c Card
  • e Effect optional

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 89 indexed script(s).
  • Search this function in the Script Explorer with Card.IsDestructable.
CardIDScriptDetected Calls
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua1
Camelot, Realm of Noble Knights and Noble Arms15635751Scripts/c15635751.lua1
Heavy Interlock20071842Scripts/c20071842.lua1
Sleepy Scapegoats3129527Scripts/c3129527.lua1
Sea Lancer22842214Scripts/c22842214.lua1
Dual Avatar Feet - Armored Un-Gyo7631534Scripts/c7631534.lua1
Unchained Firelord of Yama94014327Scripts/c94014327.lua1
Rapid Trigger67526112Scripts/c67526112.lua1
Odd-Eyes Pendulum Dragon, Four Heavenly Dragons75787708Scripts/c75787708.lua1
Lost World17228908Scripts/c17228908.lua1
Fire King Sanctuary65305978Scripts/c65305978.lua1
Salamandra Fusion9102835Scripts/c9102835.lua1
Odd-Eyes Lancer Dragon83347294Scripts/c83347294.lua1
Harpie Conductor85696777Scripts/c85696777.lua1
Mythical Beast Master Cerberus53842431Scripts/c53842431.lua1
Mythical Beast Medusa54965929Scripts/c54965929.lua1
Mythical Beast Garuda28570310Scripts/c28570310.lua1
Rokket Barrage53481938Scripts/c53481938.lua1
Underground Arachnid63465535Scripts/c63465535.lua1
Empire of Endymion34041788Scripts/c34041788.lua1
Garbage Golem28968609Scripts/c28968609.lua1
Abyss Actor - Sassy Rookie51028231Scripts/c51028231.lua1
Hollowrokket Dragon51548207Scripts/c51548207.lua1
ReSolfachord Dreamia92610868Scripts/c92610868.lua1
...and 65 more

Script Examples ​

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
	local c=e:GetHandler()
	if chk==0 then return c:IsDestructable()
		and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
	Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)

Camelot, Realm of Noble Knights and Noble Arms (15635751) ​

Source: Scripts/c15635751.lua

lua
end
function s.dfilter(c,e)
	return c:GetEquipTarget() and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)

Heavy Interlock (20071842) ​

Source: Scripts/c20071842.lua

lua
end
function c20071842.mfilter(c,e)
	return c:IsLevelAbove(0) and c:IsSetCard(0x102) and c:IsDestructable(e)
end
function c20071842.target(e,tp,eg,ep,ev,re,r,rp,chk)