Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newTalent{
- name = "Mimic",
- type = {"cursed/predator", 4},
- mode = "passive",
- require = cursed_lev_req4,
- points = 5,
- no_npc_use = true,
- getPower = function(self, t) return self:combatTalentScale(t, 5, 20) end,
- getCount = function(self, t) return math.min(3, math.floor(self:getTalentLevelRaw(t) / 2 + 1)) end,
- callbackOnChangeLevel = function(self, t)
- if self:hasEffect(self.EFF_PREDATOR) then self:removeEffect(self.EFF_PREDATOR) end
- if not game.level.data.prey then
- local enemy = {}
- for _, e in pairs(game.level.entities) do
- if e.rank >= 3.2 and self:reactionToward(e) < 0 then
- enemy[#enemy+1] = {e=e, rank=e.rank, type=e.type}
- end
- end
- if #enemy > 0 then table.sort(enemy, "rank") else return end
- game.level.data.prey = {}
- for i = 1, t.getCount(self, t) do
- if #enemy > 0 then
- game.level.data.prey[i] = enemy[#enemy].e
- table.remove(enemy)
- end
- end
- end
- local power = t.getPower(self, t)
- local prey1, prey2, prey3 = game.level.data.prey[1], game.level.data.prey[2], game.level.data.prey[3]
- self:setEffect(self.EFF_PREDATOR, 1, {count=count, power=power, prey1=prey1, prey2=prey2, prey3=prey3})
- end,
- info = function(self, t)
- return([[Focus your predation on the most worthy prey. Upon entering a level for the first time, %d worthy foes are marked as your prey. You gain vision of them, wherever they are. Additionally, you gain damage and damage resistance against their types. Increase all damage you deal and all damage you receive by %d%%.]]):format(t.getCount(self, t), t.getPower(self, t))
- end,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement