summaryrefslogtreecommitdiff
path: root/Remove-the-redundant-move-grammar-table.md
diff options
context:
space:
mode:
Diffstat (limited to 'Remove-the-redundant-move-grammar-table.md')
-rw-r--r--Remove-the-redundant-move-grammar-table.md28
1 files changed, 16 insertions, 12 deletions
diff --git a/Remove-the-redundant-move-grammar-table.md b/Remove-the-redundant-move-grammar-table.md
index 7df3440..59b2ffc 100644
--- a/Remove-the-redundant-move-grammar-table.md
+++ b/Remove-the-redundant-move-grammar-table.md
@@ -95,7 +95,8 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
- ld [wd265], a
+- ld [wMoveGrammar], a
++ ld [wTempByteValue], a
push hl
farcall CheckUserIsCharging
@@ -104,13 +105,14 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
+ jr nz, .ok
; update last move
- ld a, [wd265]
+- ld a, [wMoveGrammar]
++ ld a, [wTempByteValue]
ld [hl], a
ld [de], a
-.grammar
- call GetMoveGrammar
--; wd265 now contains MoveGrammar
+-; wMoveGrammar now contains MoveGrammar
-
-; everything except 'instead' made redundant in localization
-
@@ -121,7 +123,7 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
- ret nz
-
- ; check move grammar
-- ld a, [wd265]
+- ld a, [wMoveGrammar]
- cp $3
- ld hl, UsedMove2Text
- ret c
@@ -163,7 +165,7 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
- ld hl, .endusedmovetexts
-
-; get move id
-- ld a, [wd265]
+- ld a, [wMoveGrammar]
-
-; 2-byte pointer
- add a
@@ -206,13 +208,13 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
db "@"
-
-GetMoveGrammar:
--; store move grammar type in wd265
+-; store move grammar type in wMoveGrammar
-
- push bc
--; c = move id
-- ld a, [wd265]
-- ld c, a
-- ld b, $0
+-; wMoveGrammar contains move id
+- ld a, [wMoveGrammar]
+- ld c, a ; move id
+- ld b, 0 ; grammar index
-
-; read grammar table
- ld hl, MoveGrammar
@@ -232,9 +234,9 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
- jr .loop
-
-.end
--; wd265 now contains move grammar
+-; wMoveGrammar now contains move grammar
- ld a, b
-- ld [wd265], a
+- ld [wMoveGrammar], a
-
-; we're done
- pop bc
@@ -243,6 +245,8 @@ Edit [engine/battle/used_move_text.asm](../blob/master/engine/battle/used_move_t
-INCLUDE "data/moves/grammar.asm"
```
+(If you're using an older version of pokecrystal that has `wd265` instead of `wMoveGrammar`, you don't need to replace `wd265` with `wTempByteValue`, but do need to make the other changes.)
+
Now moves will still print correctly, but without wasting time and space on using certain grammar.
![Screenshot](screenshots/used-move-instead.png)