Jambo51
Glory To Arstotzka
- 736
- Posts
- 15
- Years
- Seen Jan 28, 2018
I've got a question here.
I'm trying to create the effect for Hurricane, so I basically copied Thunder and replaced the 05 byte (for paralysis) with a 07 (for confusion). I then paste wrote the code to another offset, pointed one of the effect indices to that offset, and then assigned that effect to the attack slot for Hurricane (which I had already created).
The problem is that although Hurricane successfully confuses, it doesn't always hit in the rain, but I pasted the code for Thunder byte-for-byte. So I don't know what's wrong here.
I then decided to test something else: I assigned Thunder's effect to Hurricane, except this time I changed the 05 byte in Thunder to 07. Now Hurricane confuses and always hits in the rain with the effect at this offset, but not with the effect at the copied offset.
The code for Thunder is:
2E 85 3E 02 02 05 35 D0 3D 02 02 00 00 01 00 28 00 69 1D 08
Can anyone help me out?
Doesn't is correct in saying it's hardcoded. However, all is not lost, as you could also set the script up to branch dependent on the Move's ID. Given that it uses the same effect ID, that could potentially work just as well.
Code:
2A 00 4A 3D 02 02 57 00 [Thunder Offset] 2E 85 3E 02 02 07 28 00 69 1D 08
Obviously, this code assumes that Hurricane doesn't pierce Fly/Bounce, but if it did, you would simply branch to the original Thunder code AFTER the setting of 0x02023E85 to 0x5. In this way, you can have variations on Thunder's effect of 100% accuracy in rain with confusion and such.
Well, crap. I don't know how to do that (quite yet).
Is Solarbeam skipping its charge turn in strong sunlight also hardcoded to the moveslot?
No, IIRC that one is built into the Battle Script. It simply checks the current weather and if it's Sunny, skips the usual waiting turn.