- 12
- Posts
- 253
- Days
- Seen Apr 23, 2025
Hi! I'm working on my ROM hack of Pokemon Red/Blue based on Pret's disassembly project.
I am implementing new moves, bringing the total of existing moves to 255.
Of the moves I am implementing, I am running into issues while adding Triple Kick, the signature move of Hitmontop.
When adding the move to the game, I am not able to get the effect to work properly. Normally, the move should hit three times, guaranteed, when the move makes contact, but whenever I implement it, the move only occasionally hits 3 times, the rest of the time, the move hits only once, and I am not sure why this is.
I added the new move by creating a new move effect, TRIPLE_KICK_EFFECT, which uses the TwoToFiveAttacksEffect pointer, and modifying the effect in engine/battle/effects.asm
In TwoToFiveAttacksEffect:
...
ld a, [hl]
cp TWINEEDLE_EFFECT
jr z, .twineedle
cp ATTACK_TWICE_EFFECT
ld a, $2 ; number of hits is always 2 for ATTACK_TWICE_EFFECT
jr z, .saveNumberOfHits
cp TRIPLE_KICK_EFFECT
ld a, $3
jr z, .saveNumberOfHits
...
This on its own doesn't work, due to the way that wPlayerNumAttacksLeft is handled in engine/battle/core.asm
Does any one with a better understanding of these functions know how I could implement the move?
I am implementing new moves, bringing the total of existing moves to 255.
Of the moves I am implementing, I am running into issues while adding Triple Kick, the signature move of Hitmontop.
When adding the move to the game, I am not able to get the effect to work properly. Normally, the move should hit three times, guaranteed, when the move makes contact, but whenever I implement it, the move only occasionally hits 3 times, the rest of the time, the move hits only once, and I am not sure why this is.
I added the new move by creating a new move effect, TRIPLE_KICK_EFFECT, which uses the TwoToFiveAttacksEffect pointer, and modifying the effect in engine/battle/effects.asm
In TwoToFiveAttacksEffect:
...
ld a, [hl]
cp TWINEEDLE_EFFECT
jr z, .twineedle
cp ATTACK_TWICE_EFFECT
ld a, $2 ; number of hits is always 2 for ATTACK_TWICE_EFFECT
jr z, .saveNumberOfHits
cp TRIPLE_KICK_EFFECT
ld a, $3
jr z, .saveNumberOfHits
...
This on its own doesn't work, due to the way that wPlayerNumAttacksLeft is handled in engine/battle/core.asm
Does any one with a better understanding of these functions know how I could implement the move?