The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Battle Bank Number (https://www.pokecommunity.com/showthread.php?t=385280)

Lance32497 December 11th, 2016 6:29 PM

Bank Number
 
hello guys, I am now learning Battle Script and I encountered a tad problem.
Bank 0 is the target and Bank 1 is the user, what if I am in a double battle?
What is the Bank number of the player's first and second pokemon and opponent's first and second pokemon.

I tried bank 0x2 and Bank 0x3 but nothing happened.

Touched December 11th, 2016 11:22 PM

Banks 2 and 3 are the defender's ally and the attacker's ally respectively. What commands are you using that this is not working for?

Lance32497 December 12th, 2016 2:35 AM

Quote:

Originally Posted by Touched (Post 9515772)
Banks 2 and 3 are the defender's ally and the attacker's ally respectively. What commands are you using that this is not working for?

Jumpifability
I am trying to make an attack that when the user hits the target, the target's partner's Attack will decrease by one stage.

And.. Is there a way to check whether you are in double battle?

Touched December 12th, 2016 5:40 AM

Quote:

Originally Posted by Lance32497 (Post 9515961)
Jumpifability
I am trying to make an attack that when the user hits the target, the target's partner's Attack will decrease by one stage.

And.. Is there a way to check whether you are in double battle?

Why are you checking ability for that? Looking at the code for jumpifability, I see no reason why it shouldn't be working. Maybe it's an error in your script?

Also you can check for double battle by checking the battle flags bitfield. This is at 02022B4C in FireRed. Bit 0 is the double battle flag, so a double battle check would be something like "jumpifword 4 0x02022B4C 1 JUMPHEREIFDOUBLEBATTLE". Jumpifword mode 4 is bitwise AND so you can check if the first bit is set like that

Lance32497 December 12th, 2016 11:09 AM

Quote:

Originally Posted by Touched (Post 9516060)
Why are you checking ability for that? Looking at the code for jumpifability, I see no reason why it shouldn't be working. Maybe it's an error in your script?

Also you can check for double battle by checking the battle flags bitfield. This is at 02022B4C in FireRed. Bit 0 is the double battle flag, so a double battle check would be something like "jumpifword 4 0x02022B4C 1 JUMPHEREIFDOUBLEBATTLE". Jumpifword mode 4 is bitwise AND so you can check if the first bit is set like that

ah I made a mistake, it should be, if the target's partner has an ability Blaze, Torrent or Overgrow, it's attack will be decreased. Perhaps there's something wrong in my script. Thank you for the reply.


All times are GMT -8. The time now is 9:13 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.