You are not logged in.
Pages: 1
How do you make the Flatter effect, in which a Pokémon is confused and then has his/her Special raised by 1?
ETA: I'm going to try to do it using the ConfusionEffect code as a base. Here's the ConfusionEffect code:
ConfusionSideEffect: ; 3f959 (f:7959)
call BattleRandom
cp $19
ret nc
jr ConfusionSideEffectSuccess
ConfusionEffect: ; 3f961 (f:7961)
call CheckTargetSubstitute
jr nz, ConfusionEffectFailed
call MoveHitTest
ld a, [wMoveMissed]
and a
jr nz, ConfusionEffectFailed
ConfusionSideEffectSuccess: ; 3f96f (f:796f)
ld a, [H_WHOSETURN]
and a
ld hl, wEnemyBattleStatus1
ld bc, wEnemyConfusedCounter
ld a, [wPlayerMoveEffect]
jr z, .confuseTarget
ld hl, wPlayerBattleStatus1
ld bc, wPlayerConfusedCounter
ld a, [wEnemyMoveEffect]
.confuseTarget
bit Confused, [hl] ; is mon confused?
jr nz, ConfusionEffectFailed
set Confused, [hl] ; mon is now confused
push af
call BattleRandom
and $3
inc a
inc a
ld [bc], a ; confusion status will last 2-5 turns
pop af
cp CONFUSION_SIDE_EFFECT
call nz, PlayCurrentMoveAnimation2
ld hl, BecameConfusedText
jp PrintText
BecameConfusedText: ; 3f9a1 (f:79a1)
TX_FAR _BecameConfusedText
db "@"
ConfusionEffectFailed: ; 3f9a6 (f:79a6)
cp CONFUSION_SIDE_EFFECT
ret z
ld c, 50
call DelayFrames
jp ConditionalPrintButItFailed
Obviously, I'm going to need to know what code to insert to also make the affected Pokémon's Special go up.
Last edited by Fotomac (2016-04-03 00:51:56)
Offline
Pages: 1