Merge pull request #423 from roukaour/master

Fix issues #262, #345, #347, #396, #408, and #412
This commit is contained in:
yenatch 2017-12-24 17:39:50 -05:00 committed by GitHub
commit e400fe5142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
591 changed files with 7112 additions and 7094 deletions

View File

@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
and a
ret nz
callba CheckEnemyLockedIn
farcall CheckEnemyLockedIn
ret nz
ld a, [PlayerSubStatus5]
@ -44,7 +44,7 @@ DontSwitch: ; 38041
; 38045
SwitchOften: ; 38045
callab CheckAbleToSwitch
callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@ -80,7 +80,7 @@ SwitchOften: ; 38045
; 38083
SwitchRarely: ; 38083
callab CheckAbleToSwitch
callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@ -115,7 +115,7 @@ SwitchRarely: ; 38083
; 380c1
SwitchSometimes: ; 380c1
callab CheckAbleToSwitch
callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@ -358,12 +358,12 @@ AI_Items: ; 39196
ld a, [bc]
bit CONTEXT_USE_F, a
jr nz, .CheckHalfOrQuarterHP
callab AICheckEnemyHalfHP
callfar AICheckEnemyHalfHP
jp c, .DontUse
ld a, [bc]
bit UNKNOWN_USE_F, a
jp nz, .CheckQuarterHP
callab AICheckEnemyQuarterHP
callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp 1 + 50 percent
@ -371,7 +371,7 @@ AI_Items: ; 39196
jp .DontUse
.CheckQuarterHP: ; 38254 (e:4254)
callab AICheckEnemyQuarterHP
callfar AICheckEnemyQuarterHP
jp c, .DontUse
call Random
cp -1 + 20 percent
@ -379,9 +379,9 @@ AI_Items: ; 39196
jr .UseHealItem
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
callab AICheckEnemyHalfHP
callfar AICheckEnemyHalfHP
jp c, .DontUse
callab AICheckEnemyQuarterHP
callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp -1 + 20 percent
@ -416,7 +416,7 @@ AI_Items: ; 39196
; 382ae
.asm_382ae ; This appears to be unused
callab AICheckEnemyMaxHP
callfar AICheckEnemyMaxHP
jr c, .dont_use
push bc
ld de, EnemyMonMaxHP + 1
@ -433,7 +433,7 @@ AI_Items: ; 39196
ld a, c
cp b
jp c, .check_50_percent
callab AICheckEnemyQuarterHP
callfar AICheckEnemyQuarterHP
jr c, .check_40_percent
.check_50_percent
@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty
callba UpdateEnemyHUD
farcall UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, wEnemyItemState
@ -705,7 +705,7 @@ AI_Switch: ; 3846c
res SUBSTATUS_RAGE, [hl]
xor a
ld [hBattleTurn], a
callab PursuitSwitch
callfar PursuitSwitch
push af
ld a, [CurOTMon]
@ -726,12 +726,12 @@ AI_Switch: ; 3846c
.skiptext
ld a, 1
ld [wBattleHasJustStarted], a
callab NewEnemyMonStatus
callab ResetEnemyStatLevels
callfar NewEnemyMonStatus
callfar ResetEnemyStatLevels
ld hl, PlayerSubStatus1
res SUBSTATUS_IN_LOVE, [hl]
callba EnemySwitch
callba ResetBattleParticipants
farcall EnemySwitch
farcall ResetBattleParticipants
xor a
ld [wBattleHasJustStarted], a
ld a, [wLinkMode]
@ -851,7 +851,7 @@ EnemyUsedXItem:
push bc
call PrintText_UsedItemOn
pop bc
callba CheckIfStatCanBeRaised
farcall CheckIfStatCanBeRaised
jp AIUpdateHUD
; 38568

View File

@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
ret nz
; No use picking a move if there's no choice.
callba CheckEnemyLockedIn
farcall CheckEnemyLockedIn
ret nz

View File

