This commit is contained in:
Ruan Pablo 2018-12-25 23:57:27 -02:00
commit c719975da8
11 changed files with 46 additions and 94 deletions

View File

@ -1424,8 +1424,9 @@
Dim NoTargetCheck As Boolean = True
If moveUsed.ProtectAffected = False Then
NoTargetCheck = False
'Moves that target other pokemon and can go through protect.
Select Case moveUsed.Name.ToLower
Case "accupressure", "confide", "feint", "hold hands", "hyperspace fury", "hyperspace hole", "phantom force", "psych up", "geomancy", "play nice", "roar", "role play", "shadow force", "sketch", "transform", "whirlwind"
Case "acupressure", "confide", "feint", "hold hands", "hyperspace fury", "hyperspace hole", "phantom force", "psych up", "play nice", "roar", "role play", "shadow force", "sketch", "transform", "whirlwind"
NoTargetCheck = True
End Select
End If
@ -1470,11 +1471,13 @@
DoesNotMiss = True
End If
'if the target pokemon can't be hit because of a two-turn move (Fly, for example)
Dim UseTwoTurnCheck As Boolean = True
If moveUsed.ProtectAffected = False Then
UseTwoTurnCheck = False
'Moves that target other pokemon and can go through protect.
Select Case moveUsed.Name.ToLower
Case "accupressure", "confide", "feint", "hold hands", "hyperspace fury", "hyperspace hole", "phantom force", "psych up", "geomancy", "play nice", "roar", "role play", "shadow force", "sketch", "transform", "whirlwind"
Case "acupressure", "confide", "feint", "hold hands", "hyperspace fury", "hyperspace hole", "phantom force", "psych up", "play nice", "roar", "role play", "shadow force", "sketch", "transform", "whirlwind"
UseTwoTurnCheck = True
End Select
End If

View File

@ -461,6 +461,10 @@
Return True
End If
If UsedAttack.GetUseAccEvasion(own, BattleScreen) = False Then
Return True
End If
Dim result As Single = 1.0F
Dim INIT As Integer = UsedAttack.GetAccuracy(own, BattleScreen)
@ -484,10 +488,6 @@
Dim ACCM As Single = GetMultiplierFromAccEvasion(ACC)
If UsedAttack.GetUseAccEvasion(own, BattleScreen) = False Then
ACCM = 1.0F
End If
result = INIT * ACCM
If Not op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not own) = True Then
@ -652,10 +652,10 @@
If Core.Random.Next(0, chance) = 0 Then
Return True
End If
If UsedAttack.ID = 524 Then
If UsedAttack.ID = 524 Then 'frost breath
Return True
End If
If UsedAttack.ID = 480 Then
If UsedAttack.ID = 480 Then 'storm throw
Return True
End If
@ -1580,10 +1580,6 @@
DSM = 1.0F
End If
If Attack.ID = 663 Then 'Darkest Lariat
DSM = 1.0F
End If
If Attack.Name.ToLower() = "selfdestruct" Or Attack.Name.ToLower() = "explosion" Then
SX = 1.0F
End If
@ -1612,10 +1608,6 @@
DSM = 1.0F
End If
If Attack.ID = 663 Then 'Darkest Lariat
DSM = 1.0F
End If
If Op.Ability.Name.ToLower() = "flower gift" Then
If BattleScreen.FieldEffects.Weather = BattleWeather.WeatherTypes.Sunny Then
DMod = 1.5F

View File

@ -52,7 +52,6 @@
Public OwnLeechSeed As Integer = 0 'The opponent used leech seed
Public OwnSolarBeam As Integer = 0 'Charge counter for solar beam
Public OwnSolarBlade As Integer = 0 'Charge counter for solar blade
Public OwnGeomancy As Integer = 0 'Charge counter for solar beam
Public OwnLockOn As Integer = 0 'Counter for the moves lock-on and mind reader
Public OwnBideCounter As Integer = 0 'Counter for the Bide move
Public OwnBideDamage As Integer = 0 'Half of the damage dealt by bide
@ -182,7 +181,6 @@
Public OppLeechSeed As Integer = 0
Public OppSolarBeam As Integer = 0
Public OppSolarBlade As Integer = 0
Public OppGeomancy As Integer = 0
Public OppLockOn As Integer = 0
Public OppBideCounter As Integer = 0
Public OppBideDamage As Integer = 0

View File

@ -59,7 +59,7 @@
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
End If
If op.HP = 0 Then
If op.HP <= 0 OrElse op.Status = Pokemon.StatusProblems.Fainted Then
BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Attack", 3, "", "move:fellstinger")
End If
End Sub

View File

@ -50,6 +50,8 @@
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = True
Me.IsJawMove = True
Me.UseOppEvasion = False
Me.UseOppDefense = False
'#End
Me.AIField1 = AIField.Damage

View File

@ -56,80 +56,65 @@ Namespace BattleSystem.Moves.Fairy
Me.AIField3 = AIField.CanRaiseSpeed
End Sub
Public Overrides Sub PreAttack(Own As Boolean, BattleScreen As BattleScreen)
Dim Geomancy As Integer = BattleScreen.FieldEffects.OwnGeomancy
If Own = False Then
Geomancy = BattleScreen.FieldEffects.OppGeomancy
End If
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
If Geomancy = 0 Then
Me.FocusOppPokemon = False
Else
Me.FocusOppPokemon = True
End If
BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Special Attack", 2, "", "move:geomancy")
BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Special Defense", 2, "", "move:geomancy")
BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Speed", 2, "", "move:geomancy")
End Sub
Public Overrides Function MoveFailBeforeAttack(Own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
If Own = False Then
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
End If
Dim hasToCharge As Boolean = True
Dim beam As Integer = BattleScreen.FieldEffects.OwnGeomancy
Dim geomancy As Integer = BattleScreen.FieldEffects.OwnGeomancyCounter
If Own = False Then
beam = BattleScreen.FieldEffects.OppGeomancy
geomancy = BattleScreen.FieldEffects.OppGeomancyCounter
End If
If beam = 0 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is absorbing power!"))
Else
hasToCharge = False
End If
If hasToCharge = True Then
If Not p.Item Is Nothing Then
If p.Item.Name.ToLower() = "power herb" And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
If BattleScreen.Battle.RemoveHeldItem(Own, Own, BattleScreen, "Power Herb pushed the use of Geomancy!", "move:geomancy") = True Then
hasToCharge = False
End If
If Not p.Item Is Nothing Then
If p.Item.Name.ToLower() = "power herb" And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
If BattleScreen.Battle.RemoveHeldItem(Own, Own, BattleScreen, "Power Herb pushed the use of Geomancy!", "move:geomancy") = True Then
geomancy = 1
End If
End If
End If
If hasToCharge = True Then
If geomancy = 0 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is absorbing power!"))
If Own = True Then
BattleScreen.FieldEffects.OwnGeomancy = 1
BattleScreen.FieldEffects.OwnGeomancyCounter = 1
Else
BattleScreen.FieldEffects.OppGeomancy = 1
BattleScreen.FieldEffects.OppGeomancyCounter = 1
End If
Return True
Else
If Own = True Then
BattleScreen.FieldEffects.OwnGeomancy = 0
BattleScreen.FieldEffects.OwnGeomancyCounter = 0
Else
BattleScreen.FieldEffects.OppGeomancy = 0
BattleScreen.FieldEffects.OppGeomancyCounter = 0
End If
Return False
End If
End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnGeomancy = 0
BattleScreen.FieldEffects.OwnGeomancyCounter = 0
Else
BattleScreen.FieldEffects.OppGeomancy = 0
BattleScreen.FieldEffects.OppGeomancyCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim geomancy As Integer = BattleScreen.FieldEffects.OwnGeomancy
Dim geomancy As Integer = BattleScreen.FieldEffects.OwnGeomancyCounter
If own = False Then
geomancy = BattleScreen.FieldEffects.OppGeomancy
geomancy = BattleScreen.FieldEffects.OppGeomancyCounter
End If
If Geomancy = 0 Then
If geomancy = 0 Then
Return False
Else
Return True
@ -138,33 +123,12 @@ Namespace BattleSystem.Moves.Fairy
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnGeomancy = 0
BattleScreen.FieldEffects.OwnGeomancyCounter = 0
Else
BattleScreen.FieldEffects.OppGeomancy = 0
BattleScreen.FieldEffects.OppGeomancyCounter = 0
End If
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim b As Boolean = BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Special Attack", 2, "", "move:geomancy")
Dim d As Boolean = BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Special Defense", 2, "", "move:geomancy")
Dim f As Boolean = BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Speed", 2, "", "move:geomancy")
If b = False And d = False And f = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
@ -180,7 +144,6 @@ Namespace BattleSystem.Moves.Fairy
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -18,7 +18,7 @@
Me.Name = "Rock Smash"
Me.Description = "The user attacks with a punch that can shatter a rock. It may also lower the target's Defense stat."
Me.CriticalChance = 1
Me.IsHMMove = True
Me.IsHMMove = False
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1

View File

@ -53,11 +53,8 @@
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim b As Boolean = BattleScreen.Battle.LowerStat(own, own, BattleScreen, "Defense", 1, "", "move:dragonascent")
Dim d As Boolean = BattleScreen.Battle.LowerStat(own, own, BattleScreen, "Special Defense", 1, "", "move:dragonascent")
If b = False And d = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
BattleScreen.Battle.LowerStat(own, own, BattleScreen, "Defense", 1, "", "move:dragonascent")
BattleScreen.Battle.LowerStat(own, own, BattleScreen, "Special Defense", 1, "", "move:dragonascent")
End Sub
End Class

View File

@ -56,11 +56,8 @@
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim b As Boolean = BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Attack", 1, "", "move:tearfullook")
Dim d As Boolean = BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Special Attack", 1, "", "move:tearfullook")
If b = False AndAlso DisabledWhileGravity = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Attack", 1, "", "move:tearfullook")
BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Special Attack", 1, "", "move:tearfullook")
End Sub
End Class

View File

@ -512,7 +512,7 @@
Canvas.DrawRectangle(New Rectangle(DeltaX + 700, DeltaY + 76 + 32 * 2, 350, 32), New Color(0, 0, 0, CInt(100 * _interfaceFade * _pageFade * _moveFade)))
Canvas.DrawRectangle(New Rectangle(DeltaX + 700, DeltaY + 76 + 32 * 3, 350, 32), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade * _moveFade)))
Canvas.DrawRectangle(New Rectangle(DeltaX + 700, DeltaY + 76 + 32 * 4, 350, 32), New Color(0, 0, 0, CInt(100 * _interfaceFade * _pageFade * _moveFade)))
Canvas.DrawRectangle(New Rectangle(DeltaX + 700, DeltaY + 76 + 32 * 5, 350, 128), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade * _moveFade)))
Canvas.DrawRectangle(New Rectangle(DeltaX + 700, DeltaY + 76 + 32 * 5, 350, 160), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade * _moveFade)))
'Type:
SpriteBatch.DrawString(FontManager.ChatFont, "Type:", New Vector2(DeltaX + 710, DeltaY + 80), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade)))
@ -543,7 +543,7 @@
SpriteBatch.DrawString(FontManager.ChatFont, accuracy, New Vector2(DeltaX + 824, DeltaY + 208), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade * _moveFade)))
'Description:
SpriteBatch.DrawString(FontManager.ChatFont, .Attacks(_moveIndex).Description.CropStringToWidth(FontManager.ChatFont, 300), New Vector2(DeltaX + 720, DeltaY + 240), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade * _moveFade)))
SpriteBatch.DrawString(FontManager.ChatFont, .Attacks(_moveIndex).Description.CropStringToWidth(FontManager.ChatFont, 300), New Vector2(DeltaX + 720, DeltaY + 240), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade * _moveFade)), 0.0F, New Vector2(0), 1.0F, SpriteEffects.None, 0.0F)
End With
End Sub

Binary file not shown.