为什么2号位死亡的时候,他的“镜”一直没法回收呢,其他角色的都可以
liejing = sgs.CreateTriggerSkill{
name = "#liejing",
frequency = sgs.Skill_Frequent,
events = {sgs.Death},
on_trigger = function(self, event, player, data)
local room = player:getRoom()
local daolitian = room:findPlayerBySkillName(self:objectName())
local death = data:toDeath()
if daolitian ~= death.who then
local cards = death.who:getPile("jing")
if cards:length() > 0 then
for _,card in sgs.qlist(cards) do
daolitian:addToPile("fu", card, true)
end
end
end
end,
can_trigger = function(self, target)
return target ~= nil
end
}
liejing = sgs.CreateTriggerSkill{
name = "#liejing",
frequency = sgs.Skill_Frequent,
events = {sgs.Death},
on_trigger = function(self, event, player, data)
local room = player:getRoom()
local daolitian = room:findPlayerBySkillName(self:objectName())
local death = data:toDeath()
if daolitian ~= death.who then
local cards = death.who:getPile("jing")
if cards:length() > 0 then
for _,card in sgs.qlist(cards) do
daolitian:addToPile("fu", card, true)
end
end
end
end,
can_trigger = function(self, target)
return target ~= nil
end
}