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

0224这段代码用不了

只看楼主收藏回复

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}


IP属地:北京1楼2013-10-03 12:16回复
    getNcards获得的是card类还是int类?看楼下怎么说


    IP属地:四川来自Android客户端2楼2013-10-03 12:43
    回复
      是card,不解释


      IP属地:湖北3楼2013-10-03 13:09
      收起回复