def pbType(type,attacker,opponent)
@powerboost=false
type=pbModifyType(type,attacker,opponent)
if type>=0 && hasConst?(PBTypes,:ELECTRIC)
if @battle.field.effects[PBEffects::IonDeluge] && isConst?(type,PBTypes,:NORMAL)
type=getConst(PBTypes,:ELECTRIC)
@powerboost=false
end
if @battle.field.effects[PBEffects::PlasmaFists] && isConst?(type,PBTypes,:NORMAL)
type=getConst(PBTypes,:ELECTRIC)
@powerboost=false
elsif isConst?(type,PBTypes,:NORMAL)
if @battle.field.effects[PBEffects::PlasmaFists] && attacker.hasWorkingAbility(:AERILATE) &&
hasConst?(PBTypes,:FLYING)
type=getConst(PBTypes,:FLYING)
@powerboots=true
elsif @battle.field.effects[PBEffects::PlasmaFists] && attacker.hasWorkingAbility(:REFRIGERATE) &&
hasConst?(PBTypes,:ICE)
type=getConst(PBTypes,:ICE)
@powerboots=true
elsif @battle.field.effects[PBEffects::PlasmaFists] && attacker.hasWorkingAbility(:PIXILATE) &&
hasConst?(PBTypes,:FAIRY)
type=getConst(PBTypes,:FAIRY)
@powerboots=true
elsif @battle.field.effects[PBEffects::PlasmaFists] && attacker.hasWorkingAbility(:GALVANIZE) &&
hasConst?(PBTypes,:ELECTRIC)
type=getConst(PBTypes,:ELECTRIC)
@powerboots=true
end
end
if attacker.effects[PBEffects::Electrify]
type=getConst(PBTypes,:ELECTRIC)
@powerboost=false
end
end
return type
end