Removed unused effects + fixed tests + removed secondaryEffectChance

To do: remaining moves that make use of `secondaryEffectChance` field
This commit is contained in:
Nephrite 2023-12-25 12:53:15 +09:00
parent f3e67cf543
commit b0b9883625
11 changed files with 326 additions and 928 deletions

View File

@ -223,6 +223,8 @@ bool32 IsAlly(u32 battlerAtk, u32 battlerDef);
bool32 IsGen6ExpShareEnabled(void);
bool32 MoveEffectIsGuaranteed(u32 secondaryEffectChance);
bool32 MoveHasMoveEffect(u32 move, u32 moveEffect, bool32 effectHitOnly);
bool32 MoveHasMoveEffectWithChance(u32 move, u32 moveEffect, u32 chance);
bool32 MoveHasMoveEffectSelf(u32 move, u32 moveEffect);
// Ability checks
bool32 IsSkillSwapBannedAbility(u16 ability);

View File

@ -86,298 +86,294 @@
#define EFFECT_SPITE 82
#define EFFECT_FALSE_SWIPE 83
#define EFFECT_HEAL_BELL 84
#define EFFECT_ALWAYS_CRIT 85
#define EFFECT_TRIPLE_KICK 86
#define EFFECT_THIEF 87
#define EFFECT_MEAN_LOOK 88
#define EFFECT_NIGHTMARE 89
#define EFFECT_MINIMIZE 90
#define EFFECT_CURSE 91
#define EFFECT_HEALING_WISH 92
#define EFFECT_PROTECT 93
#define EFFECT_SPIKES 94
#define EFFECT_FORESIGHT 95
#define EFFECT_PERISH_SONG 96
#define EFFECT_SANDSTORM 97
#define EFFECT_ENDURE 98
#define EFFECT_ROLLOUT 99
#define EFFECT_SWAGGER 100
#define EFFECT_FURY_CUTTER 101
#define EFFECT_ATTRACT 102
#define EFFECT_RETURN 103
#define EFFECT_PRESENT 104
#define EFFECT_FRUSTRATION 105
#define EFFECT_SAFEGUARD 106
#define EFFECT_MAGNITUDE 107
#define EFFECT_BATON_PASS 108
#define EFFECT_PURSUIT 109
#define EFFECT_RAPID_SPIN 110
#define EFFECT_SONICBOOM 111
#define EFFECT_CAPTIVATE 112
#define EFFECT_MORNING_SUN 113
#define EFFECT_SYNTHESIS 114
#define EFFECT_MOONLIGHT 115
#define EFFECT_HIDDEN_POWER 116
#define EFFECT_RAIN_DANCE 117
#define EFFECT_SUNNY_DAY 118
#define EFFECT_ALL_STATS_UP_HIT 119
#define EFFECT_FELL_STINGER 120
#define EFFECT_BELLY_DRUM 121
#define EFFECT_PSYCH_UP 122
#define EFFECT_MIRROR_COAT 123
#define EFFECT_SKULL_BASH 124
#define EFFECT_EARTHQUAKE 125
#define EFFECT_FUTURE_SIGHT 126
#define EFFECT_GUST 127
#define EFFECT_SOLAR_BEAM 128
#define EFFECT_THUNDER 129
#define EFFECT_TELEPORT 130
#define EFFECT_BEAT_UP 131
#define EFFECT_SEMI_INVULNERABLE 132
#define EFFECT_DEFENSE_CURL 133
#define EFFECT_SOFTBOILED 134
#define EFFECT_FAKE_OUT 135
#define EFFECT_UPROAR 136
#define EFFECT_STOCKPILE 137
#define EFFECT_SPIT_UP 138
#define EFFECT_SWALLOW 139
#define EFFECT_WORRY_SEED 140
#define EFFECT_HAIL 141
#define EFFECT_TORMENT 142
#define EFFECT_FLATTER 143
#define EFFECT_WILL_O_WISP 144
#define EFFECT_MEMENTO 145
#define EFFECT_FACADE 146
#define EFFECT_FOCUS_PUNCH 147
#define EFFECT_SMELLING_SALTS 148
#define EFFECT_FOLLOW_ME 149
#define EFFECT_NATURE_POWER 150
#define EFFECT_CHARGE 151
#define EFFECT_TAUNT 152
#define EFFECT_HELPING_HAND 153
#define EFFECT_TRICK 154
#define EFFECT_ROLE_PLAY 155
#define EFFECT_WISH 156
#define EFFECT_ASSIST 157
#define EFFECT_INGRAIN 158
#define EFFECT_MAGIC_COAT 159
#define EFFECT_RECYCLE 160
#define EFFECT_REVENGE 161
#define EFFECT_BRICK_BREAK 162
#define EFFECT_YAWN 163
#define EFFECT_KNOCK_OFF 164
#define EFFECT_ENDEAVOR 165
#define EFFECT_ERUPTION 166
#define EFFECT_SKILL_SWAP 167
#define EFFECT_IMPRISON 168
#define EFFECT_REFRESH 169
#define EFFECT_GRUDGE 170
#define EFFECT_SNATCH 171
#define EFFECT_LOW_KICK 172
#define EFFECT_SECRET_POWER 173
#define EFFECT_RECOIL_33 174
#define EFFECT_TEETER_DANCE 175
#define EFFECT_HIT_ESCAPE 176
#define EFFECT_MUD_SPORT 177
#define EFFECT_WEATHER_BALL 178
#define EFFECT_TICKLE 179
#define EFFECT_COSMIC_POWER 180
#define EFFECT_SKY_UPPERCUT 181
#define EFFECT_BULK_UP 182
#define EFFECT_PLACEHOLDER 183
#define EFFECT_WATER_SPORT 184
#define EFFECT_CALM_MIND 185
#define EFFECT_DRAGON_DANCE 186
#define EFFECT_CAMOUFLAGE 187
#define EFFECT_PLEDGE 188
#define EFFECT_FLING 189
#define EFFECT_NATURAL_GIFT 190
#define EFFECT_WAKE_UP_SLAP 191
#define EFFECT_WRING_OUT 192
#define EFFECT_HEX 193
#define EFFECT_ASSURANCE 194
#define EFFECT_TRUMP_CARD 195
#define EFFECT_ACROBATICS 196
#define EFFECT_HEAT_CRASH 197
#define EFFECT_PUNISHMENT 198
#define EFFECT_STORED_POWER 199
#define EFFECT_ELECTRO_BALL 200
#define EFFECT_GYRO_BALL 201
#define EFFECT_ECHOED_VOICE 202
#define EFFECT_PAYBACK 203
#define EFFECT_ROUND 204
#define EFFECT_BRINE 205
#define EFFECT_VENOSHOCK 206
#define EFFECT_RETALIATE 207
#define EFFECT_BULLDOZE 208
#define EFFECT_FOUL_PLAY 209
#define EFFECT_PSYSHOCK 210
#define EFFECT_ROOST 211
#define EFFECT_GRAVITY 212
#define EFFECT_MIRACLE_EYE 213
#define EFFECT_TAILWIND 214
#define EFFECT_EMBARGO 215
#define EFFECT_AQUA_RING 216
#define EFFECT_TRICK_ROOM 217
#define EFFECT_WONDER_ROOM 218
#define EFFECT_MAGIC_ROOM 219
#define EFFECT_MAGNET_RISE 220
#define EFFECT_TOXIC_SPIKES 221
#define EFFECT_GASTRO_ACID 222
#define EFFECT_STEALTH_ROCK 223
#define EFFECT_TELEKINESIS 224
#define EFFECT_POWER_SWAP 225
#define EFFECT_GUARD_SWAP 226
#define EFFECT_HEART_SWAP 227
#define EFFECT_POWER_SPLIT 228
#define EFFECT_GUARD_SPLIT 229
#define EFFECT_STICKY_WEB 230
#define EFFECT_METAL_BURST 231
#define EFFECT_LUCKY_CHANT 232
#define EFFECT_SUCKER_PUNCH 233
#define EFFECT_SIMPLE_BEAM 234
#define EFFECT_ENTRAINMENT 235
#define EFFECT_HEAL_PULSE 236
#define EFFECT_QUASH 237
#define EFFECT_ION_DELUGE 238
#define EFFECT_FREEZE_DRY 239
#define EFFECT_TOPSY_TURVY 240
#define EFFECT_MISTY_TERRAIN 241
#define EFFECT_GRASSY_TERRAIN 242
#define EFFECT_ELECTRIC_TERRAIN 243
#define EFFECT_PSYCHIC_TERRAIN 244
#define EFFECT_ATTACK_ACCURACY_UP 245
#define EFFECT_ATTACK_SPATK_UP 246
#define EFFECT_HURRICANE 247
#define EFFECT_TWO_TYPED_MOVE 248
#define EFFECT_ME_FIRST 249
#define EFFECT_QUIVER_DANCE 250
#define EFFECT_COIL 251
#define EFFECT_ELECTRIFY 252
#define EFFECT_REFLECT_TYPE 253
#define EFFECT_SOAK 254
#define EFFECT_GROWTH 255
#define EFFECT_LAST_RESORT 256
#define EFFECT_RECOIL_33_STATUS 257
#define EFFECT_RECOIL_50 258
#define EFFECT_SHELL_SMASH 259
#define EFFECT_SHIFT_GEAR 260
#define EFFECT_DEFENSE_UP_3 261
#define EFFECT_NOBLE_ROAR 262
#define EFFECT_VENOM_DRENCH 263
#define EFFECT_TOXIC_THREAD 264
#define EFFECT_HIT_SWITCH_TARGET 265
#define EFFECT_FINAL_GAMBIT 266
#define EFFECT_CHANGE_TYPE_ON_ITEM 267
#define EFFECT_AUTOTOMIZE 268
#define EFFECT_COPYCAT 269
#define EFFECT_DEFOG 270
#define EFFECT_HIT_ENEMY_HEAL_ALLY 271
#define EFFECT_SMACK_DOWN 272
#define EFFECT_SYNCHRONOISE 273
#define EFFECT_PSYCHO_SHIFT 274
#define EFFECT_POWER_TRICK 275
#define EFFECT_FLAME_BURST 276
#define EFFECT_AFTER_YOU 277
#define EFFECT_BESTOW 278
#define EFFECT_ROTOTILLER 279
#define EFFECT_FLOWER_SHIELD 280
#define EFFECT_HIT_PREVENT_ESCAPE 281
#define EFFECT_SPEED_SWAP 282
#define EFFECT_DEFENSE_UP2_HIT 283
#define EFFECT_REVELATION_DANCE 284
#define EFFECT_AURORA_VEIL 285
#define EFFECT_THIRD_TYPE 286
#define EFFECT_FEINT 287
#define EFFECT_SPARKLING_ARIA 288
#define EFFECT_ACUPRESSURE 289
#define EFFECT_AROMATIC_MIST 290
#define EFFECT_POWDER 291
#define EFFECT_BELCH 292
#define EFFECT_PARTING_SHOT 293
#define EFFECT_MAT_BLOCK 294
#define EFFECT_STOMPING_TANTRUM 295
#define EFFECT_INSTRUCT 296
#define EFFECT_THROAT_CHOP 297
#define EFFECT_LASER_FOCUS 298
#define EFFECT_MAGNETIC_FLUX 299
#define EFFECT_GEAR_UP 300
#define EFFECT_INCINERATE 301
#define EFFECT_BUG_BITE 302
#define EFFECT_STRENGTH_SAP 303
#define EFFECT_MIND_BLOWN 304
#define EFFECT_PURIFY 305
#define EFFECT_BURN_UP 306
#define EFFECT_SHORE_UP 307
#define EFFECT_GEOMANCY 308
#define EFFECT_FAIRY_LOCK 309
#define EFFECT_ALLY_SWITCH 310
#define EFFECT_RELIC_SONG 311
#define EFFECT_BODY_PRESS 312
#define EFFECT_EERIE_SPELL 313
#define EFFECT_JUNGLE_HEALING 314
#define EFFECT_COACHING 315
#define EFFECT_LASH_OUT 316
#define EFFECT_GRASSY_GLIDE 317
#define EFFECT_DYNAMAX_DOUBLE_DMG 318
#define EFFECT_DECORATE 319
#define EFFECT_SNIPE_SHOT 320
#define EFFECT_RECOIL_HP_25 321
#define EFFECT_STUFF_CHEEKS 322
#define EFFECT_GRAV_APPLE 323
#define EFFECT_GLITZY_GLOW 324
#define EFFECT_BADDY_BAD 325
#define EFFECT_SAPPY_SEED 326
#define EFFECT_FREEZY_FROST 327
#define EFFECT_SPARKLY_SWIRL 328
#define EFFECT_PLASMA_FISTS 329
#define EFFECT_HYPERSPACE_FURY 330
#define EFFECT_AURA_WHEEL 331
#define EFFECT_PHOTON_GEYSER 332
#define EFFECT_SHELL_SIDE_ARM 333
#define EFFECT_TERRAIN_PULSE 334
#define EFFECT_NO_RETREAT 335
#define EFFECT_TAR_SHOT 336
#define EFFECT_POLTERGEIST 337
#define EFFECT_OCTOLOCK 338
#define EFFECT_CLANGOROUS_SOUL 339
#define EFFECT_BOLT_BEAK 340
#define EFFECT_SKY_DROP 341
#define EFFECT_EXPANDING_FORCE 342
#define EFFECT_METEOR_BEAM 343
#define EFFECT_RISING_VOLTAGE 344
#define EFFECT_BEAK_BLAST 345
#define EFFECT_COURT_CHANGE 346
#define EFFECT_STEEL_BEAM 347
#define EFFECT_EXTREME_EVOBOOST 348
#define EFFECT_HIT_SET_REMOVE_TERRAIN 349 // genesis supernova
#define EFFECT_DARK_VOID 350
#define EFFET_UNUSED_384 351
#define EFFECT_DOUBLE_SHOCK 352
#define EFFECT_VICTORY_DANCE 353
#define EFFECT_TEATIME 354
#define EFFECT_ATTACK_UP_USER_ALLY 355 // Howl 8th gen
#define EFFECT_SHELL_TRAP 356
#define EFFECT_PSYBLADE 357
#define EFFECT_HYDRO_STEAM 358
#define EFFECT_HIT_SET_ENTRY_HAZARD 359
#define EFFECT_BARB_BARRAGE 360
#define EFFECT_REVIVAL_BLESSING 361
#define EFFECT_SNOWSCAPE 362
#define EFFECT_INFERNAL_PARADE 363
#define EFFECT_TAKE_HEART 364
#define EFFECT_COLLISION_COURSE 365
#define EFFECT_MAKE_IT_RAIN 366
#define EFFECT_CORROSIVE_GAS 367
#define EFFECT_POPULATION_BOMB 368
#define EFFECT_SALT_CURE 369
#define EFFECT_CHILLY_RECEPTION 370
#define EFFECT_MAX_MOVE 371
#define EFFECT_GLAIVE_RUSH 372
#define EFFECT_RAGING_BULL 373
#define EFFECT_RAGE_FIST 374
#define EFFECT_DOODLE 375
#define EFFECT_TRIPLE_KICK 85
#define EFFECT_THIEF 86
#define EFFECT_MEAN_LOOK 87
#define EFFECT_NIGHTMARE 88
#define EFFECT_MINIMIZE 89
#define EFFECT_CURSE 90
#define EFFECT_HEALING_WISH 91
#define EFFECT_PROTECT 92
#define EFFECT_SPIKES 93
#define EFFECT_FORESIGHT 94
#define EFFECT_PERISH_SONG 95
#define EFFECT_SANDSTORM 96
#define EFFECT_ENDURE 97
#define EFFECT_ROLLOUT 98
#define EFFECT_SWAGGER 99
#define EFFECT_FURY_CUTTER 100
#define EFFECT_ATTRACT 101
#define EFFECT_RETURN 102
#define EFFECT_PRESENT 103
#define EFFECT_FRUSTRATION 104
#define EFFECT_SAFEGUARD 105
#define EFFECT_MAGNITUDE 106
#define EFFECT_BATON_PASS 107
#define EFFECT_PURSUIT 108
#define EFFECT_RAPID_SPIN 109
#define EFFECT_SONICBOOM 110
#define EFFECT_CAPTIVATE 111
#define EFFECT_MORNING_SUN 112
#define EFFECT_SYNTHESIS 113
#define EFFECT_MOONLIGHT 114
#define EFFECT_HIDDEN_POWER 115
#define EFFECT_RAIN_DANCE 116
#define EFFECT_SUNNY_DAY 117
#define EFFECT_ALL_STATS_UP_HIT 118
#define EFFECT_FELL_STINGER 119
#define EFFECT_BELLY_DRUM 120
#define EFFECT_PSYCH_UP 121
#define EFFECT_MIRROR_COAT 122
#define EFFECT_SKULL_BASH 123
#define EFFECT_EARTHQUAKE 124
#define EFFECT_FUTURE_SIGHT 125
#define EFFECT_GUST 126
#define EFFECT_SOLAR_BEAM 127
#define EFFECT_THUNDER 128
#define EFFECT_TELEPORT 129
#define EFFECT_BEAT_UP 130
#define EFFECT_SEMI_INVULNERABLE 131
#define EFFECT_DEFENSE_CURL 132
#define EFFECT_SOFTBOILED 133
#define EFFECT_FAKE_OUT 134
#define EFFECT_UPROAR 135
#define EFFECT_STOCKPILE 136
#define EFFECT_SPIT_UP 137
#define EFFECT_SWALLOW 138
#define EFFECT_WORRY_SEED 139
#define EFFECT_HAIL 140
#define EFFECT_TORMENT 141
#define EFFECT_FLATTER 142
#define EFFECT_WILL_O_WISP 143
#define EFFECT_MEMENTO 144
#define EFFECT_FACADE 145
#define EFFECT_FOCUS_PUNCH 146
#define EFFECT_SMELLING_SALTS 147
#define EFFECT_FOLLOW_ME 148
#define EFFECT_NATURE_POWER 149
#define EFFECT_CHARGE 150
#define EFFECT_TAUNT 151
#define EFFECT_HELPING_HAND 152
#define EFFECT_TRICK 153
#define EFFECT_ROLE_PLAY 154
#define EFFECT_WISH 155
#define EFFECT_ASSIST 156
#define EFFECT_INGRAIN 157
#define EFFECT_MAGIC_COAT 158
#define EFFECT_RECYCLE 159
#define EFFECT_REVENGE 160
#define EFFECT_BRICK_BREAK 161
#define EFFECT_YAWN 162
#define EFFECT_KNOCK_OFF 163
#define EFFECT_ENDEAVOR 164
#define EFFECT_ERUPTION 165
#define EFFECT_SKILL_SWAP 166
#define EFFECT_IMPRISON 167
#define EFFECT_REFRESH 168
#define EFFECT_GRUDGE 169
#define EFFECT_SNATCH 170
#define EFFECT_LOW_KICK 171
#define EFFECT_SECRET_POWER 172
#define EFFECT_TEETER_DANCE 173
#define EFFECT_HIT_ESCAPE 174
#define EFFECT_MUD_SPORT 175
#define EFFECT_WEATHER_BALL 176
#define EFFECT_TICKLE 177
#define EFFECT_COSMIC_POWER 178
#define EFFECT_SKY_UPPERCUT 179
#define EFFECT_BULK_UP 180
#define EFFECT_PLACEHOLDER 181
#define EFFECT_WATER_SPORT 182
#define EFFECT_CALM_MIND 183
#define EFFECT_DRAGON_DANCE 184
#define EFFECT_CAMOUFLAGE 185
#define EFFECT_PLEDGE 186
#define EFFECT_FLING 187
#define EFFECT_NATURAL_GIFT 188
#define EFFECT_WAKE_UP_SLAP 189
#define EFFECT_WRING_OUT 190
#define EFFECT_HEX 191
#define EFFECT_ASSURANCE 192
#define EFFECT_TRUMP_CARD 193
#define EFFECT_ACROBATICS 194
#define EFFECT_HEAT_CRASH 195
#define EFFECT_PUNISHMENT 196
#define EFFECT_STORED_POWER 197
#define EFFECT_ELECTRO_BALL 198
#define EFFECT_GYRO_BALL 199
#define EFFECT_ECHOED_VOICE 200
#define EFFECT_PAYBACK 201
#define EFFECT_ROUND 202
#define EFFECT_BRINE 203
#define EFFECT_VENOSHOCK 204
#define EFFECT_RETALIATE 205
#define EFFECT_BULLDOZE 206
#define EFFECT_FOUL_PLAY 207
#define EFFECT_PSYSHOCK 208
#define EFFECT_ROOST 209
#define EFFECT_GRAVITY 210
#define EFFECT_MIRACLE_EYE 211
#define EFFECT_TAILWIND 212
#define EFFECT_EMBARGO 213
#define EFFECT_AQUA_RING 214
#define EFFECT_TRICK_ROOM 215
#define EFFECT_WONDER_ROOM 216
#define EFFECT_MAGIC_ROOM 217
#define EFFECT_MAGNET_RISE 218
#define EFFECT_TOXIC_SPIKES 219
#define EFFECT_GASTRO_ACID 220
#define EFFECT_STEALTH_ROCK 221
#define EFFECT_TELEKINESIS 222
#define EFFECT_POWER_SWAP 223
#define EFFECT_GUARD_SWAP 224
#define EFFECT_HEART_SWAP 225
#define EFFECT_POWER_SPLIT 226
#define EFFECT_GUARD_SPLIT 227
#define EFFECT_STICKY_WEB 228
#define EFFECT_METAL_BURST 229
#define EFFECT_LUCKY_CHANT 230
#define EFFECT_SUCKER_PUNCH 231
#define EFFECT_SIMPLE_BEAM 232
#define EFFECT_ENTRAINMENT 233
#define EFFECT_HEAL_PULSE 234
#define EFFECT_QUASH 235
#define EFFECT_ION_DELUGE 236
#define EFFECT_FREEZE_DRY 237
#define EFFECT_TOPSY_TURVY 238
#define EFFECT_MISTY_TERRAIN 239
#define EFFECT_GRASSY_TERRAIN 240
#define EFFECT_ELECTRIC_TERRAIN 241
#define EFFECT_PSYCHIC_TERRAIN 242
#define EFFECT_ATTACK_ACCURACY_UP 243
#define EFFECT_ATTACK_SPATK_UP 244
#define EFFECT_HURRICANE 245
#define EFFECT_TWO_TYPED_MOVE 246
#define EFFECT_ME_FIRST 247
#define EFFECT_QUIVER_DANCE 248
#define EFFECT_COIL 249
#define EFFECT_ELECTRIFY 250
#define EFFECT_REFLECT_TYPE 251
#define EFFECT_SOAK 252
#define EFFECT_GROWTH 253
#define EFFECT_LAST_RESORT 254
#define EFFECT_SHELL_SMASH 255
#define EFFECT_SHIFT_GEAR 256
#define EFFECT_DEFENSE_UP_3 257
#define EFFECT_NOBLE_ROAR 258
#define EFFECT_VENOM_DRENCH 259
#define EFFECT_TOXIC_THREAD 260
#define EFFECT_HIT_SWITCH_TARGET 261
#define EFFECT_FINAL_GAMBIT 262
#define EFFECT_CHANGE_TYPE_ON_ITEM 263
#define EFFECT_AUTOTOMIZE 264
#define EFFECT_COPYCAT 265
#define EFFECT_DEFOG 266
#define EFFECT_HIT_ENEMY_HEAL_ALLY 267
#define EFFECT_SMACK_DOWN 268
#define EFFECT_SYNCHRONOISE 269
#define EFFECT_PSYCHO_SHIFT 270
#define EFFECT_POWER_TRICK 271
#define EFFECT_FLAME_BURST 272
#define EFFECT_AFTER_YOU 273
#define EFFECT_BESTOW 274
#define EFFECT_ROTOTILLER 275
#define EFFECT_FLOWER_SHIELD 276
#define EFFECT_HIT_PREVENT_ESCAPE 277
#define EFFECT_SPEED_SWAP 278
#define EFFECT_DEFENSE_UP2_HIT 279
#define EFFECT_REVELATION_DANCE 280
#define EFFECT_AURORA_VEIL 281
#define EFFECT_THIRD_TYPE 282
#define EFFECT_FEINT 283
#define EFFECT_SPARKLING_ARIA 284
#define EFFECT_ACUPRESSURE 285
#define EFFECT_AROMATIC_MIST 286
#define EFFECT_POWDER 287
#define EFFECT_BELCH 288
#define EFFECT_PARTING_SHOT 289
#define EFFECT_MAT_BLOCK 290
#define EFFECT_STOMPING_TANTRUM 291
#define EFFECT_INSTRUCT 292
#define EFFECT_THROAT_CHOP 293
#define EFFECT_LASER_FOCUS 294
#define EFFECT_MAGNETIC_FLUX 295
#define EFFECT_GEAR_UP 296
#define EFFECT_INCINERATE 297
#define EFFECT_BUG_BITE 298
#define EFFECT_STRENGTH_SAP 299
#define EFFECT_MIND_BLOWN 300
#define EFFECT_PURIFY 301
#define EFFECT_BURN_UP 302
#define EFFECT_SHORE_UP 303
#define EFFECT_GEOMANCY 304
#define EFFECT_FAIRY_LOCK 305
#define EFFECT_ALLY_SWITCH 306
#define EFFECT_RELIC_SONG 307
#define EFFECT_BODY_PRESS 308
#define EFFECT_EERIE_SPELL 309
#define EFFECT_JUNGLE_HEALING 310
#define EFFECT_COACHING 311
#define EFFECT_LASH_OUT 312
#define EFFECT_GRASSY_GLIDE 313
#define EFFECT_DYNAMAX_DOUBLE_DMG 314
#define EFFECT_DECORATE 315
#define EFFECT_SNIPE_SHOT 316
#define EFFECT_RECOIL_HP_25 317
#define EFFECT_STUFF_CHEEKS 318
#define EFFECT_GRAV_APPLE 319
#define EFFECT_GLITZY_GLOW 320
#define EFFECT_BADDY_BAD 321
#define EFFECT_SAPPY_SEED 322
#define EFFECT_FREEZY_FROST 323
#define EFFECT_SPARKLY_SWIRL 324
#define EFFECT_PLASMA_FISTS 325
#define EFFECT_HYPERSPACE_FURY 326
#define EFFECT_AURA_WHEEL 327
#define EFFECT_PHOTON_GEYSER 328
#define EFFECT_SHELL_SIDE_ARM 329
#define EFFECT_TERRAIN_PULSE 330
#define EFFECT_NO_RETREAT 331
#define EFFECT_TAR_SHOT 332
#define EFFECT_POLTERGEIST 333
#define EFFECT_OCTOLOCK 334
#define EFFECT_CLANGOROUS_SOUL 335
#define EFFECT_BOLT_BEAK 336
#define EFFECT_SKY_DROP 337
#define EFFECT_EXPANDING_FORCE 338
#define EFFECT_METEOR_BEAM 339
#define EFFECT_RISING_VOLTAGE 340
#define EFFECT_BEAK_BLAST 341
#define EFFECT_COURT_CHANGE 342
#define EFFECT_STEEL_BEAM 343
#define EFFECT_EXTREME_EVOBOOST 344
#define EFFECT_HIT_SET_REMOVE_TERRAIN 345
#define EFFECT_DARK_VOID 346
#define EFFET_UNUSED_384 347
#define EFFECT_DOUBLE_SHOCK 348
#define EFFECT_VICTORY_DANCE 349
#define EFFECT_TEATIME 350
#define EFFECT_ATTACK_UP_USER_ALLY 351
#define EFFECT_SHELL_TRAP 352
#define EFFECT_PSYBLADE 353
#define EFFECT_HYDRO_STEAM 354
#define EFFECT_HIT_SET_ENTRY_HAZARD 355
#define EFFECT_BARB_BARRAGE 356
#define EFFECT_REVIVAL_BLESSING 357
#define EFFECT_SNOWSCAPE 358
#define EFFECT_INFERNAL_PARADE 359
#define EFFECT_TAKE_HEART 360
#define EFFECT_COLLISION_COURSE 361
#define EFFECT_MAKE_IT_RAIN 362
#define EFFECT_CORROSIVE_GAS 363
#define EFFECT_POPULATION_BOMB 364
#define EFFECT_SALT_CURE 365
#define EFFECT_CHILLY_RECEPTION 366
#define EFFECT_MAX_MOVE 367
#define EFFECT_GLAIVE_RUSH 368
#define EFFECT_RAGING_BULL 369
#define EFFECT_RAGE_FIST 370
#define EFFECT_DOODLE 371
#define NUM_BATTLE_MOVE_EFFECTS 376
#define NUM_BATTLE_MOVE_EFFECTS 372
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H

