Merge remote-tracking branch 'remotes/origin/master' into Generation_7
# Conflicts: # 2.5DHero/2.5DHeroContent/Content/Pokemon/Data/172.dat # 2.5DHero/2.5DHeroContent/Content/Pokemon/Data/25.dat
This commit is contained in:
commit
0f99cbac7d
21
2.5DHero.sln
21
2.5DHero.sln
|
@ -7,17 +7,26 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "2.5DHero", "2.5DHero\2.5DHe
|
|||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
DebugJian|Any CPU = DebugJian|Any CPU
|
||||
DebugNoContent|Any CPU = DebugNoContent|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
DebugStandard|Any CPU = DebugStandard|Any CPU
|
||||
ReleaseJian|Any CPU = ReleaseJian|Any CPU
|
||||
ReleaseNoContent|Any CPU = ReleaseNoContent|Any CPU
|
||||
ReleaseStandard|Any CPU = ReleaseStandard|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.DebugJian|Any CPU.ActiveCfg = DebugJian|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.DebugJian|Any CPU.Build.0 = DebugJian|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.DebugNoContent|Any CPU.ActiveCfg = DebugNoContent|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.DebugNoContent|Any CPU.Build.0 = DebugNoContent|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.DebugStandard|Any CPU.ActiveCfg = DebugStandard|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.DebugStandard|Any CPU.Build.0 = DebugStandard|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.ReleaseJian|Any CPU.ActiveCfg = ReleaseJian|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.ReleaseJian|Any CPU.Build.0 = ReleaseJian|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.ReleaseNoContent|Any CPU.ActiveCfg = ReleaseNoContent|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.ReleaseNoContent|Any CPU.Build.0 = ReleaseNoContent|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.ReleaseStandard|Any CPU.ActiveCfg = ReleaseStandard|Any CPU
|
||||
{2AAF65BE-C81D-4663-ABF4-E2E09B16E12F}.ReleaseStandard|Any CPU.Build.0 = ReleaseStandard|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<ApplicationIcon>Pokemon3D.ico</ApplicationIcon>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionCompare>Text</OptionCompare>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
<StartupObject>net.Pokemon3D.Game.Program</StartupObject>
|
||||
|
@ -27,23 +27,26 @@
|
|||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug' Or '$(Configuration)' == 'DebugNoContent'">
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'DebugNoContent' Or '$(Configuration)' == 'DebugStandard' Or '$(Configuration)' == 'DebugJian'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\DesktopGL\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG,TRACE,WINDOWS</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'ReleaseNoContent' Or '$(Configuration)' == 'ReleaseStandard' Or '$(Configuration)' == 'ReleaseJian'">
|
||||
<OutputPath>bin\DesktopGL\Release\</OutputPath>
|
||||
<DefineConstants>TRACE,WINDOWS</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>none</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Pokemon3D.ico" />
|
||||
<Content Include="Pokemon\Items\_itemList.txt">
|
||||
<Content Include="Pokemon\Items\_itemList.txt" />
|
||||
<Content Include="Updater.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="CurrentVersion.dat" />
|
||||
<Reference Include="OpenTK">
|
||||
<HintPath>$(MSBuildProgramFiles32)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -1724,5 +1727,6 @@
|
|||
</CreateProperty>
|
||||
</Target>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Condition=" '$(Configuration)' != 'DebugNoContent' " Project="MonoGame.Content.Builder.targets" />
|
||||
<Import Condition=" '$(Configuration)' == 'DebugStandard' Or '$(Configuration)' == 'ReleaseStandard' " Project="MonoGame.Content.Builder_Standard.targets" />
|
||||
<Import Condition=" '$(Configuration)' == 'DebugJian' Or '$(Configuration)' == 'ReleaseJian' " Project="MonoGame.Content.Builder_Jian.targets" />
|
||||
</Project>
|
File diff suppressed because it is too large
Load Diff
|
@ -693,14 +693,6 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
If p.Ability.Name.ToLower() = "scrappy" Then
|
||||
If op.Type1.Type = Element.Types.Ghost Or op.Type2.Type = Element.Types.Ghost Then
|
||||
If effectiveness = 0 Then
|
||||
effectiveness = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not op.Item Is Nothing Then
|
||||
If op.Item.Name.ToLower() = "ring target" And BattleScreen.FieldEffects.CanUseItem(Not own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not own, BattleScreen) = True Then
|
||||
If Type1 = 0 Then
|
||||
|
@ -727,15 +719,26 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
|
||||
If op.IsType(Element.Types.Ghost) = True Then
|
||||
Dim foresight As Integer = BattleScreen.FieldEffects.OppForesight
|
||||
Dim odorSleught As Integer = BattleScreen.FieldEffects.OppOdorSleuth
|
||||
If own = False Then
|
||||
foresight = BattleScreen.FieldEffects.OwnForesight
|
||||
odorSleught = BattleScreen.FieldEffects.OwnOdorSleuth
|
||||
Dim CanHitGhost = False
|
||||
Dim Foresight As Integer = 0
|
||||
Dim OdorSleuth As Integer = 0
|
||||
If own Then
|
||||
Foresight = BattleScreen.FieldEffects.OppForesight
|
||||
OdorSleuth = BattleScreen.FieldEffects.OppOdorSleuth
|
||||
Else
|
||||
Foresight = BattleScreen.FieldEffects.OwnForesight
|
||||
OdorSleuth = BattleScreen.FieldEffects.OwnOdorSleuth
|
||||
End If
|
||||
If Foresight > 0 Or OdorSleuth > 0 Then
|
||||
CanHitGhost = True
|
||||
End If
|
||||
If BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) AndAlso p.Ability.Name.ToLower() = "scrappy" Then
|
||||
CanHitGhost = True
|
||||
End If
|
||||
|
||||
If foresight > 0 Or odorSleught > 0 Then
|
||||
If CanHitGhost Then
|
||||
If move.Type.Type = Element.Types.Normal Or move.Type.Type = Element.Types.Fighting Then
|
||||
If Type1 = 0.0F Then
|
||||
effectiveness = Type2
|
||||
|
@ -898,6 +901,16 @@
|
|||
'Trapping: Bind, Clamp, Fire Spin, Infestation, Magma Storm, Sand Tomb, Whirlpool, Wrap
|
||||
|
||||
If own = True Then
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Fainted Or BattleScreen.OwnPokemon.HP <= 0 Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
If BattleScreen.IsRemoteBattle AndAlso BattleScreen.IsPVPBattle AndAlso Not BattleScreen.IsHost Then
|
||||
If BattleScreen.FieldEffects.ClientCanSwitch = False Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
If BattleScreen.OppPokemon.Ability.Name.ToLower() = "shadow tag" And BattleScreen.OwnPokemon.Ability.Name.ToLower() <> "shadow tag" Then
|
||||
Return False
|
||||
End If
|
||||
|
@ -927,6 +940,9 @@
|
|||
Return False
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Fainted Or BattleScreen.OppPokemon.HP <= 0 Then
|
||||
Return True
|
||||
End If
|
||||
If BattleScreen.OwnPokemon.Ability.Name.ToLower() = "shadow tag" And BattleScreen.OppPokemon.Ability.Name.ToLower() <> "shadow tag" Then
|
||||
Return False
|
||||
End If
|
||||
|
@ -1438,7 +1454,7 @@
|
|||
End If
|
||||
|
||||
If Attack.Name.ToLower() = "selfdestruct" Or Attack.Name.ToLower() = "explosion" Then
|
||||
SX = 0.5F
|
||||
SX = 1.0F
|
||||
End If
|
||||
|
||||
If Not Op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
|
@ -1465,10 +1481,6 @@
|
|||
DSM = 1.0F
|
||||
End If
|
||||
|
||||
If Attack.Name.ToLower() = "selfdestruct" Or Attack.Name.ToLower() = "explosion" Then
|
||||
SX = 0.5F
|
||||
End If
|
||||
|
||||
If Op.Ability.Name.ToLower() = "flower gift" Then
|
||||
If BattleScreen.FieldEffects.Weather = BattleWeather.WeatherTypes.Sunny Then
|
||||
DMod = 1.5F
|
||||
|
@ -1478,7 +1490,7 @@
|
|||
If Not Op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
Select Case Op.Item.Name.ToLower()
|
||||
Case "soul dew"
|
||||
If p.Number = 380 Or p.Number = 381 Then
|
||||
If Op.Number = 380 Or p.Number = 381 Then
|
||||
DMod = 1.5F
|
||||
End If
|
||||
Case "metal powder"
|
||||
|
@ -1486,13 +1498,13 @@
|
|||
DMod = 1.5F
|
||||
End If
|
||||
Case "deepseascale"
|
||||
If p.Number = 366 Then
|
||||
If Op.Number = 366 Then
|
||||
DMod = 2.0F
|
||||
End If
|
||||
Case "assault vest"
|
||||
DMod = 1.5F
|
||||
Case "eviolite"
|
||||
If p.IsFullyEvolved = False Then
|
||||
If Op.IsFullyEvolved = False Then
|
||||
DMod = 1.5F
|
||||
End If
|
||||
End Select
|
||||
|
@ -1647,32 +1659,6 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
'type1
|
||||
Dim Type1 As Single = Element.GetElementMultiplier(Attack.Type, Op.Type1)
|
||||
If p.Ability.Name.ToLower() = "refrigerate" And Attack.Type.Type = Element.Types.Normal Then
|
||||
Type1 = Element.GetElementMultiplier(New Element(Element.Types.Ice), Op.Type1)
|
||||
End If
|
||||
If p.Ability.Name.ToLower() = "pixilate" And Attack.Type.Type = Element.Types.Normal Then
|
||||
Type1 = Element.GetElementMultiplier(New Element(Element.Types.Fairy), Op.Type1)
|
||||
End If
|
||||
If p.Ability.Name.ToLower() = "aerilate" And Attack.Type.Type = Element.Types.Normal Then
|
||||
Type1 = Element.GetElementMultiplier(New Element(Element.Types.Flying), Op.Type1)
|
||||
End If
|
||||
Type1 = ReverseTypeEffectiveness(Type1)
|
||||
|
||||
'type2
|
||||
Dim Type2 As Single = Element.GetElementMultiplier(Attack.Type, Op.Type2)
|
||||
If p.Ability.Name.ToLower() = "refrigerate" And Attack.Type.Type = Element.Types.Normal Then
|
||||
Type2 = Element.GetElementMultiplier(New Element(Element.Types.Ice), Op.Type2)
|
||||
End If
|
||||
If p.Ability.Name.ToLower() = "pixilate" And Attack.Type.Type = Element.Types.Normal Then
|
||||
Type2 = Element.GetElementMultiplier(New Element(Element.Types.Fairy), Op.Type2)
|
||||
End If
|
||||
If p.Ability.Name.ToLower() = "aerilate" And Attack.Type.Type = Element.Types.Normal Then
|
||||
Type2 = Element.GetElementMultiplier(New Element(Element.Types.Flying), Op.Type2)
|
||||
End If
|
||||
Type2 = ReverseTypeEffectiveness(Type2)
|
||||
|
||||
'Mod3
|
||||
Dim Mod3 As Single = 1.0F
|
||||
|
||||
|
@ -1681,23 +1667,9 @@
|
|||
Dim TL As Single = 1.0F
|
||||
Dim TRB As Single = 1.0F
|
||||
|
||||
Dim TypeA As Single = Type1 * Type2
|
||||
Dim effectiveness As Single = CalculateEffectiveness(Attack, BattleScreen, p, Op, Own)
|
||||
|
||||
If Not Op.Item Is Nothing Then
|
||||
If Op.Item.Name.ToLower() = "ring target" And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
If Type1 = 0 Then
|
||||
TypeA = Type2
|
||||
End If
|
||||
If Type2 = 0 Then
|
||||
TypeA = Type1
|
||||
End If
|
||||
If TypeA = 0 Then
|
||||
TypeA = 1.0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If TypeA > 1.0F Then
|
||||
If effectiveness > 1.0F Then
|
||||
If Op.Ability.Name.ToLower() = "solid rock" Or Op.Ability.Name.ToLower() = "filter" Then
|
||||
If BattleScreen.FieldEffects.CanUseAbility(Not Own, BattleScreen) = True Then
|
||||
SRF = 0.75F
|
||||
|
@ -1826,15 +1798,15 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
If TypeA < 1.0F Then
|
||||
If p.Ability.Name.ToLower() = "tinted lense" Then
|
||||
If effectiveness < 1.0F Then
|
||||
If p.Ability.Name.ToLower() = "tinted lens" Then
|
||||
TL = 2.0F
|
||||
End If
|
||||
End If
|
||||
|
||||
Mod3 = SRF * EB * TL * TRB
|
||||
|
||||
damage = CInt(Math.Floor((((((((Level * 2 / 5) + 2) * BasePower * Atk / 50) / Def) * Mod1) + 2) * CH * Mod2 * R / 100) * STAB * Type1 * Type2 * Mod3))
|
||||
damage = CInt(Math.Floor((((((((Level * 2 / 5) + 2) * BasePower * Atk / 50) / Def) * Mod1) + 2) * CH * Mod2 * R / 100) * STAB * effectiveness * Mod3))
|
||||
|
||||
If p.Ability.Name.ToLower() = "multiscale" And p.HP = p.MaxHP And BattleScreen.FieldEffects.CanUseAbility(Own, BattleScreen) = True Then
|
||||
damage = CInt(damage / 2)
|
||||
|
|
|
@ -605,6 +605,8 @@
|
|||
|
||||
Case BattleSystem.BattleScreen.BattleModes.Standard
|
||||
If BattleScreen.OwnFaint Then
|
||||
_mainMenuIndex = 0
|
||||
_mainMenuNextIndex = 0
|
||||
_mainMenuItemList.Add(New MainMenuItem(1, "Pokémon", 0, AddressOf MainMenuOpenPokemon))
|
||||
If BattleScreen.IsRemoteBattle AndAlso Not BattleScreen.IsHost Then
|
||||
BattleScreen.OwnFaint = False
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
|
||||
Public Class BattleScreen
|
||||
|
||||
|
||||
Inherits Screen
|
||||
|
||||
'Used for after fainting switching
|
||||
Public Shared OwnFaint As Boolean = False
|
||||
Public Shared OppFaint As Boolean = False
|
||||
|
||||
|
||||
|
||||
'Used for lead picking in PvP Battles
|
||||
Public Shared OwnLeadIndex As Integer = 0
|
||||
Public Shared OppLeadIndex As Integer = 0
|
||||
|
@ -222,6 +219,7 @@
|
|||
End If
|
||||
Next
|
||||
Me.OwnPokemon = Core.Player.Pokemons(meIndex)
|
||||
OwnPokemonIndex = meIndex
|
||||
|
||||
Me.IsTrainerBattle = False
|
||||
Me.ParticipatedPokemon.Add(meIndex)
|
||||
|
@ -355,6 +353,7 @@
|
|||
End If
|
||||
Next
|
||||
Me.OwnPokemon = Core.Player.Pokemons(meIndex)
|
||||
OwnPokemonIndex = meIndex
|
||||
If IsPVPBattle Then
|
||||
OwnPokemon = Core.Player.Pokemons(OwnLeadIndex)
|
||||
OwnPokemonIndex = OwnLeadIndex
|
||||
|
@ -447,6 +446,7 @@
|
|||
|
||||
Battle.SwitchInOwn(Me, meIndex, True, OwnPokemonIndex)
|
||||
Battle.SwitchInOpp(Me, True, OppPokemonIndex)
|
||||
TempPVPBattleQuery.Clear()
|
||||
|
||||
Me.BattleQuery.AddRange({cq1, q5, cq2})
|
||||
|
||||
|
@ -501,6 +501,7 @@
|
|||
End If
|
||||
Next
|
||||
Me.OwnPokemon = Core.Player.Pokemons(meIndex)
|
||||
OwnPokemonIndex = meIndex
|
||||
|
||||
Me.IsTrainerBattle = False
|
||||
Me.ParticipatedPokemon.Add(meIndex)
|
||||
|
@ -617,6 +618,8 @@
|
|||
End If
|
||||
Next
|
||||
Me.OwnPokemon = Core.Player.Pokemons(meIndex)
|
||||
OwnPokemonIndex = meIndex
|
||||
|
||||
|
||||
Me.IsTrainerBattle = False
|
||||
Me.ParticipatedPokemon.Add(meIndex)
|
||||
|
@ -873,6 +876,7 @@ nextIndex:
|
|||
Lighting.UpdateLighting(Screen.Effect)
|
||||
Camera.Update()
|
||||
Level.Update()
|
||||
|
||||
SkyDome.Update()
|
||||
|
||||
TextBox.Update()
|
||||
|
@ -975,6 +979,8 @@ nextIndex:
|
|||
#End Region
|
||||
|
||||
Public Sub EndBattle(ByVal blackout As Boolean)
|
||||
Level.StopOffsetMapUpdate()
|
||||
|
||||
Dim str As String = ""
|
||||
'Call the EndBattle function of the abilities and Reverts battle only Pokemon formes.
|
||||
For Each p As Pokemon In Core.Player.Pokemons
|
||||
|
@ -1143,14 +1149,13 @@ nextIndex:
|
|||
End While
|
||||
|
||||
Else
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.Count)
|
||||
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
||||
i = Core.Random.Next(0, Trainer.Pokemons.Count)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
OppPokemonIndex = i
|
||||
OppPokemon = Trainer.Pokemons(i)
|
||||
|
||||
|
@ -1328,16 +1333,20 @@ nextIndex:
|
|||
Public LockData As String = "{}"
|
||||
Public ClientWonBattle As Boolean = True
|
||||
|
||||
'Sends the decided step to the host
|
||||
Public Sub SendClientCommand(ByVal c As String)
|
||||
Core.ServersManager.ServerConnection.SendPackage(New Servers.Package(Servers.Package.PackageTypes.BattleClientData, Core.ServersManager.ID, Servers.Package.ProtocolTypes.TCP, {PartnerNetworkID.ToString(), c}.ToList()))
|
||||
Me.SentInput = True
|
||||
Logger.Debug("[Battle]: Sent Client command")
|
||||
End Sub
|
||||
|
||||
'Receives the current status of the battle from the host
|
||||
Public Shared Sub ReceiveHostEndRoundData(ByVal data As String)
|
||||
Dim newQueries As New List(Of String)
|
||||
Dim tempData As String = ""
|
||||
Dim cData As String = data
|
||||
|
||||
'Converts the single string received as data into a list of string
|
||||
While cData.Length > 0
|
||||
If cData(0).ToString() = "|" AndAlso tempData(tempData.Length - 1).ToString() = "}" Then
|
||||
newQueries.Add(tempData)
|
||||
|
@ -1359,7 +1368,9 @@ nextIndex:
|
|||
End While
|
||||
|
||||
If s.Identification = Identifications.BattleScreen Then
|
||||
CType(s, BattleScreen).LockData = newQueries(0)
|
||||
|
||||
'First set of queries are read and converted into BattleScreen values for the client side.
|
||||
CType(s, BattleScreen).LockData = newQueries(0) 'when locked into certain situations that do not allow the client to take actions (like multi turn moves)
|
||||
CType(s, BattleScreen).OppStatistics.FromString(newQueries(1))
|
||||
CType(s, BattleScreen).OwnStatistics.FromString(newQueries(2))
|
||||
CType(s, BattleScreen).OppPokemon = Pokemon.GetPokemonByData(newQueries(3))
|
||||
|
@ -1369,10 +1380,15 @@ nextIndex:
|
|||
weatherInfo = weatherInfo.Remove(weatherInfo.Length - 1, 1).Remove(0, 1)
|
||||
CType(s, BattleScreen).FieldEffects.Weather = CType(CInt(weatherInfo), BattleWeather.WeatherTypes)
|
||||
|
||||
For i = 0 To 5
|
||||
Dim CanSwitchInfo As String = newQueries(6)
|
||||
CanSwitchInfo = CanSwitchInfo.Remove(CanSwitchInfo.Length - 1, 1).Remove(0, 1)
|
||||
CType(s, BattleScreen).FieldEffects.ClientCanSwitch = CType(CanSwitchInfo, Boolean)
|
||||
|
||||
For i = 0 To 6
|
||||
newQueries.RemoveAt(0)
|
||||
Next
|
||||
|
||||
'Next queries contain the data from the party of the host and the client.
|
||||
Dim ownCount As Integer = Core.Player.Pokemons.Count
|
||||
Dim oppCount As Integer = CType(s, BattleScreen).Trainer.Pokemons.Count
|
||||
|
||||
|
@ -1393,10 +1409,12 @@ nextIndex:
|
|||
End If
|
||||
Next
|
||||
|
||||
Logger.Debug("[Battle]: Received Host End Round data")
|
||||
CType(s, BattleScreen).ReceivedPokemonData = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Receives the "movie" from the host, and stores it in the BattleQuery list. Also checks for After Fainting Switch conditions.
|
||||
Public Shared Sub ReceiveHostData(ByVal data As String)
|
||||
Dim newQueries As New List(Of String)
|
||||
Dim tempData As String = ""
|
||||
|
@ -1407,16 +1425,17 @@ nextIndex:
|
|||
End While
|
||||
If s.Identification = Identifications.BattleScreen Then
|
||||
If data = "-HostFainted-" Then
|
||||
Logger.Debug("[Battle]: The host's pokemon faints")
|
||||
OppFaint = True
|
||||
Exit Sub
|
||||
End If
|
||||
If data = "-ClientFainted-" Then
|
||||
Logger.Debug("[Battle]: The client's pokemon faints")
|
||||
OwnFaint = True
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
While cData.Length > 0
|
||||
If cData(0).ToString() = "|" AndAlso tempData(tempData.Length - 1).ToString() = "}" Then
|
||||
newQueries.Add(tempData)
|
||||
|
@ -1432,8 +1451,6 @@ nextIndex:
|
|||
tempData = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If s.Identification = Identifications.BattleScreen Then
|
||||
CType(s, BattleScreen).BattleQuery.Clear()
|
||||
For Each q As String In newQueries
|
||||
|
@ -1451,7 +1468,7 @@ nextIndex:
|
|||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Logger.Debug("[Battle]: Received Host data (movie)")
|
||||
ReceivedQuery = data
|
||||
End Sub
|
||||
|
||||
|
@ -1463,7 +1480,9 @@ nextIndex:
|
|||
Public SentHostData As Boolean = False
|
||||
Public Shared ReceivedInput As String = ""
|
||||
|
||||
'After the client has decided its next step, the host receives the information about this step, so it can now decide his own.
|
||||
Public Shared Sub ReceiveClientData(ByVal data As String)
|
||||
Logger.Debug("[Battle]: Received Client data")
|
||||
ReceivedInput = data
|
||||
|
||||
Dim s As Screen = Core.CurrentScreen
|
||||
|
@ -1481,6 +1500,7 @@ nextIndex:
|
|||
End If
|
||||
End Sub
|
||||
|
||||
'Sends some variables that let the client know the current state of the battle
|
||||
Public Sub SendEndRoundData()
|
||||
Dim lockData As String = "{}"
|
||||
Dim oppStep As Battle.RoundConst = Battle.GetOppStep(Me, Battle.OwnStep)
|
||||
|
@ -1495,7 +1515,8 @@ nextIndex:
|
|||
Dim d As String = lockData & "|" &
|
||||
OwnStatistics.ToString() & "|" & OppStatistics.ToString() & "|" &
|
||||
OwnPokemon.GetSaveData() & "|" & OppPokemon.GetSaveData() & "|" &
|
||||
"{" & CInt(FieldEffects.Weather).ToString() & "}"
|
||||
"{" & CInt(FieldEffects.Weather).ToString() & "}" & "|" &
|
||||
"{" & BattleCalculation.CanSwitch(Me, False).ToString & "}"
|
||||
|
||||
For Each p As Pokemon In Core.Player.Pokemons
|
||||
If d <> "" Then
|
||||
|
@ -1509,10 +1530,11 @@ nextIndex:
|
|||
End If
|
||||
d &= p.GetSaveData()
|
||||
Next
|
||||
|
||||
Logger.Debug("[Battle]: Sent End Round data")
|
||||
Core.ServersManager.ServerConnection.SendPackage(New Servers.Package(Servers.Package.PackageTypes.BattlePokemonData, Core.ServersManager.ID, Servers.Package.ProtocolTypes.TCP, {PartnerNetworkID.ToString(), d}.ToList()))
|
||||
End Sub
|
||||
|
||||
'Sends the "movie" to the client
|
||||
Public Sub SendHostQuery()
|
||||
Dim d As String = ""
|
||||
|
||||
|
@ -1533,6 +1555,7 @@ nextIndex:
|
|||
Next
|
||||
Me.TempPVPBattleQuery.Clear()
|
||||
|
||||
Logger.Debug("[Battle]: Sent Host Query")
|
||||
Core.ServersManager.ServerConnection.SendPackage(New Servers.Package(Servers.Package.PackageTypes.BattleHostData, Core.ServersManager.ID, Servers.Package.ProtocolTypes.TCP, {PartnerNetworkID.ToString(), d}.ToList()))
|
||||
SentHostData = True
|
||||
End Sub
|
||||
|
@ -1545,7 +1568,7 @@ nextIndex:
|
|||
''' Use this to download the sprites for the players.
|
||||
''' </summary>
|
||||
Private Sub DownloadOnlineSprites()
|
||||
If Core.Player.IsGamejoltSave = True Then
|
||||
If Core.Player.IsGameJoltSave = True Then
|
||||
Dim t As New Threading.Thread(AddressOf DownloadSprites)
|
||||
t.IsBackground = True
|
||||
t.Start()
|
||||
|
@ -1578,4 +1601,4 @@ nextIndex:
|
|||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
End Namespace
|
|
@ -8,6 +8,7 @@
|
|||
Hailstorm = 4
|
||||
Foggy = 5
|
||||
Snow = 6
|
||||
Underwater = 7
|
||||
End Enum
|
||||
|
||||
Public Shared Function GetWorldWeather(ByVal FieldWeather As BattleWeather.WeatherTypes) As World.Weathers
|
||||
|
@ -26,6 +27,8 @@
|
|||
Return World.Weathers.Sunny
|
||||
Case WeatherTypes.Snow
|
||||
Return World.Weathers.Snow
|
||||
Case WeatherTypes.Underwater
|
||||
Return World.Weathers.Underwater
|
||||
Case Else
|
||||
Return World.Weathers.Clear
|
||||
End Select
|
||||
|
@ -47,6 +50,8 @@
|
|||
Return WeatherTypes.Sandstorm
|
||||
Case World.Weathers.Sunny
|
||||
Return WeatherTypes.Sunny
|
||||
Case World.Weathers.Underwater
|
||||
Return WeatherTypes.Underwater
|
||||
Case Else
|
||||
Return WeatherTypes.Clear
|
||||
End Select
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
Public Class FieldEffects
|
||||
|
||||
'Client side stuff in PvP
|
||||
Public ClientCanSwitch As Boolean = True 'Calculated by the host, sent to the client
|
||||
|
||||
'Own stuff
|
||||
Public OwnSleepTurns As Integer = 0 'Sleep turns
|
||||
Public OwnTruantRound As Integer = 0 'Truant move counter
|
||||
|
@ -84,7 +87,7 @@
|
|||
Public OwnInfestation As Integer = 0
|
||||
Public OwnUsedMoves As New List(Of Integer)
|
||||
Public OwnMagicCoat As Integer = 0
|
||||
Public OwnLostItem As Item = Nothing
|
||||
Public OwnConsumedItem As Item = Nothing
|
||||
Public OwnPursuit As Boolean = False
|
||||
Public OwnMegaEvolved As Boolean = False
|
||||
Public OwnRoostUsed As Boolean = False 'If roost got used, this is true and will get set false and revert types at the end of a turn.
|
||||
|
@ -194,7 +197,7 @@
|
|||
Public OppPokemonDamagedThisTurn As Boolean = False
|
||||
Public OppPokemonDamagedLastTurn As Boolean = False
|
||||
Public OppMagicCoat As Integer = 0
|
||||
Public OppLostItem As Item = Nothing
|
||||
Public OppConsumedItem As Item = Nothing
|
||||
Public OppPursuit As Boolean = False
|
||||
Public OppMegaEvolved As Boolean = False
|
||||
Public OppRoostUsed As Boolean = False
|
||||
|
|
|
@ -668,6 +668,8 @@
|
|||
Return {OppLeft, OppCenter, OppRight}.ToList()
|
||||
Case Attack.Targets.OneAlly, Attack.Targets.AllAllies
|
||||
Return {OwnCenter, OwnRight}.ToList()
|
||||
Case Attack.Targets.AllOwn
|
||||
Return {OwnCenter, OwnRight, OwnLeft}.ToList()
|
||||
End Select
|
||||
Case Targets.OwnCenter
|
||||
Select Case AttackTarget
|
||||
|
@ -677,6 +679,8 @@
|
|||
Return {OppLeft, OppCenter, OppRight}.ToList()
|
||||
Case Attack.Targets.OneAdjacentAlly, Attack.Targets.OneAlly, Attack.Targets.AllAdjacentAllies, Attack.Targets.AllAllies
|
||||
Return {OwnLeft, OwnRight}.ToList()
|
||||
Case Attack.Targets.AllOwn
|
||||
Return {OwnCenter, OwnRight, OwnLeft}.ToList()
|
||||
End Select
|
||||
Case Targets.OwnRight
|
||||
Select Case AttackTarget
|
||||
|
@ -692,6 +696,8 @@
|
|||
Return {OppLeft, OppCenter, OppRight}.ToList()
|
||||
Case Attack.Targets.OneAlly, Attack.Targets.AllAllies
|
||||
Return {OwnLeft, OwnCenter}.ToList()
|
||||
Case Attack.Targets.AllOwn
|
||||
Return {OwnCenter, OwnRight, OwnLeft}.ToList()
|
||||
End Select
|
||||
Case Targets.OppLeft
|
||||
Select Case AttackTarget
|
||||
|
@ -707,6 +713,8 @@
|
|||
Return {OwnLeft, OwnCenter, OwnRight}.ToList()
|
||||
Case Attack.Targets.OneAlly, Attack.Targets.AllAllies
|
||||
Return {OppCenter, OppRight}.ToList()
|
||||
Case Attack.Targets.AllOwn
|
||||
Return {OppCenter, OppRight, OppLeft}.ToList()
|
||||
End Select
|
||||
Case Targets.OppCenter
|
||||
Select Case AttackTarget
|
||||
|
@ -716,6 +724,8 @@
|
|||
Return {OwnLeft, OwnCenter, OwnRight}.ToList()
|
||||
Case Attack.Targets.OneAdjacentAlly, Attack.Targets.OneAlly, Attack.Targets.AllAdjacentAllies, Attack.Targets.AllAllies
|
||||
Return {OppLeft, OppRight}.ToList()
|
||||
Case Attack.Targets.AllOwn
|
||||
Return {OppCenter, OppRight, OppLeft}.ToList()
|
||||
End Select
|
||||
Case Targets.OppRight
|
||||
Select Case AttackTarget
|
||||
|
@ -731,6 +741,8 @@
|
|||
Return {OwnLeft, OwnCenter, OwnRight}.ToList()
|
||||
Case Attack.Targets.OneAlly, Attack.Targets.AllAllies
|
||||
Return {OppLeft, OppCenter}.ToList()
|
||||
Case Attack.Targets.AllOwn
|
||||
Return {OppCenter, OppRight, OppLeft}.ToList()
|
||||
End Select
|
||||
End Select
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
window = GameInstance.Window
|
||||
|
||||
If CommandLineArgHandler.ForceGraphics = True Then
|
||||
window.Title = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE & " (FORCED GRAPHICS)"
|
||||
window.Title = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & " (FORCED GRAPHICS)"
|
||||
Else
|
||||
window.Title = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE
|
||||
window.Title = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION
|
||||
End If
|
||||
|
||||
GameOptions = New GameOptions()
|
||||
|
@ -180,7 +180,7 @@
|
|||
CurrentScreen.Draw()
|
||||
|
||||
If Not Core.Player Is Nothing Then
|
||||
If Core.Player.IsGamejoltSave = True Then
|
||||
If Core.Player.IsGameJoltSave = True Then
|
||||
GameJolt.Emblem.DrawNewEmblems()
|
||||
End If
|
||||
Core.Player.DrawLevelUp()
|
||||
|
|
|
@ -10,12 +10,12 @@ Public Class GameController
|
|||
''' <summary>
|
||||
''' The current version of the game.
|
||||
''' </summary>
|
||||
Public Const GAMEVERSION As String = "0.54"
|
||||
Public Const GAMEVERSION As String = "0.54.1"
|
||||
|
||||
''' <summary>
|
||||
''' The number of released iterations of the game.
|
||||
''' </summary>
|
||||
Public Const RELEASEVERSION As String = "90"
|
||||
Public Const RELEASEVERSION As String = "92"
|
||||
|
||||
''' <summary>
|
||||
''' The development stage the game is in.
|
||||
|
@ -48,6 +48,7 @@ Public Class GameController
|
|||
|
||||
Public Graphics As GraphicsDeviceManager
|
||||
Public FPSMonitor As FPSMonitor
|
||||
Public Shared UpdateChecked As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
Graphics = New GraphicsDeviceManager(Me)
|
||||
|
|
|
@ -13,18 +13,20 @@
|
|||
Public WindowSize As New Vector2(1200, 680)
|
||||
Public ForceMusic As Boolean = False
|
||||
Public MaxOffsetLevel As Integer = 0
|
||||
Public UpdateDisabled As Boolean = False
|
||||
Public Extras As New List(Of String)
|
||||
|
||||
Public Sub LoadOptions()
|
||||
KeyBindings.CreateKeySave(False)
|
||||
If System.IO.Directory.Exists(GameController.GamePath & "\Save\") = False Then
|
||||
System.IO.Directory.CreateDirectory(GameController.GamePath & "\Save\")
|
||||
If Directory.Exists(GameController.GamePath & "\Save\") = False Then
|
||||
Directory.CreateDirectory(GameController.GamePath & "\Save\")
|
||||
End If
|
||||
|
||||
If System.IO.File.Exists(GameController.GamePath & "\Save\options.dat") = False Then
|
||||
If File.Exists(GameController.GamePath & "\Save\options.dat") = False Then
|
||||
CreateOptions()
|
||||
End If
|
||||
|
||||
Dim Data() As String = System.IO.File.ReadAllText(GameController.GamePath & "\Save\options.dat").SplitAtNewline()
|
||||
Dim Data() As String = File.ReadAllText(GameController.GamePath & "\Save\options.dat").SplitAtNewline()
|
||||
|
||||
Dim LanguageFound As Boolean = False
|
||||
|
||||
|
@ -67,7 +69,7 @@
|
|||
Me.ContentPackNames = value.Split(CChar(","))
|
||||
If Me.ContentPackNames.Count > 0 Then
|
||||
For Each c As String In Me.ContentPackNames
|
||||
If System.IO.Directory.Exists(GameController.GamePath & "\ContentPacks\" & c) = False Then
|
||||
If Directory.Exists(GameController.GamePath & "\ContentPacks\" & c) = False Then
|
||||
Dim cList As List(Of String) = Me.ContentPackNames.ToList()
|
||||
cList.Remove(c)
|
||||
Me.ContentPackNames = cList.ToArray()
|
||||
|
@ -101,6 +103,12 @@
|
|||
Me.ForceMusic = CBool(value)
|
||||
Case "maxoffsetlevel"
|
||||
Me.MaxOffsetLevel = CInt(value)
|
||||
Case "extras"
|
||||
If Not String.IsNullOrEmpty(value) Then
|
||||
Me.Extras = value.Split(";"c).ToList()
|
||||
End If
|
||||
Case "updatedisabled"
|
||||
UpdateDisabled = CBool(value)
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
|
@ -143,9 +151,11 @@
|
|||
"ContentPacks|" & ContentPackString & vbNewLine &
|
||||
"WindowSize|" & Core.windowSize.Width.ToString() & "," & Core.windowSize.Height.ToString().Replace(GameController.DecSeparator, ".") & vbNewLine &
|
||||
"ForceMusic|" & Me.ForceMusic.ToNumberString() & vbNewLine &
|
||||
"MaxOffsetLevel|" & Me.MaxOffsetLevel.ToString()
|
||||
"MaxOffsetLevel|" & Me.MaxOffsetLevel.ToString() & vbNewLine &
|
||||
"UpdateDisabled|" & Me.UpdateDisabled.ToNumberString() & vbNewLine &
|
||||
"Extras|" & String.Join(";", Me.Extras)
|
||||
|
||||
System.IO.File.WriteAllText(GameController.GamePath & "\Save\options.dat", Data)
|
||||
File.WriteAllText(GameController.GamePath & "\Save\options.dat", Data)
|
||||
KeyBindings.SaveKeys()
|
||||
|
||||
Logger.Debug("---Options saved---")
|
||||
|
@ -172,9 +182,11 @@
|
|||
"ContentPacks|" & vbNewLine &
|
||||
"WindowSize|1200,680" & vbNewLine &
|
||||
"ForceMusic|0" & vbNewLine &
|
||||
"MaxOffsetLevel|0"
|
||||
"MaxOffsetLevel|0" & vbNewLine &
|
||||
"UpdateDisabled|0" & vbNewLine &
|
||||
"Extras|Backup Save"
|
||||
|
||||
System.IO.File.WriteAllText(GameController.GamePath & "\Save\options.dat", s)
|
||||
File.WriteAllText(GameController.GamePath & "\Save\options.dat", s)
|
||||
End Sub
|
||||
|
||||
End Class
|
|
@ -1,57 +1,57 @@
|
|||
Public Class MainGameFunctions
|
||||
|
||||
Public Shared Sub FunctionKeys()
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.ScreenshotKey) = True And Core.CurrentScreen.CanTakeScreenshot = True Then
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.GUIControlKey) = True Then
|
||||
Core.GameOptions.ShowGUI = Not Core.GameOptions.ShowGUI
|
||||
Core.GameOptions.SaveOptions()
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.ScreenshotKey) AndAlso Core.CurrentScreen.CanTakeScreenshot Then
|
||||
CaptureScreen()
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.FullScreenKey) = True Then
|
||||
If Core.CurrentScreen.CanGoFullscreen = True Then
|
||||
ToggleFullScreen()
|
||||
End If
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.DebugKey) = True Then
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.DebugKey) Then
|
||||
Core.GameOptions.ShowDebug += 1
|
||||
If Core.GameOptions.ShowDebug >= 2 Then
|
||||
Core.GameOptions.ShowDebug = 0
|
||||
End If
|
||||
Core.GameOptions.SaveOptions()
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.GUIControlKey) = True Then
|
||||
Core.GameOptions.ShowGUI = Not Core.GameOptions.ShowGUI
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.LightKey) Then
|
||||
Core.GameOptions.LightingEnabled = Not Core.GameOptions.LightingEnabled
|
||||
Core.GameOptions.SaveOptions()
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.MuteMusicKey) = True And Core.CurrentScreen.CanMuteMusic = True Then
|
||||
|
||||
If Core.GameOptions.LightingEnabled Then
|
||||
Core.GameMessage.ShowMessage(Localization.GetString("game_message_lighting_on", "Lighting Enabled"), 12, FontManager.MainFont, Color.White)
|
||||
Else
|
||||
Core.GameMessage.ShowMessage(Localization.GetString("game_message_lighting_off", "Lighting Disabled"), 12, FontManager.MainFont, Color.White)
|
||||
End If
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.FullScreenKey) AndAlso Core.CurrentScreen.CanGoFullscreen Then
|
||||
ToggleFullScreen()
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.MuteMusicKey) AndAlso Core.CurrentScreen.CanMuteMusic Then
|
||||
MusicManager.Mute(Not MediaPlayer.IsMuted)
|
||||
SoundManager.Mute(MediaPlayer.IsMuted)
|
||||
Core.GameOptions.SaveOptions()
|
||||
Core.CurrentScreen.ToggledMute()
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(KeyBindings.LightKey) = True Then
|
||||
Core.GameOptions.LightingEnabled = Not Core.GameOptions.LightingEnabled
|
||||
End If
|
||||
|
||||
If KeyBoardHandler.KeyDown(KeyBindings.DebugKey) = True Then
|
||||
If KeyBoardHandler.KeyPressed(Keys.F) = True Then
|
||||
If KeyBoardHandler.KeyPressed(Keys.F) Then
|
||||
TextureManager.TextureList.Clear()
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(Keys.S) = True Then
|
||||
Core.GameMessage.ShowMessage(Localization.GetString("game_message_debug_texture_list_clear", "Texture list have cleared"), 12, FontManager.MainFont, Color.White)
|
||||
ElseIf KeyBoardHandler.KeyPressed(Keys.S) Then
|
||||
Core.SetWindowSize(New Vector2(1200, 680))
|
||||
ElseIf KeyBoardHandler.KeyPressed(Keys.L) Then
|
||||
Logger.DisplayLog = Not Logger.DisplayLog
|
||||
ElseIf KeyBoardHandler.KeyPressed(Keys.B) Then
|
||||
Entity.drawViewBox = Not Entity.drawViewBox
|
||||
End If
|
||||
End If
|
||||
|
||||
If ControllerHandler.ButtonPressed(Buttons.Back, True) = True Then
|
||||
Core.GameOptions.GamePadEnabled = Not Core.GameOptions.GamePadEnabled
|
||||
If Core.GameOptions.GamePadEnabled = True Then
|
||||
If Core.GameOptions.GamePadEnabled Then
|
||||
Core.GameMessage.ShowMessage("Enabled XBOX 360 GamePad support.", 12, FontManager.MainFont, Color.White)
|
||||
Else
|
||||
Core.GameMessage.ShowMessage("Disabled XBOX 360 GamePad support.", 12, FontManager.MainFont, Color.White)
|
||||
End If
|
||||
Core.GameOptions.SaveOptions()
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(Keys.L) = True And KeyBoardHandler.KeyDown(KeyBindings.DebugKey) = True Then
|
||||
Logger.DisplayLog = Not Logger.DisplayLog
|
||||
End If
|
||||
If KeyBoardHandler.KeyPressed(Keys.B) = True And KeyBoardHandler.KeyDown(KeyBindings.DebugKey) = True Then
|
||||
Entity.drawViewBox = Not Entity.drawViewBox
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Sub CaptureScreen()
|
||||
|
@ -83,17 +83,17 @@
|
|||
fileName = .Year & "-" & month & "-" & day & "_" & hour & "." & minute & "." & second & ".png"
|
||||
End With
|
||||
|
||||
If System.IO.Directory.Exists(GameController.GamePath & "\screenshots\") = False Then
|
||||
System.IO.Directory.CreateDirectory(GameController.GamePath & "\screenshots\")
|
||||
If Directory.Exists(GameController.GamePath & "\screenshots\") = False Then
|
||||
Directory.CreateDirectory(GameController.GamePath & "\screenshots\")
|
||||
End If
|
||||
|
||||
If Core.GraphicsManager.IsFullScreen = False Then
|
||||
Dim b As New System.Drawing.Bitmap(Core.windowSize.Width, Core.windowSize.Height)
|
||||
Using g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(b)
|
||||
g.CopyFromScreen(Core.window.ClientBounds.X, Core.window.ClientBounds.Y, 0, 0, New System.Drawing.Size(b.Width, b.Height))
|
||||
Dim b As New Drawing.Bitmap(Core.windowSize.Width, Core.windowSize.Height)
|
||||
Using g As Drawing.Graphics = Drawing.Graphics.FromImage(b)
|
||||
g.CopyFromScreen(Core.window.ClientBounds.X, Core.window.ClientBounds.Y, 0, 0, New Drawing.Size(b.Width, b.Height))
|
||||
End Using
|
||||
|
||||
b.Save(GameController.GamePath & "\screenshots\" & fileName, System.Drawing.Imaging.ImageFormat.Png)
|
||||
b.Save(GameController.GamePath & "\screenshots\" & fileName, Drawing.Imaging.ImageFormat.Png)
|
||||
Else
|
||||
Dim screenshot As New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height, False, SurfaceFormat.Color, DepthFormat.Depth24Stencil8)
|
||||
Core.GraphicsDevice.SetRenderTarget(screenshot)
|
||||
|
@ -102,7 +102,7 @@
|
|||
|
||||
Core.GraphicsDevice.SetRenderTarget(Nothing)
|
||||
|
||||
Dim stream As System.IO.Stream = System.IO.File.OpenWrite(GameController.GamePath & "\screenshots\" & fileName)
|
||||
Dim stream As Stream = File.OpenWrite(GameController.GamePath & "\screenshots\" & fileName)
|
||||
screenshot.SaveAsPng(stream, Core.windowSize.Width, Core.windowSize.Height)
|
||||
stream.Dispose()
|
||||
End If
|
||||
|
@ -116,11 +116,21 @@
|
|||
|
||||
Private Shared Sub ToggleFullScreen()
|
||||
If Core.GraphicsManager.IsFullScreen = False Then
|
||||
Core.GraphicsManager.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
|
||||
Core.GraphicsManager.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
|
||||
Core.windowSize = New Rectangle(0, 0, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height)
|
||||
' MonoGame Bug > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width != System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
|
||||
' MonoGame Bug > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height != System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
|
||||
' Temp Fix just in case someone else face this as well.
|
||||
If GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width <> Windows.Forms.Screen.PrimaryScreen.Bounds.Width OrElse
|
||||
GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height <> Windows.Forms.Screen.PrimaryScreen.Bounds.Height Then
|
||||
Core.GraphicsManager.PreferredBackBufferWidth = Windows.Forms.Screen.PrimaryScreen.Bounds.Width
|
||||
Core.GraphicsManager.PreferredBackBufferHeight = Windows.Forms.Screen.PrimaryScreen.Bounds.Height
|
||||
Core.windowSize = New Rectangle(0, 0, Windows.Forms.Screen.PrimaryScreen.Bounds.Width, Windows.Forms.Screen.PrimaryScreen.Bounds.Height)
|
||||
Else
|
||||
Core.GraphicsManager.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
|
||||
Core.GraphicsManager.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
|
||||
Core.windowSize = New Rectangle(0, 0, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height)
|
||||
End If
|
||||
|
||||
System.Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
|
||||
Core.GraphicsManager.ToggleFullScreen()
|
||||
|
||||
|
@ -130,7 +140,7 @@
|
|||
Core.GraphicsManager.PreferredBackBufferHeight = 680
|
||||
Core.windowSize = New Rectangle(0, 0, 1200, 680)
|
||||
|
||||
System.Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
|
||||
Core.GraphicsManager.ToggleFullScreen()
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Module Program
|
|||
Logger.Debug("---Start game---")
|
||||
|
||||
Using Game As New GameController()
|
||||
If GameController.IS_DEBUG_ACTIVE = True And Debugger.IsAttached = True Then
|
||||
If GameController.IS_DEBUG_ACTIVE And Debugger.IsAttached Then
|
||||
Game.Run()
|
||||
Else
|
||||
Try
|
||||
|
@ -41,4 +41,4 @@ Module Program
|
|||
|
||||
End Module
|
||||
|
||||
#End If
|
||||
#End If
|
|
@ -0,0 +1 @@
|
|||
0.54.1a
|
|
@ -1,137 +1,202 @@
|
|||
Imports System.Collections
|
||||
Imports System.Reflection
|
||||
|
||||
''' <summary>
|
||||
''' A class to access the dump of variables of an object.
|
||||
''' </summary>
|
||||
Public Class ObjectDump
|
||||
|
||||
Private _dump As String = ""
|
||||
Private _nullReferenceError As Boolean = False
|
||||
Public ReadOnly Property Dump As String = ""
|
||||
|
||||
Public ReadOnly Property Dump() As String
|
||||
Get
|
||||
Return _dump
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NullReferenceError() As Boolean
|
||||
Get
|
||||
Return _nullReferenceError
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new instance of the ObjectDump class and performs a dump on the passed object.
|
||||
''' </summary>
|
||||
Public Sub New(ByVal obj As Object)
|
||||
CreateDump(obj)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a dump.
|
||||
''' </summary>
|
||||
''' <param name="obj">The object to create a dump from.</param>
|
||||
Private Sub CreateDump(ByVal obj As Object)
|
||||
If obj Is Nothing Then
|
||||
_nullReferenceError = True
|
||||
_dump = "Object reference not set to an instance of an object."
|
||||
Public Sub New(ByVal sender As Object)
|
||||
If sender Is Nothing Then
|
||||
Dump = "Object reference not set to an instance of an object."
|
||||
Else
|
||||
Dim t As Type = obj.GetType()
|
||||
Dim fields() As FieldInfo = sender.GetType().GetFields(BindingFlags.Public Or BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.Static)
|
||||
Dim properties() As PropertyInfo = sender.GetType().GetProperties(BindingFlags.Public Or BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.Static)
|
||||
|
||||
Dim fields As Reflection.FieldInfo() = t.GetFields(Reflection.BindingFlags.Public Or
|
||||
Reflection.BindingFlags.NonPublic Or
|
||||
Reflection.BindingFlags.Instance Or
|
||||
Reflection.BindingFlags.Static)
|
||||
Dump =
|
||||
"--------------------------------------------------" & vbNewLine &
|
||||
"Generated Fields:" & vbNewLine &
|
||||
"--------------------------------------------------" & vbNewLine
|
||||
|
||||
Dim dump As String = ""
|
||||
|
||||
For Each field As Reflection.FieldInfo In fields
|
||||
If dump <> "" Then
|
||||
dump &= vbNewLine
|
||||
For Each field As FieldInfo In fields
|
||||
If Dump <> "" Then
|
||||
Dump &= vbNewLine
|
||||
End If
|
||||
|
||||
Dim accessToken As String = ""
|
||||
Dim valueToken As String = "Nothing"
|
||||
Dim fieldToken As String = field.Name
|
||||
Dim typeToken As String = field.FieldType.Name
|
||||
Dim fieldAccessToken As String = ""
|
||||
Dim fieldNameToken As String = ""
|
||||
Dim fieldTypeToken As String = ""
|
||||
Dim fieldValueToken As String = ""
|
||||
|
||||
If field.IsPublic = True Then
|
||||
accessToken = "Public "
|
||||
End If
|
||||
If field.IsPrivate = True Then
|
||||
accessToken = "Private "
|
||||
End If
|
||||
If field.IsFamily = True Then
|
||||
accessToken = "Protected "
|
||||
End If
|
||||
If field.IsStatic = True Then
|
||||
accessToken &= "Shared "
|
||||
If field.IsPublic Then
|
||||
fieldAccessToken = "Public "
|
||||
ElseIf field.IsPrivate Then
|
||||
fieldAccessToken = "Private "
|
||||
ElseIf field.IsFamily Then
|
||||
fieldAccessToken = "Protected "
|
||||
End If
|
||||
|
||||
Dim valueObj As Object = field.GetValue(obj)
|
||||
If valueObj IsNot Nothing Then
|
||||
If typeToken.EndsWith("[]") = True Then
|
||||
'Type is array, ToString wont return maintainable material, so we get its content:
|
||||
valueToken = GetArrayDump(valueObj)
|
||||
ElseIf typeToken = "List`1" Then
|
||||
'Type is a list, ToString wont return maintainable material, so we get its content:
|
||||
valueToken = GetListDump(valueObj)
|
||||
typeToken = GetListTypeToken(valueObj)
|
||||
Else
|
||||
valueToken = valueObj.ToString()
|
||||
If field.IsStatic Then
|
||||
fieldAccessToken &= "Shared "
|
||||
End If
|
||||
|
||||
fieldNameToken = field.Name
|
||||
fieldTypeToken = field.FieldType.Name
|
||||
|
||||
If field.FieldType.IsArray Then
|
||||
fieldValueToken = DumpArray(field.GetValue(sender))
|
||||
ElseIf field.FieldType.IsGenericType Then
|
||||
If field.FieldType.Name = "List`1" Then
|
||||
fieldTypeToken = $"List(Of {field.FieldType.GetGenericArguments()(0).Name})"
|
||||
fieldValueToken = DumpGenericArray(field.GetValue(sender), "List`1")
|
||||
ElseIf field.FieldType.Name = "Dictionary`2" Then
|
||||
fieldTypeToken = $"Dictionary(Of {field.FieldType.GetGenericArguments()(0).Name}, {field.FieldType.GetGenericArguments()(1).Name})"
|
||||
fieldValueToken = DumpGenericArray(field.GetValue(sender), "Dictionary`2")
|
||||
End If
|
||||
ElseIf field.FieldType.Name = "Texture2D" Then
|
||||
fieldValueToken = DumpTexture2D(field.GetValue(sender))
|
||||
Else
|
||||
fieldValueToken = DumpObject(field.GetValue(sender))
|
||||
End If
|
||||
|
||||
dump &= " " & accessToken & fieldToken & " As " & typeToken & " = " & valueToken
|
||||
Dump &= fieldAccessToken & fieldNameToken & " As " & fieldTypeToken & " = " & fieldValueToken
|
||||
Next
|
||||
|
||||
_dump = dump
|
||||
Dump &= vbNewLine & vbNewLine &
|
||||
"--------------------------------------------------" & vbNewLine &
|
||||
"Generated Property:" & vbNewLine &
|
||||
"--------------------------------------------------" & vbNewLine
|
||||
|
||||
For Each [property] As PropertyInfo In properties
|
||||
If [property].CanRead Then
|
||||
If Dump <> "" Then
|
||||
Dump &= vbNewLine
|
||||
End If
|
||||
|
||||
Dim propertyNameToken As String = ""
|
||||
Dim propertyTypeToken As String = ""
|
||||
Dim propertyValueToken As String = ""
|
||||
|
||||
propertyNameToken = [property].Name
|
||||
propertyTypeToken = [property].PropertyType.Name
|
||||
|
||||
If [property].PropertyType.IsArray Then
|
||||
propertyValueToken = DumpArray([property].GetValue(sender))
|
||||
ElseIf [property].PropertyType.IsGenericType Then
|
||||
If [property].PropertyType.Name = "List`1" Then
|
||||
propertyTypeToken = $"List(Of {[property].PropertyType.GetGenericArguments()(0).Name})"
|
||||
propertyValueToken = DumpGenericArray([property].GetValue(sender), "List`1")
|
||||
ElseIf [property].PropertyType.Name = "Dictionary`2" Then
|
||||
propertyTypeToken = $"Dictionary(Of {[property].PropertyType.GetGenericArguments()(0).Name}, {[property].PropertyType.GetGenericArguments()(1).Name})"
|
||||
propertyValueToken = DumpGenericArray([property].GetValue(sender), "Dictionary`2")
|
||||
End If
|
||||
ElseIf [property].PropertyType.Name = "Texture2D" Then
|
||||
propertyValueToken = DumpTexture2D([property].GetValue(sender))
|
||||
Else
|
||||
propertyValueToken = DumpObject([property].GetValue(sender))
|
||||
End If
|
||||
|
||||
Dump &= "Property " & propertyNameToken & " As " & propertyTypeToken & " = " & propertyValueToken
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GetArrayDump(ByVal valueObj As Object) As String
|
||||
Dim listDump As String = ""
|
||||
|
||||
Dim valueArray As Array = CType(valueObj, Array)
|
||||
For i = 0 To valueArray.Length - 1
|
||||
If listDump <> "" Then
|
||||
listDump &= ", "
|
||||
End If
|
||||
If valueArray.GetValue(i) Is Nothing Then
|
||||
listDump &= "Nothing"
|
||||
Private Function DumpArray(ByVal obj As Object) As String
|
||||
Try
|
||||
If obj IsNot Nothing Then
|
||||
Dim listValue As Array = CType(obj, Array)
|
||||
If listValue.Length = 0 Then
|
||||
Return "{}"
|
||||
Else
|
||||
Return "{" & String.Join(", ", listValue.Cast(Of Object).Select(Function(a)
|
||||
Return a.ToString()
|
||||
End Function).ToArray()) & "}"
|
||||
End If
|
||||
Else
|
||||
listDump &= valueArray.GetValue(i).ToString()
|
||||
Return "Nothing"
|
||||
End If
|
||||
Next
|
||||
listDump = "{" & listDump & "}"
|
||||
Return listDump
|
||||
Catch ex As Exception
|
||||
Return "Array too complex to dump."
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetListDump(ByVal valueObj As Object) As String
|
||||
'Grab the type of the list (List`1):
|
||||
Dim listType As Type = Type.GetType(valueObj.ToString())
|
||||
'Get the ToArray method of the list:
|
||||
Dim method As Reflection.MethodInfo = listType.GetMethod("ToArray", Reflection.BindingFlags.Public Or Reflection.BindingFlags.Instance)
|
||||
Private Function DumpGenericArray(ByVal obj As Object, ByVal genericType As String) As String
|
||||
Try
|
||||
If obj IsNot Nothing Then
|
||||
If genericType = "List`1" Then
|
||||
Dim listValue As Array = CType(obj.GetType().GetMethod("ToArray").Invoke(obj, Nothing), Array)
|
||||
If listValue.Length = 0 Then
|
||||
Return "{}"
|
||||
Else
|
||||
Return "{" & String.Join(", ", listValue.Cast(Of Object).Select(Function(a)
|
||||
Return a.ToString()
|
||||
End Function).ToArray()) & "}"
|
||||
End If
|
||||
ElseIf genericType = "Dictionary`2" Then
|
||||
Dim dictionaryKeys As Array = CType(obj.GetType().GetProperty("Keys").GetValue(obj), IEnumerable).Cast(Of Object).ToArray()
|
||||
Dim dictonaryValues As Array = CType(obj.GetType().GetProperty("Values").GetValue(obj), IEnumerable).Cast(Of Object).ToArray()
|
||||
|
||||
Dim listDump As String = ""
|
||||
|
||||
'Create an array from the list by invoking its ToArray method. The array is not a generic type anymore, which means we can iterate through it:
|
||||
Dim valueArray As Array = CType(method.Invoke(valueObj, {}), Array)
|
||||
For i = 0 To valueArray.Length - 1
|
||||
If listDump <> "" Then
|
||||
listDump &= ", "
|
||||
End If
|
||||
If valueArray.GetValue(i) Is Nothing Then
|
||||
listDump &= "Nothing"
|
||||
If dictionaryKeys.Length = 0 OrElse dictonaryValues.Length = 0 Then
|
||||
Return "{}"
|
||||
Else
|
||||
Dim result As String = ""
|
||||
For i As Integer = 0 To dictionaryKeys.Length - 1
|
||||
If i > 0 Then
|
||||
result &= ", "
|
||||
End If
|
||||
result &= "{" & dictionaryKeys.Cast(Of Object)()(i).ToString() & ", " & dictonaryValues.Cast(Of Object)()(i).ToString() & "}"
|
||||
Next
|
||||
Return "{" & result & "}"
|
||||
End If
|
||||
Else
|
||||
Return "Generic Type too complex to dump."
|
||||
End If
|
||||
Else
|
||||
listDump &= valueArray.GetValue(i).ToString()
|
||||
Return "Nothing"
|
||||
End If
|
||||
Next
|
||||
listDump = "{" & listDump & "}"
|
||||
Return listDump
|
||||
Catch ex As Exception
|
||||
Return "Generic Type too complex to dump."
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetListTypeToken(ByVal valueObj As Object) As String
|
||||
Dim listType As Type = Type.GetType(valueObj.ToString())
|
||||
Return "List<" & listType.GetGenericArguments()(0).Name & ">[]"
|
||||
Private Function DumpTexture2D(ByVal obj As Object) As String
|
||||
Try
|
||||
If obj IsNot Nothing Then
|
||||
Dim textureName As String = ""
|
||||
Dim width As Integer = Convert.ToInt32(obj.GetType().GetProperty("Width").GetValue(obj))
|
||||
Dim height As Integer = Convert.ToInt32(obj.GetType().GetProperty("Height").GetValue(obj))
|
||||
|
||||
If String.IsNullOrEmpty((obj.GetType().GetProperty("Name").GetValue(obj)?.ToString())) Then
|
||||
textureName = """"""
|
||||
Else
|
||||
textureName = obj.GetType().GetProperty("Name").GetValue(obj)?.ToString()
|
||||
End If
|
||||
|
||||
Return $"{{Name = {textureName}, Width = {width}, Height = {height}}}"
|
||||
Else
|
||||
Return "Nothing"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return "Texture2D too complex to dump."
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Private Function DumpObject(ByVal obj As Object) As String
|
||||
Try
|
||||
If obj IsNot Nothing Then
|
||||
If String.IsNullOrEmpty(obj.ToString()) Then
|
||||
Return """"""
|
||||
Else
|
||||
Return obj.ToString()
|
||||
End If
|
||||
Else
|
||||
Return "Nothing"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return "Object too complex to dump."
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
|
@ -164,9 +164,9 @@ Public Class Animation
|
|||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Stopps the animation and returns to start.
|
||||
''' Stops the animation and returns to start.
|
||||
''' </summary>
|
||||
Public Sub Stopp()
|
||||
Public Sub [Stop]()
|
||||
_Running = PlayMode.Stopped
|
||||
CurrentRow = StartRow
|
||||
CurrentColumn = StartColumn
|
||||
|
|
|
@ -85,10 +85,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<Target Name="RunContentBuilder">
|
||||
<!-- RUN CUSTOM MGCB_Tool, MAY NOT WORK IN OTHER PLATFORM, USE AT YOUR OWN DISCRETION!
|
||||
<Exec Condition="'$(OS)' == 'Windows_NT'" Command=""$(ProjectDir)..\2.5DHeroContent\MGCB_Tool.exe" $(Platform)" />
|
||||
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="$(MonoExe) "$(ProjectDir)..\2.5DHeroContent\MGCB_Tool.exe" $(Platform)" />
|
||||
-->
|
||||
<Exec Condition="'$(OS)' == 'Windows_NT'" Command=""$(ProjectDir)..\2.5DHeroContent\MGCB_Tool.exe"" />
|
||||
<Exec Condition=" '%(ContentReferences.FullPath)' != '' " Command="$(MonoGameContentBuilderCmd) /@:"%(ContentReferences.FullPath)" $(Header)"
|
||||
WorkingDirectory="%(ContentReferences.RootDir)%(ContentReferences.Directory)" />
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<!--
|
||||
MonoGame - Copyright (C) The MonoGame Team
|
||||
This file is subject to the terms and conditions defined in
|
||||
file 'LICENSE.txt', which is part of this source code package.
|
||||
-->
|
||||
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!-- Add MonoGameContentReference to item type selection in Visual Studio -->
|
||||
<ItemGroup>
|
||||
<AvailableItemName Include="MonoGameContentReference" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- This disables the IDE feature that skips executing msbuild in some build situations. -->
|
||||
<PropertyGroup>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="Prepare">
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
<ParentOutputDir Condition=" '$(ParentOutputDir)' == '' " >$(ProjectDir)..\2.5DHeroContent\bin\$(MonoGamePlatform)</ParentOutputDir>
|
||||
<ParentIntermediateDir Condition=" '$(ParentIntermediateDir)' == '' " >$(ProjectDir)..\2.5DHeroContent\obj\$(MonoGamePlatform)</ParentIntermediateDir>
|
||||
|
||||
|
||||
<!-- El Capitan Support -->
|
||||
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And Exists ('/Library/Frameworks/Mono.framework/Versions/Current/bin/mono') ">/Library/Frameworks/Mono.framework/Versions/Current/bin/mono</MonoExe>
|
||||
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And Exists ('/usr/local/bin/mono') ">/usr/local/bin/mono</MonoExe>
|
||||
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And Exists ('/usr/bin/mono') ">/usr/bin/mono</MonoExe>
|
||||
<MonoExe Condition=" '$(OS)' != 'Windows_NT' And '$(MonoExe)' == '' ">mono</MonoExe>
|
||||
|
||||
<MonoGameContentBuilderExe Condition="'$(MonoGameContentBuilderExe)' == ''">$(MSBuildExtensionsPath)\MonoGame\v3.0\Tools\MGCB.exe</MonoGameContentBuilderExe>
|
||||
<MonoGameContentBuilderCmd>"$(MonoGameContentBuilderExe)"</MonoGameContentBuilderCmd>
|
||||
<MonoGameContentBuilderCmd Condition=" '$(OS)' != 'Windows_NT' ">$(MonoExe) $(MonoGameContentBuilderCmd)</MonoGameContentBuilderCmd>
|
||||
|
||||
<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'MacOSX' Or '$(MonoGamePlatform)' == 'iOS'">Resources\</PlatformResourcePrefix>
|
||||
<PlatformResourcePrefix Condition="'$(MonoGamePlatform)' == 'Android'">Assets\</PlatformResourcePrefix>
|
||||
<PlatformResourcePrefix Condition="'$(PlatformResourcePrefix)' == ''"></PlatformResourcePrefix>
|
||||
|
||||
<Header>/platform:$(MonoGamePlatform) /outputDir:"$(ParentOutputDir)" /intermediateDir:"$(ParentIntermediateDir)" /quiet</Header>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Get all Mono Game Content References and store them in a list -->
|
||||
<!-- We do this here so we are compatible with xbuild -->
|
||||
<ItemGroup>
|
||||
<ContentReferences Include="@(MonoGameContentReference)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Error Text="The MonoGamePlatform property was not defined in the project! It must be set to Windows, WindowsGL, WindowsStoreApp, WindowsPhone8, MacOSX, iOS, Linux, DesktopGL, RaspberryPi, Android, NativeClient, PlayStation4, or PlayStationMobile."
|
||||
Condition=" '$(MonoGamePlatform)' != 'Windows' And
|
||||
'$(MonoGamePlatform)' != 'iOS' And
|
||||
'$(MonoGamePlatform)' != 'Android' And
|
||||
'$(MonoGamePlatform)' != 'Linux' And
|
||||
'$(MonoGamePlatform)' != 'DesktopGL' And
|
||||
'$(MonoGamePlatform)' != 'MacOSX' And
|
||||
'$(MonoGamePlatform)' != 'WindowsStoreApp' And
|
||||
'$(MonoGamePlatform)' != 'NativeClient' And
|
||||
'$(MonoGamePlatform)' != 'PlayStationMobile' And
|
||||
'$(MonoGamePlatform)' != 'WindowsPhone8' And
|
||||
'$(MonoGamePlatform)' != 'RaspberryPi' And
|
||||
'$(MonoGamePlatform)' != 'PlayStation4' And
|
||||
'$(MonoGamePlatform)' != 'PSVita' And
|
||||
'$(MonoGamePlatform)' != 'XboxOne' And
|
||||
'$(MonoGamePlatform)' != 'WindowsGL'" />
|
||||
|
||||
<Error
|
||||
Text="The MonoGame content builder executable could not be located at '$(MonoGameContentBuilderExe)'!"
|
||||
Condition="!Exists('$(MonoGameContentBuilderExe)')"
|
||||
/>
|
||||
|
||||
<Warning
|
||||
Text="No Content References Found. Please make sure your .mgcb file has a build action of MonoGameContentReference"
|
||||
Condition=" '%(ContentReferences.FullPath)' == '' "
|
||||
/>
|
||||
|
||||
<MakeDir Directories="$(ParentIntermediateDir)"/>
|
||||
<MakeDir Directories="$(ParentOutputDir)"/>
|
||||
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildDependsOn>
|
||||
BuildContent;
|
||||
$(BuildDependsOn);
|
||||
</BuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="RunContentBuilder">
|
||||
<Exec Condition=" '%(ContentReferences.FullPath)' != '' " Command="$(MonoGameContentBuilderCmd) /@:"%(ContentReferences.FullPath)" $(Header)"
|
||||
WorkingDirectory="%(ContentReferences.RootDir)%(ContentReferences.Directory)" />
|
||||
|
||||
<CreateItem Include="$(ParentOutputDir)\**\*.*">
|
||||
<Output TaskParameter="Include" ItemName="ExtraContent" />
|
||||
</CreateItem>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildContent" DependsOnTargets="Prepare;RunContentBuilder"
|
||||
Outputs="%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension)">
|
||||
<CreateItem Include="$(ParentOutputDir)\%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension)"
|
||||
AdditionalMetadata="Link=$(PlatformResourcePrefix)$(ContentRootDirectory)\%(ExtraContent.RecursiveDir)%(ExtraContent.Filename)%(ExtraContent.Extension);CopyToOutputDirectory=PreserveNewest"
|
||||
Condition="'%(ExtraContent.Filename)' != ''">
|
||||
<Output TaskParameter="Include" ItemName="Content" Condition="'$(MonoGamePlatform)' != 'Android' And '$(MonoGamePlatform)' != 'iOS' And '$(MonoGamePlatform)' != 'MacOSX'" />
|
||||
<Output TaskParameter="Include" ItemName="BundleResource" Condition="'$(MonoGamePlatform)' == 'MacOSX' Or '$(MonoGamePlatform)' == 'iOS'" />
|
||||
<Output TaskParameter="Include" ItemName="AndroidAsset" Condition="'$(MonoGamePlatform)' == 'Android'" />
|
||||
</CreateItem>
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -31,4 +31,4 @@ Imports System.Runtime.InteropServices
|
|||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
<Assembly: AssemblyVersion("0.5.4.0")>
|
||||
<Assembly: AssemblyVersion("0.54.1")>
|
|
@ -860,6 +860,21 @@ Public Class OverworldCamera
|
|||
End If
|
||||
End Select
|
||||
|
||||
'DebugFeature:
|
||||
If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||
If KeyBoardHandler.KeyDown(Keys.LeftAlt) Then
|
||||
If KeyBoardHandler.KeyDown(KeyBindings.ForwardMoveKey) Then
|
||||
v.X = 0F
|
||||
v.Y = 1.0F
|
||||
v.Z = 0F
|
||||
ElseIf KeyBoardHandler.KeyDown(KeyBindings.BackwardMoveKey) Then
|
||||
v.X = 0F
|
||||
v.Y = -1.0F
|
||||
v.Z = 0F
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Return v
|
||||
End Function
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ Public Class OverworldScreen
|
|||
End Set
|
||||
End Property
|
||||
|
||||
Public Property GlobalGameModeScriptStarted As Boolean = False
|
||||
#End Region
|
||||
|
||||
''' <summary>
|
||||
|
@ -143,6 +144,12 @@ Public Class OverworldScreen
|
|||
''' Updates the OverworldScreen.
|
||||
''' </summary>
|
||||
Public Overrides Sub Update()
|
||||
If GameModeManager.ActiveGameMode.StartScript <> "" AndAlso ActionScript.IsReady AndAlso Not GlobalGameModeScriptStarted Then
|
||||
ActionScript.reDelay = 0.0F
|
||||
ActionScript.StartScript(GameModeManager.ActiveGameMode.StartScript, 0)
|
||||
GlobalGameModeScriptStarted = True
|
||||
End If
|
||||
|
||||
'If the MapScript has a value loaded from the MapScript map tag and there is no script running, start that script:
|
||||
If LevelLoader.MapScript <> "" And ActionScript.IsReady = True Then
|
||||
ActionScript.reDelay = 0.0F
|
||||
|
@ -322,7 +329,7 @@ Public Class OverworldScreen
|
|||
d.Add(Buttons.A, "Interact")
|
||||
d.Add(Buttons.X, "Menu")
|
||||
|
||||
If Core.Player.hasPokegear = True Then
|
||||
If Core.Player.HasPokegear = True Then
|
||||
d.Add(Buttons.Y, "Pokégear")
|
||||
End If
|
||||
|
||||
|
@ -387,7 +394,7 @@ Public Class OverworldScreen
|
|||
Thread.Sleep(20)
|
||||
x = x + 1
|
||||
End While
|
||||
If String.IsNullOrEmpty(Level.MusicLoop)
|
||||
If String.IsNullOrEmpty(Level.MusicLoop) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
|
|
|
@ -567,6 +567,528 @@
|
|||
|
||||
Entity.MakeShake = Name.ToLower() = "drunknilllzz"
|
||||
|
||||
''' Backup Save module
|
||||
''' 1. Encrypted OverWrite Save.
|
||||
''' 2. OverWrite Save.
|
||||
''' 3. Backup Save.
|
||||
If filePrefix = "GAMEJOLTSAVE" AndAlso Core.GameOptions.Extras.Contains("Backup Save") Then
|
||||
If Not Directory.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID) Then
|
||||
Directory.CreateDirectory(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID)
|
||||
End If
|
||||
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Encrypted\Encrypted.dat")) Then
|
||||
Dim Items() As String = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID.ToString() & "\Encrypted\Encrypted.dat").Split(CChar("|"))
|
||||
Dim Hash As String = String.Join("|", Items.Take(16))
|
||||
|
||||
Try
|
||||
If Items.Count = 17 AndAlso String.Equals(Hash, Encryption.DecryptString(Items.Last, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))) Then
|
||||
Core.Player.ApricornData = Encryption.DecryptString(Items(0), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.BerryData = Encryption.DecryptString(Items(1), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.BoxData = Encryption.DecryptString(Items(2), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.DaycareData = Encryption.DecryptString(Items(3), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.HallOfFameData = Encryption.DecryptString(Items(4), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.ItemData = Encryption.DecryptString(Items(5), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
|
||||
Inventory.Clear()
|
||||
Mails.Clear()
|
||||
Dim Data As String = Encryption.DecryptString(Items(6), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
If Not String.IsNullOrWhiteSpace(Data) Then
|
||||
For Each ItemDat As String In Data.SplitAtNewline()
|
||||
If Not String.IsNullOrWhiteSpace(ItemDat) Then
|
||||
If ItemDat.StartsWith("{") AndAlso ItemDat.EndsWith("}") AndAlso ItemDat.Contains("|") Then
|
||||
Dim ItemID As String = ItemDat.Remove(0, ItemDat.IndexOf("{") + 1)
|
||||
ItemID = ItemID.Remove(ItemID.IndexOf("}"))
|
||||
|
||||
Dim amount As Integer = CInt(ItemID.Remove(0, ItemID.IndexOf("|") + 1))
|
||||
ItemID = ItemID.Remove(ItemID.IndexOf("|"))
|
||||
|
||||
Inventory.AddItem(CInt(ItemID), amount)
|
||||
ElseIf ItemDat.StartsWith("Mail|") Then
|
||||
Dim mailData As String = ItemDat.Remove(0, 5)
|
||||
Mails.Add(Game.Items.MailItem.GetMailDataFromString(mailData))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Core.Player.NPCData = Encryption.DecryptString(Items(7), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
|
||||
Data = Encryption.DecryptString(Items(8), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
For Each Line As String In Data.SplitAtNewline()
|
||||
If Line.Contains("|") Then
|
||||
Dim ID As String = Line.Remove(Line.IndexOf("|"))
|
||||
Dim Value As String = Line.Remove(0, Line.IndexOf("|") + 1)
|
||||
Select Case ID.ToLower()
|
||||
Case "fov"
|
||||
startFOV = CSng(Value.Replace(".", GameController.DecSeparator)).Clamp(1, 179)
|
||||
Case "textspeed"
|
||||
TextBox.TextSpeed = CInt(Value)
|
||||
Case "mousespeed"
|
||||
startRotationSpeed = CInt(Value)
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
|
||||
Pokemons.Clear()
|
||||
Dim PokeData As String = Encryption.DecryptString(Items(9), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
For Each Line As String In PokeData.SplitAtNewline()
|
||||
If Line.StartsWith("{") AndAlso Line.EndsWith("}") Then
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByData(Line)
|
||||
If p.IsEgg() = False Then
|
||||
If p.IsShiny = True Then
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, p.Number, 3)
|
||||
Else
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, p.Number, 2)
|
||||
End If
|
||||
End If
|
||||
Pokemons.Add(p)
|
||||
End If
|
||||
Next
|
||||
|
||||
Data = Encryption.DecryptString(Items(10), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Screen.Level.Riding = False
|
||||
For Each Line As String In Data.SplitAtNewline()
|
||||
If Not String.IsNullOrWhiteSpace(Line) AndAlso Line.Contains("|") Then
|
||||
Dim ID As String = Line.Remove(Line.IndexOf("|"))
|
||||
Dim Value As String = Line.Remove(0, Line.IndexOf("|") + 1)
|
||||
Select Case ID.ToLower()
|
||||
Case "name"
|
||||
Name = CType(IIf(IsGameJoltSave, GameJolt.API.username, Value), String)
|
||||
Case "position"
|
||||
Dim v() As String = Value.Split(CChar(","))
|
||||
startPosition.X = CSng(v(0).Replace(".", GameController.DecSeparator))
|
||||
startPosition.Y = CSng(v(1).Replace(".", GameController.DecSeparator))
|
||||
startPosition.Z = CSng(v(2).Replace(".", GameController.DecSeparator))
|
||||
Case "lastpokemonposition"
|
||||
Dim v() As String = Value.Split(CChar(","))
|
||||
LastPokemonPosition.X = CSng(v(0).Replace(".", GameController.DecSeparator))
|
||||
LastPokemonPosition.Y = CSng(v(1).Replace(".", GameController.DecSeparator))
|
||||
LastPokemonPosition.Z = CSng(v(2).Replace(".", GameController.DecSeparator))
|
||||
Case "mapfile"
|
||||
startMap = Value
|
||||
Case "rivalname"
|
||||
RivalName = Value
|
||||
Case "money"
|
||||
Money = CInt(Value)
|
||||
Case "badges"
|
||||
Badges.Clear()
|
||||
If Value = "0" Then
|
||||
Badges = New List(Of Integer)
|
||||
Else
|
||||
If Value.Contains(",") = False Then
|
||||
Badges = {CInt(Value)}.ToList()
|
||||
Else
|
||||
Dim l As List(Of String) = Value.Split(CChar(",")).ToList()
|
||||
For i = 0 To l.Count - 1
|
||||
Badges.Add(CInt(l(i)))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Case "rotation"
|
||||
startRotation = CSng(Value.Replace(".", GameController.DecSeparator))
|
||||
Case "Gender"
|
||||
If Value = "Male" Then
|
||||
Male = True
|
||||
Else
|
||||
Male = False
|
||||
End If
|
||||
Case "playtime"
|
||||
Dim dd() As String = Value.Split(CChar(","))
|
||||
If dd.Count >= 4 Then
|
||||
PlayTime = New TimeSpan(CInt(dd(3)), CInt(dd(0)), CInt(dd(1)), CInt(dd(2)))
|
||||
Else
|
||||
PlayTime = New TimeSpan(CInt(dd(0)), CInt(dd(1)), CInt(dd(2)))
|
||||
End If
|
||||
Case "ot"
|
||||
OT = CStr(CInt(Value).Clamp(0, 99999))
|
||||
Case "points"
|
||||
Points = CInt(Value)
|
||||
Case "haspokedex"
|
||||
HasPokedex = CBool(Value)
|
||||
Case "haspokegear"
|
||||
HasPokegear = CBool(Value)
|
||||
Case "freecamera"
|
||||
startFreeCameraMode = CBool(Value)
|
||||
Case "thirdperson"
|
||||
startThirdPerson = CBool(Value)
|
||||
Case "skin"
|
||||
Skin = Value
|
||||
Case "battleanimations"
|
||||
ShowBattleAnimations = CInt(Value)
|
||||
Case "boxamount"
|
||||
BoxAmount = CInt(Value)
|
||||
Case "lastrestplace"
|
||||
LastRestPlace = Value
|
||||
Case "lastrestplaceposition"
|
||||
LastRestPlacePosition = Value
|
||||
Case "diagonalmovement"
|
||||
If GameController.IS_DEBUG_ACTIVE = True Then
|
||||
DiagonalMovement = CBool(Value)
|
||||
Else
|
||||
DiagonalMovement = False
|
||||
End If
|
||||
Case "repelsteps"
|
||||
RepelSteps = CInt(Value)
|
||||
Case "lastsaveplace"
|
||||
LastSavePlace = Value
|
||||
Case "lastsaveplaceposition"
|
||||
LastSavePlacePosition = Value
|
||||
Case "difficulty"
|
||||
DifficultyMode = CInt(Value)
|
||||
Case "battlestyle"
|
||||
BattleStyle = CInt(Value)
|
||||
Case "savecreated"
|
||||
SaveCreated = Value
|
||||
Case "autosave"
|
||||
If IsGameJoltSave = False Then
|
||||
newFilePrefix = Value
|
||||
AutosaveUsed = True
|
||||
End If
|
||||
Case "daycaresteps"
|
||||
DaycareSteps = CInt(Value)
|
||||
Case "gamemode"
|
||||
GameMode = Value
|
||||
Case "pokefiles"
|
||||
If Value <> "" Then
|
||||
If Value.Contains(",") = True Then
|
||||
PokeFiles.AddRange(Value.Split(CChar(",")))
|
||||
Else
|
||||
PokeFiles.Add(Value)
|
||||
End If
|
||||
End If
|
||||
Case "visitedmaps"
|
||||
VisitedMaps = Value
|
||||
Case "tempsurfskin"
|
||||
TempSurfSkin = Value
|
||||
Case "surfing"
|
||||
startSurfing = CBool(Value)
|
||||
Screen.Level.Surfing = CBool(Value)
|
||||
Case "bp"
|
||||
BP = CInt(Value)
|
||||
Case "gtsstars"
|
||||
GTSStars = CInt(Value)
|
||||
Case "showmodels"
|
||||
ShowModelsInBattle = CBool(Value)
|
||||
Case "sandboxmode"
|
||||
SandBoxMode = CBool(Value)
|
||||
Case "earnedachievements"
|
||||
If Value <> "" Then
|
||||
EarnedAchievements = Value.Split(CChar(",")).ToList()
|
||||
End If
|
||||
End Select
|
||||
Else
|
||||
Logger.Log(Logger.LogTypes.Warning, "Player.vb: The line """ & Line & """ is either empty or does not conform the player.dat file rules.")
|
||||
End If
|
||||
Next
|
||||
If IsGameJoltSave = True And Screen.Level.Surfing = False Then
|
||||
Skin = GameJolt.Emblem.GetPlayerSpriteFile(GameJolt.Emblem.GetPlayerLevel(GameJoltSave.Points), GameJoltSave.GameJoltID, GameJoltSave.Gender)
|
||||
Select Case GameJoltSave.Gender
|
||||
Case "0"
|
||||
Male = True
|
||||
Case "1"
|
||||
Male = False
|
||||
Case Else
|
||||
Male = True
|
||||
End Select
|
||||
End If
|
||||
GameStart = Date.Now
|
||||
|
||||
Core.Player.PokedexData = Encryption.DecryptString(Items(11), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.RegisterData = Encryption.DecryptString(Items(12), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.RoamingPokemonData = Encryption.DecryptString(Items(13), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
Core.Player.SecretBaseData = Encryption.DecryptString(Items(14), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
PlayerStatistics.Load(Encryption.DecryptString(Items(15), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)))
|
||||
Else
|
||||
Logger.Log(Logger.LogTypes.Warning, "Backup save have been tempered with. Unable to load.")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Log(Logger.LogTypes.Warning, "Backup save have been tempered with. Unable to load.")
|
||||
End Try
|
||||
End If
|
||||
|
||||
#If DEBUG Then
|
||||
If Not Directory.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite") Then
|
||||
Directory.CreateDirectory(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite")
|
||||
End If
|
||||
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Apricorns.dat")) Then
|
||||
Core.Player.ApricornData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Apricorns.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Apricorns.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Berries.dat")) Then
|
||||
Core.Player.BerryData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Berries.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Berries.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Box.dat")) Then
|
||||
Core.Player.BoxData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Box.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Box.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Daycare.dat")) Then
|
||||
Core.Player.DaycareData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Daycare.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Daycare.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\HallOfFame.dat")) Then
|
||||
Core.Player.HallOfFameData = IO.File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\HallOfFame.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\HallOfFame.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\ItemData.dat")) Then
|
||||
Core.Player.ItemData = IO.File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\ItemData.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\ItemData.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Items.dat")) Then
|
||||
Inventory.Clear()
|
||||
Mails.Clear()
|
||||
Dim Data As String = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Items.dat")
|
||||
If Not String.IsNullOrWhiteSpace(Data) Then
|
||||
For Each ItemDat As String In Data.SplitAtNewline()
|
||||
If Not String.IsNullOrWhiteSpace(ItemDat) Then
|
||||
If ItemDat.StartsWith("{") AndAlso ItemDat.EndsWith("}") AndAlso ItemDat.Contains("|") Then
|
||||
Dim ItemID As String = ItemDat.Remove(0, ItemDat.IndexOf("{") + 1)
|
||||
ItemID = ItemID.Remove(ItemID.IndexOf("}"))
|
||||
|
||||
Dim amount As Integer = CInt(ItemID.Remove(0, ItemID.IndexOf("|") + 1))
|
||||
ItemID = ItemID.Remove(ItemID.IndexOf("|"))
|
||||
|
||||
Inventory.AddItem(CInt(ItemID), amount)
|
||||
ElseIf ItemDat.StartsWith("Mail|") Then
|
||||
Dim mailData As String = ItemDat.Remove(0, 5)
|
||||
Mails.Add(Items.MailItem.GetMailDataFromString(mailData))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Items.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\NPC.dat")) Then
|
||||
Core.Player.NPCData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\NPC.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\NPC.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Options.dat")) Then
|
||||
Dim Data As String = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Options.dat")
|
||||
For Each Line As String In Data.SplitAtNewline()
|
||||
If Line.Contains("|") Then
|
||||
Dim ID As String = Line.Remove(Line.IndexOf("|"))
|
||||
Dim Value As String = Line.Remove(0, Line.IndexOf("|") + 1)
|
||||
Select Case ID.ToLower()
|
||||
Case "fov"
|
||||
startFOV = CSng(Value.Replace(".", GameController.DecSeparator)).Clamp(1, 179)
|
||||
Case "textspeed"
|
||||
TextBox.TextSpeed = CInt(Value)
|
||||
Case "mousespeed"
|
||||
startRotationSpeed = CInt(Value)
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Options.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Party.dat")) Then
|
||||
Pokemons.Clear()
|
||||
Dim PokeData As String = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Party.dat")
|
||||
For Each Line As String In PokeData.SplitAtNewline()
|
||||
If Line.StartsWith("{") AndAlso Line.EndsWith("}") Then
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByData(Line)
|
||||
If p.IsEgg() = False Then
|
||||
If p.IsShiny = True Then
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, p.Number, 3)
|
||||
Else
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, p.Number, 2)
|
||||
End If
|
||||
End If
|
||||
Pokemons.Add(p)
|
||||
End If
|
||||
Next
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Party.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Player.dat")) Then
|
||||
Dim Data As String = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Player.dat")
|
||||
Screen.Level.Riding = False
|
||||
For Each Line As String In Data.SplitAtNewline()
|
||||
If Not String.IsNullOrWhiteSpace(Line) AndAlso Line.Contains("|") Then
|
||||
Dim ID As String = Line.Remove(Line.IndexOf("|"))
|
||||
Dim Value As String = Line.Remove(0, Line.IndexOf("|") + 1)
|
||||
Select Case ID.ToLower()
|
||||
Case "name"
|
||||
Name = CType(IIf(IsGameJoltSave, GameJolt.API.username, Value), String)
|
||||
Case "position"
|
||||
Dim v() As String = Value.Split(CChar(","))
|
||||
startPosition.X = CSng(v(0).Replace(".", GameController.DecSeparator))
|
||||
startPosition.Y = CSng(v(1).Replace(".", GameController.DecSeparator))
|
||||
startPosition.Z = CSng(v(2).Replace(".", GameController.DecSeparator))
|
||||
Case "lastpokemonposition"
|
||||
Dim v() As String = Value.Split(CChar(","))
|
||||
LastPokemonPosition.X = CSng(v(0).Replace(".", GameController.DecSeparator))
|
||||
LastPokemonPosition.Y = CSng(v(1).Replace(".", GameController.DecSeparator))
|
||||
LastPokemonPosition.Z = CSng(v(2).Replace(".", GameController.DecSeparator))
|
||||
Case "mapfile"
|
||||
startMap = Value
|
||||
Case "rivalname"
|
||||
RivalName = Value
|
||||
Case "money"
|
||||
Money = CInt(Value)
|
||||
Case "badges"
|
||||
Badges.Clear()
|
||||
If Value = "0" Then
|
||||
Badges = New List(Of Integer)
|
||||
Else
|
||||
If Value.Contains(",") = False Then
|
||||
Badges = {CInt(Value)}.ToList()
|
||||
Else
|
||||
Dim l As List(Of String) = Value.Split(CChar(",")).ToList()
|
||||
For i = 0 To l.Count - 1
|
||||
Badges.Add(CInt(l(i)))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Case "rotation"
|
||||
startRotation = CSng(Value.Replace(".", GameController.DecSeparator))
|
||||
Case "Gender"
|
||||
If Value = "Male" Then
|
||||
Male = True
|
||||
Else
|
||||
Male = False
|
||||
End If
|
||||
Case "playtime"
|
||||
Dim dd() As String = Value.Split(CChar(","))
|
||||
If dd.Count >= 4 Then
|
||||
PlayTime = New TimeSpan(CInt(dd(3)), CInt(dd(0)), CInt(dd(1)), CInt(dd(2)))
|
||||
Else
|
||||
PlayTime = New TimeSpan(CInt(dd(0)), CInt(dd(1)), CInt(dd(2)))
|
||||
End If
|
||||
Case "ot"
|
||||
OT = CStr(CInt(Value).Clamp(0, 99999))
|
||||
Case "points"
|
||||
Points = CInt(Value)
|
||||
Case "haspokedex"
|
||||
HasPokedex = CBool(Value)
|
||||
Case "haspokegear"
|
||||
HasPokegear = CBool(Value)
|
||||
Case "freecamera"
|
||||
startFreeCameraMode = CBool(Value)
|
||||
Case "thirdperson"
|
||||
startThirdPerson = CBool(Value)
|
||||
Case "skin"
|
||||
Skin = Value
|
||||
Case "battleanimations"
|
||||
ShowBattleAnimations = CInt(Value)
|
||||
Case "boxamount"
|
||||
BoxAmount = CInt(Value)
|
||||
Case "lastrestplace"
|
||||
LastRestPlace = Value
|
||||
Case "lastrestplaceposition"
|
||||
LastRestPlacePosition = Value
|
||||
Case "diagonalmovement"
|
||||
If GameController.IS_DEBUG_ACTIVE = True Then
|
||||
DiagonalMovement = CBool(Value)
|
||||
Else
|
||||
DiagonalMovement = False
|
||||
End If
|
||||
Case "repelsteps"
|
||||
RepelSteps = CInt(Value)
|
||||
Case "lastsaveplace"
|
||||
LastSavePlace = Value
|
||||
Case "lastsaveplaceposition"
|
||||
LastSavePlacePosition = Value
|
||||
Case "difficulty"
|
||||
DifficultyMode = CInt(Value)
|
||||
Case "battlestyle"
|
||||
BattleStyle = CInt(Value)
|
||||
Case "savecreated"
|
||||
SaveCreated = Value
|
||||
Case "autosave"
|
||||
If IsGameJoltSave = False Then
|
||||
newFilePrefix = Value
|
||||
AutosaveUsed = True
|
||||
End If
|
||||
Case "daycaresteps"
|
||||
DaycareSteps = CInt(Value)
|
||||
Case "gamemode"
|
||||
GameMode = Value
|
||||
Case "pokefiles"
|
||||
If Value <> "" Then
|
||||
If Value.Contains(",") = True Then
|
||||
PokeFiles.AddRange(Value.Split(CChar(",")))
|
||||
Else
|
||||
PokeFiles.Add(Value)
|
||||
End If
|
||||
End If
|
||||
Case "visitedmaps"
|
||||
VisitedMaps = Value
|
||||
Case "tempsurfskin"
|
||||
TempSurfSkin = Value
|
||||
Case "surfing"
|
||||
startSurfing = CBool(Value)
|
||||
Screen.Level.Surfing = CBool(Value)
|
||||
Case "bp"
|
||||
BP = CInt(Value)
|
||||
Case "gtsstars"
|
||||
GTSStars = CInt(Value)
|
||||
Case "showmodels"
|
||||
ShowModelsInBattle = CBool(Value)
|
||||
Case "sandboxmode"
|
||||
SandBoxMode = CBool(Value)
|
||||
Case "earnedachievements"
|
||||
If Value <> "" Then
|
||||
EarnedAchievements = Value.Split(CChar(",")).ToList()
|
||||
End If
|
||||
End Select
|
||||
Else
|
||||
Logger.Log(Logger.LogTypes.Warning, "Player.vb: The line """ & Line & """ is either empty or does not conform the player.dat file rules.")
|
||||
End If
|
||||
Next
|
||||
If IsGameJoltSave = True And Screen.Level.Surfing = False Then
|
||||
Skin = GameJolt.Emblem.GetPlayerSpriteFile(GameJolt.Emblem.GetPlayerLevel(GameJoltSave.Points), GameJoltSave.GameJoltID, GameJoltSave.Gender)
|
||||
Select Case GameJoltSave.Gender
|
||||
Case "0"
|
||||
Male = True
|
||||
Case "1"
|
||||
Male = False
|
||||
Case Else
|
||||
Male = True
|
||||
End Select
|
||||
End If
|
||||
GameStart = Date.Now
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Player.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Pokedex.dat")) Then
|
||||
Core.Player.PokedexData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Pokedex.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Pokedex.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Register.dat")) Then
|
||||
Core.Player.RegisterData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Register.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Register.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\RoamingPokemon.dat")) Then
|
||||
Core.Player.RoamingPokemonData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\RoamingPokemon.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\RoamingPokemon.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\SecretBase.dat")) Then
|
||||
Core.Player.SecretBaseData = File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\SecretBase.dat")
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\SecretBase.dat")
|
||||
End If
|
||||
If (File.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Statistics.dat")) Then
|
||||
PlayerStatistics.Load(File.ReadAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Statistics.dat"))
|
||||
File.Delete(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\OverWrite\Statistics.dat")
|
||||
End If
|
||||
#End If
|
||||
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Apricorns.dat", GameJoltSave.Apricorns)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Berries.dat", GameJoltSave.Berries)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Box.dat", GameJoltSave.Box)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Daycare.dat", GameJoltSave.Daycare)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\HallOfFame.dat", GameJoltSave.HallOfFame)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\ItemData.dat", GameJoltSave.ItemData)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Items.dat", GameJoltSave.Items)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\NPC.dat", GameJoltSave.NPC)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Options.dat", GameJoltSave.Options)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Party.dat", GameJoltSave.Party)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Player.dat", GameJoltSave.Player)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Pokedex.dat", GameJoltSave.Pokedex)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Register.dat", GameJoltSave.Register)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\RoamingPokemon.dat", GameJoltSave.RoamingPokemon)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\SecretBase.dat", GameJoltSave.SecretBase)
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Statistics.dat", GameJoltSave.Statistics)
|
||||
End If
|
||||
|
||||
''' Indev 0.54 Removal List
|
||||
''' 1. All Mega Stones. [ID: 507 - 553]
|
||||
''' 2. Shiny Candy [ID: 501]
|
||||
|
@ -1060,7 +1582,37 @@
|
|||
filePrefix = newFilePrefix
|
||||
|
||||
If IsGameJoltSave = True Then
|
||||
If Core.GameOptions.Extras.Contains("Backup Save") Then
|
||||
If Not Directory.Exists(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Encrypted") Then
|
||||
Directory.CreateDirectory(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Encrypted")
|
||||
End If
|
||||
|
||||
Dim OriginalHASH As String =
|
||||
Encryption.EncryptString(GetApricornsData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetBerriesData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetBoxData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetDaycareData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetHallOfFameData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetItemDataData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetItemsData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetNPCDataData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetOptionsData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetPartyData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetPlayerData(False), StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetPokedexData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetRegisterData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetRoamingPokemonData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetSecretBaseData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)) & "|" &
|
||||
Encryption.EncryptString(GetStatisticsData, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID))
|
||||
|
||||
File.WriteAllText(GameController.GamePath & "\Backup Save\" & GameJoltSave.GameJoltID & "\Encrypted\Encrypted.dat",
|
||||
OriginalHASH & "|" & Encryption.EncryptString(OriginalHASH, StringObfuscation.Obfuscate(GameJoltSave.GameJoltID)))
|
||||
End If
|
||||
|
||||
Dim APICallSave As New GameJolt.APICall(AddressOf SaveGameHelpers.CompleteGameJoltSave)
|
||||
AddHandler APICallSave.CallFails, Sub(ByVal ex As Exception)
|
||||
SaveGameHelpers.CompleteGameJoltSave("false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false" & vbNewLine & "false")
|
||||
End Sub
|
||||
|
||||
Dim keys As New List(Of String)
|
||||
Dim dataItems As New List(Of String)
|
||||
|
@ -1679,7 +2231,6 @@
|
|||
"@Text.Show(Your repel effect wore off.)" & vbNewLine &
|
||||
":end"
|
||||
|
||||
|
||||
If Temp.LastUsedRepel > -1 Then
|
||||
Dim haveItemLeft As Boolean = Inventory.GetItemAmount(Temp.LastUsedRepel) > 0
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
AllAllies 'All allies, excluding itself.
|
||||
|
||||
All 'All Pokémon, including itself
|
||||
|
||||
AllOwn 'All allies, including itself.
|
||||
End Enum
|
||||
|
||||
Public Enum AIField
|
||||
|
@ -1587,6 +1589,14 @@
|
|||
'DO NOTHING HERE (will do recoil if moves overrides it)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveRecharge(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING HERE (will do recoil if moves overrides it)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveSwitch(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING HERE (will do recoil if moves overrides it)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Event that occurs when the move misses its target.
|
||||
''' </summary>
|
||||
|
@ -1632,12 +1642,12 @@
|
|||
If Me.Type.Type = Element.Types.Normal Then
|
||||
If p.Ability.Name.ToLower() = "pixilate" Then
|
||||
Return New Element(Element.Types.Fairy)
|
||||
End If
|
||||
If p.Ability.Name.ToLower() = "refrigerate" Then
|
||||
ElseIf p.Ability.Name.ToLower() = "refrigerate" Then
|
||||
Return New Element(Element.Types.Ice)
|
||||
End If
|
||||
If p.Ability.Name.ToLower() = "aerilate" Then
|
||||
ElseIf p.Ability.Name.ToLower() = "aerilate" Then
|
||||
Return New Element(Element.Types.Flying)
|
||||
ElseIf p.Ability.Name.ToLower() = "galvanize" Then
|
||||
Return New Element(Element.Types.Electric)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
@ -1707,6 +1717,42 @@
|
|||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Event that occurs when a flinch has been inflicted.
|
||||
''' </summary>
|
||||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub InflictedFlinch(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Event that occurs when the pokemon has hurt itself in confusion.
|
||||
''' </summary>
|
||||
''' <param name="Own">If the own Pokémon is confused.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub HurtItselfInConfusion(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Event that occurs when the pokemon has falls in love with the opponent.
|
||||
''' </summary>
|
||||
''' <param name="Own">If the own Pokémon is in love.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub IsAttracted(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Event that occurs when a the pokemon has been put to sleep.
|
||||
''' </summary>
|
||||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub IsSleeping(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Returns the attack stat of a Pokémon (Physical or Special).
|
||||
''' </summary>
|
||||
|
|
|
@ -117,6 +117,22 @@
|
|||
ResetCounter(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
ResetCounter(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
ResetCounter(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
ResetCounter(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
ResetCounter(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
Binary file not shown.
|
@ -53,11 +53,31 @@
|
|||
End Sub
|
||||
|
||||
Public Overrides Function GetBasePower(own As Boolean, BattleScreen As BattleScreen) As Integer
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "", "", True) = True Then
|
||||
Return CInt(Me.Power * 1.5F)
|
||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||
Dim op As Pokemon = BattleScreen.OppPokemon
|
||||
If own = False Then
|
||||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
Return Me.Power
|
||||
'Conditions
|
||||
If op.Item Is Nothing Then
|
||||
Return Power
|
||||
End If
|
||||
If op.Item.IsMegaStone = True Then
|
||||
Return Power
|
||||
End If
|
||||
If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
|
||||
Return Power
|
||||
End If
|
||||
If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
|
||||
Return Power
|
||||
End If
|
||||
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
|
||||
Return Power
|
||||
End If
|
||||
|
||||
Return CInt(Me.Power * 1.5F)
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
|
@ -67,15 +87,28 @@
|
|||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
'Conditions
|
||||
If op.Item Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.IsMegaStone = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "", "", True) = True Then
|
||||
op.OriginalItem = Item.GetItemByID(op.Item.ID)
|
||||
op.OriginalItem.AdditionalData = op.Item.AdditionalData
|
||||
|
||||
BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, p.GetDisplayName() & " knocked off the " & op.GetDisplayName() & "'s " & op.OriginalItem.Name & "!", "move:knockoff")
|
||||
If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
op.OriginalItem = Item.GetItemByID(op.Item.ID)
|
||||
op.OriginalItem.AdditionalData = op.Item.AdditionalData
|
||||
BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, p.GetDisplayName() & " knocked off the " & op.GetDisplayName() & "'s " & op.OriginalItem.Name & "!", "move:knockoff")
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
@ -62,47 +62,51 @@ Namespace BattleSystem.Moves.Dark
|
|||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
Dim CanSwitchItems As Boolean = True
|
||||
If p.Item Is Nothing And op.Item Is Nothing Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If p.Ability.Name.ToLower() = "sticky hold" Or op.Ability.Name.ToLower() = "sticky hold" Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If CheckMultitypePlate(p, op) = False Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
If p.Item.IsMegaStone OrElse op.Item.IsMegaStone Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
Dim i1 As Item = p.Item
|
||||
Dim i2 As Item = op.Item
|
||||
p.Item = i2
|
||||
op.Item = i1
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & "."))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) AndAlso op.Ability.Name.ToLower() = "sticky hold" Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If CheckMultitypePlate(p, op) = False Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If (p.Item IsNot Nothing AndAlso p.Item.IsMegaStone) OrElse (op.Item IsNot Nothing AndAlso op.Item.IsMegaStone) Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
|
||||
If CanSwitchItems Then
|
||||
Dim i1 As Item = Nothing
|
||||
Dim i2 As Item = Nothing
|
||||
If p.Item IsNot Nothing Then
|
||||
i1 = p.Item
|
||||
End If
|
||||
If op.Item IsNot Nothing Then
|
||||
i2 = op.Item
|
||||
End If
|
||||
p.Item = i2
|
||||
op.Item = i1
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & "."))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CheckMultitypePlate(ByVal p As Pokemon, ByVal op As Pokemon) As Boolean
|
||||
If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() = "multitype" Then
|
||||
If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() <> "multitype" Then
|
||||
Return True
|
||||
Else
|
||||
If Not p.Item Is Nothing Then
|
||||
|
|
|
@ -59,31 +59,35 @@
|
|||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
'Conditions
|
||||
If op.Item Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.IsMegaStone = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim canSteal As Boolean = True
|
||||
If op.Ability.Name.ToLower() = "multitype" Then
|
||||
canSteal = False
|
||||
If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
|
||||
Exit Sub
|
||||
End If
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
|
||||
canSteal = False
|
||||
If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If canSteal = True Then
|
||||
If p.Item Is Nothing And Not op.Item Is Nothing Then
|
||||
Dim ItemID As Integer = op.Item.ID
|
||||
If p.Item Is Nothing Then
|
||||
Dim ItemID As Integer = op.Item.ID
|
||||
|
||||
op.OriginalItem = Item.GetItemByID(op.Item.ID)
|
||||
op.OriginalItem.AdditionalData = op.Item.AdditionalData
|
||||
op.OriginalItem = Item.GetItemByID(op.Item.ID)
|
||||
op.OriginalItem.AdditionalData = op.Item.AdditionalData
|
||||
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Thief stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:thief") = True Then
|
||||
If own = False Then
|
||||
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
|
||||
End If
|
||||
|
||||
p.Item = Item.GetItemByID(ItemID)
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Thief stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:thief") Then
|
||||
If own = False Then
|
||||
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
|
||||
End If
|
||||
p.Item = Item.GetItemByID(ItemID)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
|
|
@ -73,13 +73,25 @@
|
|||
End Sub
|
||||
|
||||
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
Dim outrage As Integer = 0
|
||||
Dim p As Pokemon
|
||||
If own = True Then
|
||||
outrage = BattleScreen.FieldEffects.OwnOutrage
|
||||
p = BattleScreen.OwnPokemon
|
||||
Else
|
||||
outrage = BattleScreen.FieldEffects.OppOutrage
|
||||
p = BattleScreen.OppPokemon
|
||||
End If
|
||||
|
||||
If outrage = 1 Then
|
||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s Outrage stopped.", "move:outrage")
|
||||
End If
|
||||
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnOutrage = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppOutrage = 0
|
||||
End If
|
||||
|
||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, "", "move:outrage")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||
|
@ -94,6 +106,21 @@
|
|||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -55,7 +55,7 @@
|
|||
Me.AIField2 = AIField.Recharge
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveRecharge(Own As Boolean, BattleScreen As BattleScreen)
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnRecharge += 1
|
||||
Else
|
||||
|
|
Binary file not shown.
|
@ -11,7 +11,7 @@
|
|||
Me.OriginalPP = 5
|
||||
Me.CurrentPP = 5
|
||||
Me.MaxPP = 5
|
||||
Me.Power = 120
|
||||
Me.Power = 100
|
||||
Me.Accuracy = 50
|
||||
Me.Category = Categories.Special
|
||||
Me.ContestCategory = ContestCategories.Cool
|
||||
|
|
|
@ -44,7 +44,7 @@ Namespace BattleSystem.Moves.Fairy
|
|||
Me.IsPunchingMove = False
|
||||
Me.IsDamagingMove = True
|
||||
Me.IsProtectMove = False
|
||||
Me.IsSoundMove = False
|
||||
Me.IsSoundMove = True
|
||||
|
||||
Me.IsAffectedBySubstitute = True
|
||||
Me.IsOneHitKOMove = False
|
||||
|
|
|
@ -26,7 +26,7 @@ Namespace BattleSystem.Moves.Fighting
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = True
|
||||
Me.ProtectAffected = False
|
||||
Me.MagicCoatAffected = True
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
|
@ -55,7 +55,7 @@ Namespace BattleSystem.Moves.Fire
|
|||
Me.AIField2 = AIField.Recharge
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveRecharge(Own As Boolean, BattleScreen As BattleScreen)
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnRecharge += 1
|
||||
Else
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
Me.Category = Categories.Physical
|
||||
Me.ContestCategory = ContestCategories.Beauty
|
||||
Me.Name = "Fire Fang"
|
||||
Me.Description = "The user bites with flame-cloaked fangs. It may also make the target flinch or leave it burned."
|
||||
Me.Description = "The user bites with flame cloaked fangs. It may also make the target flinch or leave it burned."
|
||||
Me.CriticalChance = 1
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.OneAdjacentTarget
|
||||
|
|
|
@ -120,6 +120,14 @@
|
|||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnBounceCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppBounceCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim bounce As Integer = BattleScreen.FieldEffects.OwnBounceCounter
|
||||
If own = False Then
|
||||
|
@ -153,6 +161,22 @@
|
|||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = False
|
||||
Me.ProtectAffected = True
|
||||
Me.MagicCoatAffected = True
|
||||
Me.SnatchAffected = True
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
|
@ -119,7 +119,13 @@
|
|||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnFlyCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppFlyCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||
If own = False Then
|
||||
|
@ -153,6 +159,21 @@
|
|||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -122,25 +122,61 @@
|
|||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnSkyAttackCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppSkyAttackCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim skyattack As Integer = BattleScreen.FieldEffects.OwnSkyAttackCounter
|
||||
Dim SkyAttack As Integer = BattleScreen.FieldEffects.OwnSkyAttackCounter
|
||||
If own = False Then
|
||||
skyattack = BattleScreen.FieldEffects.OppSkyAttackCounter
|
||||
SkyAttack = BattleScreen.FieldEffects.OppSkyAttackCounter
|
||||
End If
|
||||
|
||||
If skyattack = 0 Then
|
||||
If SkyAttack = 0 Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
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")
|
||||
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnSkyAttackCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppSkyAttackCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -19,7 +19,7 @@ Namespace BattleSystem.Moves.Flying
|
|||
Me.Description = "The user whips up a turbulent whirlwind that ups the Speed stat of the user and its allies for four turns."
|
||||
Me.CriticalChance = 1
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.AllAllies
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user releases a soothing scent that heals all status conditions affecting the user's party."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.AllAllies
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -55,7 +55,7 @@ Namespace BattleSystem.Moves.Grass
|
|||
Me.AIField2 = AIField.Recharge
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveRecharge(Own As Boolean, BattleScreen As BattleScreen)
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnRecharge += 1
|
||||
Else
|
||||
|
|
|
@ -73,13 +73,25 @@
|
|||
End Sub
|
||||
|
||||
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
Dim petalDance As Integer = 0
|
||||
Dim p As Pokemon
|
||||
If own = True Then
|
||||
petalDance = BattleScreen.FieldEffects.OwnPetalDance
|
||||
p = BattleScreen.OwnPokemon
|
||||
Else
|
||||
petalDance = BattleScreen.FieldEffects.OppPetalDance
|
||||
p = BattleScreen.OppPokemon
|
||||
End If
|
||||
|
||||
If petalDance = 1 Then
|
||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s PetalDance stopped.", "move:petaldance")
|
||||
End If
|
||||
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnPetalDance = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppPetalDance = 0
|
||||
End If
|
||||
|
||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, "", "move:petaldance")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||
|
@ -94,6 +106,21 @@
|
|||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -147,6 +147,55 @@
|
|||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim solarBeam As Integer = BattleScreen.FieldEffects.OwnSolarBeam
|
||||
If own = False Then
|
||||
solarBeam = BattleScreen.FieldEffects.OppSolarBeam
|
||||
End If
|
||||
|
||||
If solarBeam = 0 Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnSolarBeam = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppSolarBeam = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -94,16 +94,15 @@
|
|||
p = BattleScreen.OppPokemon
|
||||
End If
|
||||
|
||||
Dim hasToCharge As Boolean = True
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.Name.ToLower() = "power herb" And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
|
||||
If BattleScreen.Battle.RemoveHeldItem(Own, Own, BattleScreen, "Power Herb pushed the use of Dig!", "move:dig") = True Then
|
||||
hasToCharge = False
|
||||
digCounter = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If digCounter = 0 And hasToCharge = True Then
|
||||
If digCounter = 0 Then
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnDigCounter = 1
|
||||
Else
|
||||
|
@ -131,7 +130,54 @@
|
|||
BattleScreen.FieldEffects.OppDigCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim dig As Integer = BattleScreen.FieldEffects.OwnDigCounter
|
||||
If own = False Then
|
||||
dig = BattleScreen.FieldEffects.OppDigCounter
|
||||
End If
|
||||
|
||||
If dig = 0 Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnDigCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppDigCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -122,6 +122,21 @@
|
|||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user cloaks its body with a white mist that prevents any of its stats from being cut for five turns."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.AllAllies
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -93,6 +93,57 @@
|
|||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnBideCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppBideCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim bide As Integer = BattleScreen.FieldEffects.OwnBideCounter
|
||||
If own = False Then
|
||||
bide = BattleScreen.FieldEffects.OppBideCounter
|
||||
End If
|
||||
|
||||
If bide = 0 Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnBideCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppBideCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -62,35 +62,38 @@ Namespace BattleSystem.Moves.Normal
|
|||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
'Conditions
|
||||
If op.Item Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.IsMegaStone = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim canSteal As Boolean = True
|
||||
If op.Ability.Name.ToLower() = "multitype" Then
|
||||
canSteal = False
|
||||
If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
|
||||
Exit Sub
|
||||
End If
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
|
||||
canSteal = False
|
||||
If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
|
||||
Exit Sub
|
||||
End If
|
||||
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If canSteal = True Then
|
||||
If p.Item Is Nothing And Not op.Item Is Nothing Then
|
||||
Dim ItemID As Integer = op.Item.ID
|
||||
If p.Item Is Nothing Then
|
||||
Dim ItemID As Integer = op.Item.ID
|
||||
|
||||
op.OriginalItem = Item.GetItemByID(op.Item.ID)
|
||||
op.OriginalItem.AdditionalData = op.Item.AdditionalData
|
||||
op.OriginalItem = Item.GetItemByID(op.Item.ID)
|
||||
op.OriginalItem.AdditionalData = op.Item.AdditionalData
|
||||
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Covet stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:covet") = True Then
|
||||
If own = False Then
|
||||
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
|
||||
End If
|
||||
|
||||
p.Item = Item.GetItemByID(ItemID)
|
||||
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Covet stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:covet") Then
|
||||
If own = False Then
|
||||
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
|
||||
End If
|
||||
p.Item = Item.GetItemByID(ItemID)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -55,7 +55,7 @@
|
|||
Me.AIField2 = AIField.MultiTurn
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveRecharge(Own As Boolean, BattleScreen As BattleScreen)
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnRecharge += 1
|
||||
Else
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user makes a soothing bell chime to heal the status problems of all the party Pokémon."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.AllAllies
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
Me.AIField2 = AIField.Recharge
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveRecharge(Own As Boolean, BattleScreen As BattleScreen)
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnRecharge += 1
|
||||
Else
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = False
|
||||
Me.ProtectAffected = True
|
||||
Me.MagicCoatAffected = False
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
|
@ -120,6 +120,14 @@
|
|||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnRazorWindCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppRazorWindCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim razorWind As Integer = BattleScreen.FieldEffects.OwnRazorWindCounter
|
||||
If own = False Then
|
||||
|
@ -133,6 +141,41 @@
|
|||
End If
|
||||
End Function
|
||||
|
||||
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnRazorWindCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppRazorWindCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -59,8 +59,8 @@
|
|||
If own = True Then
|
||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||
|
||||
If Not BattleScreen.FieldEffects.OwnLostItem Is Nothing Then
|
||||
p.Item = BattleScreen.FieldEffects.OwnLostItem
|
||||
If Not BattleScreen.FieldEffects.OwnConsumedItem Is Nothing Then
|
||||
p.Item = BattleScreen.FieldEffects.OwnConsumedItem
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " found one " & p.Item.Name & "!"))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject("Recycle failed!"))
|
||||
|
@ -68,8 +68,8 @@
|
|||
Else
|
||||
Dim p As Pokemon = BattleScreen.OppPokemon
|
||||
|
||||
If Not BattleScreen.FieldEffects.OppLostItem Is Nothing Then
|
||||
p.Item = BattleScreen.FieldEffects.OppLostItem
|
||||
If Not BattleScreen.FieldEffects.OppConsumedItem Is Nothing Then
|
||||
p.Item = BattleScreen.FieldEffects.OppConsumedItem
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " found one " & p.Item.Name & "!"))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject("Recycle failed!"))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = False
|
||||
Me.ProtectAffected = True
|
||||
Me.MagicCoatAffected = True
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user creates a protective field that prevents status problems for five turns."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.AllAllies
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user attacks everything around it by causing an explosion. The user faints upon using this move."
|
||||
Me.CriticalChance = 1
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.OneAdjacentTarget
|
||||
Me.Target = Targets.AllTargets
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user breaks its shell, lowering its Defense and Sp. Def stats but sharply raising Attack, Sp. Atk, and Speed stats."
|
||||
Me.CriticalChance = 1
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.OneAdjacentTarget
|
||||
Me.Target = Targets.Self
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -122,6 +122,14 @@
|
|||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnSkullBashCounter = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppSkullBashCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim skullBash As Integer = BattleScreen.FieldEffects.OwnSkullBashCounter
|
||||
If own = False Then
|
||||
|
@ -155,6 +163,21 @@
|
|||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -73,13 +73,25 @@
|
|||
End Sub
|
||||
|
||||
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
Dim thrash As Integer = 0
|
||||
Dim p As Pokemon
|
||||
If own = True Then
|
||||
thrash = BattleScreen.FieldEffects.OwnThrash
|
||||
p = BattleScreen.OwnPokemon
|
||||
Else
|
||||
thrash = BattleScreen.FieldEffects.OppThrash
|
||||
p = BattleScreen.OppPokemon
|
||||
End If
|
||||
|
||||
If thrash = 1 Then
|
||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s Thrash stopped.", "move:thrash")
|
||||
End If
|
||||
If own = True Then
|
||||
BattleScreen.FieldEffects.OwnThrash = 0
|
||||
Else
|
||||
BattleScreen.FieldEffects.OppThrash = 0
|
||||
End If
|
||||
|
||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, "", "move:thrash")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||
|
@ -94,6 +106,21 @@
|
|||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -64,7 +64,7 @@
|
|||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StopMove(own As Boolean, BattleScreen As BattleScreen)
|
||||
Private Sub Interruption(own As Boolean, BattleScreen As BattleScreen)
|
||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||
If own = False Then
|
||||
p = BattleScreen.OppPokemon
|
||||
|
@ -79,13 +79,36 @@
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||
Me.StopMove(own, BattleScreen)
|
||||
Me.Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveFailsSoundproof(own As Boolean, BattleScreen As BattleScreen)
|
||||
Me.StopMove(own, BattleScreen)
|
||||
Me.Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = False
|
||||
Me.ProtectAffected = True
|
||||
Me.MagicCoatAffected = True
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -26,7 +26,7 @@ Namespace BattleSystem.Moves.Psychic
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = True
|
||||
Me.ProtectAffected = False
|
||||
Me.MagicCoatAffected = True
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
Me.Description = "For five turns, the user prevents the opposing team from using any moves, Abilities, or held items that recover HP."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.OneFoe
|
||||
Me.Target = Targets.AllFoes
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = True
|
||||
Me.ProtectAffected = False
|
||||
Me.MagicCoatAffected = True
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
|
Binary file not shown.
|
@ -19,7 +19,7 @@ Namespace BattleSystem.Moves.Psychic
|
|||
Me.Description = "A wondrous wall of light is put up to suppress damage from special attacks for five turns."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.Self
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
Binary file not shown.
|
@ -19,7 +19,7 @@ Namespace BattleSystem.Moves.Psychic
|
|||
Me.Description = "A wondrous wall is put up to suppress damage from physical attacks for five turns."
|
||||
Me.CriticalChance = 0
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.Self
|
||||
Me.Target = Targets.AllOwn
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
Binary file not shown.
|
@ -62,48 +62,51 @@ Namespace BattleSystem.Moves.Psychic
|
|||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
Dim CanSwitchItems As Boolean = True
|
||||
If p.Item Is Nothing And op.Item Is Nothing Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If p.Ability.Name.ToLower() = "sticky hold" Or op.Ability.Name.ToLower() = "sticky hold" Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If CheckMultitypePlate(p, op) = False Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
If p.Item.IsMegaStone OrElse op.Item.IsMegaStone Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
Else
|
||||
Dim i1 As Item = p.Item
|
||||
Dim i2 As Item = op.Item
|
||||
p.Item = i2
|
||||
op.Item = i1
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & "."))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) AndAlso op.Ability.Name.ToLower() = "sticky hold" Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If CheckMultitypePlate(p, op) = False Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
If (p.Item IsNot Nothing AndAlso p.Item.IsMegaStone) OrElse (op.Item IsNot Nothing AndAlso op.Item.IsMegaStone) Then
|
||||
CanSwitchItems = False
|
||||
End If
|
||||
|
||||
If CanSwitchItems Then
|
||||
Dim i1 As Item = Nothing
|
||||
Dim i2 As Item = Nothing
|
||||
If p.Item IsNot Nothing Then
|
||||
i1 = p.Item
|
||||
End If
|
||||
If op.Item IsNot Nothing Then
|
||||
i2 = op.Item
|
||||
End If
|
||||
p.Item = i2
|
||||
op.Item = i1
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & "."))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CheckMultitypePlate(ByVal p As Pokemon, ByVal op As Pokemon) As Boolean
|
||||
If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() = "multitype" Then
|
||||
If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() <> "multitype" Then
|
||||
Return True
|
||||
Else
|
||||
If Not p.Item Is Nothing Then
|
||||
|
|
Binary file not shown.
|
@ -122,6 +122,21 @@ Namespace BattleSystem.Moves.Rock
|
|||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
Interruption(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -61,7 +61,10 @@
|
|||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
Dim basepower As Integer = CInt(Math.Ceiling(25 * (op.Speed / p.Speed)))
|
||||
Dim p_Speed As Integer = BattleCalculation.DetermineBattleSpeed(own, BattleScreen)
|
||||
Dim op_Speed As Integer = BattleCalculation.DetermineBattleSpeed(Not own, BattleScreen)
|
||||
|
||||
Dim basepower As Integer = CInt(Math.Ceiling(25 * (op_Speed / p_Speed)))
|
||||
|
||||
basepower = basepower.Clamp(1, 150)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
'#SpecialDefinitions
|
||||
Me.MakesContact = False
|
||||
Me.ProtectAffected = False
|
||||
Me.ProtectAffected = True
|
||||
Me.MagicCoatAffected = False
|
||||
Me.SnatchAffected = False
|
||||
Me.MirrorMoveAffected = True
|
||||
|
@ -56,7 +56,25 @@
|
|||
End Sub
|
||||
|
||||
Public Overrides Function MoveFailBeforeAttack(Own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Return Not BattleScreen.FieldEffects.MovesFirst(Own)
|
||||
If BattleScreen.FieldEffects.MovesFirst(Own) Then
|
||||
Return True
|
||||
End If
|
||||
Dim damage As Integer = BattleScreen.FieldEffects.OwnLastDamage
|
||||
If Own = True Then
|
||||
damage = BattleScreen.FieldEffects.OppLastDamage
|
||||
End If
|
||||
If damage > 0 Then
|
||||
Dim lastMove As Attack = BattleScreen.FieldEffects.OwnLastMove
|
||||
If Own = True Then
|
||||
lastMove = BattleScreen.FieldEffects.OppLastMove
|
||||
End If
|
||||
If Not lastMove Is Nothing Then
|
||||
If lastMove.Category = Categories.Special Or lastMove.Category = Categories.Physical Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetDamage(Critical As Boolean, Own As Boolean, targetPokemon As Boolean, BattleScreen As BattleScreen) As Integer
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "Diving on the first turn, the user floats up and attacks on the next turn."
|
||||
Me.CriticalChance = 1
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.AllAdjacentTargets
|
||||
Me.Target = Targets.OneAdjacentTarget
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
@ -111,7 +111,7 @@
|
|||
BattleScreen.FieldEffects.OppDiveCounter = 1
|
||||
End If
|
||||
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " burrowed its way underground!"))
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " dived into the water!"))
|
||||
|
||||
Return True
|
||||
Else
|
||||
|
@ -132,6 +132,18 @@
|
|||
BattleScreen.FieldEffects.OppDiveCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
||||
Dim Dive As Integer = BattleScreen.FieldEffects.OwnDiveCounter
|
||||
If own = False Then
|
||||
Dive = BattleScreen.FieldEffects.OppDiveCounter
|
||||
End If
|
||||
|
||||
If Dive = 0 Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
|
@ -153,6 +165,21 @@
|
|||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||
MoveFails(own, BattleScreen)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -55,7 +55,7 @@
|
|||
Me.AIField2 = AIField.Recharge
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveRecharge(Own As Boolean, BattleScreen As BattleScreen)
|
||||
If Own = True Then
|
||||
BattleScreen.FieldEffects.OwnRecharge += 1
|
||||
Else
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Me.Description = "The user attacks by shooting muddy water at the opposing team. It may also lower the targets' accuracy."
|
||||
Me.CriticalChance = 1
|
||||
Me.IsHMMove = False
|
||||
Me.Target = Targets.OneAdjacentTarget
|
||||
Me.Target = Targets.AllAdjacentFoes
|
||||
Me.Priority = 0
|
||||
Me.TimesToAttack = 1
|
||||
'#End
|
||||
|
|
|
@ -11,7 +11,7 @@ Namespace Items.Standard
|
|||
Public Overrides ReadOnly Property CanBeUsed As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
_textureRectangle = New Rectangle(240, 384, 24, 24)
|
||||
_textureRectangle = New Rectangle(240, 288, 24, 24)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
@ -11,7 +11,7 @@ Namespace Items.Standard
|
|||
Public Overrides ReadOnly Property CanBeUsed As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
_textureRectangle = New Rectangle(216, 384, 24, 24)
|
||||
_textureRectangle = New Rectangle(216, 288, 24, 24)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
@ -11,7 +11,7 @@ Namespace Items.Standard
|
|||
Public Overrides ReadOnly Property CanBeUsed As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
_textureRectangle = New Rectangle(168, 384, 24, 24)
|
||||
_textureRectangle = New Rectangle(168, 288, 24, 24)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
@ -11,7 +11,7 @@ Namespace Items.Standard
|
|||
Public Overrides ReadOnly Property CanBeUsed As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
_textureRectangle = New Rectangle(144, 384, 24, 24)
|
||||
_textureRectangle = New Rectangle(144, 288, 24, 24)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
@ -11,7 +11,7 @@ Namespace Items.Standard
|
|||
Public Overrides ReadOnly Property CanBeUsed As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
_textureRectangle = New Rectangle(192, 384, 24, 24)
|
||||
_textureRectangle = New Rectangle(192, 288, 24, 24)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
@ -1017,11 +1017,11 @@ Public Class Pokemon
|
|||
Me._originalAbility = Nothing
|
||||
End If
|
||||
|
||||
If Not Me._originalItem Is Nothing Then
|
||||
Me.Item = net.Pokemon3D.Game.Item.GetItemByID(Me._originalItem.ID)
|
||||
Me.Item.AdditionalData = Me._originalItem.AdditionalData
|
||||
Me._originalItem = Nothing
|
||||
End If
|
||||
'If Not Me._originalItem Is Nothing Then
|
||||
' Me.Item = net.Pokemon3D.Game.Item.GetItemByID(Me._originalItem.ID)
|
||||
' Me.Item.AdditionalData = Me._originalItem.AdditionalData
|
||||
' Me._originalItem = Nothing
|
||||
'End If
|
||||
|
||||
Me.IsTransformed = False
|
||||
|
||||
|
@ -1637,7 +1637,36 @@ Public Class Pokemon
|
|||
Me.HP = Me.HP.Clamp(0, Me.MaxHP)
|
||||
End If
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Returns the important save data from the Pokémon to be displayed in the Hall of Fame.
|
||||
''' </summary>
|
||||
Public Function GetHallOfFameData() As String
|
||||
Dim Data As String = ""
|
||||
Dim SaveGender As Integer = 0
|
||||
If Me.Gender = Genders.Female Then
|
||||
SaveGender = 1
|
||||
End If
|
||||
If Me.IsGenderless = True Then
|
||||
SaveGender = 2
|
||||
End If
|
||||
|
||||
Dim shinyString As String = "0"
|
||||
If Me.IsShiny = True Then
|
||||
shinyString = "1"
|
||||
End If
|
||||
|
||||
Data = "{""Pokemon""[" & Me.Number & "]}" &
|
||||
"{""Gender""[" & SaveGender & "]}" &
|
||||
"{""NickName""[" & Me.NickName & "]}" &
|
||||
"{""Level""[" & Me.Level & "]}" &
|
||||
"{""OT""[" & Me.OT & "]}" &
|
||||
"{""CatchTrainer""[" & Me.CatchTrainerName & "]}" &
|
||||
"{""isShiny""[" & shinyString & "]}" &
|
||||
"{""AdditionalData""[" & Me.AdditionalData & "]}" &
|
||||
"{""IDValue""[" & Me.IndividualValue & "]}"
|
||||
|
||||
Return Data
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Returns the save data from the Pokémon.
|
||||
''' </summary>
|
||||
|
|
|
@ -4,9 +4,9 @@ Public Class PokemonForms
|
|||
|
||||
Public Shared Sub Initialize()
|
||||
_pokemonList.Clear()
|
||||
_pokemonList.AddRange({New Charizard(), New Beedrill(), New Pidgeot(), New Nidoran(), New Alakazam(), New Slowbro(), New Gengar(),
|
||||
New Pichu(), New Unown(), New Ampharos(), New Steelix(), New Scizor(), New Heracross(), New Tyranitar(),
|
||||
New Sceptile(), New Blaziken(), New Swampert(), New Gardevoir(), New Aggron(), New Medicham(), New Camerupt(), New Altaria(), New Banette(), New Absol(), New Metagross(), New Kyogre(), New Groudon(), New Deoxys(),
|
||||
_pokemonList.AddRange({New Venusaur(), New Charizard(), New Blastoise(), New Beedrill(), New Pidgeot(), New Nidoran(), New Alakazam(), New Slowbro(), New Gengar(), New Kangaskhan(), New Pinsir(), New Gyarados(), New Aerodactyl(), New Mewtwo(),
|
||||
New Pichu(), New Unown(), New Ampharos(), New Steelix(), New Scizor(), New Heracross(), New Houndoom(), New Tyranitar(),
|
||||
New Sceptile(), New Blaziken(), New Swampert(), New Gardevoir(), New Sableye(), New Mawile(), New Aggron(), New Medicham(), New Manectric(), New Sharpedo(), New Camerupt(), New Altaria(), New Banette(), New Absol(), New Glalie(), New Salamence(), New Metagross(), New Latias(), New Latios(), New Kyogre(), New Groudon(), New Rayquaza(), New Deoxys(),
|
||||
New Burmy(), New Shellos(), New Gastrodon(), New Lopunny(), New Garchomp(), New Lucario(), New Abomasnow(), New Gallade(), New Rotom(), New Dialga(), New Arceus(),
|
||||
New Audino(), New Basculin(), New Deerling(), New Sawsbuck(), New Frillish(), New Jellicent(), New Tornadus(), New Thundurus(), New Landorus(), New Kyurem(),
|
||||
New Vivillon(), New Pyroar(), New Aegislash(), New Diancie()})
|
||||
|
@ -194,6 +194,47 @@ Public Class PokemonForms
|
|||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Private Class Venusaur
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(3)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(24, 29)
|
||||
Case Else
|
||||
Return New Vector2(2, 0)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Charizard
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -216,7 +257,7 @@ Public Class PokemonForms
|
|||
Case "mega_y"
|
||||
Return New Size(38, 32)
|
||||
Case Else
|
||||
Return New Size(35, 32)
|
||||
Return New Size(32, 32)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
|
@ -252,6 +293,46 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Blastoise
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(9)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(29, 29)
|
||||
Case Else
|
||||
Return New Vector2(8, 0)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Beedrill
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -470,6 +551,214 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Kangaskhan
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(115)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(26, 29)
|
||||
Case Else
|
||||
Return New Vector2(18, 3)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Pinsir
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(127)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(0, 29)
|
||||
Case Else
|
||||
Return New Vector2(30, 3)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Gyarados
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(130)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(31, 27)
|
||||
Case Else
|
||||
Return New Vector2(1, 4)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Aerodactyl
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(142)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(20, 29)
|
||||
Case Else
|
||||
Return New Vector2(13, 4)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Mewtwo
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(150)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega_x"
|
||||
Return New Vector2(14, 29)
|
||||
Case "mega_y"
|
||||
Return New Vector2(28, 29)
|
||||
Case Else
|
||||
Return New Vector2(21, 4)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega_x"
|
||||
Return "_mega_x"
|
||||
Case "mega_y"
|
||||
Return "_mega_y"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega_x"
|
||||
Return P.OriginalName & "_mega_x"
|
||||
Case "mega_y"
|
||||
Return P.OriginalName & "_mega_y"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega_x"
|
||||
Return "_mega_x"
|
||||
Case "mega_y"
|
||||
Return "_mega_y"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Pichu
|
||||
|
||||
Inherits PokemonForm
|
||||
|
@ -709,6 +998,46 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Houndoom
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(229)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(4, 29)
|
||||
Case Else
|
||||
Return New Vector2(4, 7)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Tyranitar
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -917,6 +1246,86 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Sableye
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(302)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(19, 26)
|
||||
Case Else
|
||||
Return New Vector2(13, 9)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Mawile
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(303)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(13, 29)
|
||||
Case Else
|
||||
Return New Vector2(14, 9)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Aggron
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -997,6 +1406,86 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Manectric
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(310)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(11, 29)
|
||||
Case Else
|
||||
Return New Vector2(21, 9)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Sharpedo
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(319)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(20, 26)
|
||||
Case Else
|
||||
Return New Vector2(30, 9)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Camerupt
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -1157,6 +1646,94 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Glalie
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(362)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(29, 27)
|
||||
Case Else
|
||||
Return New Vector2(9, 11)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Salamence
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(373)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(23, 26)
|
||||
Case Else
|
||||
Return New Vector2(20, 11)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetMenuImageSize(ByVal P As Pokemon) As Size
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Size(35, 32)
|
||||
Case Else
|
||||
Return New Size(32, 32)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Metagross
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -1197,6 +1774,100 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Latias
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(380)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(28, 26)
|
||||
Case Else
|
||||
Return New Vector2(27, 11)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetMenuImageSize(ByVal P As Pokemon) As Size
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Size(35, 32)
|
||||
Case Else
|
||||
Return New Size(32, 32)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Latios
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(381)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(30, 26)
|
||||
Case Else
|
||||
Return New Vector2(28, 11)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetMenuImageSize(ByVal P As Pokemon) As Size
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Size(35, 32)
|
||||
Case Else
|
||||
Return New Size(32, 32)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Kyogre
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
|
@ -1293,6 +1964,53 @@ Public Class PokemonForms
|
|||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Rayquaza
|
||||
Inherits PokemonForm
|
||||
Public Sub New()
|
||||
MyBase.New(384)
|
||||
End Sub
|
||||
Public Overrides Function GetMenuImagePosition(ByVal P As Pokemon) As Vector2
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Vector2(26, 25)
|
||||
Case Else
|
||||
Return New Vector2(31, 11)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetMenuImageSize(ByVal P As Pokemon) As Size
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return New Size(38, 32)
|
||||
Case Else
|
||||
Return New Size(32, 32)
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetAnimationName(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return P.OriginalName & "_mega"
|
||||
Case Else
|
||||
Return P.OriginalName
|
||||
End Select
|
||||
End Function
|
||||
Public Overrides Function GetOverworldAddition(ByVal P As Pokemon) As String
|
||||
Select Case P.AdditionalData
|
||||
Case "mega"
|
||||
Return "_mega"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Deoxys
|
||||
|
||||
Inherits PokemonForm
|
||||
|
@ -1720,7 +2438,14 @@ Public Class PokemonForms
|
|||
Return MyBase.GetOverworldAddition(P)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetDataFileAddition(ByVal AdditionalData As String) As String
|
||||
Select Case AdditionalData.ToLower()
|
||||
Case "primal"
|
||||
Return "_primal"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class Arceus
|
||||
|
|
|
@ -459,6 +459,8 @@ Public Class GameMode
|
|||
End If
|
||||
Case "startrotation"
|
||||
Me._startRotation = CSng(Value.Replace(".", GameController.DecSeparator))
|
||||
Case "startscript"
|
||||
StartScript = Value
|
||||
Case "startlocationname"
|
||||
Me._startLocationName = Value
|
||||
Case "startdialogue"
|
||||
|
@ -590,6 +592,7 @@ Public Class GameMode
|
|||
"StartMap|" & Me._startMap & vbNewLine &
|
||||
"StartPosition|" & Me._startPosition.X.ToString().Replace(GameController.DecSeparator, ".") & "," & Me._startPosition.Y.ToString().Replace(GameController.DecSeparator, ".") & "," & Me._startPosition.Z.ToString().Replace(GameController.DecSeparator, ".") & vbNewLine &
|
||||
"StartRotation|" & Me._startRotation.ToString().Replace(GameController.DecSeparator, ".") & vbNewLine &
|
||||
"StartScript|" & StartScript & vbNewLine &
|
||||
"StartLocationName|" & Me._startLocationName & vbNewLine &
|
||||
"StartDialogue|" & Me._startDialogue & vbNewLine &
|
||||
"StartColor|" & Me._startColor.R & "," & Me._startColor.G & "," & Me._startColor.B & vbNewLine &
|
||||
|
@ -980,6 +983,11 @@ Public Class GameMode
|
|||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' The default gamemode boot up script.
|
||||
''' </summary>
|
||||
Public Property StartScript As String = ""
|
||||
|
||||
#End Region
|
||||
|
||||
Class GameRule
|
||||
|
|
|
@ -200,7 +200,11 @@
|
|||
MediaPlayer.Stop()
|
||||
currentSong = "nomusic"
|
||||
End Sub
|
||||
|
||||
Public Shared Sub IgnoreLastSong()
|
||||
currentSong = "nomusic"
|
||||
SongList.Add("nomusic")
|
||||
IntroStarted = False
|
||||
End Sub
|
||||
Public Shared Sub PlayMusic(ByVal Song As String, ByVal SearchForIntro As Boolean, ByVal NewFadeInSpeed As Single, ByVal NewFadeOutSpeed As Single)
|
||||
Dim lastSong As String = "nomusic"
|
||||
|
||||
|
|
|
@ -130,8 +130,8 @@ Public Class TextureManager
|
|||
End Function
|
||||
|
||||
Public Shared Function GetTexture(ByVal Texture As Texture2D, ByVal Rectangle As Rectangle, Optional ByVal Factor As Integer = 1) As Texture2D
|
||||
Dim tex As Texture2D
|
||||
|
||||
Dim tex As Texture2D = Nothing
|
||||
|
||||
If TextureRectList.TryGetValue(New KeyValuePair(Of Int32, Rectangle)(Texture.GetHashCode(), Rectangle), tex) then
|
||||
Return tex
|
||||
End If
|
||||
|
|
|
@ -169,9 +169,9 @@
|
|||
Case 9
|
||||
AnimationIndex = 10
|
||||
Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, p))
|
||||
Case 10 'After Catch
|
||||
Case 10 ' After Catch
|
||||
If p.CatchBall.ID = 186 Then
|
||||
p.FullRestore() 'Heal Ball
|
||||
p.FullRestore() ' Heal Ball
|
||||
End If
|
||||
|
||||
PlayerStatistics.Track("Caught Pokemon", 1)
|
||||
|
@ -181,7 +181,7 @@
|
|||
Core.SetScreen(Me.PreScreen)
|
||||
BattleSystem.Battle.Won = True
|
||||
CType(Core.CurrentScreen, BattleSystem.BattleScreen).EndBattle(False)
|
||||
Case 20 'Failed
|
||||
Case 20 ' Failed
|
||||
If Core.Player.Pokemons.Count < 6 Then
|
||||
Dim p As Pokemon = BattleScreen.OppPokemon
|
||||
p.SetCatchInfos(Me.Ball, "Illegally caught!")
|
||||
|
@ -190,7 +190,7 @@
|
|||
End If
|
||||
ResetVisibility()
|
||||
Core.SetScreen(Me.PreScreen)
|
||||
Case 21 'After Break
|
||||
Case 21 ' After Break
|
||||
ResetVisibility()
|
||||
Core.SetScreen(Me.PreScreen)
|
||||
CType(Core.CurrentScreen, BattleSystem.BattleScreen).Battle.InitializeRound(CType(Core.CurrentScreen, BattleSystem.BattleScreen), New BattleSystem.Battle.RoundConst() With {.StepType = BattleSystem.Battle.RoundConst.StepTypes.Text, .Argument = "It broke free!"})
|
||||
|
@ -282,7 +282,7 @@
|
|||
Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, 0.05F), New Vector3(0, 0, 1.0F), 0.0F, 4.0F, False, False, True, True))
|
||||
Case 4, 6
|
||||
Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, -0.05F), New Vector3(0, 0, -1.0F), 0.0F, 4.0F, False, False, True, True))
|
||||
Case 7 'Catch Animation
|
||||
Case 7 ' Catch Animation
|
||||
For i = 0 To 2
|
||||
Dim v As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z)
|
||||
|
||||
|
@ -291,7 +291,7 @@
|
|||
Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, 0.0F, 6.0F))
|
||||
Case 8
|
||||
Animations.Add(New BAOpacity(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), 0.01F, False, 0.0F, 0.0F, 0.0F))
|
||||
Case 21 'Break Animation
|
||||
Case 21 ' Break Animation
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
|
|
|
@ -45,11 +45,11 @@
|
|||
|
||||
If Delay >= 3.0F Then
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Max HP: " & OldStats(0).ToString(), New Vector2(p.X + 32, p.Y + 84), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Attack: " & OldStats(1).ToString(), New Vector2(p.X + 32, p.Y + 124), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Attack: " & OldStats(1).ToString(), New Vector2(p.X + 32, p.Y + 124), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Defense: " & OldStats(2).ToString(), New Vector2(p.X + 32, p.Y + 164), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Sp Attack: " & OldStats(3).ToString(), New Vector2(p.X + 32, p.Y + 204), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Sp Defense: " & OldStats(4).ToString(), New Vector2(p.X + 32, p.Y + 244), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Speed: " & OldStats(5).ToString(), New Vector2(p.X + 32, p.Y + 284), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Sp Defense: " & OldStats(4).ToString(), New Vector2(p.X + 32, p.Y + 244), Color.Black)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Speed: " & OldStats(5).ToString(), New Vector2(p.X + 32, p.Y + 284), Color.Black)
|
||||
End If
|
||||
If Delay >= 5.0F Then
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newMaxHP, New Vector2(p.X + 200, p.Y + 84), Color.Black)
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
|
||||
Public Overrides Sub ChangeTo()
|
||||
MusicManager.PlayMusic("nomusic", False)
|
||||
Core.Player.Inventory.RemoveItem(177) 'Remove all Park Balls.
|
||||
Core.Player.Inventory.RemoveItem(177) ' Remove all Park Balls (happens regardless of whether or not the player was currently in the Bug-Catching Contest).
|
||||
PlayerStatistics.Track("Blackouts", 1)
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Public Class CreditsScreen
|
||||
Public Class CreditsScreen
|
||||
|
||||
Inherits Screen
|
||||
|
||||
Private Const COPYRIGHTYEAR As String = "2015"
|
||||
Private Const COPYRIGHTYEAR As String = "2017"
|
||||
|
||||
Dim CreditsPages As New List(Of CreditsPage)
|
||||
Dim CurrentPageIndex As Integer = 0
|
||||
|
@ -48,36 +48,38 @@
|
|||
MediaPlayer.IsRepeating = False
|
||||
End Sub
|
||||
|
||||
' The text that shows during the credits:
|
||||
Private Sub InitializeCreditsPages(ByVal ending As String)
|
||||
CreditsPages.Add(New CreditsPage("Pokémon3D staff", Color.White, Color.Black))
|
||||
CreditsPages.Add(New CreditsPage("Pokémon3D Staff", Color.White, Color.Black))
|
||||
CreditsPages.Add(New CreditsPage("Pokémon", Color.White, Color.Black, {"made by", "Nintendo", "Game Freak", "The Pokémon Company"}.ToList()))
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = True Then
|
||||
CreditsPages.Add(New CreditsPage("Pokémon3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Pokémon 3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games"}.ToList()))
|
||||
Else
|
||||
CreditsPages.Add(New CreditsPage("Pokémon3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games", "", "GameMode made by", GameModeManager.ActiveGameMode.Author}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Pokémon 3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games", "", "GameMode made by", GameModeManager.ActiveGameMode.Author}.ToList()))
|
||||
End If
|
||||
CreditsPages.Add(New CreditsPage("Team Kolben", Color.White, Color.Black, {"Nils Drescher", "Andrew Leach", "Marc Boisvert-Dupras", "Grant Garrett", "Jason Houston", "Daniel Billing", "Benjamin Smith", "Hunter Graves"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Director", Color.White, Color.Black, {"Nils Drescher"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Programming", Color.White, Color.Black, {"Nils Drescher", "Jason Houston", "William Lang"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Graphics", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", """Godeken""", "Caleb Coleman", "Robert Nobbmann", "Manuel Lampe", "Miguel Nunez", "Grant Garrett", """Anvil555"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Map design", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", "Hunter Graves", "Manuel Lampe", "Robert Nobbmann", "Maximilian Schröder", "Jan Mika Eine", "Jason Houston"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Actionscript", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", "Hunter Graves", "Andrew Leach", "Jason Houston"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Script System development", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", "Hunter Graves"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("KolbenWindowWidget development", Color.White, Color.Black, {"Jason Houston"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("LUA implementation", Color.White, Color.Black, {"Jason Houston"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Launcher programming", Color.White, Color.Black, {"Nils Drescher", "Daniel Billing", """ThuxCommix"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Open Source Development Team", Color.White, Color.Black, {"Benjamin Smith", "Yong Jian Ming", """Aragas""", """oXFantaXo""", "Jorge Luis Espinoza", "Conner Joseph Brewster"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Programming", Color.White, Color.Black, {"Nils Drescher", "Jason Houston", "William Lang", "Benjamin Smith", "Yong Jian Ming", "Jorge Luis Espinoza", """Aragas"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Graphic Design", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", """Godeken""", "Caleb Coleman", "Robert Nobbmann", "Manuel Lampe", "Miguel Nunez", "Grant Garrett", """Anvil555""", """Omega Ghost"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Map Design", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", "Hunter Graves", "Manuel Lampe", "Robert Nobbmann", "Maximilian Schröder", "Jan Mika Eine", "Jason Houston", """oXFantaXo"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Actionscript", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", "Hunter Graves", "Andrew Leach", "Jason Houston", "Yong Jian Ming", """Aragas""" }.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Script System Development", Color.White, Color.Black, {"Nils Drescher", "Benjamin Smith", "Hunter Graves", "Yong Jian Ming", """Aragas"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("KolbenWindowWidget Development & LUA Implementation", Color.White, Color.Black, {"Jason Houston"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Launcher Programming", Color.White, Color.Black, {"Nils Drescher", "Daniel Billing", """ThuxCommix""", """Aragas"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Pokéditor Programming", Color.White, Color.Black, {"Nils Drescher", "Jason Houston", "Hunter Graves"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Website Host/Server maintenance", Color.White, Color.Black, {"Daniel Billing", "Daniel Laube"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("GameJolt Service/API programming", Color.White, Color.Black, {"David DeCarmine", "Nils Drescher"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Debug testing", Color.White, Color.Black, {"Jan Mika Eine", "Tim Drescher", "Daniel Steinborn", "Andrew Leach", "Marc Boisvert-Dupras", "Matt Chambers", "Hunter Graves", "Benjamin Smith", "William Hunn", "Torben Carrington", """oXFantaXo"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Website Host/Server Maintenance", Color.White, Color.Black, {"Daniel Billing", "Daniel Laube"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("GameJolt Service/API Programming", Color.White, Color.Black, {"David DeCarmine", "Nils Drescher"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Debug Testing", Color.White, Color.Black, {"Jan Mika Eine", "Tim Drescher", "Daniel Steinborn", "Andrew Leach", "Marc Boisvert-Dupras", "Matt Chambers", "Hunter Graves", "Benjamin Smith", "William Hunn", "Torben Carrington", """oXFantaXo""", "Conner Joseph Brewster"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Special Thanks", Color.White, Color.Black, {"""MunchingOrange""", """TheFlamingSpade""", """SlyFoxHound""", """ArsenioDev""", """TrUShade""", """Isaaking6"""}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Special Thanks", Color.White, Color.Black, {"Davey Van Raaij", "Diego López", "The GameJolt team", "The AppSharp team", "The Smogon University Team"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("Special Thanks", Color.White, Color.Black, {"Davey Van Raaij", "Diego López", "The GameJolt Team", "The AppSharp Team", "The Smogon University Team"}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("", Color.White, Color.Black, {"And probably a lot more.", "Especially all the awesome people from", "the pokemon3d.net community.", "Thanks for helping and playing this great game."}.ToList()))
|
||||
CreditsPages.Add(New CreditsPage("", Color.White, Color.Black))
|
||||
CreditsPages.Add(New CreditsPage("", Color.White, Color.Black))
|
||||
CreditsPages.Add(New CreditsPage("THE END", Color.White, Color.Black, {"Thank you for playing!"}.ToList()))
|
||||
End Sub
|
||||
|
||||
' Credit camera starting positions:
|
||||
Private Sub InitializeCameraLevels(ByVal ending As String)
|
||||
Select Case ending.ToLower()
|
||||
Case "johto"
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
|
||||
Private Structure GradientConfiguration
|
||||
|
||||
Private Texture As Texture2D 'Stores the generated texture
|
||||
Private Texture As Texture2D ' Stores the generated texture
|
||||
|
||||
Private Width As Integer
|
||||
Private Height As Integer
|
||||
|
@ -213,7 +213,7 @@
|
|||
cA = 255 + cA
|
||||
End If
|
||||
|
||||
If Horizontal = True Then 'left to right gradient
|
||||
If Horizontal = True Then ' Left to right gradiant.
|
||||
Dim c As Color = New Color(cR, cG, cB, cA)
|
||||
|
||||
Dim length As Integer = CInt(Math.Ceiling(stepSize))
|
||||
|
@ -258,7 +258,7 @@
|
|||
Shared gradientConfigs As New List(Of GradientConfiguration)
|
||||
|
||||
Public Shared Sub DrawGradient(ByVal Rectangle As Rectangle, ByVal fromColor As Color, ByVal toColor As Color, ByVal Horizontal As Boolean, ByVal Steps As Integer)
|
||||
Horizontal = Not Horizontal 'because fuck you.
|
||||
Horizontal = Not Horizontal
|
||||
|
||||
Dim gConfig As GradientConfiguration = Nothing
|
||||
Dim foundConfig As Boolean = False
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Dim mainTexture As Texture2D
|
||||
Dim scrollTexture As Texture2D
|
||||
|
||||
Dim DonatorList() As String = {"Steven Sinclair", "Diego López", "Corbin Lair", "Michael Langen", "Diego Lopez", "Sam Schultz", "Tom Bolen", "Lewis Thompson", "William Hafey", "Edward Akus", "Arno Wendorff", "Kim Nay", "Danie Daniels", "Joe Palacios", "Stuart Oxtoby", "Jack Mckenzie", "Michael Cutipa", "The Homies", "Alicia Barfoot", "Maintrain97", "Shinytish", "Michael Molina", "Edward Akus"}
|
||||
Dim DonatorList() As String = {"Many Anonymous Donors", "Username99", "Merder222", "Felipe 2", "Kuro95", "WheresMyTea", "RandomBounty", "NumseFisK", "abcoanon", "SirMarty", "The_Merciless95", "adm0n", "Avaluque", "Duck Tard", "L3_Purr", "Derata", "TheFlipside", "Zippo", "Dirty Harry", "Chaos7777", "Sontee", "PsYcO363", "Sammyinside", "mickeystand1", "Tripsaur", "Fox405", "LoganKnez", "Jehowi", "Sedat", "Mischapus", "PeanutButter", "Nathan Wilson", "Fluffy", "Shou Liengod", "Gorogok", "Yoshina", "Hodsy Beats", "takenbycats", "sorixkhaos", "lordkango", "northway", "bloodeyezack", "gladdy16", "Paradetheday", "Gawerty", "Haydos709", "ShadyGame", "Mikolaj Nowicki", "Koolboyman", "TrainerStan", "carebear", "Bedders", "Matz", "ITAxDarko", "Rhyinn", "arthegon", "bmalfer", "Noah Cloud", "Matti", "Yrael", "Tornado9797", "Wilkojc", "Namu", "SACooper95", "nilllzz", "Nesasio", "beenlord", "Maria", "JohnnyRooks", "Calcifer", "Nyves", "Daniel Saavedra", "DannyM93", "The-amazing-blackstar", "DevoidLight", "OhSnapItsDavid", "Anvil555", "Clanor", "Liamash3", "Daysofthenew690", "Luan Nicholas", "Pushacher19", "Meowth", "DarknessYami", "Gameshark93", "Enethil", "Gnifle", "abovo", "p1neapple", "Destructosaur", "Darkfire", "Tim Dargan", "PrincessKooh", "Tyler Snyder", "hannes3120", "Raa", "Richard Tisher", "Brutalicious", "DarkLink", "Mpilemann", "PerrBearr", "robod", "Davey", "Colin_Mg", "Whitney", "mreh", "zXxLIPSxXz", "Xane", "LeeMan", "ekwilson79", "Darrin Danhauer", "AlessaGarnish", "Sola", "Luffy343", "Masasume", "Grabsak Turnkoff", "Sporkedmango", "Splint", "Mitchmack", "Pegasuraptor", "CrayonDoctor", "Olliewott", "Maizox", "Gamester565", "Michael", "Syrca", "PaperDanie2", "Gamerunner15", "Ashurnasirpal", "edward", "Gusty Glalie", "DracoHouston", "BakaOnibi", "Tj8805", "Lunick", "Karasu416", "Steven Sinclair", "Corbin Lair", "Michael Langen", "Diego López", "Sam Schultz", "Tom Bolen", "Lewis Thompson", "William Hafey", "Edward Akus", "Arno Wendorff", "Kim Nay", "Danie Daniels", "Joe Palacios", "Stuart Oxtoby", "Jack Mckenzie", "Michael Cutipa", "The Homies", "Alicia Barfoot", "Maintrain97", "Shinytish", "Michael Molina", "Edward Akus"}
|
||||
Dim OffsetY As Integer = 0
|
||||
Const ScrollSpeed As Single = 35.0F
|
||||
|
||||
|
@ -16,16 +16,16 @@
|
|||
|
||||
Me.scrollTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
||||
|
||||
Dim l As New List(Of String)
|
||||
Dim oldL As List(Of String) = DonatorList.ToList()
|
||||
' Dim l As New List(Of String)
|
||||
Dim l As List(Of String) = DonatorList.ToList()
|
||||
|
||||
While oldL.Count > 0
|
||||
Dim i As Integer = Core.Random.Next(0, oldL.Count)
|
||||
l.Add(oldL(i))
|
||||
oldL.RemoveAt(i)
|
||||
End While
|
||||
' Decided to remove the seemingly unnecessary randomization of the donor list. Re-implement if voted back in. - Tornado9797
|
||||
|
||||
l.Add("Missingno.")
|
||||
' While oldL.Count > 0
|
||||
' Dim i As Integer = Core.Random.Next(0, oldL.Count)
|
||||
' l.Add(oldL(i))
|
||||
' oldL.RemoveAt(i)
|
||||
' End While
|
||||
|
||||
DonatorList = l.ToArray()
|
||||
End Sub
|
||||
|
@ -37,7 +37,7 @@
|
|||
If Controls.Down(True, True, True, True) = True Then
|
||||
OffsetY += 1
|
||||
End If
|
||||
OffsetY = CInt(MathHelper.Clamp(OffsetY, 0, DonatorList.Count - 13))
|
||||
OffsetY = CInt(MathHelper.Clamp(OffsetY, 0, DonatorList.Count - 12))
|
||||
|
||||
If Controls.Dismiss() = True Then
|
||||
Core.SetScreen(Me.PreScreen)
|
||||
|
@ -50,7 +50,7 @@
|
|||
Core.SpriteBatch.Draw(mainTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 285, 0, 570, 680), Color.White)
|
||||
|
||||
Dim t As String = ""
|
||||
For i = OffsetY To 12 + OffsetY
|
||||
For i = OffsetY To 11 + OffsetY
|
||||
If i <> OffsetY Then
|
||||
t &= vbNewLine & vbNewLine
|
||||
End If
|
||||
|
@ -59,8 +59,8 @@
|
|||
End If
|
||||
Next
|
||||
|
||||
If DonatorList.Count > 13 Then
|
||||
Canvas.DrawScrollBar(New Vector2(CInt(Core.windowSize.Width / 2) + 180, 100), DonatorList.Count, 13, OffsetY, New Size(4, 500), False, TextureManager.GetTexture(scrollTexture, New Rectangle(112, 12, 1, 1)), TextureManager.GetTexture(scrollTexture, New Rectangle(113, 12, 1, 1)))
|
||||
If DonatorList.Count > 12 Then
|
||||
Canvas.DrawScrollBar(New Vector2(CInt(Core.windowSize.Width / 2) + 180, 100), DonatorList.Count, 12, OffsetY, New Size(4, 500), False, TextureManager.GetTexture(scrollTexture, New Rectangle(112, 12, 1, 1)), TextureManager.GetTexture(scrollTexture, New Rectangle(113, 12, 1, 1)))
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, t, New Vector2(CInt(Core.windowSize.Width / 2) - 180, 100), Color.Black)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
dateString = day & "-" & month & "-" & year & "_" & hour & "." & minute & "." & second
|
||||
End With
|
||||
|
||||
'Date|IsScriptOrigin|Name|Data|ShowOnTimeline
|
||||
' Date|IsScriptOrigin|Name|Data|ShowOnTimeline
|
||||
Core.Player.HistoryData &= dateString & "|" & IsScriptOrigin.ToNumberString() & "|" & Name & "|" & Data & "|" & ShowOnTimeline.ToNumberString()
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
Core.SpriteBatch.Draw(Item.Texture, New Rectangle(78, 124, 48, 48), Color.White)
|
||||
|
||||
If Me.canExit = True Then
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "PRESS E TO GO BACK", New Vector2(710, 580), Color.DarkGray)
|
||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Press the E key to go back.", New Vector2(640, 580), Color.DarkGray)
|
||||
End If
|
||||
|
||||
For i = 0 To Me.PokemonList.Count - 1
|
||||
|
@ -330,7 +330,7 @@
|
|||
If LearnType > 0 Then
|
||||
AttackLable = "Unable!"
|
||||
Select Case LearnType
|
||||
Case 1 'TM/HM
|
||||
Case 1 ' Technical/Hidden Machine
|
||||
If CType(moveLearnArg, Items.TechMachine).CanTeach(Pokemon) = "" Then
|
||||
AttackLable = "Able!"
|
||||
End If
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue