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: Kaladesh
Contents |
Object
- AddCounters
- AddScore
- AllowSFX
- AlterCost_PayableWithManaOfAnyColor
- AlterCost_SetMinConverted
- AlternateCostWasPaid
- Attach
- AttachToPlayer
- BecomeMonstrous
- BecomeRenown
- CalcScore
- CanAttachTo
- CanBePlayed
- CanPayCostWithManaOfAnyColor
- CanTransform
- ChangeTargetTo
- ClearDamage
- ClearDamageProtection
- ClearFilter
- ConvergeColourCount
- CouldMeldWith
- CountAttachedAuras
- CountAttachedEquipment
- CountCounters
- CounterSpell
- DealDamageTo
- DealUnpreventableDamageTo
- DecreaseAbilityColouredCost
- DecreaseAbilityCost
- DecreaseColouredCost
- DecreaseCost
- Destroy
- DestroyWithoutRegenerate
- Discard
- Exile
- ExileFaceDown
- ExileWithMeldEffect
- ExileWithPlaneswalkerSpark
- 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
- 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
- PutOnTopOfLibrary
- 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
- AddPlayScore
- AddPoisonCounters
- AskMultipleChoiceQuestion
- AskNumericalChoiceQuestion
- BeginNewMultipleChoice
- BeginNewNumericalChoice
- CanCastSpellForFree
- CanCastSpellForNormalCost
- CanCastSpellUsingResourceCost
- CanPayManaCost
- CanPayResourceCost
- CastSpellForFree
- CastSpellForNormalCost
- CastSpellUsingResourceCost
- ChooseColour
- ChooseItem
- ChooseItemFromDC
- ChooseItems
- ChooseItemsFromDC
- ChooseNewTargets
- ControlsPlaneswalker
- CopyAbility
- CopySpell
- CostToAttackMe_Add
- 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
- 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
- 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
- SetFilterType
- Set_And
- Set_Or
MTG
- BESPOKE_Retether_SetOnlyCreaturesCanBeEnchantedFlag
- Bool_Get
- Bool_Set
- 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
- 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
Data Chest
- AttachTargetDefinition
- Clear
- CopyFrom
- Count
- ExileFaceDown
- Float_Add
- Float_Sub
- Free_Compartment
- GetOwner
- GetPlayer
- 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
- NailOnto
- Protect_CardPtr
- PutInGraveyard
- PutInHand
- PutInLibrary
- PutOnBottomOfLibrary
- PutOnTopOfLibrary
- PutOntoBattlefield
- PutOntoBattlefieldAttachedTo
- PutOntoBattlefieldTapped
- PutOntoBattlefieldTransformed
- PutOntoBattlefieldWithCounters
- QueryUnselect_CardPtr
- Remove_RandomCardPtr
- ReturnToOwnersHand
- 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
Interrogation
- Clear
- Count
- SetColour
- SetColourless
- SetCombatOnly
- SetCounterType
- SetCountEventsOnly
- SetCreatureOnly
- SetFromZone
- SetNonTokenOnly
- SetPhase
- SetPlayer
- SetSecondaryObject
- SetSecondaryPlayer
- SetTeam
- SetToZone
- SetType
- SetUniqueDamageSources
- SetZoneChangeFlags
- Test
Card types, sub-types, supertypes
(NOTE: not all functions are available to all kinds of information)
- Add
- Clear
- Set
- Test
- IsPermanent (types only)
- ClearAllOfType (sub-types only)
???
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
