P3D-Legacy/P3D/Pokemon/Attacks/Grass/Ingrain.vb

79 lines
2.7 KiB
VB.net

Namespace BattleSystem.Moves.Grass
Public Class Ingrain
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Grass)
Me.ID = 275
Me.OriginalPP = 20
Me.CurrentPP = 20
Me.MaxPP = 20
Me.Power = 0
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Smart
Me.Name = "Ingrain"
Me.Description = "The user lays roots that restore its HP on every turn. Because it is rooted, it can't switch out."
Me.CriticalChance = 0
Me.IsHMMove = False
Me.Target = Targets.Self
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = False
Me.MagicCoatAffected = False
Me.SnatchAffected = True
Me.MirrorMoveAffected = True
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 = True
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)
If own = True Then
If BattleScreen.FieldEffects.OwnIngrain = 0 Then
BattleScreen.FieldEffects.OwnIngrain = 1
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & " planted its roots!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject("Ingrain failed!"))
End If
Else
If BattleScreen.FieldEffects.OppIngrain = 0 Then
BattleScreen.FieldEffects.OppIngrain = 1
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OppPokemon.GetDisplayName() & " planted its roots!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject("Ingrain failed!"))
End If
End If
End Sub
End Class
End Namespace