@ -141,7 +141,7 @@ AI_Redundant: ; 2c41a
jr .NotRedundant
.Attract: ; 2c4fe
callba CheckOppositeGender
farcall CheckOppositeGender
jr c, .Redundant
ld a, [PlayerSubStatus1]
bit SUBSTATUS_IN_LOVE, a
@ -184,7 +184,7 @@ AI_Redundant: ; 2c41a
.MorningSun:
.Synthesis:
.Moonlight: ; 2c539
callba AICheckEnemyMaxHP
farcall AICheckEnemyMaxHP
jr nc, .NotRedundant
.Teleport:

View File

@ -29,7 +29,7 @@ AI_Basic: ; 38591
push hl
push de
push bc
callba AI_Redundant
farcall AI_Redundant
pop bc
pop de
pop hl
@ -176,7 +176,7 @@ AI_Types: ; 38635
push de
ld a, 1
ld [hBattleTurn], a
callab BattleCheckTypeMatchup
callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
@ -429,7 +429,7 @@ AI_Smart_LeechHit: ; 387f7
push hl
ld a, 1
ld [hBattleTurn], a
callab BattleCheckTypeMatchup
callfar BattleCheckTypeMatchup
pop hl
; 60% chance to discourage this move if not very effective.
@ -510,7 +510,7 @@ AI_Smart_LockOn: ; 3881d
push hl
push bc
callba BattleCheckTypeMatchup
farcall BattleCheckTypeMatchup
ld a, [wd265]
cp $a
pop bc
@ -572,7 +572,7 @@ AI_Smart_Selfdestruct: ; 388a6
; Unless this is the enemy's last Pokemon...
push hl
callba FindAliveEnemyMons
farcall FindAliveEnemyMons
pop hl
jr nc, .asm_388b7
@ -970,7 +970,7 @@ AI_Smart_ForceSwitch: ; 38a2a
; Consider player's type(s) if its moves are unknown.
push hl
callab CheckPlayerMoveTypeMatchups
callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@ -1368,7 +1368,7 @@ AI_Smart_Mimic: ; 38ba8
ld a, $1
ld [hBattleTurn], a
callab BattleCheckTypeMatchup
callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@ -1763,9 +1763,9 @@ AI_Smart_PriorityHit: ; 38d5a
ld a, $1
ld [hBattleTurn], a
push hl
callab EnemyAttackDamage
callab BattleCommand_DamageCalc
callab BattleCommand_Stab
callfar EnemyAttackDamage
callfar BattleCommand_DamageCalc
callfar BattleCommand_Stab
pop hl
ld a, [CurDamage + 1]
ld c, a
@ -1811,7 +1811,7 @@ AI_Smart_Conversion2: ; 38d98
xor a
ld [hBattleTurn], a
callab BattleCheckTypeMatchup
callfar BattleCheckTypeMatchup
ld a, [wd265]
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.
push hl
callab CheckPlayerMoveTypeMatchups
callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp $b ; not very effective
pop hl
@ -2008,7 +2008,7 @@ AI_Smart_Curse: ; 38e5c
jp nz, AIDiscourageMove
push hl
callba FindAliveEnemyMons
farcall FindAliveEnemyMons
pop hl
jr nc, .asm_38eb0
@ -2137,7 +2137,7 @@ AI_Smart_Foresight: ; 38f1d
AI_Smart_PerishSong: ; 38f4a
push hl
callab FindAliveEnemyMons
callfar FindAliveEnemyMons
pop hl
jr c, .no
@ -2146,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a
jr nz, .yes
push hl
callab CheckPlayerMoveTypeMatchups
callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; 1.0
pop hl
@ -2404,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062
; Consider player's type(s) if its moves are unknown.
push hl
callab CheckPlayerMoveTypeMatchups
callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@ -2466,8 +2466,8 @@ AI_Smart_HiddenPower: ; 3909e
ld [hBattleTurn], a
; Calculate Hidden Power's type and base power based on enemy's DVs.
callab HiddenPowerDamage
callab BattleCheckTypeMatchup
callfar HiddenPowerDamage
callfar BattleCheckTypeMatchup
pop hl
; Discourage Hidden Power if not very effective.
@ -3336,13 +3336,13 @@ AIDamageCalc: ; 393e7
ld hl, .ConstantDamageEffects
call IsInArray
jr nc, .asm_39400
callab BattleCommand_ConstantDamage
callfar BattleCommand_ConstantDamage
ret
.asm_39400
callab EnemyAttackDamage
callab BattleCommand_DamageCalc
callab BattleCommand_Stab
callfar EnemyAttackDamage
callfar BattleCommand_DamageCalc
callfar BattleCommand_Stab
ret
.ConstantDamageEffects:
@ -3459,7 +3459,7 @@ AI_Status: ; 39453
push de
ld a, 1
ld [hBattleTurn], a
callab BattleCheckTypeMatchup
callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl

