Define a Battle Challenge

This page describes **how to define a battle challenge**.

## PBS file "battle\_facility\_lists.txt"

This PBS file lists all available sets of Pokémon/trainers. Each set can define which particular challenges they are used for. There is also a default set of Pokémon/trainers defined in this file, for any challenges which do not have their own set defined in here.

Each section is one separate set of Pokémon/trainers.

 Trainers
 Pokemon
 Challenges

Examples:

```
[DefaultTrainerList]
Trainers = battle_tower_trainers.txt
Pokemon = battle_tower_pokemon.txt
#-------------------------------
[TrainerList]
Trainers = cup_poke_trainers.txt
Pokemon = cup_poke_pkmn.txt
Challenges = pokecupsingle,pokecupdouble
#-------------------------------
[TrainerList]
Trainers = cup_little_trainers.txt
Pokemon = cup_little_pkmn.txt
Challenges = littlecupsingle,littlecupdouble

```

## Defining a Pokémon/trainer set

A set of Pokémon/trainers is comprised of two PBS files, one that lists possible Pokémon and one that lists possible trainers that use them.

### Pokémon files

A Pokémon file contains all possible Pokémon that are part of the set(s) it belongs to. Each line in the file is one separate Pokémon.

Examples:

```
SUNKERN;LAXINCENSE;RELAXED;HP,SA;MEGADRAIN,HELPINGHAND,SUNNYDAY,LIGHTSCREEN
AZURILL;CHERIBERRY;RASH;HP,SA;WATERPULSE,ATTRACT,SING,CHARM
CATERPIE;FOCUSBAND;QUIRKY;HP,ATK;TACKLE,STRINGSHOT,,
WEEDLE;FOCUSBAND;QUIRKY;HP,ATK;POISONSTING,STRINGSHOT,,
WURMPLE;LAXINCENSE;QUIRKY;HP,ATK;TACKLE,STRINGSHOT,POISONSTING,
RALTS;TWISTEDSPOON;DOCILE;HP,SA;CONFUSION,IMPRISON,DOUBLETEAM,LIGHTSCREEN
MAGIKARP;FOCUSBAND;HARDY;HP,ATK;FLAIL,,,
FEEBAS;FOCUSBAND;LONELY;HP,ATK;FLAIL,MIRRORCOAT,,

```

Each line is structured as follows, with a semicolon separating each part:

 2
 3
 4
* HP
* ATK
* DEF
* SA
* SD
 5

### Trainer files

A trainer file contains all possible trainers that are part of the set(s) it belongs to.

Each section in this file is one separate trainer, where a section begins with a line containing an ID number in square brackets and ends when the next section begins. Each line in a section is one separate piece of information about that trainer.

Aside from the ID line, every line in a section follows the format:

```
XXX = YYY

```

where `XXX` is a property and `YYY` is the value or values associated with it (the spaces are optional). For example:

```
[000]
EndSpeechLose = WHAT ? BUT HOW ?
Name = BRADY
PokemonNos =    0,1,2,3,4,5,6,7,10,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
BeginSpeech = I AM NEVER GOING TO LOSE !
Type = YOUNGSTER
EndSpeechWin = I AM STRONG AREN'T I ?
#-------------------------------
[001]
EndSpeechLose = DARN ... LOSING DOES BUG ME
Name = CONNER
PokemonNos =    0,1,2,3,4,5,6,7,10,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,5 5,56,57,58,59,60,61,62,63,64,65
BeginSpeech = LOSING DOESN'T BUG ME
Type = YOUNGSTER
EndSpeechWin = A WIN IS JUST AWESOME
#-------------------------------
[002]
EndSpeechLose = TOMORROW IS WHEN WE REALLY BATTLE
Name = BRADLEY
PokemonNos = 0,1,2,3,4,5,6,7,10,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
BeginSpeech = HEY
Type = YOUNGSTER
EndSpeechWin = HAHAHA ! SEE YA LATER !

```

The properties are:

 EndSpeechLose
 Name
 PokemonNos
 BeginSpeech
 Type
 EndSpeechWin