Merge pull request #326 from PikalaxALT/master

Reopen #325
This commit is contained in:
yenatch 2015-11-13 00:44:06 -05:00
commit 9c5473e965
447 changed files with 57908 additions and 56766 deletions

View File

@ -1,70 +1,70 @@
; e91b0
dbw BANK(Cry_00), Cry_00
dbw BANK(Cry_01), Cry_01
dbw BANK(Cry_02), Cry_02
dbw BANK(Cry_03), Cry_03
dbw BANK(Cry_04), Cry_04
dbw BANK(Cry_05), Cry_05
dbw BANK(Cry_06), Cry_06
dbw BANK(Cry_07), Cry_07
dbw BANK(Cry_08), Cry_08
dbw BANK(Cry_09), Cry_09
dbw BANK(Cry_0A), Cry_0A
dbw BANK(Cry_0B), Cry_0B
dbw BANK(Cry_0C), Cry_0C
dbw BANK(Cry_0D), Cry_0D
dbw BANK(Cry_0E), Cry_0E
dbw BANK(Cry_0F), Cry_0F
dbw BANK(Cry_10), Cry_10
dbw BANK(Cry_11), Cry_11
dbw BANK(Cry_12), Cry_12
dbw BANK(Cry_13), Cry_13
dbw BANK(Cry_14), Cry_14
dbw BANK(Cry_15), Cry_15
dbw BANK(Cry_16), Cry_16
dbw BANK(Cry_17), Cry_17
dbw BANK(Cry_18), Cry_18
dbw BANK(Cry_19), Cry_19
dbw BANK(Cry_1A), Cry_1A
dbw BANK(Cry_1B), Cry_1B
dbw BANK(Cry_1C), Cry_1C
dbw BANK(Cry_1D), Cry_1D
dbw BANK(Cry_1E), Cry_1E
dbw BANK(Cry_1F), Cry_1F
dbw BANK(Cry_20), Cry_20
dbw BANK(Cry_21), Cry_21
dbw BANK(Cry_22), Cry_22
dbw BANK(Cry_23), Cry_23
dbw BANK(Cry_24), Cry_24
dbw BANK(Cry_25), Cry_25
dbw BANK(Cry_26), Cry_26
dbw BANK(Cry_27), Cry_27
dbw BANK(Cry_28), Cry_28
dbw BANK(Cry_29), Cry_29
dbw BANK(Cry_2A), Cry_2A
dbw BANK(Cry_2B), Cry_2B
dbw BANK(Cry_2C), Cry_2C
dbw BANK(Cry_2D), Cry_2D
dbw BANK(Cry_2E), Cry_2E
dbw BANK(Cry_2F), Cry_2F
dbw BANK(Cry_30), Cry_30
dbw BANK(Cry_31), Cry_31
dbw BANK(Cry_32), Cry_32
dbw BANK(Cry_33), Cry_33
dbw BANK(Cry_34), Cry_34
dbw BANK(Cry_35), Cry_35
dbw BANK(Cry_36), Cry_36
dbw BANK(Cry_37), Cry_37
dbw BANK(Cry_38), Cry_38
dbw BANK(Cry_39), Cry_39
dbw BANK(Cry_3A), Cry_3A
dbw BANK(Cry_3B), Cry_3B
dbw BANK(Cry_3C), Cry_3C
dbw BANK(Cry_3D), Cry_3D
dbw BANK(Cry_3E), Cry_3E
dbw BANK(Cry_3F), Cry_3F
dbw BANK(Cry_40), Cry_40
dbw BANK(Cry_41), Cry_41
dbw BANK(Cry_42), Cry_42
dbw BANK(Cry_43), Cry_43
dba Cry_00
dba Cry_01
dba Cry_02
dba Cry_03
dba Cry_04
dba Cry_05
dba Cry_06
dba Cry_07
dba Cry_08
dba Cry_09
dba Cry_0A
dba Cry_0B
dba Cry_0C
dba Cry_0D
dba Cry_0E
dba Cry_0F
dba Cry_10
dba Cry_11
dba Cry_12
dba Cry_13
dba Cry_14
dba Cry_15
dba Cry_16
dba Cry_17
dba Cry_18
dba Cry_19
dba Cry_1A
dba Cry_1B
dba Cry_1C
dba Cry_1D
dba Cry_1E
dba Cry_1F
dba Cry_20
dba Cry_21
dba Cry_22
dba Cry_23
dba Cry_24
dba Cry_25
dba Cry_26
dba Cry_27
dba Cry_28
dba Cry_29
dba Cry_2A
dba Cry_2B
dba Cry_2C
dba Cry_2D
dba Cry_2E
dba Cry_2F
dba Cry_30
dba Cry_31
dba Cry_32
dba Cry_33
dba Cry_34
dba Cry_35
dba Cry_36
dba Cry_37
dba Cry_38
dba Cry_39
dba Cry_3A
dba Cry_3B
dba Cry_3C
dba Cry_3D
dba Cry_3E
dba Cry_3F
dba Cry_40
dba Cry_41
dba Cry_42
dba Cry_43
; e927c

View File

@ -6,7 +6,7 @@
; FadeMusic
; PlayStereoSFX
_SoundRestart:: ; e8000
_MapSetup_Sound_Off:: ; e8000
; restart sound operation
; clear all relevant hardware registers & wram
push hl
@ -26,7 +26,7 @@ _SoundRestart:: ; e8000
.clearsound
; sound channel 1 2 3 4
xor a
ld [hli], a ; rNR10, $ff15, rNR30, $ff1f ; sweep = 0
ld [hli], a ; rNR10, rNR20, rNR30, rNR40 ; sweep = 0
ld [hli], a ; rNR11, rNR21, rNR31, rNR41 ; length/wavepattern = 0
ld a, $08
@ -63,7 +63,7 @@ MusicFadeRestart: ; e803d
push af
ld a, [MusicFadeIDLo]
push af
call _SoundRestart
call _MapSetup_Sound_Off
pop af
ld [MusicFadeIDLo], a
pop af
@ -345,7 +345,7 @@ UpdateChannels: ; e8125
ld a, [rNR52]
and a, %10001101 ; ch2 off
ld [rNR52], a
ld hl, $ff15
ld hl, rNR20
call ClearChannel
ret
.asm_e8204
@ -418,39 +418,39 @@ rept 4
endr
ld de, WaveSamples
add hl, de
; load wavepattern into $ff30-$ff3f
; load wavepattern into rWave_0-rWave_f
ld a, [hli]
ld [$ff30], a
ld [rWave_0], a
ld a, [hli]
ld [$ff31], a
ld [rWave_1], a
ld a, [hli]
ld [$ff32], a
ld [rWave_2], a
ld a, [hli]
ld [$ff33], a
ld [rWave_3], a
ld a, [hli]
ld [$ff34], a
ld [rWave_4], a
ld a, [hli]
ld [$ff35], a
ld [rWave_5], a
ld a, [hli]
ld [$ff36], a
ld [rWave_6], a
ld a, [hli]
ld [$ff37], a
ld [rWave_7], a
ld a, [hli]
ld [$ff38], a
ld [rWave_8], a
ld a, [hli]
ld [$ff39], a
ld [rWave_9], a
ld a, [hli]
ld [$ff3a], a
ld [rWave_a], a
ld a, [hli]
ld [$ff3b], a
ld [rWave_b], a
ld a, [hli]
ld [$ff3c], a
ld [rWave_c], a
ld a, [hli]
ld [$ff3d], a
ld [rWave_d], a
ld a, [hli]
ld [$ff3e], a
ld [rWave_e], a
ld a, [hli]
ld [$ff3f], a
ld [rWave_f], a
pop hl
ld a, [wc293]
and a, $f0
@ -475,7 +475,7 @@ endr
ld a, [rNR52]
and a, %10000111 ; ch4 off
ld [rNR52], a
ld hl, $ff1f
ld hl, rNR40
call ClearChannel
ret
.asm_e82d4
@ -613,6 +613,7 @@ FadeMusic: ; e8358
jr z, .novolume
dec a
jr .updatevolume
.novolume
; make sure volume is off
xor a
@ -660,6 +661,7 @@ FadeMusic: ; e8358
ld hl, MusicFade
set 7, [hl]
ret
.fadein
; are we done?
cp a, $07
@ -3159,7 +3161,7 @@ ChannelPointers: ; e8fd9
ClearChannels:: ; e8fe9
; runs ClearChannel for all 4 channels
; doesn't seem to be used, but functionally identical to SoundRestart
; doesn't seem to be used, but functionally identical to MapSetup_Sound_Off
ld hl, rNR50
xor a
rept 2
@ -3177,12 +3179,12 @@ endr
; e8ffe
ClearChannel: ; e8ffe
; input: hl = beginning hw sound register (rNR10, $ff15, rNR30, $ff1f)
; input: hl = beginning hw sound register (rNR10, rNR20, rNR30, rNR40)
; output: 00 00 80 00 80
; sound channel 1 2 3 4
xor a
ld [hli], a ; rNR10, $ff15, rNR30, $ff1f ; sweep = 0
ld [hli], a ; rNR10, rNR20, rNR30, rNR40 ; sweep = 0
ld [hli], a ; rNR11, rNR21, rNR31, rNR41 ; length/wavepattern = 0
ld a, $08

View File

