Fixed item transferring/removing moves and abilities

This commit is contained in:
CaptainSegis 2016-12-19 14:51:17 -05:00
parent 157ce04583
commit 073e82aa81
11 changed files with 326 additions and 249 deletions

View File

@ -1879,6 +1879,7 @@
End If End If
'ABILITY SHIT GOES HERE: 'ABILITY SHIT GOES HERE:
If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) Then
Select Case op.Ability.Name.ToLower() Select Case op.Ability.Name.ToLower()
Case "color change" Case "color change"
If op.HP > 0 Then If op.HP > 0 Then
@ -1974,8 +1975,47 @@
If moveUsed.MakesContact = True Then If moveUsed.MakesContact = True Then
LowerStat(own, Not own, BattleScreen, "Speed", 1, "Gooey slowed down " & p.GetDisplayName() & "!", "gooey") LowerStat(own, Not own, BattleScreen, "Speed", 1, "Gooey slowed down " & p.GetDisplayName() & "!", "gooey")
End If End If
End Select Case "weak armor"
If moveUsed.Category = Attack.Categories.Physical Then
RaiseStat(Not own, Not own, BattleScreen, "Speed", 1, "Weak Armor causes the Speed to increase!", "weakarmor")
LowerStat(Not own, Not own, BattleScreen, "Defense", 1, "Weak Armor causes the Defense to decrease!", "weakarmor")
End If
Case "pickpocket", "magician"
If moveUsed.MakesContact = True Then
If Not p.Item Is Nothing And op.Item Is Nothing And substitute = 0 Then
Dim canSteal As Boolean = True
If p.Item.IsMegaStone = True Then
canSteal = False
End If
If p.Ability.Name.ToLower() = "multitype" AndAlso p.Item.Name.ToLower().EndsWith(" plate") Then
canSteal = False
End If
If p.Item.Name.ToLower() = "griseous orb" And p.Number = 487 Then
canSteal = False
End If
If p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
canSteal = False
End If
If canSteal Then
Dim ItemID As Integer = p.Item.ID
p.OriginalItem = Item.GetItemByID(p.Item.ID)
p.OriginalItem.AdditionalData = p.Item.AdditionalData
If BattleScreen.Battle.RemoveHeldItem(own, Not own, BattleScreen, p.GetDisplayName() & " stole an item from " & op.GetDisplayName() & "!", op.Ability.Name.ToLower()) Then
If own = False Then
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
End If
op.Item = Item.GetItemByID(ItemID)
End If
End If
End If
End If
End Select
End If
If BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) Then
Select Case p.Ability.Name.ToLower() Select Case p.Ability.Name.ToLower()
Case "poison touch" Case "poison touch"
If moveUsed.MakesContact = True And op.Status = Pokemon.StatusProblems.None Then If moveUsed.MakesContact = True And op.Status = Pokemon.StatusProblems.None Then
@ -1983,24 +2023,12 @@
InflictPoison(Not own, own, BattleScreen, False, p.GetDisplayName() & "'s Poison Touch affects " & op.GetDisplayName() & "!", "poisontouch") InflictPoison(Not own, own, BattleScreen, False, p.GetDisplayName() & "'s Poison Touch affects " & op.GetDisplayName() & "!", "poisontouch")
End If End If
End If End If
Case "pickpocket", "magician"
If moveUsed.MakesContact = True Then
If Not op.Item Is Nothing And p.Item Is Nothing And substitute = 0 Then
If RemoveHeldItem(Not own, own, BattleScreen, p.GetDisplayName() & " stole an item from " & op.GetDisplayName() & "!", "pickpocket") Then
p.Item = BattleScreen.FieldEffects.OppLostItem
End If
End If
End If
Case "moxie" Case "moxie"
If KOED = True Then If KOED = True Then
RaiseStat(own, own, BattleScreen, "Attack", 1, p.GetDisplayName() & "'s Moxie got in effect!", "moxie") RaiseStat(own, own, BattleScreen, "Attack", 1, p.GetDisplayName() & "'s Moxie got in effect!", "moxie")
End If End If
Case "weak armor"
If moveUsed.Category = Attack.Categories.Physical Then
RaiseStat(own, own, BattleScreen, "Speed", 1, "Weak Armor causes the Speed to increase!", "weakarmor")
LowerStat(own, own, BattleScreen, "Defense", 1, "Weak Armor causes the Defense to decrease!", "weakarmor")
End If
End Select End Select
End If
If substitute = 0 And op.HP > 0 Then If substitute = 0 And op.HP > 0 Then
If Not op.Item Is Nothing Then If Not op.Item Is Nothing Then
@ -3753,7 +3781,7 @@
Return False Return False
End If End If
If p.Ability.Name.ToLower() = "sticky hold" And cause.StartsWith("berry:") = False Then If BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) And p.Ability.Name.ToLower() = "sticky hold" And cause.StartsWith("berry:") = False Then
If TestFor = False Then If TestFor = False Then
Me.ChangeCameraAngel(1, own, BattleScreen) Me.ChangeCameraAngel(1, own, BattleScreen)
BattleScreen.BattleQuery.Add(New TextQueryObject("Sticky Hold prevented the item loss.")) BattleScreen.BattleQuery.Add(New TextQueryObject("Sticky Hold prevented the item loss."))
@ -3765,10 +3793,12 @@
Dim ItemID As Integer = p.Item.ID Dim ItemID As Integer = p.Item.ID
Dim lostItem As Item = Item.GetItemByID(ItemID) Dim lostItem As Item = Item.GetItemByID(ItemID)
If from = own Then
If own = True Then If own = True Then
BattleScreen.FieldEffects.OwnLostItem = lostItem BattleScreen.FieldEffects.OwnConsumedItem = lostItem
Else Else
BattleScreen.FieldEffects.OppLostItem = lostItem BattleScreen.FieldEffects.OppConsumedItem = lostItem
End If
End If End If
p.Item = Nothing p.Item = Nothing

