Terrain related moves added

This commit is contained in:
Ruan Pablo 2019-09-22 18:47:55 -03:00
parent dc10d9d505
commit 4907ee5bf2
6 changed files with 348 additions and 39 deletions

View File

@ -1402,10 +1402,10 @@
'Crafty Shield 'Crafty Shield
'Case 579 'Case 579
'Flower Shield 'Flower Shield
'Case 580 Case 580
'Grassy Terrain returnMove = New Moves.Grass.GrassyTerrain()
'Case 581 Case 581
'Misty Terrain returnMove = New Moves.Fairy.MistyTerrain()
'Case 582 'Case 582
'Electrify 'Electrify
Case 583 Case 583
@ -1450,8 +1450,8 @@
'Magnetic Flux - Double Battles 'Magnetic Flux - Double Battles
'Case 603 'Case 603
'Happy Hour 'Happy Hour
'Case 604 Case 604
'Electric Terrain returnMove = New Moves.Electric.ElectricTerrain()
Case 605 Case 605
returnMove = New Moves.Fairy.DazzlingGleam() returnMove = New Moves.Fairy.DazzlingGleam()
Case 606 Case 606
@ -1600,8 +1600,8 @@
returnMove = New Moves.Bug.PollenPuff() returnMove = New Moves.Bug.PollenPuff()
Case 677 Case 677
returnMove = New Moves.Steel.AnchorShot() returnMove = New Moves.Steel.AnchorShot()
'Case 678 Case 678
'Psychic Terrain returnMove = New Moves.Psychic.PsychicTerrain()
Case 679 Case 679
returnMove = New Moves.Bug.Lunge() returnMove = New Moves.Bug.Lunge()
Case 680 Case 680

View File

