mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-25 14:54:48 +02:00
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,item,34,item
|
||||||
EvolutionCondition|103_alola,region,sevii islands,item
|
EvolutionCondition|103_alola,region,sevii islands,item
|
||||||
EvolutionCondition|103,item,34,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,region,sevii islands,Level
|
||||||
EvolutionCondition|105_alola,daytime,0;3,level
|
EvolutionCondition|105_alola,daytime,0;3,level
|
||||||
EvolutionCondition|105,Level,28,Level
|
EvolutionCondition|105,Level,28,Level
|
||||||
|
EvolutionCondition|105,region,-sevii islands,Level
|
||||||
|
@ -51,6 +51,7 @@ Move|42,435
|
|||||||
Move|45,113
|
Move|45,113
|
||||||
Move|50,87
|
Move|50,87
|
||||||
EvolutionCondition|26,item,23,item
|
EvolutionCondition|26,item,23,item
|
||||||
|
EvolutionCondition|26,region,-sevii islands,item
|
||||||
EvolutionCondition|26_alola,item,23,item
|
EvolutionCondition|26_alola,item,23,item
|
||||||
EvolutionCondition|26_alola,region,sevii islands,item
|
EvolutionCondition|26_alola,region,sevii islands,item
|
||||||
Item|5,163
|
Item|5,163
|
||||||
|
@ -232,9 +232,17 @@ Public Class EvolutionCondition
|
|||||||
canEvolve = False
|
canEvolve = False
|
||||||
Dim eregions As List(Of String) = c.Argument.ToLower.Split(CChar(";")).ToList()
|
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()
|
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
|
For Each r As String In eregions
|
||||||
canEvolve = True
|
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
|
End If
|
||||||
Next
|
Next
|
||||||
End Select
|
End Select
|
||||||
|
@ -21,7 +21,7 @@ Public Class Pokemon
|
|||||||
|
|
||||||
'ShinyCharm
|
'ShinyCharm
|
||||||
If Core.Player.Inventory.GetItemAmount(242) > 0 Then
|
If Core.Player.Inventory.GetItemAmount(242) > 0 Then
|
||||||
shinyRate = CInt(shinyRate * 0.75F)
|
shinyRate = CInt(shinyRate * 0.25F)
|
||||||
End If
|
End If
|
||||||
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
|
Public Shared Function GetPokemonByID(ByVal Number As Integer, ByVal AdditionalData As String) As Pokemon
|
||||||
Dim p As New Pokemon()
|
Dim p As New Pokemon()
|
||||||
p.LoadDefinitions(Number, AdditionalData)
|
p.LoadDefinitions(Number, AdditionalData)
|
||||||
|
p.AdditionalData = AdditionalData
|
||||||
Return p
|
Return p
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
@ -333,8 +333,12 @@
|
|||||||
|
|
||||||
Private Sub EvolvePokemon()
|
Private Sub EvolvePokemon()
|
||||||
Dim HPpercentage As Integer = CInt((currentPokemon.HP / currentPokemon.MaxHP) * 100)
|
Dim HPpercentage As Integer = CInt((currentPokemon.HP / currentPokemon.MaxHP) * 100)
|
||||||
|
Dim ID As String = currentPokemon.GetEvolutionID(Me.EvolutionTrigger, Me.EvolutionArg)
|
||||||
evolvedPokemon = Pokemon.GetPokemonByID(CInt(currentPokemon.GetEvolutionID(Me.EvolutionTrigger, Me.EvolutionArg).Split(CChar("_"))(0)))
|
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.Status = currentPokemon.Status
|
||||||
|
|
||||||
evolvedPokemon.EVHP = currentPokemon.EVHP
|
evolvedPokemon.EVHP = currentPokemon.EVHP
|
||||||
@ -359,9 +363,6 @@
|
|||||||
evolvedPokemon.Attacks = currentPokemon.Attacks
|
evolvedPokemon.Attacks = currentPokemon.Attacks
|
||||||
evolvedPokemon.Gender = currentPokemon.Gender
|
evolvedPokemon.Gender = currentPokemon.Gender
|
||||||
evolvedPokemon.Nature = currentPokemon.Nature
|
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.ReloadDefinitions()
|
||||||
evolvedPokemon.CalculateStats()
|
evolvedPokemon.CalculateStats()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user