薛之猫大王
2026-02-23 af74b152737e345cc59908bbceb87ff82a2f79a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
local CONST     = require 'config.const'
local Suspicion = require 'systems.suspicion'
local Assassin  = require 'systems.assassination'
local Base      = require 'profession.base'
 
Base.register('shadow_blade', function(unit, ability)
    local facing = unit:get_facing()
    local pos    = unit:get_point()
 
    local rad    = math.rad(facing)
    local dx, dy = math.cos(rad) * 5, math.sin(rad) * 5
    local target_point = clicli.point.create(pos:get_x() + dx, pos:get_y() + dy)
 
    unit:blink(target_point)
 
    unit:add_state(CONST.STATE_INVISIBLE)
    unit:set_transparent_when_invisible(true)
 
    clicli.timer.wait(0.8, function()
        unit:remove_state(CONST.STATE_INVISIBLE)
    end)
 
    local dash_area = clicli.area.create_circle_area(target_point, 2.0)
    local units     = dash_area:get_all_unit_in_area()
    dash_area:remove()
 
    for _, u in ipairs(units) do
        if u ~= unit and u:is_alive() then
            unit:damage({
                target  = u,
                damage  = 105,
                type    = CONST.DAMAGE_TYPE_ASSASSINATE,
                no_miss = true,
            })
            if not u:is_alive() then
                Assassin.on_kill(unit, u)
            end
            break
        end
    end
 
    Suspicion.add(unit, 15)
end)
 
return Base