This method is called at the beginning of the move before it plays its animation.Often used to modify the move's effects.
Code:
def pbOnStartUse(user,targets)
This one is called to apply effects to the move f.ex. summoning terrain.
Code:
def pbEffectGeneral(user)
The following function is similar to the previous one but is used to apply effects on the move's target.
Code:
def pbEffectAgainstTarget(user,target)
Notice how each of these methods has one or multiple arguments(the words in brackets). These are the local variables you get to use in here. Which means if you are inside the "def pbEffectGeneral(user)" function and try to ask "target.airborne?" it will raise an error, because the system doesn't know what "target" is. You can also use class variables (the ones with @ in front of them) f.ex. "@battle" to refer to the battle class. These don't have to be in the list of arguments for the move. Additionally you can (as you already did) use global variables (the ones with $ in front of it) because they can be applied anywhere in the code. But I'd advise you to keep the number of these to a minimum, due to them slowing down your code.
Lastly think about what having the code on your second image in that place means. If you used this move it would check if grassy terrain was a fire or grass move then boost its power (which does nothing because it's a status move) and then read the message. I think you'd rather want this to apply in the damage calculation regarding moves used after applying grassy terrain. In the script section "Move_Usage_Calculations" you can ctrl+f to find "case @battle.field.terrain". Try applying your damage modifiers here.
I need a little more time to make my field system available so this'll have to do for now.:)