NB: In order for the both Q.dance and Coil effect to works, make sure in PGE attack editor, you set the accuracy to '100', base power to '0', target to 'user', and just for safety reason, effct accuracy to '100'
You're completely right. After some research I found out that you can modify this code to ignore the chance of effect in PGE. The modified code is:
The bolded bytes were previously 15. 16 ignores chance of effects and it will always raise sp. atk, sp. def and speed even if chance is set to 0 in PGE. Thx for pointing this out. Certainly the first code will work correctly if chance is set to 100.
Edit: Jambo51 have already found out about effect of 16 (see post #26) so basically it's his idea.