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 Ready As Boolean = 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)
|
||||
If AvailableAttacks.Count > 0 Then
|
||||
OppAttackChoice = AvailableAttacks(Core.Random.Next(0, AvailableAttacks.Count))
|
||||
|
|
|
@ -53,13 +53,22 @@
|
|||
Me.UseAccEvasion = False
|
||||
'#End
|
||||
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)
|
||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||
If own = False Then
|
||||
p = BattleScreen.OppPokemon
|
||||
If own = True Then
|
||||
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
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " has no usable attacks left!"))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
|
|
Loading…
Reference in New Issue