AI function code rewrites, added Shadow Sky's missing effects, fixed Shadow End's recoil damage

This commit is contained in:
Maruno17
2023-01-22 21:21:19 +00:00
parent f7578002ea
commit d8f38947f4
11 changed files with 243 additions and 111 deletions

View File

@@ -423,6 +423,8 @@ class Battle::Move
if target.pbHasType?(:ROCK) && specialMove? && @function != "UseTargetDefenseInsteadOfTargetSpDef"
multipliers[:defense_multiplier] *= 1.5
end
when :ShadowSky
multipliers[:final_damage_multiplier] *= 1.5 if type == :SHADOW
end
# Critical hits
if target.damageState.critical

View File

@@ -839,9 +839,9 @@ class Battle::Move::RemoveScreens < Battle::Move
end
def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true)
if user.pbOpposingSide.effects[PBEffects::LightScreen] > 0 ||
user.pbOpposingSide.effects[PBEffects::Reflect] > 0 ||
user.pbOpposingSide.effects[PBEffects::AuroraVeil] > 0
if user.pbOpposingSide.effects[PBEffects::AuroraVeil] > 0 ||
user.pbOpposingSide.effects[PBEffects::LightScreen] > 0 ||
user.pbOpposingSide.effects[PBEffects::Reflect] > 0
hitNum = 1 # Wall-breaking anim
end
super
@@ -1540,6 +1540,8 @@ class Battle::Move::TypeAndPowerDependOnWeather < Battle::Move
ret = :ROCK if GameData::Type.exists?(:ROCK)
when :Hail
ret = :ICE if GameData::Type.exists?(:ICE)
when :ShadowSky
ret = :NONE
end
return ret
end