@ -9,110 +9,110 @@
; Songs V
; e906e
dbw BANK(Music_Nothing), Music_Nothing ; 0xe91a3
dbw BANK(Music_TitleScreen), Music_TitleScreen ; 0xeb808
dbw BANK(Music_Route1), Music_Route1 ; 0xec000
dbw BANK(Music_Route3), Music_Route3 ; 0xec2ca
dbw BANK(Music_Route12), Music_Route12 ; 0xec506
dbw BANK(Music_MagnetTrain), Music_MagnetTrain ; 0xef5f0
dbw BANK(Music_KantoGymBattle), Music_KantoGymBattle ; 0xec720
dbw BANK(Music_KantoTrainerBattle), Music_KantoTrainerBattle ; 0xec9fa
dbw BANK(Music_KantoWildBattle), Music_KantoWildBattle ; 0xed06d
dbw BANK(Music_PokemonCenter), Music_PokemonCenter ; 0xed5c6
dbw BANK(Music_LookHiker), Music_LookHiker ; 0xf7411
dbw BANK(Music_LookLass), Music_LookLass ; 0xed79b
dbw BANK(Music_LookOfficer), Music_LookOfficer ; 0xed82d
dbw BANK(Music_HealPokemon), Music_HealPokemon ; 0xf0697
dbw BANK(Music_LavenderTown), Music_LavenderTown ; 0xef72f
dbw BANK(Music_Route2), Music_Route2 ; 0xed8dd
dbw BANK(Music_MtMoon), Music_MtMoon ; 0xedb29
dbw BANK(Music_ShowMeAround), Music_ShowMeAround ; 0xedbd8
dbw BANK(Music_GameCorner), Music_GameCorner ; 0xedd6d
dbw BANK(Music_Bicycle), Music_Bicycle ; 0xee119
dbw BANK(Music_HallOfFame), Music_HallOfFame ; 0xf05bf
dbw BANK(Music_ViridianCity), Music_ViridianCity ; 0xf4000
dbw BANK(Music_CeladonCity), Music_CeladonCity ; 0xf435b
dbw BANK(Music_TrainerVictory), Music_TrainerVictory ; 0xebeab
dbw BANK(Music_WildPokemonVictory), Music_WildPokemonVictory ; 0xf4518
dbw BANK(Music_GymLeaderVictory), Music_GymLeaderVictory ; 0xf462c
dbw BANK(Music_MtMoonSquare), Music_MtMoonSquare ; 0xf4815
dbw BANK(Music_Gym), Music_Gym ; 0xf48ae
dbw BANK(Music_PalletTown), Music_PalletTown ; 0xf4b0c
dbw BANK(Music_ProfOaksPokemonTalk), Music_ProfOaksPokemonTalk ; 0xf4c9f
dbw BANK(Music_ProfOak), Music_ProfOak ; 0xf4dea
dbw BANK(Music_LookRival), Music_LookRival ; 0xf4f79
dbw BANK(Music_AfterTheRivalFight), Music_AfterTheRivalFight ; 0xf5127
dbw BANK(Music_Surf), Music_Surf ; 0xf518a
dbw BANK(Music_Evolution), Music_Evolution ; 0xf06e1
dbw BANK(Music_NationalPark), Music_NationalPark ; 0xf54e8
dbw BANK(Music_Credits), Music_Credits ; 0x1f31c
dbw BANK(Music_AzaleaTown), Music_AzaleaTown ; 0xf57e8
dbw BANK(Music_CherrygroveCity), Music_CherrygroveCity ; 0xf5b03
dbw BANK(Music_LookKimonoGirl), Music_LookKimonoGirl ; 0xf79b8
dbw BANK(Music_UnionCave), Music_UnionCave ; 0xf5c60
dbw BANK(Music_JohtoWildBattle), Music_JohtoWildBattle ; 0xf5dc5
dbw BANK(Music_JohtoTrainerBattle), Music_JohtoTrainerBattle ; 0xf6096
dbw BANK(Music_Route30), Music_Route30 ; 0xefc01
dbw BANK(Music_EcruteakCity), Music_EcruteakCity ; 0xef2d0
dbw BANK(Music_VioletCity), Music_VioletCity ; 0xf0000
dbw BANK(Music_JohtoGymBattle), Music_JohtoGymBattle ; 0xea50d
dbw BANK(Music_ChampionBattle), Music_ChampionBattle ; 0xea9c1
dbw BANK(Music_RivalBattle), Music_RivalBattle ; 0xe974f
dbw BANK(Music_RocketBattle), Music_RocketBattle ; 0xe9b6f
dbw BANK(Music_ElmsLab), Music_ElmsLab ; 0xea040
dbw BANK(Music_DarkCave), Music_DarkCave ; 0xea2be
dbw BANK(Music_Route29), Music_Route29 ; 0xf0386
dbw BANK(Music_Route36), Music_Route36 ; 0xe94e9
dbw BANK(Music_SSAqua), Music_SSAqua ; 0xead99
dbw BANK(Music_LookYoungster), Music_LookYoungster ; 0xf66c3
dbw BANK(Music_LookBeauty), Music_LookBeauty ; 0xeee3e
dbw BANK(Music_LookRocket), Music_LookRocket ; 0xf74a2
dbw BANK(Music_LookPokemaniac), Music_LookPokemaniac ; 0xebde1
dbw BANK(Music_LookSage), Music_LookSage ; 0xee35e
dbw BANK(Music_NewBarkTown), Music_NewBarkTown ; 0xeb2d3
dbw BANK(Music_GoldenrodCity), Music_GoldenrodCity ; 0xeb453
dbw BANK(Music_VermilionCity), Music_VermilionCity ; 0xeb676
dbw BANK(Music_PokemonChannel), Music_PokemonChannel ; 0xee45f
dbw BANK(Music_PokeFluteChannel), Music_PokeFluteChannel ; 0xf7b13
dbw BANK(Music_TinTower), Music_TinTower ; 0xf6811
dbw BANK(Music_SproutTower), Music_SproutTower ; 0xf6974
dbw BANK(Music_BurnedTower), Music_BurnedTower ; 0xf6a99
dbw BANK(Music_Lighthouse), Music_Lighthouse ; 0xee569
dbw BANK(Music_LakeOfRage), Music_LakeOfRage ; 0xee6c5
dbw BANK(Music_IndigoPlateau), Music_IndigoPlateau ; 0xee852
dbw BANK(Music_Route37), Music_Route37 ; 0xee94b
dbw BANK(Music_RocketHideout), Music_RocketHideout ; 0xeeb75
dbw BANK(Music_DragonsDen), Music_DragonsDen ; 0xeece8
dbw BANK(Music_JohtoWildBattleNight), Music_JohtoWildBattleNight ; 0xf605c
dbw BANK(Music_RuinsOfAlphRadio), Music_RuinsOfAlphRadio ; 0xeedcb
dbw BANK(Music_SuccessfulCapture), Music_SuccessfulCapture ; 0xf4602
dbw BANK(Music_Route26), Music_Route26 ; 0xeefb2
dbw BANK(Music_Mom), Music_Mom ; 0xf6bf2
dbw BANK(Music_VictoryRoad), Music_VictoryRoad ; 0xf6c72
dbw BANK(Music_PokemonLullaby), Music_PokemonLullaby ; 0xf6d79
dbw BANK(Music_PokemonMarch), Music_PokemonMarch ; 0xf6e23
dbw BANK(Music_GoldSilverOpening), Music_GoldSilverOpening ; 0xf7055
dbw BANK(Music_GoldSilverOpening2), Music_GoldSilverOpening2 ; 0xf7308
dbw BANK(Music_MainMenu), Music_MainMenu ; 0xf78fd
dbw BANK(Music_RuinsOfAlphInterior), Music_RuinsOfAlphInterior ; 0xebd9e
dbw BANK(Music_RocketTheme), Music_RocketTheme ; 0xf766d
dbw BANK(Music_DancingHall), Music_DancingHall ; 0xef9bc
dbw BANK(Music_ContestResults), Music_ContestResults ; 0xefb3e
dbw BANK(Music_BugCatchingContest), Music_BugCatchingContest ; 0xf7c16
dbw BANK(Music_LakeOfRageRocketRadio), Music_LakeOfRageRocketRadio ; 0xef5b1
dbw BANK(Music_Printer), Music_Printer ; 0xf07fd
dbw BANK(Music_PostCredits), Music_PostCredits ; 0xcfd9e
dba Music_Nothing ; 0xe91a3
dba Music_TitleScreen ; 0xeb808
dba Music_Route1 ; 0xec000
dba Music_Route3 ; 0xec2ca
dba Music_Route12 ; 0xec506
dba Music_MagnetTrain ; 0xef5f0
dba Music_KantoGymBattle ; 0xec720
dba Music_KantoTrainerBattle ; 0xec9fa
dba Music_KantoWildBattle ; 0xed06d
dba Music_PokemonCenter ; 0xed5c6
dba Music_LookHiker ; 0xf7411
dba Music_LookLass ; 0xed79b
dba Music_LookOfficer ; 0xed82d
dba Music_HealPokemon ; 0xf0697
dba Music_LavenderTown ; 0xef72f
dba Music_Route2 ; 0xed8dd
dba Music_MtMoon ; 0xedb29
dba Music_ShowMeAround ; 0xedbd8
dba Music_GameCorner ; 0xedd6d
dba Music_Bicycle ; 0xee119
dba Music_HallOfFame ; 0xf05bf
dba Music_ViridianCity ; 0xf4000
dba Music_CeladonCity ; 0xf435b
dba Music_TrainerVictory ; 0xebeab
dba Music_WildPokemonVictory ; 0xf4518
dba Music_GymLeaderVictory ; 0xf462c
dba Music_MtMoonSquare ; 0xf4815
dba Music_Gym ; 0xf48ae
dba Music_PalletTown ; 0xf4b0c
dba Music_ProfOaksPokemonTalk ; 0xf4c9f
dba Music_ProfOak ; 0xf4dea
dba Music_LookRival ; 0xf4f79
dba Music_AfterTheRivalFight ; 0xf5127
dba Music_Surf ; 0xf518a
dba Music_Evolution ; 0xf06e1
dba Music_NationalPark ; 0xf54e8
dba Music_Credits ; 0x1f31c
dba Music_AzaleaTown ; 0xf57e8
dba Music_CherrygroveCity ; 0xf5b03
dba Music_LookKimonoGirl ; 0xf79b8
dba Music_UnionCave ; 0xf5c60
dba Music_JohtoWildBattle ; 0xf5dc5
dba Music_JohtoTrainerBattle ; 0xf6096
dba Music_Route30 ; 0xefc01
dba Music_EcruteakCity ; 0xef2d0
dba Music_VioletCity ; 0xf0000
dba Music_JohtoGymBattle ; 0xea50d
dba Music_ChampionBattle ; 0xea9c1
dba Music_RivalBattle ; 0xe974f
dba Music_RocketBattle ; 0xe9b6f
dba Music_ElmsLab ; 0xea040
dba Music_DarkCave ; 0xea2be
dba Music_Route29 ; 0xf0386
dba Music_Route36 ; 0xe94e9
dba Music_SSAqua ; 0xead99
dba Music_LookYoungster ; 0xf66c3
dba Music_LookBeauty ; 0xeee3e
dba Music_LookRocket ; 0xf74a2
dba Music_LookPokemaniac ; 0xebde1
dba Music_LookSage ; 0xee35e
dba Music_NewBarkTown ; 0xeb2d3
dba Music_GoldenrodCity ; 0xeb453
dba Music_VermilionCity ; 0xeb676
dba Music_PokemonChannel ; 0xee45f
dba Music_PokeFluteChannel ; 0xf7b13
dba Music_TinTower ; 0xf6811
dba Music_SproutTower ; 0xf6974
dba Music_BurnedTower ; 0xf6a99
dba Music_Lighthouse ; 0xee569
dba Music_LakeOfRage ; 0xee6c5
dba Music_IndigoPlateau ; 0xee852
dba Music_Route37 ; 0xee94b
dba Music_RocketHideout ; 0xeeb75
dba Music_DragonsDen ; 0xeece8
dba Music_JohtoWildBattleNight ; 0xf605c
dba Music_RuinsOfAlphRadio ; 0xeedcb
dba Music_SuccessfulCapture ; 0xf4602
dba Music_Route26 ; 0xeefb2
dba Music_Mom ; 0xf6bf2
dba Music_VictoryRoad ; 0xf6c72
dba Music_PokemonLullaby ; 0xf6d79
dba Music_PokemonMarch ; 0xf6e23
dba Music_GoldSilverOpening ; 0xf7055
dba Music_GoldSilverOpening2 ; 0xf7308
dba Music_MainMenu ; 0xf78fd
dba Music_RuinsOfAlphInterior ; 0xebd9e
dba Music_RocketTheme ; 0xf766d
dba Music_DancingHall ; 0xef9bc
dba Music_ContestResults ; 0xefb3e
dba Music_BugCatchingContest ; 0xf7c16
dba Music_LakeOfRageRocketRadio ; 0xef5b1
dba Music_Printer ; 0xf07fd
dba Music_PostCredits ; 0xcfd9e
; Crystal adds the following songs:
dbw BANK(Music_Clair), Music_Clair ; 0x1fa8d
dbw BANK(Music_MobileAdapterMenu), Music_MobileAdapterMenu ; 0x17801f
dbw BANK(Music_MobileAdapter), Music_MobileAdapter ; 0x1fc87
dbw BANK(Music_BuenasPassword), Music_BuenasPassword ; 0x178153
dbw BANK(Music_LookMysticalMan), Music_LookMysticalMan ; 0x17843b
dbw BANK(Music_CrystalOpening), Music_CrystalOpening ; 0x1786e8
dbw BANK(Music_BattleTowerTheme), Music_BattleTowerTheme ; 0x178889
dbw BANK(Music_SuicuneBattle), Music_SuicuneBattle ; 0x178b81
dbw BANK(Music_BattleTowerLobby), Music_BattleTowerLobby ; 0x17948b
dbw BANK(Music_MobileCenter), Music_MobileCenter ; 0x17961d
dba Music_Clair ; 0x1fa8d
dba Music_MobileAdapterMenu ; 0x17801f
dba Music_MobileAdapter ; 0x1fc87
dba Music_BuenasPassword ; 0x178153
dba Music_LookMysticalMan ; 0x17843b
dba Music_CrystalOpening ; 0x1786e8
dba Music_BattleTowerTheme ; 0x178889
dba Music_SuicuneBattle ; 0x178b81
dba Music_BattleTowerLobby ; 0x17948b
dba Music_MobileCenter ; 0x17961d
; e91a3

View File