View File

@ -61,7 +61,7 @@ BattleAnimRunScript: ; cc11c
and a
jr nz, .hi_byte
callba CheckBattleScene
farcall CheckBattleScene
jr c, .disabled
call BattleAnimClearHud
@ -169,7 +169,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld hl, UpdateBattleHuds
ld a, BANK(UpdatePlayerHUD)
rst FarCall ; Why the heck is this a callab?
rst FarCall ; Why not "call UpdateBattleHuds"?
pop af
ld [rSVBK], a
@ -907,7 +907,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
ret
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
callab GetPokeBallWobble
callfar GetPokeBallWobble
ld a, c
ld [BattleAnimVar], a
ret
@ -932,7 +932,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld hl, BattleMonDVs ; BattleMonDVs
predef GetUnownLetter
ld de, VTiles0 tile $00
predef GetFrontpic
predef GetMonFrontpic
jr .done
.player
@ -941,7 +941,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld hl, EnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter
ld de, VTiles0 tile $00
predef GetBackpic
predef GetMonBackpic
.done
pop af
@ -1128,11 +1128,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
and a
jr z, .player
callab DropEnemySub
callfar DropEnemySub
jr .done
.player
callab DropPlayerSub
callfar DropPlayerSub
.done
pop af
@ -1159,14 +1159,14 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
ld hl, BattleMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $00
predef GetFrontpic
predef GetMonFrontpic
jr .done
.player
ld hl, EnemyMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $31
predef GetBackpic
predef GetMonBackpic
.done
pop af
@ -1221,7 +1221,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
call GetBattleAnimByte
ld e, a
ld d, 0
callab PlayStereoSFX
callfar PlayStereoSFX
ret
; cc7f8 (33:47f8)
@ -1311,7 +1311,7 @@ endr
ld a, 1
ld [wStereoPanningMask], a
callab _PlayCryHeader
callfar _PlayCryHeader
.done
pop af

View File

@ -550,7 +550,7 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
ret
_QueueBattleAnimation: ; c82ee (32:42ee)
callab QueueBattleAnimation
callfar QueueBattleAnimation
ret
BattleBGEffect_27: ; c82f5 (32:42f5)
@ -2944,13 +2944,13 @@ BattleBGEffects_CheckSGB: ; c9059 (32:5059)
BattleBGEffects_Sine: ; c905d (32:505d)
ld e, a
callab BattleAnim_Sine_e
callfar BattleAnim_Sine_e
ld a, e
ret
BattleBGEffects_Cosine: ; c9066 (32:5066)
ld e, a
callab BattleAnim_Cosine_e
callfar BattleAnim_Cosine_e
ld a, e
ret

File diff suppressed because it is too large Load Diff

View File

