--=======================================================================================
-- Generated by TypescriptToLua transpiler https://github.com/Perryvw/TypescriptToLua 
-- Date: Sun May 13 2018
--=======================================================================================
require("typescript_lualib")
--LinkLuaModifier("modifier_resurrection_mutator","",LUA_MODIFIER_MOTION_NONE)
modifier_resurrection_mutator = {}
modifier_resurrection_mutator.__index = modifier_resurrection_mutator
function modifier_resurrection_mutator.new(construct, ...)
    local instance = setmetatable({}, modifier_resurrection_mutator)
    if construct and modifier_resurrection_mutator.constructor then modifier_resurrection_mutator.constructor(instance, ...) end
    return instance
end
function modifier_resurrection_mutator.IsPermanent(self)
    return true
end
function modifier_resurrection_mutator.IsPurgable(self)
    return false
end
function modifier_resurrection_mutator.IsHidden(self)
    return true
end
function modifier_resurrection_mutator.DeclareFunctions(self)
    return {
        --MODIFIER_EVENT_ON_DEATH,
    }
end

--[[function modifier_resurrection_mutator.OnDeath(self,kv)
    local killedUnit = self:GetParent()

    if kv.unit==killedUnit and not killedUnit:IsReincarnating() then

        local timeLeft = killedUnit.timeLeft or killedUnit:GetRespawnTime()
        local numb = math.min(50,math.max(1,math.ceil(timeLeft/3)))
        local newItem = CreateItem("item_tombstone_"..numb,killedUnit:GetPlayerOwner(),killedUnit:GetPlayerOwner())

        newItem:SetPurchaseTime(0)
        newItem:SetPurchaser(killedUnit)
        

        
        local tombstone = SpawnEntityFromTableSynchronous("dota_item_tombstone_drop",{})
        
        tombstone:SetContainedItem(newItem)
        if killedUnit:GetTeamNumber() == DOTA_TEAM_GOODGUYS then
            --tombstone:SetModel("models/heroes/phantom_assassin/arcana_tombstone2.vmdl")
        else
            --tombstone:SetModel("models/heroes/phantom_assassin/arcana_tombstone3.vmdl")
        end
        tombstone:SetAbsOrigin(killedUnit:GetAbsOrigin())
        tombstone:SetAngles(0, 90, 0)
        --tombstone:SetModelScale(2)
    end
end]]

