楼主是想在弃牌阶段因为规则弃牌还是任何原因的弃牌?如果是前者,因为目前版本弃牌必须一次性弃完,所有写法就很简单了。
new_skill=sgs.CreateTriggerSkill{
name="new",
events=sgs.CardsMoveOneTime,
on_trigger=function(self,event,player,data,room)
local move=data:toMoveOneTime()
if move.to==sgs.Player_DiscardPile and move.from and move.from:objectName()~=player:objectName() and move.from:getPhase()==sgs.Player_Discard and move.reason.m_reason==sgs.CardMoveReason_S_REASON_RULEDISCARD and move.card_ids:length()>1 then
room:fillAG(move.card_ids,player)
local id=room:askForAG(player,move.card_ids,true,self:objectName())
if id~=1 then
room:takeAG(player,id)
end
room:clearAG(player)
end
end,
}