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"] = "东吴未灭,父仇未报,可恨,可恨!",
}
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"] = "东吴未灭,父仇未报,可恨,可恨!",
}













