Skip to content

Card.IsCanRemoveCounter ​

Signature ​

lua
Card.IsCanRemoveCounter(Card c, int player, int countertype, int count, int reason) -> bool|nil

Description ​

Checks whether player can remove count counters of countertype from c for reason.

Parameters ​

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

Returns ​

  • bool|nil - nil if player is invalid.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 21 indexed script(s).
  • Search this function in the Script Explorer with Card.IsCanRemoveCounter.
CardIDScriptDetected Calls
El Shaddoll Apkallone50907446Scripts/c50907446.lua2
El Shaddoll Meshachrer32467459Scripts/c32467459.lua2
Zebufera, Vaalmonican Hallow Heathen2815176Scripts/c2815176.lua2
Limit Code86607583Scripts/c86607583.lua1
Chaos Core54040484Scripts/c54040484.lua1
Mythical Institution94599451Scripts/c94599451.lua1
Endymion, the Master Magician40732515Scripts/c40732515.lua1
Beat Cop from the Underworld99011763Scripts/c99011763.lua1
Link Turret55034079Scripts/c55034079.lua1
Full Moon Mirror44857722Scripts/c44857722.lua3
Ursarctic Radiation32692693Scripts/c32692693.lua1
Duralume, Vaalmonican Heathen Hallow76821171Scripts/c76821171.lua2
Thelematech Clatis98986900Scripts/c98986900.lua1
Magical Exemplar6061630Scripts/c6061630.lua1
F.A. Shining Star GT37414347Scripts/c37414347.lua1
BOXer61156777Scripts/c61156777.lua1
Pitch-Black Power Stone34029630Scripts/c34029630.lua3
Hinezumi Hanabi71459017Scripts/c71459017.lua1
Blast Magician21051146Scripts/c21051146.lua1
Myriaday Dragon81758313Scripts/c81758313.lua1
Magical Citadel of Endymion39910367Scripts/c39910367.lua1

Script Examples ​

El Shaddoll Apkallone (50907446) ​

Source: Scripts/c50907446.lua

lua
	local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
	local exg=nil
	if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
		local fe=fc:IsHasEffect(81788994)
		exg=Duel.GetMatchingGroup(c50907446.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,fe)

El Shaddoll Meshachrer (32467459) ​

Source: Scripts/c32467459.lua

lua
	local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
	local exg=nil
	if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
		local fe=fc:IsHasEffect(81788994)
		exg=Duel.GetMatchingGroup(s.FShaddollExFilter,tp,0,LOCATION_MZONE,mg,c,fe)

Zebufera, Vaalmonican Hallow Heathen (2815176) ​

Source: Scripts/c2815176.lua

lua
		local ct=0
		for i=1,3 do
			if tc:IsCanRemoveCounter(tp,0x6a,i,REASON_COST) then ct=i end
		end
		tl=tl+ct