Skip to content

Duel.CheckRemoveOverlayCard ​

Signature ​

lua
Duel.CheckRemoveOverlayCard(int player, int s, int o, int count, int reason) -> bool

Description ​

Checks whether player can remove at least count Xyz Materials from the specified own/opponent field locations for reason. s marks locations on player's own field and o marks locations on the opponent's field, from player's perspective. Applicable replacement effects can satisfy the check.

Parameters ​

  • player int
  • s int
  • o int
  • count int
  • reason int

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 46 indexed script(s).
  • Search this function in the Script Explorer with Duel.CheckRemoveOverlayCard.
CardIDScriptDetected Calls
Goblin's Crazy Beast71100270Scripts/c71100270.lua1
LeVirtue Dragon33113958Scripts/c33113958.lua2
Valiant Shark Lancer23672629Scripts/c23672629.lua1
Garbage Golem28968609Scripts/c28968609.lua1
Unbreakable Xyz Barrier96004535Scripts/c96004535.lua1
Tally-ho! Springans9175957Scripts/c9175957.lua1
Mansion of the Dreadful Dolls36890111Scripts/c36890111.lua1
Baromet the Sacred Sheep Shrub62967433Scripts/c62967433.lua1
Goblin Bikers Gone Bonkers46014517Scripts/c46014517.lua2
Xyz Force31398842Scripts/c31398842.lua1
Ryzeal Duo Drive7511613Scripts/c7511613.lua1
Mikanko Shinbu - Noble Twins84550369Scripts/c84550369.lua1
Xyz Poseidon Splash16938770Scripts/c16938770.lua1
Spright Sprind72329844Scripts/c72329844.lua1
Battlin' Boxer King Dempsey46804536Scripts/c46804536.lua1
Springans Captain Sargas29601381Scripts/c29601381.lua1
Migratory Zereort87640391Scripts/c87640391.lua1
Time Thief Bezel Ship82496097Scripts/c82496097.lua1
Constellar Castor33302589Scripts/c33302589.lua1
Xyz Lay43150717Scripts/c43150717.lua1
Goblin Biker Clatter Sploder51473858Scripts/c51473858.lua1
Goblin Biker Troika Griare44241999Scripts/c44241999.lua2
Goblin Biker Grand Stampede50311058Scripts/c50311058.lua2
Daruma Dropper35394356Scripts/c35394356.lua1
...and 22 more

Script Examples ​

Goblin's Crazy Beast (71100270) ​

Source: Scripts/c71100270.lua

lua
function c71100270.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
	if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c71100270.filter(chkc) end
	if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,2,REASON_EFFECT)
		and Duel.IsExistingTarget(c71100270.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)

LeVirtue Dragon (33113958) ​

Source: Scripts/c33113958.lua

lua
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
	Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end

Valiant Shark Lancer (23672629) ​

Source: Scripts/c23672629.lua

lua
	if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
	if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
		and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
	local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)