太阳神三国杀lua吧 关注:2,628贴子:73,366
  • 29回复贴,共1

有帮忙写计技代码的么,有偿哦

只看楼主收藏回复

最近迷上了太阳神三国杀虐电脑玩,组合技能虐电脑,但苦于不会写代码,请大佬们帮忙谢谢,写好了我会付些报酬


IP属地:河北来自Android客户端1楼2017-07-27 22:05回复
    可以支付宝打钱,别太贵


    IP属地:河北来自Android客户端2楼2017-07-27 22:06
    回复
      我说技能大佬帮忙写


      IP属地:河北来自Android客户端3楼2017-07-27 22:06
      回复
        不先放技能么


        IP属地:江苏来自Android客户端5楼2017-07-27 23:12
        收起回复
          出牌阶段限一次,你的杀指定目标时,进行判定,若为红桃,则其体力上限减至1。方片,失去所有技能(只失去一次…)然后获得技能“反噬”(就是守卫剑阁里断狱仲达回合结束失去一体力,代码jgfanshi应该是,直接加上就行)。黑桃,失去所有手牌和装备区里的牌并翻面。梅花,获得技能武魂和无谋。判定完成后获得两枚梦魇标记(武魂的梦魇标记)然后结算杀…(就是不闪依旧扣血)


          IP属地:河北来自Android客户端6楼2017-07-27 23:17
          收起回复
            test = sgs.CreateTriggerSkill{
            name = "test",
            events = {sgs.TargetSpecified},
            on_trigger = function(self, event, player, data)
            local room = player:getRoom()
            local use = data:toCardUse()
            if use.card and use.card:isKindOf("Slash") then
            if room:askForSkillInvoke(player, self:objectName()) then
            local judge = sgs.JudgeStruct()
            judge.pattern = "."
            judge.good = true
            judge.play_animation = false
            judge.reason = self:objectName()
            judge.who = player
            room:judge(judge)
            local suit = judge.card:getSuit()
            if suit == sgs.Card_Heart then
            for _,p in sgs.qlist(use.to) do
            local mhp = sgs.QVariant()
            mhp:setValue(1)
            room:setPlayerProperty(p,"maxhp",mhp)
            end
            end
            if suit == sgs.Card_Diamond then
            for _,p in sgs.qlist(use.to) do
            if p:getMark("used") > 0 then return false end
            local skills = p:getVisibleSkillList()
            local detachList = {}
            for _,skill in sgs.qlist(skills) do
            if not skill:inherits("SPConvertSkill") and not skill:isAttachedLordSkill() then
            table.insert(detachList,"-"..skill:objectName())
            end
            end
            room:handleAcquireDetachSkills(p, table.concat(detachList,"|"))
            room:acquireSkill(p,"jgfanshi")
            room:setPlayerMark(p,"used",1)
            end
            end
            if suit == sgs.Card_Spade then
            for _,p in sgs.qlist(use.to) do
            local equips = p:getEquips()
            if not equips:isEmpty() then
            local dummy = sgs.Sanguosha:cloneCard("slash", sgs.Card_NoSuit, 0)
            for _, equip in sgs.qlist(equips) do
            if player:canDiscard(p, equip:getEffectiveId()) then
            dummy:addSubcard(equip)
            end
            end
            if dummy:subcardsLength() > 0 then
            room:throwCard(dummy, p, player)
            end
            end
            end
            p:throwAllHandCards()
            p:turnOver()
            end
            if suit == sgs.Card_Club then
            for _,p in sgs.qlist(use.to) do
            room:acquireSkill(player,"wuhun")
            room:acquireSkill(player,"wumou")
            end
            end
            for _,p in sgs.qlist(use.to) do
            p:gainMark("@nightmare",2)
            end
            end
            end
            end
            }


            IP属地:江苏7楼2017-07-28 09:37
            收起回复
              已解决


              IP属地:河北来自Android客户端8楼2017-07-28 11:30
              回复
                test_one = sgs.CreateTriggerSkill{
                name = "test_one",
                events = {sgs.TargetSpecified},
                on_trigger = function(self, event, player, data)
                local room = player:getRoom()
                local use = data:toCardUse()
                if use.card and use.card:isKindOf("Slash") then
                if room:askForSkillInvoke(player, self:objectName()) then
                local judge = sgs.JudgeStruct()
                judge.pattern = "."
                judge.good = true
                judge.play_animation = false
                judge.reason = self:objectName()
                judge.who = player
                room:judge(judge)
                local suit = judge.card:getSuit()
                if suit == sgs.Card_Heart then
                for _,p in sgs.qlist(use.to) do
                local mhp = sgs.QVariant()
                mhp:setValue(1)
                room:setPlayerProperty(p,"maxhp",mhp)
                room:acquireSkill(p,"tongji")
                end
                end
                if suit == sgs.Card_Diamond then
                for _,p in sgs.qlist(use.to) do
                if p:getMark("used") > 0 then return false end
                local skills = p:getVisibleSkillList()
                local detachList = {}
                for _,skill in sgs.qlist(skills) do
                if not skill:inherits("SPConvertSkill") and not skill:isAttachedLordSkill() then
                table.insert(detachList,"-"..skill:objectName())
                end
                end
                room:handleAcquireDetachSkills(p, table.concat(detachList,"|"))
                room:acquireSkill(p,"jgfanshi")
                room:setPlayerMark(p,"used",1)
                end
                end
                if suit == sgs.Card_Spade then
                for _,p in sgs.qlist(use.to) do
                local equips = p:getEquips()
                if not equips:isEmpty() then
                local dummy = sgs.Sanguosha:cloneCard("slash", sgs.Card_NoSuit, 0)
                for _, equip in sgs.qlist(equips) do
                if player:canDiscard(p, equip:getEffectiveId()) then
                dummy:addSubcard(equip)
                end
                end
                if dummy:subcardsLength() > 0 then
                room:throwCard(dummy, p, player)
                end
                end
                p:throwAllHandCards()
                p:turnOver()
                end
                end
                if suit == sgs.Card_Club then
                for _,p in sgs.qlist(use.to) do
                room:acquireSkill(player,"wuhun")
                room:acquireSkill(player,"wumou")
                end
                end
                for _,p in sgs.qlist(use.to) do
                p:gainMark("@nightmare",2)
                end
                end
                end
                end
                }
                test_two = sgs.CreateTriggerSkill{
                name = "test_two" ,
                events = {sgs.EventPhaseStart} ,
                frequency = sgs.Skill_NotFrequent ,
                on_trigger = function(self, event, player, data)
                local room = player:getRoom()
                local js = room:findPlayerBySkillName(self:objectName())
                if player:getPhase() == sgs.Player_Start and player:isAlive() then
                if room:askForSkillInvoke(js, self:objectName()) then
                local x = player:getMark("@nightmare")
                player:speak(x)
                room:setPlayerProperty(player, "maxhp", sgs.QVariant(player:getMaxHp() + 1))
                player:loseAllMarks("@nightmare")
                local recover = sgs.RecoverStruct()
                recover.who = player
                recover.recover = x
                room:recover(player, recover)
                end
                end
                end ,
                can_trigger = function(self,target)
                return not target:hasSkill(self:objectName())
                end
                }
                test_three = sgs.CreateTriggerSkill{
                name = "test_three" ,
                events = {sgs.EventPhaseStart} ,
                frequency = sgs.Skill_Compulsory ,
                on_trigger = function(self, event, player, data)
                local room = player:getRoom()
                if player:getPhase() == sgs.Player_Start and player:isAlive() then
                local x = player:getMark("@nightmare")
                player:loseAllMarks("@nightmare")
                room:loseHp(player,x)
                end
                end
                }


                IP属地:江苏9楼2017-07-28 12:04
                回复
                  test_one = sgs.CreateTriggerSkill{
                  name = "test_one",
                  events = {sgs.TargetSpecified},
                  on_trigger = function(self, event, player, data)
                  local room = player:getRoom()
                  local use = data:toCardUse()
                  if use.card and use.card:isKindOf("Slash") and not player:hasFlag("test_used") then
                  if room:askForSkillInvoke(player, self:objectName()) then
                  room:setPlayerFlag(player, "test_used")
                  local judge = sgs.JudgeStruct()
                  judge.pattern = "."
                  judge.good = true
                  judge.play_animation = false
                  judge.reason = self:objectName()
                  judge.who = player
                  room:judge(judge)
                  local suit = judge.card:getSuit()
                  if suit == sgs.Card_Heart then
                  for _,p in sgs.qlist(use.to) do
                  local mhp = sgs.QVariant()
                  mhp:setValue(1)
                  room:setPlayerProperty(p,"maxhp",mhp)
                  room:acquireSkill(p,"tongji")
                  end
                  end
                  if suit == sgs.Card_Diamond then
                  for _,p in sgs.qlist(use.to) do
                  if p:getMark("used") > 0 then return false end
                  local skills = p:getVisibleSkillList()
                  local detachList = {}
                  for _,skill in sgs.qlist(skills) do
                  if not skill:inherits("SPConvertSkill") and not skill:isAttachedLordSkill() then
                  table.insert(detachList,"-"..skill:objectName())
                  end
                  end
                  room:handleAcquireDetachSkills(p, table.concat(detachList,"|"))
                  room:acquireSkill(p,"jgfanshi")
                  room:setPlayerMark(p,"used",1)
                  end
                  end
                  if suit == sgs.Card_Spade then
                  for _,p in sgs.qlist(use.to) do
                  local equips = p:getEquips()
                  if not equips:isEmpty() then
                  local dummy = sgs.Sanguosha:cloneCard("slash", sgs.Card_NoSuit, 0)
                  for _, equip in sgs.qlist(equips) do
                  if player:canDiscard(p, equip:getEffectiveId()) then
                  dummy:addSubcard(equip)
                  end
                  end
                  if dummy:subcardsLength() > 0 then
                  room:throwCard(dummy, p, player)
                  end
                  end
                  p:throwAllHandCards()
                  p:turnOver()
                  end
                  end
                  if suit == sgs.Card_Club then
                  for _,p in sgs.qlist(use.to) do
                  room:acquireSkill(player,"wuhun")
                  room:acquireSkill(player,"wumou")
                  end
                  end
                  for _,p in sgs.qlist(use.to) do
                  p:gainMark("@nightmare",2)
                  end
                  end
                  end
                  end
                  }
                  test_two = sgs.CreateTriggerSkill{
                  name = "test_two" ,
                  events = {sgs.EventPhaseStart} ,
                  frequency = sgs.Skill_NotFrequent ,
                  on_trigger = function(self, event, player, data)
                  local room = player:getRoom()
                  local js = room:findPlayerBySkillName(self:objectName())
                  if player:getPhase() == sgs.Player_Start and player:isAlive() then
                  if room:askForSkillInvoke(js, self:objectName()) then
                  local x = player:getMark("@nightmare")
                  player:speak(x)
                  room:setPlayerProperty(player, "maxhp", sgs.QVariant(player:getMaxHp() + 1))
                  player:loseAllMarks("@nightmare")
                  local recover = sgs.RecoverStruct()
                  recover.who = player
                  recover.recover = x
                  room:recover(player, recover)
                  end
                  end
                  end ,
                  can_trigger = function(self,target)
                  return not target:hasSkill(self:objectName())
                  end
                  }
                  test_three = sgs.CreateTriggerSkill{
                  name = "test_three" ,
                  events = {sgs.EventPhaseStart} ,
                  frequency = sgs.Skill_Compulsory ,
                  on_trigger = function(self, event, player, data)
                  local room = player:getRoom()
                  if player:getPhase() == sgs.Player_Start and player:isAlive() then
                  local x = player:getMark("@nightmare")
                  player:loseAllMarks("@nightmare")
                  room:loseHp(player,x)
                  end
                  end
                  }


                  IP属地:江苏10楼2017-07-28 12:11
                  收起回复