fix wrong evolutions
This commit is contained in:
parent
5d85c33910
commit
30a59646a8
|
@ -54,3 +54,4 @@ TradeValue|20
|
|||
EvolutionCondition|103_alola,item,34,item
|
||||
EvolutionCondition|103_alola,region,sevii islands,item
|
||||
EvolutionCondition|103,item,34,item
|
||||
EvolutionCondition|103,region,-sevii islands,item
|
||||
|
|
|
@ -56,3 +56,4 @@ EvolutionCondition|105_alola,Level,28,Level
|
|||
EvolutionCondition|105_alola,region,sevii islands,Level
|
||||
EvolutionCondition|105_alola,daytime,0;3,level
|
||||
EvolutionCondition|105,Level,28,Level
|
||||
EvolutionCondition|105,region,-sevii islands,Level
|
||||
|
|
|
@ -51,6 +51,7 @@ Move|42,435
|
|||
Move|45,113
|
||||
Move|50,87
|
||||
EvolutionCondition|26,item,23,item
|
||||
EvolutionCondition|26,region,-sevii islands,item
|
||||
EvolutionCondition|26_alola,item,23,item
|
||||
EvolutionCondition|26_alola,region,sevii islands,item
|
||||
Item|5,163
|
||||
|
|
|
@ -232,9 +232,17 @@ Public Class EvolutionCondition
|
|||
canEvolve = False
|
||||
Dim eregions As List(Of String) = c.Argument.ToLower.Split(CChar(";")).ToList()
|
||||
Dim regions As List(Of String) = Screen.Level.CurrentRegion.ToLower.Split(CChar(",")).ToList()
|
||||
For Each r As String In regions
|
||||
If eregions.Contains(r) Then
|
||||
canEvolve = True
|
||||
|
||||
For Each r As String In eregions
|
||||
If r.Chars(0) = CChar("-") Then
|
||||
canEvolve = False
|
||||
If Not regions.Contains(r.Substring(1)) Then
|
||||
canEvolve = True
|
||||
End If
|
||||
Else
|
||||
If regions.Contains(r) Then
|
||||
canEvolve = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
|
|
|
@ -21,7 +21,7 @@ Public Class Pokemon
|
|||
|
||||
'ShinyCharm
|
||||
If Core.Player.Inventory.GetItemAmount(242) > 0 Then
|
||||
shinyRate = CInt(shinyRate * 0.75F)
|
||||
shinyRate = CInt(shinyRate * 0.25F)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
@ -1249,6 +1249,7 @@ Public Class Pokemon
|
|||
Public Shared Function GetPokemonByID(ByVal Number As Integer, ByVal AdditionalData As String) As Pokemon
|
||||
Dim p As New Pokemon()
|
||||
p.LoadDefinitions(Number, AdditionalData)
|
||||
p.AdditionalData = AdditionalData
|
||||
Return p
|
||||
End Function
|
||||
|
||||
|
|
|
@ -333,8 +333,12 @@
|
|||
|
||||
Private Sub EvolvePokemon()
|
||||
Dim HPpercentage As Integer = CInt((currentPokemon.HP / currentPokemon.MaxHP) * 100)
|
||||
|
||||
evolvedPokemon = Pokemon.GetPokemonByID(CInt(currentPokemon.GetEvolutionID(Me.EvolutionTrigger, Me.EvolutionArg).Split(CChar("_"))(0)))
|
||||
Dim ID As String = currentPokemon.GetEvolutionID(Me.EvolutionTrigger, Me.EvolutionArg)
|
||||
If ID.Contains(CChar("_")) Then
|
||||
evolvedPokemon = Pokemon.GetPokemonByID(CInt(ID.Split(CChar("_"))(0)), ID.Split(CChar("_"))(1))
|
||||
Else
|
||||
evolvedPokemon = Pokemon.GetPokemonByID(CInt(ID))
|
||||
End If
|
||||
evolvedPokemon.Status = currentPokemon.Status
|
||||
|
||||
evolvedPokemon.EVHP = currentPokemon.EVHP
|
||||
|
@ -359,9 +363,6 @@
|
|||
evolvedPokemon.Attacks = currentPokemon.Attacks
|
||||
evolvedPokemon.Gender = currentPokemon.Gender
|
||||
evolvedPokemon.Nature = currentPokemon.Nature
|
||||
If currentPokemon.GetEvolutionID(Me.EvolutionTrigger, Me.EvolutionArg).Contains(CChar("_")) Then
|
||||
evolvedPokemon.AdditionalData = currentPokemon.GetEvolutionID(Me.EvolutionTrigger, Me.EvolutionArg).Split(CChar("_"))(1)
|
||||
End If
|
||||
|
||||
evolvedPokemon.ReloadDefinitions()
|
||||
evolvedPokemon.CalculateStats()
|
||||
|
|
Loading…
Reference in New Issue