How would I go about making an ai that attacks and blocks at random times? I already have pathfinding.