@ -1016,7 +1016,7 @@ IgnoreSleepOnly: ; 3451f
BattleCommand_UsedMoveText: ; 34541
; usedmovetext
callba DisplayUsedMoveText
farcall DisplayUsedMoveText
ret
; 34548
@ -1385,14 +1385,14 @@ BattleCommand_Stab: ; 346d2
push hl
push de
push bc
callba DoWeatherModifiers
farcall DoWeatherModifiers
pop bc
pop de
pop hl
push de
push bc
callba DoBadgeTypeBoosts
farcall DoBadgeTypeBoosts
pop bc
pop de
@ -3862,7 +3862,7 @@ BattleCommand_Counter: ; 35813
ret z
ld b, a
callab GetMoveEffect
callfar GetMoveEffect
ld a, b
cp EFFECT_COUNTER
ret z
@ -4068,7 +4068,7 @@ BattleCommand_PainSplit: ; 35926
call ResetDamage
hlcoord 2, 2
predef AnimateHPBar
callba _UpdateBattleHUDs
farcall _UpdateBattleHUDs
ld hl, SharedPainText
jp StdBattleTextBox
@ -4518,7 +4518,7 @@ BattleCommand_SleepTalk: ; 35b33
push bc
ld b, a
callab GetMoveEffect
callfar GetMoveEffect
ld a, b
pop bc
@ -4747,7 +4747,7 @@ PlayFXAnimID: ; 35d08
ld c, 3
call DelayFrames
callab PlayBattleAnim
callfar PlayBattleAnim
ret
@ -5017,7 +5017,7 @@ BattleCommand_SleepTarget: ; 35e5c
ld hl, FellAsleepText
call StdBattleTextBox
callba UseHeldStatusHealingItem
farcall UseHeldStatusHealingItem
jp z, OpponentCantMove
ret
@ -5094,7 +5094,7 @@ BattleCommand_PoisonTarget: ; 35eee
ld hl, WasPoisonedText
call StdBattleTextBox
callba UseHeldStatusHealingItem
farcall UseHeldStatusHealingItem
ret
; 35f2c
@ -5179,7 +5179,7 @@ BattleCommand_Poison: ; 35f2c
call StdBattleTextBox
.finished
callba UseHeldStatusHealingItem
farcall UseHeldStatusHealingItem
ret
.failed
@ -5382,7 +5382,7 @@ BattleCommand_BurnTarget: ; 3608c
ld hl, WasBurnedText
call StdBattleTextBox
callba UseHeldStatusHealingItem
farcall UseHeldStatusHealingItem
ret
; 360dd
@ -5455,7 +5455,7 @@ BattleCommand_FreezeTarget: ; 36102
ld hl, WasFrozenText
call StdBattleTextBox
callba UseHeldStatusHealingItem
farcall UseHeldStatusHealingItem
ret nz
call OpponentCantMove
@ -6299,11 +6299,11 @@ BattleCommand_Curl: ; 365a7
BattleCommand_RaiseSubNoAnim: ; 365af
ld hl, GetMonBackpic
ld hl, GetBattleMonBackpic
ld a, [hBattleTurn]
and a
jr z, .PlayerTurn
ld hl, GetMonFrontpic
ld hl, GetEnemyMonFrontpic
.PlayerTurn:
xor a
ld [hBGMapMode], a
@ -6816,7 +6816,7 @@ BattleCommand_ForceSwitch: ; 3680f
ld a, d
inc a
ld [wEnemySwitchMonIndex], a
callab ForceEnemySwitch
callfar ForceEnemySwitch
ld hl, DraggedOutText
call StdBattleTextBox
@ -8081,7 +8081,7 @@ BattleCommand_LeechSeed: ; 36f9d
BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove
callba TrainerRankings_Splash
farcall TrainerRankings_Splash
jp PrintNothingHappened
; 36fed
@ -8285,7 +8285,7 @@ BattleCommand_Conversion: ; 3707f
inc de
ld [de], a
ld [wNamedObjectIndexBuffer], a
callba GetTypeName
farcall GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
@ -8608,7 +8608,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_Selfdestruct: ; 37380
callba TrainerRankings_Selfdestruct
farcall TrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a
ld c, 3
@ -8632,8 +8632,8 @@ BattleCommand_Selfdestruct: ; 37380
res SUBSTATUS_DESTINY_BOND, [hl]
call _CheckBattleScene
ret nc
callba DrawPlayerHUD
callba DrawEnemyHUD
farcall DrawPlayerHUD
farcall DrawEnemyHUD
call WaitBGMap
jp RefreshBattleHuds
@ -9032,13 +9032,13 @@ BattleCommand_BatonPass: ; 379c9
; Transition into switchmon menu
call LoadStandardMenuDataHeader
callba SetUpBattlePartyMenu_NoLoop
farcall SetUpBattlePartyMenu_NoLoop
callba ForcePickSwitchMonInBattle
farcall ForcePickSwitchMonInBattle
; Return to battle scene
call ClearPalettes
callba _LoadBattleFontsHPBar
farcall _LoadBattleFontsHPBar
call CloseWindow
call ClearSprites
hlcoord 1, 0
@ -9050,7 +9050,7 @@ BattleCommand_BatonPass: ; 379c9
call BatonPass_LinkPlayerSwitch
; Mobile link battles handle entrances differently
callba CheckMobileBattleError
farcall CheckMobileBattleError
jp c, EndMoveEffect
ld hl, PassedBattleMonEntrance
@ -9075,7 +9075,7 @@ BattleCommand_BatonPass: ; 379c9
call BatonPass_LinkEnemySwitch
; Mobile link battles handle entrances differently
callba CheckMobileBattleError
farcall CheckMobileBattleError
jp c, EndMoveEffect
; Passed enemy PartyMon entrance
@ -9403,7 +9403,7 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
call AnimateCurrentMove
call BattleCommand_SwitchTurn
callab RestoreHP
callfar RestoreHP
call BattleCommand_SwitchTurn
call UpdateUserInParty
@ -9433,7 +9433,7 @@ BattleCommand_HiddenPower: ; 37be8
ld a, [AttackMissed]
and a
ret nz
callba HiddenPowerDamage
farcall HiddenPowerDamage
ret
; 37bf4
@ -9475,14 +9475,14 @@ BattleCommand_BellyDrum: ; 37c1a
and a
jr nz, .failed
callab GetHalfMaxHP
callab CheckUserHasEnoughHP
callfar GetHalfMaxHP
callfar CheckUserHasEnoughHP
jr nc, .failed
push bc
call AnimateCurrentMove
pop bc
callab SubtractHPFromUser
callfar SubtractHPFromUser
call UpdateUserInParty
ld a, 5
@ -9568,7 +9568,7 @@ BattleCommand_MirrorCoat: ; 37c95
ret z
ld b, a
callab GetMoveEffect
callfar GetMoveEffect
ld a, b
cp EFFECT_MIRROR_COAT
ret z
@ -9914,7 +9914,7 @@ PlayUserBattleAnim: ; 37e47
push hl
push de
push bc
callab PlayBattleAnim
callfar PlayBattleAnim
pop bc
pop de
pop hl
@ -9936,7 +9936,7 @@ PlayOpponentBattleAnim: ; 37e54
push bc
call BattleCommand_SwitchTurn
callab PlayBattleAnim
callfar PlayBattleAnim
call BattleCommand_SwitchTurn
pop bc
@ -10035,21 +10035,21 @@ GetMoveByte: ; 37ebb
DisappearUser: ; 37ec0
callba _DisappearUser
farcall _DisappearUser
ret
; 37ec7
AppearUserLowerSub: ; 37ec7
callba _AppearUserLowerSub
farcall _AppearUserLowerSub
ret
; 37ece
AppearUserRaiseSub: ; 37ece
callba _AppearUserRaiseSub
farcall _AppearUserRaiseSub
ret
; 37ed5
@ -10060,7 +10060,7 @@ _CheckBattleScene: ; 37ed5
push hl
push de
push bc
callba CheckBattleScene
farcall CheckBattleScene
pop bc
pop de
pop hl

