- 40
- Posts
- 4
- Years
- Seen Jan 13, 2022
I am planning a game where the player joins Team Rocket and obtains a uniform for the team, setting their outfit to 1.
I want to make two things only accessible to this outfit: stealing Pokemon from NPC Trainers, and jumping up ledges that you normally can only jump down.
Any help is appreciated, and I think I am already slowly figuring out the theft aspect. I will provide the code I have for the theft aspect so far, and you can point out what I did wrong.
NOTE: It is all positioned correctly in the scripts.
I want to make two things only accessible to this outfit: stealing Pokemon from NPC Trainers, and jumping up ledges that you normally can only jump down.
Any help is appreciated, and I think I am already slowly figuring out the theft aspect. I will provide the code I have for the theft aspect so far, and you can point out what I did wrong.
Code:
if trainerBattle? && !pbIsSnagBall?(ball)
@scene.pbThrowAndDeflect(ball,1)
pbDisplay(_INTL("The Trainer blocked your Poké Ball! Don't be a thief!"))
return
end
if trainerBattle? && (pbIsSnagBall?(ball) && $Trainer.outfit=1)
idxTarget = idxBattler
idxBattler = idxBattler.index if idxBattler.respond_to?("index")
pkmn = battler.pokemon
@criticalCapture = false
numShakes = pbCaptureCalc(pkmn,battler,rareness,ball)
PBDebug.log("[Threw Poké Ball] #{itemName}, #{numShakes} shakes (4=capture)")
return
end
NOTE: It is all positioned correctly in the scripts.
Last edited: