- 24
- Posts
- 11
- Years
- Seen Jul 5, 2018
EDIT: Fixed it, the problem was I forgot this in front of it:
I am trying to implement Grassy Terrain in Pokemon essentials version 15, but it doesn't heal anybody. Here is the code I have in PokeBattle_Battle:
In PBEffects, I have it in the section that supposedly makes it affect both sides
for i in priority
next if i.isFainted?
I am trying to implement Grassy Terrain in Pokemon essentials version 15, but it doesn't heal anybody. Here is the code I have in PokeBattle_Battle:
if @field.effects[PBEffects::GrassyTerrain]>0
if i.effects[PBEffects::HealBlock]==0
hpgain=(i.totalhp/16).floor
hpgain=i.pbRecoverHP(hpgain,true)
pbDisplay(_INTL("{1}'s HP was restored.",i.pbThis)) if hpgain>0
end
end
In PBEffects, I have it in the section that supposedly makes it affect both sides
What's wrong and how do I make it affect both sides? Could the problem be in another portion of the code?# These effects apply to the battle (i.e. both sides)
Gravity = 0
MagicRoom = 1
TrickRoom = 2
WonderRoom = 3
GrassyTerrain = 4
ElectricTerrain = 5
MistyTerrain = 6
Last edited: