a64e1c63c1
* Made gBattleMoves handle the InGame name and description of battle moves No more multiple arrays in separate, individual files. Note: -Keep an eye on Task_LearnedMove. * Reintroduced move names Misc: -Fixed Trick-or-Treat and Light of Ruin's expanded names. -Introduced a new field for Z-Move names, and a constant for their name length. -Added a few TODOs to GetBattleMoveName. -Updated GetMaxMoveName and GetZMoveName. There's no reason not to let GetBattleMoveName handle everything on its own. * Updated GetBattleMoveName to handle Z-Move Names Misc: -Removed pointless TODO about MOVE_NAME_LENGTH. -The compiler doesn't allow to have a move name with a value higher than MOVE_NAME_LENGTH, therefore it's pointless to worry about it. * Fixed a couple of expanded move names * Removed zMoveName variable of struct BattleMove and extended the name variable's size * Ditched no longer used MOVE_NAME_LENGTH constant * Corrected the names of the max moves I should have done this after updating the size of the name variable of the struct BattleMove, but I didn't think about it at all until Cancer Fairy indirectly gave me the idea. * Fixed U-turn's name * Brought back MOVE_NAME_LENGTH I think it doesn't make sense to have a Z_MOVE_NAME_LENGTH because the length in question is used for all battle moves, not just the Z-Moves. * Introduced a union for Move/Z-Move names in the struct BattleMove * Fixed the union for gBattleMoves move names Also updated GetBattleMoveName to properly handle Max Move names. Also also renamed the "zMoveName" variable to "bigMoveName" which better reflects its purpose. Z-Move names weren't the only thing it covered, since it also handles Max Move names. * Removed deprecated GetZMoveName and GetMaxMoveName * Reintroduced mention to gMoveNames in sGFRomHeader * Fixed move names and ported move descriptions * Fused the struct ContestMove into the struct BattleMove * Removed no longer used Z_MOVE_NAME_LENGTH constant * Renamed the struct BattleMove's bigMoveName variable and introduced macros to prettify move names * Reintroduced the contest parameters for Pokémon moves * Renamed gBattleMoves to gMovesInfo This is consistent with gSpeciesInfo, the array that contains most of the species data. * Renamed the BattleMove struct to MovesInfo This is consistent with the struct SpeciesInfo, which contains the variables used by the gSpeciesInfo array. * Removed empty lines separating battle params from contest params in gMovesInfo * Renamed MovesInfo to MoveInfo * Added Cancer Fairy's HANDLE_EXPANDED_MOVE_NAME macro Used to handle moves with expanded names in a more comfortable manner. Also fixed Trick-or-Treat's expanded name. * Renamed GetBattleMoveName to GetMoveName * Added a comment pointing out that the shared move descriptions are shared move descriptions * Re-aligned one of the escape characters of CHECK_MOVE_FLAG * Renamed the battle_moves.h file to moves_info.h instead for consistency's sake * Applied Eduardo's adjustments * Using compound string for regular move names as well, saving 1180 bytes and making their use consistent * Move description formatting * Updated Pursuit test after merge * Renamed the BATTLE_CATEGORY constants to DAMAGE_CATEGORY --------- Co-authored-by: Nephrite <thechurchofcage@gmail.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com> Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
153 lines
6.1 KiB
C
153 lines
6.1 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gMovesInfo[MOVE_COURT_CHANGE].effect == EFFECT_COURT_CHANGE);
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("Court Change swaps entry hazards used by the opponent")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WYNAUT);
|
|
PLAYER(SPECIES_WYNAUT);
|
|
PLAYER(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(opponentLeft, MOVE_STICKY_WEB); MOVE(opponentRight, MOVE_STEALTH_ROCK); }
|
|
TURN { MOVE(opponentLeft, MOVE_SPIKES); MOVE(opponentRight, MOVE_TOXIC_SPIKES); }
|
|
TURN { MOVE(playerLeft, MOVE_COURT_CHANGE); }
|
|
TURN { SWITCH(playerLeft, 2); SWITCH(opponentLeft, 2); }
|
|
} SCENE {
|
|
MESSAGE("Foe Wobbuffet used Sticky Web!");
|
|
MESSAGE("Foe Wobbuffet used Stealth Rock!");
|
|
MESSAGE("Foe Wobbuffet used Spikes!");
|
|
MESSAGE("Foe Wobbuffet used Toxic Spikes!");
|
|
MESSAGE("Wynaut used Court Change!");
|
|
MESSAGE("Wynaut swapped the battle effects affecting each side!");
|
|
MESSAGE("Go! Wynaut!");
|
|
NONE_OF {
|
|
MESSAGE("Wynaut is hurt by spikes!");
|
|
MESSAGE("Pointed stones dug into Wynaut!");
|
|
MESSAGE("Wynaut was poisoned!");
|
|
MESSAGE("Wynaut was caught in a Sticky Web!");
|
|
}
|
|
MESSAGE("2 sent out Wobbuffet!");
|
|
MESSAGE("Foe Wobbuffet is hurt by spikes!");
|
|
MESSAGE("Pointed stones dug into Foe Wobbuffet!");
|
|
MESSAGE("Foe Wobbuffet was poisoned!");
|
|
MESSAGE("Foe Wobbuffet was caught in a Sticky Web!");
|
|
}
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("Court Change swaps entry hazards used by the player")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
} WHEN {
|
|
TURN { MOVE(playerLeft, MOVE_STICKY_WEB); MOVE(playerRight, MOVE_STEALTH_ROCK); }
|
|
TURN { MOVE(playerLeft, MOVE_SPIKES); MOVE(playerRight, MOVE_TOXIC_SPIKES); }
|
|
TURN { MOVE(opponentLeft, MOVE_COURT_CHANGE); }
|
|
TURN { SWITCH(opponentLeft, 2); SWITCH(playerLeft, 2); }
|
|
} SCENE {
|
|
MESSAGE("Wobbuffet used Sticky Web!");
|
|
MESSAGE("Wobbuffet used Stealth Rock!");
|
|
MESSAGE("Wobbuffet used Spikes!");
|
|
MESSAGE("Wobbuffet used Toxic Spikes!");
|
|
MESSAGE("Foe Wynaut used Court Change!");
|
|
MESSAGE("Foe Wynaut swapped the battle effects affecting each side!");
|
|
MESSAGE("Go! Wobbuffet!");
|
|
MESSAGE("Wobbuffet is hurt by spikes!");
|
|
MESSAGE("Pointed stones dug into Wobbuffet!");
|
|
MESSAGE("Wobbuffet was poisoned!");
|
|
MESSAGE("Wobbuffet was caught in a Sticky Web!");
|
|
MESSAGE("2 sent out Wynaut!");
|
|
NONE_OF {
|
|
MESSAGE("Foe Wynaut is hurt by spikes!");
|
|
MESSAGE("Pointed stones dug into Foe Wynaut!");
|
|
MESSAGE("Foe Wynaut was poisoned!");
|
|
MESSAGE("Foe Wynaut was caught in a Sticky Web!");
|
|
}
|
|
}
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("Court Change used by the player swaps Mist, Safeguard, Lucky Chant, Reflect, Light Screen, Tailwind")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WYNAUT);
|
|
PLAYER(SPECIES_WYNAUT);
|
|
PLAYER(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(opponentLeft, MOVE_MIST); MOVE(opponentRight, MOVE_SAFEGUARD); }
|
|
TURN { MOVE(opponentLeft, MOVE_LUCKY_CHANT); MOVE(opponentRight, MOVE_REFLECT); }
|
|
TURN { MOVE(opponentLeft, MOVE_LIGHT_SCREEN); MOVE(opponentRight, MOVE_TAILWIND); }
|
|
TURN { MOVE(playerLeft, MOVE_COURT_CHANGE); }
|
|
TURN { }
|
|
TURN { }
|
|
TURN { }
|
|
TURN { }
|
|
} SCENE {
|
|
MESSAGE("Foe Wobbuffet used Mist!");
|
|
MESSAGE("Foe Wobbuffet used Safeguard!");
|
|
MESSAGE("Foe Wobbuffet used Lucky Chant!");
|
|
MESSAGE("Foe Wobbuffet used Reflect!");
|
|
MESSAGE("Foe Wobbuffet used Light Screen!");
|
|
MESSAGE("Foe Wobbuffet used Tailwind!");
|
|
MESSAGE("Wynaut used Court Change!");
|
|
MESSAGE("Wynaut swapped the battle effects affecting each side!");
|
|
// The effects now end for the player side.
|
|
MESSAGE("Ally's Mist wore off!");
|
|
MESSAGE("Ally's party is no longer protected by Safeguard!");
|
|
MESSAGE("Ally's Reflect wore off!");
|
|
MESSAGE("Your team's Lucky Chant wore off!");
|
|
MESSAGE("Your team's tailwind petered out!");
|
|
MESSAGE("Ally's Light Screen wore off!");
|
|
}
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("Court Change used by the opponent swaps Mist, Safeguard, Lucky Chant, Reflect, Light Screen, Tailwind")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
} WHEN {
|
|
TURN { MOVE(playerLeft, MOVE_MIST); MOVE(playerRight, MOVE_SAFEGUARD); }
|
|
TURN { MOVE(playerLeft, MOVE_LUCKY_CHANT); MOVE(playerRight, MOVE_REFLECT); }
|
|
TURN { MOVE(playerLeft, MOVE_LIGHT_SCREEN); MOVE(playerRight, MOVE_TAILWIND); }
|
|
TURN { MOVE(opponentLeft, MOVE_COURT_CHANGE); }
|
|
TURN { }
|
|
TURN { }
|
|
TURN { }
|
|
TURN { }
|
|
} SCENE {
|
|
MESSAGE("Wobbuffet used Mist!");
|
|
MESSAGE("Wobbuffet used Safeguard!");
|
|
MESSAGE("Wobbuffet used Lucky Chant!");
|
|
MESSAGE("Wobbuffet used Reflect!");
|
|
MESSAGE("Wobbuffet used Light Screen!");
|
|
MESSAGE("Wobbuffet used Tailwind!");
|
|
MESSAGE("Foe Wynaut used Court Change!");
|
|
MESSAGE("Foe Wynaut swapped the battle effects affecting each side!");
|
|
// The effects now end for the player side.
|
|
MESSAGE("Foe's Mist wore off!");
|
|
MESSAGE("Foe's party is no longer protected by Safeguard!");
|
|
MESSAGE("Foe's Reflect wore off!");
|
|
MESSAGE("The opposing team's Lucky Chant wore off!");
|
|
MESSAGE("The opposing team's tailwind petered out!");
|
|
MESSAGE("Foe's Light Screen wore off!");
|
|
}
|
|
}
|