diff options
-rw-r--r-- | Make-new-battle-text-to-distinguish-status-move-misses-and-fails.md | 17 |
1 files 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 "<TARGET>'s" + line "already burned!" -+ autodone ++ done + +AlreadyFrozenText: + text "<TARGET>'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 |