xuju.lua 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. local Xuju = {}
  2. Xuju.name = 'Xuju'
  3. Xuju.description = 'A shadow warrior able to phase into and out of the juju realm. Xuju excels in moving quickly, dealing high damage, and avoiding attacks.'
  4. ----------------
  5. -- Stats
  6. ----------------
  7. Xuju.health = 65
  8. Xuju.damage = 20
  9. Xuju.range = 30
  10. Xuju.attackSpeed = 1.2
  11. Xuju.speed = 55
  12. Xuju.spirit = 0
  13. Xuju.haste = 1
  14. Xuju.cost = 10
  15. Xuju.attackParticleCount = 10
  16. Xuju.attackParticleBone = 'region_righthand'
  17. ----------------
  18. -- Upgrades
  19. ----------------
  20. Xuju.upgrades = {
  21. shadowrush = {
  22. level = 0,
  23. maxLevel = 3,
  24. costs = {100, 150, 200},
  25. name = 'Shadow Rush',
  26. description = 'Xuju leaps through the shadows, dashing towards a nearby target.',
  27. x = -1,
  28. y = 0,
  29. values = {
  30. [1] = '150 range, 12 second cooldown',
  31. [2] = '225 range, 8 second cooldown',
  32. [3] = '300 range, 4 second cooldown'
  33. },
  34. apply = function(self, unit)
  35. if self.level > 0 then
  36. unit:addAbility('shadowrush')
  37. end
  38. end
  39. },
  40. rend = {
  41. level = 0,
  42. maxLevel = 5,
  43. costs = {100, 150, 200, 250, 300},
  44. name = 'Rend',
  45. description = 'Xuju has a chance to critically injure his opponent with his attacks, dealing double damage.',
  46. x = 0,
  47. y = 0,
  48. values = {
  49. [1] = '8% crit chance',
  50. [2] = '15% crit chance',
  51. [3] = '21% crit chance',
  52. [4] = '26% crit chance',
  53. [5] = '30% crit chance',
  54. },
  55. bonuses = function()
  56. return data.buff.rend:bonuses()
  57. end,
  58. apply = function(self, unit)
  59. if self.level > 0 then
  60. unit.buffs:add('rend')
  61. end
  62. end
  63. },
  64. ghostarmor = {
  65. level = 0,
  66. maxLevel = 5,
  67. costs = {100, 150, 200, 250, 300},
  68. name = 'Ghost Armor',
  69. description = 'Xuju has a chance to fade into the juju realm when struck by attacks, negating the damage completely.',
  70. x = 1,
  71. y = 0,
  72. values = {
  73. [1] = '10% dodge chance',
  74. [2] = '15% dodge chance',
  75. [3] = '20% dodge chance',
  76. [4] = '25% dodge chance',
  77. [5] = '30% dodge chance',
  78. },
  79. bonuses = function()
  80. return data.buff.ghostarmor:bonuses()
  81. end,
  82. apply = function(self, unit)
  83. if self.level > 0 then
  84. unit.buffs:add('ghostarmor')
  85. end
  86. end
  87. },
  88. fury = {
  89. level = 0,
  90. maxLevel = 3,
  91. prerequisites = {rend = 1},
  92. costs = {200, 300, 400},
  93. name = 'Fury',
  94. description = 'Critical hits increase Xuju\'s attack speed for 5 seconds, stacking multiple times.',
  95. x = 0,
  96. y = 1,
  97. connectedTo = {'rend'},
  98. values = {
  99. [1] = '10% attack speed per stack, max 3 stacks',
  100. [2] = '12% attack speed per stack, max 4 stacks',
  101. [3] = '15% attack speed per stack, max 5 stacks'
  102. },
  103. bonuses = function()
  104. local bonuses = {}
  105. local rend = data.buff.rend
  106. if rend.runePerStack > 0 then
  107. table.insert(bonuses, {'Runes', math.round(rend.runePerStack * 100) .. '%', 'attack speed per stack'})
  108. end
  109. return bonuses
  110. end
  111. },
  112. voidmetal = {
  113. level = 0,
  114. maxLevel = 1,
  115. prerequisites = {ghostarmor = 3},
  116. costs = {300},
  117. name = 'Void Metal',
  118. description = 'Xuju has a chance to resist crowd control effects.',
  119. x = 1,
  120. y = 1,
  121. connectedTo = {'ghostarmor'},
  122. values = {
  123. [1] = '40% chance to ignore crowd control effects.'
  124. },
  125. bonuses = function()
  126. return data.buff.voidmetal:bonuses()
  127. end
  128. },
  129. deathwish = {
  130. level = 0,
  131. maxLevel = 3,
  132. prerequisites = {fury = 1},
  133. costs = {200, 200, 200},
  134. name = 'Death Wish',
  135. description = 'Xuju expertly identifies and exploits the weaknesses of crippled enemies. Critical hit chance is doubled against enemies that are low on health.',
  136. connectedTo = {'fury'},
  137. x = 0,
  138. y = 2,
  139. values = {
  140. [1] = 'Crit chance doubled if target below 30% health',
  141. [2] = 'Crit chance doubled if target below 40% health',
  142. [3] = 'Crit chance doubled if target below 50% health'
  143. }
  144. },
  145. temperedbastion = {
  146. level = 0,
  147. maxLevel = 1,
  148. prerequisites = {voidmetal = 1},
  149. costs = {1000},
  150. name = 'Tempered Bastion',
  151. description = 'Xuju\'s armor is magically infused with light-bending bastion. The chance of effect for Ghost Armor and Void Metal are increased to 100% when Xuju is in the Juju Realm.',
  152. x = 1,
  153. y = 2,
  154. connectedTo = {'voidmetal'},
  155. values = {
  156. [1] = '100% chance for Ghost Armor and Void Metal'
  157. }
  158. },
  159. grimreaper = {
  160. level = 0,
  161. maxLevel = 1,
  162. costs = {1000},
  163. name = 'Grim Reaper',
  164. description = 'When Xuju dies, his void form seeks revenge on his attacker, killing them instantly.',
  165. x = -1,
  166. y = 3,
  167. values = {
  168. [1] = 'Sweet revenge'
  169. },
  170. apply = function(self, unit)
  171. if self.level > 0 then
  172. unit.buffs:add('grimreaper')
  173. end
  174. end
  175. },
  176. ambush = {
  177. level = 0,
  178. maxLevel = 1,
  179. prerequisites = {shadowrush = 1},
  180. costs = {300},
  181. name = 'Ambush',
  182. description = 'When Muju enters the Juju Realm, Xuju disappears and appears behind the closest enemy, dealing damage.',
  183. x = -1,
  184. y = 1,
  185. connectedTo = {'shadowrush'},
  186. values = {
  187. [1] = '50 damage'
  188. },
  189. bonuses = function()
  190. return data.ability.xuju.ambush:bonuses()
  191. end,
  192. apply = function(self, unit)
  193. if self.level > 0 then
  194. unit:addAbility('ambush')
  195. end
  196. end
  197. },
  198. twinblades = {
  199. level = 0,
  200. maxLevel = 1,
  201. costs = {1500},
  202. name = 'Twin Blades',
  203. description = 'Xuju\'s attacks will also effect a second nearby enemy.',
  204. x = 0,
  205. y = 3,
  206. values = {
  207. [1] = 'Double hit'
  208. },
  209. apply = function(self, unit)
  210. if self.level > 0 then
  211. unit.buffs:add('twinblades')
  212. end
  213. end
  214. },
  215. empoweredstrikes = {
  216. level = 0,
  217. maxLevel = 1,
  218. costs = {1500},
  219. name = 'Empowered Strikes',
  220. description = 'Every time Muju collects Juju, Xuju gains a charge of Empowered Strikes. Empowered Strikes causes Xuju\'s next attack to deal increased damage and heal him for a percentage of the damage dealt.',
  221. x = 1,
  222. y = 3,
  223. values = {
  224. [1] = '+50% damage, +25% lifesteal, max 3 charges'
  225. },
  226. apply = function(self, unit)
  227. if self.level > 0 then
  228. unit.buffs:add('empoweredstrikes')
  229. end
  230. end
  231. }
  232. }
  233. Xuju.featured = {
  234. {'shadowrush', 'Dash through the shadows to strike enemies.'},
  235. {'rend', 'A chance to deal double damage on each attack.'},
  236. {'ghostarmor', 'A chance to evade attacks.'},
  237. {'twinblades', 'Strike twice with every hit.'}
  238. }
  239. return Xuju