薛之猫大王
2026-02-22 3b98d982bed635e986ab09f8185cfa9b9b2c33bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local CONST     = require 'config.const'
local Suspicion = require 'systems.suspicion'
local Base      = require 'profession.base'
 
Base.register('eagle_eye', function(unit, ability)
    local scan_area = clicli.area.create_circle_area(unit:get_point(), 15)
    local all_units = scan_area:get_all_unit_in_area()
    scan_area:remove()
 
    for _, u in ipairs(all_units) do
        if u:has_tag('player_controlled') and u ~= unit and u:is_alive() then
            u:add_buff({
                key    = CONST.BUFF_EAGLE_MARK,
                source = unit,
                time   = 3.0,
            })
        end
    end
 
    Suspicion.add(unit, 10)
end)
 
return Base