2022-09-15 03:17:13 +00:00
|
|
|
local discardSkill = fk.CreateActiveSkill{
|
|
|
|
name = "discard_skill",
|
|
|
|
card_filter = function(self, to_select, selected)
|
|
|
|
if #selected >= self.num then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2023-01-29 10:11:41 +00:00
|
|
|
if not self.include_equip then
|
2023-02-26 07:01:14 +00:00
|
|
|
return Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
|
2023-01-29 10:11:41 +00:00
|
|
|
end
|
|
|
|
|
2022-09-15 03:17:13 +00:00
|
|
|
return true
|
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
min_card_num = function(self) return self.min_num end,
|
|
|
|
max_card_num = function(self) return self.num end,
|
2022-09-15 03:17:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
local choosePlayersSkill = fk.CreateActiveSkill{
|
|
|
|
name = "choose_players_skill",
|
2023-02-26 07:01:14 +00:00
|
|
|
card_filter = function(self, to_select)
|
|
|
|
return self.pattern ~= "" and Exppattern:Parse(self.pattern):match(Fk:getCardById(to_select))
|
2022-09-15 03:17:13 +00:00
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
target_filter = function(self, to_select, selected, cards)
|
|
|
|
if self.pattern ~= "" and #cards == 0 then return end
|
2022-09-15 03:17:13 +00:00
|
|
|
if #selected < self.num then
|
2023-01-29 10:11:41 +00:00
|
|
|
return table.contains(self.targets, to_select)
|
2022-09-15 03:17:13 +00:00
|
|
|
end
|
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
card_num = function(self) return self.pattern ~= "" and 1 or 0 end,
|
|
|
|
min_target_num = function(self) return self.min_num end,
|
|
|
|
max_target_num = function(self) return self.num end,
|
2022-09-15 03:17:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Fk:loadTranslationTable{
|
|
|
|
["discard_skill"] = "弃牌",
|
|
|
|
["choose_players_skill"] = "选择角色",
|
|
|
|
}
|
|
|
|
|
|
|
|
AuxSkills = {
|
|
|
|
discardSkill,
|
|
|
|
choosePlayersSkill,
|
|
|
|
}
|