FreeKill/packages/standard/aux_skills.lua

39 lines
829 B
Lua

local discardSkill = fk.CreateActiveSkill{
name = "discard_skill",
card_filter = function(self, to_select, selected)
if #selected >= self.num then
return false
end
return true
end,
feasible = function(self, _, selected)
return #selected >= self.min_num
end,
}
local choosePlayersSkill = fk.CreateActiveSkill{
name = "choose_players_skill",
card_filter = function()
return false
end,
target_filter = function(self, to_select, selected)
if #selected < self.num then
return table.contains(self.player_ids, to_select)
end
end,
feasible = function(self, selected)
return #selected >= self.min_num
end,
}
Fk:loadTranslationTable{
["discard_skill"] = "弃牌",
["choose_players_skill"] = "选择角色",
}
AuxSkills = {
discardSkill,
choosePlayersSkill,
}