Way 1:
Battle/proc/CheckAbility(Pokemon/Pokemon1) {
if(Pokemon1.Ability == AbilityNum("Air Lock")) {
//Do effect there...
}
// Do this for each ability in the world.
}
^ Same code goes for moves.
Way 2:
Attack
Tackle
name = "Tackle";
// Etc, etc.
Use(Pokemon/Ally, Pokemon/Enemy) {
//Do the attack stuff here...
}
Tail_Whip
name = "Tail Whip";
// Etc, etc.
Use(Pokemon/Ally, Pokemon/Enemy) {
//Do the attack stuff here...
}
But i feel that both ways (First one 90% lol) arent' the best one to handle this type of things, even since moves and abilities have priority (I mean some of them occour when match starts, others after a turn ends, other when enemy attacks, etc, etc).
What would be the "best and comprehensive" way to do this type of stuff?
Thanks.
Also, I'd probably pass a third parameter to the Use(), the battle datum that's currently in use (if you implore such a thing)