2018-02-21 16:34:06 +01:00
Namespace BattleSystem . Moves . Normal
Public Class Covet
Inherits Attack
Public Sub New ( )
'#Definitions
Me . Type = New Element ( Element . Types . Normal )
Me . ID = 343
Me . OriginalPP = 25
Me . CurrentPP = 25
Me . MaxPP = 25
Me . Power = 60
Me . Accuracy = 100
Me . Category = Categories . Physical
Me . ContestCategory = ContestCategories . Cute
2022-12-04 20:11:29 +01:00
Me . Name = Localization . GetString ( " move_name_ " & Me . ID , " Covet " )
2018-02-21 16:34:06 +01:00
Me . Description = " The user endearingly approaches the target, then steals the target's held item. "
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 = False
Me . CounterAffected = True
Me . DisabledWhileGravity = False
Me . UseEffectiveness = True
Me . ImmunityAffected = True
Me . HasSecondaryEffect = False
2023-04-01 08:58:01 +02:00
Me . RemovesOwnFrozen = False
2018-02-21 16:34:06 +01:00
Me . IsHealingMove = False
Me . IsRecoilMove = False
2022-12-20 17:40:04 +01:00
2018-02-21 16:34:06 +01:00
Me . IsDamagingMove = True
Me . IsProtectMove = False
2022-12-20 17:40:04 +01:00
2018-02-21 16:34:06 +01:00
Me . IsAffectedBySubstitute = True
Me . IsOneHitKOMove = False
Me . IsWonderGuardAffected = True
'#End
Me . AIField1 = AIField . Damage
Me . AIField2 = AIField . Nothing
End Sub
Public Overrides Sub MoveHits ( own As Boolean , BattleScreen As BattleScreen )
Dim p As Pokemon = BattleScreen . OwnPokemon
Dim op As Pokemon = BattleScreen . OppPokemon
If own = False Then
p = BattleScreen . OppPokemon
op = BattleScreen . OwnPokemon
End If
'Conditions
If op . Item Is Nothing Then
Exit Sub
End If
If op . Item . IsMegaStone = True Then
Exit Sub
End If
2023-01-02 15:27:59 +01:00
If op . Ability . Name . ToLower ( ) = " multitype " AndAlso op . Item . OriginalName . ToLower ( ) . EndsWith ( " plate " ) Then
2018-02-21 16:34:06 +01:00
Exit Sub
End If
2023-01-02 15:27:59 +01:00
If op . Ability . Name . ToLower ( ) = " rks system " AndAlso op . Item . OriginalName . ToLower ( ) . EndsWith ( " memory " ) Then
2018-10-26 10:03:33 +02:00
Exit Sub
End If
2023-01-02 15:27:59 +01:00
If op . Item . OriginalName . ToLower ( ) = " griseous orb " And op . Number = 487 Then
2018-02-21 16:34:06 +01:00
Exit Sub
End If
2023-01-02 15:27:59 +01:00
If op . Item . OriginalName . ToLower ( ) . EndsWith ( " drive " ) = True AndAlso op . Number = 649 Then
2018-02-21 16:34:06 +01:00
Exit Sub
End If
2023-07-23 20:53:21 +02:00
If op . Item . IsMail = True Then
2018-10-26 10:03:33 +02:00
Exit Sub
End If
2018-02-21 16:34:06 +01:00
If p . Item Is Nothing Then
2023-06-21 19:21:34 +02:00
Dim ItemID As String
2024-03-07 10:44:08 +01:00
If op . Item . IsGameModeItem = True Then
ItemID = op . Item . gmID
2023-06-21 19:21:34 +02:00
Else
2024-03-07 10:44:08 +01:00
ItemID = op . Item . ID . ToString
2023-05-29 15:33:57 +02:00
End If
2018-02-21 16:34:06 +01:00
2023-05-29 15:33:57 +02:00
op . OriginalItem = Item . GetItemByID ( ItemID )
2018-02-21 16:34:06 +01:00
op . OriginalItem . AdditionalData = op . Item . AdditionalData
2023-08-09 16:20:16 +02:00
If BattleScreen . Battle . RemoveHeldItem ( Not own , own , BattleScreen , " Covet stole the item " & op . Item . OneLineName ( ) & " from " & op . GetDisplayName ( ) & " ! " , " move:covet " ) Then
2018-02-21 16:34:06 +01:00
If own = False Then
BattleScreen . FieldEffects . StolenItemIDs . Add ( ItemID )
End If
p . Item = Item . GetItemByID ( ItemID )
End If
End If
End Sub
End Class
2016-09-07 18:50:38 +02:00
End Namespace