Skip to content

Card.IsReleasable ​

Signature ​

lua
Card.IsReleasable(Card c, [int reason]) -> bool

Description ​

Checks whether c can be Released for a non-Summon reason by the current reason player. reason defaults to REASON_COST. The core rejects cards being Summoned, Xyz Materials, cards in the GY or banished, Spell/Trap Cards in the hand, cards the player cannot release, and cards affected by EFFECT_UNRELEASABLE_NONSUM.

Parameters ​

  • c Card
  • reason int optional - default: REASON_COST

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 123 indexed script(s).
  • Search this function in the Script Explorer with Card.IsReleasable.
CardIDScriptDetected Calls
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua2
Accel Synchro Stardust Dragon30983281Scripts/c30983281.lua1
Ultimate Crystal Rainbow Dragon Overdrive84544192Scripts/c84544192.lua1
Tellusion the Magna Warrior24431911Scripts/c24431911.lua1
Ursarctic Polar Star62714453Scripts/c62714453.lua1
Kuribeh34419588Scripts/c34419588.lua1
Divine Serpent Apophis97800311Scripts/c97800311.lua1
Arktos XII - Chronochasm Vaylantz50687050Scripts/c50687050.lua1
All-Eyes Phantom Dragon70335319Scripts/c70335319.lua1
Metaltron XII, the True Dracombatant57761191Scripts/c57761191.lua1
Galaxy-Eyes Photon Change Dragon54725177Scripts/c54725177.lua1
Abyssrhine, the Atlantean Spirit17080584Scripts/c17080584.lua1
Red-Eyes Black Dragon Exceed17242022Scripts/c17242022.lua1
Black-Winged Assault Dragon73218989Scripts/c73218989.lua1
Predaplant Daredevil82370493Scripts/c82370493.lua2
Egyptian God Slime42166000Scripts/c42166000.lua1
Dawn Angel Kambi12500059Scripts/c12500059.lua2
Hrimnir the Divine Follower49904658Scripts/c49904658.lua1
Solfachord Solfegia84693918Scripts/c84693918.lua3
Supreme King Dragon Odd-Eyes96733134Scripts/c96733134.lua1
Destiny HERO - Dreadnought Master54641720Scripts/c54641720.lua1
Bramble Rose Dragon6560411Scripts/c6560411.lua1
Sky Striker Ace = Zero76072561Scripts/c76072561.lua1
Crossrose Dragon72218246Scripts/c72218246.lua1
...and 99 more

Script Examples ​

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
end
function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return e:GetHandler():IsReleasable(REASON_EFFECT) end
	Duel.SetOperationInfo(0,CATEGORY_RELEASE,e:GetHandler(),1,0,0)
end

Accel Synchro Stardust Dragon (30983281) ​

Source: Scripts/c30983281.lua

lua
	local g=Group.CreateGroup()
	if c:IsSetCard(0xa3) then g:Merge(Duel.GetMatchingGroup(c30983281.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)) end
	local chkrel=c:IsReleasable()
	local chknotrel=g:GetCount()>0
	local b1=chkrel and Duel.IsExistingMatchingCard(c30983281.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,chkrel,nil)

Ultimate Crystal Rainbow Dragon Overdrive (84544192) ​

Source: Scripts/c84544192.lua

lua
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
	local c=e:GetHandler()
	if chk==0 then return c:GetBattledGroupCount()==0 and c:IsReleasable() end
	Duel.Release(c,REASON_COST)
end