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,
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,