Updated to Gen 7 Battle Functionality
This commit is contained in:
parent
c19c6d453c
commit
0a721d1045
|
@ -1231,7 +1231,8 @@
|
|||
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is confused!"))
|
||||
If Core.Random.Next(0, 2) = 0 Then
|
||||
'Previously 'If Core.Random.Next(0, 2) = 0 Then' (Updated to gen 7's 33% instead of 50%)
|
||||
If Core.Random.Next(0, 3) = 0 Then
|
||||
Dim a As Attack = New ConfusionAttack()
|
||||
Dim damage As Integer = BattleCalculation.CalculateDamage(a, False, True, True, BattleScreen)
|
||||
ReduceHP(damage, own, own, BattleScreen, p.GetDisplayName() & " hurt itself in confusion.", "confusiondamage")
|
||||
|
@ -2061,7 +2062,7 @@
|
|||
End If
|
||||
Case "weak armor"
|
||||
If moveUsed.Category = Attack.Categories.Physical Then
|
||||
RaiseStat(Not own, Not own, BattleScreen, "Speed", 1, "Weak Armor causes the Speed to increase!", "weakarmor")
|
||||
RaiseStat(Not own, Not own, BattleScreen, "Speed", 2, "Weak Armor causes the Speed to increase!", "weakarmor")
|
||||
LowerStat(Not own, Not own, BattleScreen, "Defense", 1, "Weak Armor causes the Defense to decrease!", "weakarmor")
|
||||
End If
|
||||
Case "pickpocket"
|
||||
|
@ -3725,7 +3726,15 @@
|
|||
If RemoveHeldItem(own, own, BattleScreen, "", "berry:sitrus") = True Then
|
||||
UseBerry(own, from, Item.GetItemByID(ItemID), BattleScreen, message, cause)
|
||||
End If
|
||||
Case "figy"
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If p.HP > 0 And p.HP < CInt(Math.Ceiling(p.MaxHP / 4)) Then
|
||||
If Not p.Item Is Nothing Then
|
||||
If BattleScreen.FieldEffects.CanUseItem(own) = True And BattleScreen.FieldEffects.CanUseOwnItem(own, BattleScreen) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Case "figy"
|
||||
If RemoveHeldItem(own, own, BattleScreen, "", "berry:figy") = True Then
|
||||
UseBerry(own, from, Item.GetItemByID(ItemID), BattleScreen, message, cause)
|
||||
End If
|
||||
|
@ -3745,14 +3754,6 @@
|
|||
If RemoveHeldItem(own, own, BattleScreen, "", "berry:iapapa") = True Then
|
||||
UseBerry(own, from, Item.GetItemByID(ItemID), BattleScreen, message, cause)
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If p.HP > 0 And p.HP < CInt(Math.Ceiling(p.MaxHP / 4)) Then
|
||||
If Not p.Item Is Nothing Then
|
||||
If BattleScreen.FieldEffects.CanUseItem(own) = True And BattleScreen.FieldEffects.CanUseOwnItem(own, BattleScreen) = True Then
|
||||
Select Case p.Item.Name.ToLower()
|
||||
Case "liechi"
|
||||
If RemoveHeldItem(own, own, BattleScreen, "", "berry:liechi") = True Then
|
||||
UseBerry(own, from, Item.GetItemByID(ItemID), BattleScreen, message, cause)
|
||||
|
@ -3813,31 +3814,31 @@
|
|||
Case "sitrus"
|
||||
GainHP(CInt(p.MaxHP / 4), own, own, BattleScreen, "The Sitrus Berry filled up " & p.GetDisplayName() & "'s HP!", "berry:sitrus")
|
||||
Case "figy"
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 8))
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 2))
|
||||
GainHP(healHP, own, own, BattleScreen, "The Figy Berry filled up " & p.GetDisplayName() & "'s HP!", "berry:figy")
|
||||
If berry.PokemonLikes(p) = False Then
|
||||
InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & " disliked the Figy Berry!", "berry:figy")
|
||||
End If
|
||||
Case "wiki"
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 8))
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 2))
|
||||
GainHP(healHP, own, own, BattleScreen, "The Wiki Berry filled up " & p.GetDisplayName() & "'s HP!", "berry:wiki")
|
||||
If berry.PokemonLikes(p) = False Then
|
||||
InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & " disliked the Wiki Berry!", "berry:wiki")
|
||||
End If
|
||||
Case "mago"
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 8))
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 2))
|
||||
GainHP(healHP, own, own, BattleScreen, "The Mago Berry filled up " & p.GetDisplayName() & "'s HP!", "berry:mago")
|
||||
If berry.PokemonLikes(p) = False Then
|
||||
InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & " disliked the Mago Berry!", "mago")
|
||||
End If
|
||||
Case "aguav"
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 8))
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 2))
|
||||
GainHP(healHP, own, own, BattleScreen, "The Aguav Berry filled up " & p.GetDisplayName() & "'s HP!", "berry:aguav")
|
||||
If berry.PokemonLikes(p) = False Then
|
||||
InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & " disliked the Aguav Berry!", "aguav")
|
||||
End If
|
||||
Case "iapapa"
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 8))
|
||||
Dim healHP As Integer = CInt(Math.Ceiling(p.MaxHP / 2))
|
||||
GainHP(healHP, own, own, BattleScreen, "The Iapapa Berry filled up " & p.GetDisplayName() & "'s HP!", "berry:iapapa")
|
||||
If berry.PokemonLikes(p) = False Then
|
||||
InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & " disliked the Iapapa Berry!", "berry:iapapa")
|
||||
|
@ -4901,9 +4902,9 @@
|
|||
If .OwnPokemon.HP > 0 Then 'Burn
|
||||
If .OwnPokemon.Status = Pokemon.StatusProblems.Burn Then
|
||||
If .OwnPokemon.Ability.Name.ToLower() <> "water veil" And .OwnPokemon.Ability.Name.ToLower() <> "magic guard" Then
|
||||
Dim reduceAmount As Integer = CInt(.OwnPokemon.MaxHP / 8)
|
||||
Dim reduceAmount As Integer = CInt(.OwnPokemon.MaxHP / 16)
|
||||
If .OwnPokemon.Ability.Name.ToLower() = "heatproof" Then
|
||||
reduceAmount = CInt(.OwnPokemon.MaxHP / 16)
|
||||
reduceAmount = CInt(.OwnPokemon.MaxHP / 32)
|
||||
End If
|
||||
|
||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\effect_ember", False))
|
||||
|
|
|
@ -75,11 +75,12 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
If ownPokemon.Ability.Name.ToLower() = "gale wings" And ownAttack.Type.Type = Element.Types.Flying Then
|
||||
'Added condition to check for full HP
|
||||
If ownPokemon.Ability.Name.ToLower() = "gale wings" And ownAttack.Type.Type = Element.Types.Flying And p.HP = p.MaxHP Then
|
||||
ownPriority += 1
|
||||
End If
|
||||
|
||||
If oppPokemon.Ability.Name.ToLower() = "gale wings" And oppAttack.Type.Type = Element.Types.Flying Then
|
||||
If oppPokemon.Ability.Name.ToLower() = "gale wings" And oppAttack.Type.Type = Element.Types.Flying And Op.HP = Op.MaxHP Then
|
||||
oppPriority += 1
|
||||
End If
|
||||
|
||||
|
@ -226,7 +227,7 @@
|
|||
End If
|
||||
|
||||
If p.Status = P3D.Pokemon.StatusProblems.Paralyzed And p.Ability.Name.ToLower() <> "quick feet" Then
|
||||
speed = CInt(speed / 4) 'Divide the speed by 4 if the Pokemon is paralyzed.
|
||||
speed = CInt(speed / 2) 'Divide the speed by 2 (gen 7 standards) if the Pokemon is paralyzed.
|
||||
End If
|
||||
|
||||
If Not p.Item Is Nothing Then
|
||||
|
@ -1195,15 +1196,23 @@
|
|||
End If
|
||||
Case "refrigerate"
|
||||
If Attack.Type.Type = Element.Types.Normal Then
|
||||
UA = 1.3F
|
||||
UA = 1.2F
|
||||
End If
|
||||
Case "pixilate"
|
||||
If Attack.Type.Type = Element.Types.Normal Then
|
||||
UA = 1.3F
|
||||
UA = 1.2F
|
||||
End If
|
||||
Case "normalize"
|
||||
If Attack.Type.Type = Element.Types.Normal Then
|
||||
UA = 1.2F
|
||||
End If
|
||||
Case "galvanize"
|
||||
If Attack.Type.Type = Element.Types.Normal Then
|
||||
UA = 1.2F
|
||||
End If
|
||||
Case "aerilate"
|
||||
If Attack.Type.Type = Element.Types.Normal Then
|
||||
UA = 1.3F
|
||||
UA = 1.2F
|
||||
End If
|
||||
Case "mega launcher"
|
||||
If Attack.IsPulseMove = True Then
|
||||
|
@ -1382,6 +1391,7 @@
|
|||
If p.Number = 25 Then
|
||||
IM = 2.0F
|
||||
End If
|
||||
'Soul Dew now boosts Lati@s Psychic & Dragon moves by 20% instead of Sp. Atk, this will have to be changed
|
||||
Case "soul dew"
|
||||
If p.Number = 380 Or p.Number = 381 Then
|
||||
IM = 1.5F
|
||||
|
@ -1493,6 +1503,7 @@
|
|||
|
||||
If Not Op.Item Is Nothing And BattleScreen.FieldEffects.CanUseItem(Not Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Not Own, BattleScreen) = True Then
|
||||
Select Case Op.Item.Name.ToLower()
|
||||
'Soul Dew now boosts Lati@s Psychic & Dragon moves by 20% instead of Sp. Atk, this will have to be changed
|
||||
Case "soul dew"
|
||||
If Op.Number = 380 Or p.Number = 381 Then
|
||||
DMod = 1.5F
|
||||
|
|
Loading…
Reference in New Issue