Skip to content

Duel.IsCanRemoveCounter ​

Signature ​

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

Description ​

Checks whether player can remove count counters of countertype for reason from the selected field locations. s marks locations on player's own field and o marks locations on the opponent's field, from player's perspective.

Parameters ​

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

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 60 indexed script(s).
  • Search this function in the Script Explorer with Duel.IsCanRemoveCounter.
CardIDScriptDetected Calls
Endymion, the Mighty Master of Magic3611830Scripts/c3611830.lua1
Magister of Endymion66104644Scripts/c66104644.lua1
Lightsworn Sanctuary52665542Scripts/c52665542.lua1
Mythical Beast Master Cerberus53842431Scripts/c53842431.lua1
Mythical Beast Medusa54965929Scripts/c54965929.lua1
Mythical Beast Garuda28570310Scripts/c28570310.lua1
Chaos Zone94243005Scripts/c94243005.lua1
Mythical Beast Jackal91182675Scripts/c91182675.lua1
Fire Fortress atop Liang Peak66750703Scripts/c66750703.lua3
Selene, Queen of the Master Magicians45819647Scripts/c45819647.lua1
Synchro World36742774Scripts/c36742774.lua1
Signal Warrior9634146Scripts/c9634146.lua1
Mythical Institution94599451Scripts/c94599451.lua1
Spell Power Attainment39123673Scripts/c39123673.lua2
Cosmic Fortress Gol'gar68319538Scripts/c68319538.lua1
Mythical Beast Bashilisk80959027Scripts/c80959027.lua1
Symphonic Warrior Miccs5399521Scripts/c5399521.lua1
Jizukiru, the Star Destroying Kaiju63941210Scripts/c63941210.lua1
Gateway of the Six27970830Scripts/c27970830.lua3
Black Feather Whirlwind7602800Scripts/c7602800.lua1
Kumongous, the Sticky String Kaiju29726552Scripts/c29726552.lua1
Mature Chronicle92650749Scripts/c92650749.lua5
Gadarla, the Mystery Dust Kaiju36956512Scripts/c36956512.lua1
Super Anti-Kaiju War Machine Mecha-Dogoran84769941Scripts/c84769941.lua1
...and 36 more

Script Examples ​

Endymion, the Mighty Master of Magic (3611830) ​

Source: Scripts/c3611830.lua

lua
}
function c3611830.descost(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,6,REASON_COST) end
	Duel.RemoveCounter(tp,1,0,0x1,6,REASON_COST)
end

Magister of Endymion (66104644) ​

Source: Scripts/c66104644.lua

lua
end
function c66104644.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end
	Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
end

Lightsworn Sanctuary (52665542) ​

Source: Scripts/c52665542.lua

lua
		local count=eg:FilterCount(c52665542.dfilter,nil,tp)
		e:SetLabel(count)
		return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x5,count*2,REASON_EFFECT)
	end
	return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)