大概这样吧:
--[[技能描述:回合开始阶段,你获得一个觉醒标记(别问为什么是觉醒标记);你弃掉一个觉醒标记视为你使用了一张顺手牵羊(无距离限制,懒得设置了)或者打出一张闪]]
luaskillcard1 = sgs.CreateSkillCard
{
name = "luaskillcard1",
on_effect = function(self, effect)
effect.from:loseMark("@waked")
local use = sgs.CardUseStruct()
local card = sgs.Sanguosha:cloneCard("snatch", sgs.Card_NoSuit, 0)
card:setSkillName("luaskill1")
use.from = effect.from
use.to:append(effect.to)
use.card = card
effect.from:getRoom():useCard(use,false)
end,
}
luaviewas1 = sgs.CreateViewAsSkill
{
name = "luaskill1",
n=0,
view_filter=function()
return false
end,
view_as=function(self, cards)
return luaskillcard1:clone()
end,
enabled_at_play=function()
return not (sgs.Self:getMark("@waked") < 1)
end,
enabled_at_response=function(self,player,pattern)
return false
end,
}
luatriggerskill1 = sgs.CreateTriggerSkill
{
name = "luaskill1",
events = {sgs.EventPhaseStart,sgs.CardAsked},
view_as_skill = luaviewas1,
on_trigger = function(self,event,player,data)
local room = player:getRoom()
if event == sgs.EventPhaseStart then
if player:getPhase() == sgs.Player_Start then
player:gainMark("@waked")
end
else
if not (data:toString() == "jink") then return false end
if player:getMark("@waked") < 1 then return false end
if not room:askForSkillInvoke(player, self:objectName()) then return false end
player:loseMark("@waked")
local jink = sgs.Sanguosha:cloneCard("jink", sgs.Card_NoSuit, 0)
room:provide(jink)
return true
end
end
}