- 5
- Posts
- 6
- Years
- Seen Jun 14, 2023
Hello,
Looking to add a new evolution method based on specific stats. Im not 100% sure what Im looking at as far as the specific snippets go. The closest thing I can think of is to start with the Tyrogue evolutions.
I want a simple stat check, no level included. Lets say for example evolve when ATTACK > 50
I worked this out looking at the other examples right now. Its midnight or Id give it a test, but hoping that if it is obviously wrong or if someone already has something that will enable evolution based on stat (not based on one stat being <=> another) they can share.
Additionally:
If I were to have multiple evolution paths, it might look something like this right?
Evolutions = PokeX,AttackStat,100,PokeY,AttackStat,90,PokeZ,AttackStat,75
This would prioritize PokeX if attack was say 100, but would also allow for evolution if attack was only 75 if my understanding is correct?
Thanks all!
Looking to add a new evolution method based on specific stats. Im not 100% sure what Im looking at as far as the specific snippets go. The closest thing I can think of is to start with the Tyrogue evolutions.
Code:
GameData::Evolution.register({
:id => :AttackGreater, # Hitmonlee
:parameter => Integer,
:level_up_proc => proc { |pkmn, parameter|
next pkmn.level >= parameter && pkmn.attack > pkmn.defense
}
})
I want a simple stat check, no level included. Lets say for example evolve when ATTACK > 50
Code:
GameData::Evolution.register({
:id => :AttackStat,
:parameter => Integer,
:level_up_proc => proc { |pkmn, parameter|
next pkmn.attack > parameter
}
})
I worked this out looking at the other examples right now. Its midnight or Id give it a test, but hoping that if it is obviously wrong or if someone already has something that will enable evolution based on stat (not based on one stat being <=> another) they can share.
Additionally:
If I were to have multiple evolution paths, it might look something like this right?
Evolutions = PokeX,AttackStat,100,PokeY,AttackStat,90,PokeZ,AttackStat,75
This would prioritize PokeX if attack was say 100, but would also allow for evolution if attack was only 75 if my understanding is correct?
Thanks all!