You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Merge pull request #423 from roukaour/master
Fix issues #262, #345, #347, #396, #408, and #412
This commit is contained in:
@@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
callba CheckEnemyLockedIn
|
farcall CheckEnemyLockedIn
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [PlayerSubStatus5]
|
ld a, [PlayerSubStatus5]
|
||||||
@@ -44,7 +44,7 @@ DontSwitch: ; 38041
|
|||||||
; 38045
|
; 38045
|
||||||
|
|
||||||
SwitchOften: ; 38045
|
SwitchOften: ; 38045
|
||||||
callab CheckAbleToSwitch
|
callfar CheckAbleToSwitch
|
||||||
ld a, [wEnemySwitchMonParam]
|
ld a, [wEnemySwitchMonParam]
|
||||||
and $f0
|
and $f0
|
||||||
jp z, DontSwitch
|
jp z, DontSwitch
|
||||||
@@ -80,7 +80,7 @@ SwitchOften: ; 38045
|
|||||||
; 38083
|
; 38083
|
||||||
|
|
||||||
SwitchRarely: ; 38083
|
SwitchRarely: ; 38083
|
||||||
callab CheckAbleToSwitch
|
callfar CheckAbleToSwitch
|
||||||
ld a, [wEnemySwitchMonParam]
|
ld a, [wEnemySwitchMonParam]
|
||||||
and $f0
|
and $f0
|
||||||
jp z, DontSwitch
|
jp z, DontSwitch
|
||||||
@@ -115,7 +115,7 @@ SwitchRarely: ; 38083
|
|||||||
; 380c1
|
; 380c1
|
||||||
|
|
||||||
SwitchSometimes: ; 380c1
|
SwitchSometimes: ; 380c1
|
||||||
callab CheckAbleToSwitch
|
callfar CheckAbleToSwitch
|
||||||
ld a, [wEnemySwitchMonParam]
|
ld a, [wEnemySwitchMonParam]
|
||||||
and $f0
|
and $f0
|
||||||
jp z, DontSwitch
|
jp z, DontSwitch
|
||||||
@@ -358,12 +358,12 @@ AI_Items: ; 39196
|
|||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
bit CONTEXT_USE_F, a
|
bit CONTEXT_USE_F, a
|
||||||
jr nz, .CheckHalfOrQuarterHP
|
jr nz, .CheckHalfOrQuarterHP
|
||||||
callab AICheckEnemyHalfHP
|
callfar AICheckEnemyHalfHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
bit UNKNOWN_USE_F, a
|
bit UNKNOWN_USE_F, a
|
||||||
jp nz, .CheckQuarterHP
|
jp nz, .CheckQuarterHP
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp nc, .UseHealItem
|
jp nc, .UseHealItem
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 1 + 50 percent
|
||||||
@@ -371,7 +371,7 @@ AI_Items: ; 39196
|
|||||||
jp .DontUse
|
jp .DontUse
|
||||||
|
|
||||||
.CheckQuarterHP: ; 38254 (e:4254)
|
.CheckQuarterHP: ; 38254 (e:4254)
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp -1 + 20 percent
|
||||||
@@ -379,9 +379,9 @@ AI_Items: ; 39196
|
|||||||
jr .UseHealItem
|
jr .UseHealItem
|
||||||
|
|
||||||
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
|
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
|
||||||
callab AICheckEnemyHalfHP
|
callfar AICheckEnemyHalfHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp nc, .UseHealItem
|
jp nc, .UseHealItem
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp -1 + 20 percent
|
||||||
@@ -416,7 +416,7 @@ AI_Items: ; 39196
|
|||||||
; 382ae
|
; 382ae
|
||||||
|
|
||||||
.asm_382ae ; This appears to be unused
|
.asm_382ae ; This appears to be unused
|
||||||
callab AICheckEnemyMaxHP
|
callfar AICheckEnemyMaxHP
|
||||||
jr c, .dont_use
|
jr c, .dont_use
|
||||||
push bc
|
push bc
|
||||||
ld de, EnemyMonMaxHP + 1
|
ld de, EnemyMonMaxHP + 1
|
||||||
@@ -433,7 +433,7 @@ AI_Items: ; 39196
|
|||||||
ld a, c
|
ld a, c
|
||||||
cp b
|
cp b
|
||||||
jp c, .check_50_percent
|
jp c, .check_50_percent
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jr c, .check_40_percent
|
jr c, .check_40_percent
|
||||||
|
|
||||||
.check_50_percent
|
.check_50_percent
|
||||||
@@ -545,7 +545,7 @@ AI_Items: ; 39196
|
|||||||
|
|
||||||
AIUpdateHUD: ; 38387
|
AIUpdateHUD: ; 38387
|
||||||
call UpdateEnemyMonInParty
|
call UpdateEnemyMonInParty
|
||||||
callba UpdateEnemyHUD
|
farcall UpdateEnemyHUD
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld hl, wEnemyItemState
|
ld hl, wEnemyItemState
|
||||||
@@ -705,7 +705,7 @@ AI_Switch: ; 3846c
|
|||||||
res SUBSTATUS_RAGE, [hl]
|
res SUBSTATUS_RAGE, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab PursuitSwitch
|
callfar PursuitSwitch
|
||||||
|
|
||||||
push af
|
push af
|
||||||
ld a, [CurOTMon]
|
ld a, [CurOTMon]
|
||||||
@@ -726,12 +726,12 @@ AI_Switch: ; 3846c
|
|||||||
.skiptext
|
.skiptext
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wBattleHasJustStarted], a
|
ld [wBattleHasJustStarted], a
|
||||||
callab NewEnemyMonStatus
|
callfar NewEnemyMonStatus
|
||||||
callab ResetEnemyStatLevels
|
callfar ResetEnemyStatLevels
|
||||||
ld hl, PlayerSubStatus1
|
ld hl, PlayerSubStatus1
|
||||||
res SUBSTATUS_IN_LOVE, [hl]
|
res SUBSTATUS_IN_LOVE, [hl]
|
||||||
callba EnemySwitch
|
farcall EnemySwitch
|
||||||
callba ResetBattleParticipants
|
farcall ResetBattleParticipants
|
||||||
xor a
|
xor a
|
||||||
ld [wBattleHasJustStarted], a
|
ld [wBattleHasJustStarted], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
@@ -851,7 +851,7 @@ EnemyUsedXItem:
|
|||||||
push bc
|
push bc
|
||||||
call PrintText_UsedItemOn
|
call PrintText_UsedItemOn
|
||||||
pop bc
|
pop bc
|
||||||
callba CheckIfStatCanBeRaised
|
farcall CheckIfStatCanBeRaised
|
||||||
jp AIUpdateHUD
|
jp AIUpdateHUD
|
||||||
; 38568
|
; 38568
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
; No use picking a move if there's no choice.
|
; No use picking a move if there's no choice.
|
||||||
callba CheckEnemyLockedIn
|
farcall CheckEnemyLockedIn
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
|
||||||
|
@@ -141,7 +141,7 @@ AI_Redundant: ; 2c41a
|
|||||||
jr .NotRedundant
|
jr .NotRedundant
|
||||||
|
|
||||||
.Attract: ; 2c4fe
|
.Attract: ; 2c4fe
|
||||||
callba CheckOppositeGender
|
farcall CheckOppositeGender
|
||||||
jr c, .Redundant
|
jr c, .Redundant
|
||||||
ld a, [PlayerSubStatus1]
|
ld a, [PlayerSubStatus1]
|
||||||
bit SUBSTATUS_IN_LOVE, a
|
bit SUBSTATUS_IN_LOVE, a
|
||||||
@@ -184,7 +184,7 @@ AI_Redundant: ; 2c41a
|
|||||||
.MorningSun:
|
.MorningSun:
|
||||||
.Synthesis:
|
.Synthesis:
|
||||||
.Moonlight: ; 2c539
|
.Moonlight: ; 2c539
|
||||||
callba AICheckEnemyMaxHP
|
farcall AICheckEnemyMaxHP
|
||||||
jr nc, .NotRedundant
|
jr nc, .NotRedundant
|
||||||
|
|
||||||
.Teleport:
|
.Teleport:
|
||||||
|
@@ -29,7 +29,7 @@ AI_Basic: ; 38591
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba AI_Redundant
|
farcall AI_Redundant
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@@ -176,7 +176,7 @@ AI_Types: ; 38635
|
|||||||
push de
|
push de
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
@@ -429,7 +429,7 @@ AI_Smart_LeechHit: ; 387f7
|
|||||||
push hl
|
push hl
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; 60% chance to discourage this move if not very effective.
|
; 60% chance to discourage this move if not very effective.
|
||||||
@@ -510,7 +510,7 @@ AI_Smart_LockOn: ; 3881d
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
callba BattleCheckTypeMatchup
|
farcall BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp $a
|
cp $a
|
||||||
pop bc
|
pop bc
|
||||||
@@ -572,7 +572,7 @@ AI_Smart_Selfdestruct: ; 388a6
|
|||||||
|
|
||||||
; Unless this is the enemy's last Pokemon...
|
; Unless this is the enemy's last Pokemon...
|
||||||
push hl
|
push hl
|
||||||
callba FindAliveEnemyMons
|
farcall FindAliveEnemyMons
|
||||||
pop hl
|
pop hl
|
||||||
jr nc, .asm_388b7
|
jr nc, .asm_388b7
|
||||||
|
|
||||||
@@ -970,7 +970,7 @@ AI_Smart_ForceSwitch: ; 38a2a
|
|||||||
; Consider player's type(s) if its moves are unknown.
|
; Consider player's type(s) if its moves are unknown.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp 10 ; neutral
|
cp 10 ; neutral
|
||||||
pop hl
|
pop hl
|
||||||
@@ -1368,7 +1368,7 @@ AI_Smart_Mimic: ; 38ba8
|
|||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp $a
|
cp $a
|
||||||
@@ -1763,9 +1763,9 @@ AI_Smart_PriorityHit: ; 38d5a
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
push hl
|
push hl
|
||||||
callab EnemyAttackDamage
|
callfar EnemyAttackDamage
|
||||||
callab BattleCommand_DamageCalc
|
callfar BattleCommand_DamageCalc
|
||||||
callab BattleCommand_Stab
|
callfar BattleCommand_Stab
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [CurDamage + 1]
|
ld a, [CurDamage + 1]
|
||||||
ld c, a
|
ld c, a
|
||||||
@@ -1811,7 +1811,7 @@ AI_Smart_Conversion2: ; 38d98
|
|||||||
xor a
|
xor a
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
|
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp $a
|
cp $a
|
||||||
@@ -1890,7 +1890,7 @@ AI_Smart_MeanLook: ; 38dfb
|
|||||||
|
|
||||||
; 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
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp $b ; not very effective
|
cp $b ; not very effective
|
||||||
pop hl
|
pop hl
|
||||||
@@ -2008,7 +2008,7 @@ AI_Smart_Curse: ; 38e5c
|
|||||||
jp nz, AIDiscourageMove
|
jp nz, AIDiscourageMove
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callba FindAliveEnemyMons
|
farcall FindAliveEnemyMons
|
||||||
pop hl
|
pop hl
|
||||||
jr nc, .asm_38eb0
|
jr nc, .asm_38eb0
|
||||||
|
|
||||||
@@ -2137,7 +2137,7 @@ AI_Smart_Foresight: ; 38f1d
|
|||||||
|
|
||||||
AI_Smart_PerishSong: ; 38f4a
|
AI_Smart_PerishSong: ; 38f4a
|
||||||
push hl
|
push hl
|
||||||
callab FindAliveEnemyMons
|
callfar FindAliveEnemyMons
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .no
|
jr c, .no
|
||||||
|
|
||||||
@@ -2146,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a
|
|||||||
jr nz, .yes
|
jr nz, .yes
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp 10 ; 1.0
|
cp 10 ; 1.0
|
||||||
pop hl
|
pop hl
|
||||||
@@ -2404,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062
|
|||||||
; Consider player's type(s) if its moves are unknown.
|
; Consider player's type(s) if its moves are unknown.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp 10 ; neutral
|
cp 10 ; neutral
|
||||||
pop hl
|
pop hl
|
||||||
@@ -2466,8 +2466,8 @@ AI_Smart_HiddenPower: ; 3909e
|
|||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
|
|
||||||
; Calculate Hidden Power's type and base power based on enemy's DVs.
|
; Calculate Hidden Power's type and base power based on enemy's DVs.
|
||||||
callab HiddenPowerDamage
|
callfar HiddenPowerDamage
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; Discourage Hidden Power if not very effective.
|
; Discourage Hidden Power if not very effective.
|
||||||
@@ -3336,13 +3336,13 @@ AIDamageCalc: ; 393e7
|
|||||||
ld hl, .ConstantDamageEffects
|
ld hl, .ConstantDamageEffects
|
||||||
call IsInArray
|
call IsInArray
|
||||||
jr nc, .asm_39400
|
jr nc, .asm_39400
|
||||||
callab BattleCommand_ConstantDamage
|
callfar BattleCommand_ConstantDamage
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_39400
|
.asm_39400
|
||||||
callab EnemyAttackDamage
|
callfar EnemyAttackDamage
|
||||||
callab BattleCommand_DamageCalc
|
callfar BattleCommand_DamageCalc
|
||||||
callab BattleCommand_Stab
|
callfar BattleCommand_Stab
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.ConstantDamageEffects:
|
.ConstantDamageEffects:
|
||||||
@@ -3459,7 +3459,7 @@ AI_Status: ; 39453
|
|||||||
push de
|
push de
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
@@ -61,7 +61,7 @@ BattleAnimRunScript: ; cc11c
|
|||||||
and a
|
and a
|
||||||
jr nz, .hi_byte
|
jr nz, .hi_byte
|
||||||
|
|
||||||
callba CheckBattleScene
|
farcall CheckBattleScene
|
||||||
jr c, .disabled
|
jr c, .disabled
|
||||||
|
|
||||||
call BattleAnimClearHud
|
call BattleAnimClearHud
|
||||||
@@ -169,7 +169,7 @@ BattleAnimRestoreHuds: ; cc1bb
|
|||||||
|
|
||||||
ld hl, UpdateBattleHuds
|
ld hl, UpdateBattleHuds
|
||||||
ld a, BANK(UpdatePlayerHUD)
|
ld a, BANK(UpdatePlayerHUD)
|
||||||
rst FarCall ; Why the heck is this a callab?
|
rst FarCall ; Why not "call UpdateBattleHuds"?
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
@@ -907,7 +907,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
|
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
|
||||||
callab GetPokeBallWobble
|
callfar GetPokeBallWobble
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [BattleAnimVar], a
|
ld [BattleAnimVar], a
|
||||||
ret
|
ret
|
||||||
@@ -932,7 +932,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
|
|||||||
ld hl, BattleMonDVs ; BattleMonDVs
|
ld hl, BattleMonDVs ; BattleMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, VTiles0 tile $00
|
ld de, VTiles0 tile $00
|
||||||
predef GetFrontpic
|
predef GetMonFrontpic
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.player
|
.player
|
||||||
@@ -941,7 +941,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
|
|||||||
ld hl, EnemyMonDVs ; EnemyMonDVs
|
ld hl, EnemyMonDVs ; EnemyMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, VTiles0 tile $00
|
ld de, VTiles0 tile $00
|
||||||
predef GetBackpic
|
predef GetMonBackpic
|
||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
@@ -1128,11 +1128,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
|||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
callab DropEnemySub
|
callfar DropEnemySub
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.player
|
.player
|
||||||
callab DropPlayerSub
|
callfar DropPlayerSub
|
||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
@@ -1159,14 +1159,14 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
|
|||||||
ld hl, BattleMonDVs
|
ld hl, BattleMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, VTiles2 tile $00
|
ld de, VTiles2 tile $00
|
||||||
predef GetFrontpic
|
predef GetMonFrontpic
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.player
|
.player
|
||||||
ld hl, EnemyMonDVs
|
ld hl, EnemyMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, VTiles2 tile $31
|
ld de, VTiles2 tile $31
|
||||||
predef GetBackpic
|
predef GetMonBackpic
|
||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
@@ -1221,7 +1221,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
|
|||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
callab PlayStereoSFX
|
callfar PlayStereoSFX
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; cc7f8 (33:47f8)
|
; cc7f8 (33:47f8)
|
||||||
@@ -1311,7 +1311,7 @@ endr
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wStereoPanningMask], a
|
ld [wStereoPanningMask], a
|
||||||
|
|
||||||
callab _PlayCryHeader
|
callfar _PlayCryHeader
|
||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
|
@@ -550,7 +550,7 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_QueueBattleAnimation: ; c82ee (32:42ee)
|
_QueueBattleAnimation: ; c82ee (32:42ee)
|
||||||
callab QueueBattleAnimation
|
callfar QueueBattleAnimation
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffect_27: ; c82f5 (32:42f5)
|
BattleBGEffect_27: ; c82f5 (32:42f5)
|
||||||
@@ -2944,13 +2944,13 @@ BattleBGEffects_CheckSGB: ; c9059 (32:5059)
|
|||||||
|
|
||||||
BattleBGEffects_Sine: ; c905d (32:505d)
|
BattleBGEffects_Sine: ; c905d (32:505d)
|
||||||
ld e, a
|
ld e, a
|
||||||
callab BattleAnim_Sine_e
|
callfar BattleAnim_Sine_e
|
||||||
ld a, e
|
ld a, e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffects_Cosine: ; c9066 (32:5066)
|
BattleBGEffects_Cosine: ; c9066 (32:5066)
|
||||||
ld e, a
|
ld e, a
|
||||||
callab BattleAnim_Cosine_e
|
callfar BattleAnim_Cosine_e
|
||||||
ld a, e
|
ld a, e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
280
battle/core.asm
280
battle/core.asm
File diff suppressed because it is too large
Load Diff
@@ -1016,7 +1016,7 @@ IgnoreSleepOnly: ; 3451f
|
|||||||
|
|
||||||
BattleCommand_UsedMoveText: ; 34541
|
BattleCommand_UsedMoveText: ; 34541
|
||||||
; usedmovetext
|
; usedmovetext
|
||||||
callba DisplayUsedMoveText
|
farcall DisplayUsedMoveText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 34548
|
; 34548
|
||||||
@@ -1385,14 +1385,14 @@ BattleCommand_Stab: ; 346d2
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba DoWeatherModifiers
|
farcall DoWeatherModifiers
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba DoBadgeTypeBoosts
|
farcall DoBadgeTypeBoosts
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
|
|
||||||
@@ -3862,7 +3862,7 @@ BattleCommand_Counter: ; 35813
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetMoveEffect
|
callfar GetMoveEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp EFFECT_COUNTER
|
cp EFFECT_COUNTER
|
||||||
ret z
|
ret z
|
||||||
@@ -4068,7 +4068,7 @@ BattleCommand_PainSplit: ; 35926
|
|||||||
call ResetDamage
|
call ResetDamage
|
||||||
hlcoord 2, 2
|
hlcoord 2, 2
|
||||||
predef AnimateHPBar
|
predef AnimateHPBar
|
||||||
callba _UpdateBattleHUDs
|
farcall _UpdateBattleHUDs
|
||||||
|
|
||||||
ld hl, SharedPainText
|
ld hl, SharedPainText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
@@ -4518,7 +4518,7 @@ BattleCommand_SleepTalk: ; 35b33
|
|||||||
push bc
|
push bc
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetMoveEffect
|
callfar GetMoveEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
@@ -4747,7 +4747,7 @@ PlayFXAnimID: ; 35d08
|
|||||||
ld c, 3
|
ld c, 3
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
callab PlayBattleAnim
|
callfar PlayBattleAnim
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@ -5017,7 +5017,7 @@ BattleCommand_SleepTarget: ; 35e5c
|
|||||||
ld hl, FellAsleepText
|
ld hl, FellAsleepText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
|
|
||||||
jp z, OpponentCantMove
|
jp z, OpponentCantMove
|
||||||
ret
|
ret
|
||||||
@@ -5094,7 +5094,7 @@ BattleCommand_PoisonTarget: ; 35eee
|
|||||||
ld hl, WasPoisonedText
|
ld hl, WasPoisonedText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 35f2c
|
; 35f2c
|
||||||
@@ -5179,7 +5179,7 @@ BattleCommand_Poison: ; 35f2c
|
|||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
.finished
|
.finished
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.failed
|
.failed
|
||||||
@@ -5382,7 +5382,7 @@ BattleCommand_BurnTarget: ; 3608c
|
|||||||
ld hl, WasBurnedText
|
ld hl, WasBurnedText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 360dd
|
; 360dd
|
||||||
@@ -5455,7 +5455,7 @@ BattleCommand_FreezeTarget: ; 36102
|
|||||||
ld hl, WasFrozenText
|
ld hl, WasFrozenText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
call OpponentCantMove
|
call OpponentCantMove
|
||||||
@@ -6299,11 +6299,11 @@ BattleCommand_Curl: ; 365a7
|
|||||||
|
|
||||||
|
|
||||||
BattleCommand_RaiseSubNoAnim: ; 365af
|
BattleCommand_RaiseSubNoAnim: ; 365af
|
||||||
ld hl, GetMonBackpic
|
ld hl, GetBattleMonBackpic
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .PlayerTurn
|
jr z, .PlayerTurn
|
||||||
ld hl, GetMonFrontpic
|
ld hl, GetEnemyMonFrontpic
|
||||||
.PlayerTurn:
|
.PlayerTurn:
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@@ -6816,7 +6816,7 @@ BattleCommand_ForceSwitch: ; 3680f
|
|||||||
ld a, d
|
ld a, d
|
||||||
inc a
|
inc a
|
||||||
ld [wEnemySwitchMonIndex], a
|
ld [wEnemySwitchMonIndex], a
|
||||||
callab ForceEnemySwitch
|
callfar ForceEnemySwitch
|
||||||
|
|
||||||
ld hl, DraggedOutText
|
ld hl, DraggedOutText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@@ -8081,7 +8081,7 @@ BattleCommand_LeechSeed: ; 36f9d
|
|||||||
|
|
||||||
BattleCommand_Splash: ; 36fe1
|
BattleCommand_Splash: ; 36fe1
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
callba TrainerRankings_Splash
|
farcall TrainerRankings_Splash
|
||||||
jp PrintNothingHappened
|
jp PrintNothingHappened
|
||||||
|
|
||||||
; 36fed
|
; 36fed
|
||||||
@@ -8285,7 +8285,7 @@ BattleCommand_Conversion: ; 3707f
|
|||||||
inc de
|
inc de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
callba GetTypeName
|
farcall GetTypeName
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
ld hl, TransformedTypeText
|
ld hl, TransformedTypeText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
@@ -8608,7 +8608,7 @@ CheckSubstituteOpp: ; 37378
|
|||||||
|
|
||||||
|
|
||||||
BattleCommand_Selfdestruct: ; 37380
|
BattleCommand_Selfdestruct: ; 37380
|
||||||
callba TrainerRankings_Selfdestruct
|
farcall TrainerRankings_Selfdestruct
|
||||||
ld a, BATTLEANIM_PLAYER_DAMAGE
|
ld a, BATTLEANIM_PLAYER_DAMAGE
|
||||||
ld [wNumHits], a
|
ld [wNumHits], a
|
||||||
ld c, 3
|
ld c, 3
|
||||||
@@ -8632,8 +8632,8 @@ BattleCommand_Selfdestruct: ; 37380
|
|||||||
res SUBSTATUS_DESTINY_BOND, [hl]
|
res SUBSTATUS_DESTINY_BOND, [hl]
|
||||||
call _CheckBattleScene
|
call _CheckBattleScene
|
||||||
ret nc
|
ret nc
|
||||||
callba DrawPlayerHUD
|
farcall DrawPlayerHUD
|
||||||
callba DrawEnemyHUD
|
farcall DrawEnemyHUD
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
jp RefreshBattleHuds
|
jp RefreshBattleHuds
|
||||||
|
|
||||||
@@ -9032,13 +9032,13 @@ BattleCommand_BatonPass: ; 379c9
|
|||||||
|
|
||||||
; Transition into switchmon menu
|
; Transition into switchmon menu
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba SetUpBattlePartyMenu_NoLoop
|
farcall SetUpBattlePartyMenu_NoLoop
|
||||||
|
|
||||||
callba ForcePickSwitchMonInBattle
|
farcall ForcePickSwitchMonInBattle
|
||||||
|
|
||||||
; Return to battle scene
|
; Return to battle scene
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
callba _LoadBattleFontsHPBar
|
farcall _LoadBattleFontsHPBar
|
||||||
call CloseWindow
|
call CloseWindow
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
hlcoord 1, 0
|
hlcoord 1, 0
|
||||||
@@ -9050,7 +9050,7 @@ BattleCommand_BatonPass: ; 379c9
|
|||||||
call BatonPass_LinkPlayerSwitch
|
call BatonPass_LinkPlayerSwitch
|
||||||
|
|
||||||
; Mobile link battles handle entrances differently
|
; Mobile link battles handle entrances differently
|
||||||
callba CheckMobileBattleError
|
farcall CheckMobileBattleError
|
||||||
jp c, EndMoveEffect
|
jp c, EndMoveEffect
|
||||||
|
|
||||||
ld hl, PassedBattleMonEntrance
|
ld hl, PassedBattleMonEntrance
|
||||||
@@ -9075,7 +9075,7 @@ BattleCommand_BatonPass: ; 379c9
|
|||||||
call BatonPass_LinkEnemySwitch
|
call BatonPass_LinkEnemySwitch
|
||||||
|
|
||||||
; Mobile link battles handle entrances differently
|
; Mobile link battles handle entrances differently
|
||||||
callba CheckMobileBattleError
|
farcall CheckMobileBattleError
|
||||||
jp c, EndMoveEffect
|
jp c, EndMoveEffect
|
||||||
|
|
||||||
; Passed enemy PartyMon entrance
|
; Passed enemy PartyMon entrance
|
||||||
@@ -9403,7 +9403,7 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
|
|||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
|
|
||||||
callab RestoreHP
|
callfar RestoreHP
|
||||||
|
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
call UpdateUserInParty
|
call UpdateUserInParty
|
||||||
@@ -9433,7 +9433,7 @@ BattleCommand_HiddenPower: ; 37be8
|
|||||||
ld a, [AttackMissed]
|
ld a, [AttackMissed]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
callba HiddenPowerDamage
|
farcall HiddenPowerDamage
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37bf4
|
; 37bf4
|
||||||
@@ -9475,14 +9475,14 @@ BattleCommand_BellyDrum: ; 37c1a
|
|||||||
and a
|
and a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
callab GetHalfMaxHP
|
callfar GetHalfMaxHP
|
||||||
callab CheckUserHasEnoughHP
|
callfar CheckUserHasEnoughHP
|
||||||
jr nc, .failed
|
jr nc, .failed
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
pop bc
|
pop bc
|
||||||
callab SubtractHPFromUser
|
callfar SubtractHPFromUser
|
||||||
call UpdateUserInParty
|
call UpdateUserInParty
|
||||||
ld a, 5
|
ld a, 5
|
||||||
|
|
||||||
@@ -9568,7 +9568,7 @@ BattleCommand_MirrorCoat: ; 37c95
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetMoveEffect
|
callfar GetMoveEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp EFFECT_MIRROR_COAT
|
cp EFFECT_MIRROR_COAT
|
||||||
ret z
|
ret z
|
||||||
@@ -9914,7 +9914,7 @@ PlayUserBattleAnim: ; 37e47
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callab PlayBattleAnim
|
callfar PlayBattleAnim
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@@ -9936,7 +9936,7 @@ PlayOpponentBattleAnim: ; 37e54
|
|||||||
push bc
|
push bc
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
|
|
||||||
callab PlayBattleAnim
|
callfar PlayBattleAnim
|
||||||
|
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
pop bc
|
pop bc
|
||||||
@@ -10035,21 +10035,21 @@ GetMoveByte: ; 37ebb
|
|||||||
|
|
||||||
|
|
||||||
DisappearUser: ; 37ec0
|
DisappearUser: ; 37ec0
|
||||||
callba _DisappearUser
|
farcall _DisappearUser
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37ec7
|
; 37ec7
|
||||||
|
|
||||||
|
|
||||||
AppearUserLowerSub: ; 37ec7
|
AppearUserLowerSub: ; 37ec7
|
||||||
callba _AppearUserLowerSub
|
farcall _AppearUserLowerSub
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37ece
|
; 37ece
|
||||||
|
|
||||||
|
|
||||||
AppearUserRaiseSub: ; 37ece
|
AppearUserRaiseSub: ; 37ece
|
||||||
callba _AppearUserRaiseSub
|
farcall _AppearUserRaiseSub
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37ed5
|
; 37ed5
|
||||||
@@ -10060,7 +10060,7 @@ _CheckBattleScene: ; 37ed5
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba CheckBattleScene
|
farcall CheckBattleScene
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
@@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
|
|||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
|
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr c, .genderless_samegender
|
jr c, .genderless_samegender
|
||||||
|
|
||||||
ld b, 1
|
ld b, 1
|
||||||
@@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
|
|||||||
ld [TempMonDVs + 1], a
|
ld [TempMonDVs + 1], a
|
||||||
ld a, 3
|
ld a, 3
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .genderless_samegender
|
jr c, .genderless_samegender
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ BattleCommand_Thief: ; 37492
|
|||||||
|
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, [EffectFailed]
|
ld a, [EffectFailed]
|
||||||
@@ -71,7 +71,7 @@ BattleCommand_Thief: ; 37492
|
|||||||
|
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, [EffectFailed]
|
ld a, [EffectFailed]
|
||||||
|
@@ -104,7 +104,7 @@ HiddenPowerDamage: ; fbced
|
|||||||
; based on the new type, but keep base power.
|
; based on the new type, but keep base power.
|
||||||
ld a, d
|
ld a, d
|
||||||
push af
|
push af
|
||||||
callba BattleCommand_DamageStats ; damagestats
|
farcall BattleCommand_DamageStats ; damagestats
|
||||||
pop af
|
pop af
|
||||||
ld d, a
|
ld d, a
|
||||||
ret
|
ret
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
DetermineLinkBattleResult: ; 2b930
|
DetermineLinkBattleResult: ; 2b930
|
||||||
callba UpdateEnemyMonInParty
|
farcall UpdateEnemyMonInParty
|
||||||
ld hl, PartyMon1HP
|
ld hl, PartyMon1HP
|
||||||
call .CountMonsRemaining
|
call .CountMonsRemaining
|
||||||
push bc
|
push bc
|
||||||
|
@@ -13,11 +13,11 @@ _DisappearUser: ; fbd54
|
|||||||
jr FinishAppearDisappearUser
|
jr FinishAppearDisappearUser
|
||||||
|
|
||||||
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
|
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
|
||||||
callba BattleCommand_RaiseSubNoAnim
|
farcall BattleCommand_RaiseSubNoAnim
|
||||||
jr AppearUser
|
jr AppearUser
|
||||||
|
|
||||||
_AppearUserLowerSub: ; fbd71 (3e:7d71)
|
_AppearUserLowerSub: ; fbd71 (3e:7d71)
|
||||||
callba BattleCommand_LowerSubNoAnim
|
farcall BattleCommand_LowerSubNoAnim
|
||||||
|
|
||||||
AppearUser: ; fbd77 (3e:7d77)
|
AppearUser: ; fbd77 (3e:7d77)
|
||||||
xor a
|
xor a
|
||||||
|
@@ -302,13 +302,13 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_ExecuteBGEffects: ; ccb48
|
_ExecuteBGEffects: ; ccb48
|
||||||
callab ExecuteBGEffects
|
callfar ExecuteBGEffects
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; ccb4f
|
; ccb4f
|
||||||
|
|
||||||
_QueueBGEffect: ; ccb4f (33:4b4f)
|
_QueueBGEffect: ; ccb4f (33:4b4f)
|
||||||
callab QueueBGEffect
|
callfar QueueBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; ccb56 (33:4b56)
|
; ccb56 (33:4b56)
|
||||||
|
@@ -259,7 +259,7 @@ _ShowLinkBattleParticipants: ; 2c1b2
|
|||||||
ld a, "<BOLD_V>"
|
ld a, "<BOLD_V>"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], "<BOLD_S>"
|
ld [hl], "<BOLD_S>"
|
||||||
callba LinkBattle_TrainerHuds ; no need to callba
|
farcall LinkBattle_TrainerHuds ; no need to farcall
|
||||||
ld b, SCGB_DIPLOMA
|
ld b, SCGB_DIPLOMA
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
|
@@ -32,7 +32,7 @@ UsedMoveText: ; 105db9
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callba CheckUserIsCharging
|
farcall CheckUserIsCharging
|
||||||
pop hl
|
pop hl
|
||||||
jr nz, .grammar
|
jr nz, .grammar
|
||||||
|
|
||||||
|
@@ -130,7 +130,7 @@
|
|||||||
const EVENT_GOT_TM12_SWEET_SCENT
|
const EVENT_GOT_TM12_SWEET_SCENT
|
||||||
const EVENT_RELEASED_THE_BEASTS
|
const EVENT_RELEASED_THE_BEASTS
|
||||||
const EVENT_GOT_MASTER_BALL_FROM_ELM
|
const EVENT_GOT_MASTER_BALL_FROM_ELM
|
||||||
; Johto signpost items
|
; Johto hidden items
|
||||||
const EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION
|
const EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION
|
||||||
const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE
|
const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE
|
||||||
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
|
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
const EVENT_TALKED_TO_OAK_IN_KANTO
|
const EVENT_TALKED_TO_OAK_IN_KANTO
|
||||||
const EVENT_GOT_HP_UP_FROM_VERMILION_GUY
|
const EVENT_GOT_HP_UP_FROM_VERMILION_GUY
|
||||||
const EVENT_GOT_TM29_PSYCHIC
|
const EVENT_GOT_TM29_PSYCHIC
|
||||||
; Kanto signpost items
|
; Kanto hidden items
|
||||||
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
|
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
|
||||||
const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
|
const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
|
||||||
const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL
|
const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL
|
||||||
|
@@ -3,17 +3,30 @@ MAP_N_A EQU -1
|
|||||||
GROUP_NONE EQU 0
|
GROUP_NONE EQU 0
|
||||||
MAP_NONE EQU 0
|
MAP_NONE EQU 0
|
||||||
|
|
||||||
; map permissions (wPermission)
|
; map header fields (see maps/map_headers.asm)
|
||||||
|
const_def
|
||||||
|
const MAPHEADER_MAPHEADER2_BANK ; 0
|
||||||
|
const MAPHEADER_TILESET ; 1
|
||||||
|
const MAPHEADER_ENVIRONMENT ; 2
|
||||||
|
const MAPHEADER_MAPHEADER2 ; 3
|
||||||
|
const MAPHEADER_MAPHEADER2_HI ; 4
|
||||||
|
const MAPHEADER_LOCATION ; 5
|
||||||
|
const MAPHEADER_MUSIC ; 6
|
||||||
|
const MAPHEADER_PALETTE ; 7
|
||||||
|
const MAPHEADER_FISHGROUP ; 8
|
||||||
|
NUM_MAPHEADER_ATTRIBUTES EQU const_value
|
||||||
|
|
||||||
|
; map environments (wEnvironment)
|
||||||
const_value SET 1
|
const_value SET 1
|
||||||
const TOWN
|
const TOWN
|
||||||
const ROUTE
|
const ROUTE
|
||||||
const INDOOR
|
const INDOOR
|
||||||
const CAVE
|
const CAVE
|
||||||
const PERM_5
|
const ENVIRONMENT_5
|
||||||
const GATE
|
const GATE
|
||||||
const DUNGEON
|
const DUNGEON
|
||||||
|
|
||||||
; map palettes (wPermission)
|
; map palettes (wEnvironment)
|
||||||
const_def
|
const_def
|
||||||
const PALETTE_AUTO
|
const PALETTE_AUTO
|
||||||
const PALETTE_DAY
|
const PALETTE_DAY
|
||||||
@@ -163,28 +176,28 @@ const_value = -1
|
|||||||
NUM_SPAWNS EQU const_value
|
NUM_SPAWNS EQU const_value
|
||||||
|
|
||||||
|
|
||||||
; TryReadSign arguments (see engine/events.asm)
|
; TryBGEvent arguments (see engine/events.asm)
|
||||||
const_def
|
const_def
|
||||||
const SIGNPOST_READ
|
const BGEVENT_READ
|
||||||
const SIGNPOST_UP
|
const BGEVENT_UP
|
||||||
const SIGNPOST_DOWN
|
const BGEVENT_DOWN
|
||||||
const SIGNPOST_RIGHT
|
const BGEVENT_RIGHT
|
||||||
const SIGNPOST_LEFT
|
const BGEVENT_LEFT
|
||||||
const SIGNPOST_IFSET
|
const BGEVENT_IFSET
|
||||||
const SIGNPOST_IFNOTSET
|
const BGEVENT_IFNOTSET
|
||||||
const SIGNPOST_ITEM
|
const BGEVENT_ITEM
|
||||||
const SIGNPOST_COPY
|
const BGEVENT_COPY
|
||||||
|
|
||||||
; person_event types
|
; object_event types
|
||||||
; TryObjectEvent arguments (see engine/events.asm)
|
; TryObjectEvent arguments (see engine/events.asm)
|
||||||
const_def
|
const_def
|
||||||
const PERSONTYPE_SCRIPT
|
const OBJECTTYPE_SCRIPT
|
||||||
const PERSONTYPE_ITEMBALL
|
const OBJECTTYPE_ITEMBALL
|
||||||
const PERSONTYPE_TRAINER
|
const OBJECTTYPE_TRAINER
|
||||||
const PERSONTYPE_3
|
const OBJECTTYPE_3
|
||||||
const PERSONTYPE_4
|
const OBJECTTYPE_4
|
||||||
const PERSONTYPE_5
|
const OBJECTTYPE_5
|
||||||
const PERSONTYPE_6
|
const OBJECTTYPE_6
|
||||||
|
|
||||||
|
|
||||||
; EmotesPointers indexes (see engine/overworld.asm)
|
; EmotesPointers indexes (see engine/overworld.asm)
|
||||||
|
@@ -25,7 +25,7 @@ const_value SET 1
|
|||||||
const PAL_OW_TREE ; 6
|
const PAL_OW_TREE ; 6
|
||||||
const PAL_OW_ROCK ; 7
|
const PAL_OW_ROCK ; 7
|
||||||
|
|
||||||
; person_events set bit 3 so as not to use the sprite's default palette
|
; object_events set bit 3 so as not to use the sprite's default palette
|
||||||
const_value set (1 << 3)
|
const_value set (1 << 3)
|
||||||
const PAL_NPC_RED ; 8
|
const PAL_NPC_RED ; 8
|
||||||
const PAL_NPC_BLUE ; 9
|
const PAL_NPC_BLUE ; 9
|
||||||
@@ -138,25 +138,25 @@ SPRITEMOVEDATA_FIELDS EQU 6
|
|||||||
const STEP_TYPE_18 ; 18
|
const STEP_TYPE_18 ; 18
|
||||||
const STEP_TYPE_SKYFALL_TOP ; 19
|
const STEP_TYPE_SKYFALL_TOP ; 19
|
||||||
|
|
||||||
; PersonActionPairPointers indexes (see engine/map_object_action.asm)
|
; ObjectActionPairPointers indexes (see engine/map_object_action.asm)
|
||||||
const_def
|
const_def
|
||||||
const PERSON_ACTION_00 ; 00
|
const OBJECT_ACTION_00 ; 00
|
||||||
const PERSON_ACTION_STAND ; 01
|
const OBJECT_ACTION_STAND ; 01
|
||||||
const PERSON_ACTION_STEP ; 02
|
const OBJECT_ACTION_STEP ; 02
|
||||||
const PERSON_ACTION_BUMP ; 03
|
const OBJECT_ACTION_BUMP ; 03
|
||||||
const PERSON_ACTION_SPIN ; 04
|
const OBJECT_ACTION_SPIN ; 04
|
||||||
const PERSON_ACTION_SPIN_FLICKER ; 05
|
const OBJECT_ACTION_SPIN_FLICKER ; 05
|
||||||
const PERSON_ACTION_FISHING ; 06
|
const OBJECT_ACTION_FISHING ; 06
|
||||||
const PERSON_ACTION_SHADOW ; 07
|
const OBJECT_ACTION_SHADOW ; 07
|
||||||
const PERSON_ACTION_EMOTE ; 08
|
const OBJECT_ACTION_EMOTE ; 08
|
||||||
const PERSON_ACTION_BIG_SNORLAX ; 09
|
const OBJECT_ACTION_BIG_SNORLAX ; 09
|
||||||
const PERSON_ACTION_BOUNCE ; 0a
|
const OBJECT_ACTION_BOUNCE ; 0a
|
||||||
const PERSON_ACTION_WEIRD_TREE ; 0b
|
const OBJECT_ACTION_WEIRD_TREE ; 0b
|
||||||
const PERSON_ACTION_BIG_LAPRAS ; 0c
|
const OBJECT_ACTION_BIG_LAPRAS ; 0c
|
||||||
const PERSON_ACTION_BIG_DOLL ; 0d
|
const OBJECT_ACTION_BIG_DOLL ; 0d
|
||||||
const PERSON_ACTION_BOULDER_DUST ; 0e
|
const OBJECT_ACTION_BOULDER_DUST ; 0e
|
||||||
const PERSON_ACTION_GRASS_SHAKE ; 0f
|
const OBJECT_ACTION_GRASS_SHAKE ; 0f
|
||||||
const PERSON_ACTION_SKYFALL ; 10
|
const OBJECT_ACTION_SKYFALL ; 10
|
||||||
|
|
||||||
; Facings indexes (see data/facings.asm)
|
; Facings indexes (see data/facings.asm)
|
||||||
const_def
|
const_def
|
||||||
|
@@ -680,13 +680,13 @@ NUM_TRAINER_CLASSES EQU __enum__
|
|||||||
|
|
||||||
; TrainerClassAttributes fields (see data/trainers/trainer_attributes.asm)
|
; TrainerClassAttributes fields (see data/trainers/trainer_attributes.asm)
|
||||||
const_def
|
const_def
|
||||||
const TRNATTR_ITEM1
|
const TRNATTR_ITEM1 ; 0
|
||||||
const TRNATTR_ITEM2
|
const TRNATTR_ITEM2 ; 1
|
||||||
const TRNATTR_BASEMONEY
|
const TRNATTR_BASEMONEY ; 2
|
||||||
const TRNATTR_AI_MOVE_WEIGHTS
|
const TRNATTR_AI_MOVE_WEIGHTS ; 3
|
||||||
const TRNATTR_AI2
|
const TRNATTR_AI2 ; 4
|
||||||
const TRNATTR_AI_ITEM_SWITCH
|
const TRNATTR_AI_ITEM_SWITCH ; 5
|
||||||
const TRNATTR_AI4
|
const TRNATTR_AI4 ; 6
|
||||||
NUM_TRAINER_ATTRIBUTES EQU const_value
|
NUM_TRAINER_ATTRIBUTES EQU const_value
|
||||||
|
|
||||||
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
|
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user