Skip to content

Card.GetTextDefense ​

Signature ​

lua
Card.GetTextDefense(Card c) -> int

Description ​

Returns c's printed/stored DEF value, or 0 while c has no-Level status.

Parameters ​

  • c Card

Returns ​

  • int

Source ​

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

Used By ​

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

  • Detected in 18 indexed script(s).
  • Search this function in the Script Explorer with Card.GetTextDefense.
CardIDScriptDetected Calls
Duel Link Dragon, the Duel Dragon60025883Scripts/c60025883.lua1
Allure Queen LV523756165Scripts/c23756165.lua1
Nibiru, the Primal Being27204311Scripts/c27204311.lua2
The Atmosphere14466224Scripts/c14466224.lua1
Ancient Chant78665705Scripts/c78665705.lua1
Nightmell the Dark Bonder66569334Scripts/c66569334.lua2
Guardian of Felgrand33460840Scripts/c33460840.lua1
The Tyrant Neptune88071625Scripts/c88071625.lua1
Inzektor Exa-Beetle44505297Scripts/c44505297.lua1
Exodia, the Legendary Defender5008836Scripts/c5008836.lua1
Phantasmal Summoning Beast53134520Scripts/c53134520.lua1
Allure Queen LV750140163Scripts/c50140163.lua1
World Legacy Clash93236220Scripts/c93236220.lua2
Inzektor Exa-Stag26211048Scripts/c26211048.lua1
Berserker Crush15471265Scripts/c15471265.lua1
Branded Disciple34536828Scripts/c34536828.lua1
Spirit Sculptor19307353Scripts/c19307353.lua3
Small World89558743Scripts/c89558743.lua2

Script Examples ​

Source: Scripts/c60025883.lua

lua
	local tc=e:GetLabelObject()
	local atk=tc:GetTextAttack()
	local def=tc:GetTextDefense()
	local lv=tc:GetOriginalLevel()
	local race=tc:GetOriginalRace()

Allure Queen LV5 (23756165) ​

Source: Scripts/c23756165.lua

lua
	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
		local atk=tc:GetTextAttack()
		local def=tc:GetTextDefense()
		if atk<0 then atk=0 end
		if def<0 then def=0 end

Nibiru, the Primal Being (27204311) ​

Source: Scripts/c27204311.lua

lua
		and Duel.IsPlayerCanSpecialSummonCount(tp,2)
		and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
		and Duel.IsPlayerCanSpecialSummonMonster(tp,27204312,0,TYPES_TOKEN_MONSTER,g:GetSum(c27204311.adfilter,Card.GetTextAttack),g:GetSum(c27204311.adfilter,Card.GetTextDefense),11,RACE_ROCK,ATTRIBUTE_LIGHT,POS_FACEUP,1-tp) end
	Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),2,0,0)