Skip to content

Card.IsRelateToBattle ​

Signature ​

lua
Card.IsRelateToBattle(Card c) -> bool

Description ​

Checks whether c is still related to the current battle, usually during the Damage Step or shortly after damage calculation.

Parameters ​

  • c Card

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 568 indexed script(s).
  • Search this function in the Script Explorer with Card.IsRelateToBattle.
CardIDScriptDetected Calls
Goyo Emperor59255742Scripts/c59255742.lua1
Converging Wishes20007374Scripts/c20007374.lua1
Light End Sublimation Dragon35614780Scripts/c35614780.lua1
Trirealm Rift Judgment65195679Scripts/c65195679.lua2
Performapal Odd-Eyes Dissolver46136942Scripts/c46136942.lua1
Number 99: Utopia Dragonar95134948Scripts/c95134948.lua1
Sea Stealth Attack19089195Scripts/c19089195.lua1
Galaxy-Eyes Photon Dragon93717133Scripts/c93717133.lua1
Nirvana High Paladin80896940Scripts/c80896940.lua1
Favorite Hero11881272Scripts/c11881272.lua1
Arcana Force EX - The Light Ruler5861892Scripts/c5861892.lua1
Gladiator Beast Gaiodiaz90957527Scripts/c90957527.lua2
Chevreuil, Hunting Scout of the Deep Forest13023431Scripts/c13023431.lua1
Megaroid City44139064Scripts/c44139064.lua1
Vulcan Dragni the Cubic King77387463Scripts/c77387463.lua1
Shura the Combat Star32615065Scripts/c32615065.lua2
X-Saber Gottoms8252010Scripts/c8252010.lua1
Mirror Barrier95915457Scripts/c95915457.lua3
Gilti-Gearfried the Magical Steel Knight49161188Scripts/c49161188.lua1
TiSolfachord Beautia54387923Scripts/c54387923.lua1
Mechanical Mechanic22106558Scripts/c22106558.lua1
Geira Guile the Cubic King40392714Scripts/c40392714.lua1
Courageous Crimson Chevalier Bradamante91479482Scripts/c91479482.lua2
Blue-Eyes Toon Ultimate Dragon71808988Scripts/c71808988.lua1
...and 544 more

Script Examples ​

Goyo Emperor (59255742) ​

Source: Scripts/c59255742.lua

lua
	local c=e:GetHandler()
	local bc=c:GetBattleTarget()
	if not c:IsRelateToBattle() or c:IsFacedown() then return false end
	return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end

Converging Wishes (20007374) ​

Source: Scripts/c20007374.lua

lua
	local c=e:GetHandler()
	local ec=c:GetEquipTarget()
	if not ec:IsRelateToBattle() then return end
	Duel.ChainAttack()
	local e1=Effect.CreateEffect(c)

Light End Sublimation Dragon (35614780) ​

Source: Scripts/c35614780.lua

lua
		e2:SetCode(EFFECT_UPDATE_DEFENSE)
		c:RegisterEffect(e2)
		if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) and bc:IsControler(1-tp) and bc:IsFaceup() and bc:IsRelateToBattle() then
			local e3=Effect.CreateEffect(c)
			e3:SetType(EFFECT_TYPE_SINGLE)