DarkFoxVerdigris
Founder of Pokémon Verdigris
- 11
- Posts
- 5
- Years
- Seen Nov 26, 2020
I'm trying to script in Terrain Pulse, but it's not working at all.
First I tried with this:
But it didn't work, so under another user's suggestions I tried changing the first part of the script to this:
And it still doesn't work. Any idea why?
I'm also trying to get Scale shot and Grassy glide to work but neither do, so...
First I tried with this:
Code:
class PokeBattle_Move_219 < PokeBattle_Move
def pbBaseDamage(basedmg,attacker,opponent)
if @battle.field.effects!=0
return basedmg*2
end
return basedmg
end
def pbModifyType(type,attacker,opponent)
type=getConst(PBTypes,:NORMAL) || 0
case @battle.field.effects
when PBEffects::GrassyTerrain
type=(getConst(PBTypes,:GRASS) || type)
when PBEffects::PsychicTerrain
type=(getConst(PBTypes,:PSYCHIC) || type)
when PBEffects::MistyTerrain
type=(getConst(PBTypes,:FAIRY) || type)
when PBEffects::ElectricTerrain
type=(getConst(PBTypes,:ELECTRIC) || type)
when PBEffects::WarTerrain
type=(getConst(PBTypes,:FIGHTING) || type)
end
return type
end
end
But it didn't work, so under another user's suggestions I tried changing the first part of the script to this:
Code:
class PokeBattle_Move_219 < PokeBattle_Move
def pbBaseDamage(basedmg,attacker,opponent)
if @battle.field.effects[PBEffects::ElectricTerrain]>0 ||
@battle.field.effects[PBEffects::GrassyTerrain]>0 ||
@battle.field.effects[PBEffects::MistyTerrain]>0 ||
@battle.field.effects[PBEffects::PsychicTerrain]>0 ||
@battle.field.effects[PBEffects::WarTerrain]>0
return basedmg*2
end
return basedmg
end
And it still doesn't work. Any idea why?
I'm also trying to get Scale shot and Grassy glide to work but neither do, so...