From aa33dfccbb8d25913208044bdc7c6ca32d26e206 Mon Sep 17 00:00:00 2001 From: Capt_Segis Date: Mon, 12 Sep 2016 22:10:52 -0500 Subject: [PATCH] Attempt2 to Contrary on Battle.vb Added extra "If" structure intending to prevent creating a "contrary" loop. --- 2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb b/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb index 5d0b87e41..67aba9649 100644 --- a/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb +++ b/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb @@ -2659,9 +2659,9 @@ endthisround: End If If p.Ability.Name.ToLower() = "contrary" And BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) = True Then - Dim val_aux As Integer = val - val = 0 - Return LowerStat(own, own, BattleScreen, Stat, val_aux, message & vbNewLine & "Contrary reverted the stat change!", "contrary") + If cause <> "contrary" Then + Return LowerStat(own, own, BattleScreen, Stat, val, message & vbNewLine & "Contrary reverted the stat change!", "contrary") + End If End If If p.Ability.Name.ToLower() = "simple" Then @@ -2864,9 +2864,9 @@ endthisround: End If If p.Ability.Name.ToLower() = "contrary" And BattleScreen.FieldEffects.CanUseAbility(own, BattleScreen) = True Then - Dim val_aux2 As Integer = val - val = 0 - Return RaiseStat(own, own, BattleScreen, Stat, val_aux2, message & vbNewLine & "Contrary reverted the stat change!", "contrary") + If cause <> "contrary" Then + Return RaiseStat(own, own, BattleScreen, Stat, val, message & vbNewLine & "Contrary reverted the stat change!", "contrary") + End If End If If p.Ability.Name.ToLower() = "simple" Then