这是一个类似于“醇醪”的结束阶段把红桃牌放入私人牌堆的技能
目前下面的代码正常运行没有问题
SkillNameCard = sgs.CreateSkillCard{
name = "SkillNameCard" ,
will_throw = false ,
target_fixed = true ,
on_use = function(self, room, source, targets)
source:addToPile("xxxx", self)
end
}
LuaSkillNameVS = sgs.CreateViewAsSkill{
name = "LuaSkillNameFill" ,
n = 2,
view_filter = function(self, cards, to_select)
return to_select:getSuit() == sgs.Card_Heart
end ,
view_as = function(self, cards)
if #cards == 0 then return nil end
local acard = SkillNameCard:clone()
for _, c in ipairs(cards) do
acard:addSubcard(c)
end
acard:setSkillName(self:objectName())
return acard
end ,
enabled_at_play = function()
return false
end ,
enabled_at_response = function(self, player, pattern)
return pattern == "@@LuaSkillName"
end
}
LuaSkillName = sgs.CreateTriggerSkill{
name = "LuaSkillName",
events = {sgs.EventPhaseStart} ,
view_as_skill = LuaSkillNameVS ,
on_trigger = function(self, event, player, data)
if (event == sgs.EventPhaseStart) and (player:getPhase() == sgs.Player_Finish) and (not player:isKongcheng()) and player:getPile("xxxx"):isEmpty() then
player:getRoom():askForUseCard(player, "@@LuaSkillName", "@skillname-card")
end
return false
end
}
但是想要把这个技能通过insertRelatedSkills()整合到其他主动技能中,在触发技部分把name = "#LuaSkillName",变成隐藏后,这个技能依然会触发askForUseCard()但是手中有红桃也用不了。把VS技能名也改成"#LuaSkillName",也是不好用。
猜测是响应条件的问题,但是不知道怎么改
目前下面的代码正常运行没有问题
SkillNameCard = sgs.CreateSkillCard{
name = "SkillNameCard" ,
will_throw = false ,
target_fixed = true ,
on_use = function(self, room, source, targets)
source:addToPile("xxxx", self)
end
}
LuaSkillNameVS = sgs.CreateViewAsSkill{
name = "LuaSkillNameFill" ,
n = 2,
view_filter = function(self, cards, to_select)
return to_select:getSuit() == sgs.Card_Heart
end ,
view_as = function(self, cards)
if #cards == 0 then return nil end
local acard = SkillNameCard:clone()
for _, c in ipairs(cards) do
acard:addSubcard(c)
end
acard:setSkillName(self:objectName())
return acard
end ,
enabled_at_play = function()
return false
end ,
enabled_at_response = function(self, player, pattern)
return pattern == "@@LuaSkillName"
end
}
LuaSkillName = sgs.CreateTriggerSkill{
name = "LuaSkillName",
events = {sgs.EventPhaseStart} ,
view_as_skill = LuaSkillNameVS ,
on_trigger = function(self, event, player, data)
if (event == sgs.EventPhaseStart) and (player:getPhase() == sgs.Player_Finish) and (not player:isKongcheng()) and player:getPile("xxxx"):isEmpty() then
player:getRoom():askForUseCard(player, "@@LuaSkillName", "@skillname-card")
end
return false
end
}
但是想要把这个技能通过insertRelatedSkills()整合到其他主动技能中,在触发技部分把name = "#LuaSkillName",变成隐藏后,这个技能依然会触发askForUseCard()但是手中有红桃也用不了。把VS技能名也改成"#LuaSkillName",也是不好用。
猜测是响应条件的问题,但是不知道怎么改