mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Move battle engine data into data/
IsJohtoGymLeader → IsGymLeader
This commit is contained in:
parent
2f741dfa03
commit
5a73a62d9b
9
data/moves/effects_priorities.asm
Normal file
9
data/moves/effects_priorities.asm
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
MoveEffectPriorities: ; 3c5df
|
||||||
|
db EFFECT_PROTECT, 3
|
||||||
|
db EFFECT_ENDURE, 3
|
||||||
|
db EFFECT_PRIORITY_HIT, 2
|
||||||
|
db EFFECT_FORCE_SWITCH, 0
|
||||||
|
db EFFECT_COUNTER, 0
|
||||||
|
db EFFECT_MIRROR_COAT, 0
|
||||||
|
db -1
|
||||||
|
; 3c5ec
|
32
data/trainers/leaders.asm
Normal file
32
data/trainers/leaders.asm
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
; These lists determine the battle music and victory music, and whether to
|
||||||
|
; award HAPPINESS_GYMBATTLE for winning.
|
||||||
|
|
||||||
|
; Note: CHAMPION and RED are unused for battle music checks, since they are
|
||||||
|
; accounted for prior to the list check.
|
||||||
|
|
||||||
|
GymLeaders:
|
||||||
|
db FALKNER
|
||||||
|
db WHITNEY
|
||||||
|
db BUGSY
|
||||||
|
db MORTY
|
||||||
|
db PRYCE
|
||||||
|
db JASMINE
|
||||||
|
db CHUCK
|
||||||
|
db CLAIR
|
||||||
|
db WILL
|
||||||
|
db BRUNO
|
||||||
|
db KAREN
|
||||||
|
db KOGA
|
||||||
|
db CHAMPION
|
||||||
|
db RED
|
||||||
|
; fallthrough
|
||||||
|
KantoGymLeaders:
|
||||||
|
db BROCK
|
||||||
|
db MISTY
|
||||||
|
db LT_SURGE
|
||||||
|
db ERIKA
|
||||||
|
db JANINE
|
||||||
|
db SABRINA
|
||||||
|
db BLAINE
|
||||||
|
db BLUE
|
||||||
|
db -1
|
31
data/wild/treemons_asleep.asm
Normal file
31
data/wild/treemons_asleep.asm
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
; Used by CheckSleepingTreeMon
|
||||||
|
|
||||||
|
AsleepTreeMonsNite:
|
||||||
|
db CATERPIE
|
||||||
|
db METAPOD
|
||||||
|
db BUTTERFREE
|
||||||
|
db WEEDLE
|
||||||
|
db KAKUNA
|
||||||
|
db BEEDRILL
|
||||||
|
db SPEAROW
|
||||||
|
db EKANS
|
||||||
|
db EXEGGCUTE
|
||||||
|
db LEDYBA
|
||||||
|
db AIPOM
|
||||||
|
db -1 ; end
|
||||||
|
|
||||||
|
AsleepTreeMonsDay:
|
||||||
|
db VENONAT
|
||||||
|
db HOOTHOOT
|
||||||
|
db NOCTOWL
|
||||||
|
db SPINARAK
|
||||||
|
db HERACROSS
|
||||||
|
db -1 ; end
|
||||||
|
|
||||||
|
AsleepTreeMonsMorn:
|
||||||
|
db VENONAT
|
||||||
|
db HOOTHOOT
|
||||||
|
db NOCTOWL
|
||||||
|
db SPINARAK
|
||||||
|
db HERACROSS
|
||||||
|
db -1 ; end
|
@ -865,15 +865,7 @@ GetMovePriority: ; 3c5c5
|
|||||||
ret
|
ret
|
||||||
; 3c5df
|
; 3c5df
|
||||||
|
|
||||||
MoveEffectPriorities: ; 3c5df
|
INCLUDE "data/moves/effects_priorities.asm"
|
||||||
db EFFECT_PROTECT, 3
|
|
||||||
db EFFECT_ENDURE, 3
|
|
||||||
db EFFECT_PRIORITY_HIT, 2
|
|
||||||
db EFFECT_FORCE_SWITCH, 0
|
|
||||||
db EFFECT_COUNTER, 0
|
|
||||||
db EFFECT_MIRROR_COAT, 0
|
|
||||||
db -1
|
|
||||||
; 3c5ec
|
|
||||||
|
|
||||||
GetMoveEffect: ; 3c5ec
|
GetMoveEffect: ; 3c5ec
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -2640,7 +2632,7 @@ PlayVictoryMusic: ; 3d0ea
|
|||||||
|
|
||||||
.trainer_victory
|
.trainer_victory
|
||||||
ld de, MUSIC_GYM_VICTORY
|
ld de, MUSIC_GYM_VICTORY
|
||||||
call IsJohtoGymLeader
|
call IsGymLeader
|
||||||
jr c, .play_music
|
jr c, .play_music
|
||||||
ld de, MUSIC_TRAINER_VICTORY
|
ld de, MUSIC_TRAINER_VICTORY
|
||||||
|
|
||||||
@ -2652,58 +2644,22 @@ PlayVictoryMusic: ; 3d0ea
|
|||||||
ret
|
ret
|
||||||
; 3d123
|
; 3d123
|
||||||
|
|
||||||
; These functions check if the current opponent is a gym leader or one of a
|
|
||||||
; few other special trainers.
|
|
||||||
|
|
||||||
; Note: KantoGymLeaders is a subset of JohtoGymLeaders. If you wish to
|
|
||||||
; differentiate between the two, call IsKantoGymLeader first.
|
|
||||||
|
|
||||||
; The Lance and Red entries are unused for music checks; those trainers are
|
|
||||||
; accounted for elsewhere.
|
|
||||||
|
|
||||||
IsKantoGymLeader: ; 0x3d123
|
IsKantoGymLeader: ; 0x3d123
|
||||||
ld hl, KantoGymLeaders
|
ld hl, KantoGymLeaders
|
||||||
jr IsGymLeaderCommon
|
jr IsGymLeaderCommon
|
||||||
|
|
||||||
IsJohtoGymLeader: ; 0x3d128
|
IsGymLeader: ; 0x3d128
|
||||||
ld hl, JohtoGymLeaders
|
ld hl, GymLeaders
|
||||||
IsGymLeaderCommon:
|
IsGymLeaderCommon:
|
||||||
push de
|
push de
|
||||||
ld a, [OtherTrainerClass]
|
ld a, [OtherTrainerClass]
|
||||||
ld de, $0001
|
ld de, $1
|
||||||
call IsInArray
|
call IsInArray
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
; 0x3d137
|
; 0x3d137
|
||||||
|
|
||||||
JohtoGymLeaders:
|
INCLUDE "data/trainers/leaders.asm"
|
||||||
db FALKNER
|
|
||||||
db WHITNEY
|
|
||||||
db BUGSY
|
|
||||||
db MORTY
|
|
||||||
db PRYCE
|
|
||||||
db JASMINE
|
|
||||||
db CHUCK
|
|
||||||
db CLAIR
|
|
||||||
db WILL
|
|
||||||
db BRUNO
|
|
||||||
db KAREN
|
|
||||||
db KOGA
|
|
||||||
; fallthrough
|
|
||||||
; these two entries are unused
|
|
||||||
db CHAMPION
|
|
||||||
db RED
|
|
||||||
; fallthrough
|
|
||||||
KantoGymLeaders:
|
|
||||||
db BROCK
|
|
||||||
db MISTY
|
|
||||||
db LT_SURGE
|
|
||||||
db ERIKA
|
|
||||||
db JANINE
|
|
||||||
db SABRINA
|
|
||||||
db BLAINE
|
|
||||||
db BLUE
|
|
||||||
db -1
|
|
||||||
|
|
||||||
HandlePlayerMonFaint: ; 3d14e
|
HandlePlayerMonFaint: ; 3d14e
|
||||||
call FaintYourPokemon
|
call FaintYourPokemon
|
||||||
@ -6652,13 +6608,13 @@ CheckSleepingTreeMon: ; 3eb38
|
|||||||
jr nz, .NotSleeping
|
jr nz, .NotSleeping
|
||||||
|
|
||||||
; Get list for the time of day
|
; Get list for the time of day
|
||||||
ld hl, .Morn
|
ld hl, AsleepTreeMonsMorn
|
||||||
ld a, [TimeOfDay]
|
ld a, [TimeOfDay]
|
||||||
cp DAY_F
|
cp DAY_F
|
||||||
jr c, .Check
|
jr c, .Check
|
||||||
ld hl, .Day
|
ld hl, AsleepTreeMonsDay
|
||||||
jr z, .Check
|
jr z, .Check
|
||||||
ld hl, .Nite
|
ld hl, AsleepTreeMonsNite
|
||||||
|
|
||||||
.Check:
|
.Check:
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
@ -6671,36 +6627,7 @@ CheckSleepingTreeMon: ; 3eb38
|
|||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Nite:
|
INCLUDE "data/wild/treemons_asleep.asm"
|
||||||
db CATERPIE
|
|
||||||
db METAPOD
|
|
||||||
db BUTTERFREE
|
|
||||||
db WEEDLE
|
|
||||||
db KAKUNA
|
|
||||||
db BEEDRILL
|
|
||||||
db SPEAROW
|
|
||||||
db EKANS
|
|
||||||
db EXEGGCUTE
|
|
||||||
db LEDYBA
|
|
||||||
db AIPOM
|
|
||||||
db -1 ; end
|
|
||||||
|
|
||||||
.Day:
|
|
||||||
db VENONAT
|
|
||||||
db HOOTHOOT
|
|
||||||
db NOCTOWL
|
|
||||||
db SPINARAK
|
|
||||||
db HERACROSS
|
|
||||||
db -1 ; end
|
|
||||||
|
|
||||||
.Morn:
|
|
||||||
db VENONAT
|
|
||||||
db HOOTHOOT
|
|
||||||
db NOCTOWL
|
|
||||||
db SPINARAK
|
|
||||||
db HERACROSS
|
|
||||||
db -1 ; end
|
|
||||||
; 3eb75
|
|
||||||
|
|
||||||
CheckUnownLetter: ; 3eb75
|
CheckUnownLetter: ; 3eb75
|
||||||
; Return carry if the Unown letter hasn't been unlocked yet
|
; Return carry if the Unown letter hasn't been unlocked yet
|
||||||
@ -8491,7 +8418,7 @@ InitEnemyTrainer: ; 3f594
|
|||||||
ld a, TRAINER_BATTLE
|
ld a, TRAINER_BATTLE
|
||||||
ld [wBattleMode], a
|
ld [wBattleMode], a
|
||||||
|
|
||||||
call IsJohtoGymLeader
|
call IsGymLeader
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
xor a
|
xor a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
|
@ -93,7 +93,7 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
cp RED
|
cp RED
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
; really, they should have included admins and scientists here too...
|
; They should have included EXECUTIVEM, EXECUTIVEF, and SCIENTIST too...
|
||||||
ld de, MUSIC_ROCKET_BATTLE
|
ld de, MUSIC_ROCKET_BATTLE
|
||||||
cp GRUNTM
|
cp GRUNTM
|
||||||
jr z, .done
|
jr z, .done
|
||||||
@ -104,8 +104,10 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
farcall IsKantoGymLeader
|
farcall IsKantoGymLeader
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
|
; IsGymLeader also counts CHAMPION, RED, and the Kanto gym leaders
|
||||||
|
; but they have been taken care of before this
|
||||||
ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
|
ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
|
||||||
farcall IsJohtoGymLeader
|
farcall IsGymLeader
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
ld de, MUSIC_RIVAL_BATTLE
|
ld de, MUSIC_RIVAL_BATTLE
|
||||||
|
Loading…
Reference in New Issue
Block a user