From 39524cdb766660a7bf6d60379040349652cecc04 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 15 Jul 2015 15:48:44 -0400 Subject: More enumeration of constants, more annotations of scripts. --- battle/core.asm | 20 ++++++++++---------- battle/effect_commands.asm | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'battle') diff --git a/battle/core.asm b/battle/core.asm index 0d2f5f6d7..7c16f5934 100644 --- a/battle/core.asm +++ b/battle/core.asm @@ -2452,7 +2452,7 @@ Function3cfa4: ; 3cfa4 and a ld a, b call z, Function3d0ea - callab Function39939 + callab Battle_GetTrainerName ld hl, BattleText_0x809da call StdBattleTextBox call IsMobileBattle @@ -2493,7 +2493,7 @@ Function3cfa4: ; 3cfa4 call DelayFrames call EmptyBattleTextBox ld c, $3 - callba Function11c000 + callba StoreText call Functiona80 ld hl, wPayDayMoney ld a, [hli] @@ -2903,7 +2903,7 @@ Function3d227: ; 3d227 call ClearPalettes call DelayFrame call Function3eda6 - call Function1c17 + call WriteBackup call ClearSGB call Function32f9 call Function3f26d @@ -3100,7 +3100,7 @@ LostBattle: ; 3d38e call EmptyBattleTextBox ld c, 2 - callba Function11c000 + callba StoreText call Functiona80 call ClearTileMap call WhiteBGMap @@ -3644,7 +3644,7 @@ Function3d714: ; 3d714 Function3d74b: ; 3d74b ld a, [CurPartyMon] push af - callab Function39939 + callab Battle_GetTrainerName ld hl, BattleText_0x80aca call StdBattleTextBox lb bc, 1, 7 @@ -3695,7 +3695,7 @@ Function3d7a0: ; 3d7a0 ; 3d7b8 Function3d7b8: ; 3d7b8 - callab Function39939 + callab Battle_GetTrainerName ld hl, BattleText_0x80af8 call StdBattleTextBox jp WaitBGMap @@ -5312,7 +5312,7 @@ Function3e299: call ClearPalettes call DelayFrame call Function3eda6 - call Function1c17 + call WriteBackup call Function309d call ClearSGB call Function32f9 @@ -5395,7 +5395,7 @@ Function3e358: ; 3e358 call DelayFrame call ClearSprites call Function3eda6 - call Function1c17 + call WriteBackup call ClearSGB call Function32f9 ld a, [CurPartyMon] @@ -5411,7 +5411,7 @@ Function3e3ad: ; 3e3ad jr z, .asm_3e3c1 call Function1d6e call Function3e8e4 - call Function1c17 + call WriteBackup .asm_3e3c1 call Function3e7c1 @@ -9455,7 +9455,7 @@ BattleStartMessage: ; 3fc8b ld c, 20 call DelayFrames - callba Function39939 + callba Battle_GetTrainerName ld hl, WantsToBattleText jr .asm_3fd0e diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm index 7c1fa738a..30376ea98 100644 --- a/battle/effect_commands.asm +++ b/battle/effect_commands.asm @@ -9710,7 +9710,7 @@ BattleCommand67: ; 379c9 ; Return to battle scene call ClearPalettes callba Function3ed9f - call Function1c17 + call WriteBackup call ClearSprites hlcoord 1, 0 lb bc, 4, 10 @@ -9779,7 +9779,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67 call Function1d6e ld hl, Function3e8e4 call CallBattleCore - call Function1c17 + call WriteBackup xor a ld [wd0ec], a @@ -9810,7 +9810,7 @@ BatonPass_LinkEnemySwitch: ; 37a82 add NUM_MOVES ld [wBattleAction], a .asm_37aa8 - jp Function1c17 + jp WriteBackup ; 37aab -- cgit v1.2.3 From 60cd04b02300c288a01a2f78a44cb39cbe6861d1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 18 Jul 2015 23:45:39 -0400 Subject: Trainer data structure and field move functions Trainer data in map scripts is now a macro-defined structure. Field move functions in main.asm are now nearly completely annotated, with local references. Trailing white space deleted. --- battle/ai/scoring.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'battle') diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm index 425d6911b..d382011a6 100644 --- a/battle/ai/scoring.asm +++ b/battle/ai/scoring.asm @@ -151,7 +151,7 @@ AI_Setup: ; 385e0 AI_Types: ; 38635 ; Dismiss any move that the player is immune to. ; Encourage super-effective moves. -; Discourage not very effective moves unless +; Discourage not very effective moves unless ; all damaging moves are of the same type. ld hl, Buffer1 - 1 @@ -963,9 +963,9 @@ AI_Smart_Bide: ; 38a1e AI_Smart_Whirlwind: ; 38a2a ; Whirlwind, Roar. -; Discourage this move if the player has not shown +; Discourage this move if the player has not shown ; a super-effective move against the enemy. -; Consider player's type(s) if its moves are unknown. +; Consider player's type(s) if its moves are unknown. push hl callab Function3484e @@ -1231,7 +1231,7 @@ AI_Smart_Paralyze: ; 38b26 call AICheckPlayerQuarterHP jr nc, .asm_38b3a -; 80% chance to greatly encourage this move +; 80% chance to greatly encourage this move ; if enemy is slower than player and its HP is above 25%. call AICompareSpeed ret c @@ -1879,7 +1879,7 @@ AI_Smart_MeanLook: ; 38dfb bit SUBSTATUS_TOXIC, a jr nz, .asm_38e26 -; 80% chance to greatly encourage this move if the player is either +; 80% chance to greatly encourage this move if the player is either ; in love, identified, stuck in Rollout, or has a Nightmare. ld a, [PlayerSubStatus1] and 1<