Made NPCs able to mega evolve their pokemon
This commit is contained in:
parent
a29b90c174
commit
c14077d3e9
|
@ -369,6 +369,7 @@
|
|||
End If
|
||||
'AI move here:
|
||||
If BattleScreen.IsTrainerBattle AndAlso Not BattleScreen.IsRemoteBattle Then
|
||||
AI_MegaEvolve(BattleScreen)
|
||||
Return TrainerAI.GetAIMove(BattleScreen, OwnStep)
|
||||
Else
|
||||
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = BattleScreen.OppPokemon.Attacks(Core.Random.Next(0, BattleScreen.OppPokemon.Attacks.Count))}
|
||||
|
@ -416,6 +417,25 @@
|
|||
Public SelectedMoveOwn As Boolean = True
|
||||
Public SelectedMoveOpp As Boolean = True
|
||||
|
||||
Sub AI_MegaEvolve(ByVal BattleScreen As BattleScreen)
|
||||
For i = 0 To BattleScreen.Trainer.Pokemons.Count - 1
|
||||
Dim _str As String = BattleScreen.Trainer.Pokemons(i).AdditionalData
|
||||
Select Case _str
|
||||
Case "mega", "mega_x", "mega_y"
|
||||
Exit Sub
|
||||
Case Else
|
||||
'do nothing
|
||||
End Select
|
||||
Next
|
||||
Dim p As Pokemon = BattleScreen.OppPokemon
|
||||
If p.Item IsNot Nothing AndAlso p.Item.IsMegaStone = True Then
|
||||
Dim megaStone = CType(p.Item, Items.MegaStone)
|
||||
If p.Number = megaStone.MegaPokemonNumber Then
|
||||
BattleScreen.IsMegaEvolvingOpp = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Does the MegaEvolution
|
||||
Sub DoMegaEvolution(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
|
||||
|
||||
|
|
|
@ -42828,3 +42828,15 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/NPC/ManaphyEgg.png
|
||||
|
||||
#begin Pokemon/Overworld/Shiny/6_mega_x.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:Pokemon/Overworld/Shiny/6_mega_x.png
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in New Issue