Skip to content

Duel.IsPlayerCanSummon ​

Signature ​

lua
Duel.IsPlayerCanSummon(int player, [int sumtype], [Card c]) -> bool

Description ​

With only player, checks whether player is not forbidden from performing a Normal Summon by an untargeted EFFECT_CANNOT_SUMMON. With sumtype and c, checks player EFFECT_CANNOT_SUMMON restrictions for Normal Summoning c with that sumtype. This binding does not check Summon count, costs, tribute availability, or zone availability.

Parameters ​

  • player int
  • sumtype int optional
  • c Card optional

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 27 indexed script(s).
  • Search this function in the Script Explorer with Duel.IsPlayerCanSummon.
CardIDScriptDetected Calls
Union Activation38527680Scripts/c38527680.lua1
Quick Summon10086952Scripts/c10086952.lua1
Rahamu, Envoy of the Sacred Tome53904087Scripts/c53904087.lua1
Synchro Fellowship43834302Scripts/c43834302.lua2
Red-Eyes Retro Dragon53485634Scripts/c53485634.lua1
Gimmick Puppet Fantasix Machinix76290637Scripts/c76290637.lua2
Swap Frog9126351Scripts/c9126351.lua1
Battlewasp - Sachi the Ceremonial Bow71456737Scripts/c71456737.lua1
Darkness Resonator83445539Scripts/c83445539.lua1
Gem-Knight Nepyrim51831560Scripts/c51831560.lua1
Ancient Chant78665705Scripts/c78665705.lua2
Royal Archfiend58769832Scripts/c58769832.lua2
Shadow's Light61322713Scripts/c61322713.lua1
Maginificent Magikey Mafteal15983048Scripts/c15983048.lua1
Knightmare Goblin39064822Scripts/c39064822.lua1
Scrap Raptor80529459Scripts/c80529459.lua2
U.A. Hyper Stadium12931061Scripts/c12931061.lua1
Yosenju Kodam23740893Scripts/c23740893.lua1
Mithra the Thunder Vassal22404675Scripts/c22404675.lua1
Cartorhyn the Hidden Gem of the Seafront94076521Scripts/c94076521.lua1
Balancer Lord8567955Scripts/c8567955.lua1
Noble Knight Custennin42472002Scripts/c42472002.lua1
World Legacy - "World Key"40441990Scripts/c40441990.lua1
Simorgh, Bird of Beginning50820852Scripts/c50820852.lua1
...and 3 more

Script Examples ​

Union Activation (38527680) ​

Source: Scripts/c38527680.lua

lua
function s.thfilter2(c,e,tp)
	local minc,maxc=c:GetTributeRequirement()
	return c:IsAttackAbove(3000) and c:IsSummonable(true,nil) and c:IsSummonableCard() and c:IsAbleToHand() and s.sunthfilter(c,e,tp,minc,maxc) and Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_ADVANCE,c)
end
function s.sunthfilter(c,e,tp,minc,maxc)

Quick Summon (10086952) ​

Source: Scripts/c10086952.lua

lua
	return c:IsLevelAbove(5) and (c:IsSummonable(true,nil) or c:IsMSetable(true,nil))
		and c:IsSummonableCard() and c:IsAbleToHand() and s.sunthfilter(c,e,tp,minc,maxc)
		and Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_ADVANCE,c)
end
function s.sunthfilter(c,e,tp,minc,maxc)

Rahamu, Envoy of the Sacred Tome (53904087) ​

Source: Scripts/c53904087.lua

lua
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
	Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end