Counter fails against missed OHKO moves Belly Drum ??? under 50% HP Present is fixed Dragon Scale/Fang is fixed (in GSC Scale erroneously boosts, but in Stadium 2 Fang does) No rollover with Thick Club/Light Ball (also maxes at 999. In the cartridge games 255 attack was ideal which would end up being 1020 with Swords Dance) Anything else? These should be easy to fix cause I don't remember there being a whole lot there.
This commit fixed the Thick Club/Light Ball rollover. Counter and Belly Drum are already done. Present might be a bit harder to fix, but I will look into it. Dragon Scale/Fang should be easy to fix, I will do it today or tomorrow
Does anyone know how the rollover glitch is fixed in Stadium 2? In Crystal (in-game/overworld only of course) it still performs the stat scaling, it just doesn't stop the first time around if it needs to continue: i.e. 1. is either stat greater than 255? 2. if yes divide both by 4 and go back to step 1 3. if no then stop and fit the result into an 8-bit integer/char. It could be something else altogether even such as larger numeric types possibly being available.
I don't have some kind of decompilation to work off of, but from my experimentation using some hacked max DV/stat exp level 100 Pokemon, what I got was: 2P Blissey: Barrier 1P Marowak: Belly Drum 2P Blissey: Recover 1P Marowak: Spike Cannon 124-124 (465/713 HP) 2P Blissey: Recover (713/713 HP) 1P Marowak: Spike Cannon 131-141-131-143 (167/713 HP) 2P Blissey: Recover (523/713 HP) 1P Marowak: Spike Cannon 255 critical-140-122 (6/713 HP) It appears to be in the damage range of double 999 Attack. So at least for a solid approximation, calculate Attack stat without Thick Club, apply cap, then double something (base power, Attack stat?) or halve defense of opponent. It doesn't double the damage directly. If it did there wouldn't be odd numbers. This is fairly big because with a Belly Drum it can kill basically anything. Also, after the Belly Drum, I confused the Marowak, and it only took off 107 damage when hurt from confusion, which is consistent with 999/318 and no doubling of attack. If you'd like me to test specific things I can, but I think it's pretty clear that we are looking at something quite different from the cartridge games. PS: After checking the damage formula, my guess here is that Thick Club inserts a 2 (or on a more technical level, *200/100) into the damage formula in the item boost part in the damage formula, where power up items would cause *110/100. It make the most intuitive sense, and avoids any sort of overflows. It also coincides with my collected data, giving Spike Cannon a range of 122-144, while my small sample size ranged from 122-143. +6 Marowak would be able to do up to 334 damage against Skarmory when rolling a 255 (it can roll from 217 to 255). A 1 in 39 chance of OHKOing Skarmory with Rock Slide, if it hits without a critical. +6 Pikachu would be able to do OHKO Snorlax 32 out of 39 times with Thunderbolt and all the time with Thunder. However, it would fall short of ever being able to OHKO Blissey.
It'd probably be best to just get someone to look at a disassembly tbh, as there are a lot of things they could have done to avoid overflow. They could have fixed it like they did in Crystal. They could have moved the multiplier. They could even have done nothing at all and avoided the overflow entirely due to possibly larger int types. They could also boost damage directly provided it does this prior to damage variance, which would allow for both even and odd values.
Submitted fix for the Present bug (or rather, implemented the glitch). The implementation is a bit complicated, I hope that it won't break anything else. Unfortunately it is pretty hard to test whether it works as it should.