summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Cabral <mr.matthewcabral@gmail.com>2022-01-22 00:08:03 -0500
committerMatthew Cabral <mr.matthewcabral@gmail.com>2022-01-22 00:08:03 -0500
commit1f61dd19fddc665954d917ba753e6dbf658ff845 (patch)
tree008656cc61fb11f48f8ea5fcc8209b8472ab9329
parente3ac8febdcab14add9177afa82d4b21480c44912 (diff)
Add step for relocating `#undef move` to later in the same function in Phys/Spec guide
-rw-r--r--Add-Physical-Special-Split.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/Add-Physical-Special-Split.md b/Add-Physical-Special-Split.md
index d9001d8..c01eb46 100644
--- a/Add-Physical-Special-Split.md
+++ b/Add-Physical-Special-Split.md
@@ -138,7 +138,7 @@ if (defender->ability == ABILITY_THICK_FAT && (type == TYPE_FIRE || type == TYPE
The next thing we need to do is change the arguments passed to IS_TYPE_PHYSICAL and IS_TYPE_SPECIAL. Originally, they were passed a type argument, but now we want to pass a move argument. There are two instances of these functions in **src/pokemon.c**, three more in **src/battle_script_commands.c**, and two more in **src/battle_tv.c**.
-In **src/pokemon.c**, the first one originally reads like this:
+In **pokemon.c**, the first one originally reads like this:
```c
IS_TYPE_PHYSICAL(type)
```
@@ -181,6 +181,12 @@ and
```c
IS_TYPE_SPECIAL(move)
```
+In order for the `move` variable to stay defined, we will also have to relocate the line `#undef move` in **battle_tv.c** to later in the same function. For simplicity, you can place it next to the other `#undef`'s. It would then look like this:
+```c
+#undef move
+#undef type
+#undef power
+```
## 4. Adding the physicality byte to moves
The last step is definitely the most tedious, but it is very simple. We need to go through every move and define whether it is physical, special, or other. The file that defines all move effects is located at **src/data/battle_moves.h**. There are plenty of resources to find out which one a move is if you do not already know. After adding these, the split is implemented. For reference, here is one example of each possible value of the physicality byte for my names and values: