From 9a03b25755aa2d11740c000c874e93e1aab75269 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 18 Jun 2022 21:13:30 +0100 Subject: [PATCH] Fixed using Pursuit against a switcher preventing using the next move --- .../001_Battle/010_Battle_AttackPhase.rb | 4 +- .../002_Battler/002_Battler_Initialize.rb | 1 - .../002_Battler/007_Battler_UseMove.rb | 8 - .../006_Other battle code/001_PBEffects.rb | 145 +++++++++--------- .../006_Debug_BattleExtraCode.rb | 1 - 5 files changed, 73 insertions(+), 86 deletions(-) diff --git a/Data/Scripts/011_Battle/001_Battle/010_Battle_AttackPhase.rb b/Data/Scripts/011_Battle/001_Battle/010_Battle_AttackPhase.rb index 27a265dfd..e76b6dbb5 100644 --- a/Data/Scripts/011_Battle/001_Battle/010_Battle_AttackPhase.rb +++ b/Data/Scripts/011_Battle/001_Battle/010_Battle_AttackPhase.rb @@ -39,9 +39,7 @@ class Battle end # Use Pursuit @choices[b.index][3] = idxSwitcher # Change Pursuit's target - if b.pbProcessTurn(@choices[b.index], false) - b.effects[PBEffects::Pursuit] = true - end + b.pbProcessTurn(@choices[b.index], false) break if @decision > 0 || @battlers[idxSwitcher].fainted? end @switching = false diff --git a/Data/Scripts/011_Battle/002_Battler/002_Battler_Initialize.rb b/Data/Scripts/011_Battle/002_Battler/002_Battler_Initialize.rb index 53ae3b327..6d31cece1 100644 --- a/Data/Scripts/011_Battle/002_Battler/002_Battler_Initialize.rb +++ b/Data/Scripts/011_Battle/002_Battler/002_Battler_Initialize.rb @@ -236,7 +236,6 @@ class Battle::Battler @effects[PBEffects::PriorityItem] = false @effects[PBEffects::Protect] = false @effects[PBEffects::ProtectRate] = 1 - @effects[PBEffects::Pursuit] = false @effects[PBEffects::Quash] = 0 @effects[PBEffects::Rage] = false @effects[PBEffects::RagePowder] = false diff --git a/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb b/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb index d73705479..7c0b2a5bc 100644 --- a/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb +++ b/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb @@ -46,14 +46,6 @@ class Battle::Battler pbEndTurn(choice) return false end - # Turn is skipped if Pursuit was used during switch - if @effects[PBEffects::Pursuit] - @effects[PBEffects::Pursuit] = false - pbCancelMoves - pbEndTurn(choice) - @battle.pbJudge - return false - end # Use the move PBDebug.log("[Move usage] #{pbThis} started using #{choice[2].name}") PBDebug.logonerr { diff --git a/Data/Scripts/011_Battle/006_Other battle code/001_PBEffects.rb b/Data/Scripts/011_Battle/006_Other battle code/001_PBEffects.rb index 213d6070d..24b6ca216 100644 --- a/Data/Scripts/011_Battle/006_Other battle code/001_PBEffects.rb +++ b/Data/Scripts/011_Battle/006_Other battle code/001_PBEffects.rb @@ -47,79 +47,78 @@ module PBEffects Ingrain = 42 Instruct = 43 Instructed = 44 - JawLock = 994 - KingsShield = 45 - LaserFocus = 46 - LeechSeed = 47 - LockOn = 48 - LockOnPos = 49 - MagicBounce = 50 - MagicCoat = 51 - MagnetRise = 52 - MeanLook = 53 - MeFirst = 54 - Metronome = 55 - MicleBerry = 56 - Minimize = 57 - MiracleEye = 58 - MirrorCoat = 59 - MirrorCoatTarget = 60 - MoveNext = 61 - MudSport = 62 - Nightmare = 63 - NoRetreat = 990 - Obstruct = 992 - Octolock = 993 - Outrage = 64 - ParentalBond = 65 - PerishSong = 66 - PerishSongUser = 67 - PickupItem = 68 - PickupUse = 69 - Pinch = 70 # Battle Palace only - Powder = 71 - PowerTrick = 72 - Prankster = 73 - PriorityAbility = 74 - PriorityItem = 75 - Protect = 76 - ProtectRate = 77 - Pursuit = 78 - Quash = 79 - Rage = 80 - RagePowder = 81 # Used along with FollowMe - Rollout = 82 - Roost = 83 - ShellTrap = 84 - SkyDrop = 85 - SlowStart = 86 - SmackDown = 87 - Snatch = 88 - SpikyShield = 89 - Spotlight = 90 - Stockpile = 91 - StockpileDef = 92 - StockpileSpDef = 93 - Substitute = 94 - TarShot = 991 - Taunt = 95 - Telekinesis = 96 - ThroatChop = 97 - Torment = 98 - Toxic = 99 - Transform = 100 - TransformSpecies = 101 - Trapping = 102 # Trapping move - TrappingMove = 103 - TrappingUser = 104 - Truant = 105 - TwoTurnAttack = 106 - Type3 = 107 - Unburden = 108 - Uproar = 109 - WaterSport = 110 - WeightChange = 111 - Yawn = 112 + JawLock = 45 + KingsShield = 46 + LaserFocus = 47 + LeechSeed = 48 + LockOn = 49 + LockOnPos = 50 + MagicBounce = 51 + MagicCoat = 52 + MagnetRise = 53 + MeanLook = 54 + MeFirst = 55 + Metronome = 56 + MicleBerry = 57 + Minimize = 58 + MiracleEye = 59 + MirrorCoat = 60 + MirrorCoatTarget = 61 + MoveNext = 62 + MudSport = 63 + Nightmare = 64 + NoRetreat = 65 + Obstruct = 66 + Octolock = 67 + Outrage = 68 + ParentalBond = 69 + PerishSong = 70 + PerishSongUser = 71 + PickupItem = 72 + PickupUse = 73 + Pinch = 74 # Battle Palace only + Powder = 75 + PowerTrick = 76 + Prankster = 77 + PriorityAbility = 78 + PriorityItem = 79 + Protect = 80 + ProtectRate = 81 + Quash = 82 + Rage = 83 + RagePowder = 84 # Used along with FollowMe + Rollout = 85 + Roost = 86 + ShellTrap = 87 + SkyDrop = 88 + SlowStart = 89 + SmackDown = 90 + Snatch = 91 + SpikyShield = 92 + Spotlight = 93 + Stockpile = 94 + StockpileDef = 95 + StockpileSpDef = 96 + Substitute = 97 + TarShot = 98 + Taunt = 99 + Telekinesis = 100 + ThroatChop = 101 + Torment = 102 + Toxic = 103 + Transform = 104 + TransformSpecies = 105 + Trapping = 106 # Trapping move + TrappingMove = 107 + TrappingUser = 108 + Truant = 109 + TwoTurnAttack = 110 + Type3 = 111 + Unburden = 112 + Uproar = 113 + WaterSport = 114 + WeightChange = 115 + Yawn = 116 #============================================================================= # These effects apply to a battler position diff --git a/Data/Scripts/020_Debug/003_Debug menus/006_Debug_BattleExtraCode.rb b/Data/Scripts/020_Debug/003_Debug menus/006_Debug_BattleExtraCode.rb index b63a8eeae..6f31f8283 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/006_Debug_BattleExtraCode.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/006_Debug_BattleExtraCode.rb @@ -86,7 +86,6 @@ module Battle::DebugVariables # PBEffects::PriorityItem - not suitable for setting via debug PBEffects::Protect => { name: "Protect applies this round", default: false }, PBEffects::ProtectRate => { name: "Protect success chance 1/x", default: 1, max: 999 }, -# PBEffects::Pursuit - not suitable for setting via debug # PBEffects::Quash - not suitable for setting via debug # PBEffects::Rage - only applies to use of specific move, not suitable for setting via debug PBEffects::Rollout => { name: "Rollout rounds remaining (lower=stronger)", default: 0 },