I haven't updated my blog for a long time! On the one hand, I recently made a girlfriend, so my mind is inevitably not in the status; on the other hand, I am also developing specific logic recently. It is difficult to share some summary and other things with you, let's share with you the combat skills that have been tested recently! A new skill system and Combat System Based on secondary development. The previous combat system was too messy to write, and a recursive function + timer was used; it was unable to read in the cluster; it was overturned and re-designed. As I am a newbie in the skill battle field, I am always afraid to dig holes for myself. In addition to java that I am not familiar with, I am always careful in the design or actual coding process!
Let's take a rough look at uml!
This is the design of the original skill version. In actual projects, the parameters are corrected, and an abstract skill class is added between the Skill Class and the skill interface, after all, a lot of skill data can still be extracted! Compared with the previous skill system, I used the factory mode and Strategy Mode here! Benefits of object-oriented!
This is the initial design version of the buff system. Later versions are the same. Many modifications have been made to add a buff abstract class!
This is a combat auxiliary system. It mainly selects attack objects and release skills! The actual version has made many modifications to the parameter!
In the actual development process, many problems have been encountered, such as exception handling. before writing C ++ code, exceptions were rarely used, unless they were database access; in other aspects, we should make enough judgments. It is useless to handle exceptions if the NULL pointer field pointer is used. However, many exception handling functions are compiled during java development!
Several java container classes have also made many mistakes. For example, you should be very careful when using the toArray () function of List! I threw a lot of exceptions on this!
But fortunately, in the end, the Code complexity is still within the controllable range, and we should re-engineer it in the debugging process!