Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newTalent{
- name = "Master of Terror", shortname = "MASTER_TERROR",
- type = {"cursed/horror", 1},
- points = 5,
- mode = "passive",
- require = cursed_will_req1,
- on_learn = function(self, t)
- local lev = self:getTalentLevelRaw(t)
- if lev == 1 then
- self:learnTalent(self.T_INSTILL_FEAR), true, nil, {no_unlearn=true})
- elseif lev == 2 then
- self:learnTalent(self.T_INSTILL_FEAR), true, nil, {no_unlearn=true})
- elseif lev == 3 then
- self:learnTalent(self.T_INSTILL_FEAR), true, nil, {no_unlearn=true})
- elseif lev == 4 then
- self:learnTalent(self.T_INSTILL_FEAR), true, nil, {no_unlearn=true})
- elseif lev == 5 then
- self:learnTalent(self.T_INSTILL_FEAR), true, nil, {no_unlearn=true})
- end
- end,
- on_unlearn = function(self, t)
- local lev = self:getTalentLevelRaw(t)
- if lev == 0 then
- self:unlearnTalent(self.T_INSTILL FEAR)
- elseif lev == 1 then
- self:unlearnTalent(self.T_INSTILL FEAR)
- elseif lev == 2 then
- self:unlearnTalent(self.T_INSTILL_FEAR)
- elseif lev == 3 then
- self:unlearnTalent(self.T_INSTILL_FEAR)
- elseif lev == 4 then
- self:unlearnTalent(self.T_INSTILL_FEAR)
- end
- end,
- action = function(self, t)
- local shadow_count = 0
- if target:hasEffect(target.EFF_PARANOID) then shadow_count = shadow_count + 1
- if target:hasEffect(target.EFF_DISPAIR) then shadow_count = shadow_count + 1
- if target:hasEffect(target.EFF_TERRIFIED) then shadow_count = shadow_count + 1
- if target:hasEffect(target.EFF_DISTRESSED) then shadow_count = shadow_count + 1
- if target:hasEffect(target.EFF_HAUNTED) then shadow_count = shadow_count + 1
- if target:hasEffect(target.EFF_TORMENTED) then shadow_count = shadow_count + 1
- end
- end,
- local tgts = {}
- local grids = core.fov.circle_grids(self.x, self.y, 10, 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
- local tg = {type="bolt", range=10, talent=t, display={particle="agony"}, friendlyblock=false}
- for i = 1, #tgts do
- if #tgts <= 0 then break end
- local a, id = rng.table(tgts)
- table.remove(tgts, id)
- for i = 1, 1 do
- local x, y = nil
- local x, y = util.findFreeGrid(a.x, a.y, 4, true, {[engine.Map.ACTOR]=true})
- local NPC = require "mod.class.NPC"
- local shadowlevel = self.level
- local m = NPC.new{
- type = "undead", subtype = "shadow",
- name = "ethereal shadow",
- desc = [[]],
- display = 'b', color=colors.BLACK,
- autolevel = "none",
- ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=5, },
- stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0},
- level_range = {shadowlevel, shadowlevel}, exp_worth = 0,
- max_life = self.max_life*0.15,
- life_rating = self.max_life*0.05,
- infravision = 10,
- combat_armor = 2, combat_def = 4,
- combat = { dam=1 * 3 + rng.avg(12,25), atk=10, apr=10, dammod={str=0.8} },
- never_anger = true,
- summoner = self,
- summoner_gain_exp=true,
- summon_time = 4,
- ai_target = {actor=target}
- }
- m.remove_from_party_on_death = true
- if x and y then
- game.zone:addEntity(game.level, m, "actor", x, y)
- m:setTarget(a)
- a:setTarget(m)
- if game.party:hasMember(self) then
- game.party:addMember(m, {
- control="no",
- type="ethereal shadow",
- title="Ethereal Shadow",
- })
- end
- end
- end
- game:playSoundNear(self, "talents/fire")
- end
- return true
- end,
- info = function(self, t)
- return ([[You know the most basic trick of horror: Jump scares. Summon 1 Shadow around each feared enemy, 1 for each fear effecting them. These shadows taunt nearby enemies into lashing out at them.
- These shadows have no special abilities, deal minimal to no damage, and last 4 turns. As they are not 'true' shadows, they do not work with Shadow Alliance.
- Additionally, you gain Instill Fear at this talent's level.]]):
- end,
- }
Advertisement
Add Comment
Please, Sign In to add comment