Guest User

Untitled

a guest
Jul 8th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. --generic tree
  2. newTalent{
  3. name = "Biofeedback",
  4. type = {"psionic/feedback", 1},
  5. points = 5,
  6. require = psi_wil_req1,
  7. mode = "passive",
  8. getHealRatio = function(self, t) return 0.5 + self:combatTalentMindDamage(t, 0.1, 1)end,
  9. info = function(self, t)
  10. local heal = t.getHealRatio(self, t)
  11. return ([[Your natural Feedback decay now heals you for %d%% of the loss.
  12. The healing effect will scale with your mindpower.]]):format(heal*100)
  13. end,
  14. }
  15.  
  16. newTalent{
  17. name = "Amplification",
  18. type = {"psionic/feedback", 2},
  19. points = 5,
  20. require = psi_wil_req2,
  21. cooldown = 15,
  22. tactical = { FEEDBACK = 2},
  23. getFeedbackGain = function(self, t) return 0.5 + self:combatTalentMindDamage(t, 0.1, 0.5) end,
  24. action = function(self, t)
  25. local feedback_gain = t.getFeedbackGain(self, t) * self:getFeedback()
  26. self:incFeedback(self:mindCrit(feedback_gain))
  27. return true
  28. end,
  29. info = function(self, t)
  30. local gain = t.getFeedbackGain(self, t)
  31. return ([[Activate to increase your current feedback by %d%% (cannot trigger Overchrage.) Learning this talent also increases your base Feedback gain ratio to %d%%.
  32. The Feedback gain will scale with your mindpower.]]):format(gain * 100, gain * 100)
  33. end,
  34. }
  35.  
  36. newTalent{
  37. name = "Resonance Field",
  38. type = {"psionic/feedback", 4},
  39. points = 5,
  40. feedback = 20,
  41. require = psi_wil_req4,
  42. cooldown = 15,
  43. tactical = { DEFEND = 2},
  44. getShieldPower = function(self, t) return self:combatTalentMindDamage(t, 30, 470) end,
  45. action = function(self, t)
  46. self:setEffect(self.EFF_RESONANCE_FIELD, 10, {power = self:mindCrit(power)})
  47. return true
  48. end,
  49. info = function(self, t)
  50. local shield_power = t.getShieldPower(self, t)
  51. return ([[Activate to create a resonance field that will absorb 50%% of all damage you take (%d max absorption). The field will not interfere with Feedback gain.
  52. The max absorption value will scale with your mindpower and the effect lasts up to ten turns.]]):format(shield_power)
  53. end,
  54. }
  55.  
  56. newTalent{
  57. name = "Conversion",
  58. type = {"psionic/feedback", 4},
  59. points = 5,
  60. feedback = 50,
  61. require = psi_wil_req4,
  62. cooldown = 24,
  63. tactical = { MANA = 2, VIM = 2, EQUILIBRIUM = 2, STAMINA = 2, POSITIVE = 2, NEGATIVE = 2, PSI = 2, HATE = 2 },
  64. dont_provide_pool = true,
  65. getConversion = function(self, t) return 50 * self:combatTalentMindDamage(t, 0.5, 2) end,
  66. getData = function(self, t)
  67. local base = self:mindCrit(t.getConversion(self, t))
  68. return {
  69. stamina = base,
  70. mana = base * 1.8,
  71. equilibrium = -base * 1.5,
  72. vim = base,
  73. positive = base / 2,
  74. negative = base / 2,
  75. psi = base * 0.7,
  76. hate = base / 4,
  77. }
  78. end,
  79. action = function(self, t)
  80. local data = t.getData(self, t)
  81. for name, v in pairs(data) do
  82. local inc = "inc"..name:capitalize()
  83. if self[inc] then self[inc](self, v) end
  84. end
  85. return true
  86. end,
  87. info = function(self, t)
  88. local data = t.getData(self, t)
  89. return ([[Convert Feedback into other resources. Restores %d stamina, %d mana, %d equilibrium, %d vim, %d positive and negative energies, %d psi energy, and %d hate.
  90. The resource gain will improve with your mindpower.]]):format(data.stamina, data.mana, data.equilibrium, data.vim, data.positive, data.psi, data.hate)
  91. end,
  92. }
  93.  
  94. -- class tree (locked)
  95. newTalent{
  96. name = "Backlash",
  97. type = {"psionic/discharge", 1},
  98. points = 5,
  99. require = psi_wil_req1,
  100. tactical = { BUFF = 2 },
  101. mode = "sustained",
  102. sustain_feedback = 0,
  103. cooldown = 5,
  104. no_energy = true,
  105. range = 5,
  106. getDamage = function(self, t) return self:combatTalentMindDamage(t, 10, 75) end,
  107. target = function(self, t)
  108. return {type="hit", range=self:getTalentRange(t), talent=t}
  109. end,
  110. doBacklash = function(self, target, t)
  111. if core.fov.distance(self.x, self.y,target.x, target.y) > self:getTalentRange(t) then return nil end
  112. local tg = self:getTalentTarget(t)
  113. self:project(tg, target.x, target.y, DamageType.MIND, self:combatMindCrit(t.getDamage(self, t)), {type="mind"}, true) -- No Martyr loops
  114. self:incFeedback(-1)
  115. end,
  116. activate = function(self, t)
  117. return true
  118. end,
  119. deactivate = function(self, t, p)
  120. return true
  121. end,
  122. info = function(self, t)
  123. local damage = t.getDamage(self, t)
  124. return ([[You set your subconscious loose on the world around you, inflicting %0.2f mind damage to any creature within a radius of 5 when it gives you Feedback.
  125. Each time this effect is triggered you'll consume one Feedback and the effect will only trigger if you have at least one Feedback to power it.
  126. The damage will scale with your mindpower.]]):format(damDesc(self, DamageType.MIND, damage))
  127. end,
  128. }
  129.  
  130. newTalent{
  131. name = "Overcharge",
  132. type = {"psionic/discharge", 3},
  133. points = 5,
  134. require = psi_wil_req3,
  135. mode = "passive",
  136. on_learn = function(self, t)
  137. self:incMaxFeedback(20)
  138. return true
  139. end,
  140. on_unlearn = function(self, t)
  141. self:incMaxFeedback(-20)
  142. return true
  143. end,
  144. range = 5,
  145. proj_speed = 20,
  146. target = function(self, t)
  147. return {type="bolt", range=self:getTalentRange(t), talent=t, friendlyfire=false, display={particle="bolt_void", trail="dust_trail"}}
  148. end,
  149. getDamage = function(self, t) return self:combatTalentMindDamage(t, 10, 75) end,
  150. getTargetCount = function(self, t) return self:getTalentLevelRaw(t) end,
  151. getOverchargeRatio = function(self, t) return 20 - math.ceil(self:getTalentLevel(t)) end,
  152. doOvercharge = function(self, t, overcharge)
  153. local tgts = {}
  154. local grids = core.fov.circle_grids(self.x, self.y, 5, true)
  155. for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
  156. local a = game.level.map(x, y, Map.ACTOR)
  157. if a and self:reactionToward(a) < 0 then
  158. tgts[#tgts+1] = a
  159. end
  160. end end
  161.  
  162. -- Randomly take targets
  163. local tg = self:getTalentTarget(t)
  164. for i = 1, overcharge do
  165. if #tgts <= 0 then break end
  166. local a, id = rng.table(tgts)
  167. table.remove(tgts, id)
  168. self:projectile(tg, a.x, a.y, DamageType.MIND, self:combatMindCrit(t.getDamage(self, t)))
  169. end
  170. end,
  171. info = function(self, t)
  172. local damage = t.getDamage(self, t)
  173. local max_targets = t.getTargetCount(self, t)
  174. local charge_ratio = t.getOverchargeRatio(self, t)
  175. return ([[While Backlash is active you discharge excessive Feedback as bolts inflicting %0.2f mind damage at random targets. Up to %d targets may be selected each turn, one target per %d excessive Feedback you've generated.
  176. Increases the maximum amount of Feedback you can store by 20 per talent point invested (this is a passive bonus and applies regardless of Backlash).
  177. The damage will scale with your mindpower.]]):format(damDesc(self, DamageType.MIND, damage), max_targets, charge_ratio)
  178. end,
  179. }
Advertisement
Add Comment
Please, Sign In to add comment