mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
713bbca17a
提供了一个简单的事件记录器机制和一个功能简单的查询函数。 在GameEvent的clear环节中,先执行默认的clear函数,再执行用户自订的clear函数。
17 lines
436 B
Lua
17 lines
436 B
Lua
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
GameEvent.functions[GameEvent.SkillEffect] = function(self)
|
|
local effect_cb, player, skill = table.unpack(self.data)
|
|
local room = self.room
|
|
local logic = room.logic
|
|
|
|
local cost_data_bak = skill.cost_data
|
|
logic:trigger(fk.SkillEffect, player, skill)
|
|
skill.cost_data = cost_data_bak
|
|
|
|
local ret = effect_cb()
|
|
|
|
logic:trigger(fk.AfterSkillEffect, player, skill)
|
|
return ret
|
|
end
|