事先说明一下我是先改过技能后,发现我lua的技能不能指定目标,才来发这个帖子的,至于拼点吗?我实在是不会改所以没弄。
最终弄出的代码如下:
Xiongzi = sgs.CreateSkillCard{name = "Xiongzi" ,filter = function(self, targets, to_select)local targets_list = sgs.PlayerList()for _, target in ipairs(targets) dotargets_list:append(target)end local duel = sgs.Sanguosha:cloneCard("duel", sgs.Card_NoSuit, 0)duel:setSkillName("Xiongzi")duel:deleteLater()return duel:targetFilter(targets_list, to_select, sgs.Self)end ,on_use = function(self, room, source, targets)local targets_list = sgs.SPlayerList()for _, target in ipairs(targets) doif source:canduel(target, nil, false) thentargets_list:append(target)endendif targets_lists:length() > 0 thenlocal duel = sgs.Sanguosha:cloneCard("duel", sgs.Card_NoSuit, 0)duel:setSkillName("Xiongzi")room:useCard(sgs.CardUseStruct(duel, source, targets_list))end end}Xiongzi = sgs.CreateTriggerSkill{name = "Xiongzi" ,events = {sgs.EventPhaseChanging} ,on_trigger = function(self, event, player, data)local room = player:getRoom()local change = data:toPhaseChange()if change.to == sgs.Player_Judge and not player:isSkipped(sgs.Player_Judge) and not player:isSkipped(sgs.Player_Draw) thenif sgs.duel_IsAvailable(player) and room:askForUseCard(player, "@@Xiongzi1", "@Xiongzi1", 1) thenplayer:skip(sgs.Player_Judge)player:skip(sgs.Player_Draw)endendreturn falseend}Xiongziduel = sgs.CreateTargetModSkill{name = "#Xiongzi-duel" ,pattern = "duel" ,distance_limit_func = function(self, player, card)if player:hasSkill("Xiongzi") and (card:getSkillName() == "Xiongzi") thenreturn 1000elsereturn 0endend}