Skip to content

Card.CheckUnionTarget ​

Signature ​

lua
Card.CheckUnionTarget(Card c, Card target) -> bool

Description ​

Checks whether target is a valid Union equip target for c under EFFECT_UNION_LIMIT. The core also enforces new/old Union count compatibility between c and target.

Parameters ​

  • c Card
  • target Card

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 8 indexed script(s).
  • Search this function in the Script Explorer with Card.CheckUnionTarget.
CardIDScriptDetected Calls
Union Hangar66399653Scripts/c66399653.lua1
Delta Tri12079734Scripts/c12079734.lua1
Union Driver99249638Scripts/c99249638.lua1
X-Cross Cannon70860415Scripts/c70860415.lua1
Union Pilot89357740Scripts/c89357740.lua1
Formation Union26931058Scripts/c26931058.lua1
Unauthorized Reactivation12524259Scripts/c12524259.lua1
Roll Out!91597389Scripts/c91597389.lua1

Script Examples ​

Union Hangar (66399653) ​

Source: Scripts/c66399653.lua

lua
function c66399653.cfilter(c,ec,tp)
	return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_UNION) and not c:IsCode(ec:GetCode())
		and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec)
end
function c66399653.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)

Delta Tri (12079734) ​

Source: Scripts/c12079734.lua

lua
c12079734.has_text_type=TYPE_UNION
function c12079734.filter1(c,ec)
	return c:IsType(TYPE_UNION) and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec)
end
function c12079734.filter2(c)

Union Driver (99249638) ​

Source: Scripts/c99249638.lua

lua
end
function c99249638.refilter(c,tc,tp,exclude_modern_count)
	return aux.CheckUnionEquip(c,tc,exclude_modern_count) and c:CheckUnionTarget(tc) and c:IsType(TYPE_UNION)
		and c:IsLevelBelow(4) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end