Miscellaneous fixes:

- Fixed Focus Blast accuracy and category
- Fixed Autotomize name
- Fixed EV gain
- Fixed Old man script in Five Island
- Adjusted the prices in the frontier shop
- Fixed a typo kitchen script in the player's house
- Fixed Lilligant , Delphox and Greninja data files
- Fixed Sky Attack missing flinch chance
- Fixed Power Swap wrong target
- Fixed badge display in trainer card
This commit is contained in:
CaptainSegis 2017-07-10 03:15:50 -05:00
parent 95bc43265d
commit 230bd20522
16 changed files with 194 additions and 112 deletions

View File

@ -6725,7 +6725,7 @@
Next
End If
Core.Player.Pokemons(PokeIndex).GainEffort(Core.Player.Pokemons(PokeIndex), BattleScreen.OppPokemon)
Core.Player.Pokemons(PokeIndex).GainEffort(BattleScreen.OppPokemon)
Next
End If

View File

@ -12,8 +12,8 @@
Me.CurrentPP = 5
Me.MaxPP = 5
Me.Power = 120
Me.Accuracy = 100
Me.Category = Categories.Physical
Me.Accuracy = 70
Me.Category = Categories.Special
Me.ContestCategory = ContestCategories.Smart
Me.Name = "Focus Blast"
Me.Description = "The user heightens its mental focus and unleashes its power. It may also lower the targets Sp. Def."

View File

@ -177,6 +177,12 @@
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
If Core.Random.Next(0, 100) < Me.GetEffectChance(0, own, BattleScreen) Then
BattleScreen.Battle.InflictFlinch(Not own, own, BattleScreen, "", "move:skyattack")
End If
End Sub
End Class
End Namespace

View File

@ -15,7 +15,7 @@
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Beauty
Me.Name = "Agility"
Me.Name = "Autotomize"
Me.Description = "The user sheds part of its body to make itself lighter and sharply raise its Speed stat. "
Me.CriticalChance = 0
Me.IsHMMove = False

View File

@ -2717,96 +2717,100 @@ Public Class Pokemon
''' Adds Effort values (EV) to this Pokémon after defeated another Pokémon, if possible.
''' </summary>
''' <param name="DefeatedPokemon">The defeated Pokémon.</param>
Public Sub GainEffort(ByVal pokemon As Pokemon, ByVal DefeatedPokemon As Pokemon)
Dim allEV As Integer = EVHP + EVAttack + EVDefense + EVSpeed + EVSpAttack + EVSpDefense
If allEV < 510 Then
Dim maxGainEV As Integer = 0
If allEV < 510 Then
maxGainEV = 510 - allEV
End If
Dim EVfactor As Integer = 1
If maxGainEV > 0 Then
maxGainEV = CInt(MathHelper.Clamp(maxGainEV, 1, 6))
If Not pokemon.Item Is Nothing Then
Select Case pokemon.Item.ID()
Case 582, 583, 584, 585, 586, 587 'EV Items
If Me.EVHP < 252 And pokemon.Item.ID = 582 Then
Me.EVHP += CInt(MathHelper.Clamp(4, 0, 252 - Me.EVHP))
End If
If Me.EVAttack < 252 And pokemon.Item.ID = 583 Then
Me.EVAttack += CInt(MathHelper.Clamp(4, 0, 252 - Me.EVHP))
End If
If Me.EVDefense < 252 And pokemon.Item.ID = 584 Then
Me.EVDefense += CInt(MathHelper.Clamp(4, 0, 252 - Me.EVHP))
End If
If Me.EVSpAttack < 252 And pokemon.Item.ID = 585 Then
Me.EVSpAttack += CInt(MathHelper.Clamp(4, 0, 252 - Me.EVHP))
End If
If Me.EVSpDefense < 252 And pokemon.Item.ID = 586 Then
Me.EVSpDefense += CInt(MathHelper.Clamp(4, 0, 252 - Me.EVHP))
End If
If Me.Speed < 252 And pokemon.Item.ID = 587 Then
Me.Speed += CInt(MathHelper.Clamp(4, 0, 252 - Me.EVHP))
End If
Exit Sub
Case 581 'Item 581 is Macho Brace
EVfactor = 2
End Select
End If
If Me.EVHP < 252 And DefeatedPokemon.GiveEVHP > 0 Then
Dim gainHPEV As Integer = DefeatedPokemon.GiveEVHP
gainHPEV = gainHPEV * EVfactor
gainHPEV = CInt(MathHelper.Clamp(gainHPEV, 0, 252 - Me.EVHP))
Me.EVHP += gainHPEV
End If
If Me.EVAttack < 252 And DefeatedPokemon.GiveEVAttack > 0 Then
Dim gainAttackEV As Integer = DefeatedPokemon.GiveEVAttack
gainAttackEV = gainAttackEV * EVfactor
gainAttackEV = CInt(MathHelper.Clamp(gainAttackEV, 0, 252 - Me.EVAttack))
Me.EVAttack += gainAttackEV
End If
If Me.EVDefense < 252 And DefeatedPokemon.GiveEVDefense > 0 Then
Dim gainDefenseEV As Integer = DefeatedPokemon.GiveEVDefense
gainDefenseEV = gainDefenseEV * EVfactor
gainDefenseEV = CInt(MathHelper.Clamp(gainDefenseEV, 0, 252 - Me.EVDefense))
Me.EVDefense += gainDefenseEV
End If
If Me.EVSpAttack < 252 And DefeatedPokemon.GiveEVSpAttack > 0 Then
Dim gainSpAttackEV As Integer = DefeatedPokemon.GiveEVSpAttack
gainSpAttackEV = gainSpAttackEV * EVfactor
gainSpAttackEV = CInt(MathHelper.Clamp(gainSpAttackEV, 0, 252 - Me.EVSpAttack))
Me.EVSpAttack += gainSpAttackEV
End If
If Me.EVSpDefense < 252 And DefeatedPokemon.GiveEVSpDefense > 0 Then
Dim gainSpDefenseEV As Integer = DefeatedPokemon.GiveEVSpDefense
gainSpDefenseEV = gainSpDefenseEV * EVfactor
gainSpDefenseEV = CInt(MathHelper.Clamp(gainSpDefenseEV, 0, 252 - Me.EVSpDefense))
Me.EVSpDefense += gainSpDefenseEV
End If
If Me.EVSpeed < 252 And DefeatedPokemon.GiveEVSpeed > 0 Then
Dim gainSpeedEV As Integer = DefeatedPokemon.GiveEVSpeed
gainSpeedEV = gainSpeedEV * EVfactor
gainSpeedEV = CInt(MathHelper.Clamp(gainSpeedEV, 0, 252 - Me.EVSpeed))
Me.EVSpeed += gainSpeedEV
End If
End If
Public Sub GainEffort(ByVal DefeatedPokemon As Pokemon)
Dim allEV As Integer = EVHP + EVAttack + EVDefense + EVSpAttack + EVSpDefense + EVSpeed
If allEV >= 510 Then
Exit Sub
End If
Dim maxEVgain As Integer = 510 - allEV
Dim totalEVgain As Integer = 0
'EV gains
Dim gainEVHP As Integer = DefeatedPokemon.GiveEVHP
Dim gainEVAttack As Integer = DefeatedPokemon.GiveEVAttack
Dim gainEVDefense As Integer = DefeatedPokemon.GiveEVDefense
Dim gainEVSpAttack As Integer = DefeatedPokemon.GiveEVSpAttack
Dim gainEVSpDefense As Integer = DefeatedPokemon.GiveEVSpDefense
Dim gainEVSpeed As Integer = DefeatedPokemon.GiveEVSpeed
Dim EVfactor As Integer = 1
Dim itemNumber = 0
If Item IsNot Nothing Then
itemNumber = Item.ID
End If
Select Case itemNumber
'Macho Brace
Case 581 : EVfactor *= 2
'Power Items
Case 582 : gainEVHP += 4
Case 583 : gainEVAttack += 4
Case 584 : gainEVDefense += 4
Case 585 : gainEVSpAttack += 4
Case 586 : gainEVSpDefense += 4
Case 587 : gainEVSpeed += 4
End Select
'HP gain
If (gainEVHP > 0 AndAlso EVHP < 252 AndAlso maxEVgain - totalEVgain > 0) Then
gainEVHP *= EVfactor
gainEVHP = MathHelper.Clamp(gainEVHP, 0, 252 - EVHP)
gainEVHP = MathHelper.Clamp(gainEVHP, 0, maxEVgain - totalEVgain)
EVHP += gainEVHP
totalEVgain += gainEVHP
End If
'Attack gain
If (gainEVAttack > 0 AndAlso EVAttack < 252 AndAlso maxEVgain - totalEVgain > 0) Then
gainEVAttack *= EVfactor
gainEVAttack = MathHelper.Clamp(gainEVAttack, 0, 252 - EVAttack)
gainEVAttack = MathHelper.Clamp(gainEVAttack, 0, maxEVgain - totalEVgain)
EVAttack += gainEVAttack
totalEVgain += gainEVAttack
End If
'Defense gain
If (gainEVDefense > 0 AndAlso EVDefense < 252 AndAlso maxEVgain - totalEVgain > 0) Then
gainEVDefense *= EVfactor
gainEVDefense = MathHelper.Clamp(gainEVDefense, 0, 252 - EVDefense)
gainEVDefense = MathHelper.Clamp(gainEVDefense, 0, maxEVgain - totalEVgain)
EVDefense += gainEVDefense
totalEVgain += gainEVDefense
End If
'SpAttack gain
If (gainEVSpAttack > 0 AndAlso EVSpAttack < 252 AndAlso maxEVgain - totalEVgain > 0) Then
gainEVSpAttack *= EVfactor
gainEVSpAttack = MathHelper.Clamp(gainEVSpAttack, 0, 252 - EVSpAttack)
gainEVSpAttack = MathHelper.Clamp(gainEVSpAttack, 0, maxEVgain - totalEVgain)
EVSpAttack += gainEVSpAttack
totalEVgain += gainEVSpAttack
End If
'SpDefense gain
If (gainEVSpDefense > 0 AndAlso EVSpDefense < 252 AndAlso maxEVgain - totalEVgain > 0) Then
gainEVSpDefense *= EVfactor
gainEVSpDefense = MathHelper.Clamp(gainEVSpDefense, 0, 252 - EVSpDefense)
gainEVSpDefense = MathHelper.Clamp(gainEVSpDefense, 0, maxEVgain - totalEVgain)
EVSpDefense += gainEVSpDefense
totalEVgain += gainEVSpDefense
End If
'Speed gain
If (gainEVSpeed > 0 AndAlso EVSpeed < 252 AndAlso maxEVgain - totalEVgain > 0) Then
gainEVSpeed *= EVfactor
gainEVSpeed = MathHelper.Clamp(gainEVSpeed, 0, 252 - EVSpeed)
gainEVSpeed = MathHelper.Clamp(gainEVSpeed, 0, maxEVgain - totalEVgain)
EVSpeed += gainEVSpeed
totalEVgain += gainEVSpeed
End If
End Sub
''' <summary>

