diff options
Diffstat (limited to 'engine/battle')
22 files changed, 341 insertions, 334 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index ee476ce9..78301b2e 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1838,10 +1838,10 @@ AnimationWavyScreen: call Delay3 xor a ld [hAutoBGTransferEnabled], a - ld a, SCREEN_HEIGHT_PIXELS + ld a, SCREEN_HEIGHT_PX ld [hWY], a ld d, $80 ; terminator - ld e, SCREEN_HEIGHT_PIXELS - 1 + ld e, SCREEN_HEIGHT_PX - 1 ld c, $ff ld hl, WavyScreenLineOffsets .loop @@ -2538,7 +2538,7 @@ AnimationShakeEnemyHUD: ; Now that the regular BG is showing the same thing the window was, move the ; window off the screen so that we can modify its contents below. - ld a, SCREEN_HEIGHT_PIXELS + ld a, SCREEN_HEIGHT_PX ld [hWY], a ; Copy wTileMap to VRAM such that the row below the enemy HUD (in wTileMap) is @@ -2575,7 +2575,7 @@ AnimationShakeEnemyHUD: ; Restore the original graphics. call AnimationShowMonPic call ClearSprites - ld a, SCREEN_HEIGHT_PIXELS + ld a, SCREEN_HEIGHT_PX ld [hWY], a ld hl, vBGMap1 call BattleAnimCopyTileMapToVRAM diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 98e87dc0..548e85fb 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -10,7 +10,7 @@ BattleTransition: ; Determine which OAM block is being used by the enemy trainer sprite (if there ; is one). - ld hl, wSpriteStateData1 + 2 + ld hl, wSpritePlayerStateData1ImageIndex ld a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle) ld c, a ld b, 0 diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index e8998414..1cb455f3 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -71,28 +71,28 @@ PrintBeginningBattleText: ret WildMonAppearedText: - TX_FAR _WildMonAppearedText - db "@" + text_far _WildMonAppearedText + text_end HookedMonAttackedText: - TX_FAR _HookedMonAttackedText - db "@" + text_far _HookedMonAttackedText + text_end EnemyAppearedText: - TX_FAR _EnemyAppearedText - db "@" + text_far _EnemyAppearedText + text_end TrainerWantsToFightText: - TX_FAR _TrainerWantsToFightText - db "@" + text_far _TrainerWantsToFightText + text_end UnveiledGhostText: - TX_FAR _UnveiledGhostText - db "@" + text_far _UnveiledGhostText + text_end GhostCantBeIDdText: - TX_FAR _GhostCantBeIDdText - db "@" + text_far _GhostCantBeIDdText + text_end PrintSendOutMonMessage: ld hl, wEnemyMonHP @@ -138,39 +138,39 @@ PrintSendOutMonMessage: jp PrintText GoText: - TX_FAR _GoText - TX_ASM + text_far _GoText + text_asm jr PrintPlayerMon1Text DoItText: - TX_FAR _DoItText - TX_ASM + text_far _DoItText + text_asm jr PrintPlayerMon1Text GetmText: - TX_FAR _GetmText - TX_ASM + text_far _GetmText + text_asm jr PrintPlayerMon1Text EnemysWeakText: - TX_FAR _EnemysWeakText - TX_ASM + text_far _EnemysWeakText + text_asm PrintPlayerMon1Text: ld hl, PlayerMon1Text ret PlayerMon1Text: - TX_FAR _PlayerMon1Text - db "@" + text_far _PlayerMon1Text + text_end RetreatMon: ld hl, PlayerMon2Text jp PrintText PlayerMon2Text: - TX_FAR _PlayerMon2Text - TX_ASM + text_far _PlayerMon2Text + text_asm push de push bc ld hl, wEnemyMonHP + 1 @@ -220,18 +220,18 @@ PlayerMon2Text: ret EnoughText: - TX_FAR _EnoughText - TX_ASM + text_far _EnoughText + text_asm jr PrintComeBackText OKExclamationText: - TX_FAR _OKExclamationText - TX_ASM + text_far _OKExclamationText + text_asm jr PrintComeBackText GoodText: - TX_FAR _GoodText - TX_ASM + text_far _GoodText + text_asm jr PrintComeBackText PrintComeBackText: @@ -239,5 +239,5 @@ PrintComeBackText: ret ComeBackText: - TX_FAR _ComeBackText - db "@" + text_far _ComeBackText + text_end diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 6881aef5..935764aa 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -207,8 +207,8 @@ StartBattle: jr EnemyRan ; if b was greater than the random value, the enemy runs .outOfSafariBallsText - TX_FAR _OutOfSafariBallsText - db "@" + text_far _OutOfSafariBallsText + text_end .playerSendOutFirstMon xor a @@ -270,12 +270,12 @@ EnemyRan: jpab AnimationSlideEnemyMonOff WildRanText: - TX_FAR _WildRanText - db "@" + text_far _WildRanText + text_end EnemyRanText: - TX_FAR _EnemyRanText - db "@" + text_far _EnemyRanText + text_end MainInBattleLoop: call ReadPlayerMonCurHPAndStatus @@ -532,16 +532,16 @@ HandlePoisonBurnLeechSeed: ret HurtByPoisonText: - TX_FAR _HurtByPoisonText - db "@" + text_far _HurtByPoisonText + text_end HurtByBurnText: - TX_FAR _HurtByBurnText - db "@" + text_far _HurtByBurnText + text_end HurtByLeechSeedText: - TX_FAR _HurtByLeechSeedText - db "@" + text_far _HurtByLeechSeedText + text_end ; decreases the mon's current HP by 1/16 of the Max HP (multiplied by number of toxic ticks if active) ; note that the toxic ticks are considered even if the damage is not poison (hence the Leech Seed glitch) @@ -858,8 +858,8 @@ FaintEnemyPokemon: jpab GainExperience EnemyMonFaintedText: - TX_FAR _EnemyMonFaintedText - db "@" + text_far _EnemyMonFaintedText + text_end EndLowHealthAlarm: ; This function is called when the player has the won the battle. It turns off @@ -949,12 +949,12 @@ TrainerBattleVictory: predef_jump AddBCDPredef MoneyForWinningText: - TX_FAR _MoneyForWinningText - db "@" + text_far _MoneyForWinningText + text_end TrainerDefeatedText: - TX_FAR _TrainerDefeatedText - db "@" + text_far _TrainerDefeatedText + text_end PlayBattleVictoryMusic: push af @@ -1044,8 +1044,8 @@ RemoveFaintedPlayerMon: jp PrintText PlayerMonFaintedText: - TX_FAR _PlayerMonFaintedText - db "@" + text_far _PlayerMonFaintedText + text_end ; asks if you want to use next mon ; stores whether you ran in C flag @@ -1078,8 +1078,8 @@ DoUseNextMonDialogue: jp TryRunningFromBattle UseNextMonText: - TX_FAR _UseNextMonText - db "@" + text_far _UseNextMonText + text_end ; choose next player mon to send out ; stores whether enemy mon has no HP left in Z flag @@ -1165,16 +1165,16 @@ HandlePlayerBlackOut: ret Sony1WinText: - TX_FAR _Sony1WinText - db "@" + text_far _Sony1WinText + text_end PlayerBlackedOutText2: - TX_FAR _PlayerBlackedOutText2 - db "@" + text_far _PlayerBlackedOutText2 + text_end LinkBattleLostText: - TX_FAR _LinkBattleLostText - db "@" + text_far _LinkBattleLostText + text_end ; slides pic of fainted mon downwards until it disappears ; bug: when this is called, [hAutoBGTransferEnabled] is non-zero, so there is screen tearing @@ -1442,12 +1442,12 @@ EnemySendOutFirstMon: jp SwitchPlayerMon TrainerAboutToUseText: - TX_FAR _TrainerAboutToUseText - db "@" + text_far _TrainerAboutToUseText + text_end TrainerSentOutText: - TX_FAR _TrainerSentOutText - db "@" + text_far _TrainerSentOutText + text_end ; tests if the player has any pokemon that are not fainted ; sets d = 0 if all fainted, d != 0 if some mons are still alive @@ -1487,8 +1487,8 @@ HasMonFainted: ret NoWillText: - TX_FAR _NoWillText - db "@" + text_far _NoWillText + text_end ; try to run from battle (hl = player speed, de = enemy speed) ; stores whether the attempt was successful in carry flag @@ -1610,16 +1610,16 @@ TryRunningFromBattle: ret CantEscapeText: - TX_FAR _CantEscapeText - db "@" + text_far _CantEscapeText + text_end NoRunningText: - TX_FAR _NoRunningText - db "@" + text_far _NoRunningText + text_end GotAwayText: - TX_FAR _GotAwayText - db "@" + text_far _GotAwayText + text_end ; copies from party data to battle mon data when sending out a new player mon LoadBattleMonFromParty: @@ -2289,8 +2289,8 @@ UseBagItem: ret ItemsCantBeUsedHereText: - TX_FAR _ItemsCantBeUsedHereText - db "@" + text_far _ItemsCantBeUsedHereText + text_end PartyMenuOrRockOrRun: dec a ; was Run selected? @@ -2434,8 +2434,8 @@ SwitchPlayerMon: ret AlreadyOutText: - TX_FAR _AlreadyOutText - db "@" + text_far _AlreadyOutText + text_end BattleMenu_RunWasSelected: call LoadScreenTilesFromBuffer1 @@ -2667,12 +2667,12 @@ SelectMenuItem: jp MoveSelectionMenu MoveNoPPText: - TX_FAR _MoveNoPPText - db "@" + text_far _MoveNoPPText + text_end MoveDisabledText: - TX_FAR _MoveDisabledText - db "@" + text_far _MoveDisabledText + text_end WhichTechniqueString: db "WHICH TECHNIQUE?@" @@ -2744,8 +2744,8 @@ AnyMoveToSelect: ret NoMovesLeftText: - TX_FAR _NoMovesLeftText - db "@" + text_far _NoMovesLeftText + text_end SwapMovesInMenu: ld a, [wMenuItemToSwap] @@ -3239,8 +3239,8 @@ MirrorMoveCheck: jp ExecutePlayerMoveDone MultiHitText: - TX_FAR _MultiHitText - db "@" + text_far _MultiHitText + text_end ExecutePlayerMoveDone: xor a @@ -3269,12 +3269,12 @@ PrintGhostText: ret ScaredText: - TX_FAR _ScaredText - db "@" + text_far _ScaredText + text_end GetOutText: - TX_FAR _GetOutText - db "@" + text_far _GetOutText + text_end IsGhostBattle: ld a, [wIsInBattle] @@ -3557,64 +3557,64 @@ CheckPlayerStatusConditions: ret FastAsleepText: - TX_FAR _FastAsleepText - db "@" + text_far _FastAsleepText + text_end WokeUpText: - TX_FAR _WokeUpText - db "@" + text_far _WokeUpText + text_end IsFrozenText: - TX_FAR _IsFrozenText - db "@" + text_far _IsFrozenText + text_end FullyParalyzedText: - TX_FAR _FullyParalyzedText - db "@" + text_far _FullyParalyzedText + text_end FlinchedText: - TX_FAR _FlinchedText - db "@" + text_far _FlinchedText + text_end MustRechargeText: - TX_FAR _MustRechargeText - db "@" + text_far _MustRechargeText + text_end DisabledNoMoreText: - TX_FAR _DisabledNoMoreText - db "@" + text_far _DisabledNoMoreText + text_end IsConfusedText: - TX_FAR _IsConfusedText - db "@" + text_far _IsConfusedText + text_end HurtItselfText: - TX_FAR _HurtItselfText - db "@" + text_far _HurtItselfText + text_end ConfusedNoMoreText: - TX_FAR _ConfusedNoMoreText - db "@" + text_far _ConfusedNoMoreText + text_end SavingEnergyText: - TX_FAR _SavingEnergyText - db "@" + text_far _SavingEnergyText + text_end UnleashedEnergyText: - TX_FAR _UnleashedEnergyText - db "@" + text_far _UnleashedEnergyText + text_end ThrashingAboutText: - TX_FAR _ThrashingAboutText - db "@" + text_far _ThrashingAboutText + text_end AttackContinuesText: - TX_FAR _AttackContinuesText - db "@" + text_far _AttackContinuesText + text_end CantMoveText: - TX_FAR _CantMoveText - db "@" + text_far _CantMoveText + text_end PrintMoveIsDisabledText: ld hl, wPlayerSelectedMove @@ -3635,8 +3635,8 @@ PrintMoveIsDisabledText: jp PrintText MoveIsDisabledText: - TX_FAR _MoveIsDisabledText - db "@" + text_far _MoveIsDisabledText + text_end HandleSelfConfusionDamage: ld hl, HurtItselfText @@ -3692,8 +3692,8 @@ PrintMonName1Text: ; this likely had to do with Japanese grammar that got translated, ; but the functionality didn't get removed MonName1Text: - TX_FAR _MonName1Text - TX_ASM + text_far _MonName1Text + text_asm ld a, [hWhoseTurn] and a ld a, [wPlayerMoveNum] @@ -3717,13 +3717,13 @@ MonName1Text: ret Used1Text: - TX_FAR _Used1Text - TX_ASM + text_far _Used1Text + text_asm jr PrintInsteadText Used2Text: - TX_FAR _Used2Text - TX_ASM + text_far _Used2Text + text_asm ; fall through PrintInsteadText: @@ -3734,8 +3734,8 @@ PrintInsteadText: ret InsteadText: - TX_FAR _InsteadText - TX_ASM + text_far _InsteadText + text_asm ; fall through PrintMoveName: @@ -3743,8 +3743,8 @@ PrintMoveName: ret _PrintMoveName: - TX_FAR _CF4BText - TX_ASM + text_far _CF4BText + text_asm ld hl, ExclamationPointPointerTable ld a, [wd11e] ; exclamation point num add a @@ -3766,24 +3766,24 @@ ExclamationPointPointerTable: dw ExclamationPoint5Text ExclamationPoint1Text: - TX_FAR _ExclamationPoint1Text - db "@" + text_far _ExclamationPoint1Text + text_end ExclamationPoint2Text: - TX_FAR _ExclamationPoint2Text - db "@" + text_far _ExclamationPoint2Text + text_end ExclamationPoint3Text: - TX_FAR _ExclamationPoint3Text - db "@" + text_far _ExclamationPoint3Text + text_end ExclamationPoint4Text: - TX_FAR _ExclamationPoint4Text - db "@" + text_far _ExclamationPoint4Text + text_end ExclamationPoint5Text: - TX_FAR _ExclamationPoint5Text - db "@" + text_far _ExclamationPoint5Text + text_end ; this function does nothing useful ; if the move being used is in set [1-4] from ExclamationPointMoveSets, @@ -3874,24 +3874,24 @@ PrintMoveFailureText: jp ApplyDamageToEnemyPokemon AttackMissedText: - TX_FAR _AttackMissedText - db "@" + text_far _AttackMissedText + text_end KeptGoingAndCrashedText: - TX_FAR _KeptGoingAndCrashedText - db "@" + text_far _KeptGoingAndCrashedText + text_end UnaffectedText: - TX_FAR _UnaffectedText - db "@" + text_far _UnaffectedText + text_end PrintDoesntAffectText: ld hl, DoesntAffectMonText jp PrintText DoesntAffectMonText: - TX_FAR _DoesntAffectMonText - db "@" + text_far _DoesntAffectMonText + text_end ; if there was a critical hit or an OHKO was successful, print the corresponding text PrintCriticalOHKOText: @@ -3919,12 +3919,12 @@ CriticalOHKOTextPointers: dw OHKOText CriticalHitText: - TX_FAR _CriticalHitText - db "@" + text_far _CriticalHitText + text_end OHKOText: - TX_FAR _OHKOText - db "@" + text_far _OHKOText + text_end ; checks if a traded mon will disobey due to lack of badges ; stores whether the mon will use a move in Z flag @@ -4108,24 +4108,24 @@ CheckForDisobedience: ret LoafingAroundText: - TX_FAR _LoafingAroundText - db "@" + text_far _LoafingAroundText + text_end BeganToNapText: - TX_FAR _BeganToNapText - db "@" + text_far _BeganToNapText + text_end WontObeyText: - TX_FAR _WontObeyText - db "@" + text_far _WontObeyText + text_end TurnedAwayText: - TX_FAR _TurnedAwayText - db "@" + text_far _TurnedAwayText + text_end IgnoredOrdersText: - TX_FAR _IgnoredOrdersText - db "@" + text_far _IgnoredOrdersText + text_end ; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the player mon GetDamageVarsForPlayerAttack: @@ -4485,37 +4485,42 @@ CalculateDamage: ld b, 4 call Divide +; Update wCurDamage. +; Capped at MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE: 999 - 2 = 997. ld hl, wDamage ld b, [hl] ld a, [hQuotient + 3] add b ld [hQuotient + 3], a - jr nc, .asm_3dfd0 + jr nc, .dont_cap_1 ld a, [hQuotient + 2] inc a ld [hQuotient + 2], a and a - jr z, .asm_3e004 + jr z, .cap -.asm_3dfd0 +.dont_cap_1 ld a, [hQuotient] ld b, a ld a, [hQuotient + 1] or a - jr nz, .asm_3e004 + jr nz, .cap ld a, [hQuotient + 2] - cp 998 / $100 - jr c, .asm_3dfe8 - cp 998 / $100 + 1 - jr nc, .asm_3e004 + cp (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) / $100 + jr c, .dont_cap_2 + + cp (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) / $100 + 1 + jr nc, .cap + ld a, [hQuotient + 3] - cp 998 % $100 - jr nc, .asm_3e004 + cp (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) % $100 + jr nc, .cap -.asm_3dfe8 +.dont_cap_2 inc hl + ld a, [hQuotient + 3] ld b, [hl] add b @@ -4525,36 +4530,37 @@ CalculateDamage: ld b, [hl] adc b ld [hl], a - jr c, .asm_3e004 + jr c, .cap ld a, [hl] - cp 998 / $100 - jr c, .asm_3e00a - cp 998 / $100 + 1 - jr nc, .asm_3e004 + cp (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) / $100 + jr c, .dont_cap_3 + + cp (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) / $100 + 1 + jr nc, .cap + inc hl ld a, [hld] - cp 998 % $100 - jr c, .asm_3e00a + cp (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) % $100 + jr c, .dont_cap_3 -.asm_3e004 -; cap at 997 - ld a, 997 / $100 +.cap + ld a, (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE) / $100 ld [hli], a - ld a, 997 % $100 + ld a, (MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE) % $100 ld [hld], a -.asm_3e00a -; add 2 +.dont_cap_3 +; Add back MIN_NEUTRAL_DAMAGE (capping at 999). inc hl ld a, [hl] - add 2 + add MIN_NEUTRAL_DAMAGE ld [hld], a - jr nc, .done + jr nc, .dont_floor inc [hl] +.dont_floor -.done -; minimum damage is 1 +; Returns nz and nc. ld a, 1 and a ret @@ -4997,12 +5003,12 @@ AttackSubstitute: jp DrawHUDsAndHPBars SubstituteTookDamageText: - TX_FAR _SubstituteTookDamageText - db "@" + text_far _SubstituteTookDamageText + text_end SubstituteBrokeText: - TX_FAR _SubstituteBrokeText - db "@" + text_far _SubstituteBrokeText + text_end ; this function raises the attack modifier of a pokemon using Rage when that pokemon is attacked HandleBuildingRage: @@ -5048,8 +5054,8 @@ HandleBuildingRage: ret BuildingRageText: - TX_FAR _BuildingRageText - db "@" + text_far _BuildingRageText + text_end ; copy last move for Mirror Move ; sets zero flag on failure and unsets zero flag on success @@ -5084,8 +5090,8 @@ MirrorMoveCopyMove: ret MirrorMoveFailedText: - TX_FAR _MirrorMoveFailedText - db "@" + text_far _MirrorMoveFailedText + text_end ; function used to reload move data for moves like Mirror Move and Metronome ReloadMoveData: @@ -5759,8 +5765,8 @@ EnemyCheckIfMirrorMoveEffect: jr ExecuteEnemyMoveDone HitXTimesText: - TX_FAR _HitXTimesText - db "@" + text_far _HitXTimesText + text_end ExecuteEnemyMoveDone: ld b, $1 @@ -6626,6 +6632,7 @@ LoadHudTilePatterns: PrintEmptyString: ld hl, .emptyString jp PrintText + .emptyString db "@" diff --git a/engine/battle/display_effectiveness.asm b/engine/battle/display_effectiveness.asm index 1bf14460..b23695cf 100644 --- a/engine/battle/display_effectiveness.asm +++ b/engine/battle/display_effectiveness.asm @@ -10,9 +10,9 @@ DisplayEffectiveness: jp PrintText SuperEffectiveText: - TX_FAR _SuperEffectiveText - db "@" + text_far _SuperEffectiveText + text_end NotVeryEffectiveText: - TX_FAR _NotVeryEffectiveText - db "@" + text_far _NotVeryEffectiveText + text_end diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index 0a1eb61c..22fadb42 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -68,12 +68,12 @@ SleepEffect: jp PrintDidntAffectText FellAsleepText: - TX_FAR _FellAsleepText - db "@" + text_far _FellAsleepText + text_end AlreadyAsleepText: - TX_FAR _AlreadyAsleepText - db "@" + text_far _AlreadyAsleepText + text_end PoisonEffect: ld hl, wEnemyMonStatus @@ -162,12 +162,12 @@ PoisonEffect: jp PrintDidntAffectText PoisonedText: - TX_FAR _PoisonedText - db "@" + text_far _PoisonedText + text_end BadlyPoisonedText: - TX_FAR _BadlyPoisonedText - db "@" + text_far _BadlyPoisonedText + text_end DrainHPEffect: jpab DrainHPEffect_ @@ -297,12 +297,12 @@ opponentAttacker: jp PrintText BurnedText: - TX_FAR _BurnedText - db "@" + text_far _BurnedText + text_end FrozenText: - TX_FAR _FrozenText - db "@" + text_far _FrozenText + text_end CheckDefrost: ; any fire-type move that has a chance inflict burn (all but Fire Spin) will defrost a frozen target @@ -340,8 +340,8 @@ CheckDefrost: jp PrintText FireDefrostedText: - TX_FAR _FireDefrostedText - db "@" + text_far _FireDefrostedText + text_end StatModifierUpEffect: ld hl, wPlayerMonStatMods @@ -508,8 +508,8 @@ PrintNothingHappenedText: jp PrintText MonsStatsRoseText: - TX_FAR _MonsStatsRoseText - TX_ASM + text_far _MonsStatsRoseText + text_asm ld hl, GreatlyRoseText ld a, [hWhoseTurn] and a @@ -523,12 +523,12 @@ MonsStatsRoseText: ret GreatlyRoseText: - TX_DELAY - TX_FAR _GreatlyRoseText + text_pause + text_far _GreatlyRoseText ; fallthrough RoseText: - TX_FAR _RoseText - db "@" + text_far _RoseText + text_end StatModifierDownEffect: ld hl, wEnemyMonStatMods @@ -710,8 +710,8 @@ MoveMissed: jp ConditionalPrintButItFailed MonsStatsFellText: - TX_FAR _MonsStatsFellText - TX_ASM + text_far _MonsStatsFellText + text_asm ld hl, FellText ld a, [hWhoseTurn] and a @@ -728,12 +728,12 @@ MonsStatsFellText: ret GreatlyFellText: - TX_DELAY - TX_FAR _GreatlyFellText + text_pause + text_far _GreatlyFellText ; fallthrough FellText: - TX_FAR _FellText - db "@" + text_far _FellText + text_end PrintStatText: ld hl, StatsTextStrings @@ -905,16 +905,16 @@ SwitchAndTeleportEffect: jp PrintText RanFromBattleText: - TX_FAR _RanFromBattleText - db "@" + text_far _RanFromBattleText + text_end RanAwayScaredText: - TX_FAR _RanAwayScaredText - db "@" + text_far _RanAwayScaredText + text_end WasBlownAwayText: - TX_FAR _WasBlownAwayText - db "@" + text_far _WasBlownAwayText + text_end TwoToFiveAttacksEffect: ld hl, wPlayerBattleStatus1 @@ -1024,8 +1024,8 @@ ChargeEffect: jp PrintText ChargeMoveEffectText: - TX_FAR _ChargeMoveEffectText - TX_ASM + text_far _ChargeMoveEffectText + text_asm ld a, [wChargeMoveNum] cp RAZOR_WIND ld hl, MadeWhirlwindText @@ -1048,28 +1048,28 @@ ChargeMoveEffectText: ret MadeWhirlwindText: - TX_FAR _MadeWhirlwindText - db "@" + text_far _MadeWhirlwindText + text_end TookInSunlightText: - TX_FAR _TookInSunlightText - db "@" + text_far _TookInSunlightText + text_end LoweredItsHeadText: - TX_FAR _LoweredItsHeadText - db "@" + text_far _LoweredItsHeadText + text_end SkyAttackGlowingText: - TX_FAR _SkyAttackGlowingText - db "@" + text_far _SkyAttackGlowingText + text_end FlewUpHighText: - TX_FAR _FlewUpHighText - db "@" + text_far _FlewUpHighText + text_end DugAHoleText: - TX_FAR _DugAHoleText - db "@" + text_far _DugAHoleText + text_end TrappingEffect: ld hl, wPlayerBattleStatus1 @@ -1146,8 +1146,8 @@ ConfusionSideEffectSuccess: jp PrintText BecameConfusedText: - TX_FAR _BecameConfusedText - db "@" + text_far _BecameConfusedText + text_end ConfusionEffectFailed: cp CONFUSION_SIDE_EFFECT @@ -1267,8 +1267,8 @@ MimicEffect: jp PrintButItFailedText_ MimicLearnedMoveText: - TX_FAR _MimicLearnedMoveText - db "@" + text_far _MimicLearnedMoveText + text_end LeechSeedEffect: jpab LeechSeedEffect_ @@ -1361,8 +1361,8 @@ DisableEffect: jp PrintButItFailedText_ MoveWasDisabledText: - TX_FAR _MoveWasDisabledText - db "@" + text_far _MoveWasDisabledText + text_end PayDayEffect: jpab PayDayEffect_ @@ -1383,16 +1383,16 @@ ReflectLightScreenEffect: jpab ReflectLightScreenEffect_ NothingHappenedText: - TX_FAR _NothingHappenedText - db "@" + text_far _NothingHappenedText + text_end PrintNoEffectText: ld hl, NoEffectText jp PrintText NoEffectText: - TX_FAR _NoEffectText - db "@" + text_far _NoEffectText + text_end ConditionalPrintButItFailed: ld a, [wMoveDidntMiss] @@ -1404,28 +1404,28 @@ PrintButItFailedText_: jp PrintText ButItFailedText: - TX_FAR _ButItFailedText - db "@" + text_far _ButItFailedText + text_end PrintDidntAffectText: ld hl, DidntAffectText jp PrintText DidntAffectText: - TX_FAR _DidntAffectText - db "@" + text_far _DidntAffectText + text_end IsUnaffectedText: - TX_FAR _IsUnaffectedText - db "@" + text_far _IsUnaffectedText + text_end PrintMayNotAttackText: ld hl, ParalyzedMayNotAttackText jp PrintText ParalyzedMayNotAttackText: - TX_FAR _ParalyzedMayNotAttackText - db "@" + text_far _ParalyzedMayNotAttackText + text_end CheckTargetSubstitute: push hl diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index 830a23a1..f490c34d 100755 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -84,5 +84,5 @@ DrawText: db " DRAW@" PickUpPayDayMoneyText: - TX_FAR _PickUpPayDayMoneyText - db "@" + text_far _PickUpPayDayMoneyText + text_end diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm index c628ae32..6bc0a019 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -340,8 +340,8 @@ BoostExp: ret GainedText: - TX_FAR _GainedText - TX_ASM + text_far _GainedText + text_asm ld a, [wBoostExpByExpAll] ld hl, WithExpAllText and a @@ -354,19 +354,19 @@ GainedText: ret WithExpAllText: - TX_FAR _WithExpAllText - TX_ASM + text_far _WithExpAllText + text_asm ld hl, ExpPointsText ret BoostedText: - TX_FAR _BoostedText + text_far _BoostedText ExpPointsText: - TX_FAR _ExpPointsText - db "@" + text_far _ExpPointsText + text_end GrewLevelText: - TX_FAR _GrewLevelText - TX_SFX_LEVEL_UP - db "@" + text_far _GrewLevelText + sound_level_up + text_end diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm index 8c41f914..662f65e0 100644 --- a/engine/battle/move_effects/conversion.asm +++ b/engine/battle/move_effects/conversion.asm @@ -25,8 +25,8 @@ ConversionEffect_: jp PrintText ConvertedTypeText: - TX_FAR _ConvertedTypeText - db "@" + text_far _ConvertedTypeText + text_end PrintButItFailedText: ld hl, PrintButItFailedText_ diff --git a/engine/battle/move_effects/drain_hp.asm b/engine/battle/move_effects/drain_hp.asm index 60d23a95..452ccf0c 100644 --- a/engine/battle/move_effects/drain_hp.asm +++ b/engine/battle/move_effects/drain_hp.asm @@ -96,9 +96,9 @@ DrainHPEffect_: jp PrintText SuckedHealthText: - TX_FAR _SuckedHealthText - db "@" + text_far _SuckedHealthText + text_end DreamWasEatenText: - TX_FAR _DreamWasEatenText - db "@" + text_far _DreamWasEatenText + text_end diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm index af4a6521..7a426d2c 100644 --- a/engine/battle/move_effects/focus_energy.asm +++ b/engine/battle/move_effects/focus_energy.asm @@ -17,6 +17,6 @@ FocusEnergyEffect_: jpab PrintButItFailedText_ GettingPumpedText: - TX_DELAY - TX_FAR _GettingPumpedText - db "@" + text_pause + text_far _GettingPumpedText + text_end diff --git a/engine/battle/move_effects/haze.asm b/engine/battle/move_effects/haze.asm index bd73d249..521ff662 100644 --- a/engine/battle/move_effects/haze.asm +++ b/engine/battle/move_effects/haze.asm @@ -77,5 +77,5 @@ ResetStats: ret StatusChangesEliminatedText: - TX_FAR _StatusChangesEliminatedText - db "@" + text_far _StatusChangesEliminatedText + text_end diff --git a/engine/battle/move_effects/heal.asm b/engine/battle/move_effects/heal.asm index 8042bc63..8cc9da93 100644 --- a/engine/battle/move_effects/heal.asm +++ b/engine/battle/move_effects/heal.asm @@ -108,13 +108,13 @@ HealEffect_: jp BankswitchEtoF StartedSleepingEffect: - TX_FAR _StartedSleepingEffect - db "@" + text_far _StartedSleepingEffect + text_end FellAsleepBecameHealthyText: - TX_FAR _FellAsleepBecameHealthyText - db "@" + text_far _FellAsleepBecameHealthyText + text_end RegainedHealthText: - TX_FAR _RegainedHealthText - db "@" + text_far _RegainedHealthText + text_end diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm index 981f5da9..74360233 100644 --- a/engine/battle/move_effects/leech_seed.asm +++ b/engine/battle/move_effects/leech_seed.asm @@ -32,9 +32,9 @@ LeechSeedEffect_: jp PrintText WasSeededText: - TX_FAR _WasSeededText - db "@" + text_far _WasSeededText + text_end EvadedAttackText: - TX_FAR _EvadedAttackText - db "@" + text_far _EvadedAttackText + text_end diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm index 6373770d..67ee4921 100644 --- a/engine/battle/move_effects/mist.asm +++ b/engine/battle/move_effects/mist.asm @@ -15,5 +15,5 @@ MistEffect_: jpab PrintButItFailedText_ ShroudedInMistText: - TX_FAR _ShroudedInMistText - db "@" + text_far _ShroudedInMistText + text_end diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm index 5bdb86da..11140ec2 100644 --- a/engine/battle/move_effects/pay_day.asm +++ b/engine/battle/move_effects/pay_day.asm @@ -41,5 +41,5 @@ PayDayEffect_: jp PrintText CoinsScatteredText: - TX_FAR _CoinsScatteredText - db "@" + text_far _CoinsScatteredText + text_end diff --git a/engine/battle/move_effects/recoil.asm b/engine/battle/move_effects/recoil.asm index e94f8043..63aff429 100644 --- a/engine/battle/move_effects/recoil.asm +++ b/engine/battle/move_effects/recoil.asm @@ -66,5 +66,5 @@ RecoilEffect_: ld hl, HitWithRecoilText jp PrintText HitWithRecoilText: - TX_FAR _HitWithRecoilText - db "@" + text_far _HitWithRecoilText + text_end diff --git a/engine/battle/move_effects/reflect_light_screen.asm b/engine/battle/move_effects/reflect_light_screen.asm index 7693a348..07338c9a 100644 --- a/engine/battle/move_effects/reflect_light_screen.asm +++ b/engine/battle/move_effects/reflect_light_screen.asm @@ -33,12 +33,12 @@ ReflectLightScreenEffect_: jp BankswitchEtoF LightScreenProtectedText: - TX_FAR _LightScreenProtectedText - db "@" + text_far _LightScreenProtectedText + text_end ReflectGainedArmorText: - TX_FAR _ReflectGainedArmorText - db "@" + text_far _ReflectGainedArmorText + text_end BankswitchEtoF: ld b, BANK(BattleCore) diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm index a1cd11b2..95c43462 100644 --- a/engine/battle/move_effects/substitute.asm +++ b/engine/battle/move_effects/substitute.asm @@ -65,13 +65,13 @@ SubstituteEffect_: jp PrintText SubstituteText: - TX_FAR _SubstituteText - db "@" + text_far _SubstituteText + text_end HasSubstituteText: - TX_FAR _HasSubstituteText - db "@" + text_far _HasSubstituteText + text_end TooWeakSubstituteText: - TX_FAR _TooWeakSubstituteText - db "@" + text_far _TooWeakSubstituteText + text_end diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm index 1b459910..da26d031 100644 --- a/engine/battle/move_effects/transform.asm +++ b/engine/battle/move_effects/transform.asm @@ -144,5 +144,5 @@ TransformEffect_: jp BankswitchEtoF TransformedText: - TX_FAR _TransformedText - db "@" + text_far _TransformedText + text_end diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm index 4672892d..4f01c2f4 100755 --- a/engine/battle/safari_zone.asm +++ b/engine/battle/safari_zone.asm @@ -28,9 +28,9 @@ PrintSafariZoneBattleText: jp PrintText SafariZoneEatingText: - TX_FAR _SafariZoneEatingText - db "@" + text_far _SafariZoneEatingText + text_end SafariZoneAngryText: - TX_FAR _SafariZoneAngryText - db "@" + text_far _SafariZoneAngryText + text_end diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index d61b44f8..8373ef4f 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -549,7 +549,7 @@ AIPrintItemUseAndUpdateHPBar: jp DecrementAICount AISwitchIfEnoughMons: -; enemy trainer switches if there are 3 or more unfainted mons in party +; enemy trainer switches if there are 2 or more unfainted mons in party ld a, [wEnemyPartyCount] ld c, a ld hl, wEnemyMon1HP @@ -573,7 +573,7 @@ AISwitchIfEnoughMons: jr nz, .loop ld a, d ; how many available monsters are there? - cp 2 ; don't bother if only 1 or 2 + cp 2 ; don't bother if only 1 jp nc, SwitchEnemyMon and a ret @@ -610,8 +610,8 @@ SwitchEnemyMon: ret AIBattleWithdrawText: - TX_FAR _AIBattleWithdrawText - db "@" + text_far _AIBattleWithdrawText + text_end AIUseFullHeal: call AIPlayRestoringSFX @@ -735,5 +735,5 @@ AIPrintItemUse_: jp PrintText AIBattleUseItemText: - TX_FAR _AIBattleUseItemText - db "@" + text_far _AIBattleUseItemText + text_end |