Talk:PokéArena

From Esolang
Jump to navigation Jump to search

Some ideas

It would be unusual for a trainer to send out that many Pokémon in the course of a battle. Maybe something could be done using the names of attacks, rather than mere sending in/out? Maybe each Pokémon could be a variable, with its number being its initial value, and the attacks could perform various operations? You've got a lot more things to play with too, such as trainers using items. --ais523 10:39, 23 May 2007 (UTC)

You can have only 6 Pokemons (and only 1 attacking at a time). I think you can do by which element is effective against which other elements also, like SQUIRTLE (#7, Water) is more effective against CHARMANDER (#4, Fire). If you want more than 6 pokemons you need to store some, you can't use that many at once. The state can be stored each one, so that your program can store any amount of memory at once. If you have 2 same pokemons you can rename one so that you can tell the differences. You could also have different boxes that you can go page previous/next to have sequential memory of boxes storing pokemons. --Zzo38 17:59, 24 May 2007 (UTC)

Yeah basically make the source code look like a valid battle log.


I was thinking, maybe attacks could perform arithmetic, as there are four attacks, and four main math operations. Leech seed or similar would be subtraction, etc. As above, the individual pokemon would be variables, maybe the HP is the value? Also, items like potion could increment, or something similar. Using an item would pop, another would push, and even more for input and output? Elements could determine type of variable, like Char, Integer, Binary, Hex, etc. Just some ideas to trhow out there --Okohokonu 20:03, 16 March 2009 (UTC)

Comparison could be based on the Pokemon type. e.g.

Trainer COMPARISON wants to battle!

Go! Polly, SQUIRTLE! # note the use of nicknames
Go! Firebrand, CHARMANDER! # these statements are somewhat equivalent to: Firebrand = new CHARMANDER() in other languages
Polly attacks Firebrand! # if Polly's type beats Firebrand's
    It's super effective! # true
        <stuff to do if true>
    It's not very effective! # false
        <stuff to do if false>
Firebrand fainted!

Player beat trainer COMPARISON!

00Davo 11:13, 15 November 2009 (UTC)

Object-Oriented PokéArena?

How about regarding each Pokémon as a class and different attacks as methods within said classes? Stats (like Defense) could be used as variables. For example (using the above idea of the "<pokename> = new <pokemon>()" -> "Go! <pokename>, <pokemon>!"):

Trainer EXAMPLE wants to battle!

Go! Foobar, METAPOD!
Foobar used HARDEN!
     Foobar's DEFENSE rose by 3!
...

This would be expressed like so in a C-like object-oriented language (forgive my sloppy Java-like pseudosyntax that's probably horribly, horribly wrong):

public class EXAMPLE () {
     public void main () {
          METAPOD Foobar = new METAPOD();
          Foobar.HARDEN(3);
     }
}

public class METAPOD () {
     int DEFENSE;
     void HARDEN (int Amount) {
          this.DEFENSE = this.DEFENSE + Amount;
     }
}

This could encapsulate the earlier suggestion of performing arithmetic. Certain attack methods could be used for I/O (like LEER and ROAR, perhaps). With arithmetic, attacks subtract or divide, and defenses add or multiply. Defining specific Pokémon as input and output devices would be useful too (DITTO, maybe?). YellowApple 22:20, 2 March 2012 (UTC)