https://gist.github.com/70b4a6bb0d2a818cb2ce
This is my game :) The basic goal is to collect Pokeballs without getting hit by other Pokemon. The script is pretty massive, but that's mainly because each different Pokemon has a different scripted behavior. Also I am working on compressing the "monsters" array which currently takes up over 100 lines.
Please ignore the messy code and enjoy the game.
Features:
Twelve types of Pokemon. 21 if you include all evolutions.
Player and enemies can be any of those Pokemon.
Six finished levels.
A 'chat box' which relays information to the player.
Debug buttons.
How To Play:
Collect Pokeballs. Avoid other Pokemon.
If you are hit, and at your lowest evolution, you will die. Otherwise, you will de-volve.
Green blocks can be pushed by the player.
To try different Pokemon Types, use the first Debug button.
These debug buttons can be found on the top right of the screen, they are the blue boxes. Simply click on them with your finger/stylus and things will happen!
You need to collect all three Pokeballs in each level to move on.
Pokemon Behaviors:
Kakuna/Beedrill: Chases the player. Beedrill has a larger range.
Charmeleon/Charmander/Charizard: Shoots fireballs at the player. Each evolution has faster fireballs, and Charizard actively chases the player.
Kengiskan: Spawns five Kengiskan babies which follow Kengiskan around.
Kengis Baby/Cubone: If mother dies, babies evolve into Cubone. Cubone throws bones at the player.
Magnetite/Magneton: Electrocutes the player, paralyzing them. Magneton paralyzes longer and has a larger range. Magnetite will only evolve into Magneton if he electrocutes the player enough times.
Nincanda/Ninjask/Shedinja: When Nincanda evolves, he splits into Ninjask and Shedinja. All three of them use a string shot to pull the player towards them. Nincanda does only one string shot at a time, Ninjask does two, and Shedinja does three.
Sandshrew/Sandslash: Once evolved, Sandslash will randomly curl up into a ball (Defense Curl), possibly blocking the players path.
Entei: He's incomplete. Right now he just faces the player.
Zubat: The 'weakest' Pokemon, Zubat very slowly flees from the player.
Espeon: The opposite of Zubat, Espeon is psychically attracted to the player.
Golem: Golem sometimes curls up into a ball and begins rolling around at the fastest speeds of any pokemon. Because of this, he sometimes runs through walls and level designs need to keep this in mind.
Kingdra: Moves 2x the speed of other Pokemon, making this one very dangerous.
Character Behaviors:
Charmeleon/Charmander/Charizard: The player can shoot fireballs in a straight line by tapping the screen. Fireballs will kill anything except a Sandslash using Defense Curl. Evolves by hitting a pokemon with a fireball.
Sandshrew/Sandslash: Evolves with a high probability. Once Sandslash, the player can click on his/her sprite and Sandslash will curl into a ball, becoming invincible but immobile. DEBUG TIP: If you force the evolution even higher, then you can walk while being a ball, a great way to test levels without having to worry about monsters.
Magnetite/Magneton: Periodically spawns Magnetite friendly pokemon which circle around the player, with a limit of five. If it gets two Magnetites, there's a chance it will evolve into Magneton. Also, Magnetites work as a 'shield' - if they hit another pokemon, they will die instead of you.
Nincanda/Ninjask/Shedinja: Evolves with a medium probability. Once Nincana evolves, he splits into Ninjask and Shedinja. Ninjask remains player-controlled. Shedinja follows Ninjask around, and will kill any enemy pokemon it hits.
Kakuna/Beedrill: Evolves with a high probability.
Debug tools:
Button 1: Change Pokemon Type (currently, this is the only way to try different pokemon) Button 2: Force Evolution (can be used to make Sandslash invincible, or to increase speed or Charizards fireballs to ridiculous amounts.) Button 3: Change Level Button 4: Kill all monsters on level
Known Bugs:
If you have ran the 'sprite walk' code posted on these forums before, you may need to change the name of 'soldier2.png' on line 513 to something else.
Golem sometimes gets stuck in a wall and will glitch through the other side.
There is no 'Hard reset' for the game, you have to restart the entire project to reset the game data.
Beedrill may chase the player through walls if the walls are thin enough, as seen in the "Tic Tac Toe" level.
If you push the green blocks against Pokemon in a corner, they will get stuck in the block and might glitch through it.