LuaFoguang = sgs.CreateTriggerSkill{name = "LuaFoguang",frequency = sgs.Skill_Frequent,events = {sgs.Damage, sgs.Damaged},--两个触发时机on_trigger = function(self, event, player, data)local light = player:getPile("light")--获得牌堆local n = light:length()--获得牌堆中卡牌的数目-- local room = player:getRoom()-- room:drawCards(player)if n < 5 then--检查卡牌数目if room:askForSkillInvoke(player, "LuaFoguang", data) thenlocal damage = data:toDamage()local count = damage.damage--伤害点数local ids = room:getNCards(count)--从牌堆摸牌player:addToPile("light", ids)--添加到"光"牌堆endendend}