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.
'
In both modes, no Pokemon name is allowed to be used on both teams.
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. The order may change freely between turns.
A move is from a trainer if:
- It starts with the trainers name, or
- It starts with the trainers active Pokemon.
Commands/Moves
NOP: (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*!
- Level 2: Tackle, Ember, Vine Whip, Water Gun, Thunder Shock, Rock Throw, Confusion, Mach Punch, Wing Attack, Powder Snow.(y = 2;x -= y)
- Level 4: Body Slam, Flamethrower, Razor Leaf, Hydro Pump, Thunderbolt, Earthquake, Psychic, High Jump Kick, Fly, Ice Beam.(y = 4;x -= y)
As an additional effect, you can add either of these tags after the command:
- "It's super effective!": the level of the move is doubled.(y *= 2; x -= y;)
- "It's not very effective.": the level of the move is halved.(y /= 2; x -= y;)
For example, if A activated XXX and B activated YYY, then XXX uses Confusion! It's super effective!
will make the value(HP) of YYY to be 41(both sides have not did any operation)
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.
That means, if you do PSTF uses Max Potion!
and PSTF(of course, it is just an example, it is not meaning I'm(PrySigneToFry's) really transported to that world) has been activated x(HP is 5), then this command is equalvent to C++ x += 8;
.
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.
For example, A activated XXX, B activated YYY, XXX=8 and YYY=14, then XXX uses Heart Swap!
make XXX(or may be A) also be assigned with 14.
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*!
- Freeze: Blizzard
- Paralyze: Thunder Wave
- Sleep: Sing
Each condition only works if the HP totals are right:
- Freeze requires the two active Pokemon to have matching HP totals(
x == y?1:0
). - Paralyze requires the two active Pokemon to have non-matching HP totals(
x == y?0:1
). - Sleep requires the opposing active Pokemon to have less HP than the Pokemon "using" the move(
x < y?1:0
).
If a status condition is inflicted, the next command is skipped.
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*!
- ASCII: Swords Dance
- Integer: Barrier
The data sent depends on which move was used:
- ASCII outputs the ASCII character with an encoding value equal to user's HP.
- Integer directly outputs the users HP as a number.
For example, if A's HP is 65, and he(she) activated XXX, then XXX uses Swords Dance!
will output "A", not 65.
Input: (sets the HP of the opposing Pokemon to an input)
*pokemon* uses *move*!
- ASCII: Growl
- Integer: Lear
The data requested depends on which move was used:
- ASCII takes in an ASCII character and uses its encoding value.
- Integer takes in an integer and uses it.
Example
Hello, world!
I can't oFjeSjwF3go8AEYoug368AEYoy1igiF+=+wc78om=3gu6NEGCIY8guiEFo3791+uos== anymore, so I just copy and paste.
Trainer 1: XsnEpW D4FsrWgQ fi8EO3ku w83FLQif QmA1hQ2c nSOw73FE Z39FOEar Trainer 2: ThrMsQ sVRuwk2j SNJ18Fkd hE8wodiQ xdi8aho2 jlie3jFW QudFLei3 Battle Start! Turn 0: XsnEpW: QmA1hQ2c Go! ThrMsQ: QudFLei3 Go! Turn 1: QmA1hQ2c uses Absorb! QudFLei3 uses Absorb! Turn 2: QmA1hQ2c uses Absorb! QudFLei3 uses Absorb! Turn 3: XsnEpW: That's enough! Go Z39FOEar! QudFLei3 uses Splash! Turn 4: Z39FOEar uses Absorb! ThrMsQ: That's enough! Go SNJ18Fkd! Turn 5: XsnEpW: That's enough! Go QmA1hQ2c! SNJ18Fkd uses Absorb! Turn 6: QmA1hQ2c uses Splash! ThrMsQ: That's enough! Go QudFLei3! Turn 7: QmA1hQ2c uses Absorb! QudFLei3 uses Absorb! Turn 8: XsnEpW uses Max Potion! QudFLei3 uses Tackle! It's not very effective. Turn 9: QmA1hQ2c uses Flamethrower! QudFLei3 uses Splash! Turn 10: QmA1hQ2c uses Swords Dance! QudFLei3 uses Swords Dance! Turn 11: QmA1hQ2c uses Tackle! It's not very effective. ThrMsQ uses Max Potion! Turn 12: QmA1hQ2c uses Skill Swap! QudFLei3 uses Swords Dance! Turn 13: QmA1hQ2c uses Swords Dance! QudFLei3 uses Tackle! It's not very effective. Turn 14: XsnEpW uses Hyper Potion! ThrMsQ: That's enough! Go SNJ18Fkd! Turn 15: QmA1hQ2c uses Swords Dance! ThrMsQ uses Super Potion! Turn 16: XsnEpW: That's enough! Go Z39FOEar! SNJ18Fkd uses Tackle! It's not very effective. Turn 17: Z39FOEar uses Swords Dance! SNJ18Fkd uses Swords Dance! Turn 18: XsnEpW: That's enough! Go QmA1hQ2c! ThrMsQ uses Potion! Turn 19: XsnEpW uses Max Potion! ThrMsQ: That's enough! Go QudFLei3! Turn 20: QmA1hQ2c uses Swords Dance! QudFLei3 uses Flamethrower! It's super effective! Turn 21: QmA1hQ2c uses Swords Dance! QudFLei3 uses Tackle! It's not very effective. Turn 22: XsnEpW uses Hyper Potion! QudFLei3 uses Splash! Turn 23: QmA1hQ2c uses Swords Dance! QudFLei3 uses Swords Dance! Turn 24: QmA1hQ2c uses Flamethrower! It's super effective! QudFLei3 uses Swords Dance! Turn 25: XsnEpW: That's enough! Go nSOw73FE! ThrMsQ: That's enough! Go SNJ18Fkd! Turn 26: nSOw73FE uses Splash! SNJ18Fkd uses Swords Dance! Battle End! Winner: XsnEpW
Truth Machine (made by ZachChecksOutEsolangs (talk))
Trainer 1: A5jsnu Gj2ian Trainer 2: uiB0ds lp7Nfa Battle Start! Turn 0: A5jsnu: Gj2ian Go! uiB0ds: lp7Nfa Go! Turn 1: Gj2ian uses Lear! lp7Nfa uses Guillotine! Turn 2: A5jsnu uses Potion! lp7Nfa flinched! Turn 3: Gj2ian uses Blizzard! uiB0ds thinks about Turn 5. Turn 4: Gj2ian uses Barrier! uiB0ds thinks about Turn 4. Turn 5: Gj2ian uses Barrier! uiB0ds tried to run away! You can't run from a trainer battle! Battle End! Winner: uiB0dsImplementations
* In Python