View File

@ -11398,6 +11398,30 @@ bool32 MoveHasMoveEffect(u32 move, u32 moveEffect, bool32 effectHitOnly)
return FALSE;
}
bool32 MoveHasMoveEffectWithChance(u32 move, u32 moveEffect, u32 chance)
{
u8 i;
for (i = 0; i < gBattleMoves[move].numAdditionalEffects; i++)
{
if (gBattleMoves[move].additionalEffects[i].moveEffect == moveEffect
&& gBattleMoves[move].additionalEffects[i].chance == chance)
return TRUE;
}
return FALSE;
}
bool32 MoveHasMoveEffectSelf(u32 move, u32 moveEffect)
{
u8 i;
for (i = 0; i < gBattleMoves[move].numAdditionalEffects; i++)
{
if (gBattleMoves[move].additionalEffects[i].moveEffect == moveEffect
&& gBattleMoves[move].additionalEffects[i].self == TRUE)
return TRUE;
}
return FALSE;
}
bool8 CanMonParticipateInSkyBattle(struct Pokemon *mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES);

File diff suppressed because it is too large Load Diff

View File

@ -174,7 +174,7 @@ SINGLE_BATTLE_TEST("Keen Eye & Gen9+ Illuminate don't prevent Spectral Thief fro
GIVEN {
ASSUME(gBattleMoves[MOVE_HONE_CLAWS].effect == EFFECT_ATTACK_ACCURACY_UP);
ASSUME(gBattleMoves[MOVE_SPECTRAL_THIEF].effect == EFFECT_SPECTRAL_THIEF);
ASSUME(MoveHasMoveEffect(MOVE_SPECTRAL_THIEF, MOVE_EFFECT_SPECTRAL_THIEF, FALSE) == TRUE);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(species) { Ability(ability); }
} WHEN {

View File

@ -176,10 +176,8 @@ AI_SINGLE_BATTLE_TEST("AI chooses moves with secondary effect that have a 100% c
GIVEN {
AI_LOG;
ASSUME(gBattleMoves[MOVE_SHADOW_BALL].effect == EFFECT_SPECIAL_DEFENSE_DOWN_HIT);
ASSUME(gBattleMoves[MOVE_SHADOW_BALL].secondaryEffectChance == 20);
ASSUME(gBattleMoves[MOVE_LUSTER_PURGE].effect == EFFECT_SPECIAL_DEFENSE_DOWN_HIT);
ASSUME(gBattleMoves[MOVE_LUSTER_PURGE].secondaryEffectChance == 50);
ASSUME(MoveHasMoveEffectWithChance(MOVE_SHADOW_BALL, MOVE_EFFECT_SP_DEF_MINUS_1, 20));
ASSUME(MoveHasMoveEffectWithChance(MOVE_LUSTER_PURGE, MOVE_EFFECT_SP_DEF_MINUS_1, 50));
AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT);
PLAYER(SPECIES_REGICE);
OPPONENT(SPECIES_REGIROCK) { Ability(ability); Moves(MOVE_SHADOW_BALL, MOVE_LUSTER_PURGE); }

View File

@ -3,7 +3,7 @@
SINGLE_BATTLE_TEST("Shaymin-Sky reverts to Shaymin-Land when frozen or frostbitten")
{
ASSUME(gBattleMoves[MOVE_POWDER_SNOW].effect == ((B_USE_FROSTBITE == TRUE) ? EFFECT_FROSTBITE_HIT : EFFECT_FREEZE_HIT));
ASSUME(MoveHasMoveEffect(MOVE_POWDER_SNOW, MOVE_EFFECT_FREEZE_OR_FROSTBITE, FALSE));
GIVEN {
PLAYER(SPECIES_SHAYMIN_SKY);
OPPONENT(SPECIES_WOBBUFFET);

View File

@ -190,7 +190,7 @@ SINGLE_BATTLE_TEST("White Herb wont have time to activate if Pickpocket steals i
{
KNOWN_FAILING; // White Herb is activated
GIVEN {
ASSUME(gBattleMoves[MOVE_LEAF_STORM].effect == EFFECT_OVERHEAT);
ASSUME(MoveHasMoveEffectSelf(MOVE_LEAF_STORM, MOVE_EFFECT_SP_ATK_TWO_DOWN));
PLAYER(SPECIES_SLUGMA) { Ability(ABILITY_WEAK_ARMOR); Item(ITEM_WHITE_HERB); }
OPPONENT(SPECIES_SNEASEL) { Ability(ABILITY_PICKPOCKET); }
} WHEN {

View File

@ -75,7 +75,7 @@ SINGLE_BATTLE_TEST("Freezing Glare shouldn't freeze Psychic-types")
{
GIVEN {
ASSUME(gSpeciesInfo[SPECIES_ARTICUNO_GALARIAN].types[0] == TYPE_PSYCHIC);
ASSUME(gBattleMoves[MOVE_FREEZING_GLARE].effect == EFFECT_FREEZE_HIT);
ASSUME(MoveHasMoveEffect(MOVE_FREEZING_GLARE, MOVE_EFFECT_FREEZE_OR_FROSTBITE, FALSE) == TRUE);
ASSUME(gBattleMoves[MOVE_FREEZING_GLARE].type == TYPE_PSYCHIC);
PLAYER(SPECIES_ARTICUNO_GALARIAN);
OPPONENT(SPECIES_ARTICUNO_GALARIAN);

View File

@ -48,7 +48,7 @@ SINGLE_BATTLE_TEST("Body Slam shouldn't paralyze Normal-types")
{
GIVEN {
ASSUME(gSpeciesInfo[SPECIES_TAUROS].types[0] == TYPE_NORMAL);
ASSUME(gBattleMoves[MOVE_BODY_SLAM].effect == EFFECT_PARALYZE_HIT);
ASSUME(MoveHasMoveEffect(MOVE_BODY_SLAM, MOVE_EFFECT_PARALYSIS, FALSE) == TRUE);
ASSUME(gBattleMoves[MOVE_BODY_SLAM].type == TYPE_NORMAL);
PLAYER(SPECIES_TAUROS);
OPPONENT(SPECIES_TAUROS);

View File

@ -38,7 +38,7 @@ DOUBLE_BATTLE_TEST("Rainbow doubles the chance of secondary move effects")
{
PASSES_RANDOMLY(20, 100, RNG_SECONDARY_EFFECT);
GIVEN {
ASSUME(gBattleMoves[MOVE_EMBER].effect == EFFECT_BURN_HIT);
ASSUME(MoveHasMoveEffect(MOVE_EMBER, MOVE_EFFECT_BURN, FALSE) == TRUE);
PLAYER(SPECIES_WOBBUFFET) { Speed(4); }
PLAYER(SPECIES_WYNAUT) { Speed(3); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(8); }
@ -59,7 +59,7 @@ DOUBLE_BATTLE_TEST("Rainbow flinch chance does not stack with Serene Grace")
{
PASSES_RANDOMLY(60, 100, RNG_SECONDARY_EFFECT);
GIVEN {
ASSUME(gBattleMoves[MOVE_BITE].effect == EFFECT_FLINCH_HIT);
ASSUME(MoveHasMoveEffect(MOVE_BITE, MOVE_EFFECT_FLINCH, FALSE) == TRUE);
PLAYER(SPECIES_TOGEPI) { Speed(8); Ability(ABILITY_SERENE_GRACE); }
PLAYER(SPECIES_WOBBUFFET) { Speed(5); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(4); }
@ -76,27 +76,6 @@ DOUBLE_BATTLE_TEST("Rainbow flinch chance does not stack with Serene Grace")
}
}
DOUBLE_BATTLE_TEST("Rainbow flinch chance does not stack with Serene Grace if mvoe Triple Arrows is used")
{
PASSES_RANDOMLY(60, 100, RNG_TRIPLE_ARROWS_FLINCH);
GIVEN {
ASSUME(gBattleMoves[MOVE_TRIPLE_ARROWS].effect == EFFECT_TRIPLE_ARROWS);
PLAYER(SPECIES_TOGEPI) { Speed(8); Ability(ABILITY_SERENE_GRACE); }
PLAYER(SPECIES_WOBBUFFET) { Speed(5); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(4); }
OPPONENT(SPECIES_WYNAUT) { Speed(3); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_WATER_PLEDGE, target: opponentLeft);
MOVE(playerRight, MOVE_FIRE_PLEDGE, target: opponentRight);
}
TURN { MOVE(playerLeft, MOVE_TRIPLE_ARROWS, target: opponentRight); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_PLEDGE, playerRight);
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_ARROWS, playerLeft);
MESSAGE("Foe Wynaut flinched!");
}
}
DOUBLE_BATTLE_TEST("Fire and Grass Pledge summons Sea Of Fire for four turns that damages the opponent")
{
GIVEN {