Skip to content

Duel.IsPlayerCanRemove ​

Signature ​

lua
Duel.IsPlayerCanRemove(int player, [Card c], [int reason]) -> bool

Description ​

With only player, checks whether player is not forbidden from banishing. With c, checks whether player can banish c for reason; reason defaults to REASON_EFFECT.

Parameters ​

  • player int
  • c Card optional
  • reason int optional - default: REASON_EFFECT

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 32 indexed script(s).
  • Search this function in the Script Explorer with Duel.IsPlayerCanRemove.
CardIDScriptDetected Calls
Clock Lizard51476410Scripts/c51476410.lua2
Witchcrafter Pittore95245544Scripts/c95245544.lua1
Silk Bomb Moth18300894Scripts/c18300894.lua1
Super Koi Koi66171432Scripts/c66171432.lua2
Gandora-G the Dragon of Destruction2333466Scripts/c2333466.lua2
Solemn Accusation78114463Scripts/c78114463.lua2
Kashtira Big Bang33925864Scripts/c33925864.lua4
Ragnaraika the Evil Seed99153051Scripts/c99153051.lua1
Kewl Tune Cue16387555Scripts/c16387555.lua1
Sacred Scrolls of the Gizmek Legend24793135Scripts/c24793135.lua2
Axon Kicker Oracle33171768Scripts/c33171768.lua1
Infernoid Flood34446231Scripts/c34446231.lua1
Underworld Circle73443672Scripts/c73443672.lua1
Votis75311421Scripts/c75311421.lua1
Sacrifice Level-Up94185340Scripts/c94185340.lua1
Number 95: Galaxy-Eyes Dark Matter Dragon58820923Scripts/c58820923.lua2
Kashtira Ogre94392192Scripts/c94392192.lua1
UFOLight9275482Scripts/c9275482.lua1
Mitsurugi Tempest49604192Scripts/c49604192.lua2
Psiics, Moonlight of the Ghoti26523337Scripts/c26523337.lua1
Primite Scream27556460Scripts/c27556460.lua1
Sauravis, the Ancient and Ascended4810828Scripts/c4810828.lua1
Ghost Reaper & Winter Cherries62015408Scripts/c62015408.lua1
Let's Go Together38625110Scripts/c38625110.lua1
...and 8 more

Script Examples ​

Clock Lizard (51476410) ​

Source: Scripts/c51476410.lua

lua
function c51476410.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
	local chkf=PLAYER_NONE
	if chk==0 then return Duel.IsPlayerCanRemove(tp)
		and Duel.IsExistingMatchingCard(c51476410.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,chkf,e:GetHandler()) end
	Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)

Witchcrafter Pittore (95245544) ​

Source: Scripts/c95245544.lua

lua
end
function c95245544.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,1) end
	Duel.SetTargetPlayer(tp)
	Duel.SetTargetParam(1)

Silk Bomb Moth (18300894) ​

Source: Scripts/c18300894.lua

lua
function s.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
		and (Duel.GetLocationCount(tp,LOCATION_SZONE,1-tp,r)>0 or Duel.IsPlayerCanRemove(tp))
	end
	Duel.SetTargetPlayer(tp)