mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-23 05:45:52 +02:00
Attempt2 to Contrary on Battle.vb
Added extra "If" structure intending to prevent creating a "contrary" loop.
This commit is contained in:
parent
7bd7a5f773
commit
aa33dfccbb
@ -2659,9 +2659,9 @@ endthisround:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If p.Ability.Name.ToLower() = "contrary" And BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) = True Then
|
If p.Ability.Name.ToLower() = "contrary" And BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) = True Then
|
||||||
Dim val_aux As Integer = val
|
If cause <> "contrary" Then
|
||||||
val = 0
|
Return LowerStat(own, own, BattleScreen, Stat, val, message & vbNewLine & "Contrary reverted the stat change!", "contrary")
|
||||||
Return LowerStat(own, own, BattleScreen, Stat, val_aux, message & vbNewLine & "Contrary reverted the stat change!", "contrary")
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If p.Ability.Name.ToLower() = "simple" Then
|
If p.Ability.Name.ToLower() = "simple" Then
|
||||||
@ -2864,9 +2864,9 @@ endthisround:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If p.Ability.Name.ToLower() = "contrary" And BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) = True Then
|
If p.Ability.Name.ToLower() = "contrary" And BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) = True Then
|
||||||
Dim val_aux2 As Integer = val
|
If cause <> "contrary" Then
|
||||||
val = 0
|
Return RaiseStat(own, own, BattleScreen, Stat, val, message & vbNewLine & "Contrary reverted the stat change!", "contrary")
|
||||||
Return RaiseStat(own, own, BattleScreen, Stat, val_aux2, message & vbNewLine & "Contrary reverted the stat change!", "contrary")
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If p.Ability.Name.ToLower() = "simple" Then
|
If p.Ability.Name.ToLower() = "simple" Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user