From 8fd32c031b3fa6e766401ca1c2f79b3b273de1b8 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Mon, 2 Sep 2024 16:31:04 +0200 Subject: [PATCH] Made it possible for GameMode moves to flinch --- P3D/Content/Data/Moves/example.dat | Bin 8500 -> 8540 bytes P3D/Pokemon/Attacks/AttackSpecialFunctions.vb | 8 ++++++++ 2 files changed, 8 insertions(+) diff --git a/P3D/Content/Data/Moves/example.dat b/P3D/Content/Data/Moves/example.dat index 6c486f674230bc4c083fd712c261425ef9c877bc..acdad2de10f3f866b1c5a1725bf050463f7280f2 100644 GIT binary patch delta 57 zcmdnubjN9f5g)f3Lk>eGLmopiL&jupG0DjW0wt6E#Mn0P;Y(pem)vY1z#<3$+RhIP delta 21 dcmccPw8d$I5#MGvzITk1-S}EIpAncK003kY2$cW; diff --git a/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb b/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb index 4c08c39ae..437528dda 100644 --- a/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb +++ b/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb @@ -390,6 +390,8 @@ End If Select Case fMain.ToLower() + Case "flinch" + Flinch(Move, own, BattleScreen, CInt(fSub)) Case "randomstatus" Dim chance As Integer = CInt(fSub.GetSplit(0, ",")) Dim withoutBadPoison As Boolean = False @@ -466,6 +468,12 @@ End If End Sub + Private Shared Sub Flinch(ByVal Move As Attack, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Chance As Integer) + If GetEffectChanceResult(Move, Chance) = True Then + BattleScreen.Battle.InflictFlinch(Not own, own, BattleScreen, "", "move:" & Move.Name.ToLower()) + End If + End Sub + Private Shared Sub Paralyze(ByVal Move As Attack, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Chance As Integer) If GetEffectChanceResult(Move, Chance) = True Then If BattleScreen.Battle.InflictParalysis(Not own, own, BattleScreen, "", "move:" & Move.Name.ToLower()) = False Then