Fixed Roar

- Made the Switch-in be random (and not the same pokemon)
- Fixed interaction with Substitute
- Fixed Ghost Types being immune to Roar
This commit is contained in:
Capt_Segis 2016-09-16 22:09:31 -05:00 committed by GitHub
parent d0c14a1dc1
commit 70a924ab0f

View File

@ -35,7 +35,7 @@
Me.DisabledWhileGravity = False
Me.UseEffectiveness = False
Me.ImmunityAffected = True
Me.ImmunityAffected = False
Me.HasSecondaryEffect = False
Me.RemovesFrozen = False
@ -46,7 +46,7 @@
Me.IsProtectMove = False
Me.IsSoundMove = False
Me.IsAffectedBySubstitute = True
Me.IsAffectedBySubstitute = False
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = False
Me.UseAccEvasion = False
@ -72,13 +72,21 @@
'trainer battle
If own = True Then
If BattleScreen.Trainer.CountUseablePokemon > 1 Then
BattleScreen.Battle.SwitchOutOpp(BattleScreen, -1, "")
Dim i As Integer = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count)
While BattleScreen.Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OppPokemonIndex = i OrElse BattleScreen.Trainer.Pokemons(i).HP <= 0
i = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count)
End While
BattleScreen.Battle.SwitchOutOpp(BattleScreen, i, "")
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If
Else
If Core.Player.CountFightablePokemon > 1 Then
BattleScreen.Battle.SwitchOutOwn(BattleScreen, -1, -1)
Dim i As Integer = Core.Random.Next(0, Core.Player.Pokemons.Count)
While Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OwnPokemonIndex = i OrElse Core.Player.Pokemons(i).HP <= 0
i = Core.Random.Next(0, Core.Player.Pokemons.Count)
End While
BattleScreen.Battle.SwitchOutOwn(BattleScreen, i, -1)
Else
BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))
End If