Battle::ItemEffects::TerrainStatBoost.add(:ELECTRICSEED,
proc { |item, battler, battle|
next false if ![:ElectricTerrain, :ElectricField].include?(battle.field.terrain)
itemName = GameData::Item.get(item).name
if battler.pbCanRaiseStatStage?(:DEFENSE, battler) || battler.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, battler)
battle.pbCommonAnimation("UseItem", battler)
battler.pbRaiseStatStageByCause(:DEFENSE, 1, battler, itemName) if battler.pbCanRaiseStatStage?(:DEFENSE, battler)
battler.pbRaiseStatStageByCause(:SPECIAL_DEFENSE, 1, battler, itemName) if battler.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, battler)
end
if [:ElectricField].include?(battle.field.terrain)
battle.pbDisplay(_INTL("{1} began charging power!", battler.pbThis))
next battler.effects[PBEffects::Charge] = 2
end
}
)