FreeKill/packages/standard/aux_skills.lua
notify 7b12d82683 askForUseActiveSkill (#26)
* askForUseActiveSkill (not tested)

* askForDiscard

* askForChoosePlayers (not tested)

* add comment, update readme
2022-09-15 11:17:13 +08:00

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,
}