L2NpcAIData.java 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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. * Author: ShanSoft
  23. * By L2JTW
  24. *
  25. *
  26. */
  27. // This Data is for NPC Attributes and AI relate stuffs...
  28. // Still need to finish...Update later...
  29. public class L2NpcAIData
  30. {
  31. //Basic AI
  32. private int _primary_attack;
  33. private int _skill_chance;
  34. private int _canMove;
  35. private int _soulshot;
  36. private int _spiritshot;
  37. private int _soulshotchance;
  38. private int _spiritshotchance;
  39. private int _ischaos;
  40. private String _clan = null;
  41. private int _clanRange;
  42. private String _enemyClan = null;
  43. private int _enemyRange;
  44. //private int _baseShldRate;
  45. //private int _baseShldDef;
  46. private int _dodge;
  47. private int _longrangeskill;
  48. private int _shortrangeskill;
  49. private int _longrangechance;
  50. private int _shortrangechance;
  51. private int _switchrangechance;
  52. private AIType _aiType = AIType.FIGHTER;
  53. //--------------------------------------------------------------------------------------------------------------
  54. //Setting....
  55. //--------------------------------------------------------------------------------------------------------------
  56. public void setPrimaryAttack(int primaryattack)
  57. {
  58. _primary_attack = primaryattack;
  59. }
  60. public void setSkillChance(int skill_chance)
  61. {
  62. _skill_chance = skill_chance;
  63. }
  64. public void setCanMove(int canMove)
  65. {
  66. _canMove = canMove;
  67. }
  68. public void setSoulShot(int soulshot)
  69. {
  70. _soulshot = soulshot;
  71. }
  72. public void setSpiritShot(int spiritshot)
  73. {
  74. _spiritshot = spiritshot;
  75. }
  76. public void setSoulShotChance(int soulshotchance)
  77. {
  78. _soulshotchance = soulshotchance;
  79. }
  80. public void setSpiritShotChance(int spiritshotchance)
  81. {
  82. _spiritshotchance = spiritshotchance;
  83. }
  84. public void setShortRangeSkill(int shortrangeskill)
  85. {
  86. _shortrangeskill = shortrangeskill;
  87. }
  88. public void setShortRangeChance(int shortrangechance)
  89. {
  90. _shortrangechance = shortrangechance;
  91. }
  92. public void setLongRangeSkill(int longrangeskill)
  93. {
  94. _longrangeskill = longrangeskill;
  95. }
  96. public void setLongRangeChance(int longrangechance)
  97. {
  98. _shortrangechance = longrangechance;
  99. }
  100. public void setSwitchRangeChance(int switchrangechance)
  101. {
  102. _switchrangechance = switchrangechance;
  103. }
  104. public void setIsChaos(int ischaos)
  105. {
  106. _ischaos = ischaos;
  107. }
  108. public void setClan(String clan)
  109. {
  110. if (clan != null && !clan.equals("") && !clan.equalsIgnoreCase("null"))
  111. _clan = clan.intern();
  112. }
  113. public void setClanRange(int clanRange)
  114. {
  115. _clanRange = clanRange;
  116. }
  117. public void setEnemyClan(String enemyClan)
  118. {
  119. if (enemyClan != null && !enemyClan.equals("") && !enemyClan.equalsIgnoreCase("null"))
  120. _enemyClan = enemyClan.intern();
  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. _aiType = AIType.ARCHER;
  134. else if (ai.equalsIgnoreCase("balanced"))
  135. _aiType = AIType.BALANCED;
  136. else if (ai.equalsIgnoreCase("mage"))
  137. _aiType = AIType.MAGE;
  138. else if (ai.equalsIgnoreCase("healer"))
  139. _aiType = AIType.HEALER;
  140. else if (ai.equalsIgnoreCase("corpse"))
  141. _aiType = AIType.CORPSE;
  142. else
  143. _aiType = AIType.FIGHTER;
  144. }
  145. /*
  146. public void setBaseShldRate (int baseShldRate)
  147. {
  148. _baseShldRate = baseShldRate;
  149. }
  150. public void setBaseShldDef (int baseShldDef)
  151. {
  152. _baseShldDef = baseShldDef;
  153. }
  154. */
  155. //--------------------------------------------------------------------------------------------------------------
  156. //Data Recall....
  157. //--------------------------------------------------------------------------------------------------------------
  158. public int getPrimaryAttack()
  159. {
  160. return _primary_attack;
  161. }
  162. public int getSkillChance()
  163. {
  164. return _skill_chance;
  165. }
  166. public int getCanMove()
  167. {
  168. return _canMove;
  169. }
  170. public int getSoulShot()
  171. {
  172. return _soulshot;
  173. }
  174. public int getSpiritShot()
  175. {
  176. return _spiritshot;
  177. }
  178. public int getSoulShotChance()
  179. {
  180. return _soulshotchance;
  181. }
  182. public int getSpiritShotChance()
  183. {
  184. return _spiritshotchance;
  185. }
  186. public int getShortRangeSkill()
  187. {
  188. return _shortrangeskill;
  189. }
  190. public int getShortRangeChance()
  191. {
  192. return _shortrangechance;
  193. }
  194. public int getLongRangeSkill()
  195. {
  196. return _longrangeskill;
  197. }
  198. public int getLongRangeChance()
  199. {
  200. return _longrangechance;
  201. }
  202. public int getSwitchRangeChance()
  203. {
  204. return _switchrangechance;
  205. }
  206. public int getIsChaos()
  207. {
  208. return _ischaos;
  209. }
  210. public String getClan()
  211. {
  212. return _clan;
  213. }
  214. public int getClanRange()
  215. {
  216. return _clanRange;
  217. }
  218. public String getEnemyClan()
  219. {
  220. return _enemyClan;
  221. }
  222. public int getEnemyRange()
  223. {
  224. return _enemyRange;
  225. }
  226. public int getDodge()
  227. {
  228. return _dodge;
  229. }
  230. public AIType getAiType()
  231. {
  232. return _aiType;
  233. }
  234. /*
  235. public int getBaseShldRate ()
  236. {
  237. return _baseShldRate;
  238. }
  239. public int getBaseShldDef ()
  240. {
  241. return _baseShldDef;
  242. }
  243. */
  244. }