diff options
| author | YamaArashi <shadow962@live.com> | 2016-06-11 21:30:31 -0700 |
|---|---|---|
| committer | YamaArashi <shadow962@live.com> | 2016-06-11 21:33:57 -0700 |
| commit | 4c5c98cb2a1bc747a0eb397cb75e48dc8a098494 (patch) | |
| tree | 2872a6436075c0d6132671e98af44f0a1429e498 /engine/battle | |
| parent | 54143d33fc1211fb0c949ba62633d1c8d94f2717 (diff) | |
sync engine code with pokered
Diffstat (limited to 'engine/battle')
| -rwxr-xr-x | engine/battle/animations.asm | 7 | ||||
| -rw-r--r-- | engine/battle/battle_transitions.asm | 10 | ||||
| -rw-r--r-- | engine/battle/common_text.asm | 4 | ||||
| -rwxr-xr-x | engine/battle/core.asm | 18 | ||||
| -rw-r--r-- | engine/battle/decrement_pp.asm | 2 | ||||
| -rw-r--r-- | engine/battle/get_trainer_name.asm | 1 | ||||
| -rw-r--r-- | engine/battle/link_battle_versus_text.asm | 2 | ||||
| -rw-r--r-- | engine/battle/trainer_ai.asm | 6 |
8 files changed, 24 insertions, 26 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 31148392..bfbaa180 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1034,6 +1034,7 @@ TailWhipAnimationUnused: ld c, 20 jp DelayFrames +; Format: Special Effect ID (1 byte), Address (2 bytes) SpecialEffectPointers: db SE_DARK_SCREEN_FLASH ; $FE dw AnimationFlashScreen @@ -2040,7 +2041,7 @@ _AnimationSlideMonOff: ; functions below catch it by checking if the tile number is within the valid ; range and if not, replacing it with a blank tile. -.PlayerNextTile ; 79702 (1e:5702) +.PlayerNextTile ld a, [hl] add 7 ; bugfix: compares against the max tile + 1 as opposed to the max tile @@ -2049,7 +2050,7 @@ _AnimationSlideMonOff: ld a, " " ret -.EnemyNextTile ; 7970b (1e:570b) +.EnemyNextTile ld a, [hl] sub 7 ; This has the same problem as above, but it has no visible effect because @@ -3202,7 +3203,7 @@ TossBallAnimation: ; sequence of animations that make up the Poké Ball toss db POOF_ANIM, HIDEPIC_ANIM, SHAKE_ANIM, POOF_ANIM, SHOWPIC_ANIM -.BlockBall ; 79ff6 (1e:5ff6) +.BlockBall ld a, TOSS_ANIM ld [wAnimationID], a call PlayAnimation diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index a4871837..2f3e4e91 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -1,5 +1,5 @@ BattleTransition: - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a @@ -363,7 +363,7 @@ BattleTransition_FlashScreen_: jr z, .done ld [rBGP], a call UpdateGBCPal_BGP - ld c, $2 + ld c, 2 call DelayFrames jr .loop .done @@ -377,7 +377,7 @@ BattleTransition_FlashScreenPalettes: ; used for low level trainer dungeon battles BattleTransition_Shrink: - ld c,9 + ld c, 9 .loop push bc xor a @@ -411,7 +411,7 @@ BattleTransition_Shrink: ; used for high level trainer dungeon battles BattleTransition_Split: - ld c,$9 + ld c, 9 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop @@ -632,7 +632,7 @@ BattleTransition_Circle_Sub1: ret BattleTransition_TransferDelay3: - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index 02bb1a61..d84d0300 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -1,5 +1,5 @@ PrintBeginningBattleText: - ld a, [wIsInBattle] ; W_ISINBATTLE + ld a, [wIsInBattle] dec a jr nz, .trainerBattle ld a, [wCurMap] @@ -80,7 +80,7 @@ PrintBeginningBattleText: ld [wFrequencyModifier], a ld a, $80 ld [wTempoModifier], a - ld a, $e9 ; (SFX_08_77 - SFX_Headers_08) / 3 + ld a, SFX_SILPH_SCOPE call PlaySound jp WaitForSoundToFinish .done diff --git a/engine/battle/core.asm b/engine/battle/core.asm index fa56e5b2..c061b291 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1227,7 +1227,7 @@ ChooseNextMon: ld a, [wLinkState] cp LINK_STATE_BATTLING jr nz, .notLinkBattle - ld a, $1 + ld a, 1 ld [wActionResultOrTookBattleTurn], a call LinkBattleExchangeData .notLinkBattle @@ -1956,7 +1956,7 @@ AnimateRetreatingPlayerMon: .clearScreenArea coord hl, 1, 5 lb bc, 7, 7 - call ClearScreenArea ; jp + call ClearScreenArea ret ; reads player's current mon's HP into wBattleMonHP @@ -2347,7 +2347,7 @@ DisplayBattleMenu: call PrintText jp DisplayBattleMenu -.RunAwayText ; 3d0df (f:50df) +.RunAwayText TX_FAR _RunAwayText db "@" @@ -2561,7 +2561,7 @@ PartyMenuOrRockOrRun: predef StatusScreen predef StatusScreen2 ; now we need to reload the enemy mon pic - ld a, $1 + ld a, 1 ld [H_WHOSETURN], a ld a, [wEnemyBattleStatus2] bit HasSubstituteUp, a ; does the enemy mon have a substitute? @@ -2961,7 +2961,7 @@ AnyMoveToSelect: jr .noMovesLeft .handleDisabledMove swap a - and $f ; get move disabled + and $f ; get disabled move ld b, a ld d, NUM_MOVES + 1 xor a @@ -3379,7 +3379,7 @@ getPlayerAnimationType: ld a,4 ; move has no effect other than dealing damage jr z,playPlayerMoveAnimation ld a,5 ; move has effect -playPlayerMoveAnimation ; 3d890 (f:5890) +playPlayerMoveAnimation: push af ld a,[wPlayerBattleStatus2] bit HasSubstituteUp,a @@ -3398,7 +3398,7 @@ playPlayerMoveAnimation ; 3d890 (f:5890) ld b,BANK(ReshowSubstituteAnim) call nz,Bankswitch jr MirrorMoveCheck -playerCheckIfFlyOrChargeEffect ; 3d8bd (f:58bd) +playerCheckIfFlyOrChargeEffect: ld c,30 call DelayFrames ld a,[wPlayerMoveEffect] @@ -4105,7 +4105,7 @@ PrintMoveFailureText: ret nz ; if you get here, the mon used jump kick or hi jump kick and missed - ld hl, wDamage ; since the move missed, W_DAMAGE will always contain 0 at this point. + ld hl, wDamage ; since the move missed, wDamage will always contain 0 at this point. ; Thus, recoil damage will always be equal to 1 ; even if it was intended to be potential damage/8. ld a, [hli] @@ -7173,7 +7173,7 @@ FellAsleepText: TX_FAR _FellAsleepText db "@" -AlreadyAsleepText: ; 3f1cd (f:71cds) +AlreadyAsleepText: TX_FAR _AlreadyAsleepText db "@" diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm index fd1a3184..e23a85ba 100644 --- a/engine/battle/decrement_pp.asm +++ b/engine/battle/decrement_pp.asm @@ -33,7 +33,7 @@ DecrementPP: ld a, [wPlayerMonNumber] ; which mon in party is active ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ; calculate address of the mon to modify -.DecrementPP ; f4301 (3d:4301) +.DecrementPP: ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm index e051a02a..36ca019e 100644 --- a/engine/battle/get_trainer_name.asm +++ b/engine/battle/get_trainer_name.asm @@ -19,7 +19,6 @@ GetTrainerName_: call GetName ld hl, wcd6d .foundName -.rival ld de, wTrainerName ld bc, $d jp CopyData diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm index 5edf13e6..63142ba6 100644 --- a/engine/battle/link_battle_versus_text.asm +++ b/engine/battle/link_battle_versus_text.asm @@ -2,7 +2,7 @@ DisplayLinkBattleVersusTextBox: call LoadTextBoxTilePatterns coord hl, 3, 4 - ld bc, $70c + lb bc, 7, 12 call TextBoxBorder coord hl, 4, 5 ld de, wPlayerName diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index 3624f5ea..2f2c46a6 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -740,8 +740,7 @@ AICureStatus: res 0,[hl] ret -AIUseXAccuracy: -; unused +AIUseXAccuracy: ; unused call AIPlayRestoringSFX ld hl,wEnemyBattleStatus2 set 0,[hl] @@ -755,8 +754,7 @@ AIUseGuardSpec: ld a,GUARD_SPEC jp AIPrintItemUse -AIUseDireHit: -; unused +AIUseDireHit: ; unused call AIPlayRestoringSFX ld hl,wEnemyBattleStatus2 set 2,[hl] |
