Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --generic tree
- newTalent{
- name = "Biofeedback",
- type = {"psionic/feedback", 1},
- points = 5,
- require = psi_wil_req1,
- mode = "passive",
- getHealRatio = function(self, t) return 0.5 + self:combatTalentMindDamage(t, 0.1, 1)end,
- info = function(self, t)
- local heal = t.getHealRatio(self, t)
- return ([[Your natural Feedback decay now heals you for %d%% of the loss.
- The healing effect will scale with your mindpower.]]):format(heal*100)
- end,
- }
- newTalent{
- name = "Amplification",
- type = {"psionic/feedback", 2},
- points = 5,
- require = psi_wil_req2,
- cooldown = 15,
- tactical = { FEEDBACK = 2},
- getFeedbackGain = function(self, t) return 0.5 + self:combatTalentMindDamage(t, 0.1, 0.5) end,
- action = function(self, t)
- local feedback_gain = t.getFeedbackGain(self, t) * self:getFeedback()
- self:incFeedback(self:mindCrit(feedback_gain))
- return true
- end,
- info = function(self, t)
- local gain = t.getFeedbackGain(self, t)
- return ([[Activate to increase your current feedback by %d%% (cannot trigger Overchrage.) Learning this talent also increases your base Feedback gain ratio to %d%%.
- The Feedback gain will scale with your mindpower.]]):format(gain * 100, gain * 100)
- end,
- }
- newTalent{
- name = "Resonance Field",
- type = {"psionic/feedback", 4},
- points = 5,
- feedback = 20,
- require = psi_wil_req4,
- cooldown = 15,
- tactical = { DEFEND = 2},
- getShieldPower = function(self, t) return self:combatTalentMindDamage(t, 30, 470) end,
- action = function(self, t)
- self:setEffect(self.EFF_RESONANCE_FIELD, 10, {power = self:mindCrit(power)})
- return true
- end,
- info = function(self, t)
- local shield_power = t.getShieldPower(self, t)
- 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.
- The max absorption value will scale with your mindpower and the effect lasts up to ten turns.]]):format(shield_power)
- end,
- }
- newTalent{
- name = "Conversion",
- type = {"psionic/feedback", 4},
- points = 5,
- feedback = 50,
- require = psi_wil_req4,
- cooldown = 24,
- tactical = { MANA = 2, VIM = 2, EQUILIBRIUM = 2, STAMINA = 2, POSITIVE = 2, NEGATIVE = 2, PSI = 2, HATE = 2 },
- dont_provide_pool = true,
- getConversion = function(self, t) return 50 * self:combatTalentMindDamage(t, 0.5, 2) end,
- getData = function(self, t)
- local base = self:mindCrit(t.getConversion(self, t))
- return {
- stamina = base,
- mana = base * 1.8,
- equilibrium = -base * 1.5,
- vim = base,
- positive = base / 2,
- negative = base / 2,
- psi = base * 0.7,
- hate = base / 4,
- }
- end,
- action = function(self, t)
- local data = t.getData(self, t)
- for name, v in pairs(data) do
- local inc = "inc"..name:capitalize()
- if self[inc] then self[inc](self, v) end
- end
- return true
- end,
- info = function(self, t)
- local data = t.getData(self, t)
- 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.
- The resource gain will improve with your mindpower.]]):format(data.stamina, data.mana, data.equilibrium, data.vim, data.positive, data.psi, data.hate)
- end,
- }
- -- class tree (locked)
- newTalent{
- name = "Backlash",
- type = {"psionic/discharge", 1},
- points = 5,
- require = psi_wil_req1,
- tactical = { BUFF = 2 },
- mode = "sustained",
- sustain_feedback = 0,
- cooldown = 5,
- no_energy = true,
- range = 5,
- getDamage = function(self, t) return self:combatTalentMindDamage(t, 10, 75) end,
- target = function(self, t)
- return {type="hit", range=self:getTalentRange(t), talent=t}
- end,
- doBacklash = function(self, target, t)
- if core.fov.distance(self.x, self.y,target.x, target.y) > self:getTalentRange(t) then return nil end
- local tg = self:getTalentTarget(t)
- self:project(tg, target.x, target.y, DamageType.MIND, self:combatMindCrit(t.getDamage(self, t)), {type="mind"}, true) -- No Martyr loops
- self:incFeedback(-1)
- end,
- activate = function(self, t)
- return true
- end,
- deactivate = function(self, t, p)
- return true
- end,
- info = function(self, t)
- local damage = t.getDamage(self, t)
- 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.
- 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.
- The damage will scale with your mindpower.]]):format(damDesc(self, DamageType.MIND, damage))
- end,
- }
- newTalent{
- name = "Overcharge",
- type = {"psionic/discharge", 3},
- points = 5,
- require = psi_wil_req3,
- mode = "passive",
- on_learn = function(self, t)
- self:incMaxFeedback(20)
- return true
- end,
- on_unlearn = function(self, t)
- self:incMaxFeedback(-20)
- return true
- end,
- range = 5,
- proj_speed = 20,
- target = function(self, t)
- return {type="bolt", range=self:getTalentRange(t), talent=t, friendlyfire=false, display={particle="bolt_void", trail="dust_trail"}}
- end,
- getDamage = function(self, t) return self:combatTalentMindDamage(t, 10, 75) end,
- getTargetCount = function(self, t) return self:getTalentLevelRaw(t) end,
- getOverchargeRatio = function(self, t) return 20 - math.ceil(self:getTalentLevel(t)) end,
- doOvercharge = function(self, t, overcharge)
- local tgts = {}
- local grids = core.fov.circle_grids(self.x, self.y, 5, true)
- for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
- local a = game.level.map(x, y, Map.ACTOR)
- if a and self:reactionToward(a) < 0 then
- tgts[#tgts+1] = a
- end
- end end
- -- Randomly take targets
- local tg = self:getTalentTarget(t)
- for i = 1, overcharge do
- if #tgts <= 0 then break end
- local a, id = rng.table(tgts)
- table.remove(tgts, id)
- self:projectile(tg, a.x, a.y, DamageType.MIND, self:combatMindCrit(t.getDamage(self, t)))
- end
- end,
- info = function(self, t)
- local damage = t.getDamage(self, t)
- local max_targets = t.getTargetCount(self, t)
- local charge_ratio = t.getOverchargeRatio(self, t)
- 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.
- 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).
- The damage will scale with your mindpower.]]):format(damDesc(self, DamageType.MIND, damage), max_targets, charge_ratio)
- end,
- }
Advertisement
Add Comment
Please, Sign In to add comment