Attacks API
Interface Functions
Attack Registration
RegisterAttack(ByVal ID As Integer, ByVal Name As String, ByVal Description As String, ByVal Script As String)
SetAttackBaseDamage(ByVal ID As Integer, ByVal val As Integer)
SetAttackMaxPP(ByVal ID As Integer, ByVal val As Integer)
SetAttackType(ByVal ID As Integer, ByVal val As Integer)
SetAttackAccuracy(ByVal ID As Integer, ByVal val As Integer)
SetAttackContestCategory(ByVal ID As Integer, ByVal val As Integer)
SetAttackCategory(ByVal ID As Integer, ByVal val As Integer)
SetAttackAttackCategory(ByVal ID As Integer, ByVal val As Integer)
SetAttackAccuracyCheck(ByVal ID As Integer, ByVal val As Boolean)
SetAttackKingStoneAffected(ByVal ID As Integer, ByVal val As Boolean)
SetAttackPriority(ByVal ID As Integer, ByVal val As Integer)
SetAttackEffectChance(ByVal ID As Integer, ByVal val As Integer)
SetAttackHasAttackEffect(ByVal ID As Integer, ByVal val As Boolean)
SetAttackHasHitEffect(ByVal ID As Integer, ByVal val As Boolean)
SetAttackIsHMMove(ByVal ID As Integer, ByVal val As Boolean)
SetAttackProtectDetectWorks(ByVal ID As Integer, ByVal val As Boolean)
SetAttackMagicCatAffected(ByVal ID As Integer, ByVal val As Boolean)
SetAttackCanBeCopiedByMirrorMove(ByVal ID As Integer, ByVal val As Boolean)
SetAttackRemoveFrozen(ByVal ID As Integer, ByVal val As Boolean)
SetAttackHighCriticalChance(ByVal ID As Integer, ByVal val As Boolean)
SetAttackIsHealingMove(ByVal ID As Integer, ByVal val As Boolean)
SetAttackIsRoundBasedMove(ByVal ID As Integer, ByVal val As Boolean)
SetAttackDisabledWhileGravity(ByVal ID As Integer, ByVal val As Boolean)
SetAttackUseSuperEffective(ByVal ID As Integer, ByVal val As Boolean)
SetAttackUseNotEffective(ByVal ID As Integer, ByVal val As Boolean)
SetAttackUseNotAffected(ByVal ID As Integer, ByVal val As Boolean)
SetAttackTimesToAttack(ByVal ID As Integer, ByVal val As Integer)
SetAttackAbsoluteDamage(ByVal ID As Integer, ByVal val As Integer)
SetAttackAttackingAnimationDelegate(ByVal ID As Integer, ByVal s As String)
SetAttackHitAnimationDelegate(ByVal ID As Integer, ByVal s As String)
SetAttackSpecialAttackDelegate(ByVal ID As Integer, ByVal s As String)
SetAttackOnUserSwitchDelegate(ByVal ID As Integer, ByVal s As String)
SetAttackPreAttackDelegate(ByVal ID As Integer, ByVal s As String)
SetAttackMissedDelegate(ByVal ID As Integer, ByVal s As String)
Event-Time Functions (non-animation)
Attacks_SetBaseDamage(ByVal val As Integer)
Attacks_SetStore(ByVal val As String)
Attacks_SetTimesToAttack(ByVal val As Integer)
Attacks_SetAbsoluteDamage(ByVal val As Integer)
Attacks_SetAccuracy(ByVal val As Integer)
Attacks_AddBattleStep(ByVal bstep As String, ByVal args As String)
Attacks_TryAddVolitileStatus(ByVal target As String, ByVal statuseffect As String) As Boolean
Attacks_TryRemoveVolitileStatus(ByVal target As String, ByVal statuseffect As String) As Boolean
Attacks_GetTargetAffectedByVolitileStatus(ByVal target As String, ByVal statuseffect As String) As Boolean
Attacks_GetTargetStatusEffect(ByVal target As String) As String
Attacks_GetTargetMoveTypeByIndex(ByVal target As String, ByVal moveidx As Integer) As Integer
Attacks_GetTargetMovesByIndex(ByVal target As String, ByVal moveidx As Integer) As Integer
Attacks_SetTargetMoves(ByVal target As String, ByVal newmove1 As Integer, ByVal newmove2 As Integer, ByVal newmove3 As Integer, ByVal newmove4 As Integer)
Attacks_GetTargetStatsByName(ByVal target As String, ByVal statname As String) As Integer
Attacks_SetTargetStats(ByVal target As String, ByVal atk As Integer, ByVal def As Integer, ByVal spatk As Integer, ByVal spdef As Integer, ByVal speed As Integer)
Attacks_SetTargetAnimationName(ByVal target As String, ByVal newname As String)
Attacks_GetTargetAnimationName(ByVal target As String) As String
Attacks_SetTargetTypes(ByVal target As String, ByVal type1idx As Integer, ByVal type2idx As Integer)
Animation Event Functions
AnimationSequenceBegin()
AnimationSequenceEnd()
AttacksSpawnOpacityAnimation(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single)
AttacksSpawnMovingAnimation(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single)
AttacksSpawnBillMoveAnimation(ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single)
AttacksSpawnSoundAnimation(ByVal s As String, ByVal startDelay As Single, ByVal endDelay As Single)
AttacksSpawnSizeAnimation(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single)
Event-Time Globals
PLEASE NOTE THAT DURING ANIMATION DELEGATES YOU CAN ONLY ACCESS YOUR OWN GLOBALS, TARGET IS ALSO SET TO THE USER, IF YOUR ANIMATION REPLIES ON TARGET INFORMATION DO THE CHECK IN THE SPECIAL OR PREATTACK DELEGATE
ALSO, THESE ARE READ ONLY, SETTING THEM DOES NOTHING
Attacks_Store
String, unique to this instance of the attack, can be set at runtime see Attacks_SetStore
Attacks_DamageDealt
Number, the damage dealt by this attack. Always set to 0 except for inside Special Attack Delegates. For attacks with multiple hits, this is not the total damage dealt, but the damage dealt by that hit.
Attacks_MyHP
The user's HP
Attacks_MyMaxHP
The user's max HP
Attacks_MyLevel
The user's level
Attacks_MyName
The user's name
Attacks_MyWeight
The user's weight according to the pokedex
Attacks_MyType1
The user's 1st type
Attacks_MyType2
The user's 2nd type
Attacks_PrimaryTargetHP
The primary target of this attack's HP
Attacks_PrimaryTargetMaxHP
The primary target of this attack's max HP
Attacks_PrimaryTargetLevel
The primary target of this attack's level
Attacks_PrimaryTargetName
The primary target of this attack's name
Attacks_PrimaryTargetWeight
The primary target of this attack's weight according to the pokedex
Attacks_PrimaryTargetType1
The primary target of this attack's 1st type
Attacks_PrimaryTargetType2
The primary target of this attack's 2nd type
Attacks_AdjacentTargetHP
Does nothing, for double battles
Attacks_AdjacentTargetHP1
Does nothing, for double battles
Attacks_AdjacentTargetHP2
Does nothing, for double battles
Attacks_AdjacentTargetLevel
Does nothing, for double battles
Attacks_AdjacentTargetLevel1
Does nothing, for double battles
Attacks_AdjacentTargetLevel2
Does nothing, for double battles
Attacks_AdjacentTargetName
Does nothing, for double battles
Attacks_AdjacentTargetName1
Does nothing, for double battles
Attacks_AdjacentTargetName2
Does nothing, for double battles
Attacks_AdjacentTargetWeight
Does nothing, for double battles
Attacks_AdjacentTargetWeight1
Does nothing, for double battles
Attacks_AdjacentTargetWeight2
Does nothing, for double battles
Attacks_AdjacentTargetType1
Does nothing, for double battles
Attacks_AdjacentTargetType11
Does nothing, for double battles
Attacks_AdjacentTargetType12
Does nothing, for double battles
Attacks_AdjacentTargetType2
Does nothing, for double battles
Attacks_AdjacentTargetType21
Does nothing, for double battles
Attacks_AdjacentTargetType22
Does nothing, for double battles
Attacks_AdjacentTargetMaxHP
Does nothing, for double battles
Attacks_AdjacentTargetMaxHP1
Does nothing, for double battles
Attacks_AdjacentTargetMaxHP2
Does nothing, for double battles
Attacks_EnvironmentType
The map's environment type
- 0 = auto (day/night cycle)
- 1 = always day
- 2 = cave
- 3 = always dark
- 4 = underwater
Attacks_EnvironmentDayPhase
The map's day phase
- 0 = night
- 1 = dawn
- 2 = day
- 3 = dusk
Attacks_EnvironmentWeather
The map's weather (not battle weather)
- 0 = calm day
- 1 = raining
- 2 = snowing
- 3 = underwater
Attacks_IsTrainerBattleFalse
Set to true if in a trainer battle, false if in a battle with a wild pokemon
Attacks_TargetString
An internal engine string representing the target of the attack. If the target string is "0" it is targeting player 1, if it is "1" it is targeting player 2