如何在距离技里面获得一个私家牌堆的牌的详细信息呀?
技能主要是根据私家牌堆Test的牌的花色来决定距离计算
LuaDemo = sgs.CreateDistanceSkill {
——name = "#LuaDemo",
——correct_func = function(self, from, to)
————if to:hasSkill(self:objectName()) and to:getPile("Test"):length() ~= 0 then
——————local cid = to:getPile("Test"):first()
——————local cardSuit = sgs.Sanguosha:getCard(cid):getSuit()--这里会说attemp to index a nil value
——————if cardSuit == sgs.Card_Heart then
————————return 1
——————end
————end
——end,
}
本来想用tag打标记,然后发现距离技里面room也用不了(悲)
技能主要是根据私家牌堆Test的牌的花色来决定距离计算
LuaDemo = sgs.CreateDistanceSkill {
——name = "#LuaDemo",
——correct_func = function(self, from, to)
————if to:hasSkill(self:objectName()) and to:getPile("Test"):length() ~= 0 then
——————local cid = to:getPile("Test"):first()
——————local cardSuit = sgs.Sanguosha:getCard(cid):getSuit()--这里会说attemp to index a nil value
——————if cardSuit == sgs.Card_Heart then
————————return 1
——————end
————end
——end,
}
本来想用tag打标记,然后发现距离技里面room也用不了(悲)