I'm not familiar with Pokemon universe :(
Can somebody please explain Pokemon using Prolog?
For example, you can also switch out (to activate a different pokemon) instead of attacking (switching has priority over attacking, so if you switch out then the opponent's attack will hit your newly active pokemon).
There are also many calculations involved, and it can be helpful to know how most of them work.