Closed M1CR0H4CK3R closed 2 years ago
I'm so dumb. I missed the { |b| numFainted += 1 if b.damageState.fainted }
in the literal next line after setting it to 0. I am exhausted after doing grocery shopping, so I missed reading a line. Still, I'm getting reports from my playtesters that it doesn't trigger for them. I tested in stock v19.1, and can confirm it does not trigger.
I've just tried it in the latest dev version, and the special Greninja does turn into Ash-Greninja when it makes another Pokémon faint. This code is identical in both the dev version and v19.1, and I don't recall any complaints about it not working.
Consider all the requirements. The Pokémon has to be form 1 Greninja (not transformed into one), it has to have Battle Bond, and it has to personally make at least one other Pokémon faint because of a move, and it doesn't happen at the end of a battle. My best guess is that you've missed something in your game, or the playtesters aren't doing things properly.
Would an Ability Patch throw off the Ability? The Greninja being tested was not originally a Battle Bond Greninja.
If it means the Pokémon doesn't meet the criteria of being a form 1 Greninja with Battle Bond, then yes. Form 1 Greninja only has one possible ability, so Ability Patch wouldn't work on it, meaning the Pokémon being tested probably wasn't form 1.
What exactly do you mean by 'Form 1'? Are you saying that, other than regular Greninja and Ash-Greninja, there's a 'special' form that I don't know about? Are you saying there's a Form, 0, 1, and 2?
If so, then that's probabl;y my issue.
Does a Protean Frogadier evolve into a Form 1 Greninja?
Just checked, and the answer is no, seemingly. Can I make it so that Froakie and Frogadier have an Ability 1 of Battle Bond, and make it so that BB Frogadier automatically becomes Form 1 Greninja? If so, where is the relevant code where I can do that?
Form 0 is the standard form. Form 1 is naturally unobtainable, and is different to form 0 in that it can only have Battle Bond as an ability. Form 2 is Ash-Greninja, which reverts to form 1 at the end of the battle. Form 0 cannot access Battle Bond.
The player needs to be specially given a form 1 Greninja (which has Battle Bond). It sounds like you haven't. It also sounds like this isn't a bug in Essentials, so I'm closing this.
The below text is the relevant code:
I'm no expert at reading code, but I think it's weird that the code first sets
numFainted
to 0, then, within another if statement nested right after that, saysif numFainted>0 && user.form==1
. This means thatnumFainted
will never be more than 0, making Battle Bond never trigger. Possibly needs rewritten without being nested. Maruno, can you please post a working version of this code in the comments here so I can update it in my game? Thanks.