View File

@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
xor a
ld [MonType], a
callba GetGender
farcall GetGender
jr c, .genderless_samegender
ld b, 1
@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
callba GetGender
farcall GetGender
pop bc
jr c, .genderless_samegender

View File

@ -23,7 +23,7 @@ BattleCommand_Thief: ; 37492
ld [wd265], a
ld d, a
callba ItemIsMail
farcall ItemIsMail
ret c
ld a, [EffectFailed]
@ -71,7 +71,7 @@ BattleCommand_Thief: ; 37492
ld [wd265], a
ld d, a
callba ItemIsMail
farcall ItemIsMail
ret c
ld a, [EffectFailed]

View File

@ -104,7 +104,7 @@ HiddenPowerDamage: ; fbced
; based on the new type, but keep base power.
ld a, d
push af
callba BattleCommand_DamageStats ; damagestats
farcall BattleCommand_DamageStats ; damagestats
pop af
ld d, a
ret

View File

@ -1,5 +1,5 @@
DetermineLinkBattleResult: ; 2b930
callba UpdateEnemyMonInParty
farcall UpdateEnemyMonInParty
ld hl, PartyMon1HP
call .CountMonsRemaining
push bc

View File

@ -13,11 +13,11 @@ _DisappearUser: ; fbd54
jr FinishAppearDisappearUser
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
callba BattleCommand_RaiseSubNoAnim
farcall BattleCommand_RaiseSubNoAnim
jr AppearUser
_AppearUserLowerSub: ; fbd71 (3e:7d71)
callba BattleCommand_LowerSubNoAnim
farcall BattleCommand_LowerSubNoAnim
AppearUser: ; fbd77 (3e:7d77)
xor a

