- 4
- Posts
- 4
- Years
- Seen Nov 26, 2020
Hello. I'm making an exclusive ability for Flygon which would put into the field a version of Sandstorm that doesn't end until it is overriden or Flygon leaves the field. However, I'm encountering a problem:
Despite adding this line to the code (with HuntingSands being the weather) - it won't deal damage.
I'll leave in this spoiler every single other modification I made to insert HuntingSands - except the ones regarding the text it produces (which it produces just fine, including start - end - end of round "rages on", except, of course, for the buffered by sandstorm message, since that doesn't happen) and the ones regarding the fact that it acts the same as sandstorm for sandstorm abilities.
Thank you very much in advance :)
Code:
case curWeather
when PBWeather::Sandstorm || PBWeather::HuntingSands # This is what was added
next if !b.takesSandstormDamage?
pbDisplay(_INTL("{1} is buffeted by the sandstorm!",b.pbThis))
@scene.pbDamageAnimation(b)
b.pbReduceHP(b.totalhp/16,false)
b.pbItemHPHealCheck
b.pbFaint if b.fainted?
I'll leave in this spoiler every single other modification I made to insert HuntingSands - except the ones regarding the text it produces (which it produces just fine, including start - end - end of round "rages on", except, of course, for the buffered by sandstorm message, since that doesn't happen) and the ones regarding the fact that it acts the same as sandstorm for sandstorm abilities.
Thank you very much in advance :)
Spoiler:
Code:
module PBWeather
None = 0
Sun = 1
Rain = 2
Sandstorm = 3
Hail = 4
HarshSun = 5
HeavyRain = 6
StrongWinds = 7
ShadowSky = 8
HuntingSands = 9 # Defines it.
def self.animationName(weather)
case weather
when Sun; return "Sun"
when Rain; return "Rain"
when Sandstorm; return "Sandstorm"
when Hail; return "Hail"
when HarshSun; return "HarshSun"
when HeavyRain; return "HeavyRain"
when StrongWinds; return "StrongWinds"
when ShadowSky; return "ShadowSky"
when HuntingSands; return "Sandstorm" # Using same animation as Sandstorm
end
fixedDuration = true if NEWEST_BATTLE_MECHANICS &&
weather!=PBWeather::HarshSun &&
weather!=PBWeather::HeavyRain &&
weather!=PBWeather::StrongWinds &&
weather!=PBWeather::HuntingSands # Doesn't end unless overriden/Flygon switches in
BattleHandlers::AbilityOnSwitchIn.add(:HUNTINGSANDS, #Ability has same name as the weather.
proc { |ability,battler,battle|
pbBattleWeatherAbility(PBWeather::HuntingSands,battler,battle,false)
}
)
def pbEndPrimordialWeather
oldWeather = @field.weather
# End Primordial Sea, Desolate Land, Delta Stream
case @field.weather
# .... other cases
when PBWeather::HuntingSands
if !pbCheckGlobalAbility(:HUNTINGSANDS)
@field.weather = PBWeather::None
pbDisplay("The sandstorm fades! The hunt is off!") #Ends the weather when the ability is no longer there.
end
end