Fix for Trick and Recycle
This commit is contained in:
parent
678cd35fde
commit
cdccbfcc67
|
@ -1250,12 +1250,13 @@ nextIndex:
|
||||||
Core.Player.Inventory.AddItem(p.OriginalItem.ID, 1)
|
Core.Player.Inventory.AddItem(p.OriginalItem.ID, 1)
|
||||||
SoundManager.PlaySound("item_found", True)
|
SoundManager.PlaySound("item_found", True)
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1))
|
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1))
|
||||||
|
p.OriginalItem = Nothing
|
||||||
Else
|
Else
|
||||||
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID)
|
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID)
|
||||||
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
|
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
|
||||||
|
p.OriginalItem = Nothing
|
||||||
End If
|
End If
|
||||||
p.OriginalItem = Nothing
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
p.ResetTemp()
|
p.ResetTemp()
|
||||||
|
@ -1310,13 +1311,14 @@ nextIndex:
|
||||||
If p.Item IsNot Nothing Then
|
If p.Item IsNot Nothing Then
|
||||||
Core.Player.Inventory.AddItem(p.OriginalItem.ID, 1)
|
Core.Player.Inventory.AddItem(p.OriginalItem.ID, 1)
|
||||||
SoundManager.PlaySound("item_found", True)
|
SoundManager.PlaySound("item_found", True)
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.originalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.originalItem, 1))
|
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1))
|
||||||
|
p.OriginalItem = Nothing
|
||||||
Else
|
Else
|
||||||
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID)
|
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID)
|
||||||
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
p.Item.AdditionalData = p.OriginalItem.AdditionalData
|
||||||
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
|
Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
|
||||||
|
p.OriginalItem = Nothing
|
||||||
End If
|
End If
|
||||||
p.OriginalItem = Nothing
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
p.ResetTemp()
|
p.ResetTemp()
|
||||||
|
|
|
@ -58,9 +58,11 @@
|
||||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||||
If own = True Then
|
If own = True Then
|
||||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||||
|
|
||||||
If Not BattleScreen.FieldEffects.OwnConsumedItem Is Nothing Then
|
If Not BattleScreen.FieldEffects.OwnConsumedItem Is Nothing Then
|
||||||
p.Item = BattleScreen.FieldEffects.OwnConsumedItem
|
p.Item = BattleScreen.FieldEffects.OwnConsumedItem
|
||||||
|
If p.OriginalItem IsNot Nothing Then
|
||||||
|
p.OriginalItem = Nothing
|
||||||
|
End If
|
||||||
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!"))
|
||||||
|
@ -70,6 +72,9 @@
|
||||||
|
|
||||||
If Not BattleScreen.FieldEffects.OppConsumedItem Is Nothing Then
|
If Not BattleScreen.FieldEffects.OppConsumedItem Is Nothing Then
|
||||||
p.Item = BattleScreen.FieldEffects.OppConsumedItem
|
p.Item = BattleScreen.FieldEffects.OppConsumedItem
|
||||||
|
If p.OriginalItem IsNot Nothing Then
|
||||||
|
p.OriginalItem = Nothing
|
||||||
|
End If
|
||||||
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!"))
|
||||||
|
|
|
@ -106,10 +106,14 @@ Namespace BattleSystem.Moves.Psychic
|
||||||
If CanSwitchItems Then
|
If CanSwitchItems Then
|
||||||
Dim i1 As Item = Nothing
|
Dim i1 As Item = Nothing
|
||||||
Dim i2 As Item = Nothing
|
Dim i2 As Item = Nothing
|
||||||
If own = True Then
|
If own = True Then
|
||||||
p.OriginalItem = p.Item
|
If p.Item IsNot Nothing Then
|
||||||
|
p.OriginalItem = p.Item
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
op.OriginalItem = op.Item
|
If op.Item IsNot Nothing Then
|
||||||
|
op.OriginalItem = op.Item
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If p.Item IsNot Nothing Then
|
If p.Item IsNot Nothing Then
|
||||||
i1 = p.Item
|
i1 = p.Item
|
||||||
|
|
Loading…
Reference in New Issue