L2NpcAIData.java 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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 com.l2jserver.gameserver.model;
  20. import com.l2jserver.gameserver.templates.chars.L2NpcTemplate.AIType;
  21. /**
  22. * This Data is for NPC Attributes and AI related stuffs.<br>
  23. * @author ShanSoft
  24. */
  25. public class L2NpcAIData
  26. {
  27. // Basic AI
  28. private int _primarySkillId;
  29. private int _minskillChance;
  30. private int _maxskillChance;
  31. private int _canMove;
  32. private int _soulshot;
  33. private int _spiritshot;
  34. private int _soulshotChance;
  35. private int _spiritshotChance;
  36. private int _isChaos;
  37. private String _clan = null;
  38. private int _clanRange;
  39. private String _enemyClan = null;
  40. private int _enemyRange;
  41. private int _dodge;
  42. private int _longRangeSkill;
  43. private int _shortRangeSkill;
  44. private int _longRangeChance;
  45. private int _shortRangeChance;
  46. private int _switchRangeChance;
  47. private AIType _aiType = AIType.FIGHTER;
  48. public void setPrimarySkillId(int primarySkillId)
  49. {
  50. _primarySkillId = primarySkillId;
  51. }
  52. public void setMinSkillChance(int skill_chance)
  53. {
  54. _minskillChance = skill_chance;
  55. }
  56. public void setMaxSkillChance(int skill_chance)
  57. {
  58. _maxskillChance = skill_chance;
  59. }
  60. public void setCanMove(int canMove)
  61. {
  62. _canMove = canMove;
  63. }
  64. public void setSoulShot(int soulshot)
  65. {
  66. _soulshot = soulshot;
  67. }
  68. public void setSpiritShot(int spiritshot)
  69. {
  70. _spiritshot = spiritshot;
  71. }
  72. public void setSoulShotChance(int soulshotchance)
  73. {
  74. _soulshotChance = soulshotchance;
  75. }
  76. public void setSpiritShotChance(int spiritshotchance)
  77. {
  78. _spiritshotChance = spiritshotchance;
  79. }
  80. public void setShortRangeSkill(int shortrangeskill)
  81. {
  82. _shortRangeSkill = shortrangeskill;
  83. }
  84. public void setShortRangeChance(int shortrangechance)
  85. {
  86. _shortRangeChance = shortrangechance;
  87. }
  88. public void setLongRangeSkill(int longrangeskill)
  89. {
  90. _longRangeSkill = longrangeskill;
  91. }
  92. public void setLongRangeChance(int longrangechance)
  93. {
  94. _shortRangeChance = longrangechance;
  95. }
  96. public void setSwitchRangeChance(int switchrangechance)
  97. {
  98. _switchRangeChance = switchrangechance;
  99. }
  100. public void setIsChaos(int ischaos)
  101. {
  102. _isChaos = ischaos;
  103. }
  104. public void setClan(String clan)
  105. {
  106. if ((clan != null) && !clan.equals("") && !clan.equalsIgnoreCase("null"))
  107. {
  108. _clan = clan.intern();
  109. }
  110. }
  111. public void setClanRange(int clanRange)
  112. {
  113. _clanRange = clanRange;
  114. }
  115. public void setEnemyClan(String enemyClan)
  116. {
  117. if ((enemyClan != null) && !enemyClan.equals("") && !enemyClan.equalsIgnoreCase("null"))
  118. {
  119. _enemyClan = enemyClan.intern();
  120. }
  121. }
  122. public void setEnemyRange(int enemyRange)
  123. {
  124. _enemyRange = enemyRange;
  125. }
  126. public void setDodge(int dodge)
  127. {
  128. _dodge = dodge;
  129. }
  130. public void setAi(String ai)
  131. {
  132. if (ai.equalsIgnoreCase("archer"))
  133. {
  134. _aiType = AIType.ARCHER;
  135. }
  136. else if (ai.equalsIgnoreCase("balanced"))
  137. {
  138. _aiType = AIType.BALANCED;
  139. }
  140. else if (ai.equalsIgnoreCase("mage"))
  141. {
  142. _aiType = AIType.MAGE;
  143. }
  144. else if (ai.equalsIgnoreCase("healer"))
  145. {
  146. _aiType = AIType.HEALER;
  147. }
  148. else if (ai.equalsIgnoreCase("corpse"))
  149. {
  150. _aiType = AIType.CORPSE;
  151. }
  152. else
  153. {
  154. _aiType = AIType.FIGHTER;
  155. }
  156. }
  157. public int getPrimarySkillId()
  158. {
  159. return _primarySkillId;
  160. }
  161. public int getMinSkillChance()
  162. {
  163. return _minskillChance;
  164. }
  165. public int getMaxSkillChance()
  166. {
  167. return _maxskillChance;
  168. }
  169. public int getCanMove()
  170. {
  171. return _canMove;
  172. }
  173. public int getSoulShot()
  174. {
  175. return _soulshot;
  176. }
  177. public int getSpiritShot()
  178. {
  179. return _spiritshot;
  180. }
  181. public int getSoulShotChance()
  182. {
  183. return _soulshotChance;
  184. }
  185. public int getSpiritShotChance()
  186. {
  187. return _spiritshotChance;
  188. }
  189. public int getShortRangeSkill()
  190. {
  191. return _shortRangeSkill;
  192. }
  193. public int getShortRangeChance()
  194. {
  195. return _shortRangeChance;
  196. }
  197. public int getLongRangeSkill()
  198. {
  199. return _longRangeSkill;
  200. }
  201. public int getLongRangeChance()
  202. {
  203. return _longRangeChance;
  204. }
  205. public int getSwitchRangeChance()
  206. {
  207. return _switchRangeChance;
  208. }
  209. public int getIsChaos()
  210. {
  211. return _isChaos;
  212. }
  213. public String getClan()
  214. {
  215. return _clan;
  216. }
  217. public int getClanRange()
  218. {
  219. return _clanRange;
  220. }
  221. public String getEnemyClan()
  222. {
  223. return _enemyClan;
  224. }
  225. public int getEnemyRange()
  226. {
  227. return _enemyRange;
  228. }
  229. public int getDodge()
  230. {
  231. return _dodge;
  232. }
  233. public AIType getAiType()
  234. {
  235. return _aiType;
  236. }
  237. }