View File

@ -302,13 +302,13 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31)
ret
_ExecuteBGEffects: ; ccb48
callab ExecuteBGEffects
callfar ExecuteBGEffects
ret
; ccb4f
_QueueBGEffect: ; ccb4f (33:4b4f)
callab QueueBGEffect
callfar QueueBGEffect
ret
; ccb56 (33:4b56)

View File

@ -259,7 +259,7 @@ _ShowLinkBattleParticipants: ; 2c1b2
ld a, "<BOLD_V>"
ld [hli], a
ld [hl], "<BOLD_S>"
callba LinkBattle_TrainerHuds ; no need to callba
farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes

View File

@ -32,7 +32,7 @@ UsedMoveText: ; 105db9
ld [wd265], a
push hl
callba CheckUserIsCharging
farcall CheckUserIsCharging
pop hl
jr nz, .grammar

View File

@ -130,7 +130,7 @@
const EVENT_GOT_TM12_SWEET_SCENT
const EVENT_RELEASED_THE_BEASTS
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_5F_HIDDEN_FULL_RESTORE
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
@ -236,7 +236,7 @@
const EVENT_TALKED_TO_OAK_IN_KANTO
const EVENT_GOT_HP_UP_FROM_VERMILION_GUY
const EVENT_GOT_TM29_PSYCHIC
; Kanto signpost items
; Kanto hidden items
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL

View File

@ -3,17 +3,30 @@ MAP_N_A EQU -1
GROUP_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 TOWN
const ROUTE
const INDOOR
const CAVE
const PERM_5
const ENVIRONMENT_5
const GATE
const DUNGEON
; map palettes (wPermission)
; map palettes (wEnvironment)
const_def
const PALETTE_AUTO
const PALETTE_DAY
@ -163,28 +176,28 @@ const_value = -1
NUM_SPAWNS EQU const_value
; TryReadSign arguments (see engine/events.asm)
; TryBGEvent arguments (see engine/events.asm)
const_def
const SIGNPOST_READ
const SIGNPOST_UP
const SIGNPOST_DOWN
const SIGNPOST_RIGHT
const SIGNPOST_LEFT
const SIGNPOST_IFSET
const SIGNPOST_IFNOTSET
const SIGNPOST_ITEM
const SIGNPOST_COPY
const BGEVENT_READ
const BGEVENT_UP
const BGEVENT_DOWN
const BGEVENT_RIGHT
const BGEVENT_LEFT
const BGEVENT_IFSET
const BGEVENT_IFNOTSET
const BGEVENT_ITEM
const BGEVENT_COPY
; person_event types
; object_event types
; TryObjectEvent arguments (see engine/events.asm)
const_def
const PERSONTYPE_SCRIPT
const PERSONTYPE_ITEMBALL
const PERSONTYPE_TRAINER
const PERSONTYPE_3
const PERSONTYPE_4
const PERSONTYPE_5
const PERSONTYPE_6
const OBJECTTYPE_SCRIPT
const OBJECTTYPE_ITEMBALL
const OBJECTTYPE_TRAINER
const OBJECTTYPE_3
const OBJECTTYPE_4
const OBJECTTYPE_5
const OBJECTTYPE_6
; EmotesPointers indexes (see engine/overworld.asm)