@ -1,212 +1,212 @@
; e927c
dbw BANK(Sfx_DexFanfare5079), Sfx_DexFanfare5079
dbw BANK(Sfx_Item), Sfx_Item
dbw BANK(Sfx_CaughtMon), Sfx_CaughtMon
dbw BANK(Sfx_PokeballsPlacedOnTable), Sfx_PokeballsPlacedOnTable
dbw BANK(Sfx_Potion), Sfx_Potion
dbw BANK(Sfx_FullHeal), Sfx_FullHeal
dbw BANK(Sfx_Menu), Sfx_Menu
dbw BANK(Sfx_ReadText), Sfx_ReadText
dbw BANK(Sfx_ReadText2), Sfx_ReadText2
dbw BANK(Sfx_DexFanfare2049), Sfx_DexFanfare2049
dbw BANK(Sfx_DexFanfare80109), Sfx_DexFanfare80109
dbw BANK(Sfx_Poison), Sfx_Poison
dbw BANK(Sfx_GotSafariBalls), Sfx_GotSafariBalls
dbw BANK(Sfx_BootPc), Sfx_BootPc
dbw BANK(Sfx_ShutDownPc), Sfx_ShutDownPc
dbw BANK(Sfx_ChoosePcOption), Sfx_ChoosePcOption
dbw BANK(Sfx_EscapeRope), Sfx_EscapeRope
dbw BANK(Sfx_PushButton), Sfx_PushButton
dbw BANK(Sfx_SecondPartOfItemfinder), Sfx_SecondPartOfItemfinder
dbw BANK(Sfx_WarpTo), Sfx_WarpTo
dbw BANK(Sfx_WarpFrom), Sfx_WarpFrom
dbw BANK(Sfx_ChangeDexMode), Sfx_ChangeDexMode
dbw BANK(Sfx_JumpOverLedge), Sfx_JumpOverLedge
dbw BANK(Sfx_GrassRustle), Sfx_GrassRustle
dbw BANK(Sfx_Fly), Sfx_Fly
dbw BANK(Sfx_Wrong), Sfx_Wrong
dbw BANK(Sfx_Squeak), Sfx_Squeak
dbw BANK(Sfx_Strength), Sfx_Strength
dbw BANK(Sfx_Boat), Sfx_Boat
dbw BANK(Sfx_WallOpen), Sfx_WallOpen
dbw BANK(Sfx_PlacePuzzlePieceDown), Sfx_PlacePuzzlePieceDown
dbw BANK(Sfx_EnterDoor), Sfx_EnterDoor
dbw BANK(Sfx_SwitchPokemon), Sfx_SwitchPokemon
dbw BANK(Sfx_Tally), Sfx_Tally
dbw BANK(Sfx_Transaction), Sfx_Transaction
dbw BANK(Sfx_ExitBuilding), Sfx_ExitBuilding
dbw BANK(Sfx_Bump), Sfx_Bump
dbw BANK(Sfx_Save), Sfx_Save
dbw BANK(Sfx_Pokeflute), Sfx_Pokeflute
dbw BANK(Sfx_ElevatorEnd), Sfx_ElevatorEnd
dbw BANK(Sfx_ThrowBall), Sfx_ThrowBall
dbw BANK(Sfx_BallPoof), Sfx_BallPoof
dbw BANK(Sfx_Unknown3A), Sfx_Unknown3A
dbw BANK(Sfx_Run), Sfx_Run
dbw BANK(Sfx_SlotMachineStart), Sfx_SlotMachineStart
dbw BANK(Sfx_Fanfare), Sfx_Fanfare
dbw BANK(Sfx_Peck), Sfx_Peck
dbw BANK(Sfx_Kinesis), Sfx_Kinesis
dbw BANK(Sfx_Lick), Sfx_Lick
dbw BANK(Sfx_Pound), Sfx_Pound
dbw BANK(Sfx_MovePuzzlePiece), Sfx_MovePuzzlePiece
dbw BANK(Sfx_CometPunch), Sfx_CometPunch
dbw BANK(Sfx_MegaPunch), Sfx_MegaPunch
dbw BANK(Sfx_Scratch), Sfx_Scratch
dbw BANK(Sfx_Vicegrip), Sfx_Vicegrip
dbw BANK(Sfx_RazorWind), Sfx_RazorWind
dbw BANK(Sfx_Cut), Sfx_Cut
dbw BANK(Sfx_WingAttack), Sfx_WingAttack
dbw BANK(Sfx_Whirlwind), Sfx_Whirlwind
dbw BANK(Sfx_Bind), Sfx_Bind
dbw BANK(Sfx_VineWhip), Sfx_VineWhip
dbw BANK(Sfx_DoubleKick), Sfx_DoubleKick
dbw BANK(Sfx_MegaKick), Sfx_MegaKick
dbw BANK(Sfx_Headbutt), Sfx_Headbutt
dbw BANK(Sfx_HornAttack), Sfx_HornAttack
dbw BANK(Sfx_Tackle), Sfx_Tackle
dbw BANK(Sfx_PoisonSting), Sfx_PoisonSting
dbw BANK(Sfx_Powder), Sfx_Powder
dbw BANK(Sfx_Doubleslap), Sfx_Doubleslap
dbw BANK(Sfx_Bite), Sfx_Bite
dbw BANK(Sfx_JumpKick), Sfx_JumpKick
dbw BANK(Sfx_Stomp), Sfx_Stomp
dbw BANK(Sfx_TailWhip), Sfx_TailWhip
dbw BANK(Sfx_KarateChop), Sfx_KarateChop
dbw BANK(Sfx_Submission), Sfx_Submission
dbw BANK(Sfx_WaterGun), Sfx_WaterGun
dbw BANK(Sfx_SwordsDance), Sfx_SwordsDance
dbw BANK(Sfx_Thunder), Sfx_Thunder
dbw BANK(Sfx_Supersonic), Sfx_Supersonic
dbw BANK(Sfx_Leer), Sfx_Leer
dbw BANK(Sfx_Ember), Sfx_Ember
dbw BANK(Sfx_Bubblebeam), Sfx_Bubblebeam
dbw BANK(Sfx_HydroPump), Sfx_HydroPump
dbw BANK(Sfx_Surf), Sfx_Surf
dbw BANK(Sfx_Psybeam), Sfx_Psybeam
dbw BANK(Sfx_Charge), Sfx_Charge
dbw BANK(Sfx_Thundershock), Sfx_Thundershock
dbw BANK(Sfx_Psychic), Sfx_Psychic
dbw BANK(Sfx_Screech), Sfx_Screech
dbw BANK(Sfx_BoneClub), Sfx_BoneClub
dbw BANK(Sfx_Sharpen), Sfx_Sharpen
dbw BANK(Sfx_EggBomb), Sfx_EggBomb
dbw BANK(Sfx_Sing), Sfx_Sing
dbw BANK(Sfx_HyperBeam), Sfx_HyperBeam
dbw BANK(Sfx_Shine), Sfx_Shine
dbw BANK(Sfx_Unknown5F), Sfx_Unknown5F
dbw BANK(Sfx_Unknown60), Sfx_Unknown60
dbw BANK(Sfx_Unknown61), Sfx_Unknown61
dbw BANK(Sfx_Unknown62), Sfx_Unknown62
dbw BANK(Sfx_Unknown63), Sfx_Unknown63
dbw BANK(Sfx_Burn), Sfx_Burn
dbw BANK(Sfx_TitleScreenEntrance), Sfx_TitleScreenEntrance
dbw BANK(Sfx_Unknown66), Sfx_Unknown66
dbw BANK(Sfx_GetCoinFromSlots), Sfx_GetCoinFromSlots
dbw BANK(Sfx_PayDay), Sfx_PayDay
dbw BANK(Sfx_Metronome), Sfx_Metronome
dbw BANK(Sfx_Call), Sfx_Call
dbw BANK(Sfx_HangUp), Sfx_HangUp
dbw BANK(Sfx_NoSignal), Sfx_NoSignal
dbw BANK(Sfx_Sandstorm), Sfx_Sandstorm
dbw BANK(Sfx_Elevator), Sfx_Elevator
dbw BANK(Sfx_Protect), Sfx_Protect
dbw BANK(Sfx_Sketch), Sfx_Sketch
dbw BANK(Sfx_RainDance), Sfx_RainDance
dbw BANK(Sfx_Aeroblast), Sfx_Aeroblast
dbw BANK(Sfx_Spark), Sfx_Spark
dbw BANK(Sfx_Curse), Sfx_Curse
dbw BANK(Sfx_Rage), Sfx_Rage
dbw BANK(Sfx_Thief), Sfx_Thief
dbw BANK(Sfx_Thief2), Sfx_Thief2
dbw BANK(Sfx_SpiderWeb), Sfx_SpiderWeb
dbw BANK(Sfx_MindReader), Sfx_MindReader
dbw BANK(Sfx_Nightmare), Sfx_Nightmare
dbw BANK(Sfx_Snore), Sfx_Snore
dbw BANK(Sfx_SweetKiss), Sfx_SweetKiss
dbw BANK(Sfx_SweetKiss2), Sfx_SweetKiss2
dbw BANK(Sfx_BellyDrum), Sfx_BellyDrum
dbw BANK(Sfx_Unknown7F), Sfx_Unknown7F
dbw BANK(Sfx_SludgeBomb), Sfx_SludgeBomb
dbw BANK(Sfx_Foresight), Sfx_Foresight
dbw BANK(Sfx_Spite), Sfx_Spite
dbw BANK(Sfx_Outrage), Sfx_Outrage
dbw BANK(Sfx_PerishSong), Sfx_PerishSong
dbw BANK(Sfx_GigaDrain), Sfx_GigaDrain
dbw BANK(Sfx_Attract), Sfx_Attract
dbw BANK(Sfx_Kinesis2), Sfx_Kinesis2
dbw BANK(Sfx_ZapCannon), Sfx_ZapCannon
dbw BANK(Sfx_MeanLook), Sfx_MeanLook
dbw BANK(Sfx_HealBell), Sfx_HealBell
dbw BANK(Sfx_Return), Sfx_Return
dbw BANK(Sfx_ExpBar), Sfx_ExpBar
dbw BANK(Sfx_MilkDrink), Sfx_MilkDrink
dbw BANK(Sfx_Present), Sfx_Present
dbw BANK(Sfx_MorningSun), Sfx_MorningSun
dbw BANK(Sfx_LevelUp), Sfx_LevelUp
dbw BANK(Sfx_KeyItem), Sfx_KeyItem
dbw BANK(Sfx_Fanfare2), Sfx_Fanfare2
dbw BANK(Sfx_RegisterPhoneNumber), Sfx_RegisterPhoneNumber
dbw BANK(Sfx_3RdPlace), Sfx_3RdPlace
dbw BANK(Sfx_GetEggFromDaycareMan), Sfx_GetEggFromDaycareMan
dbw BANK(Sfx_GetEggFromDaycareLady), Sfx_GetEggFromDaycareLady
dbw BANK(Sfx_MoveDeleted), Sfx_MoveDeleted
dbw BANK(Sfx_2ndPlace), Sfx_2ndPlace
dbw BANK(Sfx_1stPlace), Sfx_1stPlace
dbw BANK(Sfx_ChooseACard), Sfx_ChooseACard
dbw BANK(Sfx_GetTm), Sfx_GetTm
dbw BANK(Sfx_GetBadge), Sfx_GetBadge
dbw BANK(Sfx_QuitSlots), Sfx_QuitSlots
dbw BANK(Sfx_EggCrack), Sfx_EggCrack
dbw BANK(Sfx_DexFanfareLessThan20), Sfx_DexFanfareLessThan20
dbw BANK(Sfx_DexFanfare140169), Sfx_DexFanfare140169
dbw BANK(Sfx_DexFanfare170199), Sfx_DexFanfare170199
dbw BANK(Sfx_DexFanfare200229), Sfx_DexFanfare200229
dbw BANK(Sfx_DexFanfare230Plus), Sfx_DexFanfare230Plus
dbw BANK(Sfx_Evolved), Sfx_Evolved
dbw BANK(Sfx_MasterBall), Sfx_MasterBall
dbw BANK(Sfx_EggHatch), Sfx_EggHatch
dbw BANK(Sfx_GsIntroCharizardFireball), Sfx_GsIntroCharizardFireball
dbw BANK(Sfx_GsIntroPokemonAppears), Sfx_GsIntroPokemonAppears
dbw BANK(Sfx_Flash), Sfx_Flash
dbw BANK(Sfx_GameFreakLogoGs), Sfx_GameFreakLogoGs
dbw BANK(Sfx_NotVeryEffective), Sfx_NotVeryEffective
dbw BANK(Sfx_Damage), Sfx_Damage
dbw BANK(Sfx_SuperEffective), Sfx_SuperEffective
dbw BANK(Sfx_BallBounce), Sfx_BallBounce
dbw BANK(Sfx_Moonlight), Sfx_Moonlight
dbw BANK(Sfx_Encore), Sfx_Encore
dbw BANK(Sfx_BeatUp), Sfx_BeatUp
dbw BANK(Sfx_BatonPass), Sfx_BatonPass
dbw BANK(Sfx_BallWiggle), Sfx_BallWiggle
dbw BANK(Sfx_SweetScent), Sfx_SweetScent
dbw BANK(Sfx_SweetScent2), Sfx_SweetScent2
dbw BANK(Sfx_HitEndOfExpBar), Sfx_HitEndOfExpBar
dbw BANK(Sfx_GiveTrademon), Sfx_GiveTrademon
dbw BANK(Sfx_GetTrademon), Sfx_GetTrademon
dbw BANK(Sfx_TrainArrived), Sfx_TrainArrived
dbw BANK(Sfx_StopSlot), Sfx_StopSlot
dbw BANK(Sfx_2Boops), Sfx_2Boops
dbw BANK(Sfx_GlassTing), Sfx_GlassTing
dbw BANK(Sfx_GlassTing2), Sfx_GlassTing2
dba Sfx_DexFanfare5079
dba Sfx_Item
dba Sfx_CaughtMon
dba Sfx_PokeballsPlacedOnTable
dba Sfx_Potion
dba Sfx_FullHeal
dba Sfx_Menu
dba Sfx_ReadText
dba Sfx_ReadText2
dba Sfx_DexFanfare2049
dba Sfx_DexFanfare80109
dba Sfx_Poison
dba Sfx_GotSafariBalls
dba Sfx_BootPc
dba Sfx_ShutDownPc
dba Sfx_ChoosePcOption
dba Sfx_EscapeRope
dba Sfx_PushButton
dba Sfx_SecondPartOfItemfinder
dba Sfx_WarpTo
dba Sfx_WarpFrom
dba Sfx_ChangeDexMode
dba Sfx_JumpOverLedge
dba Sfx_GrassRustle
dba Sfx_Fly
dba Sfx_Wrong
dba Sfx_Squeak
dba Sfx_Strength
dba Sfx_Boat
dba Sfx_WallOpen
dba Sfx_PlacePuzzlePieceDown
dba Sfx_EnterDoor
dba Sfx_SwitchPokemon
dba Sfx_Tally
dba Sfx_Transaction
dba Sfx_ExitBuilding
dba Sfx_Bump
dba Sfx_Save
dba Sfx_Pokeflute
dba Sfx_ElevatorEnd
dba Sfx_ThrowBall
dba Sfx_BallPoof
dba Sfx_Unknown3A
dba Sfx_Run
dba Sfx_SlotMachineStart
dba Sfx_Fanfare
dba Sfx_Peck
dba Sfx_Kinesis
dba Sfx_Lick
dba Sfx_Pound
dba Sfx_MovePuzzlePiece
dba Sfx_CometPunch
dba Sfx_MegaPunch
dba Sfx_Scratch
dba Sfx_Vicegrip
dba Sfx_RazorWind
dba Sfx_Cut
dba Sfx_WingAttack
dba Sfx_Whirlwind
dba Sfx_Bind
dba Sfx_VineWhip
dba Sfx_DoubleKick
dba Sfx_MegaKick
dba Sfx_Headbutt
dba Sfx_HornAttack
dba Sfx_Tackle
dba Sfx_PoisonSting
dba Sfx_Powder
dba Sfx_Doubleslap
dba Sfx_Bite
dba Sfx_JumpKick
dba Sfx_Stomp
dba Sfx_TailWhip
dba Sfx_KarateChop
dba Sfx_Submission
dba Sfx_WaterGun
dba Sfx_SwordsDance
dba Sfx_Thunder
dba Sfx_Supersonic
dba Sfx_Leer
dba Sfx_Ember
dba Sfx_Bubblebeam
dba Sfx_HydroPump
dba Sfx_Surf
dba Sfx_Psybeam
dba Sfx_Charge
dba Sfx_Thundershock
dba Sfx_Psychic
dba Sfx_Screech
dba Sfx_BoneClub
dba Sfx_Sharpen
dba Sfx_EggBomb
dba Sfx_Sing
dba Sfx_HyperBeam
dba Sfx_Shine
dba Sfx_Unknown5F
dba Sfx_Unknown60
dba Sfx_Unknown61
dba Sfx_Unknown62
dba Sfx_Unknown63
dba Sfx_Burn
dba Sfx_TitleScreenEntrance
dba Sfx_Unknown66
dba Sfx_GetCoinFromSlots
dba Sfx_PayDay
dba Sfx_Metronome
dba Sfx_Call
dba Sfx_HangUp
dba Sfx_NoSignal
dba Sfx_Sandstorm
dba Sfx_Elevator
dba Sfx_Protect
dba Sfx_Sketch
dba Sfx_RainDance
dba Sfx_Aeroblast
dba Sfx_Spark
dba Sfx_Curse
dba Sfx_Rage
dba Sfx_Thief
dba Sfx_Thief2
dba Sfx_SpiderWeb
dba Sfx_MindReader
dba Sfx_Nightmare
dba Sfx_Snore
dba Sfx_SweetKiss
dba Sfx_SweetKiss2
dba Sfx_BellyDrum
dba Sfx_Unknown7F
dba Sfx_SludgeBomb
dba Sfx_Foresight
dba Sfx_Spite
dba Sfx_Outrage
dba Sfx_PerishSong
dba Sfx_GigaDrain
dba Sfx_Attract
dba Sfx_Kinesis2
dba Sfx_ZapCannon
dba Sfx_MeanLook
dba Sfx_HealBell
dba Sfx_Return
dba Sfx_ExpBar
dba Sfx_MilkDrink
dba Sfx_Present
dba Sfx_MorningSun
dba Sfx_LevelUp
dba Sfx_KeyItem
dba Sfx_Fanfare2
dba Sfx_RegisterPhoneNumber
dba Sfx_3RdPlace
dba Sfx_GetEggFromDaycareMan
dba Sfx_GetEggFromDaycareLady
dba Sfx_MoveDeleted
dba Sfx_2ndPlace
dba Sfx_1stPlace
dba Sfx_ChooseACard
dba Sfx_GetTm
dba Sfx_GetBadge
dba Sfx_QuitSlots
dba Sfx_EggCrack
dba Sfx_DexFanfareLessThan20
dba Sfx_DexFanfare140169
dba Sfx_DexFanfare170199
dba Sfx_DexFanfare200229
dba Sfx_DexFanfare230Plus
dba Sfx_Evolved
dba Sfx_MasterBall
dba Sfx_EggHatch
dba Sfx_GsIntroCharizardFireball
dba Sfx_GsIntroPokemonAppears
dba Sfx_Flash
dba Sfx_GameFreakLogoGs
dba Sfx_NotVeryEffective
dba Sfx_Damage
dba Sfx_SuperEffective
dba Sfx_BallBounce
dba Sfx_Moonlight
dba Sfx_Encore
dba Sfx_BeatUp
dba Sfx_BatonPass
dba Sfx_BallWiggle
dba Sfx_SweetScent
dba Sfx_SweetScent2
dba Sfx_HitEndOfExpBar
dba Sfx_GiveTrademon
dba Sfx_GetTrademon
dba Sfx_TrainArrived
dba Sfx_StopSlot
dba Sfx_2Boops
dba Sfx_GlassTing
dba Sfx_GlassTing2
; Crystal adds the following SFX:
dbw BANK(Sfx_IntroUnown1), Sfx_IntroUnown1
dbw BANK(Sfx_IntroUnown2), Sfx_IntroUnown2
dbw BANK(Sfx_IntroUnown3), Sfx_IntroUnown3
dbw BANK(Sfx_DittoPopUp), Sfx_DittoPopUp
dbw BANK(Sfx_DittoTransform), Sfx_DittoTransform
dbw BANK(Sfx_IntroSuicune1), Sfx_IntroSuicune1
dbw BANK(Sfx_IntroPichu), Sfx_IntroPichu
dbw BANK(Sfx_IntroSuicune2), Sfx_IntroSuicune2
dbw BANK(Sfx_IntroSuicune3), Sfx_IntroSuicune3
dbw BANK(Sfx_DittoBounce), Sfx_DittoBounce
dbw BANK(Sfx_IntroSuicune4), Sfx_IntroSuicune4
dbw BANK(Sfx_GameFreakPresents), Sfx_GameFreakPresents
dbw BANK(Sfx_Tingle), Sfx_Tingle
dbw BANK(Sfx_UnknownCB), Sfx_UnknownCB
dbw BANK(Sfx_TwoPcBeeps), Sfx_TwoPcBeeps
dbw BANK(Sfx_4NoteDitty), Sfx_4NoteDitty
dbw BANK(Sfx_Twinkle), Sfx_Twinkle
dba Sfx_IntroUnown1
dba Sfx_IntroUnown2
dba Sfx_IntroUnown3
dba Sfx_DittoPopUp
dba Sfx_DittoTransform
dba Sfx_IntroSuicune1
dba Sfx_IntroPichu
dba Sfx_IntroSuicune2
dba Sfx_IntroSuicune3
dba Sfx_DittoBounce
dba Sfx_IntroSuicune4
dba Sfx_GameFreakPresents
dba Sfx_Tingle
dba Sfx_UnknownCB
dba Sfx_TwoPcBeeps
dba Sfx_4NoteDitty
dba Sfx_Twinkle
; e94e9

