Telemetius
Tele*
- 256
- Posts
- 10
- Years
- Italy
- Seen Jan 9, 2022
Hi, I recently implemented a couple new battle backgrounds and one of them is a lava filled cave floor; so I had an idea, why not give to my pokemons a couple buffs depending on the environment, eg.
+1 atk to fire pkms if the battle background is lava -1 atk to water types
+1 def to water pkms if we're underwater +1 atk if we're surfing
So I had a look at the section move effects, secret power where i found this:
when PBEnvironment::Volcano
id=getConst(PBMoves,:INCINERATE)
What I did then was to copy it, replace the second line with:
@battlers[index].pbIncreaseStat(PBStats::DEFENSE,1,@battlers[index],true)
And add it in Pokebattle_battle just after the message: Go! {1}!
What I was trying to do isn't working though.
I tried replacing "when" with "if" and still no luck.
+1 atk to fire pkms if the battle background is lava -1 atk to water types
+1 def to water pkms if we're underwater +1 atk if we're surfing
So I had a look at the section move effects, secret power where i found this:
when PBEnvironment::Volcano
id=getConst(PBMoves,:INCINERATE)
What I did then was to copy it, replace the second line with:
@battlers[index].pbIncreaseStat(PBStats::DEFENSE,1,@battlers[index],true)
And add it in Pokebattle_battle just after the message: Go! {1}!
What I was trying to do isn't working though.
I tried replacing "when" with "if" and still no luck.