Skip to content

Card.IsOriginalCodeRule ​

Signature ​

lua
Card.IsOriginalCodeRule(Card c, int code1, [int code2], [... int]) -> bool

Description ​

Checks whether c's rule-original card code matches any supplied code. Nil code arguments are skipped. For double-code cards, the core checks both rule-original codes; otherwise it checks the card's duel code.

Parameters ​

  • c Card
  • code1 int
  • code2 int optional
  • ... int optional

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 56 indexed script(s).
  • Search this function in the Script Explorer with Card.IsOriginalCodeRule.
CardIDScriptDetected Calls
A-to-Z-Dragon Buster Cannon65172015Scripts/c65172015.lua2
Union Activation38527680Scripts/c38527680.lua1
Dual Avatar - Manifested A-Un28798938Scripts/c28798938.lua2
Millennium-Eyes Restrict41578483Scripts/c41578483.lua2
Majesty Pegasus, the Dracoslayer92332424Scripts/c92332424.lua1
Number 69: Heraldry Crest - Shatter Stream31086840Scripts/c31086840.lua1
Sun God Unification77432167Scripts/c77432167.lua1
Photon Change42925441Scripts/c42925441.lua1
Penguin Sword69792699Scripts/c69792699.lua2
Forge a New Future27104921Scripts/c27104921.lua4
Rokket Recharger5969957Scripts/c5969957.lua1
The Kaiju Files11163040Scripts/c11163040.lua2
Steel-Stringed Sacrifice7166709Scripts/c7166709.lua1
The League of Uniform Nomenclature Strikes29265962Scripts/c29265962.lua1
Rank-Up-Magic Admiration of the Thousands96142517Scripts/c96142517.lua2
War Rock Meteoragon10497636Scripts/c10497636.lua2
Nephthys, the Sacred Preserver50669347Scripts/c50669347.lua1
Nightmell the Dark Bonder66569334Scripts/c66569334.lua1
Solemn Accusation78114463Scripts/c78114463.lua2
Exosister Carpedivem30802207Scripts/c30802207.lua4
Test Panther66863374Scripts/c66863374.lua1
Three in One50838440Scripts/c50838440.lua2
Fist of Fate79868386Scripts/c79868386.lua3
Harpie Lady Elegance65664792Scripts/c65664792.lua3
...and 32 more

Script Examples ​

A-to-Z-Dragon Buster Cannon (65172015) ​

Source: Scripts/c65172015.lua

lua
end
function c65172015.matfilter(c,sc)
	return c:IsOriginalCodeRule(1561110,91998119) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function c65172015.fselect(g,tp,sc)

Union Activation (38527680) ​

Source: Scripts/c38527680.lua

lua
end
function s.thfilter(c,code,atk)
	return not c:IsOriginalCodeRule(code) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and c:IsAttack(atk) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)

Dual Avatar - Manifested A-Un (28798938) ​

Source: Scripts/c28798938.lua

lua
		c:RegisterFlagEffect(85360035,RESET_EVENT+RESETS_STANDARD,0,1)
	end
	if g:IsExists(Card.IsOriginalCodeRule,1,nil,33026283) then
		--atk down
		local e1=Effect.CreateEffect(c)