View File

@ -16,7 +16,7 @@ AI_SwitchOrTryItem: ; 38000
bit SUBSTATUS_CANT_RUN, a
jr nz, DontSwitch
ld a, [wc731]
ld a, [wEnemyWrapCount]
and a
jr nz, DontSwitch
@ -44,15 +44,15 @@ DontSwitch: ; 38041
; 38045
SwitchOften: ; 38045
callab Function34941
ld a, [wc717]
callab CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
cp $10
jr nz, .not_10
call Random
cp $80
cp 1 + 50 percent
jr c, .switch
jp DontSwitch
.not_10
@ -60,35 +60,35 @@ SwitchOften: ; 38045
cp $20
jr nz, .not_20
call Random
cp 200
cp -1 + 79 percent
jr c, .switch
jp DontSwitch
.not_20
; $30
call Random
cp 10
cp 4 percent
jp c, DontSwitch
.switch
ld a, [wc717]
ld a, [wEnemySwitchMonParam]
and $f
inc a
; In register 'a' is the number (1-6) of the Pkmn to switch to
ld [wc718], a
ld [wEnemySwitchMonIndex], a
jp AI_TrySwitch
; 38083
SwitchRarely: ; 38083
callab Function34941
ld a, [wc717]
callab CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
cp $10
jr nz, .not_10
call Random
cp 20
cp 8 percent
jr c, .switch
jp DontSwitch
.not_10
@ -96,34 +96,34 @@ SwitchRarely: ; 38083
cp $20
jr nz, .not_20
call Random
cp 30
cp 12 percent
jr c, .switch
jp DontSwitch
.not_20
; $30
call Random
cp 200
cp -1 + 79 percent
jp c, DontSwitch
.switch
ld a, [wc717]
ld a, [wEnemySwitchMonParam]
and $f
inc a
ld [wc718], a
ld [wEnemySwitchMonIndex], a
jp AI_TrySwitch
; 380c1
SwitchSometimes: ; 380c1
callab Function34941
ld a, [wc717]
callab CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
cp $10
jr nz, .not_10
call Random
cp 50
cp -1 + 20 percent
jr c, .switch
jp DontSwitch
.not_10
@ -131,21 +131,21 @@ SwitchSometimes: ; 380c1
cp $20
jr nz, .not_20
call Random
cp $80
cp 1 + 50 percent
jr c, .switch
jp DontSwitch
.not_20
; $30
call Random
cp 50
cp -1 + 20 percent
jp c, DontSwitch
.switch
ld a, [wc717]
ld a, [wEnemySwitchMonParam]
and $f
inc a
ld [wc718], a
ld [wEnemySwitchMonIndex], a
jp AI_TrySwitch
; 380ff
@ -163,9 +163,9 @@ AI_TryItem: ; 38105
and a
ret nz
ld a, [wc650]
ld a, [wEnemyTrainerItem1]
ld b, a
ld a, [wc651]
ld a, [wEnemyTrainerItem2]
or b
ret z
@ -180,7 +180,7 @@ AI_TryItem: ; 38105
ld b, h
ld c, l
ld hl, AI_Items
ld de, wc650
ld de, wEnemyTrainerItem1
.loop
ld a, [hl]
and a
@ -225,7 +225,7 @@ endr
xor a
ld [de], a
inc a
ld [wc70f], a
ld [wEnemyGoesFirst], a
ld hl, EnemySubStatus3
res SUBSTATUS_BIDE, [hl]
@ -233,7 +233,7 @@ endr
xor a
ld [EnemyFuryCutterCount], a
ld [EnemyProtectCount], a
ld [wc72c], a
ld [wEnemyRageCounter], a
ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl]
@ -250,7 +250,7 @@ endr
ld d, a
ld e, 0
ld hl, OTPartyMon1Level
ld bc, OTPartyMon2 - OTPartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
.next
ld a, [hl]
cp e
@ -314,7 +314,7 @@ AI_Items: ; 39196
bit ALWAYS_USE_F, a
jp nz, .Use
call Random
cp 50
cp -1 + 20 percent
jp c, .Use
jp .DontUse
@ -326,7 +326,7 @@ AI_Items: ; 39196
cp 4
jr c, .FailToxicCheck
call Random
cp $80
cp 1 + 50 percent
jp c, .Use
.FailToxicCheck
ld a, [EnemyMonStatus]
@ -367,7 +367,7 @@ AI_Items: ; 39196
callab AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp $80
cp 1 + 50 percent
jp c, .UseHealItem
jp .DontUse
@ -375,7 +375,7 @@ AI_Items: ; 39196
callab AICheckEnemyQuarterHP
jp c, .DontUse
call Random
cp $32
cp -1 + 20 percent
jp c, .DontUse
jr .UseHealItem
@ -385,7 +385,7 @@ AI_Items: ; 39196
callab AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp $32
cp -1 + 20 percent
jp nc, .DontUse
.UseHealItem: ; 38281 (e:4281)
@ -418,44 +418,44 @@ AI_Items: ; 39196
.asm_382ae: ; This appears to be unused
callab AICheckEnemyMaxHP
jr c, .asm_382e4
jr c, .dont_use
push bc
ld de, EnemyMonMaxHP + 1
ld hl, EnemyMonHP + 1
ld a, [de]
sub [hl]
jr z, .asm_382e7
jr z, .check_40_percent
dec hl
dec de
ld c, a
sbc [hl]
and a
jr nz, .asm_382e7
jr nz, .check_40_percent
ld a, c
cp b
jp c, .asm_382d5
jp c, .check_50_percent
callab AICheckEnemyQuarterHP
jr c, .asm_382e7
jr c, .check_40_percent
.asm_382d5
.check_50_percent
pop bc
ld a, [bc]
bit UNKNOWN_USE_F, a
jp z, .Use
call Random
cp $80
cp 1 + 50 percent
jp c, .Use
.asm_382e4
.dont_use
jp .DontUse
.asm_382e7
.check_40_percent
pop bc
ld a, [bc]
bit UNKNOWN_USE_F, a
jp z, .DontUse
call Random
cp $64
cp 1 + 39 percent
jp c, .Use
jp .DontUse
; 382f9
@ -517,13 +517,13 @@ AI_Items: ; 39196
bit ALWAYS_USE_F, a
jp nz, .Use
call Random
cp $80
cp 1 + 50 percent
jp c, .DontUse
ld a, [bc]
bit CONTEXT_USE_F, a
jp nz, .Use
call Random
cp $80
cp 1 + 50 percent
jp c, .DontUse
jp .Use
.notfirstturnout
@ -531,7 +531,7 @@ AI_Items: ; 39196
bit ALWAYS_USE_F, a
jp z, .DontUse
call Random
cp $32
cp -1 + 20 percent
jp nc, .DontUse
jp .Use
@ -665,7 +665,7 @@ EnemyPotionFinish: ; 38436
xor a
ld [wd10a], a
call AIUsedItemSound
predef Functionc6e0
predef AnimateHPBar
jp AIUpdateHUD
@ -685,7 +685,7 @@ AI_TrySwitch: ; 3844b
inc d
.fainted
push bc
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
dec c
@ -701,16 +701,17 @@ AI_TrySwitch: ; 3844b
AI_Switch: ; 3846c
ld a, $1
ld [wEnemyIsSwitching], a
ld [wc70f], a
ld [wEnemyGoesFirst], a
ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl]
xor a
ld [hBattleTurn], a
callab Function3dc5b
callab PursuitSwitch
push af
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld d, h
ld e, l
@ -718,18 +719,20 @@ AI_Switch: ; 3846c
ld bc, $0004
call CopyBytes
pop af
jr c, .skiptext
ld hl, TextJump_EnemyWithdrew
call PrintText
.skiptext
ld a, $1
ld a, 1
ld [wd264], a
callab NewEnemyMonStatus
callab ResetEnemyStatLevels
ld hl, PlayerSubStatus1
res SUBSTATUS_IN_LOVE, [hl]
callba Function3d4e1
callba Function3d57a
callba EnemySwitch
callba ResetBattleParticipants
xor a
ld [wd264], a
ld a, [wLinkMode]
@ -754,7 +757,7 @@ Function384d5: ; This appears to be unused
AI_HealStatus: ; 384e0
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
xor a
ld [hl], a

