diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-06-29 12:26:02 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-06-29 12:26:02 -0400 |
commit | 8d1adbe2a946edf6c1b456b0c2ad04d1c9f41cd9 (patch) | |
tree | 47ef2660a899d4d7de03740d2a2fd40d12abc618 /engine/battle | |
parent | c3e09695f21cb6b77544c5cca6cbf439577f6ebd (diff) |
Bank3d documentation.
Diffstat (limited to 'engine/battle')
-rw-r--r-- | engine/battle/common_text.asm | 56 | ||||
-rw-r--r-- | engine/battle/decrement_pp.asm | 4 | ||||
-rw-r--r-- | engine/battle/link_battle_versus_text.asm | 5 | ||||
-rwxr-xr-x | engine/battle/safari_zone.asm | 14 | ||||
-rw-r--r-- | engine/battle/scroll_draw_trainer_pic.asm | 4 | ||||
-rw-r--r-- | engine/battle/unused_stats_functions.asm | 4 |
6 files changed, 49 insertions, 38 deletions
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index 9a00bd98..d3200beb 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -1,4 +1,4 @@ -PrintBeginningBattleText: ; 58d99 (16:4d99) +PrintBeginningBattleText: ; f4000 (3d:4000) ld a, [W_ISINBATTLE] ; W_ISINBATTLE dec a jr nz, .trainerBattle @@ -8,8 +8,20 @@ PrintBeginningBattleText: ; 58d99 (16:4d99) cp LAVENDER_HOUSE_1 jr c, .pokemonTower .notPokemonTower + ld a,[W_BATTLETYPE] + cp $4 ; new battle type? + jr nz,.notnewbattletype + callab Func_fd0d0 + ld e,$24 + jr c,.asm_f4026 + ld e,$a +.asm_f4026 + callab Func_f0000 + jr .continue +.notnewbattletype ld a, [wEnemyMonSpecies2] call PlayCry +.continue ld hl, WildMonAppearedText ld a, [W_MOVEMISSED] ; W_MOVEMISSED and a @@ -70,31 +82,31 @@ PrintBeginningBattleText: ; 58d99 (16:4d99) .done ret -WildMonAppearedText: ; 58e3b (16:4e3b) +WildMonAppearedText: ; f40c7 (3d:40c7) TX_FAR _WildMonAppearedText db "@" -HookedMonAttackedText: ; 58e40 (16:4e40) +HookedMonAttackedText: ; f40cc (3d:40cc) TX_FAR _HookedMonAttackedText db "@" -EnemyAppearedText: ; 58e45 (16:4e45) +EnemyAppearedText: ; f40d1 (3d:40d1) TX_FAR _EnemyAppearedText db "@" -TrainerWantsToFightText: ; 58e4a (16:4e4a) +TrainerWantsToFightText: ; f40d6 (3d:40d6) TX_FAR _TrainerWantsToFightText db "@" -UnveiledGhostText: ; 58e4f (16:4e4f) +UnveiledGhostText: ; f40db (3d:40db) TX_FAR _UnveiledGhostText db "@" -GhostCantBeIDdText: ; 58e54 (16:4e54) +GhostCantBeIDdText: ; f40e0 (3d:40e0) TX_FAR _GhostCantBeIDdText db "@" -PrintSendOutMonMessage: ; 58e59 (16:4e59) +PrintSendOutMonMessage: ; f40e0 (3d:40e5) ld hl, wEnemyMonHP ld a, [hli] or [hl] @@ -126,7 +138,7 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59) ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP ld hl, GoText ; 70% or greater cp 70 - jr nc, .printText + jr nc, .printText ld hl, DoItText ; 40% - 69% cp 40 jr nc, .printText @@ -137,38 +149,38 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59) .printText jp PrintText -GoText: ; 58eae (16:4eae) +GoText: ; f413a (3d:413a) TX_FAR _GoText db $08 ; asm jr PrintPlayerMon1Text -DoItText: ; 58eb5 (16:4eb5) +DoItText: ; f4141 (3d:4141) TX_FAR _DoItText db $08 ; asm jr PrintPlayerMon1Text -GetmText: ; 58ebc (16:4ebc) +GetmText: ; f4148 (3d:4148) TX_FAR _GetmText db $08 ; asm jr PrintPlayerMon1Text -EnemysWeakText: ; 58ec3 (16:4ec3) +EnemysWeakText: ; f414f (3d:414f) TX_FAR _EnemysWeakText db $08 ; asm -PrintPlayerMon1Text: +PrintPlayerMon1Text: ; f4154 (3d:4154) ld hl, PlayerMon1Text ret -PlayerMon1Text: ; 58ecc (16:4ecc) +PlayerMon1Text: ; f4158 (3d:4158) TX_FAR _PlayerMon1Text db "@" -RetreatMon: ; 58ed1 (16:4ed1) +RetreatMon: ; f415d (3d:415d) ld hl, PlayerMon2Text jp PrintText -PlayerMon2Text: ; 58ed7 (16:4ed7) +PlayerMon2Text: ; f4163 (3d:4163) TX_FAR _PlayerMon2Text db $08 ; asm push de @@ -214,25 +226,25 @@ PlayerMon2Text: ; 58ed7 (16:4ed7) ld hl, GoodText ret -EnoughText: ; 58f25 (16:4f25) +EnoughText: ; f41b1 (3d:41b1) TX_FAR _EnoughText db $08 ; asm jr PrintComeBackText -OKExclamationText: ; 58f2c (16:4f2c) +OKExclamationText: ; f41b8 (3d:41b8) TX_FAR _OKExclamationText db $08 ; asm jr PrintComeBackText -GoodText: ; 58f33 (16:4f33) +GoodText: ; f41bf (3d:41bf) TX_FAR _GoodText db $08 ; asm jr PrintComeBackText -PrintComeBackText: ; 58f3a (16:4f3a) +PrintComeBackText: ; f41c6 (3d:41c6) ld hl, ComeBackText ret -ComeBackText: ; 58f3e (16:4f3e) +ComeBackText: ; f41ca (3d:41ca) TX_FAR _ComeBackText db "@" diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm index ecf5040b..7774070c 100644 --- a/engine/battle/decrement_pp.asm +++ b/engine/battle/decrement_pp.asm @@ -1,4 +1,4 @@ -DecrementPP: ; 68000 (1a:4000) +DecrementPP: ; f42db (3d:42db) ; after using a move, decrement pp in battle and (if not transformed?) in party ld a, [de] cp a, STRUGGLE @@ -33,7 +33,7 @@ DecrementPP: ; 68000 (1a:4000) ld a, [wPlayerMonNumber] ; which mon in party is active ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ; calculate address of the mon to modify -.DecrementPP +.DecrementPP ; f4301 (3d:4301) ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm index 7320da29..d2dfe5c0 100644 --- a/engine/battle/link_battle_versus_text.asm +++ b/engine/battle/link_battle_versus_text.asm @@ -1,9 +1,8 @@ ; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names -DisplayLinkBattleVersusTextBox: ; 372d6 (d:72d6) +DisplayLinkBattleVersusTextBox: ; f41cf (3d:41cf) call LoadTextBoxTilePatterns hlCoord 3, 4 - ld b, $7 - ld c, $c + ld b, $70c call TextBoxBorder hlCoord 4, 5 ld de, wPlayerName diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm index 6b0e2220..e195966d 100755 --- a/engine/battle/safari_zone.asm +++ b/engine/battle/safari_zone.asm @@ -1,19 +1,19 @@ -PrintSafariZoneBattleText: ; 4277 (1:4277) +PrintSafariZoneBattleText: ; 4111 (1:4111) ld hl, wSafariBaitFactor ld a, [hl] and a - jr z, .asm_4284 + jr z, .asm_411e dec [hl] ld hl, SafariZoneEatingText jr .asm_429f -.asm_4284 +.asm_411e dec hl ld a, [hl] and a ret z dec [hl] ld hl, SafariZoneAngryText - jr nz, .asm_429f + jr nz, .asm_4139 push hl ld a, [wEnemyMonSpecies] ld [wd0b5], a @@ -21,16 +21,16 @@ PrintSafariZoneBattleText: ; 4277 (1:4277) ld a, [W_MONHCATCHRATE] ld [wEnemyMonCatchRate], a pop hl -.asm_429f +.asm_4138 push hl call LoadScreenTilesFromBuffer1 pop hl jp PrintText -SafariZoneEatingText: ; 42a7 (1:42a7) +SafariZoneEatingText: ; 4141 (1:4141) TX_FAR _SafariZoneEatingText db "@" -SafariZoneAngryText: ; 42ac (1:42ac) +SafariZoneAngryText: ; 4146 (1:4146) TX_FAR _SafariZoneAngryText db "@" diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm index 18df86e0..c6b69362 100644 --- a/engine/battle/scroll_draw_trainer_pic.asm +++ b/engine/battle/scroll_draw_trainer_pic.asm @@ -1,4 +1,4 @@ -_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) +_ScrollTrainerPicAfterBattle: ; f4259 (e:f4259) ; Load the enemy trainer's pic and scrolls it into ; the screen from the right. xor a @@ -32,7 +32,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) jr .scrollLoop ; write one 7-tile column of the trainer pic to the tilemap -DrawTrainerPicColumn: ; 39707 (e:5707) +DrawTrainerPicColumn: ; f428d (3d:428d) push hl push de push bc diff --git a/engine/battle/unused_stats_functions.asm b/engine/battle/unused_stats_functions.asm index 23ddbc20..5b2e5e0e 100644 --- a/engine/battle/unused_stats_functions.asm +++ b/engine/battle/unused_stats_functions.asm @@ -1,5 +1,5 @@ ; does nothing since no stats are ever selected (barring glitches) -DoubleSelectedStats: ; 39680 (e:5680) +DoubleSelectedStats: ; f4206 (3d:4206) ld a, [H_WHOSETURN] and a ld a, [wPlayerStatsToDouble] @@ -29,7 +29,7 @@ DoubleSelectedStats: ; 39680 (e:5680) ret ; does nothing since no stats are ever selected (barring glitches) -HalveSelectedStats: ; 396a7 (e:56a7) +HalveSelectedStats: ; f422d (3d:422d) ld a, [H_WHOSETURN] and a ld a, [wPlayerStatsToHalve] |