bruju.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. local Bruju = {}
  2. Bruju.name = 'Bruju'
  3. Bruju.description = 'A treant with spiritual powers. Specializes in dealing high damage and regenerating health.'
  4. ----------------
  5. -- Stats
  6. ----------------
  7. Bruju.width = 48
  8. Bruju.health = 85
  9. Bruju.damage = 18
  10. Bruju.range = 12
  11. Bruju.attackSpeed = 1.1
  12. Bruju.speed = 45
  13. Bruju.haste = 1
  14. Bruju.spirit = 0
  15. Bruju.cost = 10
  16. Bruju.attackParticleBone = 'region_righthand'
  17. ----------------
  18. -- Upgrades
  19. ----------------
  20. Bruju.upgrades = {
  21. siphon = {
  22. level = 0,
  23. maxLevel = 5,
  24. costs = {100, 150, 200, 250, 300},
  25. levelRequirement = 1,
  26. name = 'Siphon',
  27. description = 'Bruju siphon life from their enemies with every strike, granting lifesteal.',
  28. x = -1,
  29. y = 0,
  30. values = {
  31. [1] = '8% lifesteal',
  32. [2] = '12% lifesteal',
  33. [3] = '16% lifesteal',
  34. [4] = '20% lifesteal',
  35. [5] = '24% lifesteal',
  36. },
  37. bonuses = function()
  38. return data.ability.bruju.siphon:bonuses()
  39. end,
  40. apply = function(self, unit)
  41. if self.level > 0 then
  42. unit:addAbility('siphon')
  43. end
  44. end
  45. },
  46. burst = {
  47. level = 0,
  48. maxLevel = 5,
  49. costs = {100, 150, 200, 250, 300},
  50. levelRequirement = 1,
  51. name = 'Burst',
  52. description = 'Bruju burst into a spirit flame on death, damaging nearby enemies.',
  53. x = 0,
  54. y = 0,
  55. values = {
  56. [1] = '20 damage',
  57. [2] = '40 damage',
  58. [3] = '70 damage',
  59. [4] = '110 damage',
  60. [5] = '160 damage',
  61. },
  62. bonuses = function(self)
  63. return data.ability.bruju.burst:bonuses()
  64. end,
  65. apply = function(self, unit)
  66. if self.level > 0 then
  67. unit:addAbility('burst')
  68. end
  69. end
  70. },
  71. retaliation = {
  72. level = 0,
  73. maxLevel = 1,
  74. costs = {250},
  75. levelRequirement = 1,
  76. name = 'Retaliation',
  77. description = 'Bruju gains attack speed while Muju is in the juju realm.',
  78. x = 1,
  79. y = 0,
  80. values = {
  81. [1] = '30% attack speed'
  82. },
  83. bonuses = function()
  84. return data.ability.bruju.retaliation:bonuses()
  85. end,
  86. apply = function(self, unit)
  87. if self.level > 0 then
  88. unit:addAbility('retaliation')
  89. end
  90. end
  91. },
  92. equilibrium = {
  93. level = 0,
  94. maxLevel = 1,
  95. costs = {500},
  96. prerequisites = {siphon = 3},
  97. levelRequirement = 5,
  98. name = 'Equilibrium',
  99. description = 'Bruju gains double lifesteal from Siphon when below 40% health.',
  100. x = -1,
  101. y = 1,
  102. connectedTo = {'siphon'},
  103. values = {
  104. [1] = '200% lifesteal when low on health'
  105. }
  106. },
  107. eruption = {
  108. level = 0,
  109. maxLevel = 3,
  110. costs = {100, 150, 200},
  111. prerequisites = {burst = 1},
  112. levelRequirement = 3,
  113. name = 'Eruption',
  114. description = 'The range of burst is increased',
  115. x = 0,
  116. y = 1,
  117. connectedTo = {'burst'},
  118. values = {
  119. [0] = '60 range',
  120. [1] = '80 range',
  121. [2] = '110 range',
  122. [3] = '150 range'
  123. }
  124. },
  125. rewind = {
  126. level = 0,
  127. maxLevel = 3,
  128. costs = {300, 300, 300},
  129. levelRequirement = 5,
  130. name = 'Rewind',
  131. description = 'Bruju has a chance to quickly heal any damage taken.',
  132. x = 1,
  133. y = 1,
  134. values = {
  135. [1] = '5% chance',
  136. [2] = '10% chance',
  137. [3] = '15% chance'
  138. },
  139. bonuses = function()
  140. return data.ability.bruju.rewind:bonuses()
  141. end,
  142. apply = function(self, unit)
  143. if self.level > 0 then
  144. unit:addAbility('rewind')
  145. end
  146. end
  147. },
  148. fortify = {
  149. level = 0,
  150. maxLevel = 3,
  151. costs = {300, 300, 300},
  152. levelRequirement = 10,
  153. name = 'Fortify',
  154. description = 'Bruju\'s maximum health is increased.',
  155. x = -1,
  156. y = 2,
  157. values = {
  158. [1] = '30% increase',
  159. [2] = '50% increase',
  160. [3] = '70% increase'
  161. },
  162. apply = function(self, unit)
  163. if self.level > 0 then
  164. local modifiers = {1.3, 1.5, 1.7}
  165. unit.health = unit.health * modifiers[self.level]
  166. end
  167. end
  168. },
  169. impulse = {
  170. level = 0,
  171. maxLevel = 1,
  172. costs = {1000},
  173. prerequisites = {burst = 1, rewind = 1},
  174. levelRequirement = 10,
  175. name = 'Impulse',
  176. description = 'Every time rewind is triggered, Bruju ruptures the fabric of time, casting Burst.',
  177. x = 1,
  178. y = 2,
  179. connectedTo = {'rewind'},
  180. values = {
  181. [1] = 'So much burst.',
  182. }
  183. },
  184. clarity = {
  185. level = 0,
  186. maxLevel = 1,
  187. costs = {500},
  188. prerequisites = {fortify = 1},
  189. levelRequirement = 15,
  190. name = 'Clarity',
  191. description = 'Reduces the duration of crowd control effects.',
  192. x = -1,
  193. y = 3,
  194. connectedTo = {'fortify'},
  195. values = {
  196. [1] = '50% reduction',
  197. },
  198. apply = function(self, unit)
  199. if self.level > 0 then
  200. unit.buffs:add('clarity')
  201. end
  202. end
  203. },
  204. sanctuary = {
  205. level = 0,
  206. maxLevel = 1,
  207. costs = {1000},
  208. prerequisites = {burst = 1, eruption = 1},
  209. levelRequirement = 15,
  210. name = 'Sanctuary',
  211. description = 'Burst also heals allies for a portion of the damage dealt.',
  212. x = 0,
  213. y = 3,
  214. connectedTo = {'eruption'},
  215. values = {
  216. [1] = '50% of the damage heals',
  217. }
  218. },
  219. moxie = {
  220. level = 0,
  221. maxLevel = 1,
  222. costs = {1500},
  223. levelRequirement = 20,
  224. name = 'Moxie',
  225. description = 'Bruju gains damage proportional to his maximum health.',
  226. x = -1,
  227. y = 4,
  228. values = {
  229. [1] = '10% maximum health converted to damage',
  230. },
  231. apply = function(self, unit)
  232. if self.level > 0 then
  233. unit.damage = unit.damage + (unit.health * .1)
  234. end
  235. end
  236. },
  237. conduction = {
  238. level = 0,
  239. maxLevel = 1,
  240. costs = {1500},
  241. levelRequirement = 20,
  242. name = 'Conduction',
  243. description = 'All healing is increased.',
  244. x = 0,
  245. y = 4,
  246. values = {
  247. [1] = '10% increased healing from all sources',
  248. },
  249. apply = function(self, unit)
  250. if self.level > 0 then
  251. unit.buffs:add('conduction')
  252. end
  253. end
  254. }
  255. }
  256. Bruju.featured = {
  257. {'siphon', 'Steal health from enemies with every attack.'},
  258. {'burst', 'Explode on death to damage enemies.'},
  259. {'rewind', 'Move backwards in time to avoid taking damage.'},
  260. {'moxie', 'Convert health into damage.'}
  261. }
  262. return Bruju