View File

@ -176,7 +176,7 @@ AI_Types: ; 38635
push de
ld a, 1
ld [hBattleTurn], a
callab HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callab BattleCheckTypeMatchup
pop de
pop bc
pop hl
@ -431,7 +431,7 @@ AI_Smart_LeechHit: ; 387f7
push hl
ld a, 1
ld [hBattleTurn], a
callab HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callab BattleCheckTypeMatchup
pop hl
; 60% chance to discourage this move if not very effective.
@ -512,7 +512,7 @@ AI_Smart_LockOn: ; 3881d
push hl
push bc
callba HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callba BattleCheckTypeMatchup
ld a, [wd265]
cp $a
pop bc
@ -576,7 +576,7 @@ AI_Smart_Explosion: ; 388a6
; Unless this is the enemy's last Pokemon...
push hl
callba CountEnemyAliveMons
callba FindAliveEnemyMons
pop hl
jr nc, .asm_388b7
@ -981,7 +981,7 @@ AI_Smart_Whirlwind: ; 38a2a
; Consider player's type(s) if its moves are unknown.
push hl
callab Function3484e
callab CheckPlayerMoveTypeMatchups
ld a, [wc716]
cp 10 ; neutral
pop hl
@ -1062,7 +1062,7 @@ AI_Smart_Bind: ; 38a71
; Bind, Wrap, Fire Spin, Clamp
; 50% chance to discourage this move if the player is already trapped.
ld a, [wc730]
ld a, [wPlayerWrapCount]
and a
jr nz, .asm_38a8b
@ -1343,11 +1343,11 @@ AI_Smart_Rage: ; 38b7f
; Encourage this move based on Rage's counter.
.asm_38b8c
ld a, [wc72c]
ld a, [wEnemyRageCounter]
cp $2
ret c
dec [hl]
ld a, [wc72c]
ld a, [wEnemyRageCounter]
cp $3
ret c
dec [hl]
@ -1384,7 +1384,7 @@ AI_Smart_Mimic: ; 38ba8
ld a, $1
ld [hBattleTurn], a
callab HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callab BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@ -1504,7 +1504,7 @@ AI_Smart_Encore: ; 38c3b
push hl
ld a, [wEnemyMoveStruct + MOVE_TYPE]
ld hl, EnemyMonType1
predef Function347d3
predef CheckTypeMatchup
pop hl
ld a, [wd265]
@ -1719,7 +1719,7 @@ AI_Smart_HealBell: ; 38d1f
ld b, a
ld c, 0
ld hl, OTPartyMon1HP
ld de, OTPartyMon2 - OTPartyMon1
ld de, PARTYMON_STRUCT_LENGTH
.loop
push hl
@ -1783,8 +1783,8 @@ AI_Smart_PriorityHit: ; 38d5a
ld [hBattleTurn], a
push hl
callab EnemyAttackDamage
callab BattleCommand_DamageCalcWithStats
callab BattleCommand_CalcDamageTypeMultiplier
callab BattleCommand_DamageCalc
callab BattleCommand_Stab
pop hl
ld a, [CurDamage + 1]
ld c, a
@ -1830,7 +1830,7 @@ AI_Smart_Conversion2: ; 38d98
xor a
ld [hBattleTurn], a
callab HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callab BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@ -1908,7 +1908,7 @@ AI_Smart_MeanLook: ; 38dfb
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl
callab Function3484e
callab CheckPlayerMoveTypeMatchups
ld a, [wc716]
cp $b ; not very effective
pop hl
@ -1933,7 +1933,7 @@ AICheckLastPlayerMon: ; 38e2e
ld b, a
ld c, 0
ld hl, PartyMon1HP
ld de, PartyMon2 - PartyMon1
ld de, PARTYMON_STRUCT_LENGTH
.loop
ld a, [CurBattleMon]
@ -2028,7 +2028,7 @@ endr
jp nz, AIDiscourageMove
push hl
callba CountEnemyAliveMons
callba FindAliveEnemyMons
pop hl
jr nc, .asm_38eb0
@ -2160,7 +2160,7 @@ endr
AI_Smart_PerishSong: ; 38f4a
push hl
callab CountEnemyAliveMons
callab FindAliveEnemyMons
pop hl
jr c, .no
@ -2169,7 +2169,7 @@ AI_Smart_PerishSong: ; 38f4a
jr nz, .yes
push hl
callab Function3484e
callab CheckPlayerMoveTypeMatchups
ld a, [wc716]
cp 10 ; 1.0
pop hl
@ -2431,7 +2431,7 @@ AI_Smart_BatonPass: ; 39062
; Consider player's type(s) if its moves are unknown.
push hl
callab Function3484e
callab CheckPlayerMoveTypeMatchups
ld a, [wc716]
cp 10 ; neutral
pop hl
@ -2466,7 +2466,7 @@ AI_Smart_RapidSpin: ; 39084
; 80% chance to greatly encourage this move if the enemy is
; trapped (Bind effect), seeded, or scattered with spikes.
ld a, [wc731]
ld a, [wEnemyWrapCount]
and a
jr nz, .asm_39097
@ -2496,7 +2496,7 @@ AI_Smart_HiddenPower: ; 3909e
; Calculate Hidden Power's type and base power based on enemy's DVs.
callab HiddenPowerDamage
callab HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callab BattleCheckTypeMatchup
pop hl
; Discourage Hidden Power if not very effective.
@ -2859,7 +2859,7 @@ endr
AI_Smart_Stomp: ; 39200
; 80% chance to encourage this move if the player has used Minimize.
ld a, [wc6fe]
ld a, [wPlayerMinimized]
and a
ret z
@ -3375,13 +3375,13 @@ AIDamageCalc: ; 393e7
ld hl, .ConstantDamageEffects
call IsInArray
jr nc, .asm_39400
callab BattleCommand3f
callab BattleCommand_ConstantDamage
ret
.asm_39400
callab EnemyAttackDamage
callab BattleCommand_DamageCalcWithStats
callab BattleCommand_CalcDamageTypeMultiplier
callab BattleCommand_DamageCalc
callab BattleCommand_Stab
ret
.ConstantDamageEffects
@ -3498,7 +3498,7 @@ AI_Status: ; 39453
push de
ld a, 1
ld [hBattleTurn], a
callab HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
callab BattleCheckTypeMatchup
pop de
pop bc
pop hl

666
battle/ai/switch.asm Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -946,14 +946,14 @@ endr
Functioncd249: ; cd249 (33:5249)
ld hl, Unknown_cd26c
ld a, [rSVBK] ; $ff00+$70
ld a, [rSVBK]
push af
ld a, $1
ld [rSVBK], a ; $ff00+$70
ld [rSVBK], a
ld a, [CurItem] ; CurItem
ld e, a
pop af
ld [rSVBK], a ; $ff00+$70
ld [rSVBK], a
.asm_cd25a
ld a, [hli]
cp $ff
@ -1694,7 +1694,7 @@ Jumptable_cd66d: ; cd66d (33:566d)
Functioncd677: ; cd677 (33:5677)
call Functionce72c
ld a, $42
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
ld a, $58
ld [hLCDStatCustom + 1], a
ld a, $5e
@ -1753,7 +1753,7 @@ Functioncd6c6: ; cd6c6 (33:56c6)
cp $70
jr c, asm_cd6da
xor a
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
ld [hLCDStatCustom + 1], a
ld [hLCDStatCustom + 2], a
@ -2839,7 +2839,7 @@ Jumptable_cdcc6: ; cdcc6 (33:5cc6)
Functioncdcca: ; cdcca (33:5cca)
ld a, [hBattleTurn] ; $ff00+$e4
ld a, [hBattleTurn]
and a
jr z, .asm_cdcd9
ld hl, $b
@ -3842,7 +3842,7 @@ Jumptable_ce258: ; ce258 (33:6258)
Functionce260: ; ce260 (33:6260)
call Functionce72c
ld a, [hBattleTurn] ; $ff00+$e4
ld a, [hBattleTurn]
and a
jr nz, .asm_ce26c
ld a, $f0
@ -3893,7 +3893,7 @@ Functionce29f: ; ce29f (33:629f)
srl a
ld e, a
ld d, $0
ld a, [hSGB] ; $ff00+$e7
ld a, [hSGB]
and a
jr nz, .asm_ce2b6
ld hl, Unknown_ce2c4
@ -4949,7 +4949,7 @@ endr
ld l, a
pop de
push bc
call Functione73
call DecompressRequest2bpp
pop bc
ret
; ce85e (33:685e)

