mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Merge pull request #338 from PikalaxALT/master
Battle anims, HP Bar anim
This commit is contained in:
commit
7aef598414
100
audio/engine.asm
100
audio/engine.asm
@ -38,8 +38,8 @@ _MapSetup_Sound_Off:: ; e8000
|
||||
dec e
|
||||
jr nz, .clearsound
|
||||
|
||||
ld hl, Channel1 ; start of channel data
|
||||
ld de, $1bf ; length of area to clear (entire sound wram area)
|
||||
ld hl, Channels ; start of channel data
|
||||
ld de, ChannelsEnd - Channels ; length of area to clear (entire sound wram area)
|
||||
.clearchannels ; clear Channel1-$c2bf
|
||||
xor a
|
||||
ld [hli], a
|
||||
@ -233,7 +233,7 @@ UpdateChannels: ; e8125
|
||||
jp [hl]
|
||||
|
||||
|
||||
.ChannelFnPtrs
|
||||
.ChannelFnPtrs:
|
||||
dw .Channel1
|
||||
dw .Channel2
|
||||
dw .Channel3
|
||||
@ -245,11 +245,11 @@ UpdateChannels: ; e8125
|
||||
dw .Channel7
|
||||
dw .Channel8
|
||||
|
||||
.Channel1
|
||||
.Channel1:
|
||||
ld a, [Danger]
|
||||
bit 7, a
|
||||
ret nz
|
||||
.Channel5
|
||||
.Channel5:
|
||||
ld hl, Channel1NoteFlags - Channel1
|
||||
add hl, bc
|
||||
bit NOTE_UNKN_3, [hl]
|
||||
@ -317,8 +317,8 @@ UpdateChannels: ; e8125
|
||||
ld [rNR14], a
|
||||
ret
|
||||
|
||||
.Channel2
|
||||
.Channel6
|
||||
.Channel2:
|
||||
.Channel6:
|
||||
ld hl, Channel1NoteFlags - Channel1
|
||||
add hl, bc
|
||||
bit NOTE_REST, [hl] ; rest
|
||||
@ -377,8 +377,8 @@ UpdateChannels: ; e8125
|
||||
ld [rNR24], a
|
||||
ret
|
||||
|
||||
.Channel3
|
||||
.Channel7
|
||||
.Channel3:
|
||||
.Channel7:
|
||||
ld hl, Channel1NoteFlags - Channel1
|
||||
add hl, bc
|
||||
bit NOTE_REST, [hl] ; rest
|
||||
@ -478,8 +478,8 @@ endr
|
||||
ld [rNR32], a
|
||||
ret
|
||||
|
||||
.Channel4
|
||||
.Channel8
|
||||
.Channel4:
|
||||
.Channel8:
|
||||
ld hl, Channel1NoteFlags - Channel1
|
||||
add hl, bc
|
||||
bit NOTE_REST, [hl] ; rest
|
||||
@ -2483,62 +2483,62 @@ _PlayCryHeader:: ; e8b79
|
||||
; Play cry de using parameters:
|
||||
; CryPitch
|
||||
; CryLength
|
||||
|
||||
|
||||
call MusicOff
|
||||
|
||||
|
||||
; Overload the music id with the cry id
|
||||
ld hl, MusicID
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
|
||||
|
||||
; 3-byte pointers (bank, address)
|
||||
ld hl, Cries
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
|
||||
|
||||
ld a, [hli]
|
||||
ld [MusicBank], a
|
||||
|
||||
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
|
||||
|
||||
; Read the cry's sound header
|
||||
call LoadMusicByte
|
||||
; Top 2 bits contain the number of channels
|
||||
rlca
|
||||
rlca
|
||||
and 3
|
||||
|
||||
|
||||
; For each channel:
|
||||
inc a
|
||||
.loop
|
||||
push af
|
||||
call LoadChannel
|
||||
|
||||
|
||||
ld hl, Channel1Flags - Channel1
|
||||
add hl, bc
|
||||
set SOUND_REST, [hl]
|
||||
|
||||
|
||||
ld hl, Channel1Flags2 - Channel1
|
||||
add hl, bc
|
||||
set SOUND_CRY_PITCH, [hl]
|
||||
|
||||
|
||||
ld hl, Channel1CryPitch - Channel1
|
||||
add hl, bc
|
||||
ld a, [CryPitch]
|
||||
ld [hli], a
|
||||
ld a, [CryPitch + 1]
|
||||
ld [hl], a
|
||||
|
||||
|
||||
; No tempo for channel 4
|
||||
ld a, [CurChannel]
|
||||
and 3
|
||||
cp 3
|
||||
jr nc, .start
|
||||
|
||||
|
||||
; Tempo is effectively length
|
||||
ld hl, Channel1Tempo - Channel1
|
||||
add hl, bc
|
||||
@ -2551,14 +2551,14 @@ endr
|
||||
ld a, [wStereoPanningMask]
|
||||
and a
|
||||
jr z, .next
|
||||
|
||||
|
||||
; Stereo only: Play cry from the monster's side.
|
||||
; This only applies in-battle.
|
||||
|
||||
|
||||
ld a, [Options]
|
||||
bit 5, a ; stereo
|
||||
jr z, .next
|
||||
|
||||
|
||||
; [Tracks] &= [CryTracks]
|
||||
ld hl, Channel1Tracks - Channel1
|
||||
add hl, bc
|
||||
@ -2568,23 +2568,23 @@ endr
|
||||
ld hl, Channel1Tracks - Channel1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
|
||||
.next
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .loop
|
||||
|
||||
|
||||
|
||||
|
||||
; Cries play at max volume, so we save the current volume for later.
|
||||
ld a, [LastVolume]
|
||||
and a
|
||||
jr nz, .end
|
||||
|
||||
|
||||
ld a, [Volume]
|
||||
ld [LastVolume], a
|
||||
ld a, $77
|
||||
ld [Volume], a
|
||||
|
||||
|
||||
.end
|
||||
ld a, 1 ; stop playing music
|
||||
ld [SFXPriority], a
|
||||
@ -2699,24 +2699,24 @@ PlayStereoSFX:: ; e8ca6
|
||||
; play sfx de
|
||||
|
||||
call MusicOff
|
||||
|
||||
|
||||
; standard procedure if stereo's off
|
||||
ld a, [Options]
|
||||
bit 5, a
|
||||
jp z, _PlaySFX
|
||||
|
||||
|
||||
; else, let's go ahead with this
|
||||
ld hl, MusicID
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
|
||||
|
||||
; get sfx ptr
|
||||
ld hl, SFX
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
|
||||
|
||||
; bank
|
||||
ld a, [hli]
|
||||
ld [MusicBank], a
|
||||
@ -2724,22 +2724,22 @@ endr
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
|
||||
|
||||
; bit 2-3
|
||||
call LoadMusicByte
|
||||
rlca
|
||||
rlca
|
||||
and 3 ; ch1-4
|
||||
inc a
|
||||
|
||||
|
||||
.loop
|
||||
push af
|
||||
call LoadChannel
|
||||
|
||||
|
||||
ld hl, Channel1Flags - Channel1
|
||||
add hl, bc
|
||||
set SOUND_SFX, [hl]
|
||||
|
||||
|
||||
push de
|
||||
; get tracks for this channel
|
||||
ld a, [CurChannel]
|
||||
@ -2751,47 +2751,47 @@ endr
|
||||
ld a, [hl]
|
||||
ld hl, wStereoPanningMask
|
||||
and [hl]
|
||||
|
||||
|
||||
ld hl, Channel1Tracks - Channel1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
|
||||
ld hl, Channel1Field0x30 - Channel1 ; $c131 - Channel1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
|
||||
ld a, [CryTracks]
|
||||
cp 2 ; ch 1-2
|
||||
jr c, .skip
|
||||
|
||||
|
||||
; ch3-4
|
||||
ld a, [wSFXDuration]
|
||||
|
||||
|
||||
ld hl, Channel1Field0x2e - Channel1 ; $c12f - Channel1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
|
||||
ld hl, Channel1Field0x2f - Channel1 ; $c130 - Channel1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
|
||||
ld hl, Channel1Flags2 - Channel1
|
||||
add hl, bc
|
||||
set SOUND_UNKN_0F, [hl]
|
||||
|
||||
|
||||
.skip
|
||||
pop de
|
||||
|
||||
|
||||
; turn channel on
|
||||
ld hl, Channel1Flags - Channel1
|
||||
add hl, bc
|
||||
set SOUND_CHANNEL_ON, [hl] ; on
|
||||
|
||||
|
||||
; done?
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .loop
|
||||
|
||||
|
||||
; we're done
|
||||
call MusicOn
|
||||
ret
|
||||
|
@ -102,9 +102,9 @@
|
||||
dba Music_LakeOfRageRocketRadio ; 0xef5b1
|
||||
dba Music_Printer ; 0xf07fd
|
||||
dba Music_PostCredits ; 0xcfd9e
|
||||
|
||||
|
||||
; Crystal adds the following songs:
|
||||
|
||||
|
||||
dba Music_Clair ; 0x1fa8d
|
||||
dba Music_MobileAdapterMenu ; 0x17801f
|
||||
dba Music_MobileAdapter ; 0x1fc87
|
||||
|
@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
|
||||
and a
|
||||
ret nz
|
||||
|
||||
callba CheckSubstatus_RechargeChargedRampageBideRollout
|
||||
callba CheckEnemyLockedIn
|
||||
ret nz
|
||||
|
||||
ld a, [PlayerSubStatus5]
|
||||
@ -318,7 +318,7 @@ AI_Items: ; 39196
|
||||
jp c, .Use
|
||||
jp .DontUse
|
||||
|
||||
.StatusCheckContext
|
||||
.StatusCheckContext:
|
||||
ld a, [EnemySubStatus5]
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
jr z, .FailToxicCheck
|
||||
@ -328,7 +328,7 @@ AI_Items: ; 39196
|
||||
call Random
|
||||
cp 1 + 50 percent
|
||||
jp c, .Use
|
||||
.FailToxicCheck
|
||||
.FailToxicCheck:
|
||||
ld a, [EnemyMonStatus]
|
||||
and 1 << FRZ | SLP
|
||||
jp z, .DontUse
|
||||
@ -344,7 +344,7 @@ AI_Items: ; 39196
|
||||
call .Status
|
||||
jp c, .DontUse
|
||||
|
||||
.UseFullRestore
|
||||
.UseFullRestore:
|
||||
call EnemyUsedFullRestore
|
||||
jp .Use
|
||||
; 38220
|
||||
@ -416,7 +416,7 @@ AI_Items: ; 39196
|
||||
jp .Use
|
||||
; 382ae
|
||||
|
||||
.asm_382ae: ; This appears to be unused
|
||||
.asm_382ae ; This appears to be unused
|
||||
callab AICheckEnemyMaxHP
|
||||
jr c, .dont_use
|
||||
push bc
|
||||
@ -676,7 +676,7 @@ AI_TrySwitch: ; 3844b
|
||||
ld c, a
|
||||
ld hl, OTPartyMon1HP
|
||||
ld d, 0
|
||||
.SwitchLoop
|
||||
.SwitchLoop:
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld a, [hld]
|
||||
@ -716,7 +716,7 @@ AI_Switch: ; 3846c
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, EnemyMonStatus
|
||||
ld bc, $0004
|
||||
ld bc, MON_MAXHP - MON_STATUS
|
||||
call CopyBytes
|
||||
pop af
|
||||
|
||||
@ -726,7 +726,7 @@ AI_Switch: ; 3846c
|
||||
|
||||
.skiptext
|
||||
ld a, 1
|
||||
ld [wd264], a
|
||||
ld [wAISwitch], a
|
||||
callab NewEnemyMonStatus
|
||||
callab ResetEnemyStatLevels
|
||||
ld hl, PlayerSubStatus1
|
||||
@ -734,7 +734,7 @@ AI_Switch: ; 3846c
|
||||
callba EnemySwitch
|
||||
callba ResetBattleParticipants
|
||||
xor a
|
||||
ld [wd264], a
|
||||
ld [wAISwitch], a
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
ret nz
|
||||
|
@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
|
||||
ret nz
|
||||
|
||||
; No use picking a move if there's no choice.
|
||||
callba CheckSubstatus_RechargeChargedRampageBideRollout
|
||||
callba CheckEnemyLockedIn
|
||||
ret nz
|
||||
|
||||
|
||||
@ -31,24 +31,24 @@ endr
|
||||
|
||||
ld hl, EnemyMonMoves
|
||||
ld c, 0
|
||||
.CheckDisabledMove
|
||||
.CheckDisabledMove:
|
||||
cp [hl]
|
||||
jr z, .ScoreDisabledMove
|
||||
inc c
|
||||
inc hl
|
||||
jr .CheckDisabledMove
|
||||
.ScoreDisabledMove
|
||||
.ScoreDisabledMove:
|
||||
ld hl, Buffer1
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld [hl], 80
|
||||
|
||||
; Don't pick moves with 0 PP.
|
||||
.CheckPP
|
||||
.CheckPP:
|
||||
ld hl, Buffer1 - 1
|
||||
ld de, EnemyMonPP
|
||||
ld b, 0
|
||||
.CheckMovePP
|
||||
.CheckMovePP:
|
||||
inc b
|
||||
ld a, b
|
||||
cp EnemyMonMovesEnd - EnemyMonMoves + 1
|
||||
@ -63,7 +63,7 @@ endr
|
||||
|
||||
|
||||
; Apply AI scoring layers depending on the trainer class.
|
||||
.ApplyLayers
|
||||
.ApplyLayers:
|
||||
ld hl, TrainerClassAttributes + TRNATTR_AI_MOVE_WEIGHTS
|
||||
|
||||
; If we have a battle in BattleTower just load the Attributes of the first TrainerClass (Falkner)
|
||||
@ -82,7 +82,7 @@ endr
|
||||
push bc
|
||||
push hl
|
||||
|
||||
.CheckLayer
|
||||
.CheckLayer:
|
||||
pop hl
|
||||
pop bc
|
||||
|
||||
@ -119,12 +119,12 @@ endr
|
||||
jr .CheckLayer
|
||||
|
||||
; Decrement the scores of all moves one by one until one reaches 0.
|
||||
.DecrementScores
|
||||
.DecrementScores:
|
||||
ld hl, Buffer1
|
||||
ld de, EnemyMonMoves
|
||||
ld c, EnemyMonMovesEnd - EnemyMonMoves
|
||||
|
||||
.DecrementNextScore
|
||||
.DecrementNextScore:
|
||||
; If the enemy has no moves, this will infinite.
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -145,7 +145,7 @@ endr
|
||||
; In order to avoid bias towards the moves located first in memory, increment the scores
|
||||
; that were decremented one more time than the rest (in case there was a tie).
|
||||
; This means that the minimum score will be 1.
|
||||
.PickLowestScoreMoves
|
||||
.PickLowestScoreMoves:
|
||||
ld a, c
|
||||
|
||||
.move_loop
|
||||
@ -159,14 +159,14 @@ endr
|
||||
ld de, EnemyMonMoves
|
||||
ld c, NUM_MOVES
|
||||
|
||||
; Give a score of 0 to a blank move
|
||||
; Give a score of 0 to a blank move
|
||||
.loop2
|
||||
ld a, [de]
|
||||
and a
|
||||
jr nz, .skip_load
|
||||
ld [hl], a
|
||||
|
||||
; Disregard the move if its score is not 1
|
||||
; Disregard the move if its score is not 1
|
||||
.skip_load
|
||||
ld a, [hl]
|
||||
dec a
|
||||
@ -183,8 +183,8 @@ endr
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
|
||||
; Randomly choose one of the moves with a score of 1
|
||||
.ChooseMove
|
||||
; Randomly choose one of the moves with a score of 1
|
||||
.ChooseMove:
|
||||
ld hl, Buffer1
|
||||
call Random
|
||||
and 3
|
||||
|
@ -23,7 +23,7 @@ AI_Basic: ; 38591
|
||||
|
||||
; Dismiss moves with special effects if they are
|
||||
; useless or not a good choice right now.
|
||||
; For example, healing moves, weather moves, Dream Eater...
|
||||
; For example, healing moves, weather moves, Dream Eater...
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@ -33,7 +33,7 @@ AI_Basic: ; 38591
|
||||
pop hl
|
||||
jr nz, .discourage
|
||||
|
||||
; Dismiss status-only moves if the player can't be statused.
|
||||
; Dismiss status-only moves if the player can't be statused.
|
||||
ld a, [wEnemyMoveStruct + MOVE_EFFECT]
|
||||
push hl
|
||||
push de
|
||||
@ -680,7 +680,7 @@ rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
|
||||
; 30% chance to end up here if enemy's HP is full and player is not badly poisoned.
|
||||
; 30% chance to end up here if enemy's HP is full and player is not badly poisoned.
|
||||
; 77% chance to end up here if enemy's HP is above 50% but not full.
|
||||
; 96% chance to end up here if enemy's HP is between 25% and 50%.
|
||||
; 100% chance to end up here if enemy's HP is below 25%.
|
||||
@ -771,7 +771,7 @@ AI_Smart_MirrorMove: ; 3895b
|
||||
jr nz, .asm_38968
|
||||
|
||||
; ...do nothing if enemy is slower than player
|
||||
call AICompareSpeed
|
||||
call AICompareSpeed
|
||||
ret nc
|
||||
|
||||
; ...or dismiss this move if enemy is faster than player.
|
||||
@ -784,7 +784,7 @@ AI_Smart_MirrorMove: ; 3895b
|
||||
ld de, 1
|
||||
call IsInArray
|
||||
pop hl
|
||||
|
||||
|
||||
; ...do nothing if he didn't use a useful move.
|
||||
ret nc
|
||||
|
||||
@ -813,11 +813,11 @@ AI_Smart_AccuracyDown: ; 38985
|
||||
call AICheckPlayerMaxHP
|
||||
jr nc, .asm_389a0
|
||||
|
||||
; ...and enemy's HP is above 50%...
|
||||
; ...and enemy's HP is above 50%...
|
||||
call AICheckEnemyHalfHP
|
||||
jr nc, .asm_389a0
|
||||
|
||||
; ...greatly encourage this move if player is badly poisoned.
|
||||
; ...greatly encourage this move if player is badly poisoned.
|
||||
ld a, [PlayerSubStatus5]
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
jr nz, .asm_3899d
|
||||
@ -839,21 +839,21 @@ endr
|
||||
call AICheckPlayerQuarterHP
|
||||
jr nc, .asm_389bd
|
||||
|
||||
; If player's HP is above 25% but not full, 4% chance to greatly encourage this move.
|
||||
; If player's HP is above 25% but not full, 4% chance to greatly encourage this move.
|
||||
call Random
|
||||
cp $a
|
||||
jr c, .asm_3899d
|
||||
|
||||
; If player's HP is between 25% and 50%,...
|
||||
; If player's HP is between 25% and 50%,...
|
||||
call AICheckPlayerHalfHP
|
||||
jr nc, .asm_389b8
|
||||
|
||||
; If player's HP is above 50% but not full, 20% chance to greatly encourage this move.
|
||||
; If player's HP is above 50% but not full, 20% chance to greatly encourage this move.
|
||||
call AI_80_20
|
||||
jr c, .asm_3899d
|
||||
jr .asm_389bf
|
||||
|
||||
; ...50% chance to greatly discourage this move.
|
||||
; ...50% chance to greatly discourage this move.
|
||||
.asm_389b8
|
||||
call AI_50_50
|
||||
jr c, .asm_389bf
|
||||
@ -863,7 +863,7 @@ rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
|
||||
; We only end up here if the move has not been already encouraged.
|
||||
; We only end up here if the move has not been already encouraged.
|
||||
.asm_389bf
|
||||
ld a, [PlayerSubStatus5]
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
@ -873,14 +873,14 @@ endr
|
||||
bit SUBSTATUS_LEECH_SEED, a
|
||||
jr nz, .asm_389ef
|
||||
|
||||
; Discourage this move if enemy's evasion level is higher than player's accuracy level.
|
||||
; Discourage this move if enemy's evasion level is higher than player's accuracy level.
|
||||
ld a, [EnemyEvaLevel]
|
||||
ld b, a
|
||||
ld a, [PlayerAccLevel]
|
||||
cp b
|
||||
jr c, .asm_389e4
|
||||
|
||||
; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout.
|
||||
; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout.
|
||||
ld a, [PlayerFuryCutterCount]
|
||||
and a
|
||||
jr nz, .asm_3899d
|
||||
@ -895,7 +895,7 @@ endr
|
||||
|
||||
; Player is badly poisoned.
|
||||
; 80% chance to greatly encourage this move.
|
||||
; This would counter any previous discouragement.
|
||||
; This would counter any previous discouragement.
|
||||
.asm_389e6
|
||||
call Random
|
||||
cp $50
|
||||
@ -907,7 +907,7 @@ endr
|
||||
|
||||
; Player is seeded.
|
||||
; 50% chance to encourage this move.
|
||||
; This would partly counter any previous discouragement.
|
||||
; This would partly counter any previous discouragement.
|
||||
.asm_389ef
|
||||
call AI_50_50
|
||||
ret c
|
||||
@ -931,7 +931,7 @@ AI_Smart_Haze: ; 389f5
|
||||
jr c, .asm_38a12
|
||||
jr .asm_389fb
|
||||
|
||||
; 85% chance to encourage this move if any of player's stat levels is higher than +2.
|
||||
; 85% chance to encourage this move if any of player's stat levels is higher than +2.
|
||||
.asm_38a05
|
||||
ld hl, PlayerAtkLevel
|
||||
ld c, $8
|
||||
@ -1164,7 +1164,7 @@ AI_Smart_Confuse: ; 38adb
|
||||
cp $19
|
||||
jr c, .asm_38ae7
|
||||
inc [hl]
|
||||
|
||||
|
||||
.asm_38ae7
|
||||
; Discourage again if player's HP is below 25%.
|
||||
call AICheckPlayerQuarterHP
|
||||
@ -1220,10 +1220,10 @@ AI_Smart_Fly: ; 38b12
|
||||
ld a, [PlayerSubStatus3]
|
||||
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
|
||||
ret z
|
||||
|
||||
|
||||
call AICompareSpeed
|
||||
ret nc
|
||||
|
||||
|
||||
rept 3
|
||||
dec [hl]
|
||||
endr
|
||||
@ -1246,9 +1246,9 @@ AI_Smart_Paralyze: ; 38b26
|
||||
; 50% chance to discourage this move if player's HP is below 25%.
|
||||
call AICheckPlayerQuarterHP
|
||||
jr nc, .asm_38b3a
|
||||
|
||||
|
||||
; 80% chance to greatly encourage this move
|
||||
; if enemy is slower than player and its HP is above 25%.
|
||||
; if enemy is slower than player and its HP is above 25%.
|
||||
call AICompareSpeed
|
||||
ret c
|
||||
call AICheckEnemyQuarterHP
|
||||
@ -1308,8 +1308,8 @@ AI_Smart_Substitute: ; 38b5c
|
||||
AI_Smart_HyperBeam: ; 38b63
|
||||
call AICheckEnemyHalfHP
|
||||
jr c, .asm_38b72
|
||||
|
||||
; 50% chance to encourage this move if enemy's HP is below 25%.
|
||||
|
||||
; 50% chance to encourage this move if enemy's HP is below 25%.
|
||||
call AICheckEnemyQuarterHP
|
||||
ret c
|
||||
call AI_50_50
|
||||
@ -1335,13 +1335,13 @@ AI_Smart_Rage: ; 38b7f
|
||||
bit SUBSTATUS_RAGE, a
|
||||
jr z, .asm_38b9b
|
||||
|
||||
; If enemy's Rage is building, 50% chance to encourage this move.
|
||||
; If enemy's Rage is building, 50% chance to encourage this move.
|
||||
call AI_50_50
|
||||
jr c, .asm_38b8c
|
||||
|
||||
dec [hl]
|
||||
|
||||
; Encourage this move based on Rage's counter.
|
||||
; Encourage this move based on Rage's counter.
|
||||
.asm_38b8c
|
||||
ld a, [wEnemyRageCounter]
|
||||
cp $2
|
||||
@ -1773,12 +1773,12 @@ AI_Smart_PriorityHit: ; 38d5a
|
||||
call AICompareSpeed
|
||||
ret c
|
||||
|
||||
; Dismiss this move if the player is flying or underground.
|
||||
; Dismiss this move if the player is flying or underground.
|
||||
ld a, [PlayerSubStatus3]
|
||||
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
|
||||
jp nz, AIDiscourageMove
|
||||
|
||||
; Greatly encourage this move if it will KO the player.
|
||||
; Greatly encourage this move if it will KO the player.
|
||||
ld a, $1
|
||||
ld [hBattleTurn], a
|
||||
push hl
|
||||
@ -1895,18 +1895,18 @@ AI_Smart_MeanLook: ; 38dfb
|
||||
pop hl
|
||||
jp z, AIDiscourageMove
|
||||
|
||||
; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird).
|
||||
; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird).
|
||||
ld a, [EnemySubStatus5]
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
jr nz, .asm_38e26
|
||||
|
||||
; 80% chance to greatly encourage this move if the player is either
|
||||
; in love, identified, stuck in Rollout, or has a Nightmare.
|
||||
; in love, identified, stuck in Rollout, or has a Nightmare.
|
||||
ld a, [PlayerSubStatus1]
|
||||
and 1<<SUBSTATUS_IN_LOVE | 1<<SUBSTATUS_ROLLOUT | 1<<SUBSTATUS_IDENTIFIED | 1<<SUBSTATUS_NIGHTMARE
|
||||
jr nz, .asm_38e26
|
||||
|
||||
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
|
||||
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
|
||||
push hl
|
||||
callab CheckPlayerMoveTypeMatchups
|
||||
ld a, [wEnemyAISwitchScore]
|
||||
@ -2233,7 +2233,7 @@ AI_Smart_Sandstorm: ; 38f7a
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
.SandstormImmuneTypes
|
||||
.SandstormImmuneTypes:
|
||||
db ROCK
|
||||
db GROUND
|
||||
db STEEL
|
||||
@ -2493,7 +2493,7 @@ AI_Smart_HiddenPower: ; 3909e
|
||||
push hl
|
||||
ld a, 1
|
||||
ld [hBattleTurn], a
|
||||
|
||||
|
||||
; Calculate Hidden Power's type and base power based on enemy's DVs.
|
||||
callab HiddenPowerDamage
|
||||
callab BattleCheckTypeMatchup
|
||||
@ -2697,7 +2697,7 @@ AI_Smart_PsychUp: ; 39152
|
||||
jr nz, .asm_3915a
|
||||
|
||||
; Calculate the sum of all player's stat level modifiers. Add 100 first to prevent underflow.
|
||||
; Put the result in d. d will range between 58 and 142.
|
||||
; Put the result in d. d will range between 58 and 142.
|
||||
ld hl, PlayerAtkLevel
|
||||
ld b, $8
|
||||
ld d, 100
|
||||
@ -2716,12 +2716,12 @@ AI_Smart_PsychUp: ; 39152
|
||||
pop hl
|
||||
jr nc, .asm_39188
|
||||
|
||||
; Else, 80% chance to encourage this move unless player's accuracy level is lower than -1...
|
||||
; Else, 80% chance to encourage this move unless player's accuracy level is lower than -1...
|
||||
ld a, [PlayerAccLevel]
|
||||
cp $6
|
||||
ret c
|
||||
|
||||
; ...or enemy's evasion level is higher than +0.
|
||||
|
||||
; ...or enemy's evasion level is higher than +0.
|
||||
ld a, [EnemyEvaLevel]
|
||||
cp $8
|
||||
ret nc
|
||||
@ -2825,7 +2825,7 @@ rept 2
|
||||
endr
|
||||
ret
|
||||
|
||||
; Try to predict if the player will use Fly this turn.
|
||||
; Try to predict if the player will use Fly this turn.
|
||||
.couldFly
|
||||
|
||||
; 50% chance to encourage this move if the enemy is slower than the player.
|
||||
@ -3175,10 +3175,10 @@ AI_Opportunist: ; 39315
|
||||
call AICheckEnemyHalfHP
|
||||
ret c
|
||||
|
||||
; Discourage stall moves if enemy's HP is below 25%.
|
||||
; Discourage stall moves if enemy's HP is below 25%.
|
||||
call AICheckEnemyQuarterHP
|
||||
jr nc, .asm_39322
|
||||
|
||||
|
||||
; 50% chance to discourage stall moves if enemy's HP is between 25% and 50%.
|
||||
call AI_50_50
|
||||
ret c
|
||||
@ -3333,12 +3333,12 @@ AI_Aggressive: ; 39369
|
||||
|
||||
; Ignore this move if its power is 0 or 1.
|
||||
; Moves such as Seismic Toss, Hidden Power,
|
||||
; Counter and Fissure have a base power of 1.
|
||||
; Counter and Fissure have a base power of 1.
|
||||
ld a, [wEnemyMoveStruct + MOVE_POWER]
|
||||
cp 2
|
||||
jr c, .checkmove2
|
||||
|
||||
; Ignore this move if it is reckless.
|
||||
; Ignore this move if it is reckless.
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@ -3351,7 +3351,7 @@ AI_Aggressive: ; 39369
|
||||
pop hl
|
||||
jr c, .checkmove2
|
||||
|
||||
; If we made it this far, discourage this move.
|
||||
; If we made it this far, discourage this move.
|
||||
inc [hl]
|
||||
jr .checkmove2
|
||||
|
||||
@ -3384,7 +3384,7 @@ AIDamageCalc: ; 393e7
|
||||
callab BattleCommand_Stab
|
||||
ret
|
||||
|
||||
.ConstantDamageEffects
|
||||
.ConstantDamageEffects:
|
||||
db EFFECT_SUPER_FANG
|
||||
db EFFECT_STATIC_DAMAGE
|
||||
db EFFECT_LEVEL_DAMAGE
|
||||
@ -3550,7 +3550,7 @@ AI_Risky: ; 394a9
|
||||
call AICheckEnemyMaxHP
|
||||
jr c, .nextmove
|
||||
|
||||
; Else, 80% chance to exclude them.
|
||||
; Else, 80% chance to exclude them.
|
||||
call Random
|
||||
cp 200 ; 1/5
|
||||
jr c, .nextmove
|
||||
|
@ -161,7 +161,7 @@ endr
|
||||
|
||||
.doubledown
|
||||
call .DecreaseScore
|
||||
|
||||
|
||||
; fallthrough
|
||||
; 34931
|
||||
|
||||
|
@ -980,7 +980,7 @@ BattleAnimCmd_RaiseSub: ; cc640 (33:4640)
|
||||
GetSubstitutePic: ; cc64c
|
||||
|
||||
ld hl, sScratch
|
||||
ld bc, $310
|
||||
ld bc, (7 * 7) tiles
|
||||
.loop
|
||||
xor a
|
||||
ld [hli], a
|
||||
@ -994,16 +994,16 @@ GetSubstitutePic: ; cc64c
|
||||
jr z, .player
|
||||
|
||||
ld hl, MonsterSpriteGFX + 0 tiles
|
||||
ld de, sScratch + $13 tiles
|
||||
ld de, sScratch + (2 * 7 + 5) tiles
|
||||
call .CopyTile
|
||||
ld hl, MonsterSpriteGFX + 1 tiles
|
||||
ld de, sScratch + $1a tiles
|
||||
ld de, sScratch + (3 * 7 + 5) tiles
|
||||
call .CopyTile
|
||||
ld hl, MonsterSpriteGFX + 2 tiles
|
||||
ld de, sScratch + $14 tiles
|
||||
ld de, sScratch + (2 * 7 + 6) tiles
|
||||
call .CopyTile
|
||||
ld hl, MonsterSpriteGFX + 3 tiles
|
||||
ld de, sScratch + $1b tiles
|
||||
ld de, sScratch + (3 * 7 + 6) tiles
|
||||
call .CopyTile
|
||||
|
||||
ld hl, VTiles2 tile $00
|
||||
@ -1014,16 +1014,16 @@ GetSubstitutePic: ; cc64c
|
||||
|
||||
.player
|
||||
ld hl, MonsterSpriteGFX + 4 tiles
|
||||
ld de, sScratch + $10 tiles
|
||||
ld de, sScratch + (2 * 6 + 4) tiles
|
||||
call .CopyTile
|
||||
ld hl, MonsterSpriteGFX + 5 tiles
|
||||
ld de, sScratch + $16 tiles
|
||||
ld de, sScratch + (3 * 6 + 4) tiles
|
||||
call .CopyTile
|
||||
ld hl, MonsterSpriteGFX + 6 tiles
|
||||
ld de, sScratch + $11 tiles
|
||||
ld de, sScratch + (2 * 6 + 5) tiles
|
||||
call .CopyTile
|
||||
ld hl, MonsterSpriteGFX + 7 tiles
|
||||
ld de, sScratch + $17 tiles
|
||||
ld de, sScratch + (3 * 6 + 5) tiles
|
||||
call .CopyTile
|
||||
|
||||
ld hl, VTiles2 tile $31
|
||||
|
@ -1,41 +1,41 @@
|
||||
AnimObj00GFX: ; 84a2e
|
||||
AnimObj01GFX: INCBIN "gfx/fx/001.2bpp.lz"
|
||||
AnimObj02GFX: INCBIN "gfx/fx/002.2bpp.lz"
|
||||
AnimObj03GFX: INCBIN "gfx/fx/003.2bpp.lz"
|
||||
AnimObj04GFX: INCBIN "gfx/fx/004.2bpp.lz"
|
||||
AnimObj05GFX: INCBIN "gfx/fx/005.2bpp.lz"
|
||||
AnimObj07GFX: INCBIN "gfx/fx/007.2bpp.lz"
|
||||
AnimObj08GFX: INCBIN "gfx/fx/008.2bpp.lz"
|
||||
AnimObj10GFX: INCBIN "gfx/fx/010.2bpp.lz"
|
||||
AnimObj09GFX: INCBIN "gfx/fx/009.2bpp.lz"
|
||||
AnimObj12GFX: INCBIN "gfx/fx/012.2bpp.lz"
|
||||
AnimObj06GFX: INCBIN "gfx/fx/006.2bpp.lz"
|
||||
AnimObj11GFX: INCBIN "gfx/fx/011.2bpp.lz"
|
||||
AnimObj13GFX: INCBIN "gfx/fx/013.2bpp.lz"
|
||||
AnimObj14GFX: INCBIN "gfx/fx/014.2bpp.lz"
|
||||
AnimObj24GFX: INCBIN "gfx/fx/024.2bpp.lz"
|
||||
AnimObj15GFX: INCBIN "gfx/fx/015.2bpp.lz"
|
||||
AnimObj16GFX: INCBIN "gfx/fx/016.2bpp.lz"
|
||||
AnimObj17GFX: INCBIN "gfx/fx/017.2bpp.lz"
|
||||
AnimObj18GFX: INCBIN "gfx/fx/018.2bpp.lz"
|
||||
AnimObj19GFX: INCBIN "gfx/fx/019.2bpp.lz"
|
||||
AnimObj20GFX: INCBIN "gfx/fx/020.2bpp.lz"
|
||||
AnimObj22GFX: INCBIN "gfx/fx/022.2bpp.lz"
|
||||
AnimObj21GFX: INCBIN "gfx/fx/021.2bpp.lz"
|
||||
AnimObj23GFX: INCBIN "gfx/fx/023.2bpp.lz"
|
||||
AnimObj26GFX: INCBIN "gfx/fx/026.2bpp.lz"
|
||||
AnimObj27GFX: INCBIN "gfx/fx/027.2bpp.lz"
|
||||
AnimObj28GFX: INCBIN "gfx/fx/028.2bpp.lz"
|
||||
AnimObj29GFX: INCBIN "gfx/fx/029.2bpp.lz"
|
||||
AnimObj30GFX: INCBIN "gfx/fx/030.2bpp.lz"
|
||||
AnimObj31GFX: INCBIN "gfx/fx/031.2bpp.lz"
|
||||
AnimObj32GFX: INCBIN "gfx/fx/032.2bpp.lz"
|
||||
AnimObj33GFX: INCBIN "gfx/fx/033.2bpp.lz"
|
||||
AnimObj34GFX: INCBIN "gfx/fx/034.2bpp.lz"
|
||||
AnimObj25GFX: INCBIN "gfx/fx/025.2bpp.lz"
|
||||
AnimObj35GFX: INCBIN "gfx/fx/035.2bpp.lz"
|
||||
AnimObj36GFX: INCBIN "gfx/fx/036.2bpp.lz"
|
||||
AnimObj37GFX: INCBIN "gfx/fx/037.2bpp.lz"
|
||||
AnimObj38GFX: INCBIN "gfx/fx/038.2bpp.lz"
|
||||
AnimObj39GFX: INCBIN "gfx/fx/039.2bpp.lz"
|
||||
AnimObjHitGFX: INCBIN "gfx/fx/hit.2bpp.lz"
|
||||
AnimObjCutGFX: INCBIN "gfx/fx/cut.2bpp.lz"
|
||||
AnimObjFireGFX: INCBIN "gfx/fx/fire.2bpp.lz"
|
||||
AnimObjWaterGFX: INCBIN "gfx/fx/water.2bpp.lz"
|
||||
AnimObjLightningGFX: INCBIN "gfx/fx/lightning.2bpp.lz"
|
||||
AnimObjSmokeGFX: INCBIN "gfx/fx/smoke.2bpp.lz"
|
||||
AnimObjExplosionGFX: INCBIN "gfx/fx/explosion.2bpp.lz"
|
||||
AnimObjIceGFX: INCBIN "gfx/fx/ice.2bpp.lz"
|
||||
AnimObjRocksGFX: INCBIN "gfx/fx/rocks.2bpp.lz"
|
||||
AnimObjPoisonGFX: INCBIN "gfx/fx/poison.2bpp.lz"
|
||||
AnimObjPlantGFX: INCBIN "gfx/fx/plant.2bpp.lz"
|
||||
AnimObjPokeBallGFX: INCBIN "gfx/fx/pokeball.2bpp.lz"
|
||||
AnimObjBubbleGFX: INCBIN "gfx/fx/bubble.2bpp.lz"
|
||||
AnimObjNoiseGFX: INCBIN "gfx/fx/noise.2bpp.lz"
|
||||
AnimObjReflectGFX: INCBIN "gfx/fx/reflect.2bpp.lz"
|
||||
AnimObjPowderGFX: INCBIN "gfx/fx/powder.2bpp.lz"
|
||||
AnimObjBeamGFX: INCBIN "gfx/fx/beam.2bpp.lz"
|
||||
AnimObjSpeedGFX: INCBIN "gfx/fx/speed.2bpp.lz"
|
||||
AnimObjChargeGFX: INCBIN "gfx/fx/charge.2bpp.lz"
|
||||
AnimObjWindGFX: INCBIN "gfx/fx/wind.2bpp.lz"
|
||||
AnimObjWhipGFX: INCBIN "gfx/fx/whip.2bpp.lz"
|
||||
AnimObjRopeGFX: INCBIN "gfx/fx/rope.2bpp.lz"
|
||||
AnimObjEggGFX: INCBIN "gfx/fx/egg.2bpp.lz"
|
||||
AnimObjPsychicGFX: INCBIN "gfx/fx/psychic.2bpp.lz"
|
||||
AnimObjSandGFX: INCBIN "gfx/fx/sand.2bpp.lz"
|
||||
AnimObjWebGFX: INCBIN "gfx/fx/web.2bpp.lz"
|
||||
AnimObjHazeGFX: INCBIN "gfx/fx/haze.2bpp.lz"
|
||||
AnimObjHornGFX: INCBIN "gfx/fx/horn.2bpp.lz"
|
||||
AnimObjFlowerGFX: INCBIN "gfx/fx/flower.2bpp.lz"
|
||||
AnimObjMiscGFX: INCBIN "gfx/fx/misc.2bpp.lz"
|
||||
AnimObjSkyAttackGFX: INCBIN "gfx/fx/skyattack.2bpp.lz"
|
||||
AnimObjGlobeGFX: INCBIN "gfx/fx/globe.2bpp.lz"
|
||||
AnimObjShapesGFX: INCBIN "gfx/fx/shapes.2bpp.lz"
|
||||
AnimObjStatusGFX: INCBIN "gfx/fx/status.2bpp.lz"
|
||||
AnimObjObjectsGFX: INCBIN "gfx/fx/objects.2bpp.lz"
|
||||
AnimObjShineGFX: INCBIN "gfx/fx/shine.2bpp.lz"
|
||||
AnimObjAngelsGFX: INCBIN "gfx/fx/angels.2bpp.lz"
|
||||
AnimObjWaveGFX: INCBIN "gfx/fx/wave.2bpp.lz"
|
||||
AnimObjAeroblastGFX: INCBIN "gfx/fx/aeroblast.2bpp.lz"
|
||||
; 8640e
|
||||
|
@ -321,7 +321,7 @@ BattleAnim_ThrowPokeBall
|
||||
anim_jump .Shake
|
||||
; c92f2
|
||||
|
||||
.TheTrainerBlockedTheBall
|
||||
.TheTrainerBlockedTheBall:
|
||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT
|
||||
anim_sound 6, 2, SFX_THROW_BALL
|
||||
anim_obj ANIM_OBJ_16, 8, 0, 11, 4, $20
|
||||
@ -331,7 +331,7 @@ BattleAnim_ThrowPokeBall
|
||||
anim_ret
|
||||
; c9305
|
||||
|
||||
.UltraBall
|
||||
.UltraBall:
|
||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
||||
anim_sound 6, 2, SFX_THROW_BALL
|
||||
anim_obj ANIM_OBJ_POKE_BALL, 8, 4, 11, 4, $40
|
||||
@ -345,7 +345,7 @@ BattleAnim_ThrowPokeBall
|
||||
anim_jump .Shake
|
||||
; c9326
|
||||
|
||||
.GreatBall
|
||||
.GreatBall:
|
||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
||||
anim_sound 6, 2, SFX_THROW_BALL
|
||||
anim_obj ANIM_OBJ_POKE_BALL, 8, 4, 11, 4, $40
|
||||
@ -359,7 +359,7 @@ BattleAnim_ThrowPokeBall
|
||||
anim_jump .Shake
|
||||
; c9347
|
||||
|
||||
.MasterBall
|
||||
.MasterBall:
|
||||
anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED
|
||||
anim_sound 6, 2, SFX_THROW_BALL
|
||||
anim_obj ANIM_OBJ_POKE_BALL, 8, 0, 11, 4, $20
|
||||
@ -380,7 +380,7 @@ BattleAnim_ThrowPokeBall
|
||||
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $36
|
||||
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $37
|
||||
anim_wait 64
|
||||
.Shake
|
||||
.Shake:
|
||||
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
|
||||
anim_wait 8
|
||||
anim_incobj 2
|
||||
@ -394,7 +394,7 @@ BattleAnim_ThrowPokeBall
|
||||
anim_wait 32
|
||||
anim_wait 8
|
||||
anim_setvar $0
|
||||
.Loop
|
||||
.Loop:
|
||||
anim_wait 48
|
||||
anim_checkpokeball
|
||||
anim_jumpvar $1, .Click
|
||||
@ -404,12 +404,12 @@ BattleAnim_ThrowPokeBall
|
||||
anim_jump .Loop
|
||||
; c93bc
|
||||
|
||||
.Click
|
||||
.Click:
|
||||
anim_clearsprites
|
||||
anim_ret
|
||||
; c93be
|
||||
|
||||
.BreakFree
|
||||
.BreakFree:
|
||||
anim_setobj $1, $b
|
||||
anim_sound 0, 1, SFX_BALL_POOF
|
||||
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10
|
||||
@ -434,7 +434,7 @@ BattleAnim_SendOutMon: ; c93d1
|
||||
anim_call BattleAnim_ShowMon_0
|
||||
anim_ret
|
||||
|
||||
.Unknown
|
||||
.Unknown:
|
||||
anim_1gfx ANIM_GFX_SMOKE
|
||||
anim_call BattleAnim_FollowEnemyFeet_0
|
||||
anim_bgeffect ANIM_BG_2A, $0, $1, $0
|
||||
@ -449,7 +449,7 @@ BattleAnim_SendOutMon: ; c93d1
|
||||
anim_call BattleAnim_ShowMon_0
|
||||
anim_ret
|
||||
|
||||
.Shiny
|
||||
.Shiny:
|
||||
anim_1gfx ANIM_GFX_SPEED
|
||||
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3
|
||||
anim_bgeffect ANIM_BG_06, $0, $2, $0
|
||||
@ -479,7 +479,7 @@ BattleAnim_SendOutMon: ; c93d1
|
||||
anim_wait 32
|
||||
anim_ret
|
||||
|
||||
.Normal
|
||||
.Normal:
|
||||
anim_1gfx ANIM_GFX_SMOKE
|
||||
anim_sound 0, 0, SFX_BALL_POOF
|
||||
anim_obj ANIM_OBJ_1C, 5, 4, 12, 0, $0
|
||||
@ -1323,7 +1323,7 @@ BattleAnim_Thundershock: ; c9b53
|
||||
|
||||
BattleAnim_Thunderbolt: ; c9b66
|
||||
anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION
|
||||
anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
|
||||
anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
|
||||
anim_wait 16
|
||||
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2
|
||||
anim_sound 0, 1, SFX_THUNDERSHOCK
|
||||
@ -2497,10 +2497,10 @@ BattleAnim_Transform: ; ca54d
|
||||
anim_call BattleAnim_FollowPlayerHead_0
|
||||
anim_transform
|
||||
anim_sound 0, 0, SFX_PSYBEAM
|
||||
anim_bgeffect ANIM_BG_28, $0, $1, $0
|
||||
anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
|
||||
anim_wait 48
|
||||
anim_updateactorpic
|
||||
anim_incbgeffect ANIM_BG_28
|
||||
anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
|
||||
anim_wait 48
|
||||
anim_call BattleAnim_ShowMon_0
|
||||
anim_ret
|
||||
@ -2759,10 +2759,10 @@ BattleAnim_Minimize: ; ca78a
|
||||
anim_1gfx ANIM_GFX_HIT
|
||||
anim_call BattleAnim_FollowPlayerHead_0
|
||||
anim_minimize
|
||||
anim_bgeffect ANIM_BG_28, $0, $1, $0
|
||||
anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
|
||||
anim_wait 48
|
||||
anim_updateactorpic
|
||||
anim_incbgeffect ANIM_BG_28
|
||||
anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
|
||||
anim_wait 48
|
||||
anim_call BattleAnim_ShowMon_0
|
||||
anim_ret
|
||||
@ -2774,7 +2774,7 @@ BattleAnim_SkyAttack: ; ca7a1
|
||||
anim_bgeffect ANIM_BG_27, $0, $1, $0
|
||||
anim_wait 32
|
||||
anim_sound 0, 0, SFX_HYPER_BEAM
|
||||
anim_obj ANIM_OBJ_6E, 6, 0, 11, 0, $40
|
||||
anim_obj ANIM_OBJ_SKY_ATTACK_FEAROW, 6, 0, 11, 0, $40
|
||||
anim_wait 64
|
||||
anim_incobj 1
|
||||
anim_wait 21
|
||||
@ -2805,7 +2805,7 @@ BattleAnim_NightShade: ; ca7cc
|
||||
BattleAnim_Lick: ; ca7e5
|
||||
anim_1gfx ANIM_GFX_WATER
|
||||
anim_sound 0, 1, SFX_LICK
|
||||
anim_obj ANIM_OBJ_6F, -15, 0, 7, 0, $0
|
||||
anim_obj ANIM_OBJ_LICK, -15, 0, 7, 0, $0
|
||||
anim_wait 64
|
||||
anim_ret
|
||||
; ca7f1
|
||||
@ -3025,9 +3025,9 @@ BattleAnim_Meditate: ; ca9d8
|
||||
anim_1gfx ANIM_GFX_HIT
|
||||
anim_call BattleAnim_FollowEnemyFeet_0
|
||||
anim_sound 0, 0, SFX_PSYBEAM
|
||||
anim_bgeffect ANIM_BG_28, $0, $1, $0
|
||||
anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
|
||||
anim_wait 48
|
||||
anim_incbgeffect ANIM_BG_28
|
||||
anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
|
||||
anim_wait 48
|
||||
anim_call BattleAnim_ShowMon_0
|
||||
anim_ret
|
||||
@ -3550,7 +3550,7 @@ BattleAnim_CottonSpore: ; cae84
|
||||
anim_obp0 $54
|
||||
anim_1gfx ANIM_GFX_MISC
|
||||
anim_sound 0, 1, SFX_POWDER
|
||||
.loop: ; cae8b
|
||||
.loop ; cae8b
|
||||
anim_obj ANIM_OBJ_81, -16, 4, 4, 0, $0
|
||||
anim_wait 8
|
||||
anim_loop 5, .loop
|
||||
@ -3592,7 +3592,7 @@ BattleAnim_Spite: ; caed6
|
||||
|
||||
BattleAnim_PowderSnow: ; caee2
|
||||
anim_1gfx ANIM_GFX_ICE
|
||||
.loop: ; caee4
|
||||
.loop ; caee4
|
||||
anim_sound 6, 2, SFX_SHINE
|
||||
anim_obj ANIM_OBJ_8F, 8, 0, 11, 0, $23
|
||||
anim_wait 2
|
||||
@ -3765,13 +3765,13 @@ BattleAnim_Octazooka: ; cb06f
|
||||
BattleAnim_Spikes: ; cb092
|
||||
anim_1gfx ANIM_GFX_MISC
|
||||
anim_sound 6, 2, SFX_MENU
|
||||
anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $20
|
||||
anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $20
|
||||
anim_wait 8
|
||||
anim_sound 6, 2, SFX_MENU
|
||||
anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $30
|
||||
anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $30
|
||||
anim_wait 8
|
||||
anim_sound 6, 2, SFX_MENU
|
||||
anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $28
|
||||
anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $28
|
||||
anim_wait 64
|
||||
anim_ret
|
||||
; cb0b0
|
||||
@ -3784,7 +3784,7 @@ BattleAnim_ZapCannon: ; cb0b0
|
||||
anim_obj ANIM_OBJ_A3, 8, 0, 11, 4, $2
|
||||
anim_wait 40
|
||||
anim_sound 0, 1, SFX_THUNDERSHOCK
|
||||
anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
|
||||
anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
|
||||
anim_wait 16
|
||||
anim_obj ANIM_OBJ_31, -15, 0, 7, 0, $0
|
||||
anim_wait 128
|
||||
@ -3830,14 +3830,14 @@ BattleAnim_PerishSong: ; cb113
|
||||
anim_bgeffect ANIM_BG_06, $0, $2, $0
|
||||
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
|
||||
anim_sound 0, 2, SFX_PERISH_SONG
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $0
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $8
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $10
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $18
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $20
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $28
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $30
|
||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $38
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $0
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $8
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $10
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $18
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $20
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $28
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $30
|
||||
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $38
|
||||
anim_wait 112
|
||||
anim_ret
|
||||
; cb14c
|
||||
@ -4087,7 +4087,7 @@ BattleAnim_Spark: ; cb34d
|
||||
anim_incobj 2
|
||||
anim_wait 1
|
||||
anim_sound 0, 1, SFX_THUNDERSHOCK
|
||||
anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
|
||||
anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
|
||||
anim_obj ANIM_OBJ_33, -15, 0, 7, 0, $0
|
||||
anim_wait 32
|
||||
anim_ret
|
||||
|
@ -236,7 +236,7 @@ BattleBGEffect_WhiteHues: ; c812d (32:412d)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db %11100100
|
||||
db %11100000
|
||||
db %11010000
|
||||
@ -254,7 +254,7 @@ BattleBGEffect_BlackHues: ; c8141 (32:4141)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db %11100100
|
||||
db %11110100
|
||||
db %11111000
|
||||
@ -273,7 +273,7 @@ BattleBGEffect_AlternateHues: ; c8155 (32:4155)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db %11100100
|
||||
db %11111000
|
||||
db %11111100
|
||||
@ -298,12 +298,12 @@ BattleBGEffect_06: ; c8171 (32:4171)
|
||||
ld [wOBP0], a
|
||||
ret
|
||||
|
||||
.PalsCGB
|
||||
.PalsCGB:
|
||||
db %11100100
|
||||
db %10010000
|
||||
db -2
|
||||
|
||||
.PalsSGB
|
||||
.PalsSGB:
|
||||
db %11110000
|
||||
db %11000000
|
||||
db -2
|
||||
@ -322,12 +322,12 @@ BattleBGEffect_07: ; c818b (32:418b)
|
||||
ld [wOBP0], a
|
||||
ret
|
||||
|
||||
.PalsCGB
|
||||
.PalsCGB:
|
||||
db %11100100
|
||||
db %11011000
|
||||
db -2
|
||||
|
||||
.PalsSGB
|
||||
.PalsSGB:
|
||||
db %11110000
|
||||
db %11001100
|
||||
db -2
|
||||
@ -339,7 +339,7 @@ BattleBGEffect_08: ; c81a5 (32:41a5)
|
||||
ld [wBGP], a
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db %00011011
|
||||
db %01100011
|
||||
db %10000111
|
||||
@ -405,10 +405,10 @@ BattleBGEffect_ShowMon: ; c81ea (32:41ea)
|
||||
call BattleBGEffect_RunPicResizeScript
|
||||
ret
|
||||
|
||||
.PlayerData
|
||||
.PlayerData:
|
||||
db 0, $31, 0
|
||||
db -1
|
||||
.EnemyData
|
||||
.EnemyData:
|
||||
db 3, $00, 3
|
||||
db -1
|
||||
; c8214
|
||||
@ -670,12 +670,12 @@ BattleBGEffect_EnterMon: ; c837b (32:437b)
|
||||
call BattleBGEffect_RunPicResizeScript
|
||||
ret
|
||||
|
||||
.PlayerData
|
||||
.PlayerData:
|
||||
db 2, $31, 2
|
||||
db 1, $31, 1
|
||||
db 0, $31, 0
|
||||
db -1
|
||||
.EnemyData
|
||||
.EnemyData:
|
||||
db 5, $00, 5
|
||||
db 4, $00, 4
|
||||
db 3, $00, 3
|
||||
@ -698,7 +698,7 @@ BattleBGEffect_ReturnMon: ; c83a8 (32:43a8)
|
||||
call BattleBGEffect_RunPicResizeScript
|
||||
ret
|
||||
|
||||
.PlayerData
|
||||
.PlayerData:
|
||||
db 0, $31, 0
|
||||
db -2, $66, 0
|
||||
db 1, $31, 1
|
||||
@ -707,7 +707,7 @@ BattleBGEffect_ReturnMon: ; c83a8 (32:43a8)
|
||||
db -2, $22, 2
|
||||
db -3, $00, 0
|
||||
db -1
|
||||
.EnemyData
|
||||
.EnemyData:
|
||||
db 3, $00, 3
|
||||
db -2, $77, 3
|
||||
db 4, $00, 4
|
||||
@ -773,7 +773,7 @@ endr
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.ClearBox
|
||||
.ClearBox:
|
||||
; get dims
|
||||
push bc
|
||||
inc hl
|
||||
@ -798,7 +798,7 @@ endr
|
||||
pop bc
|
||||
ret
|
||||
|
||||
.PlaceGraphic
|
||||
.PlaceGraphic:
|
||||
; get dims
|
||||
push bc
|
||||
push hl
|
||||
@ -858,7 +858,7 @@ endr
|
||||
pop bc
|
||||
ret
|
||||
|
||||
.Coords
|
||||
.Coords:
|
||||
dwcoord 2, 6
|
||||
dwcoord 3, 8
|
||||
dwcoord 4, 10
|
||||
@ -866,7 +866,7 @@ endr
|
||||
dwcoord 13, 2
|
||||
dwcoord 14, 4
|
||||
|
||||
.BGSquares
|
||||
.BGSquares:
|
||||
bgsquare: MACRO
|
||||
dn \1,\2
|
||||
dw \3
|
||||
@ -879,7 +879,7 @@ endm
|
||||
bgsquare 5, 5, .FiveByFive
|
||||
bgsquare 3, 3, .ThreeByThree
|
||||
|
||||
.SixBySix
|
||||
.SixBySix:
|
||||
db $00, $06, $0c, $12, $18, $1e
|
||||
db $01, $07, $0d, $13, $19, $1f
|
||||
db $02, $08, $0e, $14, $1a, $20
|
||||
@ -887,17 +887,17 @@ endm
|
||||
db $04, $0a, $10, $16, $1c, $22
|
||||
db $05, $0b, $11, $17, $1d, $23
|
||||
|
||||
.FourByFour
|
||||
.FourByFour:
|
||||
db $00, $0c, $12, $1e
|
||||
db $02, $0e, $14, $20
|
||||
db $03, $0f, $15, $21
|
||||
db $05, $11, $17, $23
|
||||
|
||||
.TwoByTwo
|
||||
.TwoByTwo:
|
||||
db $00, $1e
|
||||
db $05, $23
|
||||
|
||||
.SevenBySeven
|
||||
.SevenBySeven:
|
||||
db $00, $07, $0e, $15, $1c, $23, $2a
|
||||
db $01, $08, $0f, $16, $1d, $24, $2b
|
||||
db $02, $09, $10, $17, $1e, $25, $2c
|
||||
@ -906,14 +906,14 @@ endm
|
||||
db $05, $0c, $13, $1a, $21, $28, $2f
|
||||
db $06, $0d, $14, $1b, $22, $29, $30
|
||||
|
||||
.FiveByFive
|
||||
.FiveByFive:
|
||||
db $00, $07, $15, $23, $2a
|
||||
db $01, $08, $16, $24, $2b
|
||||
db $03, $0a, $18, $26, $2d
|
||||
db $05, $0c, $1a, $28, $2f
|
||||
db $06, $0d, $1b, $29, $30
|
||||
|
||||
.ThreeByThree
|
||||
.ThreeByThree:
|
||||
db $00, $15, $2a
|
||||
db $03, $18, $2d
|
||||
db $06, $1b, $30
|
||||
@ -945,7 +945,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
.RotatewSurfWaveBGEffect
|
||||
.RotatewSurfWaveBGEffect:
|
||||
ld hl, wSurfWaveBGEffect
|
||||
ld de, wSurfWaveBGEffect + 1
|
||||
ld c, wSurfWaveBGEffectEnd - wSurfWaveBGEffect - 1
|
||||
@ -1218,7 +1218,7 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
|
||||
.four
|
||||
ret
|
||||
|
||||
.UpdateLYOverrides
|
||||
.UpdateLYOverrides:
|
||||
ld e, a
|
||||
xor $ff
|
||||
inc a
|
||||
@ -1893,7 +1893,7 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
ret
|
||||
|
||||
.SetLYOverridesBackup
|
||||
.SetLYOverridesBackup:
|
||||
ld e, a
|
||||
ld a, [hFFC7]
|
||||
ld l, a
|
||||
@ -1913,7 +1913,7 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
|
||||
call BattleBGEffects_ResetVideoHRAM
|
||||
ret
|
||||
|
||||
.GetLYOverride
|
||||
.GetLYOverride:
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2042,7 +2042,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
|
||||
ld [wOBP1], a
|
||||
ret
|
||||
|
||||
.DMG_LYOverrideLoads
|
||||
.DMG_LYOverrideLoads:
|
||||
ld hl, LYOverridesBackup
|
||||
.loop1
|
||||
ld [hl], d
|
||||
@ -2061,7 +2061,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
|
||||
call BatttleBGEffects_GetNamedJumptablePointer
|
||||
jp [hl]
|
||||
|
||||
.Jumptable
|
||||
.Jumptable:
|
||||
dw .cgb_zero
|
||||
dw .cgb_one
|
||||
dw .cgb_two
|
||||
@ -2118,12 +2118,12 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.CGB_DMGEnemyData
|
||||
.CGB_DMGEnemyData:
|
||||
db $e4, $e4
|
||||
db $f8, $90
|
||||
db $fc, $40
|
||||
db $f8, $90
|
||||
.DMG_PlayerData
|
||||
.DMG_PlayerData:
|
||||
db $e4, $e4
|
||||
db $90, $f8
|
||||
db $40, $fc
|
||||
@ -2135,7 +2135,7 @@ BattleBGEffect_RapidFlash: ; c8be8 (32:4be8)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.FlashPals
|
||||
.FlashPals:
|
||||
db $e4, $6c, $fe
|
||||
; c8bf2
|
||||
|
||||
@ -2144,7 +2144,7 @@ BattleBGEffect_16: ; c8bf2 (32:4bf2)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $90, $40, $ff
|
||||
; c8bfd
|
||||
|
||||
@ -2153,7 +2153,7 @@ BattleBGEffect_17: ; c8bfd (32:4bfd)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $f8, $fc, $ff
|
||||
; c8c08
|
||||
|
||||
@ -2162,7 +2162,7 @@ BattleBGEffect_18: ; c8c08 (32:4c08)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $90, $40, $90, $fe
|
||||
; c8c14
|
||||
|
||||
@ -2171,7 +2171,7 @@ BattleBGEffect_19: ; c8c14 (32:4c14)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $f8, $fc, $f8, $fe
|
||||
; c8c20
|
||||
|
||||
@ -2180,7 +2180,7 @@ BattleBGEffect_1a: ; c8c20 (32:4c20)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe
|
||||
; c8c30
|
||||
|
||||
@ -2189,7 +2189,7 @@ BattleBGEffect_1b: ; c8c30 (32:4c30)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $fc, $e4, $00, $fe
|
||||
; c8c3c
|
||||
|
||||
@ -2198,7 +2198,7 @@ BattleBGEffect_1d: ; c8c3c (32:4c3c)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $e4, $90, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $90, $e4, $ff
|
||||
; c8c55
|
||||
|
||||
@ -2207,7 +2207,7 @@ BattleBGEffect_1e: ; c8c55 (32:4c55)
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals
|
||||
.Pals:
|
||||
db $00, $40, $90, $e4, $ff
|
||||
; c8c61
|
||||
|
||||
@ -2218,7 +2218,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
|
||||
dw .one
|
||||
|
||||
|
||||
.zero: ; c8c68 (32:4c68)
|
||||
.zero ; c8c68 (32:4c68)
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
call BattleBGEffects_ClearLYOverrides
|
||||
ld a, $43
|
||||
@ -2234,7 +2234,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
|
||||
ld [hl], $20
|
||||
ret
|
||||
|
||||
.one: ; c8c85 (32:4c85)
|
||||
.one ; c8c85 (32:4c85)
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2264,7 +2264,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
dw .two
|
||||
|
||||
|
||||
.zero: ; c8cab (32:4cab)
|
||||
.zero ; c8cab (32:4cab)
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
call BattleBGEffects_ClearLYOverrides
|
||||
ld a, $43
|
||||
@ -2278,7 +2278,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
.one: ; c8cc3 (32:4cc3)
|
||||
.one ; c8cc3 (32:4cc3)
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2294,7 +2294,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.two: ; c8cdd (32:4cdd)
|
||||
.two ; c8cdd (32:4cdd)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
@ -2423,13 +2423,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
pop de
|
||||
jp [hl]
|
||||
|
||||
.Jumptable_DMG
|
||||
.Jumptable_DMG:
|
||||
dw .zero_dmg
|
||||
dw .one_dmg
|
||||
dw .two_dmg
|
||||
|
||||
|
||||
.zero_dmg: ; c8d8b (32:4d8b)
|
||||
.zero_dmg ; c8d8b (32:4d8b)
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
ld a, $e4
|
||||
call BattleBGEffects_SetLYOverrides
|
||||
@ -2447,7 +2447,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.one_dmg: ; c8daa (32:4daa)
|
||||
.one_dmg ; c8daa (32:4daa)
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2472,7 +2472,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.two_dmg: ; c8dc9 (32:4dc9)
|
||||
.two_dmg ; c8dc9 (32:4dc9)
|
||||
call BattleBGEffects_ResetVideoHRAM
|
||||
ld a, %11100100
|
||||
ld [rBGP], a
|
||||
@ -2494,7 +2494,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dw .four_cgb
|
||||
|
||||
|
||||
.zero_cgb: ; c8de7 (32:4de7)
|
||||
.zero_cgb ; c8de7 (32:4de7)
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn_cgb
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
@ -2510,7 +2510,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.one_cgb: ; c8e02 (32:4e02)
|
||||
.one_cgb ; c8e02 (32:4e02)
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2535,13 +2535,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.two_cgb: ; c8e21 (32:4e21)
|
||||
.two_cgb ; c8e21 (32:4e21)
|
||||
ld a, $e4
|
||||
call BGEffects_LoadBGPal0_OBPal1
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.three_cgb: ; c8e2a (32:4e2a)
|
||||
.three_cgb ; c8e2a (32:4e2a)
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2566,7 +2566,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.four_cgb: ; c8e49 (32:4e49)
|
||||
.four_cgb ; c8e49 (32:4e49)
|
||||
ld a, $e4
|
||||
call BGEffects_LoadBGPal1_OBPal0
|
||||
call EndBattleBGEffect
|
||||
@ -2836,7 +2836,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
|
||||
and a
|
||||
ret
|
||||
|
||||
.GetLYOverrideBackupAddrOffset
|
||||
.GetLYOverrideBackupAddrOffset:
|
||||
ld a, [hFFC7]
|
||||
ld e, a
|
||||
ld a, [wBattleAnimTemp0]
|
||||
|
249
battle/core.asm
249
battle/core.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ BattleCommand_Metronome: ; 37418
|
||||
.asm_3742b
|
||||
call LoadMoveAnim
|
||||
|
||||
.GetMove
|
||||
.GetMove:
|
||||
call BattleRandom
|
||||
|
||||
; No invalid moves.
|
||||
|
@ -85,7 +85,7 @@ BattleCommand_Present: ; 37874
|
||||
.do_animation
|
||||
jp EndMoveEffect
|
||||
|
||||
.PresentPower
|
||||
.PresentPower:
|
||||
db 40 percent, 40
|
||||
db 70 percent + 1, 80
|
||||
db 80 percent, 120
|
||||
|
@ -58,7 +58,7 @@ DoWeatherModifiers: ; fbda4
|
||||
ld a, [wd265] ; move type
|
||||
ld c, a
|
||||
|
||||
.CheckWeatherType
|
||||
.CheckWeatherType:
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
@ -71,7 +71,7 @@ DoWeatherModifiers: ; fbda4
|
||||
cp c
|
||||
jr z, .ApplyModifier
|
||||
|
||||
.NextWeatherType
|
||||
.NextWeatherType:
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
@ -85,7 +85,7 @@ endr
|
||||
call GetBattleVar
|
||||
ld c, a
|
||||
|
||||
.CheckWeatherMove
|
||||
.CheckWeatherMove:
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
@ -98,13 +98,13 @@ endr
|
||||
cp c
|
||||
jr z, .ApplyModifier
|
||||
|
||||
.NextWeatherMove
|
||||
.NextWeatherMove:
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
jr .CheckWeatherMove
|
||||
|
||||
.ApplyModifier
|
||||
.ApplyModifier:
|
||||
xor a
|
||||
ld [hMultiplicand + 0], a
|
||||
ld hl, CurDamage
|
||||
@ -138,7 +138,7 @@ endr
|
||||
|
||||
ld bc, 1
|
||||
|
||||
.Update
|
||||
.Update:
|
||||
ld a, b
|
||||
ld [CurDamage], a
|
||||
ld a, c
|
||||
@ -147,14 +147,14 @@ endr
|
||||
.done
|
||||
ret
|
||||
|
||||
.WeatherTypeModifiers
|
||||
.WeatherTypeModifiers:
|
||||
db WEATHER_RAIN, WATER, 15
|
||||
db WEATHER_RAIN, FIRE, 05
|
||||
db WEATHER_SUN, FIRE, 15
|
||||
db WEATHER_SUN, WATER, 05
|
||||
db $ff
|
||||
|
||||
.WeatherMoveModifiers
|
||||
.WeatherMoveModifiers:
|
||||
db WEATHER_RAIN, EFFECT_SOLARBEAM, 05
|
||||
db $ff
|
||||
; fbe24
|
||||
@ -183,7 +183,7 @@ DoBadgeTypeBoosts: ; fbe24
|
||||
ld a, [JohtoBadges]
|
||||
ld c, a
|
||||
|
||||
.CheckBadge
|
||||
.CheckBadge:
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
jr z, .done
|
||||
@ -196,11 +196,11 @@ DoBadgeTypeBoosts: ; fbe24
|
||||
cp [hl]
|
||||
jr z, .ApplyBoost
|
||||
|
||||
.NextBadge
|
||||
.NextBadge:
|
||||
inc hl
|
||||
jr .CheckBadge
|
||||
|
||||
.ApplyBoost
|
||||
.ApplyBoost:
|
||||
ld a, [CurDamage]
|
||||
ld h, a
|
||||
ld d, a
|
||||
@ -226,7 +226,7 @@ DoBadgeTypeBoosts: ; fbe24
|
||||
|
||||
ld hl, $ffff
|
||||
|
||||
.Update
|
||||
.Update:
|
||||
ld a, h
|
||||
ld [CurDamage], a
|
||||
ld a, l
|
||||
@ -237,7 +237,7 @@ DoBadgeTypeBoosts: ; fbe24
|
||||
pop de
|
||||
ret
|
||||
|
||||
.BadgeTypes
|
||||
.BadgeTypes:
|
||||
db FLYING ; zephyrbadge
|
||||
db BUG ; hivebadge
|
||||
db NORMAL ; plainbadge
|
||||
|
@ -2095,7 +2095,7 @@ FutureSight:
|
||||
damagestats
|
||||
damagecalc
|
||||
futuresight
|
||||
damagevariation
|
||||
damagevariation ; skip here if last turn
|
||||
checkhit
|
||||
hittargetnosub
|
||||
failuretext
|
||||
|
@ -156,7 +156,7 @@ endm
|
||||
; ANIM_OBJ_31
|
||||
battleanimobj $21, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, $03, $05
|
||||
|
||||
; ANIM_OBJ_32
|
||||
; ANIM_OBJ_LIGHTNING_BOLT
|
||||
battleanimobj $21, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, $02, $08
|
||||
|
||||
; ANIM_OBJ_33
|
||||
@ -336,10 +336,10 @@ endm
|
||||
; ANIM_OBJ_6D
|
||||
battleanimobj $01, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, $03, $11
|
||||
|
||||
; ANIM_OBJ_6E
|
||||
; ANIM_OBJ_SKY_ATTACK_FEAROW
|
||||
battleanimobj $21, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, $02, $20
|
||||
|
||||
; ANIM_OBJ_6F
|
||||
; ANIM_OBJ_LICK
|
||||
battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04
|
||||
|
||||
; ANIM_OBJ_70
|
||||
@ -432,7 +432,7 @@ endm
|
||||
; ANIM_OBJ_8D
|
||||
battleanimobj $21, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, $04, $19
|
||||
|
||||
; ANIM_OBJ_8E
|
||||
; ANIM_OBJ_SPIKES
|
||||
battleanimobj $21, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, $02, $1f
|
||||
|
||||
; ANIM_OBJ_8F
|
||||
@ -504,7 +504,7 @@ endm
|
||||
; ANIM_OBJ_A5
|
||||
battleanimobj $61, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, $02, $23
|
||||
|
||||
; ANIM_OBJ_A6
|
||||
; ANIM_OBJ_PERISH_SONG
|
||||
battleanimobj $00, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, $02, $0e
|
||||
|
||||
; ANIM_OBJ_A7
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ DoBattleAnimFrame: ; ccfbe
|
||||
jp [hl]
|
||||
; ccfce
|
||||
|
||||
.Jumptable
|
||||
.Jumptable:
|
||||
dw BattleAnimFunction_00 ; 00
|
||||
dw BattleAnimFunction_01 ; 01
|
||||
dw BattleAnimFunction_02 ; 02
|
||||
@ -425,7 +425,7 @@ GetBallAnimPal: ; cd249 (33:5249)
|
||||
ld e, a
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
.IsInArray
|
||||
.IsInArray:
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
jr z, .load
|
||||
@ -634,7 +634,7 @@ BattleAnimFunction_08: ; cd306 (33:5306)
|
||||
call .SetCoords
|
||||
ret
|
||||
|
||||
.SetCoords
|
||||
.SetCoords:
|
||||
ld hl, BATTLEANIMSTRUCT_0B
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -4100,7 +4100,7 @@ BattleAnim_Sine: ; ce734 (33:6734)
|
||||
inc a
|
||||
ret
|
||||
|
||||
.ApplySineWave
|
||||
.ApplySineWave:
|
||||
ld e, a
|
||||
ld a, d
|
||||
ld d, 0
|
||||
|
@ -2,51 +2,51 @@
|
||||
AnimObjGFX: ; cfcf6
|
||||
|
||||
object_gfx: MACRO
|
||||
; label, # tiles
|
||||
; # tiles, label
|
||||
db \1
|
||||
dba \2
|
||||
ENDM
|
||||
|
||||
object_gfx 0, AnimObj00GFX
|
||||
object_gfx 21, AnimObj01GFX
|
||||
object_gfx 6, AnimObj02GFX
|
||||
object_gfx 6, AnimObj03GFX
|
||||
object_gfx 20, AnimObj04GFX
|
||||
object_gfx 26, AnimObj05GFX
|
||||
object_gfx 18, AnimObj06GFX
|
||||
object_gfx 12, AnimObj07GFX
|
||||
object_gfx 9, AnimObj08GFX
|
||||
object_gfx 17, AnimObj09GFX
|
||||
object_gfx 6, AnimObj10GFX
|
||||
object_gfx 10, AnimObj11GFX
|
||||
object_gfx 9, AnimObj12GFX
|
||||
object_gfx 13, AnimObj13GFX
|
||||
object_gfx 16, AnimObj14GFX
|
||||
object_gfx 2, AnimObj15GFX
|
||||
object_gfx 11, AnimObj16GFX
|
||||
object_gfx 9, AnimObj17GFX
|
||||
object_gfx 9, AnimObj18GFX
|
||||
object_gfx 19, AnimObj19GFX
|
||||
object_gfx 10, AnimObj20GFX
|
||||
object_gfx 12, AnimObj21GFX
|
||||
object_gfx 18, AnimObj22GFX
|
||||
object_gfx 13, AnimObj23GFX
|
||||
object_gfx 10, AnimObj24GFX
|
||||
object_gfx 27, AnimObj25GFX
|
||||
object_gfx 12, AnimObj26GFX
|
||||
object_gfx 14, AnimObj27GFX
|
||||
object_gfx 16, AnimObj28GFX
|
||||
object_gfx 7, AnimObj29GFX
|
||||
object_gfx 8, AnimObj30GFX
|
||||
object_gfx 40, AnimObj31GFX
|
||||
object_gfx 36, AnimObj32GFX
|
||||
object_gfx 16, AnimObj33GFX
|
||||
object_gfx 48, AnimObj34GFX
|
||||
object_gfx 18, AnimObj35GFX
|
||||
object_gfx 38, AnimObj36GFX
|
||||
object_gfx 35, AnimObj37GFX
|
||||
object_gfx 18, AnimObj38GFX
|
||||
object_gfx 24, AnimObj39GFX
|
||||
object_gfx 21, AnimObjHitGFX
|
||||
object_gfx 6, AnimObjCutGFX
|
||||
object_gfx 6, AnimObjFireGFX
|
||||
object_gfx 20, AnimObjWaterGFX
|
||||
object_gfx 26, AnimObjLightningGFX
|
||||
object_gfx 18, AnimObjPlantGFX
|
||||
object_gfx 12, AnimObjSmokeGFX
|
||||
object_gfx 9, AnimObjExplosionGFX
|
||||
object_gfx 17, AnimObjRocksGFX
|
||||
object_gfx 6, AnimObjIceGFX
|
||||
object_gfx 10, AnimObjPokeBallGFX
|
||||
object_gfx 9, AnimObjPoisonGFX
|
||||
object_gfx 13, AnimObjBubbleGFX
|
||||
object_gfx 16, AnimObjNoiseGFX
|
||||
object_gfx 2, AnimObjPowderGFX
|
||||
object_gfx 11, AnimObjBeamGFX
|
||||
object_gfx 9, AnimObjSpeedGFX
|
||||
object_gfx 9, AnimObjChargeGFX
|
||||
object_gfx 19, AnimObjWindGFX
|
||||
object_gfx 10, AnimObjWhipGFX
|
||||
object_gfx 12, AnimObjEggGFX
|
||||
object_gfx 18, AnimObjRopeGFX
|
||||
object_gfx 13, AnimObjPsychicGFX
|
||||
object_gfx 10, AnimObjReflectGFX
|
||||
object_gfx 27, AnimObjStatusGFX
|
||||
object_gfx 12, AnimObjSandGFX
|
||||
object_gfx 14, AnimObjWebGFX
|
||||
object_gfx 16, AnimObjHazeGFX
|
||||
object_gfx 7, AnimObjHornGFX
|
||||
object_gfx 8, AnimObjFlowerGFX
|
||||
object_gfx 40, AnimObjMiscGFX
|
||||
object_gfx 36, AnimObjSkyAttackGFX
|
||||
object_gfx 16, AnimObjGlobeGFX
|
||||
object_gfx 48, AnimObjShapesGFX
|
||||
object_gfx 18, AnimObjObjectsGFX
|
||||
object_gfx 38, AnimObjShineGFX
|
||||
object_gfx 35, AnimObjAngelsGFX
|
||||
object_gfx 18, AnimObjWaveGFX
|
||||
object_gfx 24, AnimObjAeroblastGFX
|
||||
object_gfx 1, NULL
|
||||
object_gfx 1, NULL
|
||||
; cfd9e
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user