View File

@ -84,7 +84,7 @@
Public OwnInfestation As Integer = 0 Public OwnInfestation As Integer = 0
Public OwnUsedMoves As New List(Of Integer) Public OwnUsedMoves As New List(Of Integer)
Public OwnMagicCoat As Integer = 0 Public OwnMagicCoat As Integer = 0
Public OwnLostItem As Item = Nothing Public OwnConsumedItem As Item = Nothing
Public OwnPursuit As Boolean = False Public OwnPursuit As Boolean = False
Public OwnMegaEvolved As Boolean = False Public OwnMegaEvolved As Boolean = False
Public OwnRoostUsed As Boolean = False 'If roost got used, this is true and will get set false and revert types at the end of a turn. Public OwnRoostUsed As Boolean = False 'If roost got used, this is true and will get set false and revert types at the end of a turn.
@ -194,7 +194,7 @@
Public OppPokemonDamagedThisTurn As Boolean = False Public OppPokemonDamagedThisTurn As Boolean = False
Public OppPokemonDamagedLastTurn As Boolean = False Public OppPokemonDamagedLastTurn As Boolean = False
Public OppMagicCoat As Integer = 0 Public OppMagicCoat As Integer = 0
Public OppLostItem As Item = Nothing Public OppConsumedItem As Item = Nothing
Public OppPursuit As Boolean = False Public OppPursuit As Boolean = False
Public OppMegaEvolved As Boolean = False Public OppMegaEvolved As Boolean = False
Public OppRoostUsed As Boolean = False Public OppRoostUsed As Boolean = False

View File