View File

@ -25,7 +25,7 @@ const_value SET 1
const PAL_OW_TREE ; 6
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 PAL_NPC_RED ; 8
const PAL_NPC_BLUE ; 9
@ -138,25 +138,25 @@ SPRITEMOVEDATA_FIELDS EQU 6
const STEP_TYPE_18 ; 18
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 PERSON_ACTION_00 ; 00
const PERSON_ACTION_STAND ; 01
const PERSON_ACTION_STEP ; 02
const PERSON_ACTION_BUMP ; 03
const PERSON_ACTION_SPIN ; 04
const PERSON_ACTION_SPIN_FLICKER ; 05
const PERSON_ACTION_FISHING ; 06
const PERSON_ACTION_SHADOW ; 07
const PERSON_ACTION_EMOTE ; 08
const PERSON_ACTION_BIG_SNORLAX ; 09
const PERSON_ACTION_BOUNCE ; 0a
const PERSON_ACTION_WEIRD_TREE ; 0b
const PERSON_ACTION_BIG_LAPRAS ; 0c
const PERSON_ACTION_BIG_DOLL ; 0d
const PERSON_ACTION_BOULDER_DUST ; 0e
const PERSON_ACTION_GRASS_SHAKE ; 0f
const PERSON_ACTION_SKYFALL ; 10
const OBJECT_ACTION_00 ; 00
const OBJECT_ACTION_STAND ; 01
const OBJECT_ACTION_STEP ; 02
const OBJECT_ACTION_BUMP ; 03
const OBJECT_ACTION_SPIN ; 04
const OBJECT_ACTION_SPIN_FLICKER ; 05
const OBJECT_ACTION_FISHING ; 06
const OBJECT_ACTION_SHADOW ; 07
const OBJECT_ACTION_EMOTE ; 08
const OBJECT_ACTION_BIG_SNORLAX ; 09
const OBJECT_ACTION_BOUNCE ; 0a
const OBJECT_ACTION_WEIRD_TREE ; 0b
const OBJECT_ACTION_BIG_LAPRAS ; 0c
const OBJECT_ACTION_BIG_DOLL ; 0d
const OBJECT_ACTION_BOULDER_DUST ; 0e
const OBJECT_ACTION_GRASS_SHAKE ; 0f
const OBJECT_ACTION_SKYFALL ; 10
; Facings indexes (see data/facings.asm)
const_def

View File

@ -680,13 +680,13 @@ NUM_TRAINER_CLASSES EQU __enum__
; TrainerClassAttributes fields (see data/trainers/trainer_attributes.asm)
const_def
const TRNATTR_ITEM1
const TRNATTR_ITEM2
const TRNATTR_BASEMONEY
const TRNATTR_AI_MOVE_WEIGHTS
const TRNATTR_AI2
const TRNATTR_AI_ITEM_SWITCH
const TRNATTR_AI4
const TRNATTR_ITEM1 ; 0
const TRNATTR_ITEM2 ; 1
const TRNATTR_BASEMONEY ; 2
const TRNATTR_AI_MOVE_WEIGHTS ; 3
const TRNATTR_AI2 ; 4
const TRNATTR_AI_ITEM_SWITCH ; 5
const TRNATTR_AI4 ; 6
NUM_TRAINER_ATTRIBUTES EQU const_value
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)

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