View File

@ -6,8 +6,8 @@
Shared _valid As Boolean = False
Const RUNVALIDATION As Boolean = False
Const EXPECTEDSIZE As Integer = 42418205
Const METAHASH As String = "ODdBOTRDQzlEMTgyOTIzM0RDRTIwMDg4ODBFRDMzNzc="
Const EXPECTEDSIZE As Integer = 42417871
Const METAHASH As String = "NjFEMzUzMjgwNDcyMDk3Q0UxRDI2N0MzQUI2Q0M2MTE="
Public Shared ReadOnly Property IsValid(ByVal ForceResult As Boolean) As Boolean
Get

View File

@ -164,7 +164,7 @@ Public Class Badge
Public Shared Function GetRegion(ByVal index As Integer) As String
Dim regions As New List(Of String)
For Each b As BadgeDeclaration In Badges
If regions.Any(Function(m As String) m.ToLowerInvariant() = b.Region.ToLowerInvariant()) Then
If Not regions.Any(Function(m As String) m.ToLowerInvariant() = b.Region.ToLowerInvariant()) Then
regions.Add(b.Region)
End If
Next
@ -195,7 +195,7 @@ Public Class Badge
Public Shared Function GetRegionCount() As Integer
Dim regions As New List(Of String)
For Each b As BadgeDeclaration In Badges
If regions.Any(Function(m As String) m.ToLowerInvariant() = b.Region.ToLowerInvariant()) Then
If Not regions.Any(Function(m As String) m.ToLowerInvariant() = b.Region.ToLowerInvariant()) Then
regions.Add(b.Region)
End If
Next

