From cd98c4907653f30f753e0862f8b4699f43c6d58f Mon Sep 17 00:00:00 2001 From: Capt_Segis Date: Tue, 13 Sep 2016 01:59:43 -0500 Subject: [PATCH] Added FoulPlay condition Takes target's attack stat on account when the used move is Foul Play. --- .../2.5DHero/Battle/BattleSystemV2/BattleCalculation.vb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/2.5DHero/2.5DHero/Battle/BattleSystemV2/BattleCalculation.vb b/2.5DHero/2.5DHero/Battle/BattleSystemV2/BattleCalculation.vb index beb8dc64c..47dc643b7 100644 --- a/2.5DHero/2.5DHero/Battle/BattleSystemV2/BattleCalculation.vb +++ b/2.5DHero/2.5DHero/Battle/BattleSystemV2/BattleCalculation.vb @@ -1159,8 +1159,13 @@ Dim IM As Single = 1.0F If Attack.Category = Attack.Categories.Physical Then - AStat = Attack.GetUseAttackStat(p) - ASM = GetMultiplierFromStat(p.StatAttack) + If Attack.ID = 492 Then + AStat = Attack.GetUseAttackStat(Op) 'When the move is Foul Play + ASM = GetMultiplierFromStat(Op.StatAttack) + Else + AStat = Attack.GetUseAttackStat(p) + ASM = GetMultiplierFromStat(p.StatAttack) + End If If BattleScreen.FieldEffects.CanUseAbility(Not Own, BattleScreen) = True Then If Op.Ability.Name.ToLower() = "unaware" Then