Magic Duels: Functions
This information is pulled directly from the executable. However, simply hexing the executable does not give much information about what function belongs to what object or where one object ends and another begins, nor does it give us information on parameters. As such this list may go through many iterations as we figure it all out.
Latest update: Aether Revolt
Contents |
Object
- AddCounters
- AddOneOfEachCounter
- AddScore
- AllowSFX
- AlterCost_PayableWithManaOfAnyColor
- AlterCost_SetMinConverted
- AlternateCostWasPaid
- Attach
- AttachToPlayer
- BecomeMonstrous
- BecomeRenown
- CalcScore
- CanAttachTo
- CanBePlayed
- CanPayCostWithManaOfAnyColor
- CanTransform
- ChangeTargetTo
- ClearDamage
- ClearFilter
- ConvergeColourCount
- CouldMeldWith
- CountAttachedAuras
- CountAttachedEquipment
- CountCounters
- CounterSpell
- DealDamageTo
- DealUnpreventableDamageTo
- DecreaseAbilityColouredCost
- DecreaseAbilityCost
- DecreaseColouredCost
- DecreaseCost
- Destroy
- DestroyWithoutRegenerate
- Discard
- Exile
- ExileFaceDown
- ExileWithMeldEffect
- ExileWithPlaneswalkerSpark
- ExileWithTransition
- GetBestOrWorstCounterType
- GetBlockVictim
- GetCardName
- GetCardTitle
- GetCardType
- GetColour
- GetController
- GetConvertedManaCost
- GetCurrentCharacteristics
- GetCurrentPower
- GetCurrentToughness
- GetDamage
- GetDataChest
- GetDefendingPlayer
- GetErstwhileErstwhileZone
- GetErstwhileErstwhileZoneController
- GetErstwhileZone
- GetErstwhileZoneController
- GetExpansionID
- GetFilter
- GetHitPoints
- GetKickedCount
- GetLastDamageAmountDealt
- GetManaX
- GetMonstrosity
- GetNumTargets
- GetNumXsInCost
- GetOwner
- GetPaidX
- GetParent
- GetParentPlayer
- GetPlaneswalkerAttacked
- GetPlayer
- GetPlayerAttacked
- GetProliferateChosenCounterType
- GetRenown
- GetSetID
- GetSpec
- GetSubType
- GetSuperType
- GetZone
- GiveRegeneration
- GrantPseudoFlash
- GuidedReveal
- HasCategory
- HasSummoningSickness
- Hold
- IncreaseAbilityColouredCost
- IncreaseAbilityCost
- IncreaseColouredCost
- IncreaseCost
- IsAttacking
- IsBlocked
- IsBlocking
- IsEnchanted
- IsFaceDown
- IsMonstrous
- IsPermanent
- IsRenown
- IsTapped
- IsTargeting
- IsTargetingOnly
- IsToken
- IsTransformed
- IsVisibleTo
- LoadTargetDefinition
- LoadTargetDefinitionFromDC
- MarkForFilter
- MeldWith
- MidResolutionSetController
- NailOnto
- NumAttacksThisTurn
- PlayFreeFromAnywhere
- PreventDamage
- PreventNextDamage
- Protection
- PutInGraveyard
- PutInHand
- PutInLibrary
- PutInPlaneDeck
- PutOnBottomOfLibrary
- PutOntoBattlefield
- PutOntoBattlefieldAttachedTo
- PutOntoBattlefieldAttacking
- PutOntoBattlefieldBlocking
- PutOntoBattlefieldTapped
- PutOntoBattlefieldTappedAndAttacking
- PutOntoBattlefieldTransformed
- PutOntoBattlefieldUnTappedAndAttacking
- PutOntoBattlefieldWithCounters
- QueueZoneChange
- RemoveCounters
- RemoveFromCombat
- RemoveFromParent
- ResourceAbilityGetTimesActivated
- ReturnToOwnersHand
- SetBaseController
- SetController
- StoreCopiableValues
- Tap
- TapAndHold
- Transform
- TurnFaceDown
- TurnFaceUp
- Untap
- UseCopiableValues
- WasBlocked
- WasCast
- WasCostPaid
- WasKicked
- WasPaidForWithColour
Object Characteristics
- AI_SetDamageImmune
- AI_SetWorthless
- AbilityOrigin
- AddColourChoiceBadge
- ArtID_Set
- AttackManaCost_Add
- BlockManaCost_Add
- Bool_Get
- Bool_Set
- CanBlockAdditionalCreature
- CanBlock_Clear
- CanBlock_Set
- CanLookAtWhileFaceDown
- CanOnlyBeBlockedBy_Clear
- CanOnlyBlock_Clear
- CanOnlyBlock_Set
- CantBeBlockedBy_Clear
- CantBeBlockedBy_Set
- CantBeBlockedExceptBy_Set
- CantBlock_Clear
- CantBlock_Set
- CardType_Add
- CardType_GetWritable
- Colour_Add
- Colour_Get
- Colour_Set
- Colour_SetColourless
- CostToAttackMe_Add
- GrantAbility
- HasUtilityAbility
- Int_Add
- Int_Get
- Int_SetMax
- Int_SetMin
- LoseAllAbilities
- MustAttackPlaneswalker
- MustAttackPlayer
- MustBlockCreature
- Power_Add
- Power_Get
- Power_Set
- SetGFXController
- SubType_Add
- SubType_GetWritable
- SubType_SetOnly
- SuperType_Add
- SuperType_GetWritable
- SwitchPowerToughness
- Toughness_Add
- Toughness_Get
- Toughness_Set
Player
- AddBadge
- AddMana
- AddManaBySymbols
- AddMultipleChoiceAnswer
- AddNumericalChoiceAnswer
- AddOneOfEachCounter
- AddPlayScore
- AddPoisonCounters
- AskMultipleChoiceQuestion
- AskNumericalChoiceQuestion
- AskProliferateQuestion
- BeginNewMultipleChoice
- BeginNewNumericalChoice
- CanCastSpellForFree
- CanCastSpellForNormalCost
- CanCastSpellUsingResourceCost
- CanPayManaCost
- CanPayResourceCost
- CastSpellForFree
- CastSpellForNormalCost
- CastSpellUsingResourceCost
- ChooseColour
- ChooseItem
- ChooseItemFromDC
- ChooseItems
- ChooseItemsFromDC
- ChooseNewTargets
- ControlsPlaneswalker
- CopyAbility
- CopySpell
- CountBasicLandTypes
- DiscardHand
- DiscardNRandomCards
- DiscardRandomCard
- DisplayMessage
- DrawCard
- DrawCards
- FlipCoin
- GainEnergyCounters
- GainLife
- GetAlwaysUseOptionalAbilitiesSetting
- GetCardCurrentlyBeingPlayed
- GetControllingPlayer
- GetCurrentCharacteristics
- GetDeckArchetypeID
- GetDevotionTo
- GetDistinctColourCountOnBattlefield
- GetDomainCount
- GetEnergyTotal
- GetFlipResult
- GetGlobalIndex
- GetLifeTotal
- GetManaPool
- GetMultipleChoiceResult
- GetNextPlayer
- GetNextPlayerInTeam
- GetNumericalChoiceResult
- GetOpponent
- GetPredominantColour
- GetStartingLifeTotal
- GetTeam
- GetTotalMana
- GetUniqueID
- Graveyard_Count
- Graveyard_GetNth
- Hand_Count
- Hand_GetNth
- Hand_GetRandom
- HasLandOfColour
- Investigated
- IsAI
- IsActuallyAnAI
- IsHuman
- IsLocalHuman
- IsPrimaryLocalHuman
- IsRevolting
- IsSimplifiedTargetingOn
- IsSorceryTime
- Library_Count
- Library_GetBottom
- Library_GetNth
- Library_GetTop
- LookAtPlayersHand
- LoseGame
- LoseLife
- MarkForFilter
- MillCards
- MoveLocalZone
- MyTurn
- OpponentHasLandOfColour
- OutOfTheGame
- PayEnergyCounters
- PayManaCost
- PayResourceCost
- Planeswalk
- PlayerDataChest
- PreventDamage
- PreventNextDamage
- Protection
- RevealDCToMe
- RevealHand
- Sacrifice
- SetCustomQueryInstructionCardPtr
- SetCustomQueryInstructionManaCost
- SetCustomQueryInstructionValue
- SetItemCount
- SetItemPrompt
- SetLifeTotal
- SetVoidWinnowerCantEven
- ShowWarning
- ShuffleLibrary
- WinGame
Player Characteristics
- Bool_Get
- Bool_Set
- CostToAttackMe_Add
- Int_Decrease
- Int_Decrement
- Int_Get
- Int_Increase
- Int_Increment
- Int_Set
- SetAttackController
- SetBlockController
- SetControllingPlayer
Team
- GetNthPlayer
- GetNumberOfPlayers
- GetStartingLifeTotal
- GetUniqueID
- HasLocalHuman
- IsSharedLifeTotal
- TakeExtraTurn
Filter
- Add
- AddSubFilter
- AddSubFilter_And
- AddSubFilter_Or
- AnyHaveCharacteristic
- ChromaCount
- Clear
- Count
- CountStopAt
- EvaluateObjects
- EvaluatePlayers
- GetNthEvaluatedObject
- GetNthEvaluatedPlayer
- GetNumCardTypes
- GetNumCombinedColours
- GetRandomEvaluatedObject
- HasAtLeast
- Invalidate
- SetFilterType
- SetHint
- SetMarkedObjectsOnly
- SetPortion
- SetReversePortion
- SetStackObjectType
- SetUnique
- SetUnmarkedObjectsOnly
- SetZone
- Set_And
- Set_Or
- ThrowAwayAllButNRandomObjects
SubFilter
- Add
- AddSubFilter
- AddSubFilter_And
- AddSubFilter_Or
- Clear
- SetFilterType
- Set_And
- Set_Or
MTG
- BESPOKE_Retether_SetOnlyCreaturesCanBeEnchantedFlag
- ClearFilterMark
- ClearInterrogationQuery
- CounterStackObject
- CreateDelayedTrigger
- CreateTokens
- DecreaseCurrentCost
- DropIntoDebugger
- DuelDataChest
- EffectController
- EffectDataChest
- FireTrigger
- GetActionRepCount
- GetCountersType
- GetCurrentCharacteristics
- GetCurrentObject
- GetCurrentTeam
- GetGameType
- GetNthPlayer
- GetNthStartingPlayer
- GetNthTeam
- GetNumberOfPlayers
- GetNumberOfStartingPlayers
- GetNumberOfTeams
- GetPhase
- GetPlayerByGlobalIndex
- GetStackObjectCard
- GetStackObjectController
- GetStep
- GetTurnID
- GetTurnNumber
- IncreaseCurrentCost
- IsMainDuel
- Log
- MakeEmblem
- MessageAllPlayers
- MinusOneMinusOneCounters
- OverrideEvent
- PlaySFX
- PlusOnePlusOneCounters
- PlusOnePlusZeroCounters
- PlusZeroPlusOneCounters
- PutPTTokensOntoBattlefield
- PutTokenCopiesOntoBattlefield
- PutTokenCopiesOntoBattlefieldBlocking
- PutTokenCopiesOntoBattlefieldTappedAndAttacking
- PutTokenCopiesOntoBattlefieldUntappedAndAttacking
- PutTokensOntoBattlefield
- PutTokensOntoBattlefieldBlocking
- PutTokensOntoBattlefieldTapped
- PutTokensOntoBattlefieldTappedAndAttacking
- PutTokensOntoBattlefieldUntappedAndAttacking
- RandomNumberBetween
- ReevaluateContinuousEffects
- RemoveDelayedTrigger
- ReportStatsEvent
- ReverseTurnOrder
- SetPlanarDiceNothingOverload
- SetTargetAnswerer
- SetTargetCount
- SetTargetTag
- SkipPhase
- SkipStep
- TakeAdditionalPhase
MTG Characteristics
- Bool_Get
- Bool_Set
Data Chest
- AttachTargetDefinition
- Clear
- CopyFrom
- Count
- Float_Add
- Float_Sub
- Free_Compartment
- GetType
- Get_Assignment
- Get_CardPtr
- Get_CardType
- Get_Chest
- Get_Colour
- Get_Damage
- Get_Float
- Get_Int
- Get_NthCardPtr
- Get_NthCompartmentID
- Get_NthPlayerPtr
- Get_NthTargets
- Get_PlayerPtr
- Get_SharedChest
- Get_SubType
- Get_Supertype
- Get_Targets
- Get_TeamPtr
- Has_Compartment
- Int_Add
- Int_Sub
- LKIShield_CardPtr
- Make_Chest
- Make_Targets
- Protect_CardPtr
- PutInGraveyard
- PutInHand
- PutInLibrary
- PutOnBottomOfLibrary
- PutOnTopOfLibrary
- PutOntoBattlefield
- PutOntoBattlefieldAttachedTo
- PutOntoBattlefieldTapped
- PutOntoBattlefieldTransformed
- PutOntoBattlefieldWithCounters
- QueryUnselect_CardPtr
- Remove_RandomCardPtr
- Set_Assignment
- Set_CardPtr
- Set_CardType
- Set_Colour
- Set_Damage
- Set_Float
- Set_Int
- Set_PlayerPtr
- Set_SubType
- Set_Supertype
- Set_TeamPtr
Damage
- Add
- GetAmount
- GetReceivingObject
- GetReceivingPlayer
- GetSource
- IsCombat
- Multiply
- PreventAll
- PreventAmount
- RedirectAllTo
- RedirectAmountTo
Colour
- Add
- Clear
- GetNumColours
- Set
- Test
- TestAll
- TestAny
Interrogation
- Clear
- Count
- SetColour
- SetColourless
- SetCombatOnly
- SetCounterType
- SetCountEventsOnly
- SetCreatureOnly
- SetFromZone
- SetNonTokenOnly
- SetObject
- SetPhase
- SetPlayer
- SetSecondaryObject
- SetSecondaryPlayer
- SetTeam
- SetToZone
- SetType
- SetUniqueDamageSources
- SetZoneChangeFlags
- Test
Mana Pool
- Get
- GetConvertedCost
Card type, sub-type, supertype
Not all functions are available to all kinds of information: the objects for which each function is defined are indicated in brackets.
- Add (all)
- Clear (type, sub-type)
- ClearAllOfType (sub-type)
- Count (sub-type)
- IsPermanent (type)
- Set (type, sub-type)
- SetOnly (type)
- Test (all)
???
The following functions are already in the Object category, but were repeated inside the executable. Is there a particular object that allows only those functions?
- CalcScore
- Exile
- ExileFaceDown
- GetOwner
- GetPlayer
- GetTypeCount
- NailOnto
- PutInGraveyard
- PutInHand
- PutInLibrary
- PutOnBottomOfLibrary
- PutOnTopOfLibrary
- PutOntoBattlefield
- PutOntoBattlefieldAttachedTo
- PutOntoBattlefieldTapped
- PutOntoBattlefieldTransformed
- PutOntoBattlefieldWithCounters
- ReturnToOwnersHand
The following function was alone inside the executable. I would associate it to Object and/or Player, but it should be tested.
- GetOriginalCharacteristics