Merge pull request #204 from P3D-Legacy/0.61-implementations
0.61 implementations
This commit is contained in:
commit
fdc89e31e8
|
@ -24,8 +24,8 @@
|
|||
Dim Argument As Object
|
||||
End Structure
|
||||
|
||||
Public OwnStep As RoundConst
|
||||
Public OppStep As RoundConst
|
||||
Public Shared OwnStep As RoundConst
|
||||
Public Shared OppStep As RoundConst
|
||||
|
||||
''' <summary>
|
||||
''' Returns the move of a Pokémon with a specified ID.
|
||||
|
@ -631,8 +631,8 @@
|
|||
Exit Sub
|
||||
End If
|
||||
Dim OppStep = GetOppStep(BattleScreen, OwnStep)
|
||||
Me.OwnStep = OwnStep
|
||||
Me.OppStep = OppStep
|
||||
Battle.OwnStep = OwnStep
|
||||
Battle.OppStep = OppStep
|
||||
BattleScreen.OwnFaint = False '''
|
||||
BattleScreen.OppFaint = False '''
|
||||
If OwnStep.StepType = RoundConst.StepTypes.Move Then
|
||||
|
@ -2815,6 +2815,20 @@
|
|||
End If
|
||||
moveUsed.MoveMisses(own, BattleScreen)
|
||||
End If
|
||||
''Own Pokémon Encore
|
||||
Dim attackIndex As Integer = -1
|
||||
If own = True AndAlso BattleScreen.FieldEffects.OwnEncore > 0 Then
|
||||
For a = 0 To BattleScreen.OwnPokemon.Attacks.Count - 1
|
||||
If BattleScreen.OwnPokemon.Attacks(a).ID = BattleScreen.FieldEffects.OwnEncoreMove.ID Then
|
||||
attackIndex = a
|
||||
End If
|
||||
Next
|
||||
If attackIndex <> -1 AndAlso BattleScreen.OwnPokemon.Attacks(attackIndex).CurrentPP = 0 Then
|
||||
BattleScreen.FieldEffects.OwnEncoreMove = Nothing
|
||||
BattleScreen.FieldEffects.OwnEncore = 0
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & "'s encore stopped."))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
|
|
|
@ -1002,8 +1002,25 @@
|
|||
Dim b As Double = op.BaseExperience
|
||||
|
||||
Dim t As Double = 1D
|
||||
If p.OT <> Core.Player.OT Then
|
||||
t = 1.5D
|
||||
If p.Item.IsGameModeItem = True Then
|
||||
If CType(p.Item, GameModeItem).gmExpMultiplier <> -1D AndAlso CType(p.Item, GameModeItem).gmOverrideTradeExp = True Then
|
||||
t = CType(p.Item, GameModeItem).gmExpMultiplier
|
||||
Else
|
||||
If p.OT <> Core.Player.OT Then
|
||||
t = 1.5D
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If p.OT <> Core.Player.OT Then
|
||||
t = 1.5D
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim gm As Double = 1D
|
||||
If p.Item.IsGameModeItem = True Then
|
||||
If CType(p.Item, GameModeItem).gmExpMultiplier <> -1D AndAlso CType(p.Item, GameModeItem).gmOverrideTradeExp = False Then
|
||||
gm = CType(p.Item, GameModeItem).gmExpMultiplier
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim e As Double = 1D
|
||||
|
@ -1037,7 +1054,7 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
Dim EXP As Integer = CInt((((a * b * L) / (5 * s)) * (((2 * L + 10) ^ 2.5D) / ((L + Lp + 10) ^ 2.5D)) + 1) * t * e * 1)
|
||||
Dim EXP As Integer = CInt((((a * b * L) / (5 * s)) * (((2 * L + 10) ^ 2.5D) / ((L + Lp + 10) ^ 2.5D)) + 1) * t * e * gm * 1)
|
||||
|
||||
If EXP < 2 Then
|
||||
EXP = 2
|
||||
|
|
|
@ -479,13 +479,17 @@
|
|||
|
||||
extraExtended = SelExtended
|
||||
End If
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended), 116 + Index * 96, 80, 80), New Rectangle(16, 16, 16, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 80, 116 + Index * 96, AllExtended + extraExtended - 80, 80), New Rectangle(32, 16, 16, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
||||
Dim BackgroundDrawColor As Color = Color.White
|
||||
If Move.Disabled > 0 OrElse BattleScreen.FieldEffects.OwnEncore > 0 AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID <> Move.ID Then
|
||||
BackgroundDrawColor = New Color(210, 210, 210)
|
||||
End If
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended), 116 + Index * 96, 80, 80), New Rectangle(16, 16, 16, 16), New Color(BackgroundDrawColor.R, BackgroundDrawColor.G, BackgroundDrawColor.B, 255 - deductAlpha))
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 80, 116 + Index * 96, AllExtended + extraExtended - 80, 80), New Rectangle(32, 16, 16, 16), New Color(BackgroundDrawColor.R, BackgroundDrawColor.G, BackgroundDrawColor.B, 255 - deductAlpha))
|
||||
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\Types", Me.Move.Type.GetElementImage(), ""), New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
||||
|
||||
If isSelected = True Then
|
||||
If Move.Disabled > 0 Then
|
||||
If Move.Disabled > 0 OrElse BattleScreen.FieldEffects.OwnEncore > 0 AndAlso BattleScreen.FieldEffects.OwnEncoreMove.ID <> Move.ID Then
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, "Disabled!", New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), Color.Black)
|
||||
Else
|
||||
Dim ppColor As Color = GetPPColor()
|
||||
|
@ -522,7 +526,7 @@
|
|||
|
||||
If Controls.Accept(False, True, True) = True And isSelected = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
If Me.Move.Disabled = 0 Then
|
||||
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
||||
Me.ClickAction(BattleScreen)
|
||||
End If
|
||||
End If
|
||||
|
@ -530,7 +534,7 @@
|
|||
If MouseHandler.IsInRectangle(New Rectangle(Core.ScreenSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
|
||||
If isSelected = True Then
|
||||
SoundManager.PlaySound("select")
|
||||
If Me.Move.Disabled = 0 Then
|
||||
If Me.Move.Disabled = 0 AndAlso BattleScreen.FieldEffects.OwnEncore = 0 OrElse BattleScreen.FieldEffects.OwnEncoreMove.ID = Move.ID Then
|
||||
Me.ClickAction(BattleScreen)
|
||||
End If
|
||||
Else
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
# This is an example type for a GameMode.
|
||||
# The default GameMode cannot load additional types, however all other GameModes can.
|
||||
# The type ID must be set and must lay above 20.
|
||||
# Here's a list of all properties that can be set: "ID", "Name", "TypeImageOffset", "ItemTextureSource", "ItemTextureOffset", "EffectivenessAttack", "EffectivenessDefense"
|
||||
|
||||
# To build your own type for your GameMode, create a new file with the .dat file extension in the Content\Data\Types folder and edit/retype the lines below (be sure to remove the # at the start of each line).
|
||||
# Lines that are removed will default to the values below:
|
||||
|
||||
#ID|0
|
||||
#Name|Normal
|
||||
#TypeImageOffset|0,0
|
||||
#ItemTextureSource|Items\ItemSheet
|
||||
#ItemTextureOffset|144,168
|
||||
#EffectivenessAttack|Rock,0.5;Ghost,0;Steel,0.5
|
||||
#EffectivenessDefense|Fighting,2;Ghost,0
|
|
@ -118,6 +118,9 @@ fieldmove_headbutt_used,used~Headbutt!
|
|||
|
||||
fieldmove_waterfall_used,used~Waterfall.
|
||||
|
||||
fieldmove_ride_cannot_walk,You cannot walk here!
|
||||
fieldmove_ride_cannot_ride,You cannot Ride here!
|
||||
fieldmove_ride_used,used~Ride!
|
||||
---
|
||||
GameInteractions:
|
||||
game_interaction_interact,Interact
|
||||
|
@ -2331,6 +2334,7 @@ item_name_676,Water Memory
|
|||
|
||||
Item Use Text:
|
||||
item_cannot_use,Now is not the time~to use that.
|
||||
item_6_cannot_walk,You cannot walk here!
|
||||
item_6_missingskin,You can't use this item~without a bicycle skin.*Its name should be the~same as your current one,~but with "_bike" at the end.
|
||||
item_6_only_custom_gamemodes,This item can't be used~on this GameMode.
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ Public Class Logger
|
|||
|
||||
Dim GameMode As String = "[No GameMode loaded]"
|
||||
If Not GameModeManager.ActiveGameMode Is Nothing Then
|
||||
GameMode = GameModeManager.ActiveGameMode.Name
|
||||
GameMode = GameModeManager.ActiveGameMode.DirectoryName
|
||||
End If
|
||||
|
||||
Dim OnlineInformation As String = "GameJolt Account: FALSE"
|
||||
|
|
|
@ -275,7 +275,7 @@ Namespace Servers
|
|||
GameJoltID = Core.GameJoltSave.GameJoltID
|
||||
End If
|
||||
|
||||
AddToDataItems(dataItems, GameModeManager.ActiveGameMode.Name.ToLower(), 0)
|
||||
AddToDataItems(dataItems, GameModeManager.ActiveGameMode.DirectoryName.ToLower(), 0)
|
||||
AddToDataItems(dataItems, Core.Player.IsGamejoltSave.ToNumberString(), 1)
|
||||
AddToDataItems(dataItems, GameJoltID, 2)
|
||||
AddToDataItems(dataItems, GameController.DecSeparator, 3)
|
||||
|
|
|
@ -59,7 +59,7 @@ Public Class NotificationPopup
|
|||
FrameSizeBack = CInt(BackTexture.Width / 3)
|
||||
_background = TextureManager.GetTexture(BackTexture, New Rectangle(CInt(_backgroundIndex.X * FrameSizeBack), CInt(_backgroundIndex.Y * FrameSizeBack), FrameSizeBack, FrameSizeBack))
|
||||
|
||||
_positionY = CInt(0 - _size.Height * (FrameSizeBack / 3) * _scale - 12)
|
||||
_positionY = CInt(0 - _size.Height * (FrameSizeBack / 3) * _scale - (FrameSizeBack / 3 * _scale) - 5)
|
||||
|
||||
If IconIndex <> -1 Then
|
||||
_iconIndex = New Vector2(IconIndex, 0)
|
||||
|
@ -127,7 +127,7 @@ Public Class NotificationPopup
|
|||
Dim BackY As Integer = CInt(0 - _size.Height * (FrameSizeBack / 3) * _scale - (FrameSizeBack / 3 * _scale) - 5)
|
||||
If Me._interacted = True OrElse _forceAccept = True Then
|
||||
If Me._positionY > BackY Then
|
||||
Me._positionY -= CInt(1.5 * (FrameSizeBack / 3 * _scale) / _size.Height)
|
||||
Me._positionY -= CInt(1.6 * (FrameSizeBack / 3 * _scale) / _size.Height)
|
||||
If Me._positionY <= BackY Then
|
||||
Me._positionY = BackY
|
||||
If Me._scriptFile <> "" Then
|
||||
|
@ -138,7 +138,7 @@ Public Class NotificationPopup
|
|||
End If
|
||||
Else
|
||||
If Me._positionY > BackY Then
|
||||
Me._positionY -= CInt(0.7 * (FrameSizeBack / 3 * _scale) / _size.Height)
|
||||
Me._positionY -= CInt(1.0 * (FrameSizeBack / 3 * _scale) / _size.Height)
|
||||
If Me._positionY <= BackY Then
|
||||
Me._positionY = BackY
|
||||
Me.IsReady = True
|
||||
|
|
|
@ -28775,6 +28775,7 @@
|
|||
<Compile Include="Pokemon\Abilities\Galvanize.vb" />
|
||||
<Compile Include="Pokemon\Abilities\SurgeSurfer.vb" />
|
||||
<Compile Include="Pokemon\Abilities\ParentalBond.vb" />
|
||||
<Compile Include="Pokemon\Attacks\AttackSpecialBasePower.vb" />
|
||||
<Compile Include="Pokemon\Attacks\Bug\PollenPuff.vb" />
|
||||
<Compile Include="Pokemon\Attacks\Bug\FirstImpression.vb" />
|
||||
<Compile Include="Pokemon\Attacks\Bug\FellStinger.vb" />
|
||||
|
@ -28929,6 +28930,7 @@
|
|||
<Compile Include="Pokemon\Items\Standard\ExpertBelt.vb" />
|
||||
<Compile Include="Pokemon\Items\Stones\IceStone.vb" />
|
||||
<Compile Include="Pokemon\Items\Stones\BlackAurugite.vb" />
|
||||
<Compile Include="Pokemon\Monster\GameModeElementLoader.vb" />
|
||||
<Compile Include="Resources\Blur\BlurHandler.vb" />
|
||||
<Content Include="Content\Data\Scripts\faraway\mewtwonite_y.dat">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
@ -31093,6 +31095,9 @@
|
|||
<Content Include="Content\Pokemon\Data\862.dat">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Content\Data\Types\example.dat">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="LICENSE" />
|
||||
<None Include="meta">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
|
|
@ -544,6 +544,7 @@
|
|||
End If
|
||||
GameModeManager.SetGameModePointer(GameMode)
|
||||
|
||||
BattleSystem.GameModeElementLoader.Load()
|
||||
BattleSystem.GameModeAttackLoader.Load()
|
||||
GameModeItemLoader.Load()
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
CanPoison
|
||||
CanBurn
|
||||
CanParalyse
|
||||
CanParalyze
|
||||
CanSleep
|
||||
CanFreeze
|
||||
CanConfuse
|
||||
|
@ -181,8 +181,10 @@
|
|||
Public IsDefaultMove As Boolean = False 'if Pound gets loaded instead of the correct move, this is true.
|
||||
|
||||
Public GameModeFunction As String = "" 'A GameMode can specify a pre defined function for a move.
|
||||
Public GameModeBasePower As String = "" 'A GameMode can specify a base power calculation for a move.
|
||||
Public IsGameModeMove As Boolean = False
|
||||
Public gmDeductPP As Boolean = True
|
||||
Public gmCopyMove As Integer = -1
|
||||
|
||||
Private _power As Integer = 40
|
||||
Private _accuracy As Integer = 100
|
||||
|
@ -197,6 +199,8 @@
|
|||
Public Target As Targets = Targets.OneAdjacentTarget
|
||||
Public Priority As Integer = 0
|
||||
Public TimesToAttack As Integer = 1
|
||||
Public gmTimesToAttack As String = "1"
|
||||
Public gmUseMoveAnims As Attack = Nothing
|
||||
Public EffectChances As New List(Of Integer)
|
||||
'#End
|
||||
|
||||
|
@ -1903,9 +1907,14 @@
|
|||
End Function
|
||||
|
||||
Public Function GetEffectChance(ByVal i As Integer, ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Integer
|
||||
Dim chance As Integer = Me.EffectChances(i)
|
||||
Dim _attack As Attack = Me
|
||||
If gmCopyMove <> -1 Then
|
||||
_attack = GameModeAttackLoader.GetAttackByID(gmCopyMove)
|
||||
End If
|
||||
|
||||
If Me.HasSecondaryEffect = True Then
|
||||
Dim chance As Integer = _attack.EffectChances(i)
|
||||
|
||||
If _attack.HasSecondaryEffect = True Then
|
||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||
If own = False Then
|
||||
p = BattleScreen.OppPokemon
|
||||
|
@ -1935,6 +1944,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub PreAttack(ByVal Own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).PreAttack(Own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE
|
||||
End Sub
|
||||
|
||||
|
@ -1944,6 +1956,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Function MoveFailBeforeAttack(ByVal Own As Boolean, ByVal BattleScreen As BattleScreen) As Boolean
|
||||
If gmCopyMove <> -1 Then
|
||||
Return GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveFailBeforeAttack(Own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE
|
||||
Return False
|
||||
End Function
|
||||
|
@ -1954,7 +1969,20 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Function GetBasePower(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Integer
|
||||
Return Me.Power
|
||||
If Me.IsGameModeMove = False Then
|
||||
Return Me.Power
|
||||
Else
|
||||
If gmCopyMove <> -1 Then
|
||||
Dim _attack As Attack = GameModeAttackLoader.GetAttackByID(gmCopyMove)
|
||||
If _attack.IsGameModeMove = False Then
|
||||
Return _attack.GetBasePower(own, BattleScreen)
|
||||
Else
|
||||
Return AttackSpecialBasePower.GetGameModeBasePower(_attack, own, BattleScreen)
|
||||
End If
|
||||
Else
|
||||
Return AttackSpecialBasePower.GetGameModeBasePower(Me, own, BattleScreen)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
|
@ -1963,7 +1991,12 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Function GetDamage(ByVal Critical As Boolean, ByVal Own As Boolean, ByVal targetPokemon As Boolean, ByVal BattleScreen As BattleScreen, Optional ByVal ExtraParameter As String = "") As Integer
|
||||
Return BattleCalculation.CalculateDamage(Me, Critical, Own, targetPokemon, BattleScreen, ExtraParameter)
|
||||
If gmCopyMove <> -1 Then
|
||||
Dim _attack As Attack = GameModeAttackLoader.GetAttackByID(gmCopyMove)
|
||||
Return BattleCalculation.CalculateDamage(_attack, Critical, Own, targetPokemon, BattleScreen, ExtraParameter)
|
||||
Else
|
||||
Return BattleCalculation.CalculateDamage(Me, Critical, Own, targetPokemon, BattleScreen, ExtraParameter)
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
|
@ -1972,7 +2005,28 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Function GetTimesToAttack(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Integer
|
||||
Return Me.TimesToAttack
|
||||
If Me.IsGameModeMove = False Then
|
||||
Return Me.TimesToAttack
|
||||
Else
|
||||
If gmCopyMove <> -1 Then
|
||||
Dim _attack As Attack = GameModeAttackLoader.GetAttackByID(gmCopyMove)
|
||||
If _attack.IsGameModeMove = False Then
|
||||
Return _attack.GetTimesToAttack(own, BattleScreen)
|
||||
Else
|
||||
If _attack.gmTimesToAttack.Contains("-") Then
|
||||
Return Core.Random.Next(CInt(_attack.gmTimesToAttack.GetSplit(0, "-")), CInt(_attack.gmTimesToAttack.GetSplit(1, "-")) + 1)
|
||||
Else
|
||||
Return CInt(_attack.gmTimesToAttack)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If gmTimesToAttack.Contains("-") Then
|
||||
Return Core.Random.Next(CInt(gmTimesToAttack.GetSplit(0, "-")), CInt(gmTimesToAttack.GetSplit(1, "-")) + 1)
|
||||
Else
|
||||
Return CInt(gmTimesToAttack)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
|
@ -1982,21 +2036,39 @@
|
|||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub MoveHits(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If Me.IsGameModeMove = True Then
|
||||
AttackSpecialFunctions.ExecuteMoveHitsFunction(Me, own, BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
Dim _attack As Attack = GameModeAttackLoader.GetAttackByID(gmCopyMove)
|
||||
If _attack.IsGameModeMove = False Then
|
||||
_attack.MoveHits(own, BattleScreen)
|
||||
Else
|
||||
AttackSpecialFunctions.ExecuteMoveHitsFunction(_attack, own, BattleScreen)
|
||||
End If
|
||||
Else
|
||||
AttackSpecialFunctions.ExecuteMoveHitsFunction(Me, own, BattleScreen)
|
||||
End If
|
||||
Else
|
||||
'DO NOTHING HERE (will do secondary effect if moves overrides it)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveRecoil(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveRecoil(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE (will do recoil if moves overrides it)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveRecharge(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveRecharge(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE (will do a one turn recharge if moves overrides it)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveMultiTurn(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveMultiTurn(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE (will do the multi turn countdown if moves overrides it)
|
||||
End Sub
|
||||
|
||||
|
@ -2010,6 +2082,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub MoveMisses(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveMisses(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE
|
||||
End Sub
|
||||
|
||||
|
@ -2019,6 +2094,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub MoveProtectedDetected(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveProtectedDetected(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE
|
||||
End Sub
|
||||
|
||||
|
@ -2028,6 +2106,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub MoveHasNoEffect(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveHasNoEffect(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING HERE
|
||||
End Sub
|
||||
|
||||
|
@ -2077,7 +2158,16 @@
|
|||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Function DeductPP(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Boolean
|
||||
If Me.IsGameModeMove = True Then
|
||||
Return gmDeductPP
|
||||
If gmCopyMove <> -1 Then
|
||||
Dim _attack As Attack = GameModeAttackLoader.GetAttackByID(gmCopyMove)
|
||||
If _attack.IsGameModeMove = False Then
|
||||
Return _attack.DeductPP(own, BattleScreen)
|
||||
Else
|
||||
Return _attack.gmDeductPP
|
||||
End If
|
||||
Else
|
||||
Return gmDeductPP
|
||||
End If
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
|
@ -2098,6 +2188,10 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub MoveSelected(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveSelected(own, BattleScreen)
|
||||
End If
|
||||
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2107,6 +2201,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub BeforeDealingDamage(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).BeforeDealingDamage(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2116,6 +2213,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub AbsorbedBySubstitute(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).AbsorbedBySubstitute(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2125,6 +2225,9 @@
|
|||
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Overridable Sub MoveFailsSoundproof(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).MoveFailsSoundproof(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2134,6 +2237,9 @@
|
|||
''' <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)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).InflictedFlinch(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2143,6 +2249,9 @@
|
|||
''' <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)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).HurtItselfInConfusion(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2152,6 +2261,9 @@
|
|||
''' <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)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).IsAttracted(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2161,6 +2273,9 @@
|
|||
''' <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)
|
||||
If gmCopyMove <> -1 Then
|
||||
GameModeAttackLoader.GetAttackByID(gmCopyMove).IsSleeping(own, BattleScreen)
|
||||
End If
|
||||
'DO NOTHING
|
||||
End Sub
|
||||
|
||||
|
@ -2213,7 +2328,13 @@
|
|||
End Sub
|
||||
|
||||
Public Overridable Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
|
||||
'Override this method in the attack class to insert the move animation query objects into the queue.
|
||||
If Me.IsGameModeMove = True Then
|
||||
If gmUseMoveAnims IsNot Nothing Then
|
||||
gmUseMoveAnims.InternalUserPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
|
||||
End If
|
||||
Else
|
||||
'Override this method in the attack class to insert the move animation query objects into the queue.
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub OpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
|
||||
|
@ -2231,7 +2352,13 @@
|
|||
End Sub
|
||||
|
||||
Public Overridable Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
|
||||
'Override this method in the attack class to insert the move animation query objects into the queue.
|
||||
If Me.IsGameModeMove = True Then
|
||||
If gmUseMoveAnims IsNot Nothing Then
|
||||
gmUseMoveAnims.InternalOpponentPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
|
||||
End If
|
||||
Else
|
||||
'Override this method in the attack class to insert the move animation query objects into the queue.
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
|
|
@ -0,0 +1,303 @@
|
|||
Namespace BattleSystem
|
||||
|
||||
''' <summary>
|
||||
''' A class to execute GameMode attack functions.
|
||||
''' </summary>
|
||||
Public Class AttackSpecialBasePower
|
||||
|
||||
''' <summary>
|
||||
''' Executes the attack function(s).
|
||||
''' </summary>
|
||||
''' <param name="Move">The move containing the attack function.</param>
|
||||
''' <param name="own">Own toggle.</param>
|
||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||
Public Shared Function GetGameModeBasePower(ByVal Move As Attack, ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Integer
|
||||
If Move.GameModeBasePower <> "" Then
|
||||
Dim basePowerCalcs() As String = Move.GameModeBasePower.Split("|")
|
||||
Dim applyMultiplier As Single = 1
|
||||
For i = 0 To basePowerCalcs.Count - 1
|
||||
Dim b As String = basePowerCalcs(i)
|
||||
Dim bMain As String = b.Remove(b.IndexOf(","))
|
||||
Dim bSub As String = b.Remove(0, b.IndexOf(",") + 1)
|
||||
|
||||
Select Case bMain.ToLower
|
||||
Case "status"
|
||||
Dim Target As Boolean = own
|
||||
Dim Status As String = bSub.GetSplit(0, ",")
|
||||
Dim Multiplier As Single = 1
|
||||
If bSub.Split(",").Count > 1 Then
|
||||
Multiplier = CSng(bSub.GetSplit(1, ",").InsertDecSeparator)
|
||||
If bSub.Split(",").Count > 2 Then
|
||||
If own = True Then
|
||||
Target = Not CBool(bSub.GetSplit(2, ","))
|
||||
Else
|
||||
Target = CBool(bSub.GetSplit(2, ","))
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Success As Boolean = False
|
||||
|
||||
Select Case Status.ToLower()
|
||||
Case "confuse"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "burn"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Burn Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Burn Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "freeze"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Freeze Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Freeze Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "paralyze"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Paralyzed Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Paralyzed Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "poison"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Poison Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Poison Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "toxic", "badpoison"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "anypoison"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Poison OrElse BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Poison OrElse BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "sleep"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Sleep Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Sleep Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "noconfuse"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = False Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = False Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "noburn"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Burn Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Burn Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "nofreeze"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Freeze Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Freeze Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "noparalyze"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Paralyzed Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Paralyzed Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "nopoison"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Poison Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Poison Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "notoxic", "nobadpoison"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "nopoison"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Poison AndAlso BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Poison AndAlso BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
Case "nosleep"
|
||||
If Target = True Then
|
||||
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Sleep Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Sleep Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
If Success = True Then
|
||||
applyMultiplier *= Multiplier
|
||||
End If
|
||||
Case "underground"
|
||||
Dim Target As Boolean = own
|
||||
Dim Multiplier As Single = 1
|
||||
Dim Success As Boolean = False
|
||||
If bSub.Split(",").Count > 0 Then
|
||||
Multiplier = CSng(bSub.GetSplit(0, ",").InsertDecSeparator)
|
||||
If bSub.Split(",").Count > 1 Then
|
||||
If own = True Then
|
||||
Target = Not CBool(bSub.GetSplit(1, ","))
|
||||
Else
|
||||
Target = CBool(bSub.GetSplit(1, ","))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Target = True Then
|
||||
If BattleScreen.FieldEffects.OppDigCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.FieldEffects.OwnDigCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
If Success = True Then
|
||||
applyMultiplier *= Multiplier
|
||||
End If
|
||||
Case "inmidair"
|
||||
Dim Target As Boolean = own
|
||||
Dim Multiplier As Single = 1
|
||||
Dim Success As Boolean = False
|
||||
If bSub.Split(",").Count > 0 Then
|
||||
Multiplier = CSng(bSub.GetSplit(0, ",").InsertDecSeparator)
|
||||
If own = True Then
|
||||
Target = Not CBool(bSub.GetSplit(1, ","))
|
||||
Else
|
||||
Target = CBool(bSub.GetSplit(1, ","))
|
||||
End If
|
||||
End If
|
||||
If Target = True Then
|
||||
If BattleScreen.FieldEffects.OppFlyCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
If BattleScreen.FieldEffects.OppBounceCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
If BattleScreen.FieldEffects.OppSkyDropCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.FieldEffects.OwnFlyCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
If BattleScreen.FieldEffects.OwnBounceCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
If BattleScreen.FieldEffects.OwnSkyDropCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
If Success = True Then
|
||||
applyMultiplier *= Multiplier
|
||||
End If
|
||||
Case "underwater"
|
||||
Dim Target As Boolean = own
|
||||
Dim Multiplier As Single = 1
|
||||
Dim Success As Boolean = False
|
||||
If bSub.Split(",").Count > 0 Then
|
||||
Multiplier = CSng(bSub.GetSplit(0, ",").InsertDecSeparator)
|
||||
If own = True Then
|
||||
Target = Not CBool(bSub.GetSplit(1, ","))
|
||||
Else
|
||||
Target = CBool(bSub.GetSplit(1, ","))
|
||||
End If
|
||||
End If
|
||||
If Target = True Then
|
||||
If BattleScreen.FieldEffects.OppDiveCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
Else
|
||||
If BattleScreen.FieldEffects.OwnDiveCounter > 0 Then
|
||||
Success = True
|
||||
End If
|
||||
End If
|
||||
If Success = True Then
|
||||
applyMultiplier *= Multiplier
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
Return CInt(Move.Power * applyMultiplier)
|
||||
Else
|
||||
Return Move.Power
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -228,6 +228,7 @@
|
|||
Dim Message As String = ""
|
||||
Dim RaiseAmount As Integer = 1
|
||||
Dim Chance As Integer = 100
|
||||
Dim FailMessage As String = ""
|
||||
|
||||
If f.Split(CChar(",")).Count > 2 Then
|
||||
Target = CBool(f.GetSplit(2, ","))
|
||||
|
@ -241,19 +242,21 @@
|
|||
If CInt(f.GetSplit(5, ",")) > 0 Then
|
||||
Chance = CInt(f.GetSplit(5, ","))
|
||||
End If
|
||||
If f.Split(CChar(",")).Count > 6 Then
|
||||
FailMessage = f.GetSplit(6, ",")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If GetEffectChanceResult(Move, Chance) = True Then
|
||||
BattleScreen.Battle.RaiseStat(Target, own, BattleScreen, Stat, RaiseAmount, Message, "move:" & Move.Name, True)
|
||||
End If
|
||||
RaiseStat(Move, own, Stat, Target, Message, RaiseAmount, Chance, FailMessage, BattleScreen)
|
||||
Case "lowerstat", "decreasestat"
|
||||
Dim Stat As String = f.GetSplit(1, ",")
|
||||
Dim Message As String = ""
|
||||
Dim Target As Boolean = own
|
||||
Dim LowerAmount As Integer = 1
|
||||
Dim Chance As Integer = 100
|
||||
Dim FailMessage As String = ""
|
||||
|
||||
If f.Split(CChar(",")).Count > 2 Then
|
||||
Target = CBool(f.GetSplit(2, ","))
|
||||
|
@ -267,13 +270,14 @@
|
|||
If CInt(f.GetSplit(5, ",")) > 0 Then
|
||||
Chance = CInt(f.GetSplit(5, ","))
|
||||
End If
|
||||
If f.Split(CChar(",")).Count > 6 Then
|
||||
FailMessage = f.GetSplit(6, ",")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If GetEffectChanceResult(Move, Chance) = True Then
|
||||
BattleScreen.Battle.LowerStat(Target, own, BattleScreen, Stat, LowerAmount, Message, "move:" & Move.Name, True)
|
||||
End If
|
||||
LowerStat(Move, own, Stat, Target, Message, LowerAmount, Chance, FailMessage, BattleScreen)
|
||||
Case "reducehp", "drainhp", "damage"
|
||||
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
||||
Dim HPAmount As Integer = 0
|
||||
|
@ -358,6 +362,11 @@
|
|||
End If
|
||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, SwitchTo, -1, Message)
|
||||
End If
|
||||
Case "randomstatus"
|
||||
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
|
||||
If f.Split(CChar(",")).Count > 2 Then
|
||||
fSub &= "," & f.GetSplit(2, ",")
|
||||
End If
|
||||
Case Else
|
||||
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
|
||||
End Select
|
||||
|
@ -381,6 +390,33 @@
|
|||
End If
|
||||
|
||||
Select Case fMain.ToLower()
|
||||
Case "randomstatus"
|
||||
Dim chance As Integer = CInt(fSub.GetSplit(0, ","))
|
||||
Dim withoutBadPoison As Boolean = False
|
||||
If fSub.Contains(",") Then
|
||||
withoutBadPoison = CBool(fSub.GetSplit(1, ","))
|
||||
End If
|
||||
|
||||
Dim randomNumber As Integer = Core.Random.Next(0, 7)
|
||||
If withoutBadPoison = True Then
|
||||
randomNumber = Core.Random.Next(0, 6)
|
||||
End If
|
||||
Select Case randomNumber
|
||||
Case 0
|
||||
Paralyze(Move, own, BattleScreen, CInt(fSub))
|
||||
Case 1
|
||||
Poison(Move, own, BattleScreen, CInt(fSub))
|
||||
Case 2
|
||||
Burn(Move, own, BattleScreen, CInt(fSub))
|
||||
Case 3
|
||||
Freeze(Move, own, BattleScreen, CInt(fSub))
|
||||
Case 4
|
||||
Sleep(Move, own, BattleScreen, CInt(fSub))
|
||||
Case 5
|
||||
Confuse(Move, own, BattleScreen, CInt(fSub))
|
||||
Case 6
|
||||
BadPoison(Move, own, BattleScreen, CInt(fSub))
|
||||
End Select
|
||||
Case "paralyze"
|
||||
Paralyze(Move, own, BattleScreen, CInt(fSub))
|
||||
Case "poison"
|
||||
|
@ -403,6 +439,32 @@
|
|||
Private Shared Function GetEffectChanceResult(ByVal move As Attack, ByVal chance As Integer) As Boolean
|
||||
Return Core.Random.Next(0, 101) <= chance
|
||||
End Function
|
||||
Private Shared Sub LowerStat(ByVal Move As Attack, own As Boolean, Stat As String, Target As Boolean, Message As String, LowerAmount As Integer, Chance As Integer, FailMessage As String, ByVal BattleScreen As BattleScreen)
|
||||
If GetEffectChanceResult(Move, Chance) = True Then
|
||||
If BattleScreen.Battle.LowerStat(Target, own, BattleScreen, Stat, LowerAmount, Message, "move:" & Move.Name, True) = False Then
|
||||
If Move.Category = Attack.Categories.Status Then
|
||||
If FailMessage = "" Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Move.Name & " failed!"))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(FailMessage.Replace("<movename>", Move.Name)))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Shared Sub RaiseStat(ByVal Move As Attack, own As Boolean, Stat As String, Target As Boolean, Message As String, RaiseAmount As Integer, Chance As Integer, FailMessage As String, ByVal BattleScreen As BattleScreen)
|
||||
If GetEffectChanceResult(Move, Chance) = True Then
|
||||
If BattleScreen.Battle.RaiseStat(Target, own, BattleScreen, Stat, RaiseAmount, Message, "move:" & Move.Name, True) = False Then
|
||||
If Move.Category = Attack.Categories.Status Then
|
||||
If FailMessage = "" Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(Move.Name & " failed!"))
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(FailMessage.Replace("<movename>", Move.Name)))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Sub Paralyze(ByVal Move As Attack, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Chance As Integer)
|
||||
If GetEffectChanceResult(Move, Chance) = True Then
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
Me.EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -52,7 +52,7 @@ Namespace BattleSystem.Moves.Electric
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(20)
|
||||
End Sub
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
Me.AIField3 = AIField.CanFlinch
|
||||
|
||||
EffectChances.Add(10)
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(10)
|
||||
End Sub
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(10)
|
||||
End Sub
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(10)
|
||||
End Sub
|
||||
|
|
|
@ -53,7 +53,7 @@ Namespace BattleSystem.Moves.Electric
|
|||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.Recoil
|
||||
Me.AIField3 = AIField.CanParalyse
|
||||
Me.AIField3 = AIField.CanParalyze
|
||||
|
||||
Me.EffectChances.Add(10)
|
||||
End Sub
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -57,6 +57,75 @@
|
|||
value = l.Remove(0, l.IndexOf("|") + 1)
|
||||
|
||||
Select Case key.ToLower()
|
||||
Case "copymove"
|
||||
If nonCommentLines = 1 Then
|
||||
move.gmCopyMove = CInt(value)
|
||||
|
||||
Dim _attack As Attack = Attack.GetAttackByID(move.gmCopyMove)
|
||||
move.Power = _attack.Power
|
||||
move.Accuracy = _attack.Accuracy
|
||||
move.Name = _attack.Name
|
||||
move.OriginalPP = _attack.OriginalPP
|
||||
move.CurrentPP = _attack.CurrentPP
|
||||
move.MaxPP = _attack.MaxPP
|
||||
move.Category = _attack.Category
|
||||
move.ContestCategory = _attack.ContestCategory
|
||||
move.Description = _attack.Description
|
||||
move.CriticalChance = _attack.CriticalChance
|
||||
move.IsHMMove = _attack.IsHMMove
|
||||
move.Target = _attack.Target
|
||||
move.Priority = _attack.Priority
|
||||
move.TimesToAttack = _attack.TimesToAttack
|
||||
move.EffectChances = _attack.EffectChances
|
||||
move.MakesContact = _attack.MakesContact
|
||||
move.HasSecondaryEffect = _attack.HasSecondaryEffect
|
||||
move.IsHealingMove = _attack.IsHealingMove
|
||||
move.IsDamagingMove = _attack.IsDamagingMove
|
||||
move.IsProtectMove = _attack.IsProtectMove
|
||||
move.IsOneHitKOMove = _attack.IsOneHitKOMove
|
||||
move.IsRecoilMove = _attack.IsRecoilMove
|
||||
move.IsTrappingMove = _attack.IsTrappingMove
|
||||
move.RemovesOwnFrozen = _attack.RemovesOwnFrozen
|
||||
move.RemovesOppFrozen = _attack.RemovesOppFrozen
|
||||
move.SwapsOutOwnPokemon = _attack.SwapsOutOwnPokemon
|
||||
move.SwapsOutOppPokemon = _attack.SwapsOutOppPokemon
|
||||
move.ProtectAffected = _attack.ProtectAffected
|
||||
move.MagicCoatAffected = _attack.MagicCoatAffected
|
||||
move.SnatchAffected = _attack.SnatchAffected
|
||||
move.MirrorMoveAffected = _attack.MirrorMoveAffected
|
||||
move.KingsrockAffected = _attack.KingsrockAffected
|
||||
move.CounterAffected = _attack.CounterAffected
|
||||
move.IsAffectedBySubstitute = _attack.IsAffectedBySubstitute
|
||||
move.ImmunityAffected = _attack.ImmunityAffected
|
||||
move.IsWonderGuardAffected = _attack.IsWonderGuardAffected
|
||||
move.DisabledWhileGravity = _attack.DisabledWhileGravity
|
||||
move.UseEffectiveness = _attack.UseEffectiveness
|
||||
move.UseAccEvasion = _attack.UseAccEvasion
|
||||
move.CanHitInMidAir = _attack.CanHitInMidAir
|
||||
move.CanHitUnderground = _attack.CanHitUnderground
|
||||
move.CanHitUnderwater = _attack.CanHitUnderwater
|
||||
move.CanHitSleeping = _attack.CanHitSleeping
|
||||
move.CanGainSTAB = _attack.CanGainSTAB
|
||||
move.UseOppDefense = _attack.UseOppDefense
|
||||
move.UseOppEvasion = _attack.UseOppEvasion
|
||||
move.IsPulseMove = _attack.IsPulseMove
|
||||
move.IsBulletMove = _attack.IsBulletMove
|
||||
move.IsJawMove = _attack.IsJawMove
|
||||
move.IsDanceMove = _attack.IsDanceMove
|
||||
move.IsExplosiveMove = _attack.IsExplosiveMove
|
||||
move.IsPowderMove = _attack.IsPowderMove
|
||||
move.IsPunchingMove = _attack.IsPunchingMove
|
||||
move.IsSlicingMove = _attack.IsSlicingMove
|
||||
move.IsSoundMove = _attack.IsSoundMove
|
||||
move.IsWindMove = _attack.IsWindMove
|
||||
move.FocusOppPokemon = _attack.FocusOppPokemon
|
||||
move.Disabled = _attack.Disabled
|
||||
move.AIField1 = _attack.AIField1
|
||||
move.AIField2 = _attack.AIField2
|
||||
move.AIField3 = _attack.AIField3
|
||||
Else
|
||||
Logger.Log(Logger.LogTypes.ErrorMessage, "GameModeAttackLoader.vb: The CopyMove property should be the first property set in the move definition file. It is currently property number " & nonCommentLines.ToString & ".")
|
||||
End If
|
||||
Case "id"
|
||||
move.ID = CInt(value)
|
||||
move.OriginalID = CInt(value)
|
||||
|
@ -72,12 +141,23 @@
|
|||
Dim OldFunctionList = move.GameModeFunction
|
||||
move.GameModeFunction = OldFunctionList & "|" & value
|
||||
End If
|
||||
Case "multiplier", "getbasepower"
|
||||
If move.GameModeBasePower = "" Then
|
||||
move.GameModeBasePower = value
|
||||
Else
|
||||
Dim OldBasePowerCalculationList = move.GameModeBasePower
|
||||
move.GameModeBasePower = OldBasePowerCalculationList & "|" & value
|
||||
End If
|
||||
Case "power", "basepower"
|
||||
move.Power = CInt(value)
|
||||
Case "accuracy", "acc"
|
||||
move.Accuracy = CInt(value)
|
||||
Case "type"
|
||||
move.Type = New Element(value)
|
||||
If StringHelper.IsNumeric(value) = False Then
|
||||
move.Type = GameModeElementLoader.GetElementByName(value)
|
||||
Else
|
||||
move.Type = GameModeElementLoader.GetElementByID(CInt(value))
|
||||
End If
|
||||
Case "category"
|
||||
Select Case value.ToLower()
|
||||
Case "physical"
|
||||
|
@ -111,7 +191,7 @@
|
|||
Case "priority"
|
||||
move.Priority = CInt(value)
|
||||
Case "timestoattack", "tta"
|
||||
move.TimesToAttack = CInt(value)
|
||||
move.gmTimesToAttack = value
|
||||
Case "makescontact", "contact"
|
||||
move.MakesContact = CBool(value)
|
||||
Case "protectaffected"
|
||||
|
@ -182,6 +262,139 @@
|
|||
move.UseOppEvasion = CBool(value)
|
||||
Case "deductpp"
|
||||
move.gmDeductPP = CBool(value)
|
||||
Case "aifield1", "aifield2", "aifield3"
|
||||
Dim AIFieldType As Attack.AIField = Attack.AIField.Nothing
|
||||
Select Case value
|
||||
Case "damage"
|
||||
AIFieldType = Attack.AIField.Damage
|
||||
Case "poison"
|
||||
AIFieldType = Attack.AIField.Poison
|
||||
Case "burn"
|
||||
AIFieldType = Attack.AIField.Burn
|
||||
Case "paralysis"
|
||||
AIFieldType = Attack.AIField.Paralysis
|
||||
Case "sleep"
|
||||
AIFieldType = Attack.AIField.Sleep
|
||||
Case "freeze"
|
||||
AIFieldType = Attack.AIField.Freeze
|
||||
Case "confusion"
|
||||
AIFieldType = Attack.AIField.Confusion
|
||||
Case "confuseown"
|
||||
AIFieldType = Attack.AIField.ConfuseOwn
|
||||
Case "canpoison"
|
||||
AIFieldType = Attack.AIField.CanPoison
|
||||
Case "canburn"
|
||||
AIFieldType = Attack.AIField.CanBurn
|
||||
Case "canparalyze"
|
||||
AIFieldType = Attack.AIField.CanParalyze
|
||||
Case "cansleep"
|
||||
AIFieldType = Attack.AIField.CanSleep
|
||||
Case "canfreeze"
|
||||
AIFieldType = Attack.AIField.CanFreeze
|
||||
Case "canconfuse"
|
||||
AIFieldType = Attack.AIField.CanConfuse
|
||||
Case "raiseattack"
|
||||
AIFieldType = Attack.AIField.RaiseAttack
|
||||
Case "raisedefense"
|
||||
AIFieldType = Attack.AIField.RaiseDefense
|
||||
Case "raisespattack"
|
||||
AIFieldType = Attack.AIField.RaiseSpAttack
|
||||
Case "raisespdefense"
|
||||
AIFieldType = Attack.AIField.RaiseSpDefense
|
||||
Case "raisespeed"
|
||||
AIFieldType = Attack.AIField.RaiseSpeed
|
||||
Case "raiseaccuracy"
|
||||
AIFieldType = Attack.AIField.RaiseAccuracy
|
||||
Case "raiseevasion"
|
||||
AIFieldType = Attack.AIField.RaiseEvasion
|
||||
Case "lowerattack"
|
||||
AIFieldType = Attack.AIField.LowerAttack
|
||||
Case "lowerdefense"
|
||||
AIFieldType = Attack.AIField.LowerDefense
|
||||
Case "lowerspattack"
|
||||
AIFieldType = Attack.AIField.LowerSpAttack
|
||||
Case "lowerspdefense"
|
||||
AIFieldType = Attack.AIField.LowerSpDefense
|
||||
Case "lowerspeed"
|
||||
AIFieldType = Attack.AIField.LowerSpeed
|
||||
Case "loweraccuracy"
|
||||
AIFieldType = Attack.AIField.LowerAccuracy
|
||||
Case "lowerevasion"
|
||||
AIFieldType = Attack.AIField.LowerEvasion
|
||||
Case "canraiseattack"
|
||||
AIFieldType = Attack.AIField.CanRaiseAttack
|
||||
Case "canraisedefense"
|
||||
AIFieldType = Attack.AIField.CanRaiseDefense
|
||||
Case "canraisespattack"
|
||||
AIFieldType = Attack.AIField.CanRaiseSpAttack
|
||||
Case "canraisespdefense"
|
||||
AIFieldType = Attack.AIField.CanRaiseSpDefense
|
||||
Case "canraisespeed"
|
||||
AIFieldType = Attack.AIField.CanRaiseSpeed
|
||||
Case "canraiseaccuracy"
|
||||
AIFieldType = Attack.AIField.CanRaiseAccuracy
|
||||
Case "canrauseevasion"
|
||||
AIFieldType = Attack.AIField.CanRauseEvasion
|
||||
Case "canlowerattack"
|
||||
AIFieldType = Attack.AIField.CanLowerAttack
|
||||
Case "canlowerdefense"
|
||||
AIFieldType = Attack.AIField.CanLowerDefense
|
||||
Case "canlowerspattack"
|
||||
AIFieldType = Attack.AIField.CanLowerSpAttack
|
||||
Case "canlowerspdefense"
|
||||
AIFieldType = Attack.AIField.CanLowerSpDefense
|
||||
Case "canlowerspeed"
|
||||
AIFieldType = Attack.AIField.CanLowerSpeed
|
||||
Case "canloweraccuracy"
|
||||
AIFieldType = Attack.AIField.CanLowerAccuracy
|
||||
Case "canlowerevasion"
|
||||
AIFieldType = Attack.AIField.CanLowerEvasion
|
||||
Case "flinch"
|
||||
AIFieldType = Attack.AIField.Flinch
|
||||
Case "canflinch"
|
||||
AIFieldType = Attack.AIField.CanFlinch
|
||||
Case "infatuation"
|
||||
AIFieldType = Attack.AIField.Infatuation
|
||||
Case "trap"
|
||||
AIFieldType = Attack.AIField.Trap
|
||||
Case "ohko"
|
||||
AIFieldType = Attack.AIField.OHKO
|
||||
Case "multiturn"
|
||||
AIFieldType = Attack.AIField.MultiTurn
|
||||
Case "recoil"
|
||||
AIFieldType = Attack.AIField.Recoil
|
||||
Case "healing"
|
||||
AIFieldType = Attack.AIField.Healing
|
||||
Case "curestatus"
|
||||
AIFieldType = Attack.AIField.CureStatus
|
||||
Case "support"
|
||||
AIFieldType = Attack.AIField.Support
|
||||
Case "recharge"
|
||||
AIFieldType = Attack.AIField.Recharge
|
||||
Case "highpriority"
|
||||
AIFieldType = Attack.AIField.HighPriority
|
||||
Case "absorbing"
|
||||
AIFieldType = Attack.AIField.Absorbing
|
||||
Case "selfdestruct"
|
||||
AIFieldType = Attack.AIField.Selfdestruct
|
||||
Case "thrawout"
|
||||
AIFieldType = Attack.AIField.ThrawOut
|
||||
Case "cannotmiss"
|
||||
AIFieldType = Attack.AIField.CannotMiss
|
||||
Case "removereflectlightscreen"
|
||||
AIFieldType = Attack.AIField.RemoveReflectLightscreen
|
||||
End Select
|
||||
If AIFieldType <> Attack.AIField.Nothing Then
|
||||
If key.EndsWith("1") Then
|
||||
move.AIField1 = AIFieldType
|
||||
ElseIf key.EndsWith("2") Then
|
||||
move.AIField2 = AIFieldType
|
||||
ElseIf key.EndsWith("3") Then
|
||||
move.AIField3 = AIFieldType
|
||||
End If
|
||||
End If
|
||||
Case "usemoveanims"
|
||||
move.gmUseMoveAnims = Attack.GetAttackByID(CInt(value))
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
Me.EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.MultiTurn
|
||||
Me.AIField3 = AIField.CanParalyse
|
||||
Me.AIField3 = AIField.CanParalyze
|
||||
|
||||
EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
|
||||
Me.AIField1 = AIField.Damage
|
||||
Me.AIField2 = AIField.CanParalyse
|
||||
Me.AIField2 = AIField.CanParalyze
|
||||
|
||||
Me.EffectChances.Add(30)
|
||||
End Sub
|
||||
|
|
|
@ -61,9 +61,20 @@
|
|||
op = BattleScreen.OwnPokemon
|
||||
End If
|
||||
|
||||
Dim lastMove As Attack = BattleScreen.FieldEffects.OppLastMove
|
||||
If own = False Then
|
||||
lastMove = BattleScreen.FieldEffects.OwnLastMove
|
||||
Dim lastMove As Attack
|
||||
|
||||
If own = True Then
|
||||
If (BattleScreen.FieldEffects.OppLastMove Is Nothing AndAlso Battle.OppStep.StepType = Battle.RoundConst.StepTypes.Move) OrElse Battle.OppStep.StepType = Battle.RoundConst.StepTypes.Move AndAlso CType(Battle.OppStep.Argument, Attack).ID <> BattleScreen.FieldEffects.OppLastMove.ID Then
|
||||
lastMove = CType(Battle.OppStep.Argument, Attack)
|
||||
Else
|
||||
lastMove = BattleScreen.FieldEffects.OppLastMove
|
||||
End If
|
||||
Else
|
||||
If (BattleScreen.FieldEffects.OwnLastMove Is Nothing AndAlso Battle.OwnStep.StepType = Battle.RoundConst.StepTypes.Move) OrElse Battle.OwnStep.StepType = Battle.RoundConst.StepTypes.Move AndAlso CType(Battle.OwnStep.Argument, Attack).ID <> BattleScreen.FieldEffects.OwnLastMove.ID Then
|
||||
lastMove = CType(Battle.OwnStep.Argument, Attack)
|
||||
Else
|
||||
lastMove = BattleScreen.FieldEffects.OwnLastMove
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not lastMove Is Nothing Then
|
||||
|
|
|
@ -90,7 +90,7 @@ Namespace BattleSystem.Moves.Normal
|
|||
|
||||
If Not p.Item Is Nothing Then
|
||||
If p.Item.isBerry = True Then
|
||||
Return New Element(CType(p.Item, Items.Berry).Type)
|
||||
Return BattleSystem.GameModeElementLoader.GetElementByID(CType(p.Item, Items.Berry).Type)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
Public SummerGrow As Integer = 2
|
||||
Public FallGrow As Integer = 1
|
||||
|
||||
Public Type As Element.Types
|
||||
Public Type As Integer
|
||||
Public Power As Integer = 80
|
||||
|
||||
Public JuiceColor As String = "red"
|
||||
|
|
|
@ -21,6 +21,8 @@ Public Class GameModeItem
|
|||
Public gmCanBeUsedInBattle As Boolean = True
|
||||
Public gmCanBeTossed As Boolean = True
|
||||
Public gmBattleSelectPokemon As Boolean = True
|
||||
Public gmExpMultiplier As Double = -1D
|
||||
Public gmOverrideTradeExp As Boolean = False
|
||||
|
||||
Public gmSortValue As Integer = 0
|
||||
|
||||
|
@ -197,45 +199,49 @@ Public Class GameModeItem
|
|||
|
||||
Public Sub SetTeachMoveTextureRectangle()
|
||||
Dim r As New Rectangle(144, 168, 24, 24)
|
||||
If gmTeachMove.Type.IsGameModeElement = False Then
|
||||
|
||||
Select Case gmTeachMove.Type.Type
|
||||
Case Element.Types.Blank, Element.Types.Normal
|
||||
r = New Rectangle(144, 168, 24, 24)
|
||||
Case Element.Types.Bug
|
||||
r = New Rectangle(24, 192, 24, 24)
|
||||
Case Element.Types.Dark
|
||||
r = New Rectangle(384, 168, 24, 24)
|
||||
Case Element.Types.Dragon
|
||||
r = New Rectangle(408, 168, 24, 24)
|
||||
Case Element.Types.Electric
|
||||
r = New Rectangle(288, 168, 24, 24)
|
||||
Case Element.Types.Fairy
|
||||
r = New Rectangle(72, 264, 24, 24)
|
||||
Case Element.Types.Fighting
|
||||
r = New Rectangle(168, 168, 24, 24)
|
||||
Case Element.Types.Fire
|
||||
r = New Rectangle(360, 168, 24, 24)
|
||||
Case Element.Types.Flying
|
||||
r = New Rectangle(0, 192, 24, 24)
|
||||
Case Element.Types.Ghost
|
||||
r = New Rectangle(480, 168, 24, 24)
|
||||
Case Element.Types.Grass
|
||||
r = New Rectangle(336, 168, 24, 24)
|
||||
Case Element.Types.Ground
|
||||
r = New Rectangle(456, 168, 24, 24)
|
||||
Case Element.Types.Ice
|
||||
r = New Rectangle(312, 168, 24, 24)
|
||||
Case Element.Types.Poison
|
||||
r = New Rectangle(264, 168, 24, 24)
|
||||
Case Element.Types.Psychic
|
||||
r = New Rectangle(216, 168, 24, 24)
|
||||
Case Element.Types.Rock
|
||||
r = New Rectangle(240, 168, 24, 24)
|
||||
Case Element.Types.Steel
|
||||
r = New Rectangle(432, 168, 24, 24)
|
||||
Case Element.Types.Water
|
||||
r = New Rectangle(192, 168, 24, 24)
|
||||
End Select
|
||||
Select Case gmTeachMove.Type.Type
|
||||
Case Element.Types.Blank, Element.Types.Normal
|
||||
r = New Rectangle(144, 168, 24, 24)
|
||||
Case Element.Types.Bug
|
||||
r = New Rectangle(24, 192, 24, 24)
|
||||
Case Element.Types.Dark
|
||||
r = New Rectangle(384, 168, 24, 24)
|
||||
Case Element.Types.Dragon
|
||||
r = New Rectangle(408, 168, 24, 24)
|
||||
Case Element.Types.Electric
|
||||
r = New Rectangle(288, 168, 24, 24)
|
||||
Case Element.Types.Fairy
|
||||
r = New Rectangle(72, 264, 24, 24)
|
||||
Case Element.Types.Fighting
|
||||
r = New Rectangle(168, 168, 24, 24)
|
||||
Case Element.Types.Fire
|
||||
r = New Rectangle(360, 168, 24, 24)
|
||||
Case Element.Types.Flying
|
||||
r = New Rectangle(0, 192, 24, 24)
|
||||
Case Element.Types.Ghost
|
||||
r = New Rectangle(480, 168, 24, 24)
|
||||
Case Element.Types.Grass
|
||||
r = New Rectangle(336, 168, 24, 24)
|
||||
Case Element.Types.Ground
|
||||
r = New Rectangle(456, 168, 24, 24)
|
||||
Case Element.Types.Ice
|
||||
r = New Rectangle(312, 168, 24, 24)
|
||||
Case Element.Types.Poison
|
||||
r = New Rectangle(264, 168, 24, 24)
|
||||
Case Element.Types.Psychic
|
||||
r = New Rectangle(216, 168, 24, 24)
|
||||
Case Element.Types.Rock
|
||||
r = New Rectangle(240, 168, 24, 24)
|
||||
Case Element.Types.Steel
|
||||
r = New Rectangle(432, 168, 24, 24)
|
||||
Case Element.Types.Water
|
||||
r = New Rectangle(192, 168, 24, 24)
|
||||
End Select
|
||||
Else
|
||||
r = gmTeachMove.Type.gmMachineTextureRectangle
|
||||
End If
|
||||
|
||||
gmTextureRectangle = r
|
||||
End Sub
|
||||
|
|
|
@ -114,6 +114,11 @@ Public Class GameModeItemLoader
|
|||
item.gmBattlePointsPrice = CInt(value)
|
||||
Case "catchmultiplier"
|
||||
item.gmCatchMultiplier = CSng(value.ReplaceDecSeparator)
|
||||
Case "expmultiplier"
|
||||
If value.Split(",").Count > 1 Then
|
||||
item.gmOverrideTradeExp = CBool(value.GetSplit(1, ","))
|
||||
End If
|
||||
item.gmExpMultiplier = CDbl(value.GetSplit(0, ",").ReplaceDecSeparator)
|
||||
Case "maxstack"
|
||||
item.gmMaxStack = CInt(value)
|
||||
Case "flingdamage"
|
||||
|
@ -200,7 +205,12 @@ Public Class GameModeItemLoader
|
|||
ElseIf item.gmName.StartsWith("HM") Then
|
||||
item.gmSortValue = -100000 + CInt(item.gmName.Remove(0, 2))
|
||||
End If
|
||||
item.gmTextureSource = "Items\ItemSheet"
|
||||
If item.gmTeachMove.Type.IsGameModeElement = False Then
|
||||
item.gmTextureSource = "Items\ItemSheet"
|
||||
Else
|
||||
item.gmTextureSource = item.gmTeachMove.Type.gmMachineTextureSource
|
||||
End If
|
||||
|
||||
item.SetTeachMoveTextureRectangle()
|
||||
|
||||
End If
|
||||
|
|
|
@ -14,19 +14,22 @@ Namespace Items.KeyItems
|
|||
Public Overrides Sub Use()
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False AndAlso Core.Player.IsGameJoltSave = False Then
|
||||
If Screen.Level.Riding = True Then
|
||||
Screen.Level.Riding = False
|
||||
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
|
||||
Core.Player.Skin = Core.Player.TempRideSkin
|
||||
If Screen.Level.RideType = 3 Then
|
||||
Screen.TextBox.Show(Localization.GetString("item_6_cannot_walk", "You cannot walk here!"), {}, True, False)
|
||||
Else
|
||||
Screen.Level.Riding = False
|
||||
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
|
||||
Core.Player.Skin = Core.Player.TempRideSkin
|
||||
|
||||
Screen.TextBox.Show(Localization.GetString("item_use_6", "<player.name> stepped~off the Bicycle."))
|
||||
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
|
||||
Core.CurrentScreen = Core.CurrentScreen.PreScreen
|
||||
End While
|
||||
Screen.TextBox.Show(Localization.GetString("item_use_6", "<player.name> stepped~off the Bicycle."))
|
||||
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
|
||||
Core.CurrentScreen = Core.CurrentScreen.PreScreen
|
||||
End While
|
||||
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.Play(Screen.Level.MusicLoop)
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.Play(Screen.Level.MusicLoop)
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If Screen.Level.Surfing = False AndAlso Screen.Level.Riding = False AndAlso Screen.Camera.IsMoving() = False AndAlso Screen.Camera.Turning = False And Screen.Level.CanRide() = True Then
|
||||
Dim BikeSkin As String = Core.Player.Skin & "_Bike"
|
||||
|
|
|
@ -13,7 +13,7 @@ Namespace Items.KeyItems
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub Use()
|
||||
If OldRod.IsInfrontOfWater() = True And Screen.Level.Surfing = False And Screen.Level.Riding = False Then
|
||||
If OldRod.IsInfrontOfWater() = True Then
|
||||
Dim s As String = "version=2"
|
||||
|
||||
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
|
||||
|
|
|
@ -13,7 +13,7 @@ Namespace Items.KeyItems
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub Use()
|
||||
If IsInfrontOfWater() = True And Screen.Level.Surfing = False And Screen.Level.Riding = False Then
|
||||
If IsInfrontOfWater() = True Then
|
||||
Dim s As String = "version=2"
|
||||
|
||||
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
|
||||
|
|
|
@ -13,7 +13,7 @@ Namespace Items.KeyItems
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub Use()
|
||||
If OldRod.IsInfrontOfWater() = True And Screen.Level.Surfing = False And Screen.Level.Riding = False Then
|
||||
If OldRod.IsInfrontOfWater() = True Then
|
||||
Dim s As String = "version=2"
|
||||
|
||||
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
|
||||
|
|
|
@ -29,10 +29,6 @@ Namespace Items.Medicine
|
|||
Dim beforeHP As Integer = Pokemon.MaxHP
|
||||
Pokemon.LevelUp(False)
|
||||
Pokemon.Experience = Pokemon.NeedExperience(Pokemon.Level)
|
||||
If Pokemon.Status = P3D.Pokemon.StatusProblems.Fainted Then
|
||||
Pokemon.Status = P3D.Pokemon.StatusProblems.None
|
||||
Pokemon.HP = (Pokemon.MaxHP - beforeHP).Clamp(1, 999)
|
||||
End If
|
||||
|
||||
Dim s As String =
|
||||
"version=2" & Environment.NewLine &
|
||||
|
@ -70,6 +66,11 @@ Namespace Items.Medicine
|
|||
s &= "@pokemon.evolve(" & PokeIndex & ")" & Environment.NewLine
|
||||
End If
|
||||
|
||||
If Pokemon.Status = P3D.Pokemon.StatusProblems.Fainted Then
|
||||
s &= "@pokemon.setstatus(" & PokeIndex & ",none)" & Environment.NewLine &
|
||||
"@pokemon.setstat(" & PokeIndex & ",chp," & (Pokemon.MaxHP - beforeHP).Clamp(1, 999) & ")" & Environment.NewLine
|
||||
End If
|
||||
|
||||
If removedItem = False Then
|
||||
Dim t As String = Me.RemoveItem()
|
||||
If t <> "" Then
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -207,7 +207,7 @@ Public Class EvolutionCondition
|
|||
Case ConditionTypes.InPartyType
|
||||
Dim isInParty As Boolean = False
|
||||
For Each pokemon As Pokemon In Core.Player.Pokemons
|
||||
If pokemon.IsType(New Element(c.Argument).Type) = True Then
|
||||
If pokemon.IsType(BattleSystem.GameModeElementLoader.GetElementByName(c.Argument).Type) = True Then
|
||||
isInParty = True
|
||||
Exit For
|
||||
End If
|
||||
|
|
|
@ -0,0 +1,291 @@
|
|||
Namespace BattleSystem
|
||||
|
||||
''' <summary>
|
||||
''' Provides an interface to load additional GameMode moves.
|
||||
''' </summary>
|
||||
Public Class GameModeElementLoader
|
||||
|
||||
'The default relative path to load moves from (Content folder).
|
||||
Const PATH As String = "Data\Types\"
|
||||
|
||||
'List of loaded moves.
|
||||
Shared LoadedElements As New List(Of Element)
|
||||
|
||||
''' <summary>
|
||||
''' Load the attack list for the loaded GameMode.
|
||||
''' </summary>
|
||||
''' <remarks>The game won't try to load the list if the default GameMode is selected.</remarks>
|
||||
Public Shared Sub Load()
|
||||
LoadedElements.Clear()
|
||||
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
|
||||
If System.IO.Directory.Exists(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "\" & PATH) = True Then
|
||||
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & PATH, "*.dat")
|
||||
LoadElement(file)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If LoadedElements.Count > 0 Then
|
||||
For Each e As Element In LoadedElements
|
||||
For Each id As Element In LoadedElements
|
||||
If e.gmEffectivenessAttack.ContainsKey(id.Type) = False Then
|
||||
e.gmEffectivenessAttack.Add(id.Type, 1.0F)
|
||||
End If
|
||||
If e.gmEffectivenessDefense.ContainsKey(id.Type) = False Then
|
||||
e.gmEffectivenessDefense.Add(id.Type, 1.0F)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Logger.Debug("Loaded " & LoadedElements.Count.ToString() & " GameMode type(s).")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Loads a move from a file.
|
||||
''' </summary>
|
||||
''' <param name="file">The file to load the move from.</param>
|
||||
Private Shared Sub LoadElement(ByVal file As String)
|
||||
Dim element As New Element() 'Load a blank Element.
|
||||
element.IsGameModeElement = True
|
||||
|
||||
Dim content() As String = System.IO.File.ReadAllLines(file)
|
||||
|
||||
Dim key As String = ""
|
||||
Dim value As String = ""
|
||||
|
||||
Dim setID As Boolean = False 'Controls if the move sets its ID.
|
||||
Dim nonCommentLines As Integer = 0
|
||||
|
||||
Try
|
||||
'Go through lines of the file and set the properties depending on the content.
|
||||
'Lines starting with # are comments.
|
||||
For Each l As String In content
|
||||
If l.Contains("|") = True And l.StartsWith("#") = False Then
|
||||
nonCommentLines += 1
|
||||
key = l.Remove(l.IndexOf("|"))
|
||||
value = l.Remove(0, l.IndexOf("|") + 1)
|
||||
|
||||
Select Case key.ToLower()
|
||||
Case "id"
|
||||
element.Type = CInt(value)
|
||||
setID = True
|
||||
Case "name"
|
||||
element.gmOriginalName = value
|
||||
Case "typeimageoffset"
|
||||
element.gmTypeRectangle = New Rectangle(CInt(value.GetSplit(0, ",")), CInt(value.GetSplit(1, ",")), 48, 16)
|
||||
Case "itemtexturesource"
|
||||
element.gmMachineTextureSource = value
|
||||
Case "itemtextureoffset"
|
||||
element.gmMachineTextureRectangle = New Rectangle(CInt(value.GetSplit(0, ",")), CInt(value.GetSplit(1, ",")), 24, 24)
|
||||
Case "effectivenessattack"
|
||||
Dim data() As String = value.Split(";")
|
||||
For i = 0 To data.Count - 1
|
||||
Dim typeID As Integer = -1
|
||||
If StringHelper.IsNumeric(data(i).GetSplit(0, ",")) = True Then
|
||||
typeID = CInt(data(i).GetSplit(0, ","))
|
||||
Else
|
||||
Select Case data(i).GetSplit(0, ",").ToLower
|
||||
Case "normal"
|
||||
typeID = Element.Types.Normal
|
||||
Case "fighting"
|
||||
typeID = Element.Types.Fighting
|
||||
Case "flying"
|
||||
typeID = Element.Types.Flying
|
||||
Case "poison"
|
||||
typeID = Element.Types.Poison
|
||||
Case "ground"
|
||||
typeID = Element.Types.Ground
|
||||
Case "rock"
|
||||
typeID = Element.Types.Rock
|
||||
Case "bug"
|
||||
typeID = Element.Types.Bug
|
||||
Case "ghost"
|
||||
typeID = Element.Types.Ghost
|
||||
Case "steel"
|
||||
typeID = Element.Types.Steel
|
||||
Case "fire"
|
||||
typeID = Element.Types.Fire
|
||||
Case "water"
|
||||
typeID = Element.Types.Water
|
||||
Case "grass"
|
||||
typeID = Element.Types.Grass
|
||||
Case "electric"
|
||||
typeID = Element.Types.Electric
|
||||
Case "psychic"
|
||||
typeID = Element.Types.Psychic
|
||||
Case "ice"
|
||||
typeID = Element.Types.Ice
|
||||
Case "dragon"
|
||||
typeID = Element.Types.Dragon
|
||||
Case "dark"
|
||||
typeID = Element.Types.Dark
|
||||
Case "fairy"
|
||||
typeID = Element.Types.Fairy
|
||||
Case "shadow"
|
||||
typeID = Element.Types.Shadow
|
||||
End Select
|
||||
End If
|
||||
element.gmEffectivenessAttack.Add(typeID, CSng(data(i).GetSplit(1, ",").InsertDecSeparator))
|
||||
Next
|
||||
Case "effectivenessdefense"
|
||||
Dim data() As String = value.Split(";")
|
||||
For i = 0 To data.Count - 1
|
||||
Dim typeID As Integer = -1
|
||||
If StringHelper.IsNumeric(data(i).GetSplit(0, ",")) = True Then
|
||||
typeID = CInt(data(i).GetSplit(0, ","))
|
||||
Else
|
||||
Select Case data(i).GetSplit(0, ",").ToLower
|
||||
Case "normal"
|
||||
typeID = Element.Types.Normal
|
||||
Case "fighting"
|
||||
typeID = Element.Types.Fighting
|
||||
Case "flying"
|
||||
typeID = Element.Types.Flying
|
||||
Case "poison"
|
||||
typeID = Element.Types.Poison
|
||||
Case "ground"
|
||||
typeID = Element.Types.Ground
|
||||
Case "rock"
|
||||
typeID = Element.Types.Rock
|
||||
Case "bug"
|
||||
typeID = Element.Types.Bug
|
||||
Case "ghost"
|
||||
typeID = Element.Types.Ghost
|
||||
Case "steel"
|
||||
typeID = Element.Types.Steel
|
||||
Case "fire"
|
||||
typeID = Element.Types.Fire
|
||||
Case "water"
|
||||
typeID = Element.Types.Water
|
||||
Case "grass"
|
||||
typeID = Element.Types.Grass
|
||||
Case "electric"
|
||||
typeID = Element.Types.Electric
|
||||
Case "psychic"
|
||||
typeID = Element.Types.Psychic
|
||||
Case "ice"
|
||||
typeID = Element.Types.Ice
|
||||
Case "dragon"
|
||||
typeID = Element.Types.Dragon
|
||||
Case "dark"
|
||||
typeID = Element.Types.Dark
|
||||
Case "fairy"
|
||||
typeID = Element.Types.Fairy
|
||||
Case "shadow"
|
||||
typeID = Element.Types.Shadow
|
||||
End Select
|
||||
End If
|
||||
element.gmEffectivenessDefense.Add(typeID, CSng(data(i).GetSplit(1, ",").InsertDecSeparator))
|
||||
Next
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
'If an error occurs loading a move, log the error.
|
||||
Logger.Log(Logger.LogTypes.ErrorMessage, "GameModeElementLoader.vb: Error loading GameMode element from file """ & file & """: " & ex.Message & "; Last Key/Value pair successfully loaded: " & key & "|" & value)
|
||||
End Try
|
||||
|
||||
If nonCommentLines > 0 Then
|
||||
If setID = True Then
|
||||
If element.Type >= 20 Then
|
||||
If Localization.TokenExists("element_name_" & element.gmOriginalName.ToString) = True Then
|
||||
element.gmOriginalName = Localization.GetString("move_name_" & element.gmOriginalName.ToString)
|
||||
End If
|
||||
For i = 0 To 18
|
||||
If element.gmEffectivenessAttack.ContainsKey(i) = False Then
|
||||
element.gmEffectivenessAttack.Add(i, 1.0F)
|
||||
End If
|
||||
If element.gmEffectivenessDefense.ContainsKey(i) = False Then
|
||||
element.gmEffectivenessDefense.Add(i, 1.0F)
|
||||
End If
|
||||
Next
|
||||
LoadedElements.Add(element) 'Add the element.
|
||||
Else
|
||||
Logger.Log(Logger.LogTypes.ErrorMessage, "GameModeElementLoader.vb: User defined types are not allowed to have an ID of an already existing type or an ID below 20. The ID for the type loaded from """ & file & """ has the ID " & element.Type.ToString() & ", which is smaller than 20.")
|
||||
End If
|
||||
Else
|
||||
Logger.Log(Logger.LogTypes.ErrorMessage, "GameModeElementLoader.vb: User defined types must set their ID through the ""ID"" property, however the type loaded from """ & file & """ has no ID set so it will be ignored.")
|
||||
End If
|
||||
Else
|
||||
Debug.Print("GameModeElementLoader.vb: The type loaded from """ & file & """ has no valid lines so it will be ignored.")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Returns an element based on its ID.
|
||||
''' </summary>
|
||||
''' <param name="ID">The ID of the element.</param>
|
||||
''' <returns>Returns an element or nothing.</returns>
|
||||
Public Shared Function GetElementByID(ByVal ID As Integer) As Element
|
||||
If ID <= 19 Then
|
||||
Return New Element(ID)
|
||||
Else
|
||||
For Each e As Element In LoadedElements
|
||||
If e.Type = ID Then
|
||||
Return e
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Returns an element based on its name.
|
||||
''' </summary>
|
||||
''' <param name="Name">The name of the element.</param>
|
||||
''' <returns>Returns an element or nothing.</returns>
|
||||
Public Shared Function GetElementByName(ByVal Name As String) As Element
|
||||
Select Case Name.ToLower
|
||||
Case "normal"
|
||||
Return New Element(Element.Types.Normal)
|
||||
Case "fighting"
|
||||
Return New Element(Element.Types.Fighting)
|
||||
Case "flying"
|
||||
Return New Element(Element.Types.Flying)
|
||||
Case "poison"
|
||||
Return New Element(Element.Types.Poison)
|
||||
Case "ground"
|
||||
Return New Element(Element.Types.Ground)
|
||||
Case "rock"
|
||||
Return New Element(Element.Types.Rock)
|
||||
Case "bug"
|
||||
Return New Element(Element.Types.Bug)
|
||||
Case "ghost"
|
||||
Return New Element(Element.Types.Ghost)
|
||||
Case "steel"
|
||||
Return New Element(Element.Types.Steel)
|
||||
Case "fire"
|
||||
Return New Element(Element.Types.Fire)
|
||||
Case "water"
|
||||
Return New Element(Element.Types.Water)
|
||||
Case "grass"
|
||||
Return New Element(Element.Types.Grass)
|
||||
Case "electric"
|
||||
Return New Element(Element.Types.Electric)
|
||||
Case "psychic"
|
||||
Return New Element(Element.Types.Psychic)
|
||||
Case "ice"
|
||||
Return New Element(Element.Types.Ice)
|
||||
Case "dragon"
|
||||
Return New Element(Element.Types.Dragon)
|
||||
Case "dark"
|
||||
Return New Element(Element.Types.Dark)
|
||||
Case "fairy"
|
||||
Return New Element(Element.Types.Fairy)
|
||||
Case "shadow"
|
||||
Return New Element(Element.Types.Shadow)
|
||||
Case "blank", ""
|
||||
Return New Element(Element.Types.Blank)
|
||||
Case Else
|
||||
For Each e As Element In LoadedElements
|
||||
If e.gmOriginalName.ToLower = Name.ToLower Then
|
||||
Return e
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
|
@ -1425,9 +1425,9 @@ Public Class Pokemon
|
|||
Me.ExperienceType = ExperienceTypes.Slow
|
||||
End Select
|
||||
Case "type1"
|
||||
Me.Type1 = New Element(Value)
|
||||
Me.Type1 = BattleSystem.GameModeElementLoader.GetElementByName(Value)
|
||||
Case "type2"
|
||||
Me.Type2 = New Element(Value)
|
||||
Me.Type2 = BattleSystem.GameModeElementLoader.GetElementByName(Value)
|
||||
Case "catchrate"
|
||||
Me.CatchRate = CInt(Value)
|
||||
Case "basefriendship"
|
||||
|
@ -2959,7 +2959,7 @@ Public Class Pokemon
|
|||
''' Checks if the Pokémon is of a certain type.
|
||||
''' </summary>
|
||||
''' <param name="CheckType">The type to check.</param>
|
||||
Public Function IsType(ByVal CheckType As Element.Types) As Boolean
|
||||
Public Function IsType(ByVal CheckType As Integer) As Boolean
|
||||
If Type1.Type = CheckType Or Type2.Type = CheckType Then
|
||||
Return True
|
||||
End If
|
||||
|
|
|
@ -721,7 +721,7 @@
|
|||
Public Daytime As Integer = -1
|
||||
Public Weather As Integer = -1
|
||||
Public Season As Integer = -1
|
||||
Public Types As New List(Of Element.Types)
|
||||
Public Types As New List(Of Integer)
|
||||
Public Probability As Integer = 100
|
||||
|
||||
Public Sub New(ByVal dataLine As String)
|
||||
|
@ -758,7 +758,7 @@
|
|||
|
||||
If dataParts(5) <> "-1" Then
|
||||
For Each typePart As String In dataParts(5).Split(CChar(","))
|
||||
Me.Types.Add(New Element(typePart).Type)
|
||||
Me.Types.Add(BattleSystem.GameModeElementLoader.GetElementByName(typePart).Type)
|
||||
Next
|
||||
End If
|
||||
|
||||
|
@ -856,7 +856,7 @@
|
|||
End If
|
||||
|
||||
If Me.Types.Count > 0 Then
|
||||
For Each t As Element.Types In Me.Types
|
||||
For Each t As Integer In Me.Types
|
||||
If p.IsType(t) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
|
|
@ -80,48 +80,53 @@ Public Class PokemonForms
|
|||
form.WildFormTriggers.Add(arguments(10))
|
||||
End If
|
||||
If arguments.Count >= 12 Then
|
||||
Select Case arguments(11).ToLower
|
||||
Case "normal"
|
||||
form.TypeChange = Element.Types.Normal
|
||||
Case "fighting"
|
||||
form.TypeChange = Element.Types.Fighting
|
||||
Case "flying"
|
||||
form.TypeChange = Element.Types.Flying
|
||||
Case "poison"
|
||||
form.TypeChange = Element.Types.Poison
|
||||
Case "ground"
|
||||
form.TypeChange = Element.Types.Ground
|
||||
Case "rock"
|
||||
form.TypeChange = Element.Types.Rock
|
||||
Case "bug"
|
||||
form.TypeChange = Element.Types.Bug
|
||||
Case "ghost"
|
||||
form.TypeChange = Element.Types.Ghost
|
||||
Case "steel"
|
||||
form.TypeChange = Element.Types.Steel
|
||||
Case "fire"
|
||||
form.TypeChange = Element.Types.Fire
|
||||
Case "water"
|
||||
form.TypeChange = Element.Types.Water
|
||||
Case "grass"
|
||||
form.TypeChange = Element.Types.Grass
|
||||
Case "electric"
|
||||
form.TypeChange = Element.Types.Electric
|
||||
Case "psychic"
|
||||
form.TypeChange = Element.Types.Psychic
|
||||
Case "ice"
|
||||
form.TypeChange = Element.Types.Ice
|
||||
Case "dragon"
|
||||
form.TypeChange = Element.Types.Dragon
|
||||
Case "dark"
|
||||
form.TypeChange = Element.Types.Dark
|
||||
Case "fairy"
|
||||
form.TypeChange = Element.Types.Fairy
|
||||
Case "shadow"
|
||||
form.TypeChange = Element.Types.Shadow
|
||||
Case Else
|
||||
form.TypeChange = Element.Types.Blank
|
||||
End Select
|
||||
If StringHelper.IsNumeric(arguments(11)) = False Then
|
||||
|
||||
Select Case arguments(11).ToLower
|
||||
Case "normal"
|
||||
form.TypeChange = Element.Types.Normal
|
||||
Case "fighting"
|
||||
form.TypeChange = Element.Types.Fighting
|
||||
Case "flying"
|
||||
form.TypeChange = Element.Types.Flying
|
||||
Case "poison"
|
||||
form.TypeChange = Element.Types.Poison
|
||||
Case "ground"
|
||||
form.TypeChange = Element.Types.Ground
|
||||
Case "rock"
|
||||
form.TypeChange = Element.Types.Rock
|
||||
Case "bug"
|
||||
form.TypeChange = Element.Types.Bug
|
||||
Case "ghost"
|
||||
form.TypeChange = Element.Types.Ghost
|
||||
Case "steel"
|
||||
form.TypeChange = Element.Types.Steel
|
||||
Case "fire"
|
||||
form.TypeChange = Element.Types.Fire
|
||||
Case "water"
|
||||
form.TypeChange = Element.Types.Water
|
||||
Case "grass"
|
||||
form.TypeChange = Element.Types.Grass
|
||||
Case "electric"
|
||||
form.TypeChange = Element.Types.Electric
|
||||
Case "psychic"
|
||||
form.TypeChange = Element.Types.Psychic
|
||||
Case "ice"
|
||||
form.TypeChange = Element.Types.Ice
|
||||
Case "dragon"
|
||||
form.TypeChange = Element.Types.Dragon
|
||||
Case "dark"
|
||||
form.TypeChange = Element.Types.Dark
|
||||
Case "fairy"
|
||||
form.TypeChange = Element.Types.Fairy
|
||||
Case "shadow"
|
||||
form.TypeChange = Element.Types.Shadow
|
||||
Case Else
|
||||
form.TypeChange = Element.Types.Blank
|
||||
End Select
|
||||
Else
|
||||
form.TypeChange = BattleSystem.GameModeElementLoader.GetElementByID(CInt(arguments(11))).Type
|
||||
End If
|
||||
If arguments.Count >= 13 Then
|
||||
If arguments(12) <> "" Then
|
||||
form.IncludeBaseFormInDexCount = CBool(arguments(12))
|
||||
|
@ -562,7 +567,7 @@ Public Class PokemonForms
|
|||
Public OverworldSpriteFileSuffix As String = ""
|
||||
Public CryFileSuffix As String = ""
|
||||
Public WildFormTriggers As New List(Of String)
|
||||
Public TypeChange As Element.Types = Element.Types.Blank
|
||||
Public TypeChange As Integer = Element.Types.Blank
|
||||
Public IncludeBaseFormInDexCount As Boolean = False
|
||||
|
||||
Public Overridable Function GetInitialAdditionalData(ByVal P As Pokemon) As String
|
||||
|
@ -587,13 +592,13 @@ Public Class PokemonForms
|
|||
ElseIf trigger(0).ToLower = "gender" Then
|
||||
If GetGenderFormMatch(P, True) = "match" Then
|
||||
If TypeChange <> Element.Types.Blank Then
|
||||
Return TypeChange.ToString
|
||||
Return BattleSystem.GameModeElementLoader.GetElementByID(TypeChange).ToString
|
||||
Else
|
||||
Return AdditionalValue
|
||||
End If
|
||||
End If
|
||||
ElseIf trigger(0).ToLower = "season" Then
|
||||
If GetSeasonFormMatch(true) = "match" Then
|
||||
If GetSeasonFormMatch(True) = "match" Then
|
||||
If TypeChange <> Element.Types.Blank Then
|
||||
Return TypeChange.ToString
|
||||
Else
|
||||
|
|
|
@ -34,7 +34,7 @@ Public Class FontManager
|
|||
End If
|
||||
Next
|
||||
'if there's a game mode loaded, look in that too for additional fonts
|
||||
If Not GameModeManager.ActiveGameMode.Name = "Kolben" Then
|
||||
If Not GameModeManager.ActiveGameMode.DirectoryName = "Kolben" Then
|
||||
If Not GameModeManager.ActiveGameMode.ContentPath = "\Content\" Then
|
||||
If System.IO.Directory.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & "\Fonts\BMP") = True Then
|
||||
For Each s As String In System.IO.Directory.GetFiles(GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & "\Fonts\BMP")
|
||||
|
|
|
@ -32,7 +32,7 @@ Public Class ModelManager
|
|||
Public Shared Function ModelExist(ByVal Path As String) As Boolean
|
||||
Dim cContent As ContentManager = ContentPackManager.GetContentManager(Path, ".xnb")
|
||||
If cContent.RootDirectory = "Content" Then
|
||||
If GameModeManager.ActiveGameMode.Name <> "Kolben" Then
|
||||
If GameModeManager.ActiveGameMode.DirectoryName <> "Kolben" Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
ContentPackManager.Load(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat")
|
||||
Next
|
||||
|
||||
BattleSystem.GameModeElementLoader.Load()
|
||||
BattleSystem.GameModeAttackLoader.Load()
|
||||
GameModeItemLoader.Load()
|
||||
|
||||
|
@ -159,7 +160,7 @@
|
|||
|
||||
Core.Player.filePrefix = folderPath
|
||||
Core.Player.GameStart = Date.Now
|
||||
Core.Player.GameMode = GameModeManager.ActiveGameMode.Name
|
||||
Core.Player.GameMode = GameModeManager.ActiveGameMode.DirectoryName
|
||||
Core.Player.startFOV = 60
|
||||
Core.Player.startFreeCameraMode = True
|
||||
Core.Player.startPosition = New Vector3(x, y, z)
|
||||
|
|
|
@ -954,7 +954,7 @@ Public Class NewMainMenuScreen
|
|||
SpriteBatch.Draw(tmpProfile.PokemonTextures(i), New Rectangle(displayRect.X + 30 + i * 70, displayRect.Y + 70, 64, 64), Color.White)
|
||||
Next
|
||||
GetFontRenderer().DrawString(FontManager.InGameFont, Localization.GetString("main_menu_savefile_name", "Player Name") & ": " & tmpProfile.Name & Environment.NewLine &
|
||||
Localization.GetString("main_menu_savefile_gamemode", "GameMode") & ": " & tmpProfile.GameMode, New Vector2(displayRect.X + 30, displayRect.Y + 20), Color.White, 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F)
|
||||
Localization.GetString("main_menu_savefile_gamemode", "GameMode") & ": " & GameModeManager.GetGameMode(tmpProfile.GameMode).Name, New Vector2(displayRect.X + 30, displayRect.Y + 20), Color.White, 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F)
|
||||
GetFontRenderer().DrawString(FontManager.InGameFont, Localization.GetString("main_menu_savefile_badges", "Badges") & ": " & tmpProfile.Badges.ToString() & Environment.NewLine &
|
||||
Localization.GetString("main_menu_savefile_playtime", "Play time") & ": " & tmpProfile.TimePlayed & Environment.NewLine &
|
||||
Localization.GetString("main_menu_savefile_location", "Location") & ": " & tmpProfile.Location, New Vector2(displayRect.X + 30, displayRect.Y + 150), Color.White, 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F)
|
||||
|
@ -1630,7 +1630,7 @@ Public Class GameModeSelectionScreen
|
|||
Dim displayText = _gameModes(i).Name.CropStringToWidth(FontManager.InGameFont, WIDTH - 32)
|
||||
|
||||
If displayText = "Kolben" Then
|
||||
displayText = "Pokemon 3D"
|
||||
displayText = "Pokémon 3D"
|
||||
End If
|
||||
For x = 0 To CInt(WIDTH / 16)
|
||||
For y = 0 To CInt(HEIGHT / 16)
|
||||
|
@ -1651,7 +1651,7 @@ Public Class GameModeSelectionScreen
|
|||
|
||||
Dim dispName As String = GameMode.Name
|
||||
If dispName = "Kolben" Then
|
||||
dispName = "Pokemon 3D"
|
||||
dispName = "Pokémon 3D"
|
||||
End If
|
||||
Dim dispDescription As String = GameMode.Description.Replace("~", Environment.NewLine).Replace("*", Environment.NewLine)
|
||||
Dim dispVersion As String = GameMode.Version
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
Inherits Screen
|
||||
|
||||
Public Enum VisibleMode As Integer
|
||||
Always
|
||||
Temporary
|
||||
Unlock
|
||||
Register
|
||||
End Enum
|
||||
Public Const RasterSize As Integer = 32
|
||||
Public Shared mapOffsetX As Integer = 100
|
||||
Public Shared mapOffsetY As Integer = 75
|
||||
|
@ -148,12 +154,29 @@
|
|||
If Tags.ContainsKey("playerposition") = True Then
|
||||
PlayerPositionList = Tags("playerposition").Split(CChar(",")).ToList()
|
||||
End If
|
||||
Dim Visible As Integer = VisibleMode.Always
|
||||
If Tags.ContainsKey("visible") = True Then
|
||||
Select Case Tags("visible").ToLower()
|
||||
Case "0", "always"
|
||||
Visible = VisibleMode.Always
|
||||
Case "1", "temporary"
|
||||
Visible = VisibleMode.Temporary
|
||||
Case "2", "unlock"
|
||||
Visible = VisibleMode.Unlock
|
||||
Case "3", "register"
|
||||
Visible = VisibleMode.Register
|
||||
End Select
|
||||
End If
|
||||
Dim Register As String = ""
|
||||
If Tags.ContainsKey("register") = True Then
|
||||
Register = Tags("register")
|
||||
End If
|
||||
If Tags.ContainsKey("flyto") = True Then
|
||||
Dim FlyTo As New List(Of String)
|
||||
FlyTo = Tags("flyto").Split(CChar(",")).ToList()
|
||||
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1))))
|
||||
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
|
||||
Else
|
||||
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1))))
|
||||
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
|
||||
End If
|
||||
Case "route"
|
||||
Dim Name As String = Tags("name")
|
||||
|
@ -209,12 +232,31 @@
|
|||
If Tags.ContainsKey("playerposition") = True Then
|
||||
PlayerPositionList = Tags("playerposition").Split(CChar(",")).ToList()
|
||||
End If
|
||||
|
||||
Dim Visible As Integer = VisibleMode.Always
|
||||
If Tags.ContainsKey("visible") = True Then
|
||||
Select Case Tags("visible").ToLower()
|
||||
Case "0", "always"
|
||||
Visible = VisibleMode.Always
|
||||
Case "1", "temporary"
|
||||
Visible = VisibleMode.Temporary
|
||||
Case "2", "unlock"
|
||||
Visible = VisibleMode.Unlock
|
||||
Case "3", "register"
|
||||
Visible = VisibleMode.Register
|
||||
End Select
|
||||
End If
|
||||
|
||||
Dim Register As String = ""
|
||||
If Tags.ContainsKey("register") = True Then
|
||||
Register = Tags("register")
|
||||
End If
|
||||
If Tags.ContainsKey("flyto") = True Then
|
||||
Dim FlyTo As New List(Of String)
|
||||
FlyTo = Tags("flyto").Split(CChar(",")).ToList()
|
||||
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1))))
|
||||
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
|
||||
Else
|
||||
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1))))
|
||||
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
|
||||
End If
|
||||
Case "place"
|
||||
Dim Name As String = Tags("name")
|
||||
|
@ -242,12 +284,32 @@
|
|||
If Tags.ContainsKey("playerposition") = True Then
|
||||
PlayerPositionList = Tags("playerposition").Split(CChar(",")).ToList()
|
||||
End If
|
||||
|
||||
Dim Visible As Integer = VisibleMode.Always
|
||||
If Tags.ContainsKey("visible") = True Then
|
||||
Select Case Tags("visible").ToLower()
|
||||
Case "0", "always"
|
||||
Visible = VisibleMode.Always
|
||||
Case "1", "temporary"
|
||||
Visible = VisibleMode.Temporary
|
||||
Case "2", "unlock"
|
||||
Visible = VisibleMode.Unlock
|
||||
Case "3", "register"
|
||||
Visible = VisibleMode.Register
|
||||
End Select
|
||||
End If
|
||||
|
||||
Dim Register As String = ""
|
||||
If Tags.ContainsKey("register") = True Then
|
||||
Register = Tags("register")
|
||||
End If
|
||||
|
||||
If Tags.ContainsKey("flyto") = True Then
|
||||
Dim FlyTo As New List(Of String)
|
||||
FlyTo = Tags("flyto").Split(CChar(",")).ToList()
|
||||
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1))))
|
||||
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
|
||||
Else
|
||||
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1))))
|
||||
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
|
||||
End If
|
||||
End Select
|
||||
|
||||
|
@ -344,10 +406,27 @@
|
|||
If hoverText = "" And pokehoverText = "" And drawObjects(2) = True Then
|
||||
For Each Place As Place In places
|
||||
If Place.getRectangle(mapOffset).Contains(cursorPoint) = True Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
Place.Click(flag)
|
||||
Dim DoUpdate As Boolean = False
|
||||
If Place.Visible = VisibleMode.Always OrElse Place.Visible = VisibleMode.Temporary AndAlso Place.ContainFiles.Contains(Level.LevelFile.ToLower()) = True Then
|
||||
DoUpdate = True
|
||||
ElseIf Place.Visible = VisibleMode.Unlock Then
|
||||
For Each p As String In Place.ContainFiles
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
|
||||
DoUpdate = True
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
ElseIf Place.Visible = VisibleMode.Register Then
|
||||
If ActionScript.IsRegistered(Place.Register) = True Then
|
||||
DoUpdate = True
|
||||
End If
|
||||
End If
|
||||
If DoUpdate = True Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
Place.Click(flag)
|
||||
End If
|
||||
hoverText = Place.Name
|
||||
End If
|
||||
hoverText = Place.Name
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
@ -355,10 +434,27 @@
|
|||
If hoverText = "" And pokehoverText = "" And drawObjects(0) = True Then
|
||||
For Each City As City In cities
|
||||
If City.getRectangle(mapOffset).Contains(cursorPoint) = True Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
City.Click(flag)
|
||||
Dim DoUpdate As Boolean = False
|
||||
If City.Visible = VisibleMode.Always OrElse City.Visible = VisibleMode.Temporary AndAlso City.ContainFiles.Contains(Level.LevelFile.ToLower()) = True Then
|
||||
DoUpdate = True
|
||||
ElseIf City.Visible = VisibleMode.Unlock Then
|
||||
For Each p As String In City.ContainFiles
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
|
||||
DoUpdate = True
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
ElseIf City.Visible = VisibleMode.Register Then
|
||||
If ActionScript.IsRegistered(City.Register) = True Then
|
||||
DoUpdate = True
|
||||
End If
|
||||
End If
|
||||
If DoUpdate = True Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
City.Click(flag)
|
||||
End If
|
||||
hoverText = City.Name
|
||||
End If
|
||||
hoverText = City.Name
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
@ -366,10 +462,28 @@
|
|||
If hoverText = "" And pokehoverText = "" And drawObjects(1) = True Then
|
||||
For Each Route As Route In routes
|
||||
If Route.getRectangle(mapOffset).Contains(cursorPoint) = True Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
Route.Click(flag)
|
||||
Dim DoUpdate As Boolean = False
|
||||
If Route.Visible = VisibleMode.Always OrElse Route.Visible = VisibleMode.Temporary AndAlso Route.ContainFiles.Contains(Level.LevelFile.ToLower()) = True Then
|
||||
DoUpdate = True
|
||||
ElseIf Route.Visible = VisibleMode.Unlock Then
|
||||
For Each p As String In Route.ContainFiles
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
|
||||
DoUpdate = True
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
ElseIf Route.Visible = VisibleMode.Register Then
|
||||
If ActionScript.IsRegistered(Route.Register) = True Then
|
||||
DoUpdate = True
|
||||
End If
|
||||
End If
|
||||
hoverText = Route.Name
|
||||
If DoUpdate = True Then
|
||||
If Controls.Accept(True, True, True) = True Then
|
||||
Route.Click(flag)
|
||||
End If
|
||||
hoverText = Route.Name
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
@ -450,7 +564,24 @@
|
|||
c = Color.Gray
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.Draw(Route.getTexture(objectsTexture, isSelected), Route.getRectangle(mapOffset), c)
|
||||
Dim DoDraw As Boolean = False
|
||||
If Route.Visible = VisibleMode.Always OrElse Route.Visible = VisibleMode.Temporary AndAlso Route.ContainFiles.Contains(Level.LevelFile.ToLower()) = True Then
|
||||
DoDraw = True
|
||||
ElseIf Route.Visible = VisibleMode.Unlock Then
|
||||
For Each p As String In Route.ContainFiles
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
|
||||
DoDraw = True
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
ElseIf Route.Visible = VisibleMode.Register Then
|
||||
If ActionScript.IsRegistered(Route.Register) = True Then
|
||||
DoDraw = True
|
||||
End If
|
||||
End If
|
||||
If DoDraw = True Then
|
||||
Core.SpriteBatch.Draw(Route.getTexture(objectsTexture, isSelected), Route.getRectangle(mapOffset), c)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
@ -466,7 +597,24 @@
|
|||
c = Color.Gray
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.Draw(City.getTexture(objectsTexture, isSelected), City.getRectangle(mapOffset), c)
|
||||
Dim DoDraw As Boolean = False
|
||||
If City.Visible = VisibleMode.Always OrElse City.Visible = VisibleMode.Temporary AndAlso City.ContainFiles.Contains(Level.LevelFile.ToLower()) = True Then
|
||||
DoDraw = True
|
||||
ElseIf City.Visible = VisibleMode.Unlock Then
|
||||
For Each p As String In City.ContainFiles
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
|
||||
DoDraw = True
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
ElseIf City.Visible = VisibleMode.Register Then
|
||||
If ActionScript.IsRegistered(City.Register) = True Then
|
||||
DoDraw = True
|
||||
End If
|
||||
End If
|
||||
If DoDraw = True Then
|
||||
Core.SpriteBatch.Draw(City.getTexture(objectsTexture, isSelected), City.getRectangle(mapOffset), c)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
@ -482,7 +630,24 @@
|
|||
c = Color.Gray
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.Draw(Place.getTexture(objectsTexture, isSelected), Place.getRectangle(mapOffset), c)
|
||||
Dim DoDraw As Boolean = False
|
||||
If Place.Visible = VisibleMode.Always OrElse Place.Visible = VisibleMode.Temporary AndAlso Place.ContainFiles.Contains(Level.LevelFile.ToLower()) = True Then
|
||||
DoDraw = True
|
||||
ElseIf Place.Visible = VisibleMode.Unlock Then
|
||||
For Each p As String In Place.ContainFiles
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
|
||||
DoDraw = True
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
ElseIf Place.Visible = VisibleMode.Register Then
|
||||
If ActionScript.IsRegistered(Place.Register) = True Then
|
||||
DoDraw = True
|
||||
End If
|
||||
End If
|
||||
If DoDraw = True Then
|
||||
Core.SpriteBatch.Draw(Place.getTexture(objectsTexture, isSelected), Place.getRectangle(mapOffset), c)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
@ -739,10 +904,12 @@
|
|||
Public FlyToFile As String = ""
|
||||
Public FlyToPosition As Vector3 = New Vector3(0)
|
||||
Public Size As CitySize = CitySize.Small
|
||||
Public Visible As Integer = VisibleMode.Always
|
||||
Public Register As String = ""
|
||||
|
||||
Dim T As Texture2D = Nothing
|
||||
|
||||
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal Size As CitySize, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1)
|
||||
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal Size As CitySize, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional Register As String = "")
|
||||
Me.Name = Name
|
||||
|
||||
For Each file As String In ContainFiles
|
||||
|
@ -765,6 +932,8 @@
|
|||
|
||||
Me.FlyToFile = FlyToFile
|
||||
Me.FlyToPosition = FlyToPosition
|
||||
Me.Visible = Visible
|
||||
Me.Register = Register
|
||||
End Sub
|
||||
|
||||
Public Function getPosition() As Vector2
|
||||
|
@ -842,7 +1011,7 @@
|
|||
Public Function CanFlyTo(ByVal flag() As Object) As Boolean
|
||||
If flag(0).ToString().ToLower() = "fly" Then
|
||||
If FlyToPosition <> Nothing And FlyToFile <> "" Then
|
||||
If Core.Player.VisitedMaps.Split(CChar(",")).Contains(FlyToFile) = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(FlyToFile.ToLower()) = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
|
@ -894,10 +1063,12 @@
|
|||
|
||||
Public RouteDirection As RouteDirections = RouteDirections.Horizontal
|
||||
Public RouteType As RouteTypes = RouteTypes.Land
|
||||
Public Visible As Integer = VisibleMode.Always
|
||||
Public Register As String = ""
|
||||
|
||||
Dim T As Texture2D = Nothing
|
||||
|
||||
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal RouteDirection As RouteDirections, ByVal RouteType As RouteTypes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1)
|
||||
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal RouteDirection As RouteDirections, ByVal RouteType As RouteTypes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional Register As String = "")
|
||||
Me.Name = Name
|
||||
Me.PositionX = PositionX
|
||||
Me.PositionY = PositionY
|
||||
|
@ -919,6 +1090,9 @@
|
|||
End If
|
||||
Me.FlyToFile = FlyToFile
|
||||
Me.FlyToPosition = FlyToPosition
|
||||
|
||||
Me.Visible = Visible
|
||||
Me.Register = Register
|
||||
End Sub
|
||||
|
||||
Public Function getPosition() As Vector2
|
||||
|
@ -1030,7 +1204,7 @@
|
|||
Public Function CanFlyTo(ByVal flag() As Object) As Boolean
|
||||
If flag(0).ToString().ToLower() = "fly" Then
|
||||
If FlyToPosition <> Nothing And FlyToFile <> "" Then
|
||||
If Core.Player.VisitedMaps.Split(CChar(",")).Contains(FlyToFile) = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(FlyToFile.ToLower()) = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
|
@ -1058,13 +1232,15 @@
|
|||
Public PlayerPositionX As Integer = -1
|
||||
Public PlayerPositionY As Integer = -1
|
||||
Public PlaceSize As PlaceSizes
|
||||
Public Visible As Integer = VisibleMode.Always
|
||||
Public Register As String = ""
|
||||
|
||||
Public FlyToFile As String = ""
|
||||
Public FlyToPosition As Vector3 = New Vector3(0)
|
||||
|
||||
Dim T As Texture2D = Nothing
|
||||
|
||||
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal PlaceSize As PlaceSizes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1)
|
||||
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal PlaceSize As PlaceSizes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional Register As String = "")
|
||||
Me.Name = Name
|
||||
Me.PositionX = PositionX
|
||||
Me.PositionY = PositionY
|
||||
|
@ -1086,6 +1262,8 @@
|
|||
|
||||
Me.FlyToFile = FlyToFile
|
||||
Me.FlyToPosition = FlyToPosition
|
||||
Me.Visible = Visible
|
||||
Me.Register = Register
|
||||
End Sub
|
||||
|
||||
Public Function getPosition() As Vector2
|
||||
|
@ -1175,7 +1353,7 @@
|
|||
If FlyToPosition <> Nothing And FlyToFile <> "" Then
|
||||
Dim flytomap As Boolean = False
|
||||
For Each map In ContainFiles
|
||||
If Core.Player.VisitedMaps.Split(CChar(",")).Contains(map) = True Then
|
||||
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(map.ToLower()) = True Then
|
||||
flytomap = True
|
||||
Exit For
|
||||
End If
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
ContentPackManager.Load(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat")
|
||||
Next
|
||||
|
||||
BattleSystem.GameModeElementLoader.Load()
|
||||
BattleSystem.GameModeAttackLoader.Load()
|
||||
|
||||
SmashRock.Load()
|
||||
|
|
|
@ -1014,18 +1014,22 @@ Public Class PartyScreen
|
|||
|
||||
Private Sub UseRide()
|
||||
If Screen.Level.Riding = True Then
|
||||
Screen.Level.Riding = False
|
||||
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
|
||||
Core.Player.Skin = Core.Player.TempRideSkin
|
||||
If Screen.Level.RideType = 3 Then
|
||||
TextBox.Show(Localization.GetString("fieldmove_ride_cannot_walk", "You cannot walk here!"), {}, True, False)
|
||||
Else
|
||||
Screen.Level.Riding = False
|
||||
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
|
||||
Core.Player.Skin = Core.Player.TempRideSkin
|
||||
|
||||
ChooseBox.Showing = False
|
||||
Core.SetScreen(Me.PreScreen)
|
||||
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
|
||||
Core.SetScreen(Core.CurrentScreen.PreScreen)
|
||||
End If
|
||||
ChooseBox.Showing = False
|
||||
Core.SetScreen(Me.PreScreen)
|
||||
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
|
||||
Core.SetScreen(Core.CurrentScreen.PreScreen)
|
||||
End If
|
||||
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.Play(Level.MusicLoop, True, 0.01F)
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.Play(Level.MusicLoop, True, 0.01F)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Screen.Level.Surfing = False And Screen.Camera.IsMoving() = False And Screen.Camera.Turning = False And Level.CanRide() = True Then
|
||||
|
@ -1057,7 +1061,7 @@ Public Class PartyScreen
|
|||
MusicManager.Play("ride", True)
|
||||
End If
|
||||
Else
|
||||
TextBox.Show("You cannot Ride here!", {}, True, False)
|
||||
TextBox.Show(Localization.GetString("fieldmove_ride_cannot_ride", "You cannot Ride here!"), {}, True, False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
|
|
@ -123,6 +123,11 @@
|
|||
steps = 250
|
||||
End Select
|
||||
Core.Player.RepelSteps += steps
|
||||
Case "use"
|
||||
Dim itemID As String = argument
|
||||
If Core.Player.Inventory.GetItemAmount(itemID) > 0 Then
|
||||
Item.GetItemByID(itemID).Use()
|
||||
End If
|
||||
Case "select"
|
||||
Dim allowedPages As Integer()
|
||||
Dim allowedItems As New List(Of String)
|
||||
|
|
|
@ -69,6 +69,9 @@
|
|||
Case "setsafari"
|
||||
Screen.Level.IsSafariZone = CBool(argument)
|
||||
IsReady = True
|
||||
Case "setridetype"
|
||||
Screen.Level.RideType = CInt(argument).Clamp(0, 3)
|
||||
IsReady = True
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -1050,6 +1050,10 @@
|
|||
Status = Pokemon.StatusProblems.Sleep
|
||||
Case "fnt"
|
||||
Status = Pokemon.StatusProblems.Fainted
|
||||
Case "none"
|
||||
Status = Pokemon.StatusProblems.None
|
||||
Case Else
|
||||
Status = Pokemon.StatusProblems.None
|
||||
End Select
|
||||
If Status <> Nothing AndAlso Core.Player.Pokemons.Count - 1 >= Index Then
|
||||
Core.Player.Pokemons(Index).Status = Status
|
||||
|
@ -1057,6 +1061,71 @@
|
|||
Core.Player.Pokemons(Index).HP = 0
|
||||
End If
|
||||
End If
|
||||
Case "ride"
|
||||
Dim Index As Integer = -1
|
||||
If argument <> "" Then
|
||||
If Core.Player.Pokemons(Index).KnowsMove(BattleSystem.Attack.GetAttackByID(560)) = False Then
|
||||
Logger.Log(Logger.LogTypes.ErrorMessage, "The specified Pokémon does not know the move Ride. The specified index is: " & Index.ToString & ".")
|
||||
Else
|
||||
Index = CInt(argument)
|
||||
End If
|
||||
End If
|
||||
|
||||
If Index = -1 Then
|
||||
For p = 0 To Core.Player.Pokemons.Count - 1
|
||||
If Core.Player.Pokemons(p).KnowsMove(BattleSystem.Attack.GetAttackByID(560)) Then
|
||||
Index = p
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If Index <> -1 Then
|
||||
If Screen.Level.Riding = True Then
|
||||
If Screen.Level.RideType = 3 Then
|
||||
Screen.TextBox.Show(Localization.GetString("fieldmove_ride_cannot_walk", "You cannot walk here!"), {}, True, False)
|
||||
Else
|
||||
Screen.Level.Riding = False
|
||||
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
|
||||
Core.Player.Skin = Core.Player.TempRideSkin
|
||||
Screen.ChooseBox.Showing = False
|
||||
|
||||
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.Play(Screen.Level.MusicLoop, True, 0.01F)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Screen.Level.Surfing = False And Screen.Camera.IsMoving() = False And Screen.Camera.Turning = False And Screen.Level.CanRide() = True Then
|
||||
Screen.ChooseBox.Showing = False
|
||||
|
||||
Screen.Level.Riding = True
|
||||
Core.Player.TempRideSkin = Core.Player.Skin
|
||||
|
||||
Dim skin As String = "[POKEMON|"
|
||||
If Core.Player.Pokemons(Index).IsShiny = True Then
|
||||
skin &= "S]"
|
||||
Else
|
||||
skin &= "N]"
|
||||
End If
|
||||
skin &= Core.Player.Pokemons(Index).Number & PokemonForms.GetOverworldAddition(Core.Player.Pokemons(Index))
|
||||
|
||||
Screen.Level.OwnPlayer.SetTexture(skin, False)
|
||||
|
||||
SoundManager.PlayPokemonCry(Core.Player.Pokemons(Index).Number)
|
||||
|
||||
Screen.TextBox.Show(Core.Player.Pokemons(Index).GetDisplayName() & " " & Localization.GetString("fieldmove_ride_used", "used~Ride!"), {}, True, False)
|
||||
PlayerStatistics.Track("Ride used", 1)
|
||||
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.Play("ride", True)
|
||||
End If
|
||||
Else
|
||||
Screen.TextBox.Show(Localization.GetString("fieldmove_ride_cannot_ride", "You cannot Ride here!"), {}, True, False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
IsReady = True
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
Select Case command.ToLower()
|
||||
Case "notification"
|
||||
'@text.notification(message,[int_delay=500],[int_backgroundID=0],[int_IconID=0],[str_sfx],[str_script],[bool_force=0])
|
||||
'@text.notification(message,[int_delay=500],[int_backgroundID=0],[int_IconID=0],[str_sfx],[str_script],[bool_force=0],[clear_list=0])
|
||||
Dim _NotificationPopup As New NotificationPopup
|
||||
Dim args As String() = argument.Split(CChar(","))
|
||||
Select Case args.Length
|
||||
|
@ -30,11 +30,21 @@
|
|||
_NotificationPopup.Setup(args(0), int(args(1)), int(args(2)), int(args(3)), args(4), args(5))
|
||||
Case 7
|
||||
_NotificationPopup.Setup(args(0), int(args(1)), int(args(2)), int(args(3)), args(4), args(5), CBool(args(6)))
|
||||
Case 8
|
||||
_NotificationPopup.Setup(args(0), int(args(1)), int(args(2)), int(args(3)), args(4), args(5), CBool(args(6)))
|
||||
End Select
|
||||
If args.Length = 7 AndAlso CBool(args(6)) = True Then
|
||||
CType(CurrentScreen, OverworldScreen).NotificationPopupList.Insert(0, _NotificationPopup)
|
||||
Else
|
||||
CType(CurrentScreen, OverworldScreen).NotificationPopupList.Add(_NotificationPopup)
|
||||
If args.Length = 8 Then
|
||||
If CType(CurrentScreen, OverworldScreen).NotificationPopupList.Count > 0 AndAlso CBool(args(7)) = True Then
|
||||
CType(CurrentScreen, OverworldScreen).NotificationPopupList(0)._delayDate = Date.Now
|
||||
If CType(CurrentScreen, OverworldScreen).NotificationPopupList.Count > 1 Then
|
||||
CType(CurrentScreen, OverworldScreen).NotificationPopupList.RemoveRange(1, CType(CurrentScreen, OverworldScreen).NotificationPopupList.Count - 2)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If args.Length >= 7 AndAlso CBool(args(6)) = True Then
|
||||
CType(CurrentScreen, OverworldScreen).NotificationPopupList.Insert(0, _NotificationPopup)
|
||||
Else
|
||||
CType(CurrentScreen, OverworldScreen).NotificationPopupList.Add(_NotificationPopup)
|
||||
End If
|
||||
Case "show"
|
||||
Screen.TextBox.reDelay = 0.0F
|
||||
|
|
|
@ -149,6 +149,28 @@
|
|||
Dim moveIndex As Integer = int(argument.GetSplit(1))
|
||||
|
||||
Return Core.Player.Pokemons(pokeIndex).Attacks(moveIndex).Name
|
||||
Case "levelattacks"
|
||||
Dim pokeIndex As Integer = int(argument.GetSplit(0))
|
||||
Dim MaxLevel As Integer = Core.Player.Pokemons(pokeIndex).Level
|
||||
Dim levelMoves As String = ""
|
||||
If argument.Split(",").Count > 1 Then
|
||||
If argument.GetSplit(1).ToLower = "-1" Then
|
||||
MaxLevel = Core.Player.Pokemons(pokeIndex).Level
|
||||
Else
|
||||
MaxLevel = CInt(argument.GetSplit(1))
|
||||
End If
|
||||
End If
|
||||
|
||||
For Each level As Integer In Core.Player.Pokemons(pokeIndex).AttackLearns.Keys
|
||||
If level <= MaxLevel Then
|
||||
If levelMoves = "" Then
|
||||
levelMoves = Core.Player.Pokemons(pokeIndex).AttackLearns(level).ID.ToString
|
||||
Else
|
||||
levelMoves &= "," & Core.Player.Pokemons(pokeIndex).AttackLearns(level).ID.ToString
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return levelMoves
|
||||
Case "isshiny"
|
||||
Dim index As Integer = int(argument.GetSplit(0))
|
||||
|
||||
|
|
|
@ -152,6 +152,8 @@
|
|||
Return output
|
||||
Case "scriptlevel"
|
||||
Return ActionScript.ScriptLevelIndex.ToString()
|
||||
case "language"
|
||||
Return Localization.LanguageSuffix
|
||||
End Select
|
||||
|
||||
Return DefaultNull
|
||||
|
|
|
@ -211,6 +211,7 @@ Namespace ScriptVersion2
|
|||
r(New ScriptCommand("level", "waitforsave", "Makes the level idle until the current saving of an GameJolt save is done."))
|
||||
r(New ScriptCommand("level", "reload", "Reloads the current map."))
|
||||
r(New ScriptCommand("level", "setsafari", {New ScriptArgument("safari", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets if the current map is a Safari Zone (influences battle style)."))
|
||||
r(New ScriptCommand("level", "setridetype", {New ScriptArgument("rideType", ScriptArgument.ArgumentTypes.Int, {"0-3"})}.ToList(), "Sets the Ride Type of the current map. (0 = Depends on CanDig and CanFly tags, 1 = Can ride, 2 = Can not ride, 3 = Can't stop riding once started)"))
|
||||
' Constructs:
|
||||
r(New ScriptCommand("level", "mapfile", "str", "Returns the mapfile of the currently loaded map.", ",", True))
|
||||
r(New ScriptCommand("level", "levelfile", "str", "Returns the mapfile of the currently loaded map.", ",", True))
|
||||
|
@ -290,6 +291,7 @@ Namespace ScriptVersion2
|
|||
r(New ScriptCommand("item", "messagegive", {New ScriptArgument("ItemID", ScriptArgument.ArgumentTypes.Int),
|
||||
New ScriptArgument("Amount", ScriptArgument.ArgumentTypes.Int, True, "1")}.ToList(), "Displays a message for getting the specified amount of items."))
|
||||
r(New ScriptCommand("item", "repel", {New ScriptArgument("RepelItemID", ScriptArgument.ArgumentTypes.Int, {"20", "42", "43"})}.ToList(), "Adds the steps of the Repel to the Repel steps of the player."))
|
||||
r(New ScriptCommand("item", "use", {New ScriptArgument("ItemID", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Uses the specified item if the player has it."))
|
||||
r(New ScriptCommand("item", "select", {New ScriptArgument("AllowedPages", ScriptArgument.ArgumentTypes.Str, True, "-1"),
|
||||
New ScriptArgument("AllowedItems", ScriptArgument.ArgumentTypes.Str, True, "-1")}.ToList(), "Opens an item select screen with only the specified item type pages (separated with "";"", e.g. ""0;1;2"" or ""standard;medicine;plants"") and possible item IDs (single items separated with "";"", or with a ""-"" if you want a range, e.g. ""2000-2066"")."))
|
||||
|
||||
|
@ -825,6 +827,7 @@ Namespace ScriptVersion2
|
|||
New ScriptArgument("trainerName", ScriptArgument.ArgumentTypes.Str, True, "Current TrainerName"),
|
||||
New ScriptArgument("heldItemID", ScriptArgument.ArgumentTypes.Int, True, "0"),
|
||||
New ScriptArgument("isShiny", ScriptArgument.ArgumentTypes.Bool, True, "false")}.ToList(), "Adds a Pokémon with the given Pokémon properties to the storage system."))
|
||||
r(New ScriptCommand("pokemon", "ride", {New ScriptArgument("pokemonID", ScriptArgument.ArgumentTypes.Int, True, "-1")}.ToList(), "Makes a Pokémon in the player's party use the field move Ride. If the argument is left empty, the first Pokémon who knows Ride gets selected."))
|
||||
|
||||
|
||||
' Constructs:
|
||||
|
@ -862,6 +865,8 @@ Namespace ScriptVersion2
|
|||
r(New ScriptCommand("pokemon", "countattacks", "int", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Counts the moves the Pokémon knows.", ",", True))
|
||||
r(New ScriptCommand("pokemon", "attackname", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
|
||||
New ScriptArgument("moveIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the name of the move of a Pokémon in the player's party.", ",", True))
|
||||
r(New ScriptCommand("pokemon", "levelattacks", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int),
|
||||
New ScriptArgument("maxLevel", ScriptArgument.ArgumentTypes.Int, True, "-1")}.ToList(), "Returns a list of move IDs separated by commas that a Pokémon in the player's party can learn at or below its current level/the level specified by the maxLevel argument.", ",", True))
|
||||
r(New ScriptCommand("pokemon", "isShiny", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if the Pokémon is Shiny.", ",", True))
|
||||
r(New ScriptCommand("pokemon", "nature", "str", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the nature of a Pokémon in the player's party.", ",", True))
|
||||
r(New ScriptCommand("pokemon", "ownpokemon", "bool", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if a Pokémon in the player's party was caught by the player.", ",", True))
|
||||
|
|
|
@ -324,7 +324,7 @@ Public Class Level
|
|||
''' <summary>
|
||||
''' The type of Ride the player can use on this map.
|
||||
''' </summary>
|
||||
''' <remarks>0 = Depends on CanDig and CanFly, 1 = True, 2 = False</remarks>
|
||||
''' <remarks>0 = Depends on CanDig and CanFly, 1 = True, 2 = False, 3 = Can't stop riding</remarks>
|
||||
Public Property RideType As Integer
|
||||
Get
|
||||
Return Me._rideType
|
||||
|
@ -1216,6 +1216,8 @@ Public Class Level
|
|||
Return True
|
||||
Case 2
|
||||
Return False
|
||||
Case 3
|
||||
Return True
|
||||
End Select
|
||||
End If
|
||||
If Screen.Level.CanDig = False And Screen.Level.CanFly = False Then
|
||||
|
|
Loading…
Reference in New Issue