Hi there again. Three new questions
1) What does the total stat do inside the monster setup stat array?
2) Can a move have multiple special effects? Example Dragon Dance, raise Atk and Speed?
3) Where is the stat increases upon level up dictated?
1) Stat total is the actual total stat distribution for the monster; the values inputted for the individual stats are scaled up so that their sum will equal this value. (This means you don't need to do the math to ensure all monsters of a particular tier are balanced, and the values for each stat only need to make sense relative to each other).
2) Not currently. There's a couple of ways to fix this, I think the easiest would be to rework how special effects work: currently, it's an array that must have 4 fields (or be empty) and they're unpacked into 4 separate scalar fields in the move data structure in init_move. (Chance, type, detail and severity). But you could just store the special effects array as-is when initializing the move; this lets you have as many fields in the array as you want. Specifically, you'd wanna have zero or more sub-arrays, each of which is a 4-element array with the same data special effects have now. When applying side effects (obj_battlecontrol's Step event, after the two comments "Side effects (target)" and "Side effects (user)", you'd loop over the outer of these nested arrays, and do the side-effect checks that currently exist for each element in that array (which would be a chance-type-detail-severity tuple). So for instance Dragon Dance would have the data
[ [100,movespfx_BUFF,stat_ATK,1], [100,movespfx_BUFF,stat_SPD,1] ]
And to reiterate, this is an array with two elements; they just so happen to both be arrays with 4 elements.
3) Stats are always computed from the base stats, IVs, EVs and the monster's level. The final stats aren't stored anywhere, and stat points aren't added at any time. Check out monster_get_stat and the scripts it calls for the details.
There is not; I think it would be pretty easy to implement though. Make a new "drain" side effect that applies to the target. When computing target side effects you already have access to the dmgdata variable (which among other things contains the actual damage dealt to the current target prior to applying side effects), and a_user, the battlemonster instance using the move, so it's pretty simple to apply a heal to the move's user using this information.
IV and EV data are stored in the AMP data for that monster (AMP = Active Monster Party, the monster individuals that are in your / the enemy's party, contrasted to the general notion of each species). So, held for each mon.
They work a bit differently in this engine, both to make them legally distinct and make monster stats grow faster so you don't need to grind levels to beat the demo. If you wanna make them more Pokémon-like, all the stat calculations are in the stat-computing scripts we talked about a couple days ago - just change them there and it will affect all the monster stats in the game.