mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 19:58:13 +08:00
7b12d82683
* askForUseActiveSkill (not tested) * askForDiscard * askForChoosePlayers (not tested) * add comment, update readme
39 lines
829 B
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,
|
|
}
|