From 2ffd53830d10404a071d2d9726a38fae910f7a9e Mon Sep 17 00:00:00 2001 From: KDLPro <38602758+KDLPro@users.noreply.github.com> Date: Tue, 14 Sep 2021 10:42:18 +0800 Subject: Updated Make new battle text to distinguish status move misses and fails (markdown) --- ...-text-to-distinguish-status-move-misses-and-fails.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Make-new-battle-text-to-distinguish-status-move-misses-and-fails.md b/Make-new-battle-text-to-distinguish-status-move-misses-and-fails.md index ef03ebe..9968cff 100644 --- a/Make-new-battle-text-to-distinguish-status-move-misses-and-fails.md +++ b/Make-new-battle-text-to-distinguish-status-move-misses-and-fails.md @@ -65,14 +65,16 @@ First, edit [data/text/battle.asm](../blob/master/data/text/battle.asm) again: +AlreadyBurnedText: + text "'s" + line "already burned!" -+ autodone ++ done + +AlreadyFrozenText: + text "'s" + line "already frozen!" -+ autodone ++ done ``` +The frozen and burn status are added to prompt the player that the enemy has a status so they won't try inflicting status conditions again. + Next, edit [engine/battle/effect_commands.asm](../blob/master/engine/battle/effect_commands.asm): ```diff @@ -96,13 +98,14 @@ UpdateMoveData: +CheckForStatusIfAlreadyHasAny: + ld a, BATTLE_VARS_STATUS_OPP -+ call GetBattleVar ++ call GetBattleVarAddr ++ ld d, h ++ ld e, l + and SLP + ld hl, AlreadyAsleepText + ret nz + -+ ld a, BATTLE_VARS_STATUS_OPP -+ call GetBattleVar ++ ld a, [de] + bit FRZ, a + ld hl, AlreadyFrozenText + ret nz @@ -127,14 +130,14 @@ BattleCommand_SleepTarget: + call CheckForStatusIfAlreadyHasAny + jr nz, .fail -ld a, BATTLE_VARS_STATUS_OPP + ld a, BATTLE_VARS_STATUS_OPP call GetBattleVarAddr ld d, h ld e, l - ld a, [de] - and SLP - ld hl, AlreadyAsleepText - jr nz, .fail +- jr nz, .fail ld a, [wAttackMissed] and a -- cgit v1.2.3