Update DragonTail.vb

This commit is contained in:
Capt_Segis 2016-09-18 14:46:12 -05:00 committed by GitHub
parent 9b4e45be64
commit a6226d32df

View File

@ -56,33 +56,33 @@
End Sub End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen) Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim op As Pokemon = BattleScreen.OppPokemon Dim p As Pokemon = BattleScreen.OwnPokemon 'p is the phazed pokemon
If own = False Then If own = True Then
op = BattleScreen.OwnPokemon p = BattleScreen.OppPokemon
End If End If
'Not fainted: 'Not fainted:
If op.HP > 0 And op.Status <> Pokemon.StatusProblems.Fainted Then If p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then
Dim substitude As Integer = BattleScreen.FieldEffects.OppSubstitute Dim substitude As Integer = BattleScreen.FieldEffects.OwnSubstitute
If own = False Then If own = True Then
substitude = BattleScreen.FieldEffects.OwnSubstitute substitude = BattleScreen.FieldEffects.OppSubstitute
End If End If
'substitude: 'substitute:
If substitude <= 0 Then If substitude <= 0 Then
'suction cups ability: 'suction cups ability:
If op.Ability.Name.ToLower() <> "suction cups" Then If p.Ability.Name.ToLower() <> "suction cups" Then
Dim ingrain As Integer = BattleScreen.FieldEffects.OppIngrain Dim ingrain As Integer = BattleScreen.FieldEffects.OwnIngrain
If own = False Then If own = True Then
ingrain = BattleScreen.FieldEffects.OwnIngrain ingrain = BattleScreen.FieldEffects.OppIngrain
End If End If
'check ingrain set up: 'check ingrain set up:
If ingrain <= 0 Then If ingrain <= 0 Then
If BattleCalculation.CanSwitch(BattleScreen, Not own) = True Then If BattleCalculation.CanSwitch(BattleScreen, Not own) = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got scared away!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got pushed away!"))
If BattleScreen.IsPVPBattle = True Or BattleScreen.IsTrainerBattle = True Or BattleScreen.IsRemoteBattle = True Then If BattleScreen.IsPVPBattle = True Or BattleScreen.IsTrainerBattle = True Or BattleScreen.IsRemoteBattle = True Then
'trainer battle 'trainer battle
If own = True Then If own = True Then