太阳神三国杀吧 关注:38,817贴子:472,240
  • 12回复贴,共1

【自制】国战丶旧关张

只看楼主收藏回复



IP属地:四川1楼2014-06-28 17:32回复
    guanxingzhangbao = sgs.General(extension, "guanxingzhangbao", "shu",4)-------------------------------------------------关兴张苞
    fuhun = sgs.CreatePhaseChangeSkill {
    name = "fuhun",
    frequency = sgs.Skill_NotFrequent,
    can_preshow = true,
    on_phasechange = function(self,guanxingzhangbao)
    local room = guanxingzhangbao:getRoom()
    if guanxingzhangbao:getPhase() == sgs.Player_Draw then
    local ids = room:getNCards(2, false)
    local x = 0
    for _,id in sgs.qlist(ids) do
    local card = sgs.Sanguosha:getCard(id)
    if card:isRed() then
    x = x + 1
    end
    guanxingzhangbao:obtainCard(card)
    end
    if x == 1 then
    room:broadcastSkillInvoke(self:objectName(),2)
    room:acquireSkill(guanxingzhangbao, "wusheng")
    room:acquireSkill(guanxingzhangbao, "paoxiao")
    room:setPlayerMark(guanxingzhangbao,"@fuhun",1)
    else
    room:broadcastSkillInvoke(self:objectName(),3)
    end
    return true
    elseifguanxingzhangbao:getPhase() == sgs.Player_Finish then
    if guanxingzhangbao:getMark("@fuhun") > 0 then
    room:setPlayerMark(guanxingzhangbao,"@fuhun",0)
    room:detachSkillFromPlayer(guanxingzhangbao, "wusheng")
    room:detachSkillFromPlayer(guanxingzhangbao, "paoxiao")
    end
    end
    end,
    can_trigger = function(self, event, room, player, data)
    if player and player:isAlive() and player:hasSkill(self:objectName()) then
    if player:getPhase() == sgs.Player_Draw then
    return self:objectName()
    elseif player:getPhase() == sgs.Player_Finish then
    if player:getMark("@fuhun") > 0 then
    return self:objectName()
    end
    end
    end
    return ""
    end,
    on_cost = function(self,event,room,player,data)
    if player:getPhase() == sgs.Player_Draw then
    if player:askForSkillInvoke(self:objectName(), data) then
    room:notifySkillInvoked(player, self:objectName())
    return true
    end
    else
    return true
    end
    return false
    end,
    }
    congfu = sgs.CreateTriggerSkill{
    name = "congfu",
    frequency = sgs.Skill_NotFrequent,
    events = {sgs.TargetChosen},
    can_preshow = true,
    can_trigger = function(self, event, room, player, data)
    local guanxingzhangbao = room:findPlayerBySkillName(self:objectName())
    if guanxingzhangbao and guanxingzhangbao:isAlive() then
    local use = data:toCardUse()
    if use.from and guanxingzhangbao:objectName() == use.from:objectName() then
    if guanxingzhangbao:hasSkill("wusheng") or guanxingzhangbao:hasSkill("paoxiao") then
    if guanxingzhangbao:getMark("@fuhun") == 0 then
    if use.card and use.card:isKindOf("Slash") and use.to:contains(player) and not player:isKongcheng() then
    return self:objectName(), guanxingzhangbao
    end
    end
    end
    end
    end
    return ""
    end,
    on_cost = function(self,event,room,player,data)
    local guanxingzhangbao = room:findPlayerBySkillName(self:objectName())
    if guanxingzhangbao:askForSkillInvoke(self:objectName(),data) then
    room:broadcastSkillInvoke(self:objectName())
    return true
    end
    return false
    end,
    on_effect = function(self,event,room,player,data)
    local guanxingzhangbao = room:findPlayerBySkillName(self:objectName())
    local use = data:toCardUse()
    for _, p in sgs.qlist(use.to) do
    if not p:isAllNude() then
    local card = room:askForCardChosen(guanxingzhangbao, p, "hej", "congfu")
    room:throwCard(card, p)
    end
    end
    return false
    end,
    }
    guanxingzhangbao:addSkill(fuhun)
    guanxingzhangbao:addSkill(congfu)
    guanxingzhangbao:addCompanion("guanyu")
    guanxingzhangbao:addCompanion("zhangfei")
    sgs.LoadTranslationTable{
    ["#guanxingzhangbao"] = "将门虎子",
    ["guanxingzhangbao"] = "关兴&张苞",
    ["illustrator:guanxingzhangbao"] = "LiuHeng",
    ["fuhun"] = "父魂",
    [":fuhun"] = "摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。",
    ["congfu"] = "从父",
    [":congfu"] = "若你已拥有技能“武圣”或“咆哮”且父魂失败时,则你使用【杀】指定一名角色为目标后,你可以弃置其一张牌。",
    ["$congfu"] = "吾父武名,声震海内!",
    ["cv:nos_guanxingzhangbao"] = "喵小林,风叹息",
    ["$fuhun1"] = "吾父武名,声震海内!",
    ["$fuhun2"] = "父魂佑我!",
    ["$fuhun3"] = "父辈功勋,望尘莫及……",
    ["~guanxingzhangbao"] = "东吴未灭,父仇未报,可恨,可恨!",
    }


    IP属地:四川2楼2014-06-28 17:32
    回复
      2026-05-31 22:51:16
      广告
      不感兴趣
      开通SVIP免广告
      0.7.2的 直接贴到任何一个包后面就行


      IP属地:四川3楼2014-06-28 17:33
      收起回复
        简单AI(贴到同一个包的AI后面即可)
        sgs.ai_skill_invoke["fuhun"] = function(self, data)
        return true
        end
        sgs.ai_skill_invoke["congfu"] = function(self, data)
        local use = data:toCardUse()
        if self:isFriend(use.to) then
        return false
        end
        return true
        end


        IP属地:四川4楼2014-06-28 17:39
        回复
          不给图和配音么?


          IP属地:广东5楼2014-06-28 18:41
          收起回复
            太强了吧


            IP属地:广东来自Android客户端6楼2014-06-29 10:26
            收起回复