138 lines
4.7 KiB
VB.net
138 lines
4.7 KiB
VB.net
Namespace BattleSystem.Moves.Dragon
|
|
|
|
Public Class Outrage
|
|
|
|
Inherits Attack
|
|
|
|
Public Sub New()
|
|
'#Definitions
|
|
Me.Type = New Element(Element.Types.Dragon)
|
|
Me.ID = 200
|
|
Me.OriginalPP = 10
|
|
Me.CurrentPP = 10
|
|
Me.MaxPP = 10
|
|
Me.Power = 120
|
|
Me.Accuracy = 100
|
|
Me.Category = Categories.Physical
|
|
Me.ContestCategory = ContestCategories.Cool
|
|
Me.Name = Localization.GetString("move_name_" & Me.ID,"Outrage")
|
|
Me.Description = "The user rampages and attacks for two to three turns. It then becomes confused, however."
|
|
Me.CriticalChance = 1
|
|
Me.IsHMMove = False
|
|
Me.Target = Targets.OneTarget
|
|
Me.Priority = 0
|
|
Me.TimesToAttack = 1
|
|
'#End
|
|
|
|
'#SpecialDefinitions
|
|
Me.MakesContact = True
|
|
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
|
|
|
|
Me.IsHealingMove = False
|
|
Me.IsRecoilMove = False
|
|
|
|
Me.IsDamagingMove = True
|
|
Me.IsProtectMove = False
|
|
|
|
|
|
Me.IsAffectedBySubstitute = True
|
|
Me.IsOneHitKOMove = False
|
|
Me.IsWonderGuardAffected = True
|
|
'#End
|
|
|
|
Me.AIField1 = AIField.Damage
|
|
Me.AIField2 = AIField.MultiTurn
|
|
Me.AIField3 = AIField.ConfuseOwn
|
|
End Sub
|
|
|
|
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
|
Dim currentTurns As Integer = BattleScreen.FieldEffects.OwnOutrage
|
|
If own = False Then
|
|
currentTurns = BattleScreen.FieldEffects.OppOutrage
|
|
End If
|
|
|
|
If currentTurns = 0 Then
|
|
Dim turns As Integer = Core.Random.Next(2, 4)
|
|
If own = True Then
|
|
BattleScreen.FieldEffects.OwnOutrage = turns
|
|
Else
|
|
BattleScreen.FieldEffects.OppOutrage = turns
|
|
End If
|
|
End If
|
|
End Sub
|
|
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
|
|
Dim outrage As Integer = BattleScreen.FieldEffects.OwnOutrage
|
|
If own = False Then
|
|
outrage = BattleScreen.FieldEffects.OppOutrage
|
|
End If
|
|
|
|
If outrage > 0 Then
|
|
Return False
|
|
Else
|
|
Return True
|
|
End If
|
|
End Function
|
|
|
|
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
|
Dim outrage As Integer = 0
|
|
Dim p As Pokemon
|
|
If own = True Then
|
|
outrage = BattleScreen.FieldEffects.OwnOutrage
|
|
p = BattleScreen.OwnPokemon
|
|
Else
|
|
outrage = BattleScreen.FieldEffects.OppOutrage
|
|
p = BattleScreen.OppPokemon
|
|
End If
|
|
|
|
If outrage = 1 Then
|
|
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s Outrage stopped.", "move:outrage")
|
|
End If
|
|
|
|
If own = True Then
|
|
BattleScreen.FieldEffects.OwnOutrage = 0
|
|
Else
|
|
BattleScreen.FieldEffects.OppOutrage = 0
|
|
End If
|
|
End Sub
|
|
|
|
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
|
|
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
|
|
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
|
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
|
|
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
|
|
Public Overrides Sub HurtItselfInConfusion(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
|
|
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
|
Interruption(own, BattleScreen)
|
|
End Sub
|
|
End Class
|
|
|
|
End Namespace |