Skip to content

Card.IsDefenseBelow ​

Signature ​

lua
Card.IsDefenseBelow(Card c, int def) -> bool

Description ​

Checks whether c has known current DEF less than or equal to def. Link Monsters and non-monsters return false, and unknown or negative DEF also returns false.

Parameters ​

  • c Card
  • def int

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 46 indexed script(s).
  • Search this function in the Script Explorer with Card.IsDefenseBelow.
CardIDScriptDetected Calls
D/D/D Super Doom King Bright Armageddon72402069Scripts/c72402069.lua1
Boss on Parade4909946Scripts/c4909946.lua1
Wynn the Wind Channeler86395581Scripts/c86395581.lua1
Aussa the Earth Charmer, Immovable97661969Scripts/c97661969.lua1
Eria the Water Charmer, Gentle73309655Scripts/c73309655.lua1
Dharc the Dark Charmer, Gloomy8264361Scripts/c8264361.lua1
Hiita the Fire Charmer, Ablaze48815792Scripts/c48815792.lua1
Wynn the Wind Charmer, Verdant30674956Scripts/c30674956.lua1
Ace★Spades Speculation10796448Scripts/c10796448.lua1
Lyna the Light Charmer, Lustrous9839945Scripts/c9839945.lua1
Blackwing - Silverwind the Ascendant33236860Scripts/c33236860.lua2
Full Force Virus4931121Scripts/c4931121.lua2
Number 84: Pain Gainer26556950Scripts/c26556950.lua1
Vengeful Witch66100116Scripts/c66100116.lua1
Neo Flamvell Lady816427Scripts/c816427.lua1
Performapal Call22765132Scripts/c22765132.lua1
Curse of the Ancient Turtle94749594Scripts/c94749594.lua1
Witch of the Black Forest78010363Scripts/c78010363.lua1
Gusto Thunbolt28066831Scripts/c28066831.lua1
Makiu, the Magical Mist27827272Scripts/c27827272.lua1
Brotherhood of the Fire Fist - Spirit1662004Scripts/c1662004.lua1
Dragon's Bind16278116Scripts/c16278116.lua1
Whirlwind of Gusto91822647Scripts/c91822647.lua1
Throwstone Unit76075810Scripts/c76075810.lua1
...and 22 more

Script Examples ​

D/D/D Super Doom King Bright Armageddon (72402069) ​

Source: Scripts/c72402069.lua

lua
end
function c72402069.desfilter2(c,atk)
	return c:IsFaceup() and c:IsDefenseBelow(atk)
end
function c72402069.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)

Boss on Parade (4909946) ​

Source: Scripts/c4909946.lua

lua
end
function s.spfilter(c,e,tp,ec)
	return c:IsAttack(1200) and c:IsDefenseBelow(1000) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE)
		and (Duel.GetMZoneCount(tp,ec)>0
		and c:IsCanBeSpecialSummoned(e,0,tp,false,false)

Wynn the Wind Channeler (86395581) ​

Source: Scripts/c86395581.lua

lua
end
function c86395581.srfilter(c)
	return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDefenseBelow(1500) and not c:IsCode(86395581) and c:IsAbleToHand()
end
function c86395581.srcost(e,tp,eg,ep,ev,re,r,rp,chk)