Skip to content

Card.RemoveCounter ​

Signature ​

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

Description ​

Removes count counters of countertype from c for reason, using player as the removing player. When countertype is 0, the core clears every counter on c and returns no Lua value. Otherwise it yields and returns whether the requested counters were removed.

Parameters ​

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

Returns ​

  • bool|nil

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 28 indexed script(s).
  • Search this function in the Script Explorer with Card.RemoveCounter.
CardIDScriptDetected Calls
El Shaddoll Apkallone50907446Scripts/c50907446.lua1
El Shaddoll Meshachrer32467459Scripts/c32467459.lua1
Zebufera, Vaalmonican Hallow Heathen2815176Scripts/c2815176.lua1
Limit Code86607583Scripts/c86607583.lua1
Enneapolis17621695Scripts/c17621695.lua1
Summer Schoolwork Successful!77751766Scripts/c77751766.lua1
Link Turret55034079Scripts/c55034079.lua1
Full Moon Mirror44857722Scripts/c44857722.lua1
Ursarctic Radiation32692693Scripts/c32692693.lua1
Duralume, Vaalmonican Heathen Hallow76821171Scripts/c76821171.lua1
Gouki Cage Match85638822Scripts/c85638822.lua1
Tempest Magician63101919Scripts/c63101919.lua1
Thelematech Clatis98986900Scripts/c98986900.lua1
F.A. Shining Star GT37414347Scripts/c37414347.lua1
Blackwing Armor Master69031175Scripts/c69031175.lua1
Brainwashing Beam59258334Scripts/c59258334.lua1
War Rock Ordeal71331215Scripts/c71331215.lua1
Linkbelt Wall Dragon63092423Scripts/c63092423.lua1
Pitch-Black Power Stone34029630Scripts/c34029630.lua1
Hinezumi Hanabi71459017Scripts/c71459017.lua1
Fire Cracker81109178Scripts/c81109178.lua1
Shien's Daredevil98162021Scripts/c98162021.lua1
Summon Shock42719764Scripts/c42719764.lua1
Updraft90557975Scripts/c90557975.lua1
...and 4 more

Script Examples ​

El Shaddoll Apkallone (50907446) ​

Source: Scripts/c50907446.lua

lua
	if exg and exg:IsExists(c50907446.FShaddollSpFilter2,1,nil,c,tp,g:GetFirst(),chkf)
		and (mg:GetCount()==0 or (exg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0)))) then
		fc:RemoveCounter(tp,0x16,3,REASON_EFFECT)
		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
		local sg=exg:FilterSelect(tp,c50907446.FShaddollSpFilter2,1,1,nil,c,tp,g:GetFirst(),chkf)

El Shaddoll Meshachrer (32467459) ​

Source: Scripts/c32467459.lua

lua
	local g=mg:SelectSubGroup(tp,s.FShaddollCheck,false,3,3,gc,c,tp,c,chkf,exg)
	if exg and g:IsExists(aux.IsInGroup,1,nil,exg) then
		fc:RemoveCounter(tp,0x16,3,REASON_EFFECT)
	end
	Duel.SetFusionMaterial(g)

Zebufera, Vaalmonican Hallow Heathen (2815176) ​

Source: Scripts/c2815176.lua

lua
		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
		local tc=g:FilterSelect(tp,Card.IsCanRemoveCounter,1,1,nil,tp,0x6a,1,REASON_COST):GetFirst()
		tc:RemoveCounter(tp,0x6a,1,REASON_COST)
		ct=ct+1
	end