Skip to content

Card.GetBaseAttack ​

Signature ​

lua
Card.GetBaseAttack(Card c) -> int

Description ​

Returns c's current base ATK, with unknown or negative ATK reported as 0.

Parameters ​

  • c Card

Returns ​

  • int

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 327 indexed script(s).
  • Search this function in the Script Explorer with Card.GetBaseAttack.
CardIDScriptDetected Calls
Gishki Nekromirror36982581Scripts/c36982581.lua1
Performapal Celestial Magician58092907Scripts/c58092907.lua1
Number 38: Hope Harbinger Dragon Titanic Galaxy63767246Scripts/c63767246.lua2
Kaiki the Unity Star60822251Scripts/c60822251.lua1
Spirit Poacher85150300Scripts/c85150300.lua2
Timebreaker Magician80335817Scripts/c80335817.lua1
Madolche Dessert51650038Scripts/c51650038.lua1
Megaroid City44139064Scripts/c44139064.lua1
Meklord Astro the Eradicator2992036Scripts/c2992036.lua1
Sudden Thunder Swamp23611122Scripts/c23611122.lua1
Eternal Bond45283341Scripts/c45283341.lua1
World Legacy Collapse36197902Scripts/c36197902.lua2
Salamangreat Sanctuary1295111Scripts/c1295111.lua2
Earthbound Servant Geo Gremlina33202303Scripts/c33202303.lua4
Soul of the Supreme Celestial King76840111Scripts/c76840111.lua1
Argostars - Giantslaying30964246Scripts/c30964246.lua1
Shichi-Go-San11035075Scripts/c11035075.lua1
Brilliant Fusion7394770Scripts/c7394770.lua1
Keel, Shipwright Fur Hire66736884Scripts/c66736884.lua1
Destiny HERO - Dreadnought Master54641720Scripts/c54641720.lua1
Blackwing - Aurora the Northern Lights4068622Scripts/c4068622.lua1
Ghost Mourner & Moonlit Chill52038441Scripts/c52038441.lua1
Mythical Beast Master Cerberus53842431Scripts/c53842431.lua1
Junk Speeder77075360Scripts/c77075360.lua1
...and 303 more

Script Examples ​

Gishki Nekromirror (36982581) ​

Source: Scripts/c36982581.lua

lua
		Duel.BreakEffect()
		if Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)>0 then
			Duel.SetLP(tp,Duel.GetLP(tp)-tc:GetBaseAttack())
			tc:CompleteProcedure()
		end

Performapal Celestial Magician (58092907) ​

Source: Scripts/c58092907.lua

lua
		e3:SetType(EFFECT_TYPE_SINGLE)
		e3:SetCode(EFFECT_SET_ATTACK_FINAL)
		e3:SetValue(c:GetBaseAttack()*2)
		e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
		c:RegisterEffect(e3)

Number 38: Hope Harbinger Dragon Titanic Galaxy (63767246) ​

Source: Scripts/c63767246.lua

lua
end
function c63767246.atkfilter1(c,tp)
	return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_XYZ) and c:GetBaseAttack()>0
		and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end