1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
Battles begin with the phrase "*ENEMY* wants to battle!" and end with "*ENEMY* was defeated!" This makes sense if "*ENEMY*" is something like "YOUNGSTER JOEY", but it's ungrammatical for plural trainers like "TWINS AMY & MAY".
Gen 3 addressed this issue by changing the phrases to "*ENEMY* would like to battle!" and "Player defeated *ENEMY*!" And then Gen 4 changed the starting phrase to "You are challenged by *ENEMY*!" But some people don't like the politeness of Gen 3, or the passive voice of Gen 4. (\*ahem\*) Plus they're both more verbose than the original Gen 2 phrases, which really matters when the textboxes are so small, and the "*ENEMY*" name can take up an entire line (like "MYSTICALMAN EUSINE").
The alternative is to use the correct grammar for plural trainers: "*ENEMIES* **want** to battle!" and "*ENEMIES* **were** defeated!" This is fairly simple to implement. If you've worked with event scripts before but not assembly code, this is a good feature to start with.
## Contents
1. [Define alternative plural phrases](#1-define-alternative-plural-phrases)
2. [Define plural trainer classes](#2-define-plural-trainer-classes)
3. [Use "*ENEMIES* want to battle!"](#3-use-enemies-want-to-battle)
4. [Use "*ENEMIES* were defeated!"](#4-use-enemies-were-defeated)
5. [Use "*ENEMIES* are about to use…"](#5-use-enemies-are-about-to-use)
## 1. Define alternative plural phrases
Edit [data/text/battle.asm](../blob/master/data/text/battle.asm):
```diff
WantsToBattleText::
text "<ENEMY>"
line "wants to battle!"
prompt
+
+WantToBattlePluralText::
+ text "<ENEMY>"
+ line "want to battle!"
+ prompt
...
BattleText_EnemyWasDefeated:
text "<ENEMY>"
line "was defeated!"
prompt
+
+BattleText_PluralEnemyWereDefeated:
+ text "<ENEMY>"
+ line "were defeated!"
+ prompt
...
BattleText_EnemyIsAboutToUseWillPlayerChangeMon:
text "<ENEMY>"
line "is about to use"
cont "@"
text_ram wEnemyMonNick
text "."
para "Will <PLAYER>"
line "change #MON?"
done
+
+BattleText_PluralEnemyAreAboutToUseWillPlayerChangeMon:
+ text "<ENEMY>"
+ line "are about to use"
+ cont "@"
+ text_ram wEnemyMonNick
+ text "."
+
+ para "Will <PLAYER>"
+ line "change #MON?"
+ done
```
(Yes, while looking through the file I found a third phrase using "`<ENEMY>`" that needed a different plural form. All the rest are okay as-is.)
## 2. Define plural trainer classes
Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm):
```diff
IsKantoGymLeader:
ld hl, KantoGymLeaders
jr IsGymLeaderCommon
IsGymLeader:
ld hl, GymLeaders
IsGymLeaderCommon:
push de
ld a, [wOtherTrainerClass]
ld de, 1
call IsInArray
pop de
ret
INCLUDE "data/trainers/leaders.asm"
+
+IsPluralTrainer:
+; return z for plural trainers
+ ld a, [wOtherTrainerClass]
+ cp TWINS
+ ret
```
`IsPluralTrainer` sets the **z**ero flag if `[wOtherTrainerClass]` is `TWINS`. If you had more plural classes, like `ACE_DUO` or `SIS_AND_BRO`, you could check for them all like this:
```
IsPluralTrainer:
; return z for plural trainers
ld a, [wOtherTrainerClass]
cp TWINS
ret z
cp ACE_DUO
ret z
; ...etc
cp SIS_AND_BRO
ret
```
We're not using the more complicated `IsGymLeaderCommon` method, which calls `IsInArray`, because it's overkill without a long list of items to check.
Now we just have to find where those three original phrases are used, and call `IsPluralTrainer` to decide whether to use the new phrases instead.
## 3. Use "*ENEMIES* want to battle!"
Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm) again:
```diff
BattleStartMessage:
...
farcall Battle_GetTrainerName
+ ld hl, WantToBattlePluralText
+ call IsPluralTrainer
+ jr z, .PlaceBattleStartText
ld hl, WantsToBattleText
jr .PlaceBattleStartText
.wild
...
```
## 4. Use "*ENEMIES* were defeated!"
Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm) again:
```diff
WinTrainerBattle:
...
callfar Battle_GetTrainerName
+ ld hl, BattleText_PluralEnemyWereDefeated
+ call IsPluralTrainer
+ jr z, .got_defeat_phrase
ld hl, BattleText_EnemyWasDefeated
+.got_defeat_phrase:
call StdBattleTextbox
```
## 5. Use "*ENEMIES* are about to use…"
Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm) again:
```diff
OfferSwitch:
ld a, [wCurPartyMon]
push af
callfar Battle_GetTrainerName
+ ld hl, BattleText_PluralEnemyAreAboutToUseWillPlayerChangeMon
+ call IsPluralTrainer
+ jr z, .got_switch_phrase
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangeMon
+.got_switch_phrase:
call StdBattleTextbox
...
```
That's all!

|