ID:160947
Jul 7 2008, 12:26 pm
|
|
Can Someone tell me a simple code for maling a pokemon evolve?!!?
|
There is no such thing as a simple way to do it. It's probably going to end up being confusing. If I were to do it, this may be one way:
mob/proc/transfer_mob(typepath, list/vars) An example implementation would be such, using Pikachu's evolutionary states: pokemon If I remember correctly, there are certain states that have multiple evolutionary paths, which would require a more complicated system to work in. Still, this is a basic way that can be built upon. |
In response to Popisfizzy
|
|
That's similar to what I do. As for the multiple evolutionary paths, an associative list would work best there. But there actually is a simple way that most pokemon games use >_>. It's terrible code, offers little flexibility, and anything could write it.
Terrible code \/ mob/Pokemon/var |
In response to Jeff8500
|
|
I thought about an associative list, but decided against it as it would require a cache so there isn't an exhorbitant amount of lists. Doing it that way provides, I feel, is easier. You could also define other variables like moon_stone_state to indicate what happens when they come in contact with a moon stone, or perhaps modify the LevelUp proc if you want to deal with more complex situations (like Eevee evolving into Espeon and Umbreon, which I still have no idea how to do).
|
In response to Popisfizzy
|
|
Pichu evolves from happiness, and pikachu evolves using a thunderstone, so the level is pretty much irrelevant. That'd be why you couldn't find any data.
<_< _> Yeah, I play pokeymanz. |
In response to Popisfizzy
|
|
With the amount of evolution stones in the pokemon games, I felt it was worth it (I think they're up to almost 10; plus one of them only evolves pokemon if they have a specific gender).
As for the Eevee thing, you would need a happiness var and a day/night system. Then when they level up, if the happiness is over a certain amount, they evolve differently depending on the time of day. Or, you can take the lazy route like me and use some of the new evolutionary stones to evolve them >_< |
In response to Jeff8500
|
|
A demonstration of how I'd handle it. Some things aren't implemented - like isNight(), for example, or the actual evolution code (Pop's code would be useful here).
This code lets you have a pokemon evolve via stone, or via levelup, at your choice. It's not quite as simple as just setting an evolution level and type, but it handles eevee quite effectively, as you can see. (Incidentally, I left out glaceon and leafeon. I leave it as a reader exercise to fill it in. Plus, I can't remember precisely how one gets them) mob/pokemon |
In response to Jp
|
|
Wow, I like that idea. That way you don't have to save lists or vars; I might consider using something similar, as I barely coded any pokemon in.
Also, you get glaceon and leafeon by leveling Eevee up within a certain distance from certain stones (which are objects on the map, not items). |
In response to Jp
|
|
Oh, yea, now I remember that for Pikachu (totally didn't remember anything for Pichu). S'pose I chose a poor example for the code.
|
Good luck asking for other people to program a game for you.