luapaiyi=sgs.CreateTriggerSkill{
name=luapaiyi,
frequency=sgs.Skill_NotFrequent,
events={sgs.Damaged},
on_trigger=function(self,event,player,data)
localroom=player:getRoom()
ifroom:askForSkillInvoke(player,self:objectName(),data)then
locallist=room:getAllPlayers()
localtarget=room:askForPlayerChosen(player,list,self:objectName())
iftargetthen
localcount=target:getLostHp()
ifcount<1then
target:drawCards(1)
player:drawCards(1)
iftarget:getHandcardNum()>player:getHandcardNum()then
target:turnOver()
end
else
iftarget:isAlive()then
target:drawCards(count)
end
player:drawCards(count)
iftarget:getHandcardNum()>player:getHandcardNum()then
target:turnOver()
end
end
end
end
end
}