@ -0,0 +1,75 @@
Namespace BattleSystem.Moves.Electric
Public Class ElectricTerrain
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Electric)
Me.ID = 604
Me.OriginalPP = 10
Me.CurrentPP = 10
Me.MaxPP = 10
Me.Power = 0
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Smart
Me.Name = "Electric Terrain"
Me.Description = "The user electrifies the ground for five turns, powering up Electric-type moves. Pokémon on the ground no longer fall asleep."
Me.CriticalChance = 0
Me.IsHMMove = False
Me.Target = Targets.All
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = False
Me.MagicCoatAffected = False
Me.SnatchAffected = False
Me.MirrorMoveAffected = False
Me.KingsrockAffected = False
Me.CounterAffected = False
Me.DisabledWhileGravity = False
Me.UseEffectiveness = False
Me.ImmunityAffected = False
Me.HasSecondaryEffect = False
Me.RemovesFrozen = False
Me.IsHealingMove = False
Me.IsRecoilMove = False
Me.IsPunchingMove = False
Me.IsDamagingMove = False
Me.IsProtectMove = False
Me.IsSoundMove = False
Me.IsAffectedBySubstitute = False
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = False
'#End
Me.AIField1 = AIField.Support
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim turns As Integer = BattleCalculation.FieldEffectTurns(BattleScreen, own, Me.Name.ToLower())
If BattleScreen.FieldEffects.ElectricTerrain <= 0 Then
BattleScreen.FieldEffects.ElectricTerrain = turns
BattleScreen.FieldEffects.GrassyTerrain = 0
BattleScreen.FieldEffects.PsychicTerrain = 0
BattleScreen.FieldEffects.MistyTerrain = 0
BattleScreen.BattleQuery.Add(New TextQueryObject("An electric current runs across the battlefield!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
End Class
End Namespace

View File

@ -0,0 +1,75 @@
Namespace BattleSystem.Moves.Fairy
Public Class MistyTerrain
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Fairy)
Me.ID = 581
Me.OriginalPP = 10
Me.CurrentPP = 10
Me.MaxPP = 10
Me.Power = 0
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Beauty
Me.Name = "Misty Terrain"
Me.Description = "This protects Pokémon on the ground from status conditions and halves damage from Dragon-type moves for five turns."
Me.CriticalChance = 0
Me.IsHMMove = False
Me.Target = Targets.All
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = False
Me.MagicCoatAffected = False
Me.SnatchAffected = False
Me.MirrorMoveAffected = False
Me.KingsrockAffected = False
Me.CounterAffected = False
Me.DisabledWhileGravity = False
Me.UseEffectiveness = False
Me.ImmunityAffected = False
Me.HasSecondaryEffect = False
Me.RemovesFrozen = False
Me.IsHealingMove = False
Me.IsRecoilMove = False
Me.IsPunchingMove = False
Me.IsDamagingMove = False
Me.IsProtectMove = False
Me.IsSoundMove = False
Me.IsAffectedBySubstitute = False
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = False
'#End
Me.AIField1 = AIField.Support
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim turns As Integer = BattleCalculation.FieldEffectTurns(BattleScreen, own, Me.Name.ToLower())
If BattleScreen.FieldEffects.MistyTerrain <= 0 Then
BattleScreen.FieldEffects.ElectricTerrain = 0
BattleScreen.FieldEffects.GrassyTerrain = 0
BattleScreen.FieldEffects.PsychicTerrain = 0
BattleScreen.FieldEffects.MistyTerrain = turns
BattleScreen.BattleQuery.Add(New TextQueryObject("Mist swirls around the battlefield!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
End Class
End Namespace

View File

@ -0,0 +1,75 @@
Namespace BattleSystem.Moves.Grass
Public Class GrassyTerrain
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Grass)
Me.ID = 580
Me.OriginalPP = 10
Me.CurrentPP = 10
Me.MaxPP = 10
Me.Power = 0
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Beauty
Me.Name = "Grassy Terrain"
Me.Description = "The user turns the ground to grass for five turns. This restores the HP of Pokémon on the ground a little every turn and powers up Grass type-moves."
Me.CriticalChance = 0
Me.IsHMMove = False
Me.Target = Targets.All
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = False
Me.MagicCoatAffected = False
Me.SnatchAffected = False
Me.MirrorMoveAffected = False
Me.KingsrockAffected = False
Me.CounterAffected = False
Me.DisabledWhileGravity = False
Me.UseEffectiveness = False
Me.ImmunityAffected = False
Me.HasSecondaryEffect = False
Me.RemovesFrozen = False
Me.IsHealingMove = False
Me.IsRecoilMove = False
Me.IsPunchingMove = False
Me.IsDamagingMove = False
Me.IsProtectMove = False
Me.IsSoundMove = False
Me.IsAffectedBySubstitute = False
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = False
'#End
Me.AIField1 = AIField.Support
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim turns As Integer = BattleCalculation.FieldEffectTurns(BattleScreen, own, Me.Name.ToLower())
If BattleScreen.FieldEffects.GrassyTerrain <= 0 Then
BattleScreen.FieldEffects.ElectricTerrain = 0
BattleScreen.FieldEffects.GrassyTerrain = turns
BattleScreen.FieldEffects.PsychicTerrain = 0
BattleScreen.FieldEffects.MistyTerrain = 0
BattleScreen.BattleQuery.Add(New TextQueryObject("Grass grew to cover the battlefield!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
End Class
End Namespace

View File

@ -52,7 +52,16 @@
'#End '#End
End Sub End Sub
Public Shared Function GetMoveID() As Integer Public Shared Function GetMoveID(own As Boolean, Battlescreen As BattleScreen) As Integer
If Battlescreen.FieldEffects.ElectricTerrain > 0 Then
Return 85
ElseIf Battlescreen.FieldEffects.GrassyTerrain > 0 Then
Return 412
ElseIf Battlescreen.FieldEffects.MistyTerrain > 0 Then
Return 585
ElseIf Battlescreen.FieldEffects.PsychicTerrain > 0 Then
Return 94
Else
Select Case Screen.Level.Terrain.TerrainType Select Case Screen.Level.Terrain.TerrainType
Case Terrain.TerrainTypes.Plain Case Terrain.TerrainTypes.Plain
Return 161 Return 161
@ -81,8 +90,8 @@
Case Terrain.TerrainTypes.Underwater Case Terrain.TerrainTypes.Underwater
Return 291 Return 291
End Select End Select
Return 89 Return 89
End If
End Function End Function
End Class End Class

View File

@ -0,0 +1,75 @@
Namespace BattleSystem.Moves.Psychic
Public Class PsychicTerrain
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Psychic)
Me.ID = 678
Me.OriginalPP = 10
Me.CurrentPP = 10
Me.MaxPP = 10
Me.Power = 0
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Smart
Me.Name = "Psychic Terrain"
Me.Description = "This protects Pokémon on the ground from priority moves and powers up Psychic-type moves for five turns."
Me.CriticalChance = 0
Me.IsHMMove = False
Me.Target = Targets.All
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = False
Me.MagicCoatAffected = False
Me.SnatchAffected = False
Me.MirrorMoveAffected = False
Me.KingsrockAffected = False
Me.CounterAffected = False
Me.DisabledWhileGravity = False
Me.UseEffectiveness = False
Me.ImmunityAffected = False
Me.HasSecondaryEffect = False
Me.RemovesFrozen = False
Me.IsHealingMove = False
Me.IsRecoilMove = False
Me.IsPunchingMove = False
Me.IsDamagingMove = False
Me.IsProtectMove = False
Me.IsSoundMove = False
Me.IsAffectedBySubstitute = False
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = False
'#End
Me.AIField1 = AIField.Support
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim turns As Integer = BattleCalculation.FieldEffectTurns(BattleScreen, own, Me.Name.ToLower())
If BattleScreen.FieldEffects.PsychicTerrain <= 0 Then
BattleScreen.FieldEffects.ElectricTerrain = 0
BattleScreen.FieldEffects.GrassyTerrain = 0
BattleScreen.FieldEffects.PsychicTerrain = turns
BattleScreen.FieldEffects.MistyTerrain = 0
BattleScreen.BattleQuery.Add(New TextQueryObject("The battlefield got weird!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
End Class
End Namespace