View File

@ -255,6 +255,7 @@ BattleAnimations:: ; c906f
dw BattleAnim_253
dw BattleAnim_254
dw BattleAnim_SweetScent2
; $100
dw BattleAnim_ThrowPokeBall
dw BattleAnim_SendOutMon
dw BattleAnim_ReturnMon
@ -302,10 +303,11 @@ BattleAnim_SweetScent2: ; c929c
; c92c1
BattleAnim_ThrowPokeBall: ; c92c1
anim_jumpif $0, BattleAnim_ThrowPokeBall_branch_c92f2
anim_jumpif $1, BattleAnim_ThrowPokeBall_branch_c9347
anim_jumpif $2, BattleAnim_ThrowPokeBall_branch_c9305
anim_jumpif $4, BattleAnim_ThrowPokeBall_branch_c9326
anim_jumpif NO_ITEM, .TheTrainerBlockedTheBall
anim_jumpif MASTER_BALL, .MasterBall
anim_jumpif ULTRA_BALL, .UltraBall
anim_jumpif GREAT_BALL, .GreatBall
; any other ball
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
anim_sound $1a, SFX_THROW_BALL
anim_obj $15, 68, 92, $40
@ -316,10 +318,10 @@ BattleAnim_ThrowPokeBall: ; c92c1
anim_sound $1, SFX_BALL_POOF
anim_obj $1c, 136, 64, $10
anim_wait 16
anim_jump BattleAnim_ThrowPokeBall_branch_c9392
anim_jump .Shake
; c92f2
BattleAnim_ThrowPokeBall_branch_c92f2: ; c92f2
.TheTrainerBlockedTheBall: ; c92f2
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT
anim_sound $1a, SFX_THROW_BALL
anim_obj $16, 64, 92, $20
@ -329,7 +331,7 @@ BattleAnim_ThrowPokeBall_branch_c92f2: ; c92f2
anim_ret
; c9305
BattleAnim_ThrowPokeBall_branch_c9305: ; c9305
.UltraBall: ; c9305
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
anim_sound $1a, SFX_THROW_BALL
anim_obj $15, 68, 92, $40
@ -340,10 +342,10 @@ BattleAnim_ThrowPokeBall_branch_c9305: ; c9305
anim_sound $1, SFX_BALL_POOF
anim_obj $1c, 136, 64, $10
anim_wait 16
anim_jump BattleAnim_ThrowPokeBall_branch_c9392
anim_jump .Shake
; c9326
BattleAnim_ThrowPokeBall_branch_c9326: ; c9326
.GreatBall: ; c9326
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
anim_sound $1a, SFX_THROW_BALL
anim_obj $15, 68, 92, $40
@ -354,10 +356,10 @@ BattleAnim_ThrowPokeBall_branch_c9326: ; c9326
anim_sound $1, SFX_BALL_POOF
anim_obj $1c, 136, 64, $10
anim_wait 16
anim_jump BattleAnim_ThrowPokeBall_branch_c9392
anim_jump .Shake
; c9347
BattleAnim_ThrowPokeBall_branch_c9347: ; c9347
.MasterBall: ; c9347
anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED
anim_sound $1a, SFX_THROW_BALL
anim_obj $15, 64, 92, $20
@ -378,7 +380,7 @@ BattleAnim_ThrowPokeBall_branch_c9347: ; c9347
anim_obj $2b, 136, 56, $36
anim_obj $2b, 136, 56, $37
anim_wait 64
BattleAnim_ThrowPokeBall_branch_c9392: ; c9392
.Shake: ; c9392
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
anim_wait 8
anim_incobj $2
@ -392,22 +394,22 @@ BattleAnim_ThrowPokeBall_branch_c9392: ; c9392
anim_wait 32
anim_wait 8
anim_setvar $0
BattleAnim_ThrowPokeBall_branch_c93aa: ; c93aa
.Loop: ; c93aa
anim_wait 48
anim_checkpokeball
anim_jumpvar $1, BattleAnim_ThrowPokeBall_branch_c93bc
anim_jumpvar $2, BattleAnim_ThrowPokeBall_branch_c93be
anim_jumpvar $1, .Click
anim_jumpvar $2, .BreakFree
anim_incobj $1
anim_sound $1, SFX_BALL_WIGGLE
anim_jump BattleAnim_ThrowPokeBall_branch_c93aa
anim_jump .Loop
; c93bc
BattleAnim_ThrowPokeBall_branch_c93bc: ; c93bc
.Click: ; c93bc
anim_clearsprites
anim_ret
; c93be
BattleAnim_ThrowPokeBall_branch_c93be: ; c93be
.BreakFree: ; c93be
anim_setobj $1, $b
anim_sound $1, SFX_BALL_POOF
anim_obj $1c, 136, 64, $10

View File

@ -343,14 +343,14 @@ Functionc81c0: ; c81c0 (32:41c0)
call ClearBox
pop bc
xor a
ld [hBGMapThird], a ; $ff00+$d5
ld [hBGMapThird], a
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
ret
Functionc81e3: ; c81e3 (32:41e3)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
call EndBattleBGEffect
ret
@ -441,13 +441,13 @@ Functionc825a: ; c825a (32:425a)
.asm_c8271
call ClearBox
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
pop bc
ret
Functionc827a: ; c827a (32:427a)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
call EndBattleBGEffect
ret
@ -507,13 +507,13 @@ Functionc82c7: ; c82c7 (32:42c7)
.asm_c82de
call ClearBox
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
pop bc
ret
Functionc82e7: ; c82e7 (32:42e7)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
call EndBattleBGEffect
ret
@ -595,9 +595,9 @@ Functionc831d: ; c831d (32:431d)
jr nz, .asm_c8344
.asm_c8355
xor a
ld [hBGMapThird], a ; $ff00+$d5
ld [hBGMapThird], a
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
call Functionc80e5
ld hl, $3
add hl, bc
@ -606,7 +606,7 @@ Functionc831d: ; c831d (32:431d)
Functionc8365: ; c8365 (32:4365)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
ld hl, $3
add hl, bc
ld a, [hl]
@ -723,7 +723,7 @@ endr
.asm_c841d
call Functionc80e5
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
ret
.asm_c8425
call Functionc843b
@ -731,7 +731,7 @@ endr
Functionc842a: ; c842a (32:442a)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
ld hl, $1
add hl, bc
ld [hl], $0
@ -739,7 +739,7 @@ Functionc842a: ; c842a (32:442a)
Functionc8434: ; c8434 (32:4434)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapMode], a
call EndBattleBGEffect
ret
@ -902,7 +902,7 @@ Functionc854e: ; c854e (32:454e)
call Functionc8f69
Functionc8557: ; c8557 (32:4557)
ld a, [hLCDStatCustom] ; $ff00+$c6
ld a, [hLCDStatCustom]
and a
ret z
push bc
@ -967,7 +967,7 @@ Functionc85a2: ; c85a2 (32:45a2)
call Functionc80e5
call Functionc8eca
ld a, $42
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
xor a
ld [hLCDStatCustom + 1], a
ld a, $5e
@ -1042,7 +1042,7 @@ Functionc8610: ; c8610 (32:4610)
call Functionc80e5
call Functionc8eca
ld a, $43
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
xor a
ld [hLCDStatCustom + 1], a
ld a, $5f
@ -1530,7 +1530,7 @@ Functionc88a5: ; c88a5 (32:48a5)
sub d
ld d, a
ld h, LYOverridesBackup / $100
ld a, [hSCY] ; $ff00+$d0
ld a, [hSCY]
or a
jr nz, .asm_c88d0
ld a, [hLCDStatCustom + 1]
@ -1546,7 +1546,7 @@ Functionc88a5: ; c88a5 (32:48a5)
ld l, a
ld [hl], $0
.asm_c88d6
ld a, [hSCY] ; $ff00+$d0
ld a, [hSCY]
ld l, a
ld a, [hLCDStatCustom + 1]
sub l
@ -1953,7 +1953,7 @@ Functionc8ae5: ; c8ae5 (32:4ae5)
ret
Functionc8b00: ; c8b00 (32:4b00)
ld a, [hCGB] ; $ff00+$e6
ld a, [hCGB]
and a
jr nz, asm_c8b7a
call Functionc80d7 ; ; ; call does not return
@ -1969,7 +1969,7 @@ Functionc8b0e: ; c8b0e (32:4b0e)
ld a, $e4
call Functionc8ecb
ld a, $47
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
xor a
ld [hLCDStatCustom + 1], a
ld a, $60
@ -2266,7 +2266,7 @@ Functionc8cab: ; c8cab (32:4cab)
call Functionc80e5
call Functionc8eca
ld a, $43
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
xor a
ld [hLCDStatCustom + 1], a
ld a, $37
@ -2307,7 +2307,7 @@ Functionc8ce1: ; c8ce1 (32:4ce1)
push af
call DelayFrame
pop af
ld [hSCY], a ; $ff00+$d0
ld [hSCY], a
xor $ff
inc a
ld [OTPartyMon3SpclAtk], a
@ -2318,7 +2318,7 @@ Functionc8cf9: ; c8cf9 (32:4cf9)
jr nc, .asm_c8cff
xor a
.asm_c8cff
ld [hSCX], a ; $ff00+$cf
ld [hSCX], a
ret
Functionc8d02: ; c8d02 (32:4d02)
@ -2326,7 +2326,7 @@ Functionc8d02: ; c8d02 (32:4d02)
jr nc, .asm_c8d08
xor a
.asm_c8d08
ld [hSCY], a ; $ff00+$d0
ld [hSCY], a
ret
Functionc8d0b: ; c8d0b (32:4d0b)
@ -2373,7 +2373,7 @@ Functionc8d3a: ; c8d3a (32:4d3a)
jr nc, .asm_c8d53
ld d, $6
call Functionc905d
ld [hSCX], a ; $ff00+$cf
ld [hSCX], a
ld hl, $3
add hl, bc
ld a, [hl]
@ -2382,7 +2382,7 @@ Functionc8d3a: ; c8d3a (32:4d3a)
ret
.asm_c8d53
xor a
ld [hSCX], a ; $ff00+$cf
ld [hSCX], a
ret
Functionc8d57: ; c8d57 (32:4d57)
@ -2410,7 +2410,7 @@ Functionc8d57: ; c8d57 (32:4d57)
ret
Functionc8d77: ; c8d77 (32:4d77)
ld a, [hCGB] ; $ff00+$e6
ld a, [hCGB]
and a
jr nz, asm_c8dd4
push de
@ -2469,7 +2469,7 @@ Functionc8daa: ; c8daa (32:4daa)
Functionc8dc9: ; c8dc9 (32:4dc9)
call Functionc8f19
ld a, $e4
ld [rBGP], a ; $ff00+$47
ld [rBGP], a
call EndBattleBGEffect
ret
asm_c8dd4: ; c8dd4 (32:4dd4)
@ -2563,15 +2563,15 @@ Functionc8e49: ; c8e49 (32:4e49)
Functionc8e52: ; c8e52 (32:4e52)
ld h, a
ld a, [rSVBK] ; $ff00+$70
ld a, [rSVBK]
push af
ld a, $5
ld [rSVBK], a ; $ff00+$70
ld [rSVBK], a
ld a, h
push bc
push af
ld hl, BGPals ; BGPals
ld de, Unkn1Pals ; wd000
ld de, wMapPals ; wd000
ld b, a
ld c, $1
call CopyPals
@ -2583,22 +2583,22 @@ Functionc8e52: ; c8e52 (32:4e52)
call CopyPals
pop bc
pop af
ld [rSVBK], a ; $ff00+$70
ld [rSVBK], a
ld a, $1
ld [hCGBPalUpdate], a ; $ff00+$e5
ld [hCGBPalUpdate], a
ret
Functionc8e7f: ; c8e7f (32:4e7f)
ld h, a
ld a, [rSVBK] ; $ff00+$70
ld a, [rSVBK]
push af
ld a, $5
ld [rSVBK], a ; $ff00+$70
ld [rSVBK], a
ld a, h
push bc
push af
ld hl, BGPals + 8
ld de, Unkn1Pals + 8
ld de, wMapPals + 8
ld b, a
ld c, $1
call CopyPals
@ -2610,9 +2610,9 @@ Functionc8e7f: ; c8e7f (32:4e7f)
call CopyPals
pop bc
pop af
ld [rSVBK], a ; $ff00+$70
ld [rSVBK], a
ld a, $1
ld [hCGBPalUpdate], a ; $ff00+$e5
ld [hCGBPalUpdate], a
ret
Functionc8eac: ; c8eac (32:4eac)
@ -2660,7 +2660,7 @@ Functionc8ecb: ; c8ecb (32:4ecb)
ret
Functionc8ede: ; c8ede (32:4ede)
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
call Functionc9038
jr nz, .asm_c8eea
ld de, $36
@ -2675,7 +2675,7 @@ Functionc8ede: ; c8ede (32:4ede)
ret
Functionc8ef4: ; c8ef4 (32:4ef4)
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
call Functionc9038
jr nz, .asm_c8f00
ld de, $36
@ -2695,15 +2695,15 @@ Functionc8f0a: ; c8f0a (32:4f0a)
ld [hLCDStatCustom + 2], a
call Functionc8eca
xor a
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
call EndBattleBGEffect
ret
Functionc8f19: ; c8f19 (32:4f19)
xor a
ld [hLCDStatCustom], a ; $ff00+$c6
ld [hLCDStatCustom], a
ld a, $e4
ld [rBGP], a ; $ff00+$47
ld [rBGP], a
ld [wcfc7], a
ld [wcfc9], a
ld [hLCDStatCustom + 1], a
@ -2902,7 +2902,7 @@ Functionc901b: ; c901b (32:501b)
Functionc9038: ; c9038 (32:5038)
ld hl, $2
add hl, bc
ld a, [hBattleTurn] ; $ff00+$e4
ld a, [hBattleTurn]
and $1
xor [hl]
ret
@ -2910,7 +2910,7 @@ Functionc9038: ; c9038 (32:5038)
Functionc9042: ; c9042 (32:5042)
ld hl, $2
add hl, bc
ld a, [hBattleTurn] ; $ff00+$e4
ld a, [hBattleTurn]
and $1
xor [hl]
jr nz, .asm_c9053
@ -2923,7 +2923,7 @@ Functionc9042: ; c9042 (32:5042)
ret
Functionc9059: ; c9059 (32:5059)
ld a, [hSGB] ; $ff00+$e7
ld a, [hSGB]
and a
ret

