PokéBattle

PokeBattle is a programming language designed so that the program looks like the transcript of a Pokemon battle.

Header
When making a PokeBattle program, you must start by naming all of the Pokemon and trainers in the battle. No two Pokemon can have the same name. Use this header:

Trainer 1: *trainer* *pokemon* *pokemon* *pokemon* *pokemon* *pokemon* *pokemon* Trainer 2: *trainer* *pokemon* *pokemon* *pokemon* *pokemon* *pokemon* *pokemon* Battle Start! Turn 0: *trainer*: *pokemon* Go! *trainer*: *pokemon* Go!

The Pokemon listed with Turn 0 are the starting Active Pokemon.

Footer:

At the end of the program, you must include this footer:

Battle End! Winner: *trainer*

Name whichever trainer you want as the winner; it doesn't matter.

Pokemon
Variables:

Each Pokemon stores a single variable. This variable is the Pokemon's HP. Each Pokemon starts the battle/program with 5 HP. There is no maximum or minimum HP. Being at 0 or less HP has no special effect.

Pokemon Count and Names:

There are two versions of PokeBattle: Strict and Open.

In Strict PokeBattle, each trainer can only have 6 Pokemon and they must all be existing Pokemon from canon.

In Open PokeBattle, each trainer can have any number of Pokemon and they can have any name.

Pokemon and Moves:

There are no limits regarding which Pokemon can use which moves.

Syntax
All commands must be done in the following format:

Turn 1: *command* *command* Turn 2: *command* *command* Turn 3: *command* *command* Turn 4: *command* *command*

Each of the two commands in a turn must be from different trainers.

A move is from a trainer if:


 * It starts with the trainers name, or
 * It starts with the trainers active Pokemon.

Commands/Moves
Nothing: (does nothing)

*trainer* tried to run away! You can't run from a trainer battle!

*pokemon* flinches!

*pokemon* uses Splash!

Damage: (reduce the HP of the opposing active Pokemon by the level of the move)

*pokemon* uses *move*!

As an additional effect, you can add either of these tags after the command:
 * Level 2: Tackle, Ember, Vine Whip, Water Gun, Thunder Shock, Rock Throw, Confusion, Mach Punch, Wing Attack, Powder Snow.
 * Level 4: Body Slam, Flamethrower, Razor Leaf, Hydro Pump, Thunderbolt, Earthquake, Psychic, High Jump Kick, Fly, Ice Beam.


 * "It's super effective!": the level of the move is doubled.
 * "It's not very effective.": the level of the move is halved.

Math Damage: (reduce the HP of the opposing Pokemon by the HP of the user)

*pokemon* uses *move*!

Moves: Hyper Beam, Dragon Rage.

OHKO: (Set the HP of the opposing Pokemon to zero)

*pokemon* uses *move*!

Moves: Fissure, Guillotine, Sheer Cold.

Heal: (increase the HP of the trainer's active Pokemon by the level of the item)

*trainer* uses *item*!


 * Level 1: Potion.
 * Level 2: Super Potion.
 * Level 4: Hyper Potion.
 * Level 8: Max Potion.

Leech: (increase the users HP by the HP of the opposing Pokemon)

*pokemon* uses *move*!

Moves: Absorb, Leech Life.

Sync: (Set the users HP to the HP of the opposing Pokemon)

*pokemon* uses *move*!

Moves: Skill Swap, Heart Swap.

Switch: (change the trainer's active Pokemon to the Pokemon named)

*trainer* : That's enough! Go *new_pokemon*!

Status: (inflict a status condition if the HP totals are right)

*pokemon* uses *move*!

Each condition only works if the HP totals are right:
 * Freeze: Blizzard
 * Paralyze: Thunder Wave
 * Sleep: Sing

If a status condition is inflicted, the next command is skipped.
 * Freeze requires the two active Pokemon to have matching HP totals.
 * Paralyze requires the two active Pokemon to have non-matching HP totals.
 * Sleep requires the opposing active Pokemon to have exactly 0 HP.

Jump: (jumps code execution to the start of the named turn)

*trainer* thinks about Turn *number*.

Output: (outputs the HP of the user to the screen)

*pokemon* uses *move*!

The data sent depends on which move was used:
 * ASCII: Swords Dance
 * Integer: Barrier
 * ASCII outputs the ASCII character with an encoding value equal to user's HP.
 * Integer directly outputs the users HP as a number.

Input: (sets the HP of the opposing Pokemon to an input)

*pokemon* uses *move*! The data requested depends on which move was used:
 * ASCII: Growl
 * Integer: Lear


 * ASCII takes in an ASCII character and uses its encoding value.
 * Integer takes in an integer and uses it.