太阳神三国杀lua吧 关注:2,644贴子:73,378
  • 4回复贴,共1

再次求改错

只看楼主收藏回复

嗜酒:每当你使用酒时,你获得技能无双直到你的下一个回合结束阶段。
部分代码如下:


IP属地:江苏1楼2013-06-18 10:21回复
    on_trigger = function(self, event, player, data)
    local room = player:getRoom()
    local selfskname = self:objectName()
    local selfplayer = room:findPlayerBySkillName(selfskname)
    local defaultReturn = false
    if event == sgs.CardUsed then
    local use = data:toCardUse()
    if not use.from then return end
    if not use.from:hasSkill(selfskname) then return end
    if use.card:isKindOf("analpetic") then
    room:acquireSkill(use.from,"wushuang")
    room:setPlayerFlag(use.from,"shijiu")
    end
    end
    if event == sgs.EventPhaseStart then
    if selfplayer:getPhase() == sgs.Player_Finish and selfplayer:hasFlag("shijiu") then
    room:deteachSkillFromPlayer(use.from,"wushuang")
    room:setPlayerFlag(use.from,"-shijiu")
    end
    end
    end,


    IP属地:江苏2楼2013-06-18 10:21
    收起回复