local 堕落魔王掉落1 = {
    [1] = {99900022,99900023,99900024,99900055,99900076,99900105,99920017,99920018,99920019,99920045,99920074,99920084,99930019,99930020,99930021,99930049,99930075,99930085,99940010,99940012,99940016,99940021,99940038,99940073,99940083,99990511,99980513,99990513,99980523,99990523,99980533,99990533,99980543,99990543,99980553,99990553,99980563,99990563,99990515,99990517},
    [2] = {99900025,99900027,99900028,99900031,99900032,99900033,99900056,99900057,99900077,99900078,99900106,99900107,99920027,99920028,99920029,99920046,99920075,99920085,99930033,99930034,99930035,99930050,99930076,99930086,99940024,99940025,99940026,99940039,99940074,99940084,99990611,99990621,99990631,99990641,99990651,99990661,99980613,99990613,99980623,99990623,99980633,99990633,99980643,99990643,99980653,99990653,99980663,99990663,99990615,99990617},
    [3] = {99900026,99900029,99900044,99900058,99900079,99900108,99920032,99920033,99920034,99920047,99920076,99920086,99930038,99930039,99930040,99930051,99930077,99930087,99940030,99940031,99940032,99940040,99940075,99940085,99980713,99990713,99980723,99990723,99980733,99990733,99980743,99990743,99980753,99990753,99980763,99990763,99990715,99990725,99990735,99990745,99990755,99990765,99990717,99990727,99990737,99990747,99990757,99990767},
}

-- local 幻境树妖掉落 = {39003,21001,21002,21003,21004,21005,21006,111115,140005,91115,91116}

function monster_die(怪物, 击杀者, 技能击杀)
    if 怪物.模板编号 == 342 then
        local 守卫 = 刷新守卫从地图实例(8220, 怪物.当前地图, 怪物.当前方向, 怪物.当前坐标)
    end
    if 怪物.模板编号 == 349 then
        local 守卫 = 刷新守卫从地图实例(8221, 怪物.当前地图, 怪物.当前方向, 怪物.当前坐标)
    end
    if 怪物.模板编号 == 5101 then
        for i=1,20 do
            local 掉落宝箱 = 物品实例(1029001, 怪物.当前地图, 怪物.当前坐标, nil, 1)
            掉落宝箱.强制时间 = true
        end
    end

    if 怪物.模板编号 == 5372 then
        if 主程.开区节点 < 2 then
            for i=1,100 do
                local 掉落宝箱 = 物品实例(从表随机取值(堕落魔王掉落1), 怪物.当前地图, 怪物.当前坐标, nil, 1)
                掉落宝箱.强制时间 = true
            end
            for i=1,1 do
                local 掉落宝箱 = 物品实例(从表随机取值(堕落魔王掉落1), 怪物.当前地图, 怪物.当前坐标, nil, 1)
                掉落宝箱.强制时间 = true
            end
            for i=1,3 do
                local 掉落宝箱 = 物品实例(从表随机取值(堕落魔王掉落1), 怪物.当前地图, 怪物.当前坐标, nil, 1)
                掉落宝箱.强制时间 = true
            end
        end
        for i=1,108 do
            if 计算概率(0.15) then
                local 掉落宝箱 = 物品实例(从表随机取值(堕落魔王掉落), 怪物.当前地图, 怪物.当前坐标, nil, 1)
                掉落宝箱.强制时间 = true
            end
        end
    end
    
    if 怪物.模板编号 ~= nil then
        if 击杀者 ~= nil then
            if 击杀者.对象类型 == 游戏对象类型.玩家 then
                local random = 击杀者[游戏对象属性.精英概率] or 1
                if math.random(1,2) <= random then
                    刷新怪物从地图编号(怪物.模板名字, 怪物.当前地图.地图编号, 0, 怪物.当前坐标.X, 怪物.当前坐标.Y, true, true)
                    击杀者:发送顶部公告("玩家：<font color='#FF0000'>[".. 击杀者.对象名字 .."]</font>成功触发了鞭尸效果，将尸体<font color='#FF0000'>[".. 怪物.对象名字去数字 .."]</font>成功复活！", true, false)
                end
            end
        end
    end

    -- if 怪物.模板编号 == 2768 then
    --     for i=1,randomNum(20,20,true) do
    --         local 掉落宝箱 = 物品实例(从表随机取值(幻境树妖掉落), 怪物.当前地图, 怪物.当前坐标, nil, 1)
    --         掉落宝箱.强制时间 = true
    --     end
    -- end

    -- if 怪物.当前地图.地图编号 == 154 then
    --     if not 怪物.当前地图.数字变量:ContainsKey(数字_尸王殿开启计数) then
    --         怪物.当前地图.数字变量[数字_尸王殿开启计数] = 0
    --     end
    --     怪物.当前地图.数字变量[数字_尸王殿开启计数] = 怪物.当前地图.数字变量[数字_尸王殿开启计数] + 1
    --     if 怪物.当前地图.数字变量[数字_尸王殿开启计数] == 数字_尸王殿开启计数 then
    --         local 守卫 = 刷新守卫从地图实例(3119, 怪物.当前地图, 怪物.当前方向, 怪物.当前坐标)
    --         怪物.当前地图.数字变量[数字_尸王殿开启计数] = 0
    --     end
    -- end
end
