From 736c2e067dd36f0a7cde94a04668175f4e8d65fd Mon Sep 17 00:00:00 2001 From: Capt_Segis Date: Mon, 12 Sep 2016 15:02:47 -0500 Subject: [PATCH] Attempt2 to StickyWeb on Battle.vb Implemented sticky web on opposing pokemon. --- .../2.5DHero/Battle/BattleSystemV2/Battle.vb | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb b/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb index 1d0035396..810d83ba9 100644 --- a/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb +++ b/2.5DHero/2.5DHero/Battle/BattleSystemV2/Battle.vb @@ -5522,11 +5522,11 @@ endthisround: Dim spikeDamage As Double = 1D Select Case .FieldEffects.OppSpikes Case 1 - spikeDamage = p.MaxHP / 8 + spikeDamage = (p.MaxHP / 100) * 12.5D Case 2 - spikeDamage = p.MaxHP / 6 + spikeDamage = (p.MaxHP / 100) * 16.7D Case 3 - spikeDamage = p.MaxHP / 4 + spikeDamage = (p.MaxHP / 100) * 25D End Select ReduceHP(CInt(spikeDamage), True, False, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes") End If @@ -5536,7 +5536,7 @@ endthisround: If spikeAffected = True Then If .FieldEffects.OppStickyWeb > 0 Then - LowerStat(True, True, BattleScreen, "Speed", 1, "Sticky web lowered its speed.", "sticky web") + LowerStat(True, True, BattleScreen, "Speed", 1, "Your pokemon was caught in a sticky web!", "sticky web") End If @@ -5946,16 +5946,24 @@ endthisround: Dim spikeDamage As Double = 1D Select Case .FieldEffects.OppSpikes Case 1 - spikeDamage = p.MaxHP / 8 + spikeDamage = (p.MaxHP / 100) * 12.5D Case 2 - spikeDamage = p.MaxHP / 6 + spikeDamage = (p.MaxHP / 100) * 16.7D Case 3 - spikeDamage = p.MaxHP / 4 + spikeDamage = (p.MaxHP / 100) * 25D End Select ReduceHP(CInt(spikeDamage), False, True, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes") End If End If + 'Sticky Web + If spikeAffected = True Then + If .FieldEffects.OwnStickyWeb > 0 Then + + LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing pokemon was caught in a sticky web!", "sticky web") + + End If + End If If spikeAffected = True Then If .FieldEffects.OwnToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And p.Type2.Type <> Element.Types.Poison Then Select Case .FieldEffects.OwnToxicSpikes