From c40d4cc029490b7c9f015f693c90af0585b48778 Mon Sep 17 00:00:00 2001 From: Capt_Segis Date: Mon, 12 Sep 2016 13:20:13 -0500 Subject: [PATCH] Fixed Leech Seed Fixed conditions and copied the lines that take account MaxHP into the OppPokemon being seeded side. --- .../2.5DHero/Battle/BattleSystemV2/Battle.vb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb b/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb index 64a9a5e4b..417a94078 100644 --- a/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb +++ b/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb @@ -4146,12 +4146,12 @@ endthisround: End If End If - If .FieldEffects.OwnLeechSeed > 0 Then 'LeechSeed + If .FieldEffects.OwnLeechSeed > 0 Then 'LeechSeed (Own pokemon seeded) If .OwnPokemon.HP > 0 And .OppPokemon.HP > 0 And .OppPokemon.HP < .OppPokemon.MaxHP Then Dim loseHP As Integer = CInt(Math.Ceiling( .OwnPokemon.MaxHP / 8)) Dim currHP As Integer = .OwnPokemon.HP - If loseHP > currHP + If loseHP > currHP Then loseHP = currHP End If @@ -4858,11 +4858,15 @@ endthisround: End If End If - If .FieldEffects.OppLeechSeed > 0 Then 'LeechSeed - If .OppPokemon.HP > 0 And .OwnPokemon.HP > 0 And .OwnPokemon.HP < .OppPokemon.MaxHP Then - Dim loseHP As Integer = CInt(Math.Ceiling( .OppPokemon.HP / 8)) - - Dim addHP As Integer = loseHP + If .FieldEffects.OppLeechSeed > 0 Then 'LeechSeed (opponent seeded) + If .OppPokemon.HP > 0 And .OwnPokemon.HP > 0 And .OwnPokemon.HP < .OwnPokemon.MaxHP Then + Dim loseHP As Integer = CInt(Math.Ceiling( .OppPokemon.MaxHP / 8)) + Dim currHP As Integer = .OppPokemon.HP + + If loseHP > currHP Then + loseHP = currHP + End If + If Not .OwnPokemon.Item Is Nothing Then If .OwnPokemon.Item.Name.ToLower() = "big root" And .FieldEffects.CanUseItem(True) = True And .FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then addHP += CInt(Math.Ceiling(addHP * (30 / 100)))