>>25088321Here is a breakdown of how moves are laid out in pokecrystal:
>battle/moves/moves.asmDefinitions for each move. The macro at the top of the file more or less explains what they mean. What you're interested in is the EFFECT_ constants. Those are in constants/battle_constants.asm. It's just a list of constants that maps to the list of move effects. That's in battle/moves/move_effects_pointers.asm.
>battle/moves/move_effects.asmThis is where all the move effects are. Most of the labels (Pound: KarateChop: etc) are just there for show. The ones that do matter are the ones that you can find in the list from before (like NormalHit:). You will want to reference the new move effect later.
The commands are pretty much cut and paste. Seriously, paste it to make a new block (it doesn't matter where). In particular, look at BatonPass and NormalHit. You can probably just copy the NormalHit commands, and shoehorn a "batonpass" command in there at the right place.
This will act like Baton Pass, which you don't quite want. At this point, you'll want to make sure the move works before experimenting with it.
So how do we get it to work? You want to do the following:
>Add EFFECT_U_TURN to the list of constants.>For the sake of explanation, replacing an existing move is simpler. Adding a new one isn't hard, but there's more gruntwork. So just change the effect of the move you're replacing to EFFECT_U_TURN.>Now EFFECT_U_TURN needs to map to something. Go to move_effects_pointers.asm, and put "dw UTurn" at the bottom.>What does UTurn mean? Nothing yet. To tell the game what it is, you go back to the move effect commands you just made, and put "UTurn:" at the top.That might have sounded complicated, but you don't have to do much. Pic related.