File diff suppressed because it is too large Load Diff

View File

@ -1,180 +1,179 @@
dw 0 ; padding
BattleCommandPointers: ; 3fd28
dw BattleCommand01 ; 34084
dw BattleCommand02 ; 343db
dw BattleCommand03 ; 34541
dw BattleCommand04 ; 34555
dw BattleCommand05 ; 34631
dw BattleCommand06 ; 352dc
dw BattleCommand_CalcDamageTypeMultiplier ; 346d2 - 07
dw BattleCommand08 ; 34cfd
dw BattleCommand09 ; 34d32
dw BattleCommand0a ; 34eee
dw BattleCommand0b ; 34f60
dw BattleCommand0c ; 35004
dw BattleCommand0d ; 35023
dw BattleCommand0e ; 3505e
dw BattleCommand0f ; 35175
dw BattleCommand10 ; 351ad
dw BattleCommand11 ; 351c0
dw BattleCommand12 ; 35250
dw BattleCommand13 ; 35eee
dw BattleCommand14 ; 35e5c
dw BattleCommand15 ; 35fff
dw BattleCommand16 ; 36008
dw BattleCommand17 ; 3608c
dw BattleCommand18 ; 36102
dw BattleCommand19 ; 36165
dw BattleCommand1a ; 37380
dw BattleCommand1b ; 373c9
dw BattleCommand1c ; 361e4
dw BattleCommand1d ; 362e3
dw BattleCommand1e ; 3705c
dw BattleCommand1f ; 3707f
dw BattleCommand20 ; 3710e
dw BattleCommand21 ; 36671
dw BattleCommand22 ; 366e5
dw BattleCommand23 ; 3680f
dw BattleCommand24 ; 369b6
dw BattleCommand25 ; 36aa0
dw BattleCommand26 ; 36af3
dw BattleCommand27 ; 36cb2
dw BattleCommand28 ; 36c7e
dw BattleCommand29 ; 36c98
dw BattleCommand2a ; 36d3b
dw BattleCommand2b ; 36d1d
dw BattleCommand2c ; 3713e
dw BattleCommand2d ; 371cd
dw BattleCommand2e ; 372fc
dw BattleCommand2f ; 35f2c
dw BattleCommand30 ; 36dc7
dw BattleCommand31 ; 36e7c
dw BattleCommand32 ; 36f0b
dw BattleCommand33 ; 36f46
dw BattleCommand34 ; 37418
dw BattleCommand35 ; 36f9d
dw BattleCommand36 ; 36fe1
dw BattleCommand37 ; 36fed
dw BattleCommand38 ; 37e85
dw BattleCommand39 ; 36b4d
dw BattleCommand3a ; 36b3a
dw BattleCommand3b ; 36c2d
dw BattleCommand_CheckTurn ; 34084
dw BattleCommand_CheckObedience ; 343db
dw BattleCommand_UsedMoveText ; 34541
dw BattleCommand_DoTurn ; 34555
dw BattleCommand_Critical ; 34631
dw BattleCommand_DamageStats ; 352dc
dw BattleCommand_Stab ; 346d2 - 07
dw BattleCommand_DamageVariation ; 34cfd
dw BattleCommand_CheckHit ; 34d32
dw BattleCommand_LowerSub ; 34eee
dw BattleCommand_HitTargetNoSub ; 34f60
dw BattleCommand_RaiseSub ; 35004
dw BattleCommand_FailureText ; 35023
dw BattleCommand_CheckFaint ; 3505e
dw BattleCommand_CriticalText ; 35175
dw BattleCommand_SuperEffectiveText ; 351ad
dw BattleCommand_CheckDestinyBond ; 351c0
dw BattleCommand_BuildOpponentRage ; 35250
dw BattleCommand_PoisonTarget ; 35eee
dw BattleCommand_SleepTarget ; 35e5c
dw BattleCommand_DrainTarget ; 35fff
dw BattleCommand_EatDream ; 36008
dw BattleCommand_BurnTarget ; 3608c
dw BattleCommand_FreezeTarget ; 36102
dw BattleCommand_ParalyzeTarget ; 36165
dw BattleCommand_SelfDestruct ; 37380
dw BattleCommand_MirrorMove ; 373c9
dw BattleCommand_StatUp ; 361e4
dw BattleCommand_StatDown ; 362e3
dw BattleCommand_PayDay ; 3705c
dw BattleCommand_Conversion ; 3707f
dw BattleCommand_ResetStats ; 3710e
dw BattleCommand_StoreEnergy ; 36671
dw BattleCommand_UnleashEnergy ; 366e5
dw BattleCommand_ForceSwitch ; 3680f
dw BattleCommand_EndLoop ; 369b6
dw BattleCommand_FlinchTarget ; 36aa0
dw BattleCommand_OHKO ; 36af3
dw BattleCommand_Recoil ; 36cb2
dw BattleCommand_Mist ; 36c7e
dw BattleCommand_FocusEnergy ; 36c98
dw BattleCommand_Confuse ; 36d3b
dw BattleCommand_ConfuseTarget ; 36d1d
dw BattleCommand_Heal ; 3713e
dw BattleCommand_Transform ; 371cd
dw BattleCommand_Screen ; 372fc
dw BattleCommand_Poison ; 35f2c
dw BattleCommand_Paralyze ; 36dc7
dw BattleCommand_Substitute ; 36e7c
dw BattleCommand_RechargeNextTurn ; 36f0b
dw BattleCommand_Mimic ; 36f46
dw BattleCommand_Metronome ; 37418
dw BattleCommand_LeechSeed ; 36f9d
dw BattleCommand_Splash ; 36fe1
dw BattleCommand_Disable ; 36fed
dw BattleCommand_ClearText ; 37e85
dw BattleCommand_Charge ; 36b4d
dw BattleCommand_CheckCharge ; 36b3a
dw BattleCommand_TrapTarget ; 36c2d
dw BattleCommand3c ; 36c2c
dw BattleCommand3d ; 36751
dw BattleCommand3e ; 3671a
dw BattleCommand3f ; 35726
dw BattleCommand40 ; 35813
dw BattleCommand41 ; 35864
dw BattleCommand42 ; 35926
dw BattleCommand43 ; 359d0
dw BattleCommand44 ; 359e6
dw BattleCommand45 ; 35a53
dw BattleCommand46 ; 35a74
dw BattleCommand47 ; 35b16
dw BattleCommand48 ; 35b33
dw BattleCommand49 ; 35bff
dw BattleCommand4a ; 35c0f
dw BattleCommand4b ; 35c94
dw BattleCommand4c ; 35cc9
dw BattleCommand4d ; 36ac9
dw BattleCommand4e ; 346b2
dw BattleCommand4f ; 346cd
dw BattleCommand50 ; 37492
dw BattleCommand51 ; 37517
dw BattleCommand52 ; 37536
dw BattleCommand53 ; 37563
dw BattleCommand54 ; 37588
dw BattleCommand55 ; 37618
dw BattleCommand56 ; 37683
dw BattleCommand57 ; 376a0
dw BattleCommand58 ; 376c2
dw BattleCommand59 ; 376f8
dw BattleCommand5a ; 3766f
dw BattleCommand5b ; 37718
dw BattleCommand5c ; 37734
dw BattleCommand_Rampage ; 36751
dw BattleCommand_CheckRampage ; 3671a
dw BattleCommand_ConstantDamage ; 35726
dw BattleCommand_Counter ; 35813
dw BattleCommand_Encore ; 35864
dw BattleCommand_PainSplit ; 35926
dw BattleCommand_Snore ; 359d0
dw BattleCommand_Conversion2 ; 359e6
dw BattleCommand_LockOn ; 35a53
dw BattleCommand_Sketch ; 35a74
dw BattleCommand_DefrostOpponent ; 35b16
dw BattleCommand_SleepTalk ; 35b33
dw BattleCommand_DestinyBond ; 35bff
dw BattleCommand_Spite ; 35c0f
dw BattleCommand_FalseSwipe ; 35c94
dw BattleCommand_HealBell ; 35cc9
dw BattleCommand_KingsRock ; 36ac9
dw BattleCommand_TripleKick ; 346b2
dw BattleCommand_KickCounter ; 346cd
dw BattleCommand_Thief ; 37492
dw BattleCommand_ArenaTrap ; 37517
dw BattleCommand_Nightmare ; 37536
dw BattleCommand_Defrost ; 37563
dw BattleCommand_Curse ; 37588
dw BattleCommand_Protect ; 37618
dw BattleCommand_Spikes ; 37683
dw BattleCommand_Foresight ; 376a0
dw BattleCommand_PerishSong ; 376c2
dw BattleCommand_StartSandstorm ; 376f8
dw BattleCommand_Endure ; 3766f
dw BattleCommand_CheckCurl ; 37718
dw BattleCommand_RolloutPower ; 37734
dw BattleCommand5d ; 37791
dw BattleCommand5e ; 37792
dw BattleCommand5f ; 377ce
dw BattleCommand60 ; 3784b
dw BattleCommand61 ; 37874
dw BattleCommand_DamageCalcWithStats ; 35612 - 62
dw BattleCommand63 ; 3790e
dw BattleCommand64 ; 37939
dw BattleCommand65 ; 37972
dw BattleCommand66 ; 37991
dw BattleCommand67 ; 379c9
dw BattleCommand68 ; 37b1d
dw BattleCommand69 ; 37b39
dw BattleCommand6a ; 37b74
dw BattleCommand6b ; 37b78
dw BattleCommand6c ; 37b7c
dw BattleCommand6d ; 37be8
dw BattleCommand6e ; 37bf4
dw BattleCommand6f ; 37c07
dw BattleCommand70 ; 361ac
dw BattleCommand71 ; 361b0
dw BattleCommand72 ; 361b4
dw BattleCommand73 ; 361b8
dw BattleCommand74 ; 361bc
dw BattleCommand75 ; 361c0
dw BattleCommand76 ; 361c4
dw BattleCommand77 ; 361c8
dw BattleCommand78 ; 361cc
dw BattleCommand79 ; 361d0
dw BattleCommand7a ; 361d4
dw BattleCommand7b ; 361d8
dw BattleCommand7c ; 361dc
dw BattleCommand7d ; 361e0
dw BattleCommand7e ; 362ad
dw BattleCommand7f ; 362b1
dw BattleCommand80 ; 362b5
dw BattleCommand81 ; 362b9
dw BattleCommand82 ; 362bd
dw BattleCommand83 ; 362c1
dw BattleCommand84 ; 362c5
dw BattleCommand85 ; 362c9
dw BattleCommand86 ; 362cd
dw BattleCommand87 ; 362d1
dw BattleCommand88 ; 362d5
dw BattleCommand89 ; 362d9
dw BattleCommand8a ; 362dd
dw BattleCommand8b ; 362e1
dw BattleCommand8c ; 363b8
dw BattleCommand8d ; 363e9
dw BattleCommand8e ; 3644c
dw BattleCommand8f ; 3646a
dw BattleCommand90 ; 34ecc
dw BattleCommand91 ; 34fdb
dw BattleCommand92 ; 34fd1
dw BattleCommand_FuryCutter ; 37792
dw BattleCommand_Attract ; 377ce
dw BattleCommand_HappinessPower ; 3784b
dw BattleCommand_Present ; 37874
dw BattleCommand_DamageCalc ; 35612 - 62
dw BattleCommand_FrustrationPower ; 3790e
dw BattleCommand_Safeguard ; 37939
dw BattleCommand_CheckSafeguard ; 37972
dw BattleCommand_GetMagnitude ; 37991
dw BattleCommand_BatonPass ; 379c9
dw BattleCommand_Pursuit ; 37b1d
dw BattleCommand_ClearHazards ; 37b39
dw BattleCommand_HealMorn ; 37b74
dw BattleCommand_HealDay ; 37b78
dw BattleCommand_HealNite ; 37b7c
dw BattleCommand_HiddenPower ; 37be8
dw BattleCommand_StartRain ; 37bf4
dw BattleCommand_StartSun ; 37c07
dw BattleCommand_AttackUp ; 361ac
dw BattleCommand_DefenseUp ; 361b0
dw BattleCommand_SpeedUp ; 361b4
dw BattleCommand_SpecialAttackUp ; 361b8
dw BattleCommand_SpecialDefenseUp ; 361bc
dw BattleCommand_AccuracyUp ; 361c0
dw BattleCommand_EvasionUp ; 361c4
dw BattleCommand_AttackUp2 ; 361c8
dw BattleCommand_DefenseUp2 ; 361cc
dw BattleCommand_SpeedUp2 ; 361d0
dw BattleCommand_SpecialAttackUp2 ; 361d4
dw BattleCommand_SpecialDefenseUp2 ; 361d8
dw BattleCommand_AccuracyUp2 ; 361dc
dw BattleCommand_EvasionUp2 ; 361e0
dw BattleCommand_AttackDown ; 362ad
dw BattleCommand_DefenseDown ; 362b1
dw BattleCommand_SpeedDown ; 362b5
dw BattleCommand_SpecialAttackDown ; 362b9
dw BattleCommand_SpecialDefenseDown ; 362bd
dw BattleCommand_AccuracyDown ; 362c1
dw BattleCommand_EvasionDown ; 362c5
dw BattleCommand_AttackDown2 ; 362c9
dw BattleCommand_DefenseDown2 ; 362cd
dw BattleCommand_SpeedDown2 ; 362d1
dw BattleCommand_SpecialAttackDown2 ; 362d5
dw BattleCommand_SpecialDefenseDown2 ; 362d9
dw BattleCommand_AccuracyDown2 ; 362dd
dw BattleCommand_EvasionDown2 ; 362e1
dw BattleCommand_StatUpMessage ; 363b8
dw BattleCommand_StatDownMessage ; 363e9
dw BattleCommand_StatUpFailText ; 3644c
dw BattleCommand_StatDownFailText ; 3646a
dw BattleCommand_EffectChance ; 34ecc
dw BattleCommand_StatDownAnim ; 34fdb
dw BattleCommand_StatUpAnim ; 34fd1
dw BattleCommand_SwitchTurn ; 34ffd - 93
dw BattleCommand94 ; 36a82
dw BattleCommand95 ; 37c1a
dw BattleCommand96 ; 37c55
dw BattleCommand97 ; 36f1d
dw BattleCommand98 ; 36f25
dw BattleCommand99 ; 36f2f
dw BattleCommand9a ; 37c95
dw BattleCommand9b ; 37d0d
dw BattleCommand9c ; 37d34
dw BattleCommand9d ; 37ce6
dw BattleCommand9e ; 37d02
dw BattleCommand9f ; 37d94
dw BattleCommanda0 ; 36778
dw BattleCommanda1 ; 35461
dw BattleCommanda2 ; 3527b
dw BattleCommanda3 ; 34833
dw BattleCommanda4 ; 36500
dw BattleCommand_FakeOut ; 36a82
dw BattleCommand_BellyDrum ; 37c1a
dw BattleCommand_PsychUp ; 37c55
dw BattleCommand_Rage ; 36f1d
dw BattleCommand_DoubleFlyingDamage ; 36f25
dw BattleCommand_DoubleUndergroundDamage ; 36f2f
dw BattleCommand_MirrorCoat ; 37c95
dw BattleCommand_CheckFutureSight ; 37d0d
dw BattleCommand_FutureSight ; 37d34
dw BattleCommand_DoubleMinimizeDamage ; 37ce6
dw BattleCommand_SkipSunCharge ; 37d02
dw BattleCommand_ThunderAccuracy ; 37d94
dw BattleCommand_Teleport ; 36778
dw BattleCommand_BeatUp ; 35461
dw BattleCommand_RageDamage ; 3527b
dw BattleCommand_ResetTypeMatchup ; 34833
dw BattleCommand_AllStatsUp ; 36500
dw BattleCommanda5 ; 35165
dw BattleCommanda6 ; 365af
dw BattleCommanda7 ; 365c3
dw BattleCommand_RaiseSubNoAnim ; 365af
dw BattleCommand_LowerSubNoAnim ; 365c3
dw BattleCommanda8 ; 355b5
dw BattleCommand_IfAttackMissedResetDamage ; 355d5 - a9
dw BattleCommandaa ; 37e80
dw BattleCommandab ; 34f57
dw BattleCommandac ; 3658f
dw BattleCommandad ; 351a5
dw BattleCommandae ; 35197
dw BattleCommandaf ; 365a7
dw BattleCommand_ClearMissDamage ; 355d5 - a9
dw BattleCommand_MoveDelay ; 37e80
dw BattleCommand_HitTarget ; 34f57
dw BattleCommand_TriStatusChance ; 3658f
dw BattleCommand_SuperEffectiveLoopText ; 351a5
dw BattleCommand_StartLoop ; 35197
dw BattleCommand_Curl ; 365a7
; 3fe86

