From 5b5a648843940f832e96b9544a95ed9fd74c508a Mon Sep 17 00:00:00 2001 From: Ruan Pablo Date: Wed, 9 Oct 2019 03:10:44 -0300 Subject: [PATCH] Choice Items Added --- P3D/Battle/BattleSystemV2/Battle.vb | 32 ++++++++++++++++++++-- P3D/P3D.vbproj | 3 ++ P3D/Pokemon/Items/Standard/ChoiceBand.vb | 19 +++++++++++++ P3D/Pokemon/Items/Standard/ChoiceScarf.vb | 19 +++++++++++++ P3D/Pokemon/Items/Standard/ChoiceSpecs.vb | 19 +++++++++++++ P3D/Pokemon/Items/_itemList.txt | Bin 63596 -> 66368 bytes 6 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 P3D/Pokemon/Items/Standard/ChoiceBand.vb create mode 100644 P3D/Pokemon/Items/Standard/ChoiceScarf.vb create mode 100644 P3D/Pokemon/Items/Standard/ChoiceSpecs.vb diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb index 182e09621..ff24efb2d 100644 --- a/P3D/Battle/BattleSystemV2/Battle.vb +++ b/P3D/Battle/BattleSystemV2/Battle.vb @@ -1243,6 +1243,34 @@ Exit Sub End If + If own = True Then + If Not p.Item Is Nothing Then + If p.Item.Name.ToLower() = "choice band" Or p.Item.Name.ToLower() = "choice specs" Or p.Item.Name.ToLower() = "choice scarf" Then + If Not BattleScreen.FieldEffects.OwnChoiceMove Is Nothing Then + If Not moveUsed Is BattleScreen.FieldEffects.OwnChoiceMove Then + BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to " & p.Item.Name & "!")) + Exit Sub + End If + Else + BattleScreen.FieldEffects.OwnChoiceMove = moveUsed + End If + End If + End If + Else + If Not p.Item Is Nothing Then + If p.Item.Name.ToLower() = "choice band" Or p.Item.Name.ToLower() = "choice specs" Or p.Item.Name.ToLower() = "choice scarf" Then + If Not BattleScreen.FieldEffects.OppChoiceMove Is Nothing Then + If Not moveUsed Is BattleScreen.FieldEffects.OppChoiceMove Then + BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to " & p.Item.Name & "!")) + Exit Sub + End If + Else + BattleScreen.FieldEffects.OppChoiceMove = moveUsed + End If + End If + End If + End If + Dim imprisoned As Integer = BattleScreen.FieldEffects.OwnImprison If own = False Then imprisoned = BattleScreen.FieldEffects.OppImprison @@ -1338,7 +1366,7 @@ End If If taunt > 0 Then If moveUsed.Category = Attack.Categories.Status Then - BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " move was prevented due to Taunt!")) + BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to Taunt!")) Exit Sub End If End If @@ -1346,7 +1374,7 @@ Dim gravity As Integer = BattleScreen.FieldEffects.Gravity If gravity > 0 Then If moveUsed.DisabledWhileGravity = True Then - BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " move was prevented due to Gravity!")) + BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to Gravity!")) Exit Sub End If End If diff --git a/P3D/P3D.vbproj b/P3D/P3D.vbproj index dd9da8942..e2fa9b424 100644 --- a/P3D/P3D.vbproj +++ b/P3D/P3D.vbproj @@ -26224,6 +26224,9 @@ + + + diff --git a/P3D/Pokemon/Items/Standard/ChoiceBand.vb b/P3D/Pokemon/Items/Standard/ChoiceBand.vb new file mode 100644 index 000000000..6017a0f4e --- /dev/null +++ b/P3D/Pokemon/Items/Standard/ChoiceBand.vb @@ -0,0 +1,19 @@ +Namespace Items.Standard + + + Public Class ChoiceBand + + Inherits Item + + Public Overrides ReadOnly Property Description As String = "Boosts Attack by 50%, but only allows the use of the first move selected." + Public Overrides ReadOnly Property PokeDollarPrice As Integer = 4000 + Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False + Public Overrides ReadOnly Property CanBeUsed As Boolean = False + + Public Sub New() + _textureRectangle = New Rectangle(0, 288, 24, 24) + End Sub + + End Class + +End Namespace diff --git a/P3D/Pokemon/Items/Standard/ChoiceScarf.vb b/P3D/Pokemon/Items/Standard/ChoiceScarf.vb new file mode 100644 index 000000000..9e27843c0 --- /dev/null +++ b/P3D/Pokemon/Items/Standard/ChoiceScarf.vb @@ -0,0 +1,19 @@ +Namespace Items.Standard + + + Public Class ChoiceScarf + + Inherits Item + + Public Overrides ReadOnly Property Description As String = "Boosts Speed by 50%, but only allows the use of the first move selected." + Public Overrides ReadOnly Property PokeDollarPrice As Integer = 4000 + Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False + Public Overrides ReadOnly Property CanBeUsed As Boolean = False + + Public Sub New() + _textureRectangle = New Rectangle(24, 288, 24, 24) + End Sub + + End Class + +End Namespace diff --git a/P3D/Pokemon/Items/Standard/ChoiceSpecs.vb b/P3D/Pokemon/Items/Standard/ChoiceSpecs.vb new file mode 100644 index 000000000..716c4c6cf --- /dev/null +++ b/P3D/Pokemon/Items/Standard/ChoiceSpecs.vb @@ -0,0 +1,19 @@ +Namespace Items.Standard + + + Public Class ChoiceSpecs + + Inherits Item + + Public Overrides ReadOnly Property Description As String = "Boosts Special Attack by 50%, but only allows the use of the first move selected." + Public Overrides ReadOnly Property PokeDollarPrice As Integer = 4000 + Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False + Public Overrides ReadOnly Property CanBeUsed As Boolean = False + + Public Sub New() + _textureRectangle = New Rectangle(48, 288, 24, 24) + End Sub + + End Class + +End Namespace diff --git a/P3D/Pokemon/Items/_itemList.txt b/P3D/Pokemon/Items/_itemList.txt index 81a6b552ced5085353d9e5b2b4f201132d21cd9a..f9cad498bb9e573df72253025149e686223dc74a 100644 GIT binary patch delta 1086 zcmZWo!Dq;CVw+-pnwYx$mBL?mhS1_qP{my&7nkZT^%P zie$*-*3xZ$>5xj4B!g}?U!4BA#JYMlvPL%Vk3{)dH_Z>eObnOlh_>+6XpP?-Oz~%&>*{zcM-{SY zn|7#51+wXwo`9^vZYPGW7C7Nt=d-D!FN4lPTno_^?rXymn%y5ELUz}+ zSqbBbUiSD(G9P3oU+UMw$TI3$km4JXCnj4B_qqc2ZPcjB+#Y)4gFbs9-Rok-8`L5G z{X;N?O{p-}hE;pmsUW(ys?7xZzDq?|Dj^l49uGPtmefM|fKwQSyQR&aUzUt009ym` z4sI1?atJixTxiY@L0t^3Oz*WG@^}>!E8!~#X@!4tL3NL?5dvT7qs4ZJccz%W$6%80 UG4T6#y8q}n?xdS%-RIN)0k+skNB{r; delta 134 zcmX@m#`5L^^9J){lPk~jFq<-%PcFFRIJx