mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-23 22:05:36 +02:00
Implemented Disable move & fixed Cursed Body turns
When Cursed Body successfully executes, it now always disables moves for 4 turns too
This commit is contained in:
parent
b3422ba82a
commit
f7c97ec7c9
@ -2364,7 +2364,7 @@
|
|||||||
If Core.Random.Next(0, 100) < 30 Then
|
If Core.Random.Next(0, 100) < 30 Then
|
||||||
ChangeCameraAngle(2, own, BattleScreen)
|
ChangeCameraAngle(2, own, BattleScreen)
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & "'s Cursed Body disabled " & moveUsed.Name & "!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & "'s Cursed Body disabled " & moveUsed.Name & "!"))
|
||||||
moveUsed.Disabled = Core.Random.Next(1, 6)
|
moveUsed.Disabled = 4
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -5445,7 +5445,12 @@
|
|||||||
.BattleQuery.Add(New TextQueryObject(.OwnPokemon.GetDisplayName() & " got healed from the Torment" & Environment.NewLine & "due to Mental Herb!"))
|
.BattleQuery.Add(New TextQueryObject(.OwnPokemon.GetDisplayName() & " got healed from the Torment" & Environment.NewLine & "due to Mental Herb!"))
|
||||||
usedMentalHerb = True
|
usedMentalHerb = True
|
||||||
End If
|
End If
|
||||||
'Remove disable
|
For Each a As BattleSystem.Attack In .OwnPokemon.Attacks
|
||||||
|
If a.Disabled > 0 Then
|
||||||
|
a.Disabled = 0
|
||||||
|
.BattleQuery.Add(New TextQueryObject(.OwnPokemon.GetDisplayName() & "'s" & " " & a.Name & " " & "is no longer disabled" & Environment.NewLine & "due to Mental Herb!"))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
If usedMentalHerb = True Then
|
If usedMentalHerb = True Then
|
||||||
.OwnPokemon.Item = Nothing
|
.OwnPokemon.Item = Nothing
|
||||||
End If
|
End If
|
||||||
@ -6092,6 +6097,14 @@
|
|||||||
|
|
||||||
'Disable
|
'Disable
|
||||||
'For each move in moveset, reduce Disable count. If disable count = 0, print message.
|
'For each move in moveset, reduce Disable count. If disable count = 0, print message.
|
||||||
|
For Each a As BattleSystem.Attack In .OwnPokemon.Attacks
|
||||||
|
If a.Disabled > 0 Then
|
||||||
|
a.Disabled -= 1
|
||||||
|
If a.Disabled = 0 Then
|
||||||
|
.BattleQuery.Add(New TextQueryObject(.OwnPokemon.GetDisplayName() & "'s" & " " & a.Name & " " & "is no longer disabled."))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
If .FieldEffects.OwnEncore > 0 And .OwnPokemon.HP > 0 Then 'Encore
|
If .FieldEffects.OwnEncore > 0 And .OwnPokemon.HP > 0 Then 'Encore
|
||||||
.FieldEffects.OwnEncore -= 1
|
.FieldEffects.OwnEncore -= 1
|
||||||
@ -6328,7 +6341,12 @@
|
|||||||
.BattleQuery.Add(New TextQueryObject(.OppPokemon.GetDisplayName() & " got healed from the Torment" & Environment.NewLine & "due to Mental Herb!"))
|
.BattleQuery.Add(New TextQueryObject(.OppPokemon.GetDisplayName() & " got healed from the Torment" & Environment.NewLine & "due to Mental Herb!"))
|
||||||
usedMentalHerb = True
|
usedMentalHerb = True
|
||||||
End If
|
End If
|
||||||
'Remove disable
|
For Each a As BattleSystem.Attack In .OppPokemon.Attacks
|
||||||
|
If a.Disabled > 0 Then
|
||||||
|
a.Disabled = 0
|
||||||
|
.BattleQuery.Add(New TextQueryObject(.OppPokemon.GetDisplayName() & "'s" & " " & a.Name & " " & "is no longer disabled" & Environment.NewLine & "due to Mental Herb!"))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
If usedMentalHerb = True Then
|
If usedMentalHerb = True Then
|
||||||
.OppPokemon.Item = Nothing
|
.OppPokemon.Item = Nothing
|
||||||
End If
|
End If
|
||||||
@ -6969,6 +6987,14 @@
|
|||||||
|
|
||||||
'Disable
|
'Disable
|
||||||
'For each move in moveset, reduce Disable count. If disable count = 0, print message.
|
'For each move in moveset, reduce Disable count. If disable count = 0, print message.
|
||||||
|
For Each a As BattleSystem.Attack In .OppPokemon.Attacks
|
||||||
|
If a.Disabled > 0 Then
|
||||||
|
a.Disabled -= 1
|
||||||
|
If a.Disabled = 0 Then
|
||||||
|
.BattleQuery.Add(New TextQueryObject(.OppPokemon.GetDisplayName() & "'s" & " " & a.Name & " " & "is no longer disabled."))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
If .FieldEffects.OppEncore > 0 And .OppPokemon.HP > 0 Then 'Encore
|
If .FieldEffects.OppEncore > 0 And .OppPokemon.HP > 0 Then 'Encore
|
||||||
.FieldEffects.OppEncore -= 1
|
.FieldEffects.OppEncore -= 1
|
||||||
|
@ -468,10 +468,14 @@
|
|||||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\Types", Me.Move.Type.GetElementImage(), ""), New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\Types", Me.Move.Type.GetElementImage(), ""), New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 16), New Color(255, 255, 255, 255 - deductAlpha))
|
||||||
|
|
||||||
If isSelected = True Then
|
If isSelected = True Then
|
||||||
Dim ppColor As Color = GetPPColor()
|
If Move.Disabled > 0 Then
|
||||||
ppColor.A = CByte((extraExtended + AllExtended - deductAlpha).Clamp(0, 255))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, "Disabled!", New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), Color.Black)
|
||||||
|
Else
|
||||||
|
Dim ppColor As Color = GetPPColor()
|
||||||
|
ppColor.A = CByte((extraExtended + AllExtended - deductAlpha).Clamp(0, 255))
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.CurrentPP & "/" & Me.Move.MaxPP, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), ppColor)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.CurrentPP & "/" & Me.Move.MaxPP, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), ppColor)
|
||||||
|
End If
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86), CInt(132 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended) - deductAlpha))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86), CInt(132 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended) - deductAlpha))
|
||||||
Else
|
Else
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 152 + Index * 96), New Color(0, 0, 0, 255 - (extraExtended + AllExtended) - deductAlpha))
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 152 + Index * 96), New Color(0, 0, 0, 255 - (extraExtended + AllExtended) - deductAlpha))
|
||||||
|
@ -28282,6 +28282,7 @@
|
|||||||
<Compile Include="Pokemon\Attacks\Ice\IceHammer.vb" />
|
<Compile Include="Pokemon\Attacks\Ice\IceHammer.vb" />
|
||||||
<Compile Include="Pokemon\Attacks\Normal\Bestow.vb" />
|
<Compile Include="Pokemon\Attacks\Normal\Bestow.vb" />
|
||||||
<Compile Include="Pokemon\Attacks\Normal\Celebrate.vb" />
|
<Compile Include="Pokemon\Attacks\Normal\Celebrate.vb" />
|
||||||
|
<Compile Include="Pokemon\Attacks\Normal\Disable.vb" />
|
||||||
<Compile Include="Pokemon\Attacks\Normal\TearfulLook.vb" />
|
<Compile Include="Pokemon\Attacks\Normal\TearfulLook.vb" />
|
||||||
<Compile Include="Pokemon\Attacks\Normal\RevelationDance.vb" />
|
<Compile Include="Pokemon\Attacks\Normal\RevelationDance.vb" />
|
||||||
<Compile Include="Pokemon\Attacks\Normal\HoldBack.vb" />
|
<Compile Include="Pokemon\Attacks\Normal\HoldBack.vb" />
|
||||||
|
@ -353,8 +353,8 @@
|
|||||||
returnMove = New Moves.Normal.Supersonic()
|
returnMove = New Moves.Normal.Supersonic()
|
||||||
Case 49
|
Case 49
|
||||||
returnMove = New Moves.Normal.SonicBoom()
|
returnMove = New Moves.Normal.SonicBoom()
|
||||||
'Case 50
|
Case 50
|
||||||
'Disable
|
returnMove = New Moves.Normal.Disable()
|
||||||
Case 51
|
Case 51
|
||||||
returnMove = New Moves.Poison.Acid()
|
returnMove = New Moves.Poison.Acid()
|
||||||
Case 52
|
Case 52
|
||||||
|
84
P3D/Pokemon/Attacks/Normal/Disable.vb
Normal file
84
P3D/Pokemon/Attacks/Normal/Disable.vb
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
Namespace BattleSystem.Moves.Normal
|
||||||
|
|
||||||
|
Public Class Disable
|
||||||
|
|
||||||
|
Inherits Attack
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
'#Definitions
|
||||||
|
Me.Type = New Element(Element.Types.Normal)
|
||||||
|
Me.ID = 50
|
||||||
|
Me.OriginalPP = 20
|
||||||
|
Me.CurrentPP = 20
|
||||||
|
Me.MaxPP = 32
|
||||||
|
Me.Power = 0
|
||||||
|
Me.Accuracy = 100
|
||||||
|
Me.Category = Categories.Status
|
||||||
|
Me.ContestCategory = ContestCategories.Smart
|
||||||
|
Me.Name = Localization.GetString("move_name_" & Me.ID, "Disable")
|
||||||
|
Me.Description = "For four turns, the target will be unable to use whichever move it last used."
|
||||||
|
Me.CriticalChance = 0
|
||||||
|
Me.IsHMMove = False
|
||||||
|
Me.Target = Targets.AllAdjacentTargets
|
||||||
|
Me.Priority = 0
|
||||||
|
Me.TimesToAttack = 1
|
||||||
|
'#End
|
||||||
|
|
||||||
|
'#SpecialDefinitions
|
||||||
|
Me.MakesContact = False
|
||||||
|
Me.ProtectAffected = True
|
||||||
|
Me.MagicCoatAffected = True
|
||||||
|
Me.SnatchAffected = False
|
||||||
|
Me.MirrorMoveAffected = True
|
||||||
|
Me.KingsrockAffected = False
|
||||||
|
Me.CounterAffected = False
|
||||||
|
|
||||||
|
Me.DisabledWhileGravity = False
|
||||||
|
Me.UseEffectiveness = False
|
||||||
|
Me.ImmunityAffected = False
|
||||||
|
Me.HasSecondaryEffect = False
|
||||||
|
Me.RemovesFrozen = False
|
||||||
|
|
||||||
|
Me.IsHealingMove = False
|
||||||
|
Me.IsRecoilMove = False
|
||||||
|
|
||||||
|
Me.IsDamagingMove = False
|
||||||
|
Me.IsProtectMove = False
|
||||||
|
Me.IsSoundMove = False
|
||||||
|
|
||||||
|
Me.IsAffectedBySubstitute = True
|
||||||
|
Me.IsOneHitKOMove = False
|
||||||
|
Me.IsWonderGuardAffected = False
|
||||||
|
'#End
|
||||||
|
|
||||||
|
Me.AIField1 = AIField.LowerAttack
|
||||||
|
Me.AIField2 = AIField.Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Dim Target As Pokemon = BattleScreen.OppPokemon
|
||||||
|
Dim LastMove As Attack = BattleScreen.FieldEffects.OppLastMove
|
||||||
|
If own = False Then
|
||||||
|
Target = BattleScreen.OwnPokemon
|
||||||
|
LastMove = BattleScreen.FieldEffects.OwnLastMove
|
||||||
|
End If
|
||||||
|
If LastMove IsNot Nothing Then
|
||||||
|
If LastMove.Name.ToLower <> "struggle" AndAlso LastMove.Disabled = 0 Then
|
||||||
|
For Each a As BattleSystem.Attack In Target.Attacks
|
||||||
|
If a.ID = LastMove.ID Then
|
||||||
|
a.Disabled = 4
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Target.GetDisplayName() & "'s " & a.Name & " was Disabled!"))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
Loading…
x
Reference in New Issue
Block a user