Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newTalent{
- short_name = "NEMESIS_X",
- name = "Nemesis Clone",
- type = {"race/Chrono_Xorn", 1},
- points = 5,
- paradox = function (self, t) return getParadoxCost(self, t, 0) end,
- cooldown = 0,
- tactical = { ATTACK = 1, DISABLE = 2 },
- range = 10,
- requires_target = true,
- no_npc_use = true,
- getDuration = function(self, t) return math.floor(self:combatTalentLimit(t, 50, 50, 50)) end, -- Limit <50
- getModifier = function(self, t) return rng.range(t.getDuration(self,t)*2, t.getDuration(self, t)*4) end,
- action = function (self, t)
- local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
- local tx, ty = self:getTarget(tg)
- if not tx or not ty then return nil end
- local _ _, tx, ty = self:canProject(tg, tx, ty)
- if not tx or not ty then return nil end
- local x, y = util.findFreeGrid(tx, ty, 2, true, {[Map.ACTOR]=true})
- if not x then
- game.logPlayer(self, "Not enough space to summon!")
- return
- end
- local sex = game.player.female and "she" or "he"
- local m = require("mod.class.NPC").new(self:cloneFull{
- no_drops = true, keep_inven_on_death = false,
- faction = enemies,
- summoner = self, summoner_gain_exp = false,
- exp_worth = 1,
- summon_time = t.getDuration(self, t),
- ai_target = {actor=nil},
- ai = "summoned", ai_real = "tactical",
- ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, --[[ally_compassion=-100]]},
- desc = [[The real you... or so ]]..sex..[[ says.]]
- })
- m:removeAllMOs()
- m.make_escort = nil
- m.on_added_to_level = nil
- m.energy.value = 0
- m.player = nil
- m.puuid = nil
- m.max_life = m.max_life
- m.life = util.bound(m.life, 0, m.max_life)
- m.forceLevelup = function() end
- m.die = nil
- m.on_die = nil
- m.on_acquire_target = nil
- m.seen_by = nil
- m.can_talk = nil
- m.on_takehit = nil
- m.no_inventory_access = true
- m.clone_on_hit = nil
- m.remove_from_party_on_death = nil
- -- Remove some talents
- local tids = {}
- for tid, _ in pairs(m.talents) do
- local t = m:getTalentFromId(tid)
- if t.no_npc_use then tids[#tids+1] = t end
- end
- for i, t in ipairs(tids) do
- m.talents[t.id] = nil
- end
- game.zone:addEntity(game.level, m, "actor", x, y)
- game.level.map:particleEmitter(x, y, 1, "temporal_teleport")
- game:playSoundNear(self, "talents/teleport")
- --self:setEffect(self.EFF_IMMINENT_PARADOX_CLONE, t.getDuration(self, t) + t.getModifier(self, t), {})
- return true
- end,
- info = function(self, t)
- local duration = t.getDuration(self, t)
- return ([[You summon your future self to fight alongside you for %d turns. At some point in the future, you'll be pulled into the past to fight alongside your past self after the initial effect ends.
- This spell splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful.]]):format(duration)
- end,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement