Fixed Parental Bond implementation
This commit is contained in:
parent
01acc00a5b
commit
096fc52ec8
|
@ -1717,7 +1717,9 @@
|
|||
"sky attack",
|
||||
"sky drop",
|
||||
"solar beam",
|
||||
"solar blade"
|
||||
"solar blade",
|
||||
"bide",
|
||||
"struggle"
|
||||
}
|
||||
If Not moveList.Contains(moveUsed.Name.ToLower) Then
|
||||
useParentalBond = True
|
||||
|
@ -1896,7 +1898,7 @@
|
|||
|
||||
If effectiveness <> 0 Then
|
||||
Dim canUseEffect As Boolean = True
|
||||
Dim canUseRecharge As Boolean = True
|
||||
Dim multiUseEffect As Boolean = True
|
||||
|
||||
If op.Ability.Name.ToLower() = "shield dust" AndAlso moveUsed.HasSecondaryEffect = True Then
|
||||
If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True Then
|
||||
|
@ -1909,38 +1911,24 @@
|
|||
|
||||
|
||||
'Moves that only use secondary effects on the second turn of parental bond
|
||||
If p.Ability IsNot Nothing AndAlso p.Ability.Name.ToLower = "parental bond" AndAlso i <> TimesToAttack Then
|
||||
If useParentalBond Then
|
||||
Dim PBmoveList As String() = {"secret power",
|
||||
"struggle",
|
||||
"circle throw",
|
||||
"dragon tail",
|
||||
"bug bite",
|
||||
"pluck",
|
||||
"u-turn",
|
||||
"volt switch",
|
||||
"smelling salt",
|
||||
"wake-up slap",
|
||||
"knock off",
|
||||
"relic song",
|
||||
"outrage",
|
||||
"thrash",
|
||||
"petal dance",
|
||||
"hyper beam",
|
||||
"giga impact",
|
||||
"blast burn",
|
||||
"frenzy plant",
|
||||
"hydro cannon",
|
||||
"roar of time",
|
||||
"rock wrecker"
|
||||
"circle throw",
|
||||
"dragon tail"
|
||||
}
|
||||
If PBmoveList.Contains(moveUsed.Name.ToLower) Then
|
||||
canUseEffect = False
|
||||
canUseRecharge = False
|
||||
multiUseEffect = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If canUseEffect = True Then
|
||||
If canUseEffect AndAlso multiUseEffect OrElse (multiUseEffect = False AndAlso i = TimesToAttack) Then
|
||||
If substitute = 0 OrElse moveUsed.IsAffectedBySubstitute = False Then
|
||||
moveUsed.MoveHits(own, BattleScreen)
|
||||
End If
|
||||
|
@ -1957,11 +1945,6 @@
|
|||
|
||||
moveUsed.MoveRecoil(own, BattleScreen)
|
||||
|
||||
If canUseRecharge Then
|
||||
moveUsed.MoveRecharge(own, BattleScreen)
|
||||
End If
|
||||
|
||||
|
||||
If op.HP > 0 Then
|
||||
If own = True Then
|
||||
If BattleScreen.FieldEffects.OppRageCounter > 0 Then
|
||||
|
@ -2220,6 +2203,12 @@
|
|||
End If
|
||||
Next
|
||||
|
||||
If p.HP > 0 AndAlso p.Status <> Pokemon.StatusProblems.Fainted AndAlso effectiveness <> 0.0F Then
|
||||
moveUsed.MoveMultiTurn(own, BattleScreen)
|
||||
moveUsed.MoveRecharge(own, BattleScreen)
|
||||
moveUsed.MoveSwitch(own, BattleScreen)
|
||||
End If
|
||||
|
||||
If (Hits > 1 Or TimesToAttack > 1) And effectiveness <> 0.0F Then
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject("Hit " & Hits & " times!"))
|
||||
End If
|
||||
|
@ -2255,7 +2244,7 @@
|
|||
End Select
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Else 'If not damaging move
|
||||
Dim lastMove As Attack = BattleScreen.FieldEffects.OppLastMove
|
||||
If own = False Then
|
||||
lastMove = BattleScreen.FieldEffects.OwnLastMove
|
||||
|
|
|
@ -1590,11 +1590,15 @@
|
|||
End Sub
|
||||
|
||||
Public Overridable Sub MoveRecharge(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING HERE (will do recoil if moves overrides it)
|
||||
'DO NOTHING HERE (will do a one turn recharge if moves overrides it)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveMultiTurn(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING HERE (will do the multi turn countdown if moves overrides it)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub MoveSwitch(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||
'DO NOTHING HERE (will do recoil if moves overrides it)
|
||||
'DO NOTHING HERE (will force user switching if moves overrides it)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveSwitch(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
If Core.Player.CountFightablePokemon > 1 Then
|
||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, GetPokemonIndex(BattleScreen, own), -1)
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
Me.AIField3 = AIField.ConfuseOwn
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
||||
Dim currentTurns As Integer = BattleScreen.FieldEffects.OwnOutrage
|
||||
If own = False Then
|
||||
currentTurns = BattleScreen.FieldEffects.OppOutrage
|
||||
|
|
|
@ -52,7 +52,7 @@ Namespace BattleSystem.Moves.Electric
|
|||
'#End
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveSwitch(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
If Core.Player.CountFightablePokemon > 1 Then
|
||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, GetPokemonIndex(BattleScreen, own), -1)
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
Me.AIField3 = AIField.ConfuseOwn
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
||||
Dim currentTurns As Integer = BattleScreen.FieldEffects.OwnPetalDance
|
||||
If own = False Then
|
||||
currentTurns = BattleScreen.FieldEffects.OppPetalDance
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
Return p
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
||||
Dim iceball As Integer = BattleScreen.FieldEffects.OwnIceBallCounter
|
||||
If own = False Then
|
||||
iceball = BattleScreen.FieldEffects.OppIceBallCounter
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
Me.AIField2 = AIField.ConfuseOwn
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
||||
Dim currentTurns As Integer = BattleScreen.FieldEffects.OwnThrash
|
||||
If own = False Then
|
||||
currentTurns = BattleScreen.FieldEffects.OppThrash
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
'#End
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
||||
If own = True Then
|
||||
If BattleScreen.FieldEffects.OwnUproar = 0 Then
|
||||
BattleScreen.FieldEffects.OwnUproar = 3
|
||||
|
|
|
@ -81,7 +81,7 @@ Namespace BattleSystem.Moves.Rock
|
|||
Return p
|
||||
End Function
|
||||
|
||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||
Public Overrides Sub MoveMultiTurn(own As Boolean, BattleScreen As BattleScreen)
|
||||
Dim rollout As Integer = BattleScreen.FieldEffects.OwnRolloutCounter
|
||||
If own = False Then
|
||||
rollout = BattleScreen.FieldEffects.OppRolloutCounter
|
||||
|
|
|
@ -1030,6 +1030,7 @@ Public Class Pokemon
|
|||
Public Sub LoadAltAbility()
|
||||
NormalAbility = OriginalAbility
|
||||
Me.Ability = NewAbilities(0)
|
||||
SetOriginalAbility()
|
||||
End Sub
|
||||
Public Sub RestoreAbility()
|
||||
Me.Ability = NormalAbility
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue