This commit is contained in:
CaptainSegis 2018-12-24 07:31:53 -05:00
commit dd8f4d4192
17 changed files with 106 additions and 22 deletions

View File

@ -3710,12 +3710,12 @@
Me.ChangeCameraAngel(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is damaged by recoil"))
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is damaged by recoil!"))
Case "-1" 'Print no message at all
'Do nothing
Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is damaged by recoil"))
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is damaged by recoil!"))
End Select
ReduceHP(Damage, own, from, BattleScreen, "", "recoildamage")
End If

View File

@ -306,6 +306,86 @@
Return speed
End Function
Public Shared Function DetermineBattleAttack(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Integer
Dim p As Pokemon = BattleScreen.OwnPokemon
If own = False Then
p = BattleScreen.OppPokemon
End If
Dim attack As Integer = CInt(p.Attack * GetMultiplierFromStat(p.StatAttack)) 'Calculate the attack's basic value
If own = True Then
If BattleScreen.IsPVPBattle = False Then
If Core.Player.Badges.Contains(1) = True Then
attack = CInt(attack + (attack * (1 / 8))) 'Add 1/8 of the attack if the player has the 1st badge and it's not a PvP battle
End If
End If
End If
If p.Status = P3D.Pokemon.StatusProblems.Burn And p.Ability.Name.ToLower() <> "guts" Then
attack = CInt(attack / 2)
End If
If Not p.Item Is Nothing Then
If p.Item.Name = "Choice Band" Then
attack = CInt(attack * 1.5F)
End If
If p.Number = 25 Then
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(own) = True Then
If p.Item.Name = "Light Ball" Then
attack *= 2
End If
End If
End If
If p.Number = 104 OrElse p.Number = 105 Then
If Not p.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(own) = True Then
If p.Item.Name = "Thick Club" Then
attack *= 2
End If
End If
End If
End If
Select Case p.Ability.Name.ToLower()
Case "huge power"
attack *= 2
Case "pure power"
attack *= 2
Case "defeatist"
If p.HP / p.MaxHP <= 0.5 Then
attack = CInt(attack / 2)
End If
Case "hustle"
attack = CInt(attack * 1.5F)
Case "flower gift"
If BattleScreen.FieldEffects.Weather = BattleWeather.WeatherTypes.Sunny Then
attack = CInt(attack * 1.5F)
End If
End Select
If p.Ability.Name.ToLower() = "guts" Then
If p.Status = Pokemon.StatusProblems.Paralyzed Or p.Status = Pokemon.StatusProblems.Burn Or p.Status = Pokemon.StatusProblems.Poison Or p.Status = Pokemon.StatusProblems.Sleep Or p.Status = Pokemon.StatusProblems.Freeze Then
attack = CInt(attack * 1.5F)
End If
End If
If p.Ability.Name.ToLower() = "slow start" Then
If own = True Then
If BattleScreen.FieldEffects.OwnTurnCounts < 5 Then
attack = CInt(attack / 2)
End If
Else
If BattleScreen.FieldEffects.OppTurnCounts < 5 Then
attack = CInt(attack / 2)
End If
End If
End If
attack = attack.Clamp(1, 999)
Return attack
End Function
''' <summary>
''' Outcome: 0=true/>1=false:1=sleeptalk/snore 2=other move 3=start sleep 4=X wont obey 5=X wont obey 6=X turned away 7=X is loafing around 8=X pretended to not notice
''' </summary>

View File

@ -52,6 +52,7 @@
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
@ -181,6 +182,7 @@
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -56,7 +56,7 @@ Namespace BattleSystem.Moves.Dragon
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Defense", 1, "", "move:clangingscales")
BattleScreen.Battle.LowerStat(own, own, BattleScreen, "Defense", 1, "", "move:clangingscales")
End Sub
End Class

View File

@ -61,8 +61,8 @@
p = BattleScreen.OppPokemon
End If
Dim dmg As Integer = p.HP
BattleScreen.Battle.ReduceHP(dmg, own, own, BattleScreen, "", "move:finalgambit")
BattleScreen.Battle.ReduceHP(dmg, Not own, own, BattleScreen, "", "move:finalgambit")
BattleScreen.Battle.ReduceHP(p.HP, own, own, BattleScreen, "", "move:finalgambit")
BattleScreen.Battle.ReduceHP(p.HP, Not own, own, BattleScreen, "", "move:finalgambit")
End Sub
End Class

View File

@ -18,7 +18,7 @@
Me.Name = "Ride"
Me.Description = "The user runs over the target rapidly. The power rises when the user's accuracy stat is low."
Me.CriticalChance = 1
Me.IsHMMove = False
Me.IsHMMove = True
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1

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 = False
Me.IsHMMove = True
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1

View File

@ -18,7 +18,7 @@
Me.Name = "Fly"
Me.Description = "The user soars, then strikes its target on the second turn. It can also be used for flying to any familiar town."
Me.CriticalChance = 1
Me.IsHMMove = False
Me.IsHMMove = True
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1

View File

@ -60,7 +60,9 @@
op = BattleScreen.OwnPokemon
End If
Dim heal As Integer = op.StatAttack
Dim op_Attack As Integer = BattleCalculation.DetermineBattleAttack(Not own, BattleScreen)
Dim heal As Integer = op_Attack
Dim b As Boolean = BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Attack", 1, "", "move:strengthsap")
If b = True Then

View File

@ -51,13 +51,13 @@
Me.IsWonderGuardAffected = False
'#End
Me.AIField1 = AIField.LowerDefense
Me.AIField2 = AIField.LowerSpDefense
Me.AIField1 = AIField.LowerAttack
Me.AIField2 = AIField.LowerSpAttack
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim b As Boolean = BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Defense", 1, "", "move:tearfullook")
Dim d As Boolean = BattleScreen.Battle.LowerStat(Not own, own, BattleScreen, "Special Defense", 1, "", "move:tearfullook")
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

View File

@ -57,13 +57,13 @@
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
Dim op As Pokemon = BattleScreen.OppPokemon
Dim p As Pokemon = BattleScreen.OwnPokemon
If own = False Then
op = BattleScreen.OwnPokemon
p = BattleScreen.OppPokemon
End If
If op.Ability.ID = 57 OrElse op.Ability.ID = 58 Then
BattleScreen.Battle.RaiseStat(Not own, own, BattleScreen, "Attack", 1, "", "move:gearup")
BattleScreen.Battle.RaiseStat(Not own, own, BattleScreen, "Special Attack", 1, "", "move:gearup")
If p.Ability.ID = 57 OrElse p.Ability.ID = 58 Then
BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Attack", 1, "", "move:gearup")
BattleScreen.Battle.RaiseStat(own, own, BattleScreen, "Special Attack", 1, "", "move:gearup")
End If
End Sub

View File

@ -18,7 +18,7 @@
Me.Name = "Dive"
Me.Description = "Diving on the first turn, the user floats up and attacks on the next turn."
Me.CriticalChance = 1
Me.IsHMMove = False
Me.IsHMMove = True
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1

View File

@ -18,7 +18,7 @@
Me.Name = "Sparkling Aria"
Me.Description = "The user bursts into song, emitting many bubbles. Any Pokémon suffering from a burn will be healed by the touch of these bubbles."
Me.CriticalChance = 1
Me.IsHMMove = True
Me.IsHMMove = False
Me.Target = Targets.AllAdjacentTargets
Me.Priority = 0
Me.TimesToAttack = 1

View File

@ -18,7 +18,7 @@
Me.Name = "Waterfall"
Me.Description = "The user charges at the target and may make it flinch. It can also be used to climb a waterfall."
Me.CriticalChance = 1
Me.IsHMMove = False
Me.IsHMMove = True
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1

View File

@ -18,7 +18,7 @@ Namespace BattleSystem.Moves.Water
Me.Name = "Whirlpool"
Me.Description = "Traps foes in a violent swirling whirlpool for four to five turns."
Me.CriticalChance = 1
Me.IsHMMove = False
Me.IsHMMove = True
Me.Target = Targets.OneAdjacentTarget
Me.Priority = 0
Me.TimesToAttack = 1