找了快一个小时还是没找到哪里错了,
我粗略说下技能卡的效果,选择至多x个目标,x为mark“gepile”的数量,选择的目标须交给你一张牌,否则你对其造成一点伤害。
但是我做出来的结果是前面正常触发了,技能卡部分我不能选择目标,但是我换了其他技能的技能卡上去又是能正确触发的,下面是技能卡的代码。。。,求好心人帮我看看哪里错了。。。
changwanCard = sgs.CreateSkillCard{
name = "changwanCard" ,
filter = function(self, targets, to_select)
local n = sgs.Self:getMark("gepile")
if #targets < n then
return true
else
return false
end
end ,
on_use = function(self, room, source, targets)
for _, p in ipairs(targets) do
local card = room:askForCard(source, "..!", "#changwan", data, sgs.Card_MethodNone)
if card then
source:obtainCard(card)
else
local theDamage = sgs.DamageStruct()
theDamage.from = source
theDamage.to = p
theDamage.damage = 1
theDamage.nature = sgs.DamageStruct_Normal
room:damage(theDamage)
end
end
end
}
changwanVS = sgs.CreateViewAsSkill{
name = "changwan" ,
response_pattern = "@@changwan",
n = 0,
view_as = function()
return changwanCard:clone()
end ,
enabled_at_play = function()
return false
end
}

但是我做出来的结果是前面正常触发了,技能卡部分我不能选择目标,但是我换了其他技能的技能卡上去又是能正确触发的,下面是技能卡的代码。。。,求好心人帮我看看哪里错了。。。
changwanCard = sgs.CreateSkillCard{
name = "changwanCard" ,
filter = function(self, targets, to_select)
local n = sgs.Self:getMark("gepile")
if #targets < n then
return true
else
return false
end
end ,
on_use = function(self, room, source, targets)
for _, p in ipairs(targets) do
local card = room:askForCard(source, "..!", "#changwan", data, sgs.Card_MethodNone)
if card then
source:obtainCard(card)
else
local theDamage = sgs.DamageStruct()
theDamage.from = source
theDamage.to = p
theDamage.damage = 1
theDamage.nature = sgs.DamageStruct_Normal
room:damage(theDamage)
end
end
end
}
changwanVS = sgs.CreateViewAsSkill{
name = "changwan" ,
response_pattern = "@@changwan",
n = 0,
view_as = function()
return changwanCard:clone()
end ,
enabled_at_play = function()
return false
end
}