2016-09-07 18:50:38 +02:00
|
|
|
|
Namespace BattleSystem.Moves.Grass
|
|
|
|
|
|
|
|
|
|
Public Class PetalDance
|
|
|
|
|
|
|
|
|
|
Inherits Attack
|
|
|
|
|
|
|
|
|
|
Public Sub New()
|
|
|
|
|
'#Definitions
|
|
|
|
|
Me.Type = New Element(Element.Types.Grass)
|
|
|
|
|
Me.ID = 80
|
|
|
|
|
Me.OriginalPP = 10
|
|
|
|
|
Me.CurrentPP = 10
|
|
|
|
|
Me.MaxPP = 10
|
|
|
|
|
Me.Power = 120
|
|
|
|
|
Me.Accuracy = 100
|
|
|
|
|
Me.Category = Categories.Special
|
|
|
|
|
Me.ContestCategory = ContestCategories.Beauty
|
|
|
|
|
Me.Name = "Petal Dance"
|
|
|
|
|
Me.Description = "The user attacks the target by scattering petals for two to three turns. The user then becomes confused."
|
|
|
|
|
Me.CriticalChance = 1
|
|
|
|
|
Me.IsHMMove = False
|
|
|
|
|
Me.Target = Targets.OneAdjacentTarget
|
|
|
|
|
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 = False
|
|
|
|
|
|
|
|
|
|
Me.DisabledWhileGravity = False
|
|
|
|
|
Me.UseEffectiveness = True
|
|
|
|
|
Me.ImmunityAffected = True
|
|
|
|
|
Me.HasSecondaryEffect = False
|
|
|
|
|
Me.RemovesFrozen = False
|
|
|
|
|
|
|
|
|
|
Me.IsHealingMove = False
|
|
|
|
|
Me.IsRecoilMove = False
|
|
|
|
|
Me.IsPunchingMove = False
|
|
|
|
|
Me.IsDamagingMove = True
|
|
|
|
|
Me.IsProtectMove = False
|
|
|
|
|
Me.IsSoundMove = 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
|
|
|
|
|
|
2018-03-26 01:22:55 +02:00
|
|
|
|
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
Dim currentTurns As Integer = BattleScreen.FieldEffects.OwnPetalDance
|
|
|
|
|
If own = False Then
|
|
|
|
|
currentTurns = BattleScreen.FieldEffects.OppPetalDance
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If currentTurns = 0 Then
|
|
|
|
|
Dim turns As Integer = Core.Random.Next(2, 4)
|
|
|
|
|
If own = True Then
|
|
|
|
|
BattleScreen.FieldEffects.OwnPetalDance = turns
|
|
|
|
|
Else
|
|
|
|
|
BattleScreen.FieldEffects.OppPetalDance = turns
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
2016-12-22 01:01:13 +01:00
|
|
|
|
Dim petalDance As Integer = 0
|
|
|
|
|
Dim p As Pokemon
|
|
|
|
|
If own = True Then
|
|
|
|
|
petalDance = BattleScreen.FieldEffects.OwnPetalDance
|
|
|
|
|
p = BattleScreen.OwnPokemon
|
|
|
|
|
Else
|
|
|
|
|
petalDance = BattleScreen.FieldEffects.OppPetalDance
|
|
|
|
|
p = BattleScreen.OppPokemon
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If petalDance = 1 Then
|
|
|
|
|
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s PetalDance stopped.", "move:petaldance")
|
|
|
|
|
End If
|
|
|
|
|
|
2016-09-07 18:50:38 +02:00
|
|
|
|
If own = True Then
|
|
|
|
|
BattleScreen.FieldEffects.OwnPetalDance = 0
|
|
|
|
|
Else
|
|
|
|
|
BattleScreen.FieldEffects.OppPetalDance = 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
|
|
|
|
|
|
2016-12-22 01:01:13 +01:00
|
|
|
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
|
|
|
|
Interruption(own, BattleScreen)
|
|
|
|
|
End Sub
|
2017-01-13 00:15:53 +01:00
|
|
|
|
|
|
|
|
|
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
|
|
|
|
|
Interruption(own, BattleScreen)
|
|
|
|
|
End Sub
|
2017-01-17 06:20:32 +01:00
|
|
|
|
|
|
|
|
|
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
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End Class
|
|
|
|
|
|
|
|
|
|
End Namespace
|