Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
2v1 Boss and Totem Battles


Overview:
The original aim of this resource was to recreate Totem Battles from Pokémon Sun/Moon. However I decided to make it more customizable and personalized so that this script can be used to create a custom 1v1 or 2v1 Boss Battle. This can also override regular wild encounters in Grass, Caves, Fishing or even other event encounters. So, the boss battles should work almost exactly as the do in the official games, but with more personalization.

Th main principle of this script is to create a Boss/Totem Battle by overriding what normally happens in a battle. These are what I call Battle Overrides ie. Extra rules that apply to a Boss Battle. I've got a big list of the ones I could think of, and I want to implement a decent way (they are all mentioned in my List of Future Ideas). My plan is that you'd queue up Battle Overrides (in the same way as you queue up what BGM you want to use for the next battle) and then the next battle makes use of them all.


Features:
  1. Controlling the Following aspects of a Boss/Totem Pokemon right from the event you have used to start the Boss Battle
    • Customization of Battle Music and Victory Jingle
    • Customization of Each Individual part of the Battle Background
    • Customization of Message on Entry in Battle, and on Fainting
    • Customization of the "What will X do?" Message
    • Customization of the Title of the Boss from "wild X" to anything you want.
    • Customization of Stat Stages, Animation and Messages when Pokemon recieves Totem Stat Boost
    • Customization of Catch Rate and Catching Style (Explained in Detail in the Instructions section)
    • Setting up Species, Form, Level, EVs, IVs, Moves, Item, Ability, Shiny Rate, Pokerus Rate and more.
  2. SOS Chaining
  3. Mid Battle Dialogue and More (Details in Instructions)
  4. Compatibility with Dynamax and most new Battle Scripts except Elite Battle System/Elite Battle DX


Example Battles made using this Script (Outdated):
Spoiler:

These are Outdated as they don't show off SOS Chaining or Mid Battle Scripting. However you can check uot updated versions of these battles yourseld by adding this Map to your game
Download Link for Map
  • Example Totem Battle:
  • Example Boss Battle 1:
  • Example Boss Battle 2:



List of Future Ideas:
Spoiler:
High Priority
  • Removing ways to cheese bosses by making them immune to things like flinching,status conditions, Roar, Whirlwind etc.
  • Adding a Title for Bosses. Currently only calls the Boss by their name. It should call them "Totem X" or "Rampaging X" or something.
    Eg. Instead of "X used Slash" it should be"Totem X used Slash"
  • Adding a chance to change the "What will X do?" when in battle.
  • Adding a way to initialize Weather or Battler/Battle Effects when you receive the Totem Stat Boosts
  • Allowing you to save the outcome of a Boss Battle in a Variable.

Medium Priority
  • Add a way to change Battle UI of Player and/or Enemy when in a Boss Battle.
  • Adding the Shiny Totem Glow/Overlay

Low Priority
  • Adding optional stat multipliers to the bosses (like apart from the Totem Stat Boosts)
  • Add some optional way for the Boss Pokemon to heal a small amount of HP mid battle (like apart from Healing Moves)
  • Adding a way to limit the number of turns in the battle.
  • Adding an Animation for when the Boss Faints.



Download Link
Please Credit the following people if you use this script.
Credits:
Spoiler:
  • Golisopod User
  • Luka SJ
  • Nyaruko from PokéLiberty
  • Vendlily



This script has not been tested with Luka SJ's Elite Battle System/Elite Battle DX. Do use it with it at your own risk


Instructions
Spoiler:

Installation of Script:
Spoiler:
  1. Place the contents of Simple 2v1 Boss Battles.txt in a new script section above Main
  2. Install Luka's Utilities from here https://luka-sj.com/res/luts
  3. Use Ctrl+Shift+F and look for "if transformed". Below that, look for:
     @battle.pbDisplay(_INTL("{1} transformed!",pbThis))
    and replace that with:
     @battle.pbDisplay(_INTL("{1} transformed!",pbThis)) if !BossBattleData.getPokemonData[:forcedForm]
  4. Edit the Customizable Options
  5. Edit the default text from the constants below. (Not Necessary)
  6. Start a new save (Not necessary, but just to be on the safe side)


