@@ -8,7 +8,7 @@ use crate::world::{
8
8
player:: Trait ,
9
9
skill:: GameSkill ,
10
10
} ;
11
- use rand:: Rng ;
11
+ use rand:: { seq :: SliceRandom , Rng } ;
12
12
use rand_chacha:: ChaCha8Rng ;
13
13
use std:: collections:: HashMap ;
14
14
@@ -91,55 +91,163 @@ impl EngineAction for Brawl {
91
91
92
92
if attacker. has_hook ( ) {
93
93
defender_update. extra_tiredness += TirednessCost :: CRITICAL ;
94
- format ! (
95
- "A brawl between {} and {}! {} seems to have gotten the upper hand." ,
96
- defender. info. shortened_name( ) ,
97
- attacker. info. shortened_name( ) ,
98
- attacker. info. shortened_name( )
99
- )
100
- } else {
101
- defender_update. extra_tiredness += TirednessCost :: SEVERE ;
102
94
format ! (
103
95
"A brawl between {} and {}! {} got {} good with the hook! That'll be an ugly scar." ,
104
96
defender. info. shortened_name( ) , attacker. info. shortened_name( ) , attacker. info. shortened_name( ) , defender. info. pronouns. as_object( )
105
97
)
98
+ } else {
99
+ defender_update. extra_tiredness += TirednessCost :: SEVERE ;
100
+
101
+ [
102
+ format ! (
103
+ "A brawl between {} and {}! {} seems to have gotten the upper hand." ,
104
+ attacker. info. shortened_name( ) ,
105
+ defender. info. shortened_name( ) ,
106
+ attacker. info. shortened_name( )
107
+ ) ,
108
+ format ! (
109
+ "An intense clash between {} and {} ends with {} coming out on top!" ,
110
+ attacker. info. shortened_name( ) ,
111
+ defender. info. shortened_name( ) ,
112
+ attacker. info. shortened_name( )
113
+ ) ,
114
+ format ! (
115
+ "A fierce fight between {} and {} concludes with {} gaining the upper hand!" ,
116
+ attacker. info. shortened_name( ) ,
117
+ defender. info. shortened_name( ) ,
118
+ attacker. info. shortened_name( )
119
+ ) ,
120
+ format ! (
121
+ "{} and {} engage in a heated scuffle, but {} emerges the winner." ,
122
+ attacker. info. shortened_name( ) ,
123
+ defender. info. shortened_name( ) ,
124
+ attacker. info. shortened_name( )
125
+ ) ,
126
+ format ! (
127
+ "It's {} versus {} in a wild brawl! {} prevails in the end." ,
128
+ attacker. info. shortened_name( ) ,
129
+ defender. info. shortened_name( ) ,
130
+ attacker. info. shortened_name( )
131
+ ) ,
132
+ format ! (
133
+ "{} and {} come to blows during the game. {} manages to give the best shots." ,
134
+ attacker. info. shortened_name( ) ,
135
+ defender. info. shortened_name( ) ,
136
+ attacker. info. shortened_name( )
137
+ ) ,
138
+ format ! (
139
+ "The battle between {} and {} wraps up with {} as the victor." ,
140
+ attacker. info. shortened_name( ) ,
141
+ defender. info. shortened_name( ) ,
142
+ attacker. info. shortened_name( )
143
+ ) ,
144
+ ]
145
+ . choose ( rng)
146
+ . expect ( "There should be an option" )
147
+ . clone ( )
106
148
}
107
149
}
108
150
x if x == 0 => {
109
151
attacker_update. extra_tiredness += TirednessCost :: HIGH ;
110
152
defender_update. extra_tiredness += TirednessCost :: HIGH ;
111
153
defender_update. extra_morale += MoraleModifier :: SMALL_MALUS ;
112
154
attacker_update. extra_morale += MoraleModifier :: SMALL_MALUS ;
113
- match rng. gen_range ( 0 ..=1 ) {
114
- 0 => format ! (
155
+
156
+ [
157
+ format ! (
115
158
"A brawl between {} and {}! They both got some damage." ,
116
159
attacker. info. shortened_name( ) ,
117
160
defender. info. shortened_name( )
118
161
) ,
119
- _ => format ! (
162
+ format ! (
120
163
"A brawl between {} and {}! An even match." ,
121
164
defender. info. shortened_name( ) ,
122
165
attacker. info. shortened_name( )
123
166
) ,
124
- }
167
+ format ! (
168
+ "A fierce clash! {} and {} trade powerful blows." ,
169
+ attacker. info. shortened_name( ) ,
170
+ defender. info. shortened_name( )
171
+ ) ,
172
+ format ! (
173
+ "{} and {} collide in an intense struggle! Neither backs down." ,
174
+ attacker. info. shortened_name( ) ,
175
+ defender. info. shortened_name( )
176
+ ) ,
177
+ format ! (
178
+ "{} strikes first, but {} quickly counters! An even fight." ,
179
+ attacker. info. shortened_name( ) ,
180
+ defender. info. shortened_name( )
181
+ ) ,
182
+ format ! (
183
+ "{} tries to outmaneuver {}, but the fight remains deadlocked." ,
184
+ attacker. info. shortened_name( ) ,
185
+ defender. info. shortened_name( )
186
+ ) ,
187
+ ]
188
+ . choose ( rng)
189
+ . expect ( "There should be one choice" )
190
+ . clone ( )
125
191
}
126
192
_ => {
127
193
defender_update. extra_morale += MoraleModifier :: SEVERE_BONUS ;
128
194
attacker_update. extra_morale += MoraleModifier :: SEVERE_MALUS ;
129
195
if defender. has_hook ( ) {
130
196
attacker_update. extra_tiredness += TirednessCost :: CRITICAL ;
131
- format ! (
132
- "A brawl between {} and {}! {} seems to have gotten the upper hand." ,
133
- attacker. info. shortened_name( ) ,
134
- defender. info. shortened_name( ) ,
135
- defender. info. shortened_name( )
136
- )
137
- } else {
138
- attacker_update. extra_tiredness += TirednessCost :: SEVERE ;
139
197
format ! (
140
198
"A brawl between {} and {}! {} got {} good with the hook! That'll be an ugly scar." ,
141
199
attacker. info. shortened_name( ) , defender. info. shortened_name( ) , defender. info. shortened_name( ) , attacker. info. pronouns. as_object( )
142
200
)
201
+ } else {
202
+ attacker_update. extra_tiredness += TirednessCost :: SEVERE ;
203
+
204
+ [
205
+ format ! (
206
+ "A brawl between {} and {}! {} seems to have gotten the upper hand." ,
207
+ attacker. info. shortened_name( ) ,
208
+ defender. info. shortened_name( ) ,
209
+ defender. info. shortened_name( )
210
+ ) ,
211
+ format ! (
212
+ "An intense clash between {} and {} ends with {} coming out on top!" ,
213
+ attacker. info. shortened_name( ) ,
214
+ defender. info. shortened_name( ) ,
215
+ defender. info. shortened_name( )
216
+ ) ,
217
+ format ! (
218
+ "A fierce fight between {} and {} concludes with {} gaining the upper hand!" ,
219
+ attacker. info. shortened_name( ) ,
220
+ defender. info. shortened_name( ) ,
221
+ defender. info. shortened_name( )
222
+ ) ,
223
+ format ! (
224
+ "{} and {} engage in a heated scuffle, but {} emerges the winner." ,
225
+ attacker. info. shortened_name( ) ,
226
+ defender. info. shortened_name( ) ,
227
+ defender. info. shortened_name( )
228
+ ) ,
229
+ format ! (
230
+ "It's {} versus {} in a wild brawl! {} prevails in the end." ,
231
+ attacker. info. shortened_name( ) ,
232
+ defender. info. shortened_name( ) ,
233
+ defender. info. shortened_name( )
234
+ ) ,
235
+ format ! (
236
+ "{} and {} come to blows during the game. {} manages to give the best shots." ,
237
+ attacker. info. shortened_name( ) ,
238
+ defender. info. shortened_name( ) ,
239
+ defender. info. shortened_name( )
240
+ ) ,
241
+ format ! (
242
+ "The battle between {} and {} wraps up with {} as the victor." ,
243
+ attacker. info. shortened_name( ) ,
244
+ defender. info. shortened_name( ) ,
245
+ defender. info. shortened_name( )
246
+ ) ,
247
+ ]
248
+ . choose ( rng)
249
+ . expect ( "There should be an option" )
250
+ . clone ( )
143
251
}
144
252
}
145
253
} ;
0 commit comments