Fixed inmunity breaking moves/abilities part 2, fixed intimidate and similar abilities.

This commit is contained in:
CaptainSegis 2016-12-23 13:48:32 -05:00
parent 97852cc8f0
commit 2b647f801a
3 changed files with 17 additions and 57 deletions

View File

@ -3991,11 +3991,11 @@
If BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen, 1) = True Then If BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen, 1) = True Then
Select Case p.Ability.Name.ToLower() Select Case p.Ability.Name.ToLower()
Case "drizzle" Case "drizzle"
ChangeWeather(False, False, BattleWeather.WeatherTypes.Rain, turns, BattleScreen, "Drizzle makes it rain!", "drizzle") ChangeWeather(own, own, BattleWeather.WeatherTypes.Rain, turns, BattleScreen, "Drizzle makes it rain!", "drizzle")
Case "cloud nine" Case "cloud nine"
ChangeWeather(False, False, BattleWeather.WeatherTypes.Clear, 0, BattleScreen, "", "cloudnine") ChangeWeather(own, own, BattleWeather.WeatherTypes.Clear, 0, BattleScreen, "", "cloudnine")
Case "intimidate" Case "intimidate"
LowerStat(True, False, BattleScreen, "Attack", 1, p.GetDisplayName() & "'s Intimidate cuts " & op.GetDisplayName() & "'s attack!", "intimidate") LowerStat(Not own, own, BattleScreen, "Attack", 1, p.GetDisplayName() & "'s Intimidate cuts " & op.GetDisplayName() & "'s attack!", "intimidate")
Case "trace" Case "trace"
If op.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() <> "illusion" Then If op.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() <> "illusion" Then
p.OriginalAbility = p.Ability p.OriginalAbility = p.Ability
@ -4003,18 +4003,18 @@
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " copied the ability " & op.Ability.Name & " from " & op.GetDisplayName() & "!")) .BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " copied the ability " & op.Ability.Name & " from " & op.GetDisplayName() & "!"))
End If End If
Case "sand stream" Case "sand stream"
ChangeWeather(False, False, BattleWeather.WeatherTypes.Sandstorm, turns, BattleScreen, "Sand Stream creates a sandstorm!", "sandstream") ChangeWeather(own, own, BattleWeather.WeatherTypes.Sandstorm, turns, BattleScreen, "Sand Stream creates a sandstorm!", "sandstream")
Case "forecast" Case "forecast"
ApplyForecast(BattleScreen) ApplyForecast(BattleScreen)
Case "drought" Case "drought"
ChangeWeather(False, False, BattleWeather.WeatherTypes.Sunny, turns, BattleScreen, "The sunlight turned harsh!", "drought") ChangeWeather(own, own, BattleWeather.WeatherTypes.Sunny, turns, BattleScreen, "The sunlight turned harsh!", "drought")
Case "air lock" Case "air lock"
ChangeWeather(False, False, BattleWeather.WeatherTypes.Clear, 0, BattleScreen, "", "airlock") ChangeWeather(own, own, BattleWeather.WeatherTypes.Clear, 0, BattleScreen, "", "airlock")
Case "download" Case "download"
If op.Defense < op.SpDefense Then If op.Defense < op.SpDefense Then
RaiseStat(False, False, BattleScreen, "Attack", 1, "Download analyzed the foe!", "download") RaiseStat(own, own, BattleScreen, "Attack", 1, "Download analyzed the foe!", "download")
Else Else
RaiseStat(False, False, BattleScreen, "Special Attack", 1, "Download analyzed the foe!", "download") RaiseStat(own, own, BattleScreen, "Special Attack", 1, "Download analyzed the foe!", "download")
End If End If
Case "mold breaker" Case "mold breaker"
.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " breakes the mold!")) .BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " breakes the mold!"))
@ -4041,7 +4041,7 @@
.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " makes " & p.GetDisplayName() & " shudder!")) .BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " makes " & p.GetDisplayName() & " shudder!"))
End If End If
Case "snow warning" Case "snow warning"
ChangeWeather(False, False, BattleWeather.WeatherTypes.Hailstorm, turns, BattleScreen, "Snow Warning summoned a hailstorm!", "snowwarning") ChangeWeather(own, own, BattleWeather.WeatherTypes.Hailstorm, turns, BattleScreen, "Snow Warning summoned a hailstorm!", "snowwarning")
Case "frisk" Case "frisk"
If Not op.Item Is Nothing Then If Not op.Item Is Nothing Then
.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " is holding " & op.Item.Name & ".")) .BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " is holding " & op.Item.Name & "."))

View File

