P3D-Legacy/P3D/Pokemon/Attacks/Ground/BoneRush.vb

83 lines
2.5 KiB
VB.net
Raw Normal View History

2016-09-07 18:50:38 +02:00
Namespace BattleSystem.Moves.Ground
Public Class BoneRush
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Ground)
Me.ID = 198
Me.OriginalPP = 10
Me.CurrentPP = 10
Me.MaxPP = 10
Me.Power = 25
Me.Accuracy = 90
Me.Category = Categories.Physical
Me.ContestCategory = ContestCategories.Tough
2022-12-04 20:11:29 +01:00
Me.Name = Localization.GetString("move_name_" & Me.ID,"Bone Rush")
2016-09-07 18:50:38 +02:00
Me.Description = "The user strikes the target with a hard bone two to five times in a row."
Me.CriticalChance = 1
Me.IsHMMove = False
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1
'#End
'#SpecialDefinitions
Me.MakesContact = False
Me.ProtectAffected = True
Me.MagicCoatAffected = False
Me.SnatchAffected = False
Me.MirrorMoveAffected = True
Me.KingsrockAffected = True
Me.CounterAffected = True
Me.DisabledWhileGravity = False
Me.UseEffectiveness = True
Me.ImmunityAffected = True
Me.HasSecondaryEffect = False
Me.RemovesOwnFrozen = False
2016-09-07 18:50:38 +02:00
Me.IsHealingMove = False
Me.IsRecoilMove = False
2016-09-07 18:50:38 +02:00
Me.IsDamagingMove = True
Me.IsProtectMove = False
2016-09-07 18:50:38 +02:00
Me.IsAffectedBySubstitute = True
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = True
'#End
End Sub
Public Overrides Function GetTimesToAttack(own As Boolean, BattleScreen As BattleScreen) As Integer
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
If own = False Then
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
End If
If p.Ability.Name.ToLower() = "skill link" Then
Return 5
End If
Dim r As Integer = Core.Random.Next(0, 100)
If r < 37 Then
Return 2
ElseIf r >= 37 And r < 75 Then
Return 3
ElseIf r >= 75 And r < 88 Then
Return 4
ElseIf r >= 88 Then
Return 5
End If
Return 2
End Function
End Class
End Namespace