Skip to content

Card.AddMonsterAttribute ​

Signature ​

lua
Card.AddMonsterAttribute(Card c, int type, [int attribute], [int race], [int level], [int atk], [int def]) -> void

Description ​

Adds temporary monster properties to c through effects. The binding clears STATUS_NO_LEVEL, applies EFFECT_PRE_MONSTER with type, and applies Attribute, Race, Level, base ATK, and base DEF changes for nonzero supplied values.

Parameters ​

  • c Card
  • type int
  • attribute int optional - default: 0
  • race int optional - default: 0
  • level int optional - default: 0
  • atk int optional - default: 0
  • def int optional - default: 0

Source ​

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

Used By ​

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

  • Detected in 76 indexed script(s).
  • Search this function in the Script Explorer with Card.AddMonsterAttribute.
CardIDScriptDetected Calls
Sentence of Doom40771118Scripts/c40771118.lua1
Dimension Reflector54297661Scripts/c54297661.lua1
Diamond Duston96857854Scripts/c96857854.lua1
Argostars - Lightning Tydeu65889305Scripts/c65889305.lua1
Distrust Paranoia81965543Scripts/c81965543.lua1
Metalhold the Moving Blockade42237854Scripts/c42237854.lua1
The Phantom Knights of Umbrage Veil85257384Scripts/c85257384.lua1
The Door of Destiny27062594Scripts/c27062594.lua1
Ragnaraika Wisteria of Woe77573354Scripts/c77573354.lua1
Speedroid Dupligate58543073Scripts/c58543073.lua1
The Phantom Knights of Mist Claws9336190Scripts/c9336190.lua1
Metamorphortress43959432Scripts/c43959432.lua1
Tiki Soul49514333Scripts/c49514333.lua1
Ashtra Divine Domain37839434Scripts/c37839434.lua1
The Prime Monarch54241725Scripts/c54241725.lua1
Ashtra Cursed Roar91444835Scripts/c91444835.lua1
Prey of the Jirai Gumo33055499Scripts/c33055499.lua1
Destiny Board94212438Scripts/c94212438.lua1
Eldlixir of the Glorious Golden Land22669793Scripts/c22669793.lua1
Argostars - Slayer Eteo38379052Scripts/c38379052.lua1
Kuebiko20087414Scripts/c20087414.lua1
Statue of Anguish Pattern23626223Scripts/c23626223.lua1
Ashtra Insect Poison64455720Scripts/c64455720.lua1
Silhouhatte Trick24440742Scripts/c24440742.lua1
...and 52 more

Script Examples ​

Sentence of Doom (40771118) ​

Source: Scripts/c40771118.lua

lua
		and Duel.IsPlayerCanSpecialSummonMonster(tp,tc:GetCode(),0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp,SUMMON_VALUE_DARK_SANCTUARY)
		and Duel.SelectYesNo(tp,aux.Stringid(16625614,0)) then
		tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_DARK,RACE_FIEND,1,0,0)
		Duel.SpecialSummonStep(tc,SUMMON_VALUE_DARK_SANCTUARY,tp,tp,true,false,POS_FACEUP)
		--immune

Dimension Reflector (54297661) ​

Source: Scripts/c54297661.lua

lua
	local def=tc:GetDefense()
	if not Duel.IsPlayerCanSpecialSummonMonster(tp,54297661,0,TYPES_EFFECT_TRAP_MONSTER,atk,def,4,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then return end
	c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
	if Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK) then
		local e1=Effect.CreateEffect(c)

Diamond Duston (96857854) ​

Source: Scripts/c96857854.lua

lua
	if c:IsRelateToEffect(e)
		and Duel.IsPlayerCanSpecialSummonMonster(tp,96857854,0,TYPES_NORMAL_TRAP_MONSTER,0,1000,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then
		c:AddMonsterAttribute(TYPE_NORMAL)
		Duel.SpecialSummonStep(c,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE)
		local e1=Effect.CreateEffect(c)