summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Cabral <surferdude932@hotmail.com>2022-01-21 23:29:57 -0500
committerMatthew Cabral <surferdude932@hotmail.com>2022-01-21 23:29:57 -0500
commit2dbc98291e6afea94b0862622ac8fc8f59beae5a (patch)
tree8fea54db361896e33ddae5ec9b711482a7c82cb5
parentd3458e00318cc845a65c15417741c76fb6b64f83 (diff)
Clarified argument changing section in Add Phys/Spec Split guide (markdown)
-rw-r--r--Add-Physical-Special-Split.md27
1 files changed, 24 insertions, 3 deletions
diff --git a/Add-Physical-Special-Split.md b/Add-Physical-Special-Split.md
index 1931aff..4638b2f 100644
--- a/Add-Physical-Special-Split.md
+++ b/Add-Physical-Special-Split.md
@@ -136,7 +136,26 @@ if (defender->ability == ABILITY_THICK_FAT && (type == TYPE_FIRE || type == TYPE
gBattleMovePower /= 2;
```
-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 is one instance of each of these functions in **src/pokemon.c**, three more in **src/battle_script_commands.c**, and two more in **src/battle_tv.c**. The ones in **pokemon.c** should be changed from IS_TYPE_PHYSICAL(type) and IS_TYPE_SPECIAL(type) to IS_TYPE_PHYSICAL(gBattleMoves[move]) and IS_TYPE_SPECIAL(gBattleMoves[move]). The first one in **battle_script_commands.c** can also be changed like this, but the argument names are different for the second and third one. The second one looks like this originally:
+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:
+```c
+IS_TYPE_PHYSICAL(type)
+```
+We will change this to:
+```c
+IS_TYPE_PHYSICAL(gBattleMoves[gCurrentMove])
+```
+And the second one we will need to change from:
+```c
+IS_TYPE_SPECIAL(type)
+```
+to
+```c
+IS_TYPE_SPECIAL(gBattleMoves[gCurrentMove])
+```
+
+The first one in **battle_script_commands.c** can also be changed like this, but the argument names are different for the second and third one. The second one looks like this originally:
```c
IS_TYPE_PHYSICAL(type)
```
@@ -152,7 +171,8 @@ We will change this to:
```c
IS_TYPE_SPECIAL(gBattleMoves[gCurrentMove])
```
-The two in **battle_tv.c** can be changed to
+
+And lastly, the two in **battle_tv.c** can be changed to:
```c
IS_TYPE_PHYSICAL(move)
```
@@ -160,7 +180,8 @@ and
```c
IS_TYPE_SPECIAL(move)
```
-Note that we have changed !IS_TYPE_PHYSICAL to IS_TYPE_SPECIAL; "not physical" no longer automatically means "special" due to the introduction of the "other/status" option.
+**Note:** We have changed `!IS_TYPE_PHYSICAL` to `IS_TYPE_SPECIAL` because "not physical" no longer automatically means "special" due to the introduction of the "other/status" option.
+
## 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:
```c