Added FoulPlay condition

Takes target's attack stat on account when the used move is Foul Play.
This commit is contained in:
Capt_Segis 2016-09-13 01:59:43 -05:00 committed by GitHub
parent 4077bf3aa7
commit cd98c49076

View File

@ -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