Namespace BattleSystem.Moves.Fighting Public Class FinalGambit Inherits Attack Public Sub New() '#Definitions Me.Type = New Element(Element.Types.Fighting) Me.ID = 515 Me.OriginalPP = 5 Me.CurrentPP = 5 Me.MaxPP = 5 Me.Power = 0 Me.Accuracy = 100 Me.Category = Categories.Special Me.ContestCategory = ContestCategories.Tough Me.Name = Localization.GetString("move_name_" & Me.ID,"Final Gambit") Me.Description = "The user risks everything to attack its target. The user faints but does damage equal to its HP." Me.CriticalChance = 0 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 = False Me.CounterAffected = False Me.DisabledWhileGravity = False Me.UseEffectiveness = False Me.ImmunityAffected = True Me.RemovesOwnFrozen = False Me.HasSecondaryEffect = False Me.IsHealingMove = False Me.IsRecoilMove = False Me.IsDamagingMove = False Me.IsProtectMove = False Me.IsAffectedBySubstitute = True Me.IsOneHitKOMove = False Me.IsWonderGuardAffected = True '#End Me.AIField1 = AIField.Damage Me.AIField2 = AIField.Selfdestruct End Sub Dim dmg As Integer Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen) Dim p As Pokemon = BattleScreen.OwnPokemon If Own = False Then p = BattleScreen.OppPokemon End If dmg = p.HP BattleScreen.Battle.ReduceHP(dmg, Own, Own, BattleScreen, p.GetDisplayName() & " risked everything!", "move:finalgambit") End Sub 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 BattleScreen.Battle.ReduceHP(dmg, Not own, own, BattleScreen, "", "move:finalgambit") End Sub End Class End Namespace