@ -53,11 +53,31 @@
End Sub End Sub
Public Overrides Function GetBasePower(own As Boolean, BattleScreen As BattleScreen) As Integer Public Overrides Function GetBasePower(own As Boolean, BattleScreen As BattleScreen) As Integer
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "", "", True) = True Then Dim p As Pokemon = BattleScreen.OwnPokemon
Return CInt(Me.Power * 1.5F) Dim op As Pokemon = BattleScreen.OppPokemon
If own = False Then
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
End If End If
Return Me.Power 'Conditions
If op.Item Is Nothing Then
Return Power
End If
If op.Item.IsMegaStone = True Then
Return Power
End If
If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
Return Power
End If
If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
Return Power
End If
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
Return Power
End If
Return CInt(Me.Power * 1.5F)
End Function End Function
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen) Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
@ -67,15 +87,28 @@
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If
'Conditions
If op.Item Is Nothing Then
Exit Sub
End If
If op.Item.IsMegaStone = True Then If op.Item.IsMegaStone = True Then
Exit Sub Exit Sub
End If End If
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "", "", True) = True Then If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
Exit Sub
End If
If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
Exit Sub
End If
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
Exit Sub
End If
op.OriginalItem = Item.GetItemByID(op.Item.ID) op.OriginalItem = Item.GetItemByID(op.Item.ID)
op.OriginalItem.AdditionalData = op.Item.AdditionalData op.OriginalItem.AdditionalData = op.Item.AdditionalData
BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, p.GetDisplayName() & " knocked off the " & op.GetDisplayName() & "'s " & op.OriginalItem.Name & "!", "move:knockoff") BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, p.GetDisplayName() & " knocked off the " & op.GetDisplayName() & "'s " & op.OriginalItem.Name & "!", "move:knockoff")
End If
End Sub End Sub
End Class End Class

View File

@ -62,47 +62,51 @@ Namespace BattleSystem.Moves.Dark
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If
Dim CanSwitchItems As Boolean = True
If p.Item Is Nothing And op.Item Is Nothing Then If p.Item Is Nothing And op.Item Is Nothing Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If p.Ability.Name.ToLower() = "sticky hold" Or op.Ability.Name.ToLower() = "sticky hold" Then If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) AndAlso op.Ability.Name.ToLower() = "sticky hold" Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If CheckMultitypePlate(p, op) = False Then If CheckMultitypePlate(p, op) = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
If p.Item.IsMegaStone OrElse op.Item.IsMegaStone Then End If
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) If (p.Item IsNot Nothing AndAlso p.Item.IsMegaStone) OrElse (op.Item IsNot Nothing AndAlso op.Item.IsMegaStone) Then
Else CanSwitchItems = False
Dim i1 As Item = p.Item End If
Dim i2 As Item = op.Item
If CanSwitchItems Then
Dim i1 As Item = Nothing
Dim i2 As Item = Nothing
If p.Item IsNot Nothing Then
i1 = p.Item
End If
If op.Item IsNot Nothing Then
i2 = op.Item
End If
p.Item = i2 p.Item = i2
op.Item = i1 op.Item = i1
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & ".")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & "."))
End If Else
End If BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End If
End If
End If
End If
End If End If
End Sub End Sub
Private Function CheckMultitypePlate(ByVal p As Pokemon, ByVal op As Pokemon) As Boolean Private Function CheckMultitypePlate(ByVal p As Pokemon, ByVal op As Pokemon) As Boolean
If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() = "multitype" Then If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() <> "multitype" Then
Return True Return True
Else Else
If Not p.Item Is Nothing Then If Not p.Item Is Nothing Then

View File

