sovereignx/test/battle/trainer_control.h
Martin Griffin 8bd5ac2e7a
Competitive-formatted parties (#3545)
$ python3 migration_scripts/convert_parties.py src/data/trainers.h src/data/trainer_parties.h src/data/npc_trainers.party
Is available to convert Trainer Control-formatted trainers/parties into
Competitive-formatted ones.

Multiple '#include's can be placed in the trainer section of src/data.c
to support spreading the trainers across multiple .party files.

trainerproc does not interpret the values, leaving that job to the C
compiler, so we use '#line' to associate those errors with the lines in
the .party file(s). Because the columns don't make sense we use
-fno-show-column and -fno-diagostics-show-caret. We might want to move
gTrainers into its own file so that the rest of src/data.c isn't
affected by those flags.

Extensions (misfeatures, imo):
- .party files are passed through cpp, so '#define's are supported, and so
  are '// ...' and '/* ... */' comments.
- .party files also support writing, e.g. 'SPECIES_PIKACHU' instead of
  'Pikachu'. This allows people to write constants explicitly if they
  like.

Pragmas:
- '#pragma trainerproc ivs explicit' requires an explicit 'IVs:' line
  rather than defaulting to 31s.
- '#pragma trainerproc ivs <IVs>' changes the default IVs.
- '#pragma trainerproc level explicit' requires an explicit 'Level:'
  line rather than defaulting to 100.
- '#pragma trainerproc level <level>' changes the default level.

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-04-06 15:05:15 -03:00

88 lines
2.2 KiB
C

//
// DO NOT MODIFY THIS FILE! It is auto-generated from test/battle/trainer_control.party
//
// If you want to modify this file set COMPETITIVE_PARTY_SYNTAX to FALSE
// in include/config.h and remove this notice.
// Use sed -i '/^#line/d' 'test/battle/trainer_control.h' to remove #line markers.
//
#line 1 "test/battle/trainer_control.party"
#line 1
[0] =
{
#line 2
.trainerName = _("Test1"),
#line 3
.trainerClass = TRAINER_CLASS_PKMN_TRAINER_1,
#line 4
.trainerPic = TRAINER_PIC_RED,
.encounterMusic_gender =
#line 6
TRAINER_ENCOUNTER_MUSIC_MALE,
#line 7
.doubleBattle = FALSE,
.partySize = 3,
.party = (const struct TrainerMon[])
{
{
#line 9
.nickname = COMPOUND_STRING("Bubbles"),
#line 9
.species = SPECIES_WOBBUFFET,
#line 9
.gender = TRAINER_MON_FEMALE,
#line 9
.heldItem = ITEM_ASSAULT_VEST,
#line 14
.ev = TRAINER_PARTY_EVS(252, 0, 0, 252, 4, 0),
#line 13
.iv = TRAINER_PARTY_IVS(25, 26, 27, 28, 29, 30),
#line 12
.ability = ABILITY_TELEPATHY,
#line 11
.lvl = 67,
#line 17
.ball = ITEM_MASTER_BALL,
#line 15
.friendship = 42,
#line 10
.nature = NATURE_HASTY,
#line 16
.isShiny = TRUE,
#line 18
.dynamaxLevel = 5,
.moves = {
#line 19
MOVE_AIR_SLASH,
MOVE_BARRIER,
MOVE_SOLAR_BEAM,
MOVE_EXPLOSION,
},
},
{
#line 24
.species = SPECIES_WOBBUFFET,
.gender = TRAINER_MON_RANDOM_GENDER,
#line 27
.iv = TRAINER_PARTY_IVS(0, 0, 0, 0, 0, 0),
#line 26
.ability = ABILITY_SHADOW_TAG,
#line 25
.lvl = 5,
.nature = NATURE_HARDY,
.dynamaxLevel = MAX_DYNAMAX_LEVEL,
},
{
#line 29
.species = SPECIES_WYNAUT,
.gender = TRAINER_MON_RANDOM_GENDER,
#line 31
.iv = TRAINER_PARTY_IVS(0, 0, 0, 0, 0, 0),
#line 30
.lvl = 5,
.nature = NATURE_HARDY,
.dynamaxLevel = MAX_DYNAMAX_LEVEL,
},
},
},