Fix Beat Up no damage for wild Pokémon
This commit is contained in:
parent
67f4a63273
commit
38acb8955b
|
@ -53,41 +53,45 @@
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Function GetTimesToAttack(own As Boolean, BattleScreen As BattleScreen) As Integer
|
Public Overrides Function GetTimesToAttack(own As Boolean, BattleScreen As BattleScreen) As Integer
|
||||||
Dim i As Integer = 1
|
Dim i As Integer = 0
|
||||||
If own = True Then
|
If own = True Then
|
||||||
For Each p As Pokemon In Core.Player.Pokemons
|
For Each p As Pokemon In Core.Player.Pokemons
|
||||||
If p.Status = Pokemon.StatusProblems.None Then
|
If p.Status <> Pokemon.StatusProblems.Fainted Then
|
||||||
i += 1
|
i += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
ElseIf BattleScreen.IsTrainerBattle = True Then
|
ElseIf BattleScreen.IsTrainerBattle = True Then
|
||||||
For Each p As Pokemon In BattleScreen.Trainer.Pokemons
|
For Each p As Pokemon In BattleScreen.Trainer.Pokemons
|
||||||
If p.Status = Pokemon.StatusProblems.None Then
|
If p.Status <> Pokemon.StatusProblems.Fainted Then
|
||||||
i += 1
|
i += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Else
|
||||||
|
i += 1
|
||||||
End If
|
End If
|
||||||
i = i-1
|
|
||||||
Return i
|
Return i
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Function GetBasePower(own As Boolean, BattleScreen As BattleScreen) As Integer
|
Public Overrides Function GetBasePower(own As Boolean, BattleScreen As BattleScreen) As Integer
|
||||||
Dim avgTeamBaseAttack As Double = 0.0D
|
Dim avgTeamBaseAttack As Double = 0.0D
|
||||||
Dim pokemonCounter As Integer = 0
|
Dim pokemonCounter As Integer = 0
|
||||||
If own Then
|
If own = True Then
|
||||||
For Each pokemon As Pokemon In Core.Player.Pokemons
|
For Each pokemon As Pokemon In Core.Player.Pokemons
|
||||||
If (Not pokemon.IsEgg) AndAlso pokemon.Status <> Pokemon.StatusProblems.Fainted And pokemon.HP > 0 Then
|
If (Not pokemon.IsEgg) AndAlso pokemon.Status <> Pokemon.StatusProblems.Fainted And pokemon.HP > 0 Then
|
||||||
avgTeamBaseAttack += (pokemon.BaseAttack / 10)
|
avgTeamBaseAttack += (pokemon.BaseAttack / 10)
|
||||||
pokemonCounter += 1
|
pokemonCounter += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
ElseIf BattleScreen.IsTrainerBattle = True Then
|
||||||
For Each pokemon As Pokemon In BattleScreen.Trainer.Pokemons
|
For Each pokemon As Pokemon In BattleScreen.Trainer.Pokemons
|
||||||
If (Not pokemon.IsEgg) AndAlso pokemon.Status <> Pokemon.StatusProblems.Fainted And pokemon.HP > 0 Then
|
If (Not pokemon.IsEgg) AndAlso pokemon.Status <> Pokemon.StatusProblems.Fainted And pokemon.HP > 0 Then
|
||||||
avgTeamBaseAttack += (pokemon.BaseAttack / 10)
|
avgTeamBaseAttack += (pokemon.BaseAttack / 10)
|
||||||
pokemonCounter += 1
|
pokemonCounter += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Else
|
||||||
|
avgTeamBaseAttack += (BattleScreen.OppPokemon.BaseAttack / 10)
|
||||||
|
pokemonCounter = 1
|
||||||
End If
|
End If
|
||||||
If pokemonCounter <> 0 Then
|
If pokemonCounter <> 0 Then
|
||||||
avgTeamBaseAttack = avgTeamBaseAttack / pokemonCounter
|
avgTeamBaseAttack = avgTeamBaseAttack / pokemonCounter
|
||||||
|
|
Loading…
Reference in New Issue