View File

@ -13403,7 +13403,7 @@
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/680.PNG
#begin Content/Pokemon/Overworld/Normal/681.PNG
#begin Content/Pokemon/Overworld/Normal/681.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@ -13413,9 +13413,9 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/681.PNG
/build:Content/Pokemon/Overworld/Normal/681.png
#begin Content/Pokemon/Overworld/Normal/681_blade.PNG
#begin Content/Pokemon/Overworld/Normal/681_blade.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@ -13425,7 +13425,7 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/681_blade.PNG
/build:Content/Pokemon/Overworld/Normal/681_blade.png
#begin Content/Pokemon/Overworld/Normal/682.png
/importer:TextureImporter
@ -14015,6 +14015,42 @@
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/721.png
#begin Content/Pokemon/Overworld/Normal/722.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/722.png
#begin Content/Pokemon/Overworld/Normal/725.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/725.png
#begin Content/Pokemon/Overworld/Normal/728.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Normal/728.png
#begin Content/Pokemon/Overworld/Normal/73.png
/importer:TextureImporter
/processor:TextureProcessor
@ -24023,7 +24059,7 @@
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/680.PNG
#begin Content/Pokemon/Overworld/Shiny/681.PNG
#begin Content/Pokemon/Overworld/Shiny/681.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@ -24033,9 +24069,9 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/681.PNG
/build:Content/Pokemon/Overworld/Shiny/681.png
#begin Content/Pokemon/Overworld/Shiny/681_blade.PNG
#begin Content/Pokemon/Overworld/Shiny/681_blade.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@ -24045,7 +24081,7 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/681_blade.PNG
/build:Content/Pokemon/Overworld/Shiny/681_blade.png
#begin Content/Pokemon/Overworld/Shiny/682.png
/importer:TextureImporter
@ -24623,6 +24659,42 @@
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/721.png
#begin Content/Pokemon/Overworld/Shiny/722.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/722.png
#begin Content/Pokemon/Overworld/Shiny/725.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/725.png
#begin Content/Pokemon/Overworld/Shiny/728.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Content/Pokemon/Overworld/Shiny/728.png
#begin Content/Pokemon/Overworld/Shiny/73.png
/importer:TextureImporter
/processor:TextureProcessor

View File

@ -1,4 +1,4 @@
Name|Lilligant
Name|Lilligant
Number|549
ExperienceType|1
BaseExperience|168
@ -9,7 +9,7 @@ BaseFriendship|70
EggGroup1|Grass
EggGroup2|None
BaseEggSteps|5355
EggPokemon|549
EggPokemon|548
IsGenderLess|0
CanBreed|1
Devolution|548

View File

@ -1,4 +1,4 @@
Name|Delphox
Name|Delphox
Number|655
ExperienceType|2
BaseExperience|240
@ -60,4 +60,4 @@ Move|61,126
Move|69,248
Move|75,595
TradeValue|70
EvolutionCondition|650,level,16,level

View File

@ -1,4 +1,4 @@
Name|Greninja
Name|Greninja
Number|658
ExperienceType|2
BaseExperience|239
@ -23,7 +23,7 @@ TutorMoves|308
BaseHP|72
BaseAttack|95
BaseDefense|67
BaseSpAttack|403
BaseSpAttack|103
BaseSpDefense|71
BaseSpeed|122
FPHP|0

File diff suppressed because one or more lines are too long