Skip to content

Card.IsDefense ​

Signature ​

lua
Card.IsDefense(Card c, int def1, [int def2], [... int]) -> bool

Description ​

Checks whether c is not a Link Monster, is a monster or currently treated as one, and has current DEF equal to any supplied def value. Nil def arguments are skipped. Unlike the old imported text, the binding does not explicitly require c to be in the Monster Zone.

Parameters ​

  • c Card
  • def1 int
  • def2 int optional
  • ... int optional

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 99 indexed script(s).
  • Search this function in the Script Explorer with Card.IsDefense.
CardIDScriptDetected Calls
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
D/D Count Surveyor5997110Scripts/c5997110.lua1
Grandpa Demetto44190146Scripts/c44190146.lua1
Erebus the Underworld Monarch23064604Scripts/c23064604.lua1
Cupid Pitch21915012Scripts/c21915012.lua1
Masterking Archfiend35606858Scripts/c35606858.lua1
Jiaotu, Darkness of the Yang Zing25935625Scripts/c25935625.lua1
Kuriboh - Multiply!14965712Scripts/c14965712.lua1
Doll House67331360Scripts/c67331360.lua1
Box of Friends81587028Scripts/c81587028.lua1
Eidos the Underworld Monarch31596518Scripts/c31596518.lua2
Nightmare Throne93729896Scripts/c93729896.lua1
Possessed Partnerships65046521Scripts/c65046521.lua1
Gizmek Inaba, the Hopping Hare of Hakuto50901852Scripts/c50901852.lua1
Mannadium Prime-Heart90465153Scripts/c90465153.lua1
Garbage Golem28968609Scripts/c28968609.lua2
Demiurge Ema26364381Scripts/c26364381.lua1
Spiritual Art Familiars45538320Scripts/c45538320.lua1
Branded in High Spirits29948294Scripts/c29948294.lua1
Antidote Nurse31539614Scripts/c31539614.lua1
Kuribah44632120Scripts/c44632120.lua1
Mannadium Breakheart71164684Scripts/c71164684.lua1
Regenesis31786838Scripts/c31786838.lua1
Replicard LAD1665819Scripts/c1665819.lua1
...and 75 more

Script Examples ​

Ehther the Heavenly Monarch (96570609) ​

Source: Scripts/c96570609.lua

lua
end
function c96570609.spfilter(c,e,tp)
	return c:IsAttackAbove(2400) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c96570609.sptg(e,tp,eg,ep,ev,re,r,rp,chk)

D/D Count Surveyor (5997110) ​

Source: Scripts/c5997110.lua

lua
function s.thfilter(c)
	return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER)
		and (c:IsAttack(0) or c:IsDefense(0)) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)

Grandpa Demetto (44190146) ​

Source: Scripts/c44190146.lua

lua
end
function c44190146.filter(c,e,tp)
	return c:IsType(TYPE_NORMAL) and (c:IsAttack(0) or c:IsDefense(0)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c44190146.sptg(e,tp,eg,ep,ev,re,r,rp,chk)