summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKDLPro <38602758+KDLPro@users.noreply.github.com>2021-09-14 10:42:18 +0800
committerKDLPro <38602758+KDLPro@users.noreply.github.com>2021-09-14 10:42:18 +0800
commit2ffd53830d10404a071d2d9726a38fae910f7a9e (patch)
tree500be2809673aac64c157adbc63961691ac723dc
parente012fe41d421711a3cb61b66e2f563ef91470b9f (diff)
Updated Make new battle text to distinguish status move misses and fails (markdown)
-rw-r--r--Make-new-battle-text-to-distinguish-status-move-misses-and-fails.md17
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