P3D-Legacy/P3D/Pokemon/Attacks/Bug/SpiderWeb.vb

85 lines
2.7 KiB
VB.net
Raw Normal View History

2016-09-07 18:50:38 +02:00
Namespace BattleSystem.Moves.Bug
Public Class SpiderWeb
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Bug)
Me.ID = 169
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 = "Spider Web"
Me.Description = "The user ensnares the target with thin, gooey silk so it can't flee from battle."
Me.CriticalChance = 0
Me.IsHMMove = False
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = False
2016-09-07 18:50:38 +02:00
Me.MagicCoatAffected = True
Me.SnatchAffected = False
Me.MirrorMoveAffected = True
Me.KingsrockAffected = False
Me.CounterAffected = False
Me.DisabledWhileGravity = False
Me.UseEffectiveness = False
Me.ImmunityAffected = True
2016-09-14 23:14:15 +02:00
Me.HasSecondaryEffect = False
2016-09-07 18:50:38 +02:00
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
Me.IsTrappingMove = True
'#End
Me.AIField1 = AIField.Support
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim trapped As Integer = BattleScreen.FieldEffects.OppTrappedCounter
If own = False Then
trapped = BattleScreen.FieldEffects.OwnTrappedCounter
End If
Dim op As Pokemon = BattleScreen.OppPokemon
If own = False Then
op = BattleScreen.OwnPokemon
End If
If trapped = 0 Then
If own = True Then
BattleScreen.FieldEffects.OppTrappedCounter = 1
Else
BattleScreen.FieldEffects.OwnTrappedCounter = 1
End If
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " can no longer escape!"))
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
End Class
2016-09-14 23:14:15 +02:00
End Namespace