@ -59,33 +59,37 @@
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If
'Conditions
If op.Item Is Nothing Then
Exit Sub
End If
If op.Item.IsMegaStone = True Then If op.Item.IsMegaStone = True Then
Exit Sub Exit Sub
End If End If
Dim canSteal As Boolean = True If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
If op.Ability.Name.ToLower() = "multitype" Then Exit Sub
canSteal = False
End If End If
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
canSteal = False Exit Sub
End If
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
Exit Sub
End If End If
If canSteal = True Then If p.Item Is Nothing Then
If p.Item Is Nothing And Not op.Item Is Nothing Then
Dim ItemID As Integer = op.Item.ID Dim ItemID As Integer = op.Item.ID
op.OriginalItem = Item.GetItemByID(op.Item.ID) op.OriginalItem = Item.GetItemByID(op.Item.ID)
op.OriginalItem.AdditionalData = op.Item.AdditionalData op.OriginalItem.AdditionalData = op.Item.AdditionalData
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Thief stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:thief") = True Then If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Thief stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:thief") Then
If own = False Then If own = False Then
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID) BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
End If End If
p.Item = Item.GetItemByID(ItemID) p.Item = Item.GetItemByID(ItemID)
End If End If
End If End If
End If
End Sub End Sub
End Class End Class

View File

@ -62,35 +62,38 @@ Namespace BattleSystem.Moves.Normal
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If
'Conditions
If op.Item Is Nothing Then
Exit Sub
End If
If op.Item.IsMegaStone = True Then If op.Item.IsMegaStone = True Then
Exit Sub Exit Sub
End If End If
Dim canSteal As Boolean = True If op.Ability.Name.ToLower() = "multitype" AndAlso op.Item.Name.ToLower().EndsWith(" plate") Then
If op.Ability.Name.ToLower() = "multitype" Then Exit Sub
canSteal = False
End If End If
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then If op.Item.Name.ToLower() = "griseous orb" And op.Number = 487 Then
canSteal = False Exit Sub
End If
If op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
Exit Sub
End If End If
If canSteal = True Then If p.Item Is Nothing Then
If p.Item Is Nothing And Not op.Item Is Nothing Then
Dim ItemID As Integer = op.Item.ID Dim ItemID As Integer = op.Item.ID
op.OriginalItem = Item.GetItemByID(op.Item.ID) op.OriginalItem = Item.GetItemByID(op.Item.ID)
op.OriginalItem.AdditionalData = op.Item.AdditionalData op.OriginalItem.AdditionalData = op.Item.AdditionalData
If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Covet stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:covet") = True Then If BattleScreen.Battle.RemoveHeldItem(Not own, own, BattleScreen, "Covet stole the item " & op.Item.Name & " from " & op.GetDisplayName() & "!", "move:covet") Then
If own = False Then If own = False Then
BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID) BattleScreen.FieldEffects.StolenItemIDs.Add(ItemID)
End If End If
p.Item = Item.GetItemByID(ItemID) p.Item = Item.GetItemByID(ItemID)
End If End If
End If End If
End If
End Sub End Sub
End Class End Class
End Namespace End Namespace

View File

@ -59,8 +59,8 @@
If own = True Then If own = True Then
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon
If Not BattleScreen.FieldEffects.OwnLostItem Is Nothing Then If Not BattleScreen.FieldEffects.OwnConsumedItem Is Nothing Then
p.Item = BattleScreen.FieldEffects.OwnLostItem p.Item = BattleScreen.FieldEffects.OwnConsumedItem
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " found one " & p.Item.Name & "!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " found one " & p.Item.Name & "!"))
Else Else
BattleScreen.BattleQuery.Add(New TextQueryObject("Recycle failed!")) BattleScreen.BattleQuery.Add(New TextQueryObject("Recycle failed!"))
@ -68,8 +68,8 @@
Else Else
Dim p As Pokemon = BattleScreen.OppPokemon Dim p As Pokemon = BattleScreen.OppPokemon
If Not BattleScreen.FieldEffects.OppLostItem Is Nothing Then If Not BattleScreen.FieldEffects.OppConsumedItem Is Nothing Then
p.Item = BattleScreen.FieldEffects.OppLostItem p.Item = BattleScreen.FieldEffects.OppConsumedItem
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " found one " & p.Item.Name & "!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " found one " & p.Item.Name & "!"))
Else Else
BattleScreen.BattleQuery.Add(New TextQueryObject("Recycle failed!")) BattleScreen.BattleQuery.Add(New TextQueryObject("Recycle failed!"))

