P3D-Legacy/P3D/Pokemon/Attacks/Normal/BellyDrum.vb

92 lines
3.1 KiB
VB.net

Namespace BattleSystem.Moves.Normal
Public Class BellyDrum
Inherits Attack
Public Sub New()
'#Definitions
Me.Type = New Element(Element.Types.Normal)
Me.ID = 187
Me.OriginalPP = 10
Me.CurrentPP = 10
Me.MaxPP = 10
Me.Power = 0
Me.Accuracy = 0
Me.Category = Categories.Status
Me.ContestCategory = ContestCategories.Cute
Me.Name = "Belly Drum"
Me.Description = "The user maximizes its Attack stat in exchange for HP equal to half its max HP."
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 = False
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = False
'#End
Me.AIField1 = AIField.RaiseAttack
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Function MoveFailBeforeAttack(Own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
If Own = False Then
p = BattleScreen.OppPokemon
End If
If p.StatAttack = 6 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
Return True
Else
Return False
End If
End Function
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim p As Pokemon = BattleScreen.OwnPokemon
If own = False Then
p = BattleScreen.OppPokemon
End If
Dim reduceHP As Integer = CInt(Math.Floor(p.MaxHP / 2))
If p.HP > reduceHP Then
BattleScreen.Battle.ReduceHP(reduceHP, own, own, BattleScreen, "", "move:bellydrum")
If BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Attack", 6, "", "move:bellydrum") = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
End Class
End Namespace