1. Welcome to Smogon Forums! Please take a minute to read the rules.
  2. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!

Java Code for Shoody

Discussion in 'Trou Du Cul' started by MajorGamer14, May 13, 2010.

  1. MajorGamer14

    MajorGamer14

    Joined:
    Nov 6, 2007
    Messages:
    1,068
    So I'm bored in computer class, so I thought, "Hey, why don't I make a Pokemon battle simulator?" And so I started, but I never got to understand where to start. I use BlueJ to program, but I'm not really good at it yet. So far all I know is basic stuff like if and else statements, booleans, arrays, system.out.println, int, double, strings...

    This game that I had in mind is based off the Pokemon Stadium series for the N64. Have a list of rental Pokemon to choose from, then choose 6 to use, then battle with the computer to see who's the winner. This game will take use of the mechanics that were available in Generation I, so only 149 are in this game. Here's the class I made of the Pokemon available for rent:

    Write a description of class MyPokemon here.
    *
    * @author (your name)
    * @version (a version number or a date)
    */
    public class ListOfPokemon
    {
    public static void main (String[] args)
    {
    Venusaur
    Sleep Powder
    Solarbeam
    Body Slam
    Razor Leaf

    Charizard
    Wing Attack
    Slash
    Seismic Toss
    Flamethrower

    Blastoise
    Surf
    Ice Beam
    Skull Bash
    Hydro Pump

    Butterfree
    Sleep Powder
    Stun Spore
    Dream Eater
    Razor Wind

    Beedrill
    Focus Energy
    Twineedle
    Toxic
    Mega Drain

    Pidgeot
    Fly
    Mirror Move
    Sky Attack
    Double-Edge

    Raticate
    Super Fang
    Hyper Fang
    Thunderbolt
    Quick Attack

    Fearow
    Agility
    Double Edge
    Drill Peck
    Mirror Move

    Arbok
    Glare
    Screech
    Earthquake
    Acid

    Raichu
    Thunder Wave
    Thunder
    Slam
    Thunderbolt

    Sandslash
    Slash
    Counter
    Earthquake
    Rock Slide

    Nidoqueen
    Double Edge
    Earthquake
    Bite
    Ice Beam

    Nidoking
    Horn Drill
    Earthquake
    Take Down
    Rock Slide

    Clefable
    Thunderbolt
    Reflect
    Double Edge
    Metronome

    Ninetales
    Confuse Ray
    Body Slam
    Fire Blast
    Dig

    Wigglytuff
    Sing
    Double-Edge
    Blizzard
    Seismic Toss

    Golbat
    Screech
    Wing attack
    Confuse Ray
    Mega Drain

    Vileplume
    Solarbeam
    Stun Spore
    Poisonpowder
    Petal Dance

    Parasect
    Spore
    Slash
    Leech Life
    Mega Drain

    Venomoth
    Sleep Powder
    Stun Spore
    Psychic
    Leech Life

    Dugtrio
    Slash
    Tri Attack
    Earthquake
    Rock Slide

    Persian
    Slash
    Screech
    Body Slam
    Bubblebeam

    Golduck
    Psychic
    Surf
    Blizzard
    Rest

    Primeape
    Focus Energy
    Body Slam
    Submission
    Rock Slide

    Arcanine
    Flamethrower
    Body Slam
    Bite
    Roar

    Poliwrath
    Amnesia
    Submission
    Seismic Toss
    Surf

    Alakazam
    Disable
    Psychic
    Recover
    Reflect

    Machamp
    Submission
    Mega Punch
    Focus Energy
    Rock Slide

    Victreebel
    Poison Powder
    Stun Spore
    Acid
    Mega Drain

    Tentacruel
    Surf
    Toxic
    Mega Drain
    Supersonic

    Golem
    Body Slam
    Earthquake
    Rock Slide
    Selfdestruct

    Rapidash
    Fire Blast
    Stomp
    Agility
    Horn Drill

    Slowbro
    Headbutt
    Amnesia
    Rest
    Surf

    Magneton
    Tri Attack
    Thunderbolt
    Screech
    Supersonic

    Farfetch'd
    Slash
    Whirlwind
    Fly
    Swords Dance

    Dodrio
    Drill Peck
    Rage
    Tri Attack
    Fly

    Dewgong
    Surf
    Aurora Beam
    Rest
    Headbutt

    Muk
    Sludge
    Body Slam
    Acid Armor
    Selfdestruct

    Cloyster
    Surf
    Blizzard
    Spike Cannon
    Explosion

    Gengar
    Confuse Ray
    Thunderbolt
    Dream Eater
    Hypnosis

    Onix
    Bind
    Selfdestruct
    Earthquake
    Rock Slide

    Hypno
    Disable
    Psychic
    Headbutt
    Reflect

    Kingler
    Swords Dance
    Body Slam
    Hyper Beam
    CrabHammer

    Electrode
    Thunder Wave
    Thunderbolt
    Light Screen
    Explosion

    Exeggutor
    Stun Spore
    Solarbeam
    Leech Seed
    Explosion

    Marowak
    Focus Energy
    Rock Slide
    Bonemerang
    Thrash

    Hitmonlee
    Hi Jump Kick
    Seismic Toss
    Mega Kick
    Double Kick

    Hitmonchan
    Counter
    Submission
    Mega Punch
    Seismic Toss

    Lickitung
    Substitute
    Body Slam
    Disable
    Earthquake

    Weezing
    Thunderbolt
    Sludge
    Explosion
    Flamethrower

    Rhydon
    Substitute
    Strength
    Earthquake
    Rock Slide

    Chansey
    Toxic
    Seismic Toss
    Thunderbolt
    Softboiled

    Tangela
    Sleep Powder
    Solarbeam
    Growth
    Mega Drain

    Kangaskhan
    Body Slam
    Earthquake
    Dizzy Punch
    Bite

    Seadra
    Agility
    Surf
    Blizzard
    Hydro Pump

    Seaking
    Double-Edge
    Horn Drill
    Surf
    Ice Beam

    Starmie
    Swift
    Psychic
    Hydro Pump
    Recover

    Mr.Mime
    Light Screen
    Thunderbolt
    Psychic
    Reflect

    Scyther
    Razor Wind
    Swords Dance
    Wing Attack
    Slash

    Jynx
    Lovely Kiss
    Ice Punch
    Psychic
    Bubblebeam

    Electabuzz
    Thunder Wave
    Thunderpunch
    Psychic
    Light Screen

    Magmar
    Fire Punch
    Confuse Ray
    Psychic
    Seismic Toss

    Pinsir
    Focus Energy
    Seismic Toss
    Slash
    Submission

    Tauros
    Take Down
    Rage
    Earthquake
    Rest

    Gyarados
    Body Slam
    Hyper Beam
    Hydro Pump
    Dragon Rage

    Lapras
    Surf
    Blizzard
    Confuse Ray
    Body Slam

    Ditto
    Transform

    Vaporeon
    Aurora Beam
    Surf
    Toxic
    Acid Armor

    Jolteon
    Thunder Wave
    Reflect
    Thunderbolt
    Pin-Missile

    Flareon
    Fire Blast
    Double Edge
    Substitute
    Fire Spin

    Porygon
    Conversion
    Psybeam
    Tri Attack
    Recover

    Omastar
    Seismic Toss
    Surf
    Ice Beam
    Substitute

    Kabutops
    Surf
    Mega Drain
    Slash
    Rock Slide

    Aerodactyl
    Double-Edge
    Rock Slide
    Sky Attack
    Hyper Beam

    Snorlax
    Body Slam
    Hyper Beam
    Rest
    Fissure

    Articuno
    Reflect
    Rest
    Ice Beam
    Bubblebeam

    Zapdos
    Thunder Wave
    Thunderbolt
    Drill Peck
    Light Screen

    Moltres
    Flamethrower
    Substitute
    Sky Attack
    Fire Spin

    Dragonite
    Flamethrower
    Slam
    Dragon Rage
    Hyper Beam
    }
    }

    As you can see, it sucks, and I have no idea where to begin. Let me give a run down of what's needed:

    Int values of Atk, Def, Spd, Sp. Atk, Sp. Def, HP, and Level (all will be 100)
    String values of Status Condtions, Type, Moves, Type of Moves

    I can't think of what else to include. But I do want to do is take the code used for the battle simulation for Shoddy and juist base it off there...as long as it's easy for me to read.

    So can anyone provide me with a code like this?
  2. Akusu

    Akusu

    Joined:
    Mar 27, 2009
    Messages:
    48
    That's not so much a program as a list hehe. Here's some code to get you started.

    You'll want to create a pokemon object class like so:

    public class Pokemon
    {
    //Basic information about the pokemon
    private int pokedex_number;
    private String nickname;
    private int attack;
    private int defense;
    private int special_attack;
    private int special_defense;
    private int speed;
    private int max_hp;
    private int current_hp;
    private move[] = new move[4];

    public Pokemon(String name, int number)
    {
    this.nickname = name;
    this.pokedex_number = number;

    populatePokemonInfo();
    }

    public void populatePokemonInfo()
    {
    /**
    * I won't actually code this part, but you'll want to pull all the info
    * from either a database or a text file based on the pokedex number
    */
    }

    /**
    * Put getters here. You probably don't need public setters but I put an example anyways.
    */
    public int getSpeed()
    {
    return this.speed;
    }

    public void setSpeed(int newSpeed)
    {
    this.speed = newSpeed;
    }
    }

    You'll also want to make a move class. There's a bunch of ways that you can go about it though. I suggest looking up Object-Oriented Programming and especially abstract classes. Good luck.
  3. MajorGamer14

    MajorGamer14

    Joined:
    Nov 6, 2007
    Messages:
    1,068
    Alright, I'll try to see what I can do with this then
  4. monkfish

    monkfish what are birds?
    is a Forum Moderator Alumnus

    Joined:
    May 31, 2006
    Messages:
    5,004
    wow i never realised programming was this easy
  5. monkfish

    monkfish what are birds?
    is a Forum Moderator Alumnus

    Joined:
    May 31, 2006
    Messages:
    5,004
    public static void main (String[] args)
    {
    choose pokemon
    fithg
    print sorry"you have lost the battle"
    }
  6. Super

    Super This space for rent
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Jun 21, 2007
    Messages:
    1,148
    I may be a bit late to ask, but, will it have minigames?
  7. Swaggersaurus

    Swaggersaurus I DON'T NEED A MAN
    is an Artist Alumnusis a Forum Moderator Alumnusis a Smogon Media Contributor Alumnus

    Joined:
    Jan 8, 2008
    Messages:
    4,790
    [Programmer] monkfish
    Swaggersaurus
  8. Glen

    Glen
    is a Forum Moderator Alumnus

    Joined:
    Jan 7, 2006
    Messages:
    6,568
    this is a really shoody thread
  9. Blue Kirby

    Blue Kirby Never back down.
    is a Tutor Alumnusis a Site Staff Alumnusis a Battle Server Admin Alumnusis a Programmer Alumnusis a Smogon IRC SOp Alumnusis a Smogon Media Contributor Alumnusis a Contributor Alumnusis an Administrator Alumnusis a Past SPL + WCoP Winner

    Joined:
    Nov 1, 2007
    Messages:
    2,841
    i like that m0nk's post was here before this got to trou
  10. monkfish

    monkfish what are birds?
    is a Forum Moderator Alumnus

    Joined:
    May 31, 2006
    Messages:
    5,004

Users Viewing Thread (Users: 0, Guests: 0)