2022-03-31 13:29:23 +08:00
|
|
|
---@class Skill
|
|
|
|
local Skill = class("Skill")
|
|
|
|
|
|
|
|
fk.createEnum(Skill, {
|
2022-03-25 12:28:07 +08:00
|
|
|
"Common",
|
|
|
|
"Frequent",
|
|
|
|
"Compulsory",
|
|
|
|
"Awaken",
|
|
|
|
"Limit",
|
2022-03-31 13:29:23 +08:00
|
|
|
})
|
2022-03-25 12:28:07 +08:00
|
|
|
|
|
|
|
function Skill:initialize(name, skillType)
|
|
|
|
self.name = name
|
|
|
|
self.description = ":" .. name
|
|
|
|
self.skillType = skillType
|
|
|
|
end
|
|
|
|
|
|
|
|
local TriggerSkill = class("TriggerSkill", Skill)
|
|
|
|
|
|
|
|
function TriggerSkill:initialize(spec)
|
|
|
|
Skill.initialize(self, spec.name, spec.skillType)
|
|
|
|
self.isRefreshAt = spec.isRefreshAt
|
|
|
|
self.isTriggerable = spec.isTriggerable
|
|
|
|
self.targetFilter = spec.targetFilter
|
|
|
|
self.cardFilter = spec.cardFilter
|
|
|
|
self.beforeTrigger = spec.beforeTrigger
|
|
|
|
self.onTrigger = spec.onTrigger
|
|
|
|
end
|
|
|
|
|
|
|
|
return Skill
|