File diff suppressed because it is too large Load Diff

79
battle/effects/attract.asm Executable file
View File

@ -0,0 +1,79 @@
BattleCommand_Attract: ; 377ce
; attract
ld a, [AttackMissed]
and a
jr nz, .failed
call CheckOppositeGender
jr c, .failed
call CheckHiddenOpponent
jr nz, .failed
ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVarAddr
bit SUBSTATUS_IN_LOVE, [hl]
jr nz, .failed
set SUBSTATUS_IN_LOVE, [hl]
call AnimateCurrentMove
; 'fell in love!'
ld hl, FellInLoveText
jp StdBattleTextBox
.failed
jp FailAttract
; 377f5
CheckOppositeGender: ; 377f5
ld a, MON_SPECIES
call BattlePartyAttr
ld a, [hl]
ld [CurPartySpecies], a
ld a, [CurBattleMon]
ld [CurPartyMon], a
xor a
ld [MonType], a
callba GetGender
jr c, .genderless_samegender
ld b, 1
jr nz, .got_gender
dec b
.got_gender
push bc
ld a, [TempEnemyMonSpecies]
ld [CurPartySpecies], a
ld hl, EnemyMonDVs
ld a, [EnemySubStatus5]
bit SUBSTATUS_TRANSFORMED, a
jr z, .not_transformed
ld hl, wEnemyBackupDVs
.not_transformed
ld a, [hli]
ld [TempMonDVs], a
ld a, [hl]
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
callba GetGender
pop bc
jr c, .genderless_samegender
ld a, 1
jr nz, .got_enemy_gender
dec a
.got_enemy_gender
xor b
jr z, .genderless_samegender
and a
ret
.genderless_samegender
scf
ret
; 3784b

View File

@ -1,4 +1,4 @@
BattleCommand54: ; 37588
BattleCommand_Curse: ; 37588
; curse
ld de, BattleMonType1
@ -26,13 +26,13 @@ BattleCommand54: ; 37588
; Attack
ld a, [bc]
cp 13 ; max
cp MAX_STAT_LEVEL
jr c, .raise
; Defense
inc bc
ld a, [bc]
cp 13 ; max
cp MAX_STAT_LEVEL
jr nc, .cantraise
.raise
@ -40,19 +40,19 @@ BattleCommand54: ; 37588
; Raise Attack and Defense, and lower Speed.
ld a, $1
ld [wc689], a
ld [wKickCounter], a
call AnimateCurrentMove
ld a, $2
call Function36532
ld a, SPEED
call LowerStat
call BattleCommand_SwitchTurn
call BattleCommand8d
call BattleCommand_StatDownMessage
call ResetMiss
call BattleCommand_SwitchTurn
call BattleCommand70
call BattleCommand8c
call BattleCommand_AttackUp
call BattleCommand_StatUpMessage
call ResetMiss
call BattleCommand71
jp BattleCommand8c
call BattleCommand_DefenseUp
jp BattleCommand_StatUpMessage
.ghost
@ -74,7 +74,7 @@ BattleCommand54: ; 37588
call AnimateCurrentMove
ld hl, GetHalfMaxHP
call CallBattleCore
ld hl, Function3cc3f
ld hl, SubtractHPFromUser
call CallBattleCore
call UpdateUserInParty
ld hl, PutACurseText
@ -89,7 +89,7 @@ BattleCommand54: ; 37588
; Can't raise either stat.
ld b, $8 ; ABILITY
ld b, ABILITY + 1
call GetStatName
call AnimateFailedMove
ld hl, WontRiseAnymoreText

View File

@ -1,4 +1,4 @@
BattleCommand5a: ; 3766f
BattleCommand_Endure: ; 3766f
; endure
; Endure shares code with Protect. See protect.asm.

View File

@ -1,4 +1,4 @@
BattleCommand57: ; 376a0
BattleCommand_Foresight: ; 376a0
; foresight
ld a, [AttackMissed]
@ -19,5 +19,5 @@ BattleCommand57: ; 376a0
jp StdBattleTextBox
.failed
jp Function37354
jp FailForesight
; 376c2

View File

@ -1,18 +1,18 @@
BattleCommand34: ; 37418
BattleCommand_Metronome: ; 37418
; metronome
call Function372d8
call Function34548
call ClearLastMove
call CheckUserIsCharging
jr nz, .asm_3742b
ld a, [wc689]
ld a, [wKickCounter]
push af
call BattleCommand0a
call BattleCommand_LowerSub
pop af
ld [wc689], a
ld [wKickCounter], a
.asm_3742b
call Function37e36
call LoadMoveAnim
.GetMove
call BattleRandom

View File

@ -1,7 +1,7 @@
BattleCommand1b: ; 373c9
BattleCommand_MirrorMove: ; 373c9
; mirrormove
call Function372d8
call ClearLastMove
ld a, BATTLE_VARS_MOVE
call GetBattleVarAddr
@ -37,16 +37,16 @@ BattleCommand1b: ; 373c9
call GetMoveData
call GetMoveName
call CopyName1
call Function34548
call CheckUserIsCharging
jr nz, .done
ld a, [wc689]
ld a, [wKickCounter]
push af
call BattleCommand0a
call BattleCommand_LowerSub
pop af
ld [wc689], a
ld [wKickCounter], a
.done
call BattleCommandaa
call BattleCommand_MoveDelay
jp ResetTurn
; 37418

Some files were not shown because too many files have changed in this diff Show More