TICKET-388. contract/lua-reference/generate.py is a Python port of yugioh-legacy-server's duel-engine/ocgcore/lua-reference.sh (bash + awk): one api-<class>.md per luaL_Reg table in core/lib*.cpp (Card, Duel, Effect, Group, Debug; 670 functions) and api-globals.md for the 37 globals interpreter.cpp sets. Row counts match the server repo's committed reference exactly. Regenerate and commit after any core change to those files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
299 lines
9.2 KiB
Markdown
299 lines
9.2 KiB
Markdown
# `Card`
|
|
|
|
> Generated from `core/` by `contract/lua-reference/generate.py`; never edited by hand. Every function the core registers on `Card` is listed, and nothing else: a name that isn't here isn't in the core (the card scripts' `library/` defines the rest). A method is called on an object too (`c:IsCode(id)` is `Card.IsCode(c, id)`). *Arguments* is the fewest the core accepts, counting the object.
|
|
|
|
| Function | Arguments |
|
|
|---|---|
|
|
| `Card.AddCounter` | 3 |
|
|
| `Card.AddMonsterAttribute` | 2 |
|
|
| `Card.AssumeProperty` | 3 |
|
|
| `Card.CancelCardTarget` | 2 |
|
|
| `Card.CancelToGrave` | 1 |
|
|
| `Card.CheckActivateEffect` | 4 |
|
|
| `Card.CheckEquipTarget` | 1 |
|
|
| `Card.CheckFusionMaterial` | 1 |
|
|
| `Card.CheckFusionSubstitute` | 2 |
|
|
| `Card.CheckRemoveOverlayCard` | 4 |
|
|
| `Card.CheckSPSummonOnce` | 2 |
|
|
| `Card.CheckUnionTarget` | 1 |
|
|
| `Card.CheckUniqueOnField` | 2 |
|
|
| `Card.ClearEffectRelation` | 1 |
|
|
| `Card.ClearMeta` | 1 |
|
|
| `Card.CompleteProcedure` | 1 |
|
|
| `Card.CopyEffect` | 3 |
|
|
| `Card.CreateEffectRelation` | 2 |
|
|
| `Card.CreateRelation` | 3 |
|
|
| `Card.EnableCounterPermit` | 2 |
|
|
| `Card.EnableDualState` | 1 |
|
|
| `Card.EnableReviveLimit` | 1 |
|
|
| `Card.GetActivateEffect` | 1 |
|
|
| `Card.GetAttack` | 1 |
|
|
| `Card.GetAttackAnnouncedCount` | 1 |
|
|
| `Card.GetAttackableTarget` | 1 |
|
|
| `Card.GetAttackedCount` | 1 |
|
|
| `Card.GetAttackedGroup` | 1 |
|
|
| `Card.GetAttackedGroupCount` | 1 |
|
|
| `Card.GetAttribute` | 1 |
|
|
| `Card.GetAttributeInGrave` | 1 |
|
|
| `Card.GetBaseAttack` | 1 |
|
|
| `Card.GetBaseDefense` | 1 |
|
|
| `Card.GetBattlePosition` | 1 |
|
|
| `Card.GetBattleTarget` | 1 |
|
|
| `Card.GetBattledGroup` | 1 |
|
|
| `Card.GetBattledGroupCount` | 1 |
|
|
| `Card.GetCardRegistered` | 2 |
|
|
| `Card.GetCardTarget` | 1 |
|
|
| `Card.GetCardTargetCount` | 1 |
|
|
| `Card.GetCode` | 1 |
|
|
| `Card.GetColumnGroup` | 1 |
|
|
| `Card.GetColumnGroupCount` | 1 |
|
|
| `Card.GetColumnZone` | 2 |
|
|
| `Card.GetControler` | 1 |
|
|
| `Card.GetCounter` | 2 |
|
|
| `Card.GetCurrentScale` | 1 |
|
|
| `Card.GetDefense` | 1 |
|
|
| `Card.GetDestination` | 1 |
|
|
| `Card.GetEffectCount` | 2 |
|
|
| `Card.GetEquipCount` | 1 |
|
|
| `Card.GetEquipGroup` | 1 |
|
|
| `Card.GetEquipTarget` | 1 |
|
|
| `Card.GetFieldID` | 1 |
|
|
| `Card.GetFirstCardTarget` | 1 |
|
|
| `Card.GetFlagEffect` | 2 |
|
|
| `Card.GetFlagEffectLabel` | 2 |
|
|
| `Card.GetFusionAttribute` | 1 |
|
|
| `Card.GetFusionCode` | 1 |
|
|
| `Card.GetFusionType` | 1 |
|
|
| `Card.GetHandSynchro` | 1 |
|
|
| `Card.GetLeaveFieldDest` | 1 |
|
|
| `Card.GetLeftScale` | 1 |
|
|
| `Card.GetLevel` | 1 |
|
|
| `Card.GetLink` | 1 |
|
|
| `Card.GetLinkAttribute` | 1 |
|
|
| `Card.GetLinkCode` | 1 |
|
|
| `Card.GetLinkMarker` | 1 |
|
|
| `Card.GetLinkRace` | 1 |
|
|
| `Card.GetLinkType` | 1 |
|
|
| `Card.GetLinkedGroup` | 1 |
|
|
| `Card.GetLinkedGroupCount` | 1 |
|
|
| `Card.GetLinkedZone` | 1 |
|
|
| `Card.GetLocation` | 1 |
|
|
| `Card.GetMaterial` | 1 |
|
|
| `Card.GetMaterialCount` | 1 |
|
|
| `Card.GetMetaKeys` | 1 |
|
|
| `Card.GetMetaValue` | 2 |
|
|
| `Card.GetMutualLinkedGroup` | 1 |
|
|
| `Card.GetMutualLinkedGroupCount` | 1 |
|
|
| `Card.GetMutualLinkedZone` | 1 |
|
|
| `Card.GetOriginalAttribute` | 1 |
|
|
| `Card.GetOriginalCode` | 1 |
|
|
| `Card.GetOriginalCodeRule` | 1 |
|
|
| `Card.GetOriginalLeftScale` | 1 |
|
|
| `Card.GetOriginalLevel` | 1 |
|
|
| `Card.GetOriginalLinkMarker` | 1 |
|
|
| `Card.GetOriginalRace` | 1 |
|
|
| `Card.GetOriginalRank` | 1 |
|
|
| `Card.GetOriginalRightScale` | 1 |
|
|
| `Card.GetOriginalType` | 1 |
|
|
| `Card.GetOverlayCount` | 1 |
|
|
| `Card.GetOverlayGroup` | 1 |
|
|
| `Card.GetOverlayTarget` | 1 |
|
|
| `Card.GetOwner` | 1 |
|
|
| `Card.GetOwnerTarget` | 1 |
|
|
| `Card.GetOwnerTargetCount` | 1 |
|
|
| `Card.GetPosition` | 1 |
|
|
| `Card.GetPreviousAttackOnField` | 1 |
|
|
| `Card.GetPreviousAttributeOnField` | 1 |
|
|
| `Card.GetPreviousCodeOnField` | 1 |
|
|
| `Card.GetPreviousControler` | 1 |
|
|
| `Card.GetPreviousDefenseOnField` | 1 |
|
|
| `Card.GetPreviousEquipTarget` | 1 |
|
|
| `Card.GetPreviousLevelOnField` | 1 |
|
|
| `Card.GetPreviousLocation` | 1 |
|
|
| `Card.GetPreviousOverlayCountOnField` | 1 |
|
|
| `Card.GetPreviousPosition` | 1 |
|
|
| `Card.GetPreviousRaceOnField` | 1 |
|
|
| `Card.GetPreviousRankOnField` | 1 |
|
|
| `Card.GetPreviousSequence` | 1 |
|
|
| `Card.GetPreviousTypeOnField` | 1 |
|
|
| `Card.GetRace` | 1 |
|
|
| `Card.GetRaceInGrave` | 1 |
|
|
| `Card.GetRank` | 1 |
|
|
| `Card.GetRealFieldID` | 1 |
|
|
| `Card.GetReason` | 1 |
|
|
| `Card.GetReasonCard` | 1 |
|
|
| `Card.GetReasonEffect` | 1 |
|
|
| `Card.GetReasonPlayer` | 1 |
|
|
| `Card.GetRemovedOverlayCount` | 1 |
|
|
| `Card.GetRightScale` | 1 |
|
|
| `Card.GetRitualLevel` | 2 |
|
|
| `Card.GetSequence` | 1 |
|
|
| `Card.GetSpecialSummonInfo` | 1 |
|
|
| `Card.GetSummonLocation` | 1 |
|
|
| `Card.GetSummonPlayer` | 1 |
|
|
| `Card.GetSummonType` | 1 |
|
|
| `Card.GetSynchroLevel` | 2 |
|
|
| `Card.GetSynchroType` | 1 |
|
|
| `Card.GetTextAttack` | 1 |
|
|
| `Card.GetTextDefense` | 1 |
|
|
| `Card.GetTributeRequirement` | 1 |
|
|
| `Card.GetTunerLimit` | 1 |
|
|
| `Card.GetTurnCounter` | 1 |
|
|
| `Card.GetTurnID` | 1 |
|
|
| `Card.GetType` | 1 |
|
|
| `Card.GetUnionCount` | 1 |
|
|
| `Card.GetXyzType` | 1 |
|
|
| `Card.HasMetaValue` | 2 |
|
|
| `Card.IsAbleToChangeControler` | 1 |
|
|
| `Card.IsAbleToDeck` | 1 |
|
|
| `Card.IsAbleToDeckAsCost` | 1 |
|
|
| `Card.IsAbleToDeckOrExtraAsCost` | 1 |
|
|
| `Card.IsAbleToDecreaseAttackAsCost` | 1 |
|
|
| `Card.IsAbleToDecreaseDefenseAsCost` | 1 |
|
|
| `Card.IsAbleToExtra` | 1 |
|
|
| `Card.IsAbleToExtraAsCost` | 1 |
|
|
| `Card.IsAbleToGrave` | 1 |
|
|
| `Card.IsAbleToGraveAsCost` | 1 |
|
|
| `Card.IsAbleToHand` | 1 |
|
|
| `Card.IsAbleToHandAsCost` | 1 |
|
|
| `Card.IsAbleToRemove` | 1 |
|
|
| `Card.IsAbleToRemoveAsCost` | 1 |
|
|
| `Card.IsAllColumn` | 1 |
|
|
| `Card.IsAllReasons` | 2 |
|
|
| `Card.IsAllTypes` | 2 |
|
|
| `Card.IsAttack` | 2 |
|
|
| `Card.IsAttackAbove` | 2 |
|
|
| `Card.IsAttackBelow` | 2 |
|
|
| `Card.IsAttackPos` | 1 |
|
|
| `Card.IsAttackable` | 1 |
|
|
| `Card.IsAttribute` | 2 |
|
|
| `Card.IsCanAddCounter` | 3 |
|
|
| `Card.IsCanBeBattleTarget` | 2 |
|
|
| `Card.IsCanBeDisabledByEffect` | 2 |
|
|
| `Card.IsCanBeEffectTarget` | 1 |
|
|
| `Card.IsCanBeFusionMaterial` | 1 |
|
|
| `Card.IsCanBeLinkMaterial` | 2 |
|
|
| `Card.IsCanBePlacedOnField` | 1 |
|
|
| `Card.IsCanBeRitualMaterial` | 2 |
|
|
| `Card.IsCanBeSpecialSummoned` | 6 |
|
|
| `Card.IsCanBeSynchroMaterial` | 1 |
|
|
| `Card.IsCanBeXyzMaterial` | 2 |
|
|
| `Card.IsCanChangePosition` | 1 |
|
|
| `Card.IsCanHaveCounter` | 2 |
|
|
| `Card.IsCanOverlay` | 1 |
|
|
| `Card.IsCanRemoveCounter` | 5 |
|
|
| `Card.IsCanTurnSet` | 1 |
|
|
| `Card.IsChainAttackable` | 1 |
|
|
| `Card.IsCode` | 2 |
|
|
| `Card.IsControler` | 2 |
|
|
| `Card.IsControlerCanBeChanged` | 1 |
|
|
| `Card.IsDefense` | 2 |
|
|
| `Card.IsDefenseAbove` | 2 |
|
|
| `Card.IsDefenseBelow` | 2 |
|
|
| `Card.IsDefensePos` | 1 |
|
|
| `Card.IsDestructable` | 1 |
|
|
| `Card.IsDirectAttacked` | 1 |
|
|
| `Card.IsDisabled` | 1 |
|
|
| `Card.IsDiscardable` | 1 |
|
|
| `Card.IsDualState` | 1 |
|
|
| `Card.IsEffectProperty` | 2 |
|
|
| `Card.IsExtraDeckMonster` | 1 |
|
|
| `Card.IsExtraLinkState` | 1 |
|
|
| `Card.IsFacedown` | 1 |
|
|
| `Card.IsFaceup` | 1 |
|
|
| `Card.IsFaceupEx` | 1 |
|
|
| `Card.IsForbidden` | 1 |
|
|
| `Card.IsFusionAttribute` | 2 |
|
|
| `Card.IsFusionCode` | 2 |
|
|
| `Card.IsFusionSetCard` | 2 |
|
|
| `Card.IsFusionSummonableCard` | 1 |
|
|
| `Card.IsFusionType` | 2 |
|
|
| `Card.IsHasCardTarget` | 2 |
|
|
| `Card.IsHasDefense` | 1 |
|
|
| `Card.IsHasEffect` | 2 |
|
|
| `Card.IsHasLevel` | 1 |
|
|
| `Card.IsImmuneToEffect` | 2 |
|
|
| `Card.IsLevel` | 2 |
|
|
| `Card.IsLevelAbove` | 2 |
|
|
| `Card.IsLevelBelow` | 2 |
|
|
| `Card.IsLink` | 2 |
|
|
| `Card.IsLinkAbove` | 2 |
|
|
| `Card.IsLinkAttribute` | 2 |
|
|
| `Card.IsLinkBelow` | 2 |
|
|
| `Card.IsLinkCode` | 2 |
|
|
| `Card.IsLinkMarker` | 2 |
|
|
| `Card.IsLinkRace` | 2 |
|
|
| `Card.IsLinkSetCard` | 2 |
|
|
| `Card.IsLinkState` | 1 |
|
|
| `Card.IsLinkSummonable` | 2 |
|
|
| `Card.IsLinkType` | 2 |
|
|
| `Card.IsLocation` | 2 |
|
|
| `Card.IsMSetable` | 3 |
|
|
| `Card.IsNonAttribute` | 2 |
|
|
| `Card.IsNotTuner` | 2 |
|
|
| `Card.IsOnField` | 1 |
|
|
| `Card.IsOriginalCodeRule` | 2 |
|
|
| `Card.IsOriginalEffectProperty` | 2 |
|
|
| `Card.IsOriginalSetCard` | 2 |
|
|
| `Card.IsPosition` | 2 |
|
|
| `Card.IsPreviousControler` | 2 |
|
|
| `Card.IsPreviousLocation` | 2 |
|
|
| `Card.IsPreviousPosition` | 2 |
|
|
| `Card.IsPreviousSetCard` | 2 |
|
|
| `Card.IsPublic` | 1 |
|
|
| `Card.IsRace` | 2 |
|
|
| `Card.IsRank` | 2 |
|
|
| `Card.IsRankAbove` | 2 |
|
|
| `Card.IsRankBelow` | 2 |
|
|
| `Card.IsReason` | 2 |
|
|
| `Card.IsRelateToBattle` | 1 |
|
|
| `Card.IsRelateToCard` | 2 |
|
|
| `Card.IsRelateToChain` | 1 |
|
|
| `Card.IsRelateToEffect` | 2 |
|
|
| `Card.IsReleasable` | 1 |
|
|
| `Card.IsReleasableByEffect` | 1 |
|
|
| `Card.IsRitualType` | 2 |
|
|
| `Card.IsSSetable` | 1 |
|
|
| `Card.IsSetCard` | 2 |
|
|
| `Card.IsSpecialSummonSetCard` | 2 |
|
|
| `Card.IsSpecialSummonable` | 1 |
|
|
| `Card.IsSpecialSummonableCard` | 1 |
|
|
| `Card.IsStatus` | 2 |
|
|
| `Card.IsSummonLocation` | 2 |
|
|
| `Card.IsSummonPlayer` | 2 |
|
|
| `Card.IsSummonType` | 2 |
|
|
| `Card.IsSummonable` | 3 |
|
|
| `Card.IsSummonableCard` | 1 |
|
|
| `Card.IsSynchroSummonable` | 2 |
|
|
| `Card.IsSynchroType` | 2 |
|
|
| `Card.IsTuner` | 2 |
|
|
| `Card.IsType` | 2 |
|
|
| `Card.IsXyzLevel` | 3 |
|
|
| `Card.IsXyzSummonable` | 2 |
|
|
| `Card.IsXyzSummonableByRose` | 3 |
|
|
| `Card.IsXyzType` | 2 |
|
|
| `Card.RegisterEffect` | 2 |
|
|
| `Card.RegisterFlagEffect` | 5 |
|
|
| `Card.ReleaseEffectRelation` | 2 |
|
|
| `Card.ReleaseRelation` | 2 |
|
|
| `Card.RemoveCounter` | 5 |
|
|
| `Card.RemoveOverlayCard` | 5 |
|
|
| `Card.ReplaceEffect` | 3 |
|
|
| `Card.ResetEffect` | 3 |
|
|
| `Card.ResetFlagEffect` | 2 |
|
|
| `Card.ResetNegateEffect` | 1 |
|
|
| `Card.ReverseInDeck` | 1 |
|
|
| `Card.SetCardData` | 3 |
|
|
| `Card.SetCardTarget` | 2 |
|
|
| `Card.SetCounterLimit` | 3 |
|
|
| `Card.SetEntityCode` | 2 |
|
|
| `Card.SetFlagEffectLabel` | 3 |
|
|
| `Card.SetHint` | 3 |
|
|
| `Card.SetMaterial` | 2 |
|
|
| `Card.SetMetaValue` | 3 |
|
|
| `Card.SetReason` | 2 |
|
|
| `Card.SetSPSummonOnce` | 2 |
|
|
| `Card.SetStatus` | 3 |
|
|
| `Card.SetTurnCounter` | 2 |
|
|
| `Card.SetUniqueOnField` | 4 |
|