View File

@ -62,48 +62,51 @@ Namespace BattleSystem.Moves.Psychic
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If
Dim CanSwitchItems As Boolean = True
If p.Item Is Nothing And op.Item Is Nothing Then If p.Item Is Nothing And op.Item Is Nothing Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If p.Ability.Name.ToLower() = "sticky hold" Or op.Ability.Name.ToLower() = "sticky hold" Then If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) AndAlso op.Ability.Name.ToLower() = "sticky hold" Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower() = "griseous orb" AndAlso p.Number = 487 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower() = "griseous orb" AndAlso op.Number = 487 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If CheckMultitypePlate(p, op) = False Then If CheckMultitypePlate(p, op) = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then If Not p.Item Is Nothing AndAlso p.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso p.Number = 649 Then If Not op.Item Is Nothing AndAlso op.Item.Name.ToLower().EndsWith(" drive") = True AndAlso op.Number = 649 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
If p.Item.IsMegaStone OrElse op.Item.IsMegaStone Then If (p.Item IsNot Nothing AndAlso p.Item.IsMegaStone) OrElse (op.Item IsNot Nothing AndAlso op.Item.IsMegaStone) Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) CanSwitchItems = False
Else End If
Dim i1 As Item = p.Item
Dim i2 As Item = op.Item If CanSwitchItems Then
Dim i1 As Item = Nothing
Dim i2 As Item = Nothing
If p.Item IsNot Nothing Then
i1 = p.Item
End If
If op.Item IsNot Nothing Then
i2 = op.Item
End If
p.Item = i2 p.Item = i2
op.Item = i1 op.Item = i1
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & ".")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " switched items with " & op.GetDisplayName() & "."))
End If Else
End If BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End If
End If
End If
End If
End If End If
End Sub End Sub
Private Function CheckMultitypePlate(ByVal p As Pokemon, ByVal op As Pokemon) As Boolean Private Function CheckMultitypePlate(ByVal p As Pokemon, ByVal op As Pokemon) As Boolean
If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() = "multitype" Then If p.Ability.Name.ToLower() <> "multitype" And op.Ability.Name.ToLower() <> "multitype" Then
Return True Return True
Else Else
If Not p.Item Is Nothing Then If Not p.Item Is Nothing Then

View File

@ -1017,11 +1017,11 @@ Public Class Pokemon
Me._originalAbility = Nothing Me._originalAbility = Nothing
End If End If
If Not Me._originalItem Is Nothing Then 'If Not Me._originalItem Is Nothing Then
Me.Item = net.Pokemon3D.Game.Item.GetItemByID(Me._originalItem.ID) ' Me.Item = net.Pokemon3D.Game.Item.GetItemByID(Me._originalItem.ID)
Me.Item.AdditionalData = Me._originalItem.AdditionalData ' Me.Item.AdditionalData = Me._originalItem.AdditionalData
Me._originalItem = Nothing ' Me._originalItem = Nothing
End If 'End If
Me.IsTransformed = False Me.IsTransformed = False

View File

@ -6,8 +6,8 @@
Shared _valid As Boolean = False Shared _valid As Boolean = False
Const RUNVALIDATION As Boolean = False Const RUNVALIDATION As Boolean = False
Const EXPECTEDSIZE As Integer = 42289864 Const EXPECTEDSIZE As Integer = 42289870
Const METAHASH As String = "ODk4NUU5QTZGMTdDNzZDMDc3RkZGODUwRDAzNzkxRTQ=" Const METAHASH As String = "OTEzQTRBRURFMjU2RkUyNDgxRjU0MEJDODMwMjk3Mzc="
Public Shared ReadOnly Property IsValid(ByVal ForceResult As Boolean) As Boolean Public Shared ReadOnly Property IsValid(ByVal ForceResult As Boolean) As Boolean
Get Get

File diff suppressed because one or more lines are too long