@ -1656,32 +1656,6 @@
End If End If
End If End If
'type1
Dim Type1 As Single = Element.GetElementMultiplier(Attack.Type, Op.Type1)
If p.Ability.Name.ToLower() = "refrigerate" And Attack.Type.Type = Element.Types.Normal Then
Type1 = Element.GetElementMultiplier(New Element(Element.Types.Ice), Op.Type1)
End If
If p.Ability.Name.ToLower() = "pixilate" And Attack.Type.Type = Element.Types.Normal Then
Type1 = Element.GetElementMultiplier(New Element(Element.Types.Fairy), Op.Type1)
End If
If p.Ability.Name.ToLower() = "aerilate" And Attack.Type.Type = Element.Types.Normal Then
Type1 = Element.GetElementMultiplier(New Element(Element.Types.Flying), Op.Type1)
End If
Type1 = ReverseTypeEffectiveness(Type1)
'type2
Dim Type2 As Single = Element.GetElementMultiplier(Attack.Type, Op.Type2)
If p.Ability.Name.ToLower() = "refrigerate" And Attack.Type.Type = Element.Types.Normal Then
Type2 = Element.GetElementMultiplier(New Element(Element.Types.Ice), Op.Type2)
End If
If p.Ability.Name.ToLower() = "pixilate" And Attack.Type.Type = Element.Types.Normal Then
Type2 = Element.GetElementMultiplier(New Element(Element.Types.Fairy), Op.Type2)
End If
If p.Ability.Name.ToLower() = "aerilate" And Attack.Type.Type = Element.Types.Normal Then
Type2 = Element.GetElementMultiplier(New Element(Element.Types.Flying), Op.Type2)
End If
Type2 = ReverseTypeEffectiveness(Type2)
'Mod3 'Mod3
Dim Mod3 As Single = 1.0F Dim Mod3 As Single = 1.0F
@ -1690,23 +1664,9 @@
Dim TL As Single = 1.0F Dim TL As Single = 1.0F
Dim TRB As Single = 1.0F Dim TRB As Single = 1.0F
Dim TypeA As Single = Type1 * Type2 Dim effectiveness As Single = CalculateEffectiveness(Attack, BattleScreen, p, Op, Own)
If Not Op.Item Is Nothing Then If effectiveness > 1.0F Then
If Op.Item.Name.ToLower() = "ring target" And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
If Type1 = 0 Then
TypeA = Type2
End If
If Type2 = 0 Then
TypeA = Type1
End If
If TypeA = 0 Then
TypeA = 1.0F
End If
End If
End If
If TypeA > 1.0F Then
If Op.Ability.Name.ToLower() = "solid rock" Or Op.Ability.Name.ToLower() = "filter" Then If Op.Ability.Name.ToLower() = "solid rock" Or Op.Ability.Name.ToLower() = "filter" Then
If BattleScreen.FieldEffects.CanUseAbility(Not Own, BattleScreen) = True Then If BattleScreen.FieldEffects.CanUseAbility(Not Own, BattleScreen) = True Then
SRF = 0.75F SRF = 0.75F
@ -1835,7 +1795,7 @@
End If End If
End If End If
If TypeA < 1.0F Then If effectiveness < 1.0F Then
If p.Ability.Name.ToLower() = "tinted lens" Then If p.Ability.Name.ToLower() = "tinted lens" Then
TL = 2.0F TL = 2.0F
End If End If
@ -1843,7 +1803,7 @@
Mod3 = SRF * EB * TL * TRB Mod3 = SRF * EB * TL * TRB
damage = CInt(Math.Floor((((((((Level * 2 / 5) + 2) * BasePower * Atk / 50) / Def) * Mod1) + 2) * CH * Mod2 * R / 100) * STAB * Type1 * Type2 * Mod3)) damage = CInt(Math.Floor((((((((Level * 2 / 5) + 2) * BasePower * Atk / 50) / Def) * Mod1) + 2) * CH * Mod2 * R / 100) * STAB * effectiveness * Mod3))
If p.Ability.Name.ToLower() = "multiscale" And p.HP = p.MaxHP And BattleScreen.FieldEffects.CanUseAbility(Own, BattleScreen) = True Then If p.Ability.Name.ToLower() = "multiscale" And p.HP = p.MaxHP And BattleScreen.FieldEffects.CanUseAbility(Own, BattleScreen) = True Then
damage = CInt(damage / 2) damage = CInt(damage / 2)

View File

@ -1634,12 +1634,12 @@
If Me.Type.Type = Element.Types.Normal Then If Me.Type.Type = Element.Types.Normal Then
If p.Ability.Name.ToLower() = "pixilate" Then If p.Ability.Name.ToLower() = "pixilate" Then
Return New Element(Element.Types.Fairy) Return New Element(Element.Types.Fairy)
End If ElseIf p.Ability.Name.ToLower() = "refrigerate" Then
If p.Ability.Name.ToLower() = "refrigerate" Then
Return New Element(Element.Types.Ice) Return New Element(Element.Types.Ice)
End If ElseIf p.Ability.Name.ToLower() = "aerilate" Then
If p.Ability.Name.ToLower() = "aerilate" Then
Return New Element(Element.Types.Flying) Return New Element(Element.Types.Flying)
ElseIf p.Ability.Name.ToLower() = "galvanize" Then
Return New Element(Element.Types.Electric)
End If End If
End If End If