• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

v21.1 Mega Sol Ability Script 2026-04-10

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
If you copy & paste the following section into a script above main you can define the Mega Sol Ability in your abilities PBS file and it should work. What it does:
1) Moves work like in sun
2) User still takes sand, hail and shadow sky damage


################################################################################
# Mega Sol
###############################################################################

class Battle::Battler
alias mega_sol_effectiveWeather effectiveWeather
alias mega_sol_takesSandstormDamage takesSandstormDamage?
alias mega_sol_takesHailDamage takesHailDamage?
alias mega_sol_takesShadowSkyDamage takesShadowSkyDamage?

def effectiveWeather
if hasActiveAbility?(:MEGASOL)
return :Sun
end
return mega_sol_effectiveWeather
end

def takesSandstormDamage?
if hasActiveAbility?(:MEGASOL)
return @battle.pbWeather == :Sandstorm
end
return mega_sol_takesSandstormDamage
end

def takesHailDamage?
if hasActiveAbility?(:MEGASOL)
return @battle.pbWeather == :Hail
end
return mega_sol_takesHailDamage
end

def takesShadowSkyDamage?
if hasActiveAbility?(:MEGASOL)
return @battle.pbWeather == :ShadowSky
end
return mega_sol_takesShadowSkyDamage
end
end


class Battle
def pbEORWeatherDamage(battler)
return if battler.fainted?
amt = -1

case pbWeather
when :Sandstorm
return if !battler.takesSandstormDamage?
pbDisplay(_INTL("{1} is buffeted by the sandstorm!", battler.pbThis))
amt = battler.totalhp / 16
when :Hail
return if !battler.takesHailDamage?
pbDisplay(_INTL("{1} is buffeted by the hail!", battler.pbThis))
amt = battler.totalhp / 16
when :ShadowSky
return if !battler.takesShadowSkyDamage?
pbDisplay(_INTL("{1} is hurt by the shadow sky!", battler.pbThis))
amt = battler.totalhp / 16
end

return if amt < 0
@scene.pbDamageAnimation(battler)
battler.pbReduceHP(amt, false)
battler.pbItemHPHealCheck
battler.pbFaint if battler.fainted?
end
end
Credits
Wes' Sandslash
Author
Wes' Sandslash
Views
194
First release
Last update

Ratings

5.00 star(s) 1 ratings
Back
Top