mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-30 09:15:05 +02:00
Fixed Dragon Tail phazing
same as Roar in trainer battles
This commit is contained in:
parent
3ba7822ae0
commit
53202cffa2
@ -81,25 +81,47 @@
|
|||||||
'check ingrain set up:
|
'check ingrain set up:
|
||||||
If ingrain <= 0 Then
|
If ingrain <= 0 Then
|
||||||
|
|
||||||
If BattleScreen.IsTrainerBattle = True Or BattleScreen.IsPVPBattle = True Or BattleScreen.IsRemoteBattle = True Then
|
If BattleCalculation.CanSwitch(BattleScreen, Not own) = True Then
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got scared away!"))
|
||||||
|
If BattleScreen.IsPVPBattle = True Or BattleScreen.IsTrainerBattle = True Or BattleScreen.IsRemoteBattle = True Then
|
||||||
|
'trainer battle
|
||||||
If own = True Then
|
If own = True Then
|
||||||
If BattleScreen.Trainer.CountUseablePokemon > 1 Then
|
If BattleScreen.Trainer.CountUseablePokemon > 1 Then
|
||||||
BattleScreen.Battle.SwitchOutOpp(BattleScreen, -1, "")
|
Dim i As Integer = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count)
|
||||||
|
While BattleScreen.Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OppPokemonIndex = i OrElse BattleScreen.Trainer.Pokemons(i).HP <= 0
|
||||||
|
i = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count)
|
||||||
|
End While
|
||||||
|
BattleScreen.Battle.SwitchOutOpp(BattleScreen, i, "")
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Core.Player.CountFightablePokemon > 1 Then
|
If Core.Player.CountFightablePokemon > 1 Then
|
||||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, -1, -1)
|
Dim i As Integer = Core.Random.Next(0, Core.Player.Pokemons.Count)
|
||||||
|
While Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OwnPokemonIndex = i OrElse Core.Player.Pokemons(i).HP <= 0
|
||||||
|
i = Core.Random.Next(0, Core.Player.Pokemons.Count)
|
||||||
|
End While
|
||||||
|
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
'wild battle
|
||||||
|
|
||||||
If own = True Then
|
If own = True Then
|
||||||
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
|
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
|
||||||
Else
|
Else
|
||||||
If Core.Player.CountFightablePokemon > 1 Then
|
If Core.Player.CountFightablePokemon > 1 Then
|
||||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, -1, -1)
|
BattleScreen.Battle.SwitchOutOwn(BattleScreen, -1, -1)
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Loading…
x
Reference in New Issue
Block a user