- 220
- Posts
- 14
- Years
- Seen Nov 29, 2021
So I'm planning on implementing a set of berries that increase a stat. At first I wanted it to happen on entry, so I had this:
Which... kinda works. It seems a bit random as to when it triggers.
But now I want it to be consumed just before a pokemon uses a move of it's type (so if it raises Sp. Atk, it's consumed just before the holder uses a special move). How would I go about this?
Code:
if self.pbCanIncreaseStatStage?(PBStats::SPATK,self,false,self) #NEW
if self.hasWorkingItem(:FLASHWEED)
pbActivateBerryEffect
return
end
end
But now I want it to be consumed just before a pokemon uses a move of it's type (so if it raises Sp. Atk, it's consumed just before the holder uses a special move). How would I go about this?