Script Commands for the Boss Battles:
Spoiler:

To start a Boss Battle, use one of the 2 scripts:
  1. For a regular 1v1 Battle:
    BossBattleData.startBossBattle({data})
  2. For a 2v1 Battle:
    BossBattleData.start2v1BossBattle({data})
For just setting up the Overrides of a Boss Battle:
  1. BossBattleData.set({data})
(Please don't forget the curly brackets, it's part of the syntax)

In these examples. The "data" is a list of the Battle Overrides you want for the Boss Battle. Detailed info about each one of them is given below.



Information about each Battle Override:
Spoiler:
  1. :CATCH_RATE (Number Value)
    Sets the base catch percentage.(Modifiers to this catch rate through DuskBalls etc still work) Uncatchable by default. The rate is 1/:CATCH_RATE.
  2. :BATTLE_BGM (String Value)
    Sets the battle Music for the Boss Battle from your Graphics/Audio/BGM/ folder.
  3. :BATTLE_ME (String Value)
    Sets the battle Victory Music for the Boss Battle from your Graphics/Audio/ME/ folder
  4. :BATTLE_TEXT (String Value)
    Sets the text for when the Boss Pokemon appears in Battle.
  5. :FAINTED_TEXT (String Value)
    Sets the text for when the Boss Pokemon faints in Battle
  6. :WARN_TEXT (String Value)
    Sets the text for the "What will X do?" when selecting command for battle.
  7. :TITLE(String Value)
    Sets the title of the Boss from "wild X" to anything of your choice
  8. :BATTLE_WEATHER
    Sets the Weather of your choice and overrides weather in the Overworld.
  9. :CAN_RUN (true or false)
    Set this to true if you want to be able to run from Boss Battle. False by default.
  10. :CAN_LOSE (true or false)
    Set this to true if you want to be able to continue your game and not black out after you lose the Boss Battle. False by default.
  11. :BATTLE_BG (String Value or Hash Value)
    Sets the Background for a Boss Battle. Hash has key values of:
    • :backdrop => (String) Decides Background
    • :playerBase => (String) Decides base of Player
    • :enemyBase => (String) Decides base of enemy
    Examples:
    • :BATTLE_BG=>"FieldEve"
    • :BATTLE_BG=>{:backdrop=>"EliteD",:enemyBase=>"",:playerBase=>"CaveDarker"}
  12. :STAT_RAISE (Array Value)
    Sets the Stat as well as amount to boost for the Totem Pokemon at the start of the Battle. The values of the array should be the stat along with the amount Multiple stats can be boosted by the same number by placing the stats in the Array one after the other.
    Examples:
    • :STAT_RAISE=>[:ATTACK,3] will boost Attack by 3
    • :STAT_RAISE=>[:ATTACK,:DEFENSE,:SPATK,:SPDEF,:SPEED,:ACCURACY,:EVASION,2] will boost all of the above mentioned stats by 2
    • :STAT_RAISE=>[:ATTACK,2,:DEFENSE,3] will boost Atk by 2 and defense by 3
    • :STAT_RAISE=>[:ATTACK,2,3] will boost Attack by 2
    • :STAT_RAISE=>[2,:ATTACK] will do nothing
  13. :STAT_DISPLAY (Hash Value)
    Sets the text and animation for when receiving the Totem Stat Boost from :STAT_RAISE. You don't need to set this up if you haven't set up :STAT_RAISE. The keys of this hash are:
    • :beforeAnim => (String) Dialogue before Stat Boosts
    • :anim => (String)Common Animation for Stat Boosts. If its an Array then it will display multiple common animations back to back.
    • :afterAnim => (String) Dialogue after Stat Boosts
    Examples:
    • :STAT_DISPLAY=>{:beforeAnim=>"{1} draws power from the Distortion World!", :anim=>["MegaEvolution","StatUp"], :afterAnim=>"{1}'s raised it's defensive stats sharply!"}}) {1} is the name of the Boss
  14. :SOS_DATA (Hash Value)
    Sets the text, rate and allies for the SOS Chaining in Boss Battle. The keys of this hash are:
    • :rate => (Number between 1-100) Determines the Rate of the Boss Calling and SOS Partner
    • :message => (String) Message displayed when a Boss calls a Pokemon
    • :message => (String) Message displayed after a Boss calls a Pokemon
    • :message => (Array) Array of species from which SOS Partner is selected
    Examples:
    • :SOS_DATA=>{:rate=>50,:ally=>[:MUNCHLAX,:MUNCHLAX,:HAPPINY,:CHANSEY],:message=>"{1}'s cry echoes throuch the lands!","appear=>"{1} came to {2}'s aide!"},
  15. :WILD_SPECIES (Hash Value)
    Sets the species and other related data for the Boss Battle. None of these are compulsury to set up if you (Except Species and Level if you are using the startBossBattle Methods). The Key values are:
    • :species=>Species of the Boss battle Pokemon
      Eg:
      :species=>:CHARIZARD
    • :level=>(Number)Sets level of Boss Battle Pokemon. Override level set by Level Scaling.
    • :shiny=>(Number) Set this to set the Shiny Rate. Set this to true if the boss is a Guaranteed shiny.
    • :gender=>(Number) Set this to set the gender of the Boss. (Won't force Gender Eg: you can't have male for a Female Only or a Genderless Pokemon)
    • :ability=>(Number) Set this to set the ability of the Boss. Set it to 0 or 1 for regular abilities and 2-4 for hidden.
    • :pokerus=>(Number) Set this to set the Pokerus rate. Set this to true if the boss has guaranteed Pokerus.
    • :form=>(Number)Sets form of Boss Battle Pokemon
    • :nature=>Sets nature of Boss Battle Pokemon
      Eg:
      :nature=>:ADAMANT
    • :item=>Sets item of Boss Battle Pokemon
      Eg:
      :item=>:SITRUSBERRY
    • :forcedForm=>(Number)Forces form of Boss Battle Pokemon. Can be used to set up a battle against something like Giratina Origin without a Griseous Orb or Primal Groudon without the Red Orb
    • :moves=>(Array)Sets moves of Boss Battle Pokemon. Examples
      • :moves=>[:CRUNCH,:RAINDANCE,:WEATHERBALL,:THUNDER]
      • :moves=>[:TACKLE]
        will force Tackle along with 3 moves the Pokemon naturally learns
      • :moves=>[:HYDROPUMP,:SACREDSWORD,:ICEBEAM]
        will force Hydro Pump,Sacred Sword,Ice Beam along with one natural move
    • :ev=>(Array)Sets EVs of Boss Battle Pokemon. It should have 6 numerical elements.The arrangement is [HP,ATK,DEF,SPEED,SPATK,SPDEF]. Examples
      • :ev=>[0,252,0,4,252,0]
      • :ev=>[252] will do nothing
    • :iv=>(Array)Sets IVs of Boss Battle Pokemon. It should have 6 numerical elements.The arrangement is [HP,ATK,DEF,SPEED,SPATK,SPDEF]. Examples
      • :iv=>[31,31,31,0,31,31]
      • :iv=>[31]will do nothing
    Examples:
    • :WILD_SPECIES=>{:species=>:GIRATINA,:level=>55, :forcedForm=>1,:shiny=>true,:pokerus=>true, :moves=>[:BOLTSTRIKE,:SPACIALREND,:VCREATE,:BLUEFLARE],:iv=>[31,31,31,31,31,31],:ev=>[0,252,0,252,4,0]}
  16. :CATCH_DATA (Hash Value)
    Sets the Dialogue for when the Boss Pokemon blocks a PokeBall. It also allows for some event to play where the Pokemon can be caught when it is fainted. Boss automatically becomes uncatchable if you set this data up ie this overrides CATCH_RATE. The Key values are:
    • :blockDialogue=>(String) Dialogue shown when Pokemon blocks a Pokeball
      Eg:
      :blockDialogue=>"{1} slapped the {2} away with its tail."
      {1} is the Pokemon name {2} is the PokeBall name
    • :catchStyle=>(Number b/w 0 or 1)The style by which you'd like to catch the boss Pokemon. If it's set to 1 then the style is similar to catching a Max Raid Boss. If it's set to 0 then the style is similar to recruiting a Pokemon in the Mystery Dungeon Games.
    • :catchRate=>(Number) Rate which decides whether a Boss is caught or recruited,. It's not related to :CATCH_RATE. It doesnt get edited by Modifiers such as Dusk Ball. Its 100% by default. 1/:catchRate
    • :joinME =>(String) Name of the ME in Audio/ME folder to play when a Pokemon is caught/recruited.
    • :dialogue=>(String)Dialogue shown when Boss faints and is ready to be caught (ie: when its fainted). Examples:
      • :dialogue=>"{1} would like to join your team"
      • :dialogue=>"{1} is weakened. Will you catch it?"
        {1} is the name of the Boss Pokemon.
    • :afterJoin=>(String)Dialogue shown after the Pokemon joins your team (when :catchStyle is 0). Examples:
      • :afterJoin=>"{1} joined your team!"
      • :afterJoin=>"{1} is now ready to battle by your side!"
        {1} is the name of the Boss Pokemon.
    • :choices=> (Array) Choices displayed before a Pokemon is caught/recruited. (Top is yes, bottom is no). Examples:
      • :choices=>["Yes","No"]
      • :choices=>["Yeah","Nada"]
    Examples:
    • :CATCH_DATA=>{:catchStyle=>1,:blockDialogue=>"{1}'s Distortion Power blocked the {2}!",:choices=>["Y","N"], :joinME=>"CatchGiratina",:catchRate=>10}



Mid Battle Scripting:
Spoiler:

This is a big standout feature of this script. It allows you to play certain lines of code mid battle, which only apply to that battle and nothing else. This can allow you to manipulate anything in battle. Like heal the boss, reduce stats of player, set up Terrain, Hazards etc on the field. Play Dialogue, change music etc.

Examples of what I'm talking about can be seen in the Boss Battle Examples from above.

So the formatting for definining a Mid Battle Event is
BossBattleData.setBattleProc({
"abcd"=>proc{|battle,boss|
#Your Code here
}})
"abcd" is one of the following
"turnStartX" => triggered at the beginning of turn, turncount X
"turnEndX"   => triggered at the end of turn, turncount X
"randX"      => random chance of triggering, higher value of X means lower chance
The code can be various different things.
Some examples can be seen below
Examples:
Spoiler:

# Raising Stats
boss.stages[getConst(PBStats,:ATTACK)] += 1
boss.stages[getConst(PBStats,:ATTACK)]  += 1
#Healing
battle.pbDisplay("It's stats rose!")
battle.pbCommonAnimation("Sky Attack charging",boss,nil)
battle.pbCommonAnimation("StatUp",boss,nil)
# Dialogue
Kernel.pbMessage("\\f[IintroOak]\\c[2]OK \\PN, let's see if you can beat this Pikachu!")
# Yes/No
Kernel.pbConfirmMessage("Are you sad?")
# Yes/No
Kernel.pbShowCommands(nil,"Are you sad?",["Why do you care?",''Nopity Nope","Who are you?"])
# Battle Text
boss.pbRecoverHP(boss.totalhp/5.floor,true)
battle.pbDisplay("It's stats rose!")
# Setting Weather
battle.pbCommonAnimation("Rain",nil,nil)
battle.weather=PBWeather::SUNNYDAY
battle.weatherduration=5
# Setting Terrain
battle.pbAnimation(getID(PBMoves,:MISTYTERRAIN),battle.battlers[1],battle.battlers[0])
battle.field.effects[PBEffects::MistyTerrain]=3
# Forcefully Calling Ally Pokemon
battle.pbCallForHelp(boss.pbPartner.index,boss,[:PIDGEOT,:BRAVIARY,:STARAPTOR]) if boss.pbCanCall?(true)
# Forcefully Ending Battle
battle.scene.pbRecall(0)
battle.scene.pbRecall(2)
battle.pbCommonAnimation("MegaEvolution",boss,nil)
battle.decision=2 # Lost Battle
battle.decision=3# Flee
battle.decision=1# Won
# Reducing Ally Pokemon HP
battle.battlers[0].pbReduceHP((battle.battlers[0].totalhp/5).floor)
battle.battlers[2].pbReduceHP((battle.battlers[2].totalhp/5).floor)
# Setting Status 
battle.pbAnimation(getID(PBMoves,:DARKVOID),battle.battlers[1],battle.battlers[0])
battle.battlers[2].pbSleep if battle.battlers[1].pbCanSleep?(boss,false)
battle.battlers[0].pbSleep if battle.battlers[0].pbCanSleep?(boss,false)
# Reduce Stat of Opponent Mid Battle
battle.pbAnimation(getID(PBMoves,:SCARYFACE),battle.battlers[0],battle.battlers[1])
battle.battlers[0].pbReduceStat(:ATTACK,1,boss,true)
battle.pbCommonAnimation("StatDown",battle.battlers[0],nil)
battle.pbCommonAnimation("StatDown",battle.battlers[2],nil)
battle.battlers[2].pbReduceStat(:ATTACK,1,battle.battlers[1],true)
# Setting up Effects on Opposing Side of Field
battle.pbAnimation(getID(PBMoves,:STEALTHROCK),battle.battlers[1],battle.battlers[0])
boss.pbOpposingSide.effects[PBEffects::StealthRock]=true
battle.pbAnimation(getID(PBMoves,:BARRIER),battle.battlers[1],nil)
boss.pbOwnSide.effects[PBEffects::LightScreen]=3
boss.pbOwnSide.effects[PBEffects::Reflect]=3




Example Boss Events:
Spoiler:

Test out the Battles yourself by adding this Map to your game
Download Link for Map
To add this new map to you game:
  • Download the MapXXX.rxdata to your projects Data Folder
  • Create a New Map in your Project
  • Go to Map Properties and note down the ID Number (Eg: 069)
  • Save and Close RPG Maker
  • Delete the Map corresponding to the ID we noted down (So Map069.rxdata will be deleted)
  • Rename the Dowloaded file such that the XXX matches the ID we noted down.
  • Open RMXP and have fun with the Boss Battles!




Minor Issues:
Spoiler:
  • Loading up the Battle may take a second sometimes.
  • Syntax Errors may be a big problem in setting up the events. I'd suggest actually creating the Script Command in a .txt file and pasting it into your Event once you're done. If you still get a Syntax Error, re-evaluate the parts where the error points you to. Usually it's something as simple as a missing bracket, comma or colon
  • You have to be careful with how you use the script because it may override something you didn't want, if you're not careful.



Changelog:
Spoiler:

v1.5
  • Added Mid Battle Scripts, which clears alot from the Future Ideas List
  • Added Variable Support for 2v1 Battles
  • Added SOS Chaining ability to change Titles, Weather, etc.

v1.0
  • Script Released

Vendily

Age 21
Female
Online now
Posted 21 Hours Ago
1,544 posts
6.3 Years
Adding a Title for Bosses. Currently only calls the Boss by their name. It should call them "Totem X" or "Rampaging X" or something.
Eg. Instead of "X used Slash" it should be"Totem X used Slash"
This one is just a matter of overridding pbThis.
on phone but
alias totem_pbThis pbThis
def pbThis(lowercase=false)
  ret=totem_pbThis(lowercase)
  if @battle.isOpposing?(self.index) && BossBattleData::BossTitle
    ret=BossBattleData::BossTitle[(lowercase)? 1:0)]
  end
  return ret
end
I think, based off what I read of your code, this should work or at least the gist of it?
Adding a chance to change the "What will X do?" when in battle.
The message is set in def pbCommandMenu in the scene.
You should have no issue changing it once you find the spot.

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
Adding a Title for Bosses. Currently only calls the Boss by their name. It should call them "Totem X" or "Rampaging X" or something.
Eg. Instead of "X used Slash" it should be"Totem X used Slash"
This one is just a matter of overridding pbThis.
on phone but
alias totem_pbThis pbThis
def pbThis(lowercase=false)
  ret=totem_pbThis(lowercase)
  if @battle.isOpposing?(self.index) && BossBattleData::BossTitle
    ret=BossBattleData::BossTitle[(lowercase)? 1:0)]
  end
  return ret
end
I think, based off what I read of your code, this should work or at least the gist of it?
Adding a chance to change the "What will X do?" when in battle.
The message is set in def pbCommandMenu in the scene.
You should have no issue changing it once you find the spot.
Thank you. I added this already. I'm currently trying to implement SOS Chaining and the Battle Effects changing. After that I'll release a new update.

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
Update v1.5
The Script has been updated to v1.5 and the Example Boss Battles should be updated soon.

The Biggest Change is Mid Battle Scripting, which allows you to Display Dialogue(and do much more) on certain turn numbers or at random. Please read the Instructions for further details.

Another Big Change is SOS Chaining in Battle which is fully customisable. Please read the Instructions for further details.

Please update your script and go through the change log.
Seen February 22nd, 2021
Posted November 14th, 2020
12 posts
2 Years
Hello, this script is amazing. I tried the test Battle and the game crashes when using imposter Ditto.

[Pokémon Essentials version 17]
Exception: NoMethodError
Message: undefined method `species' for nil:NilClass
PSystem_FileUtilities:23:in `pbLoadPokemonBitmap'
Pokemon_Sprites:148:in `setPokemonBitmap'
Boss Battle:607:in `pbChangePokemon'
PokeBattle_Scene:3080:in `pbAnimation'
PokeBattle_Battle:2399:in `pbAnimation'
PokeBattle_Battler:1793:in `pbAbilitiesOnSwitchIn'
SOS Battles:237:in `pbSwitch'
SOS Battles:236:in `each'
SOS Battles:236:in `pbSwitch'
PokeBattle_Battle:4066:in `__clauses__pbEndOfRoundPhase'

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
Hello, this script is amazing. I tried the test Battle and the game crashes when using imposter Ditto.

<Error with Imposter>
I think your Imposter code maybe broken. I can't replicate this error in my game or in a fresh copy of Essentials. That's why Transform works but Imposter doesn't.

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
Ok, i found a simple way, I just edited line 430 of pfieldBattle to store the result of every battle in a variable, and calling it after boss battles.
That's great. I did implement a way to save outcome in a variable but I never got around to posting it. Real life is pretty hard ngl.

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
EBS version please !!!!!!!!!!
I'd honestly love to make an EBS version but SOS Chaining and 2v1 Battles don't work with EBS. You can wait for the next iteration of EBS which is gonna have similar functionality.

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
I think it is possible. We just need to change the battle scene.
If there is no distributed EBS version, then I will try to do it myself.
But it's complicated.
I looked a can and you have to know about script writing.
Ofc its possible, but yeah its complicated. And I don't use EBS in my own game so making an EBS version isn't a priority for me. But if you think you can adapt my script for EBS then go ahead, I'll try to help you as much as I possibly can.

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
This Script is not Compatible with Essentials v18 Yet. I am working on a v18 port and it should come out soon
Seen 2 Weeks Ago
Posted August 10th, 2021
56 posts
2.5 Years
Excuse me, but is there any way to run long commands like:
: STAT_RAISE => [ : ATAQUE , : DEFENSA , : SPATK , : SPDEF , : SPEED , : precisión , : EVASION , 2 ]
in the RPG MAKER default box. Well, the extendtext doesn't work for me.
Because I suppose they must be on the same line, but since I can't put a bigger box, I have to put it on two lines

HeroesFightingFear

"The Champion of Alon"

Age 23
Male
Orange, TX
Seen November 22nd, 2020
Posted November 12th, 2020
99 posts
1.7 Years
The idea of boss battle Pokemon you can catch once you beat them is awesome.
I personally have a few ideas for that myself, like a Mewtwo boss battle (considering it was created to be one of the most powerful Pokemon) or a Deoxys boss battle (after all, we came close to something like that in the Delta Episode of ORAS as is)

Golisopod User

he/him
Alola Reigon
Seen 1 Day Ago
Posted 1 Day Ago
649 posts
4.9 Years
The idea of boss battle Pokemon you can catch once you beat them is awesome.
I personally have a few ideas for that myself, like a Mewtwo boss battle (considering it was created to be one of the most powerful Pokemon) or a Deoxys boss battle (after all, we came close to something like that in the Delta Episode of ORAS as is)
Nice! This script should allow you to make these boss Battles with ease.