Today's project requires me to write a robot to cover large-scale testing.
First, you must understand most of the client's behavior:
1. login logout
2. addbattle
3. mobile: the real client uses a joystick to control the movement. It only sends a message to the server. After receiving the message from the server, the client moves the message at a constant speed based on originpos and targetpos; the key is how to imitate players' behaviors relatively realistically. For example, players can move, release skills, and perform automatic attacks in combat scenarios. They are completely random, but they also have directionality, for example, if you rush to a local hero or soldier, or even a neutral NPC, you can escape the attack in time. Of course, you can also have a strong purpose, such as going straight to the target base of the other party and going straight to a target, AI can be set in the script.
Therefore, we are prepared to put the implementation on C ++ and the policy on Lua script implementation.
4. when a hero responds correctly in various States, as long as the server has no command, AI is required to perform operations. The server command can interrupt the current State at any time, of course, AI can interrupt the specified behavior of some servers. in short, various situations are very complicated.