mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Fix Infinite PP for opponents
This commit is contained in:
parent
734ab3f4e9
commit
b2f6c98f8e
@ -428,7 +428,7 @@
|
|||||||
Dim OppAttackChoice As Integer = Core.Random.Next(0, AvailableAttacks.Count)
|
Dim OppAttackChoice As Integer = Core.Random.Next(0, AvailableAttacks.Count)
|
||||||
Dim Ready As Boolean = False
|
Dim Ready As Boolean = False
|
||||||
While Ready = False
|
While Ready = False
|
||||||
If BattleScreen.OppPokemon.Attacks(OppAttackChoice).Disabled > 0 OrElse BattleScreen.FieldEffects.OppTaunt > 0 AndAlso BattleScreen.OppPokemon.Attacks(OppAttackChoice).Category = Attack.Categories.Status Then
|
If BattleScreen.OppPokemon.Attacks(OppAttackChoice).Disabled > 0 OrElse BattleScreen.FieldEffects.OppTaunt > 0 AndAlso BattleScreen.OppPokemon.Attacks(OppAttackChoice).Category = Attack.Categories.Status Or BattleScreen.OppPokemon.Attacks(OppAttackChoice).CurrentPP <= 0 Then
|
||||||
AvailableAttacks.Remove(OppAttackChoice)
|
AvailableAttacks.Remove(OppAttackChoice)
|
||||||
If AvailableAttacks.Count > 0 Then
|
If AvailableAttacks.Count > 0 Then
|
||||||
OppAttackChoice = AvailableAttacks(Core.Random.Next(0, AvailableAttacks.Count))
|
OppAttackChoice = AvailableAttacks(Core.Random.Next(0, AvailableAttacks.Count))
|
||||||
|
@ -53,13 +53,22 @@
|
|||||||
Me.UseAccEvasion = False
|
Me.UseAccEvasion = False
|
||||||
'#End
|
'#End
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Overrides Function DeductPP(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Boolean
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||||
If own = False Then
|
If own = True Then
|
||||||
p = BattleScreen.OppPokemon
|
|
||||||
End If
|
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " has no usable attacks left!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " has no usable attacks left!"))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub PreAttack(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Dim p As Pokemon = BattleScreen.OppPokemon
|
||||||
|
If own = False Then
|
||||||
|
BattleScreen.Battle.ChangeCameraAngle(1, False, BattleScreen)
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " has no usable attacks left!"))
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user