Skip to content

Card.CheckRemoveOverlayCard ​

Signature ​

lua
Card.CheckRemoveOverlayCard(Card c, int player, int count, int reason) -> bool

Description ​

Checks whether player can remove at least count Xyz Materials from c for reason. Replacement effects with EFFECT_OVERLAY_REMOVE_REPLACE can make this return true even when c itself has too few materials.

Parameters ​

  • c Card
  • player int
  • count int
  • reason int

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 88 indexed script(s).
  • Search this function in the Script Explorer with Card.CheckRemoveOverlayCard.
CardIDScriptDetected Calls
Grandpa Demetto44190146Scripts/c44190146.lua1
Number 101: Silent Honor ARK - Soul Asylum2419596Scripts/c2419596.lua2
Number 99: Utopia Dragonar95134948Scripts/c95134948.lua1
D/D/D Deviser King Deus Machinex46593546Scripts/c46593546.lua2
Darktellarknight Batlamyus64414267Scripts/c64414267.lua1
Heroic Champion - Magnum Excalibur14301396Scripts/c14301396.lua1
Salamangreat Blaze Dragon9608555Scripts/c9608555.lua1
Squeeze, the Full Moon of Raise Moon - JACKPOT!9484285Scripts/c9484285.lua1
Fairy Tail - Wiccat27632520Scripts/c27632520.lua1
Raidraptor - Rising Rebellion Falcon71222868Scripts/c71222868.lua1
Time Thief Redoer55285840Scripts/c55285840.lua2
Exstellarknight Constellar Ptolemy Ω76195332Scripts/c6195332.lua1
Sacred Noble Knight of King Custennin78876707Scripts/c78876707.lua1
Tellarknight Ptolemaeus18326736Scripts/c18326736.lua2
Infinitrack Earth Slicer97584719Scripts/c97584719.lua1
Grenosaurus Giga-Cannon34481518Scripts/c34481518.lua1
Number 6: Chronomaly Atlandis9161357Scripts/c9161357.lua1
Number 39: Utopia Double62517849Scripts/c62517849.lua1
Baby Spider60023855Scripts/c60023855.lua1
Chasma, Dragon Ruler of Auroras4965193Scripts/c4965193.lua1
Ebon High Magician85551711Scripts/c85551711.lua2
Barrage Blast51369889Scripts/c51369889.lua1
Madolche Puddingcess Chocolat-a-la-Mode44311445Scripts/c44311445.lua1
Rubysapphirus, the Adamant Jewel6906306Scripts/c6906306.lua1
...and 64 more

Script Examples ​

Grandpa Demetto (44190146) ​

Source: Scripts/c44190146.lua

lua
end
function c44190146.costfilter(c,tp)
	return c:IsCode(75574498) and c:IsFaceup() and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end
function c44190146.spcost(e,tp,eg,ep,ev,re,r,rp,chk)

Number 101: Silent Honor ARK - Soul Asylum (2419596) ​

Source: Scripts/c2419596.lua

lua
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
	local c=e:GetHandler()
	if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
	c:RemoveOverlayCard(tp,1,1,REASON_COST)
	local ct=Duel.GetOperatedGroup():GetFirst()

Number 99: Utopia Dragonar (95134948) ​

Source: Scripts/c95134948.lua

lua
function c95134948.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
	local c=e:GetHandler()
	if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST)
		and Duel.GetCustomActivityCount(95134948,tp,ACTIVITY_SPSUMMON)==0
		and Duel.GetFlagEffect(tp,95134949)==0