Examples: Wild Battles
Section 5.A
Wild Battle Example # 1
The example below demonstrates a 1v1 battle against a wild Deoxys. In this battle, the following rules are set:
"cannotRun" is used to prevent the playing from fleeing.
"disablePokeBalls" is used to prevent the player from manually throwing Poke Balls.
"terrain" is used to set permanent Psychic terrain.
"environ" is used to set the battle environment to :Space.
"backdrop" and "base" are used to customize the battle backdrop and bases, respectively.
"alwaysCapture" is used to ensure a 100% capture rate in this battle.
"battleBGM" is used to set custom battle music.
"battleIntroText" is used to set custom battle intro text.
"editWildPokemon" is used to edit the following attributes of the wild Deoxys:
Name is set to "????" so that it may be "revealed" in battle.
Obtain location is set to "Outer Space."
Flagged as Super Shiny.
Given Pokerus.
HP Level set to 2, multiplying its natural HP 2x.
Given boss immunity to OHKO effects, effects that would force it to flee, and all forms of indirect damage.
"midbattleScript" is used to set a script to use for this battle which does the following:
"Reveals" Deoxy's real name at the start of the battle.
Sets a damage cap for Deoxys so that it will survive with 1 HP regardless of damage taken.
At the end of each round, Deoxys will cycle to its next form and recover its HP/Status.
Whenever Deoxys takes damage from an attack, it recovers back a little HP.
When Deoxy's HP falls to 25% or lower, it stops regenerating HP.
When Deoxys reaches the set damage cap (1 HP) after its regeneration has ended, the player will automatically throw a Poke Ball to capture Deoxys. This capture is guaranteed thanks to the "alwaysCapture" rule.
Wild Battle Example # 2
The example below demonstrates a double battle where the player and their partner May encounter a wild Latias and Latios. In this battle, the following rules are set:
"cannotRun" is used to prevent the playing from fleeing.
"weather" is used to set permanent Hail.
"backdrop" is used to customize the battle backdrop and bases.
"editWildPokemon" is used to edit the following attributes of the wild Latias:
Nature is set to Modest.
Given Soul Dew to hold.
Ability is set to Healer.
Given the moves Life Dew, Reflect, Helping Hand, and Psychic.
"editWildPokemon2" is used to edit the following attributes of the wild Latios:
Nature is set to Adamant.
Given Soul Dew to hold.
Ability is set to Friend Guard.
Given the moves Dragon Dance, Breaking Swipe, Zen Headbutt, and Earthquake.
"midbattleScript" is used to set a script to use for this battle which does the following:
When either Latios or Latias reach 25% HP or lower, they will call upon the other to heal them.
When either Latios or Latias faint, the remaining one will flee, ending the battle.
Last updated