diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb index 7bb0f559b..8d01eaa68 100644 --- a/P3D/Battle/BattleSystemV2/Battle.vb +++ b/P3D/Battle/BattleSystemV2/Battle.vb @@ -2006,11 +2006,15 @@ 'Protean Ability: If p.Ability.Name.ToLower() = "protean" Then - If p.Type1.Type <> moveUsed.Type.Type Or p.Type2.Type <> Element.Types.Blank Then - p.OriginalType1.Type = p.Type1.Type + If p.Type1.Type <> moveUsed.Type.Type Then + If p.OriginalType1 Is Nothing Then + p.OriginalType1 = p.Type1 + End If p.Type1.Type = moveUsed.Type.Type If p.Type2.Type <> Element.Types.Blank Then - p.OriginalType2.Type = p.Type2.Type + If p.OriginalType2 Is Nothing Then + p.OriginalType2 = p.Type2 + End If p.Type2.Type = Element.Types.Blank End If BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s type changed to " & p.Type1.ToString() & " due to Protean.")) diff --git a/P3D/Battle/BattleSystemV2/BattleScreen.vb b/P3D/Battle/BattleSystemV2/BattleScreen.vb index 91b780fc6..506e7d595 100644 --- a/P3D/Battle/BattleSystemV2/BattleScreen.vb +++ b/P3D/Battle/BattleSystemV2/BattleScreen.vb @@ -1246,16 +1246,18 @@ nextIndex: End If Else If Not p.OriginalItem Is Nothing Then - If p.Item IsNot Nothing Then - Core.Player.Inventory.AddItem(p.OriginalItem.ID, 1) - SoundManager.PlaySound("item_found", True) - Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.OriginalItem, 1)) - p.OriginalItem = Nothing - Else + If p.Item Is Nothing Then p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID) p.Item.AdditionalData = p.OriginalItem.AdditionalData Screen.TextBox.Show(Core.Player.Name & " found~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName) p.OriginalItem = Nothing + Else + Core.Player.Inventory.AddItem(p.Item.ID, 1) + SoundManager.PlaySound("item_found", True) + Screen.TextBox.Show(Core.Player.Name & " found~" & p.Item.Name & "!*" & Core.Player.Inventory.GetMessageReceive(p.Item, 1)) + p.Item = p.OriginalItem + p.Item.AdditionalData = p.OriginalItem.AdditionalData + p.OriginalItem = Nothing End If End If End If