CtrlEvent.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation; either version 2, or (at your option)
  5. * any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. * 02111-1307, USA.
  16. *
  17. * http://www.gnu.org/copyleft/gpl.html
  18. */
  19. package net.sf.l2j.gameserver.ai;
  20. /**
  21. * This class contains an enum of each possibles evenements that can happen on an AI character.
  22. */
  23. public enum CtrlEvent {
  24. /** Something has changed, usually a previous step has being completed
  25. * or maybe was completed, the AI must thing on next action
  26. */
  27. EVT_THINK,
  28. /** The actor was attacked. This event comes each time a physical or magical
  29. * attack was done on the actor. NPC may start attack in responce, or ignore
  30. * this event if they already attack someone, or change target and so on.
  31. */
  32. EVT_ATTACKED,
  33. /** Increase/decrease aggression towards a target, or reduce global aggression if target is null */
  34. EVT_AGGRESSION,
  35. /** Actor is in stun state */
  36. EVT_STUNNED,
  37. /** Actor starts/stops sleeping */
  38. EVT_SLEEPING,
  39. /** Actor is in rooted state (cannot move) */
  40. EVT_ROOTED,
  41. /** An event that previous action was completed. The action may be an attempt
  42. * to physically/magically hit an enemy, or an action that discarded
  43. * attack attempt has finished. */
  44. EVT_READY_TO_ACT,
  45. /** User's command, like using a combat magic or changing weapon, etc.
  46. * The command is not intended to change final goal */
  47. EVT_USER_CMD,
  48. /** The actor arrived to assigned location, or it's a time to modify
  49. * movement destination (follow, interact, random move and others intentions). */
  50. EVT_ARRIVED,
  51. /** The actor arrived to an intermidiate point, and needs revalidate destination.
  52. * This is sent when follow/move to pawn if destination is far away. */
  53. EVT_ARRIVED_REVALIDATE,
  54. /** The actor cannot move anymore. */
  55. EVT_ARRIVED_BLOCKED,
  56. /** Forgets an object (if it's used as attack target, follow target and so on */
  57. EVT_FORGET_OBJECT,
  58. /** Attempt to cancel current step execution, but not change the intention.
  59. * For example, the actor was putted into a stun, so it's current attack
  60. * or movement has to be canceled. But after the stun state expired, the
  61. * actor may try to attack again. Another usage for CANCEL is a user's
  62. * attempt to cancel a cast/bow attack and so on.
  63. */
  64. EVT_CANCEL,
  65. /** The character is dead */
  66. EVT_DEAD,
  67. /** The character looks like dead */
  68. EVT_FAKE_DEATH,
  69. /** The character attack anyone randomly **/
  70. EVT_CONFUSED,
  71. /** The character cannot cast spells anymore **/
  72. EVT_MUTED,
  73. /** The character flee in randoms directions **/
  74. EVT_AFFRAID,
  75. /** The character finish casting **/
  76. EVT_FINISH_CASTING,
  77. /** The character betrayed its master */
  78. EVT_BETRAYED
  79. }