Skip to content

Duel.SetTargetCard ​

Signature ​

lua
Duel.SetTargetCard(Card|Group targets) -> void

Description ​

Stores targets as the target cards for the currently handled Chain. For non-continuous effects, the core creates Chain relations for those cards and sends the become-target message when the effect has EFFECT_FLAG_CARD_TARGET. This records broad operation targets; it does not by itself check whether the cards are legal effect targets.

Parameters ​

  • targets Card|Group - Card or Group to record as current Chain target cards.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 651 indexed script(s).
  • Search this function in the Script Explorer with Duel.SetTargetCard.
CardIDScriptDetected Calls
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua1
Goyo Emperor59255742Scripts/c59255742.lua3
Performage Cup Tricker6812770Scripts/c6812770.lua1
Ghostrick Renovation61818176Scripts/c61818176.lua1
Prank-Kids Weather Washer44509529Scripts/c44509529.lua1
D/D Count Surveyor5997110Scripts/c5997110.lua1
Artmage Masterwork -Succession-37517035Scripts/c37517035.lua1
Enneacraft - Atil.SPIA71801447Scripts/c71801447.lua1
Dracotail Shaulas42125140Scripts/c42125140.lua1
Radiant Typhoon Varuroon, the Marine Eidolon39341885Scripts/c39341885.lua1
Camelot, Realm of Noble Knights and Noble Arms15635751Scripts/c15635751.lua1
Particle Fusion39261576Scripts/c39261576.lua1
Prank-Kids Rocket Ride18514525Scripts/c18514525.lua1
Starving Venom Wing Dragon5148778Scripts/c5148778.lua1
Red-Eyes Slash Dragon21140872Scripts/c21140872.lua1
Gravity Balance37930737Scripts/c37930737.lua1
Trirealm Rift Judgment65195679Scripts/c65195679.lua3
Trickstar Light Arena63492244Scripts/c63492244.lua1
Performapal Celestial Magician58092907Scripts/c58092907.lua1
Grandpa Demetto44190146Scripts/c44190146.lua1
Prank-Kids Bow-Wow-Bark43886072Scripts/c43886072.lua1
Triamid Pulse96100333Scripts/c96100333.lua2
Super Quantal Mech Ship Magnacarrier10424147Scripts/c10424147.lua1
Amazement Administrator Arlekino94821366Scripts/c94821366.lua1
...and 627 more

Script Examples ​

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
	end
	local desg=eg:Filter(s.desfilter,nil,tp)
	Duel.SetTargetCard(desg)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end

Goyo Emperor (59255742) ​

Source: Scripts/c59255742.lua

lua
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
	Duel.SetTargetCard(bc)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0)
end

Performage Cup Tricker (6812770) ​

Source: Scripts/c6812770.lua

lua
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
	local sg=g:SelectSubGroup(tp,s.gcheck,false,2,2)
	Duel.SetTargetCard(sg)
end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)