代码拉取完成,页面将自动刷新
local extension = Package("rfenghou_han")
extension.extensionName = "aaa_fenghou"
local U = require "packages/utility/utility"
local DIY = require "packages/diy_utility/diy_utility"
Fk:loadTranslationTable{
["rfenghou_han"] = "衰汉",
["han"] = "汉",
}
Fk:appendKingdomMap("god", {"han"})
--FY004 冯习张南 by朱苦力
local fengxizhangnan = General(extension, "rfenghou__fengxizhangnan", "han", 4)
local zhangnan = fk.CreateTriggerSkill{
name = "rfenghou__zhangnan",
anim_type = "defensive",
events = {fk.DamageCaused},
can_trigger = function(self, event, target, player, data)
return target and player:hasSkill(self) and player:getMark("@@rfenghou_readying:::"..self.name) == 0 and
not target.dead and (target.seat < player.seat or target:getAttackRange() < player:getAttackRange())
end,
on_cost = function(self, event, target, player, data)
if player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__zhangnan-invoke:"..target.id..":"..data.to.id) then
self.cost_data = {tos = {data.to.id}}
return true
end
end,
on_use = Util.TrueFunc,
refresh_events = {"fk.RfenghouSkillNulli", "fk.RfenghouSkillReady", fk.EventLoseSkill},
can_refresh = function (self, event, target, player, data)
if target == player and data == self then
if event == "fk.RfenghouSkillNulli" then
return true
else
return player:hasSkill("rfenghou__fengxi", true)
end
end
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
if event == "fk.RfenghouSkillNulli" then
room:handleAddLoseSkills(player, "rfenghou__fengxi", nil, true, false)
else
room:handleAddLoseSkills(player, "-rfenghou__fengxi", nil, true, false)
end
end,
}
zhangnan.RfenghouReadySkill = true
local fengxi = fk.CreateActiveSkill{
name = "rfenghou__fengxi",
anim_type = "offensive",
card_num = 0,
min_target_num = 1,
max_target_num = 2,
prompt = "#rfenghou__fengxi",
can_use = function(self, player)
return player:getMark("@@rfenghou_readying:::"..self.name) == 0
end,
card_filter = Util.FalseFunc,
target_filter = function(self, to_select, selected, selected_cards)
return #selected < 2 and (Fk:currentRoom():getPlayerById(to_select).seat > Self.seat or
Fk:currentRoom():getPlayerById(to_select).hp > Self.hp)
end,
feasible = function (self, selected, selected_cards)
if #selected == 1 then
return true
elseif #selected == 2 then
if Fk:currentRoom():getPlayerById(selected[1]).seat > Self.seat and
Fk:currentRoom():getPlayerById(selected[1]).hp > Self.hp then
return true
else
if Fk:currentRoom():getPlayerById(selected[1]).seat > Self.seat then
return Fk:currentRoom():getPlayerById(selected[2]).hp > Self.hp
else
return Fk:currentRoom():getPlayerById(selected[2]).seat > Self.seat
end
end
end
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
room:sortPlayersByAction(effect.tos)
for _, id in ipairs(effect.tos) do
local p = room:getPlayerById(id)
if not p.dead then
room:damage{
from = player,
to = p,
damage = 1,
skillName = self.name,
}
end
end
end,
}
fengxi.RfenghouReadySkill = true
local fengxi_trigger = fk.CreateTriggerSkill{
name = "#rfenghou__fengxi_trigger",
mute = true,
events = {"fk.RfenghouSkillReady"},
can_trigger = function (self, event, target, player, data)
return target == player and data == fengxi
end,
on_cost = Util.TrueFunc,
on_use = function (self, event, target, player, data)
player:drawCards(3, "rfenghou__fengxi")
end,
}
fengxi:addRelatedSkill(fengxi_trigger)
fengxizhangnan:addSkill(zhangnan)
fengxizhangnan:addRelatedSkill(fengxi)
Fk:loadTranslationTable{
["rfenghou__fengxizhangnan"] = "冯习张南",
["#rfenghou__fengxizhangnan"] = "火中躯砺",
["illustrator:rfenghou__fengxizhangnan"] = "食茸",
["designer:rfenghou__fengxizhangnan"] = "zzcclll朱苦力",
["rfenghou__zhangnan"] = "障南",
[":rfenghou__zhangnan"] = "<a href='rfenghou_ready_skill'>蓄势技</a>,座次或攻击范围小于你的角色造成伤害时,你可以防止之。此技能行置期间,"..
"你视为拥有技能〖锋西〗。",
["rfenghou__fengxi"] = "锋西",
[":rfenghou__fengxi"] = "<a href='rfenghou_ready_skill'>蓄势技</a>,出牌阶段,你可以对一名座次大于你和一名体力值大于你的角色各造成1点伤害。"..
"此技能重置时,你摸三张牌。",
["#rfenghou__zhangnan-invoke"] = "障南:是否防止 %src 对 %dest 造成的伤害?",
["#rfenghou__fengxi"] = "锋西:对一名座次大于你和一名体力值大于你的角色各造成1点伤害",
["@@rfenghou_readying:::rfenghou__zhangnan"] = "障南失效",
["@@rfenghou_readying:::rfenghou__fengxi"] = "锋西失效",
["$rfenghou__zhangnan1"] = "柱石七尺,鼠辈岂可逾越?",
["$rfenghou__zhangnan2"] = "摧城破敌,吴贼不足挂齿。",
["$rfenghou__fengxi1"] = "男儿当封侯,焉能守旧丘。",
["$rfenghou__fengxi2"] = "落日照大旗,出师亘长云!",
["~rfenghou__fengxizhangnan"] = "殁于王事,我等无憾。",
}
--FY005 刘岱 by白驹
local liudai = General(extension, "rfenghou__liudai", "han", 4)
local shuzhou = fk.CreateTriggerSkill{
name = "rfenghou__shuzhou",
anim_type = "control",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player.phase == Player.Start and #player.room.alive_players > 1
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__shuzhou-invoke")
end,
on_use = function(self, event, target, player, data)
local room = player.room
room:doIndicate(player.id, table.map(room:getOtherPlayers(player), Util.IdMapper))
room.tag[self.name] = room.tag[self.name] or {}
if room.tag[self.name][string.format("%.0f", player.id)] then
local record = room.tag[self.name][string.format("%.0f", player.id)]
for _, p in ipairs(room:getOtherPlayers(player)) do
if table.contains(record[1], p.id) then
room:removePlayerMark(p, "@rfenghou__shuzhou_give", 1)
elseif table.contains(record[2], p.id) then
room:removePlayerMark(p, "@rfenghou__shuzhou_nogive", 1)
end
end
end
local record = {{}, {}}
for _, p in ipairs(room:getOtherPlayers(player)) do
if player.dead then break end
if not p.dead then
if p:isNude() then
room:addPlayerMark(p, "@rfenghou__shuzhou_nogive", 1)
table.insert(record[2], p.id)
else
local card = room:askForCard(p, 1, 1, true, self.name, true, nil, "#rfenghou__shuzhou-give:"..player.id)
if #card > 0 then
room:addPlayerMark(p, "@rfenghou__shuzhou_give", 1)
table.insert(record[1], p.id)
room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonGive, self.name, nil, false, p.id)
else
room:addPlayerMark(p, "@rfenghou__shuzhou_nogive", 1)
table.insert(record[2], p.id)
end
end
end
end
room.tag[self.name][string.format("%.0f", player.id)] = record
end,
refresh_events = {fk.DamageCaused},
can_refresh = function (self, event, target, player, data)
return target and target == player and player.room.tag[self.name]
end,
on_refresh = function (self, event, target, player, data)
local n = 0
for _, record in pairs(player.room.tag[self.name]) do
if table.contains(record[1], player.id) and table.contains(record[2], data.to.id) then
n = n + 1
end
if table.contains(record[2], player.id) and table.contains(record[1], data.to.id) then
n = n + 1
end
end
data.damage = data.damage + n
end,
}
--[[local liye = fk.CreateViewAsSkill{
name = "rfenghou__liye",
anim_type = "offensive",
pattern = "slash",
prompt = "#rfenghou__liye",
card_filter = function(self, to_select, selected)
if #selected == 0 then
return true
elseif #selected == 1 then
return Fk:getCardById(to_select).suit == Fk:getCardById(selected[1]).suit
end
end,
view_as = function(self, cards)
if #cards ~= 2 then return end
local card = Fk:cloneCard("slash")
card:addSubcards(cards)
card.skillName = self.name
return card
end,
before_use = function (self, player, use)
local room = player.room
local all_targets = table.simpleClone(TargetGroup:getRealTargets(use.tos))
local tos = table.simpleClone(all_targets)
room:broadcastPlaySound("./packages/standard_cards/audio/card/"..(player.gender == General.Male and "male" or "female").."/slash")
room:doIndicate(player.id, tos)
for _, id in ipairs(TargetGroup:getRealTargets(use.tos)) do
local to = room:getPlayerById(id)
while to ~= player do
local targets = table.filter(room:getOtherPlayers(player), function (p)
return not table.contains(all_targets, p.id) and not player:isProhibited(p, use.card)
end)
if #targets > 0 then
local t = room:askForChoosePlayers(to, table.map(targets, Util.IdMapper), 1, 1,
"#rfenghou__liye-choose:"..player.id, self.name, true)
if #t > 0 then
table.insert(all_targets, t[1])
table.insert(tos, t[1])
table.removeOne(tos, to.id)
room:sortPlayersByAction(tos)
room:sendLog({
type = "#RfuyaoLiyeTargets",
from = to.id,
to = tos,
toast = true,
})
to = room:getPlayerById(t[1])
else
to = player
end
else
to = player
end
end
end
if table.find(tos, function (id)
return not table.contains(TargetGroup:getRealTargets(use.tos), id)
end) then
room:sortPlayersByAction(all_targets)
room:sortPlayersByAction(tos)
for _, id in ipairs(TargetGroup:getRealTargets(use.tos)) do
TargetGroup:removeTarget(use.tos, id)
end
if room:askForSkillInvoke(player, self.name, nil, "#rfenghou__liye-invoke") then
for _, id in ipairs(all_targets) do
TargetGroup:pushTargets(use.tos, id)
end
room:loseHp(player, 1, self.name)
else
for _, id in ipairs(tos) do
TargetGroup:pushTargets(use.tos, id)
end
end
end
end,
enabled_at_response = function (self, player, response)
return not response
end,
}
local liye_targetmod = fk.CreateTargetModSkill{
name = "#rfenghou__liye_targetmod",
bypass_distances = function(self, player, skill, card, to)
return card and table.contains(card.skillNames, "rfenghou__liye")
end,
}
liye:addRelatedSkill(liye_targetmod)]]--
local kuizhul = fk.CreateTriggerSkill{
name = "rfenghou__kuizhul",
anim_type = "control",
events = {fk.EventPhaseChanging},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and data.to == Player.Start and not target.dead and target ~= player and
player:canPindian(target)
end,
on_cost = function(self, event, target, player, data)
if player.room:askForSkillInvoke(player, self.name, data, "#rfenghou__kuizhul-invoke::"..target.id) then
self.cost_data = {tos = {target.id}}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local pindian = player:pindian({target}, self.name)
local winner = pindian.results[target.id].winner
if winner and not winner.dead then
local choices = {"phase_draw", "phase_discard"}
if pindian.fromCard:compareSuitWith(pindian.results[target.id].toCard) then
table.insert(choices, "rfenghou__kuizhul3")
end
local choice = room:askForChoice(winner, choices, self.name, "#rfenghou__kuizhul-choice::"..target.id)
if choice == "phase_draw" then
data.to = Player.Draw
elseif choice == "phase_discard" then
data.to = Player.Discard
elseif choice == "rfenghou__kuizhul3" then
data.to = Player.Play
if not target.dead and not target:hasSkill("luanji", true) then
room:setPlayerMark(target, "rfenghou__kuizhul-phase", 1)
end
end
end
end,
refresh_events = {fk.EventPhaseStart, fk.EventPhaseSkipped},
can_refresh = function (self, event, target, player, data)
if target == player and player:getMark("rfenghou__kuizhul-phase") > 0 then
if event == fk.EventPhaseStart then
return player.phase == Player.Play
elseif event == fk.EventPhaseSkipped then
return true
end
end
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
room:setPlayerMark(player, "rfenghou__kuizhul-phase", 0)
if event == fk.EventPhaseStart then
if not player:hasSkill("luanji", true) then
room:handleAddLoseSkills(player, "luanji", nil, true, false)
room.logic:getCurrentEvent():findParent(GameEvent.Phase, true):addCleaner(function()
room:handleAddLoseSkills(player, "-luanji")
end)
end
end
end,
}
liudai:addSkill(shuzhou)
--liudai:addSkill(liye)
liudai:addSkill(kuizhul)
Fk:loadTranslationTable{
["rfenghou__liudai"] = "刘岱",
["#rfenghou__liudai"] = "赴入辕哂",
["illustrator:rfenghou__liudai"] = "sier",
["designer:rfenghou__liudai"] = "白驹",
["cv:rfenghou__liudai"] = "白蓝海嗣",
["rfenghou__shuzhou"] = "束州",
[":rfenghou__shuzhou"] = "准备阶段,你可以令其他角色依次选择是否交给你一张牌,然后直到你下次发动此技能,这些角色中选择交出牌和"..
"不交出牌的角色相互造成的伤害+1。",
["rfenghou__liye"] = "立野",
[":rfenghou__liye"] = "你可以将两张花色相同的牌当无距离限制的【杀】使用。当你以此法使用【杀】声明目标后,目标角色可以将目标转移给另一名"..
"未成为过此次目标的其他角色,重复此流程。最后,你可以失去1点体力,指定所有此流程中被指定过的角色为目标。",
["rfenghou__kuizhul"] = "揆助",
[":rfenghou__kuizhul"] = "其他角色的准备阶段,你可以与其拼点,赢的角色选择将此阶段改为摸牌或弃牌阶段,若两张拼点牌花色相同,也可以选择改为"..
"拥有“乱击”的出牌阶段。",
["#rfenghou__shuzhou-invoke"] = "束州:你可以令所有其他角色选择是否交给你一张牌",
["#rfenghou__shuzhou-give"] = "束州:是否交给 %src 一张牌?",
["@rfenghou__shuzhou_give"] = "束州 交出牌",
["@rfenghou__shuzhou_nogive"] = "束州 未交出牌",
["#rfenghou__liye"] = "立野:将两张花色相同的牌当无距离限制的【杀】使用",
["#rfenghou__liye-choose"] = "立野:%src 对你使用【杀】,是否将目标转移给另一名角色?",
["#RfuyaoLiyeTargets"] = "%from 转移了目标,现在目标是 %to",
["#rfenghou__liye-invoke"] = "立野:是否失去1点体力,将目标改为所有被指定过的角色?",
["#rfenghou__kuizhul-invoke"] = "揆助:是否与 %dest 拼点?赢者可以将此准备阶段改为另一个阶段",
["#rfenghou__kuizhul-choice"] = "揆助:将 %dest 此准备阶段改为另一个阶段",
["rfenghou__kuizhul3"] = "出牌阶段,且拥有“乱击”",
["$rfenghou__shuzhou1"] = "持节北度,镇慰州郡,效祖先故事。",
["$rfenghou__shuzhou2"] = "拥兵专地、不尊汉辞,天下可复救乎?",
["$rfenghou__liye1"] = "纷乱至斯,德不在室,唯求诸于野。",
["$rfenghou__liye2"] = "保惠庶民、不悔鳏寡;小人之依,何处可求?",
["~rfenghou__liudai"] = "万人异心,一木难支……",
}
--FY009 伍琼种辑 by黄泉
local wuqiongchongji = General(extension, "rfenghou__wuqiongchongji", "han", 4)
local xiuchou = fk.CreateTriggerSkill{
name = "rfenghou__xiuchou",
anim_type = "offensive",
events = {"fk.GeneralAppeared", fk.DamageCaused},
can_trigger = function (self, event, target, player, data)
if target == player and player:hasShownSkill(self) then
if event == "fk.GeneralAppeared" then
return not player:isKongcheng()
elseif event == fk.DamageCaused then
return data.damage >= (data.to.hp + data.to.shield) and player.general ~= "hiddenone"
end
end
end,
on_cost = Util.TrueFunc,
on_use = function (self, event, target, player, data)
local room = player.room
if event == "fk.GeneralAppeared" then
local n = #table.filter(player:getCardIds("h"), function (id)
return not player:prohibitDiscard(id)
end)
room:setPlayerMark(player, self.name, n)
player:throwAllCards("h")
if player.dead then return end
local to = room:askForChoosePlayers(player, table.map(room.alive_players, Util.IdMapper), 1, 1,
"#rfenghou__xiuchou-choose", self.name, false)
room:damage{
from = player,
to = room:getPlayerById(to[1]),
damage = 1,
skillName = self.name,
}
elseif event == fk.DamageCaused then
DIY.EnterHidden(player)
end
end,
}
xiuchou.isHiddenSkill = true
--[[local renxie = fk.CreateActiveSkill{
name = "rfenghou__renxie",
anim_type = "drawcard",
card_num = function ()
local n = Self:getHandcardNum() - Self:getMark("rfenghou__xiuchou")
if n > 0 then
return n
else
return 0
end
end,
target_num = 0,
prompt = function (self)
local n = Self:getMark(self.name)
local n2 = Self:getHandcardNum() > Self:getMark("rfenghou__xiuchou") and 2 or 1
if n ~= n2 then
n = 0
end
return "#rfenghou__renxie"..n..":::"..Self:getMark("rfenghou__xiuchou")
end,
can_use = function(self, player)
return player:getHandcardNum() ~= player:getMark("rfenghou__xiuchou")
end,
card_filter = function (self, to_select, selected)
local n = Self:getHandcardNum() - Self:getMark("rfenghou__xiuchou")
if n > 0 then
return #selected < n and not Self:prohibitDiscard(to_select) and table.contains(Self:getCardIds("h"), to_select)
else
return false
end
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local status = player:getMark(self.name)
if #effect.cards == 0 then
player:drawCards(player:getMark("rfenghou__xiuchou") - player:getHandcardNum(), self.name)
room:setPlayerMark(player, self.name, 1)
else
room:throwCard(effect.cards, self.name, player, player)
room:setPlayerMark(player, self.name, 2)
end
if player.dead or status ~= player:getMark(self.name) then return end
if status == 1 then
room:loseHp(player, 1, self.name)
else
U.askForUseVirtualCard(room, player, "slash", nil, self.name, "#rfenghou__renxie-slash", true, true, false, true)
end
end,
}]]--
local renxie = fk.CreateActiveSkill{
name = "rfenghou__renxie",
anim_type = "drawcard",
card_num = 0,
target_num = 0,
prompt = function (self)
local n = Self:getMark(self.name)
--[[local n2 = Self:getHandcardNum() > Self:getMark("rfenghou__xiuchou") and 2 or 1
if n ~= n2 then
n = 0
end]]--
return "#rfenghou__renxie0:::"..Self:getMark("rfenghou__xiuchou")
end,
can_use = function(self, player)
return player:getHandcardNum() < player:getMark("rfenghou__xiuchou")
end,
card_filter = Util.FalseFunc,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
player:drawCards(player:getMark("rfenghou__xiuchou") - player:getHandcardNum(), self.name)
if player.dead then return end
if #player.room.logic:getEventsOfScope(GameEvent.Death, 1, function (e)
return true
end, Player.HistoryTurn) == 0 then
room:loseHp(player, 1, self.name)
end
end,
}
wuqiongchongji:addSkill(xiuchou)
wuqiongchongji:addSkill(renxie)
Fk:loadTranslationTable{
["rfenghou__wuqiongchongji"] = "伍琼种辑",
["#rfenghou__wuqiongchongji"] = "白衣无顾",
["illustrator:rfenghou__wuqiongchongji"] = "食茸",
["designer:rfenghou__wuqiongchongji"] = "黄泉",
["cv:rfenghou__wuqiongchongji"] = "子瞻&妙啊",
["rfenghou__xiuchou"] = "袖雠",
[":rfenghou__xiuchou"] = "隐匿技,你登场后,你须弃置全部手牌,然后对一名角色造成1点伤害。当你对一名角色造成致命伤害时,"..
"<a href='rfenghou__enterhidden'>进入隐匿状态</a>。",
["rfenghou__renxie"] = "衽血",
--[[[":rfenghou__renxie"] = "出牌阶段,你可以将手牌数调整至X(X你为上次发动〖袖雠〗弃置牌数),若你连续发动此技能均为摸/弃置牌,你失去1点体力/"..
"视为使用一张【杀】。",]]--
[":rfenghou__renxie"] = "出牌阶段,你可以将手牌数摸至X(X你为上次发动〖袖雠〗弃置牌数),若本回合没有角色死亡,你失去1点体力。",
["#rfenghou__xiuchou-choose"] = "袖雠:对一名角色造成1点伤害",
--["#rfenghou__renxie0"] = "衽血:将手牌数调整至%arg",
["#rfenghou__renxie0"] = "衽血:将手牌摸至%arg",
["#rfenghou__renxie1"] = "衽血:将手牌数调整至%arg,然后失去1点体力",
["#rfenghou__renxie2"] = "衽血:将手牌数调整至%arg,然后视为使用一张【杀】",
["#rfenghou__renxie-slash"] = "衽血:你可以视为使用一张【杀】",
["$rfenghou__xiuchou1"] = "今者同赴国难,义在必行!",
["$rfenghou__xiuchou2"] = "《诗》云:无言不酬、无德不报。此之谓也。",
["$rfenghou__renxie1"] = "顺道而动,天下为向;因民而虑,天下为斗!",
["$rfenghou__renxie2"] = "壮士除贼,不得不尔,吾等岂乐杀人?",
["~rfenghou__wuqiongchongji"] = "不能为国家除贼,乃天数也……",
}
--FY010 杨奉韩暹 by楚萱
local yangfenghanxian = General(extension, "rfenghou__yangfenghanxian", "han", 4)
local kouyong = fk.CreateTriggerSkill{
name = "rfenghou__kouyong",
anim_type = "control",
events = {fk.Damaged},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and not target.dead and player:inMyAttackRange(target) and not target:isAllNude() and
not (player:isProhibited(target, Fk:cloneCard("dismantlement")) and player:isProhibited(target, Fk:cloneCard("snatch")))
end,
on_cost = function(self, event, target, player, data)
local choices = table.filter({"dismantlement", "snatch"}, function (name)
return not player:isProhibited(target, Fk:cloneCard(name))
end)
table.insert(choices, "Cancel")
local choice = player.room:askForChoice(player, choices, self.name,
"#rfenghou__kouyong-invoke::"..target.id, false, {"dismantlement", "snatch", "Cancel"})
if choice ~= "Cancel" then
self.cost_data = {choice = choice}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local choice = self.cost_data.choice
local card = Fk:cloneCard(choice)
card.skillName = self.name
local use = {
from = player.id,
tos = {{ target.id }},
card = card,
}
if choice == "dismantlement" then
use.extra_data = use.extra_data or {}
use.extra_data.rfenghou__kouyong = player.id
end
room:useCard(use)
if choice == "dismantlement" and not player.dead then
local cards = player:getTableMark("rfenghou__kouyong-tmp")
room:setPlayerMark(player, "rfenghou__kouyong-tmp", 0)
cards = table.filter(cards, function (id)
local c = Fk:getCardById(id)
return table.contains(room.discard_pile, id) and
(player:canUseTo(c, target, {bypass_times = true}) or player:canUseTo(c, player, {bypass_times = true}))
end)
if #cards > 0 then
local use2 = U.askForUseRealCard(room, player, cards, nil, self.name,
"#rfenghou__kouyong-use::"..target.id,
{
expand_pile = cards,
bypass_times = true,
extraUse = true,
exclusive_targets = {player.id, target.id},
},
true, true)
if use2 then
if #use2.tos == 0 then
if use2.card.multiple_targets then
use2.tos = {}
for _, p in ipairs({player, target}) do
if not player:isProhibited(p, use2.card) then
if use2.card.skill:modTargetFilter(p.id, {}, player.id, card, false) then
table.insert(use2.tos, {p.id})
end
end
end
else
use2.tos = {{player.id}}
end
end
room:useCard(use2)
end
end
elseif choice == "snatch" and not target.dead then
target:drawCards(1, self.name)
end
end,
}
local kouyong_delay = fk.CreateTriggerSkill{
name = "#rfenghou__kouyong_delay",
refresh_events = {fk.AfterCardsMove},
can_refresh = function(self, event, target, player, data)
if not player.dead then
local cards = {}
for _, move in ipairs(data) do
if move.toArea == Card.DiscardPile and move.moveReason == fk.ReasonDiscard and move.skillName == "dismantlement_skill" then
local use_event = player.room.logic:getCurrentEvent():findParent(GameEvent.UseCard)
if use_event ~= nil then
local use = use_event.data[1]
if (use.extra_data or {}).rfenghou__kouyong == player.id then
for _, info in ipairs(move.moveInfo) do
if table.contains(player.room.discard_pile, info.cardId) then
table.insertIfNeed(cards, info.cardId)
end
end
end
end
end
end
if #cards > 0 then
cards = U.moveCardsHoldingAreaCheck(player.room, cards)
if #cards > 0 then
self.cost_data = cards
return true
end
end
end
end,
on_refresh = function(self, event, target, player, data)
player.room:setPlayerMark(player, "rfenghou__kouyong-tmp", self.cost_data)
end,
}
local weiming = fk.CreateTriggerSkill{
name = "rfenghou__weiming",
anim_type = "negative",
frequency = Skill.Compulsory,
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) then
for _, move in ipairs(data) do
if move.to == player.id and move.toArea == Player.Hand then
return table.every(player.room.alive_players, function (p)
return player:getHandcardNum() >= p:getHandcardNum()
end)
end
end
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local turn_event = room.logic:getCurrentEvent():findParent(GameEvent.Turn)
local skill = "ol_ex__yaowu"
if turn_event == nil or turn_event.data[1] ~= player then
skill = "jiaozi"
end
if not player:hasSkill(skill, true) then
room:setPlayerMark(player, "rfenghou__weiming_"..skill, 1)
room:handleAddLoseSkills(player, skill, nil, true, false)
elseif player:getMark("rfenghou__weiming_"..skill) > 0 and player:isWounded() --[[and
table.every(room:getOtherPlayers(player), function (p)
return p:getHandcardNum() < player:getHandcardNum()
end)]]--
then
room:recover({
who = player,
num = 1,
recoverBy = player,
skillName = self.name,
})
end
end,
refresh_events = {fk.SkillEffect},
can_refresh = function (self, event, target, player, data)
return target == player and player:getMark("rfenghou__weiming_"..data.name) > 0
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
room:setPlayerMark(player, "rfenghou__weiming_"..data.name, 0)
room:handleAddLoseSkills(player, "-"..data.name, nil, true, false)
end,
}
kouyong:addRelatedSkill(kouyong_delay)
yangfenghanxian:addSkill(kouyong)
yangfenghanxian:addSkill(weiming)
yangfenghanxian:addRelatedSkill("ol_ex__yaowu")
yangfenghanxian:addRelatedSkill("jiaozi")
Fk:loadTranslationTable{
["rfenghou__yangfenghanxian"] = "杨奉韩暹",
["#rfenghou__yangfenghanxian"] = "权驱龙辇",
["illustrator:rfenghou__yangfenghanxian"] = "食茸",
["designer:rfenghou__yangfenghanxian"] = "楚萱",
["cv:rfenghou__yangfenghanxian"] = "KEVIN&妙啊",
["rfenghou__kouyong"] = "寇勇",
[":rfenghou__kouyong"] = "当你攻击范围内的角色受到伤害后,你可以选择一项:1.视为对其使用一张【过河拆桥】,然后你可以对你或其使用"..
"因此被弃置的牌;2.视为对其使用一张【顺手牵羊】,然后其摸一张牌。",
["rfenghou__weiming"] = "威命",
[":rfenghou__weiming"] = "锁定技,当你的手牌数成为全场最多时,若此时为你的回合内/外,你获得〖耀武〗/〖骄恣〗至你发动之;"..
"若你已有对应技能,则改为回复1点体力。",
["#rfenghou__kouyong-invoke"] = "寇勇:你可以视为对 %dest 使用【过河拆桥】或【顺手牵羊】",
["#rfenghou__kouyong-use"] = "寇勇:你可以对你或 %dest 使用被弃置的牌",
["$rfenghou__kouyong1"] = "蹂稼穑、夺妇女,勇力傍身,有何不可!",
["$rfenghou__kouyong2"] = "大将克敌,焚掠肆杀,士众自然用命。",
["$rfenghou__weiming1"] = "朝廷官爵威福,今操在谁手?",
["$rfenghou__weiming2"] = "汉皇承天威命,某家携之,亦可用!",
["$ol_ex__yaowu_rfenghou__yangfenghanxian"] = "陛下行幸,宵小岂敢窥视?",
["$jiaozi_rfenghou__yangfenghanxian"] = "护驾东归,元功于国,某必名垂竹帛!",
["~rfenghou__yangfenghanxian"] = "若有前知,何至于此……",
}
--FY014 刘渊 by yyuaN
local liuyuan = General(extension, "rfenghou__liuyuan", "han", 4)
local fuzhi = fk.CreateTriggerSkill{
name = "rfenghou__fuzhi",
anim_type = "special",
events = {fk.TurnEnd},
can_trigger = function (self, event, target, player, data)
return player:hasSkill(self) and (player:getMark("rfenghou__fuzhi-turn") > 0 or
table.contains(player:getTableMark("@[:]rfenghou__zhuozheng"), self.name))
end,
on_cost = Util.TrueFunc,
on_use = function (self, event, target, player, data)
local room = player.room
if player:usedSkillTimes(self.name, Player.HistoryRound) > 1 then
room:loseHp(player, 1, self.name)
if player.dead then return end
end
DIY.EnterHidden(player)
if player.dead then return end
room.tag[self.name] = room.tag[self.name] or {}
if #room.tag[self.name] == 0 then
for name, s in pairs(Fk.skills) do
if s.isHiddenSkill and name ~= self.name and name ~= "rfenghou__pozhi" then
table.insert(room.tag[self.name], name)
end
end
elseif player:usedSkillTimes(self.name, Player.HistoryGame) == 2 then
table.insertIfNeed(room.tag[self.name], "rfenghou__pozhi")
end
local skills = table.filter(room.tag[self.name], function (name)
return not player:hasSkill(name, true)
end)
if #skills > 0 then
room:handleAddLoseSkills(player, table.random(skills), nil, true, false)
end
end,
refresh_events = {"fk.GeneralAppeared"},
can_refresh = function (self, event, target, player, data)
return target == player and player:hasShownSkill(self, true)
end,
on_refresh = function (self, event, target, player, data)
player.room:setPlayerMark(player, "rfenghou__fuzhi-turn", 1)
end,
}
fuzhi.isHiddenSkill = true
local zhuozheng = fk.CreateTriggerSkill{
name = "rfenghou__zhuozheng",
anim_type = "special",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self) and player.phase == Player.Play then
local choices = {"Cancel"}
for _, skill in ipairs({"rfenghou__fuzhi", "rfenghou__zhuozheng", "rfenghou__zuhe", "rfenghou__pozhi"}) do
if player:hasSkill(skill, true) and not table.contains(player:getTableMark("@[:]rfenghou__zhuozheng"), skill) then
table.insert(choices, skill)
end
end
for _, skill in ipairs(player.player_skills) do
if skill.isHiddenSkill and not table.contains(player:getTableMark("@[:]rfenghou__zhuozheng"), skill.name) then
table.insertIfNeed(choices, skill.name)
end
end
if #choices > 0 then
self.cost_data = choices
return true
end
end
end,
on_cost = function(self, event, target, player, data)
local choice = player.room:askForChoice(player, self.cost_data, self.name, "#rfenghou__zhuozheng-choice", true)
if choice ~= "Cancel" then
self.cost_data = choice
return true
end
end,
on_use = function(self, event, target, player, data)
player.room:addTableMark(player, "@[:]rfenghou__zhuozheng", self.cost_data)
end,
}
local zhuozheng_delay = fk.CreateTriggerSkill{
name = "#rfenghou__zhuozheng_delay",
mute = true,
events = {fk.EventPhaseEnd},
can_trigger = function(self, event, target, player, data)
if target.phase == Player.Play and player:getMark("@[:]rfenghou__zhuozheng") ~= 0 and
target.hp == player.hp and target:getHandcardNum() == player:getHandcardNum() then
local yes = false
player.room:setPlayerMark(player, "rfenghou__zhuozheng-tmp", 1)
for _, s in ipairs(player:getMark("@[:]rfenghou__zhuozheng")) do
local skill = Fk.skills[s]
if player:hasSkill(s) and skill:triggerable(skill.events[1], target, player, data) then
yes = true
end
end
player.room:setPlayerMark(player, "rfenghou__zhuozheng-tmp", 0)
return yes
end
end,
on_trigger = function(self, event, target, player, data)
local room = player.room
room:setPlayerMark(player, "rfenghou__zhuozheng-tmp", 1)
local skill_names = table.simpleClone(table.filter(player:getMark("@[:]rfenghou__zhuozheng"), function (s)
local skill = Fk.skills[s]
if player:hasSkill(s) and skill:triggerable(skill.events[1], target, player, data) then
return true
end
end))
room:setPlayerMark(player, "rfenghou__zhuozheng-tmp", 0)
while not player.dead and #skill_names > 0 do
local skill_name = room:askForChoice(player, skill_names, "trigger", "#choose-trigger")
table.removeOne(skill_names, skill_name)
local skill = Fk.skills[skill_name]
skill:trigger(skill.events[1], target, player, data)
room:setPlayerMark(player, "rfenghou__zhuozheng-tmp", 1)
skill_names = table.filter(skill_names, function (s)
return player:hasSkill(s)
end)
room:setPlayerMark(player, "rfenghou__zhuozheng-tmp", 0)
end
end,
}
local zhuozheng_invalidity = fk.CreateInvaliditySkill {
name = "#rfenghou__zhuozheng_invalidity",
invalidity_func = function(self, from, skill)
if from:getMark("@[:]rfenghou__zhuozheng") ~= 0 and from:getMark("rfenghou__zhuozheng-tmp") == 0 then
return table.contains(from:getMark("@[:]rfenghou__zhuozheng"), skill.name)
end
end
}
local zuhe = fk.CreateTriggerSkill{
name = "rfenghou__zuhe$",
anim_type = "drawcard",
events = {fk.HpRecover},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self) and not player:isWounded() then
local surnames = {}
for _, p in ipairs(player.room.alive_players) do
if p.kingdom == "han" then
local name = Fk:translate(p.general, "zh_CN")
table.insertIfNeed(surnames, name[1])
if name:len() > 3 then
table.insertIfNeed(surnames, name[3])
end
end
end
local n = #surnames - player:getHandcardNum()
if n > 0 then
self.cost_data = n
return true
end
end
end,
on_use = function(self, event, target, player, data)
player:drawCards(self.cost_data, self.name)
end,
}
local pozhi = fk.CreateTriggerSkill{
name = "rfenghou__pozhi",
anim_type = "offensive",
events = {"fk.GeneralAppeared"},
can_trigger = function (self, event, target, player, data)
return target == player and player:hasShownSkill(self, true)
end,
on_cost = Util.TrueFunc,
on_use = function (self, event, target, player, data)
local room = player.room
local choices = {}
for _, skill in ipairs(player.player_skills) do
if skill.isHiddenSkill then
table.insert(choices, skill.name)
end
end
local prompt = "#rfenghou__pozhi-choice"
if player:usedSkillTimes(self.name, Player.HistoryGame) == 1 and table.contains(choices, "rfenghou__fuzhi") then
prompt = "#rfenghou__pozhi1-choice"
end
local choice = room:askForChoices(player, choices, 1, #choices, self.name, prompt, false, true)
if prompt == "#rfenghou__pozhi1-choice" then
table.insertIfNeed(choice, "rfenghou__fuzhi")
end
room:handleAddLoseSkills(player, "-"..table.concat(choice, "|-"), nil, true, false)
if player.dead then return end
local total = #choice
--[[while total > 0 do
room:setPlayerMark(player, "rfenghou__pozhi-tmp", total)
local _, dat = room:askForUseActiveSkill(player, "rfenghou__pozhi_active",
"#rfenghou__pozhi-num:::"..total, false)
local to = room:getPlayerById(dat.targets[1])
room:addPlayerMark(to, "@rfenghou__pozhi_count", dat.interaction)
total = total - dat.interaction
end
for _, p in ipairs(room:getAlivePlayers()) do
if p:getMark("@rfenghou__pozhi_count") > 0 then
room:damage{
from = player,
to = p,
damage = p:getMark("@rfenghou__pozhi_count"),
skillName = self.name,
}
room:setPlayerMark(p, "@rfenghou__pozhi_count", 0)
end
end]]--
local tos = room:askForChoosePlayers(player, table.map(room.alive_players, Util.IdMapper), 1, total,
"#rfenghou__pozhi-damage:::"..total, self.name, true)
if #tos > 0 then
room:sortPlayersByAction(tos)
for _, id in ipairs(tos) do
local p = room:getPlayerById(id)
if not p.dead then
room:damage{
from = player,
to = p,
damage = 1,
skillName = self.name,
}
end
end
end
end,
}
local pozhi_active = fk.CreateActiveSkill{
name = "rfenghou__pozhi_active",
card_num = 0,
target_num = 1,
interaction = function()
return UI.Spin {
from = 1,
to = Self:getMark("rfenghou__pozhi-tmp"),
}
end,
card_filter = Util.FalseFunc,
target_filter = function (self, to_select, selected)
return #selected == 0
end,
}
pozhi.isHiddenSkill = true
--Fk:addSkill(pozhi_active)
zhuozheng:addRelatedSkill(zhuozheng_delay)
zhuozheng:addRelatedSkill(zhuozheng_invalidity)
liuyuan:addSkill(fuzhi)
liuyuan:addSkill(zhuozheng)
liuyuan:addSkill(zuhe)
liuyuan:addRelatedSkill(pozhi)
Fk:loadTranslationTable{
["rfenghou__liuyuan"] = "刘渊",
["#rfenghou__liuyuan"] = "思穹志海",
["illustrator:rfenghou__liuyuan"] = "sier",
["designer:rfenghou__liuyuan"] = "yyuaN",
["cv:rfenghou__liuyuan"] = "KEVIN",
["rfenghou__fuzhi"] = "缚枝",
[":rfenghou__fuzhi"] = "隐匿技,你登场的回合结束时,<a href='rfenghou__enterhidden'>进入隐匿状态</a>并随机获得一个隐匿技"..
"(若不为本轮首次发动此技能,你先失去1点体力),然后本局游戏隐匿技能库中加入一个特殊隐匿技〖破桎〗。",
["rfenghou__zhuozheng"] = "琢政",
[":rfenghou__zhuozheng"] = "出牌阶段开始时,你可以将此武将牌上的一个技能或你拥有的一个隐匿技的时机修改为:体力值和手牌数均与你相等的角色"..
"出牌阶段结束时。<br>(点击“琢政”标记可以查看修改过的技能)",
["rfenghou__zuhe"] = "族合",
[":rfenghou__zuhe"] = "主公技,当你回复体力至体力上限后,你可以将手牌摸至场上汉势力角色姓氏数。",
["rfenghou__pozhi"] = "破桎",
[":rfenghou__pozhi"] = "隐匿技,你登场时,失去任意个隐匿技(若为首次发动此技能,则必须失去〖缚枝〗),然后对至多等量的角色各造成1点伤害。",
["#rfenghou__zhuozheng-choice"] = "琢政:你可以修改一个技能的时机为“与你体力值和手牌数均相等的角色出牌阶段结束时”",
["@[:]rfenghou__zhuozheng"] = "琢政",
--["#rfenghou__pozhi-choice"] = "破桎:请选择失去任意个隐匿技,然后对所有角色分配等量的伤害",
--["#rfenghou__pozhi1-choice"] = "破桎:请选择失去任意个隐匿技(本次必须失去“缚枝”),然后对所有角色分配等量的伤害",
["#rfenghou__pozhi-choice"] = "破桎:请选择失去任意个隐匿技,然后对等量名角色造成伤害",
["#rfenghou__pozhi1-choice"] = "破桎:请选择失去任意个隐匿技(本次必须失去“缚枝”),然后对等量名角色造成伤害",
--["rfenghou__pozhi_active"] = "破桎",
--["#rfenghou__pozhi-num"] = "破桎:分配造成伤害点数(还剩%arg点)!",
--["@rfenghou__pozhi_count"] = "伤害值",
["#rfenghou__pozhi-damage"] = "破桎:对至多%arg名角色各造成1点伤害",
["$rfenghou__fuzhi1"] = "身是吞舟之鱼,岂可游于枝流?",
["$rfenghou__fuzhi2"] = "我有大翼垂天,当负长风万里。",
["$rfenghou__zhuozheng1"] = "政宽则民慢、猛则民残,为政当琢以和。",
["$rfenghou__zhuozheng2"] = "布政优优、百禄是遒;柔远能迩,以定我王。",
["$rfenghou__zuhe1"] = "绍三祖之业,重升汉道,卒以刷耻!",
["$rfenghou__zuhe2"] = "国统濒绝,宗庙之不血食,四十年于兹矣!",
["$rfenghou__pozhi1"] = "海压竹节低复举,风吹山棱晦转明!",
["$rfenghou__pozhi2"] = "富有四海而不恣睢,天下与桎梏何异?",
["~rfenghou__liuyuan"] = "刘氏种,尚可复遗乎?",
}
--FY015 吕玲绮 by三秋
local lvlingqi = General(extension, "rfenghou__lvlingqi", "han", 4, 4, General.Female)
local xiwei = fk.CreateTriggerSkill{
name = "rfenghou__xiwei",
anim_type = "control",
events = {fk.BeforeDrawCard},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and data.num > 0
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__xiwei-invoke:::"..data.num)
end,
on_use = function(self, event, target, player, data)
local room = player.room
local n = data.num
data.num = 0
for i = 1, n, 1 do
if player.dead then return end
local targets = table.map(table.filter(room.alive_players, function(p)
return p:isWounded() and (not p:isKongcheng() or table.find(room.alive_players, function(to)
return p:canMoveCardsInBoardTo(to, "e")
end))
end), Util.IdMapper)
if #targets == 0 then
local cards = table.filter(room.draw_pile, function (id)
local card = Fk:getCardById(id)
return card.is_damage_card and not card.multiple_targets
end)
if #cards > 0 then
room:moveCardTo(table.random(cards), Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, false, player.id)
end
else
local to = room:askForChoosePlayers(player, targets, 1, 1, "#rfenghou__xiwei-choose:::"..i..":"..n, self.name, true)
if #to > 0 then
to = room:getPlayerById(to[1])
local choices = {}
if not to:isKongcheng() then
table.insert(choices, "rfenghou__xiwei_hand")
end
targets = table.filter(room.alive_players, function(p)
return to:canMoveCardsInBoardTo(p, "e")
end)
if #targets > 0 then
table.insert(choices, "rfenghou__xiwei_board")
end
if #choices == 0 then return end
local choice = room:askForChoice(player, choices, self.name)
if choice == "rfenghou__xiwei_hand" then
targets = room:getOtherPlayers(to)
end
local t = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, 1,
"#rfenghou__xiwei-move::"..to.id, self.name, false)
if choice == "rfenghou__xiwei_hand" then
local cid = room:askForCardChosen(player, to, "h", self.name)
room:moveCardTo(cid, Card.PlayerHand, room:getPlayerById(t[1]), fk.ReasonJustMove, self.name, nil, false, player.id)
else
room:askForMoveCardInBoard(player, to, room:getPlayerById(t[1]), self.name, "e", to, {})
end
else
local cards = table.filter(room.draw_pile, function (id)
local card = Fk:getCardById(id)
return card.is_damage_card and not card.multiple_targets
end)
if #cards > 0 then
room:moveCardTo(table.random(cards), Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, false, player.id)
end
end
end
end
if not player.dead and not player:hasSkill("wushuang", true) then
local phase_event = room.logic:getCurrentEvent():findParent(GameEvent.Phase)
if phase_event == nil then return end
local types = {}
player.room.logic:getEventsOfScope(GameEvent.MoveCards, 1, function(e)
for _, move in ipairs(e.data) do
if move.to == player.id and move.toArea == Card.PlayerHand then
for _, info in ipairs(move.moveInfo) do
table.insertIfNeed(types, Fk:getCardById(info.cardId).type)
end
end
end
end, Player.HistoryPhase)
if #types == 1 then
room:handleAddLoseSkills(player, "wushuang", nil, true, false)
room.logic:getCurrentEvent():findParent(GameEvent.Turn):addCleaner(function()
room:handleAddLoseSkills(player, "-wushuang")
end)
end
end
end,
}
lvlingqi:addSkill(xiwei)
lvlingqi:addRelatedSkill("wushuang")
Fk:loadTranslationTable{
["rfenghou__lvlingqi"] = "吕玲绮",
["#rfenghou__lvlingqi"] = "翻戟困獒",
["illustrator:rfenghou__lvlingqi"] = "祭祀",
["designer:rfenghou__lvlingqi"] = "三秋",
["rfenghou__xiwei"] = "袭围",
[":rfenghou__xiwei"] = "当你摸牌时,你可以放弃摸牌,改为选择等量次:1.移动一名已受伤角色的一张牌;2.从牌堆随机获得一张单目标伤害牌。"..
"然后若你此阶段获得的牌均为同一类别,你视为拥有〖无双〗直到回合结束。",
["#rfenghou__xiwei-invoke"] = "袭围:你即将摸%arg张牌,是否放弃摸牌,改为进行等量次选择?",
["#rfenghou__xiwei-choose"] = "袭围:选择一名角色移动其一张牌,或点“取消”获得一张单目标伤害牌(第%arg次,共%arg2次)",
["#rfenghou__xiwei-move"] = "袭围:选择一名角色,将 %dest 的一张牌移至目标角色",
["rfenghou__xiwei_hand"] = "移动手牌",
["rfenghou__xiwei_board"] = "移动装备",
}
--HY003 宁随 by 猪
local ningsui = General(extension, "rfenghou__ningsui", "han", 4)
local xiangsui = fk.CreateActiveSkill{
name = "rfenghou__xiangsui",
anim_type = "special",
card_num = 0,
target_num = 0,
prompt = "#rfenghou__xiangsui",
interaction = function(self)
return UI.ComboBox { choices = {"Top", "Bottom"} }
end,
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_filter = Util.FalseFunc,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local cards
if self.interaction.data == "Top" then
cards = room:getNCards(3)
else
cards = room:getNCards(3, "bottom")
end
room:moveCardTo(cards, Card.Processing, nil, fk.ReasonJustMove, self.name, nil, true, player.id)
if table.every(cards, function (id)
return Fk:getCardById(id).suit == Card.Heart
end) then
room:delay(1000)
room:moveCardTo(cards, Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, true, player.id)
if not player.dead then
room:handleAddLoseSkills(player, "-rfenghou__xiangsui|ex__guanxing", nil, true, false)
end
else
local result = room:askForGuanxing(player, cards, nil, nil, self.name, true, {"Top", "Bottom"})
if #result.top > 0 then
result.top = table.reverse(result.top)
room:moveCards{
ids = result.top,
toArea = Card.DrawPile,
moveReason = fk.ReasonJustMove,
skillName = self.name,
drawPilePosition = 1,
moveVisible = true,
}
end
if #result.bottom > 0 then
room:moveCards{
ids = result.bottom,
toArea = Card.DrawPile,
moveReason = fk.ReasonJustMove,
skillName = self.name,
drawPilePosition = -1,
moveVisible = true,
}
end
end
end,
}
local jiangsu = fk.CreateTriggerSkill{
name = "rfenghou__jiangsu",
anim_type = "special",
events = {fk.EnterDying},
can_trigger = function (self, event, target, player, data)
return player:hasSkill(self) and not player:isNude()
end,
on_cost = function (self, event, target, player, data)
local prompt = "#rfenghou__jiangsu1::"..target.id
if target == player then
prompt = "#rfenghou__jiangsu2"
end
return player.room:askForSkillInvoke(player, self.name, nil, prompt)
end,
on_use = function (self, event, target, player, data)
local room = player.room
player:throwAllCards("he")
if target ~= player then
if not target.dead then
room:killPlayer({who = target.id})
end
else
if player:isWounded() and not player.dead then
room:recover({
who = player,
num = player.maxHp - player.hp,
recoverBy = player,
skillName = self.name,
})
end
if not player.dead then
room:handleAddLoseSkills(player, "-rfenghou__jiangsu|kunfenEx", nil, true, false)
end
end
end,
}
local kunfen = fk.CreateTriggerSkill{
name = "rfenghou__kunfen",
anim_type = "drawcard",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player.phase == Player.Finish
end,
on_use = function(self, event, target, player, data)
player.room:loseHp(player, 1, self.name)
if player:isAlive() then
player.room:drawCards(player, 2, self.name)
end
end,
}
ningsui:addSkill(xiangsui)
ningsui:addSkill(jiangsu)
ningsui:addRelatedSkill("ex__guanxing")
ningsui:addRelatedSkill(kunfen)
Fk:loadTranslationTable{
["rfenghou__ningsui"] = "宁随",
["#rfenghou__ningsui"] = "摧心诀泪",
["illustrator:rfenghou__ningsui"] = "佚名",
["designer:rfenghou__ningsui"] = "zzcclll朱苦力",
["rfenghou__xiangsui"] = "相随",
[":rfenghou__xiangsui"] = "出牌阶段限一次,你可以展示牌堆底或牌堆顶三张牌,然后将这些牌以任意顺序置于牌堆底或牌堆顶;若均为"..
"<font color='red'>♥</font>,改为你获得之,失去此技能并获得〖观星〗。",
["rfenghou__jiangsu"] = "将谡",
[":rfenghou__jiangsu"] = "一名角色进入濒死状态时,你可以弃置所有牌,令其死亡;若为你,改为回复所有体力,失去此技能并获得〖困奋〗。",
["rfenghou__kunfen"] = "困奋",
[":rfenghou__kunfen"] = "结束阶段开始时,你可以失去1点体力,然后摸两张牌。",
["#rfenghou__xiangsui"] = "相随:你可以展示牌堆底或牌堆顶三张牌,然后你将这些牌以任意顺序置于牌堆底或牌堆顶",
["#rfenghou__jiangsu1"] = "将谡:你可以弃置所有牌,令 %dest 死亡!",
["#rfenghou__jiangsu2"] = "将谡:是否弃置所有牌,回复至体力上限?",
}
local haopu = General(extension, "rfenghou__haopu", "han", 4)
local jicheng = fk.CreateActiveSkill{
name = "rfenghou__jicheng",
anim_type = "control",
prompt = "#rfenghou__jicheng",
card_num = 0,
target_num = 1,
can_use = function(self, player)
return not player:isKongcheng()
end,
card_filter = Util.FalseFunc,
target_filter = function(self, to_select, selected, selected_cards)
return #selected == 0 and to_select ~= Self.id and Self:canPindian(Fk:currentRoom():getPlayerById(to_select))
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local target = room:getPlayerById(effect.tos[1])
local pindian = player:pindian({target}, self.name)
if player.dead then return end
if pindian.results[target.id].winner ~= player then
local n = 0
if pindian.fromCard.color == Card.Red then
n = n + 1
end
if pindian.results[target.id].toCard.color == Card.Red then
n = n + 1
end
if n > 0 then
room:addPlayerMark(player, MarkEnum.MinusMaxCards.."-turn", n)
room:broadcastProperty(player, "MaxCards")
end
end
local choices = {"rfenghou__jicheng3"}
local n = player:getHandcardNum() - player:getMaxCards()
if n == -2 then
table.insert(choices, "draw2")
elseif n == 1 then
for _, id in ipairs(player:getCardIds("h")) do
local card = Fk:cloneCard("duel")
card:addSubcard(id)
card.skillName = self.name
if table.find(room:getOtherPlayers(player), function (p)
return player:canUseTo(card, p)
end) then
table.insert(choices, "rfenghou__jicheng2")
break
end
end
elseif n == 0 and #player:getCardIds("e") > 0 then
for _, id in ipairs(player:getCardIds("e")) do
local card = Fk:cloneCard("duel")
card:addSubcard(id)
card.skillName = self.name
if table.find(room:getOtherPlayers(player), function (p)
return player:canUseTo(card, p)
end) then
table.insert(choices, "rfenghou__jicheng2")
break
end
end
end
local choice = room:askForChoice(player, choices, self.name,
"#rfenghou__jicheng-choice:::"..player:getMaxCards(), nil, {"draw2", "rfenghou__jicheng2", "rfenghou__jicheng3"})
if choice == "draw2" then
player:drawCards(2, self.name)
elseif choice == "rfenghou__jicheng2" then
local prompt = "#rfenghou__jicheng-hand"
if n == 0 then
prompt = "#rfenghou__jicheng-equip"
end
local success, dat = room:askForUseActiveSkill(player, "rfenghou__jicheng_viewas", prompt, false, nil, true)
if success then
local card = Fk:cloneCard("duel")
card.skillName = self.name
card:addSubcards(dat.cards)
room:useCard{
from = player.id,
tos = table.map(dat.targets, function(id) return {id} end),
card = card,
}
end
elseif choice == "rfenghou__jicheng3" then
if n < 0 then
player:drawCards(-n, self.name)
elseif n > 0 then
room:askForDiscard(player, n, n, false, self.name, false)
end
room:endTurn()
end
end,
}
local jicheng_viewas = fk.CreateViewAsSkill{
name = "rfenghou__jicheng_viewas",
card_filter = function(self, to_select, selected)
if #selected == 0 then
if Self:getHandcardNum() == Self:getMaxCards() then
return table.contains(Self:getCardIds("e"), to_select)
else
return table.contains(Self:getCardIds("h"), to_select)
end
end
end,
view_as = function(self, cards)
if #cards ~= 1 then return end
local card = Fk:cloneCard("duel")
card:addSubcard(cards[1])
card.skillName = "rfenghou__jicheng"
return card
end,
}
Fk:addSkill(jicheng_viewas)
haopu:addSkill(jicheng)
Fk:loadTranslationTable{
["rfenghou__haopu"] = "郝普",
["#rfenghou__haopu"] = "悬壑把晖",
["illustrator:rfenghou__haopu"] = "君桓文化",
["designer:rfenghou__haopu"] = "yyuaN",
["rfenghou__jicheng"] = "岌城",
[":rfenghou__jicheng"] = "出牌阶段,你可以拼点,若你没赢,本回合手牌上限-X(X为红色拼点牌数)。然后你执行一项效果以使你手牌数等于"..
"手牌上限:1.摸两张牌;2.将一张牌当【决斗】使用;3.调整手牌至手牌上限,结束回合。",
["#rfenghou__jicheng"] = "岌城:你可以拼点,然后执行一项效果以使你的手牌数等于手牌上限",
["#rfenghou__jicheng-choice"] = "岌城:请选择执行一项以令手牌数等于手牌上限(当前手牌上限为%arg)", --FIXME: 万恶的手牌上限UI
["rfenghou__jicheng2"] = "将一张牌当【决斗】使用",
["rfenghou__jicheng3"] = "调整手牌至手牌上限,结束回合",
["rfenghou__jicheng_viewas"] = "岌城",
["#rfenghou__jicheng-hand"] = "岌城:请将一张手牌当【决斗】使用",
["#rfenghou__jicheng-equip"] = "岌城:请将装备区一张牌当【决斗】使用",
["$rfenghou__jicheng1"] = "吾闻世间有忠义,今欲为之。",
["$rfenghou__jicheng2"] = "吴虽兵临三郡,普宁死不降。",
["~rfenghou__haopu"] = "徒做奔臣,死无其所。",
}
local mengda = General(extension, "rfenghou__mengda", "han", 4)
local qiedai = fk.CreateViewAsSkill{
name = "rfenghou__qiedai",
anim_type = "defensive",
pattern = "jink",
prompt = "#rfenghou__qiedai",
card_filter = Util.FalseFunc,
view_as = function(self, cards)
local card = Fk:cloneCard("jink")
card.skillName = self.name
return card
end,
before_use = function (self, player, use)
local room = player.room
local targets = table.filter(room.alive_players, function (p)
return #p:getEquipments(Card.SubtypeArmor) > 0
end)
local to = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, 1,
"#rfenghou__qiedai-choose", self.name, false)
to = room:getPlayerById(to[1])
if #to:getEquipments(Card.SubtypeArmor) == 1 then
use.card:addSubcard(to:getEquipments(Card.SubtypeArmor)[1])
elseif #to:getEquipments(Card.SubtypeArmor) > 1 then
local card = U.askforChooseCardsAndChoice(player, to:getEquipments(Card.SubtypeArmor), {"OK"}, self.name,
"#rfenghou__qiedai-jink::"..to.id)
use.card:addSubcard(card[1])
else
return ""
end
end,
enabled_at_response = function (self, player, response)
return not response and table.find(Fk:currentRoom().alive_players, function (p)
return #p:getEquipments(Card.SubtypeArmor) > 0
end)
end,
}
local qiedai_trigger = fk.CreateTriggerSkill{
name = "#rfenghou__qiedai_trigger",
anim_type = "drawcard",
main_skill = qiedai,
events = {fk.AskForCardUse},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(qiedai) and #target:getCardIds("e") == 0 and not player:isKongcheng() and
(data.cardName == "jink" or (data.pattern and Exppattern:Parse(data.pattern):matchExp("jink|0|nosuit|none")))
end,
on_cost = function(self, event, target, player, data)
local success, dat = player.room:askForUseActiveSkill(player, "rfenghou__qiedai_active", "#rfenghou__qiedai-recast", true)
if success and dat then
self.cost_data = {cards = dat.cards}
return true
end
end,
on_use = function(self, event, target, player, data)
player.room:recastCard(self.cost_data.cards, player, "rfenghou__qiedai")
end,
}
local qiedai_active = fk.CreateActiveSkill{
name = "rfenghou__qiedai_active",
min_card_num = 1,
target_num = 0,
card_filter = Util.TrueFunc,
feasible = function (self, selected, selected_cards)
return #selected_cards > 0 and
table.find(selected_cards, function (id)
return Fk:getCardById(id).trueName == "jink"
end)
end,
}
local qiedaim = fk.CreateTriggerSkill{
name = "rfenghou__qiedaim",
anim_type = "drawcard",
events = {fk.AskForPeaches},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and data.who ~= player.id and not player:isKongcheng()
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__qiedaim-invoke::"..data.who)
end,
on_use = function(self, event, target, player, data)
local room = player.room
local cards = table.simpleClone(player:getCardIds("h"))
player:showCards(cards)
if player.dead then return end
if table.find(cards, function (id)
return Fk:getCardById(id).trueName == "peach"
end) then
player:drawCards(2, self.name)
elseif #room:askForDiscard(player, 2, 2, true, self.name, true, nil, "#rfenghou__qiedaim-discard") > 0 then
if player.dead then return end
local card = room:getCardsFromPileByRule("peach")
if #card > 0 then
room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, true, player.id)
end
end
if not player.dead then
room:setPlayerMark(player, "rfenghou__qiedaim-phase", room.logic:getCurrentEvent().id)
end
end,
refresh_events = {fk.AskForPeaches, fk.AskForPeachesDone},
can_refresh = function (self, event, target, player, data) --不想用HandleAskForPlayCard
return target ~= player and player:getMark("rfenghou__qiedaim-phase") ~= 0
end,
on_refresh = function (self, event, target, player, data)
player.room:setPlayerMark(player, "rfenghou__qiedaim-phase", 0)
end,
}
local qiedaim_prohibit = fk.CreateProhibitSkill{
name = "#rfenghou__qiedaim_prohibit",
prohibit_use = function(self, player, card)
return card and card.name == "peach" and player:getMark("rfenghou__qiedaim-phase") ~= 0
end,
}
Fk:addSkill(qiedai_active)
qiedai:addRelatedSkill(qiedai_trigger)
qiedaim:addRelatedSkill(qiedaim_prohibit)
mengda:addSkill(qiedai)
mengda:addSkill(qiedaim)
Fk:loadTranslationTable{
["rfenghou__mengda"] = "孟达",
["#rfenghou__mengda"] = "如此反复",
["illustrator:rfenghou__mengda"] = "匠人绘",
["designer:rfenghou__mengda"] = "廷玉",
["rfenghou__qiedai"] = "且待",
[":rfenghou__qiedai"] = "你可以将场上的防具牌当【闪】使用;装备区内没有牌的角色需使用【闪】时,你可以重铸任意张牌(需包含【闪】)。",
["rfenghou__qiedaim"] = "切怠",
[":rfenghou__qiedaim"] = "当其他角色濒死结算求桃流程询问至你时,你可以改为展示所有手牌,若其中:有【桃】,你摸两张牌;没有【桃】,"..
"你可以弃置两张牌,获得一张【桃】。",
["#rfenghou__qiedai"] = "且待:你可以将场上的防具牌当【闪】使用(点“确定”,然后选择有防具牌的角色)",
["#rfenghou__qiedai-choose"] = "且待:选择一名角色,将其防具当【闪】使用",
["#rfenghou__qiedai-jink"] = "且待:选择 %dest 的一张防具,将之当【闪】使用",
["#rfenghou__qiedai_trigger"] = "且待",
["rfenghou__qiedai_active"] = "且待",
["#rfenghou__qiedai-recast"] = "且待:你可以重铸任意张牌(需包含【闪】)",
["#rfenghou__qiedaim-invoke"] = "切怠:%dest 向你求桃,是否展示所有手牌见死不救?",
["#rfenghou__qiedaim-discard"] = "切怠:是否弃置两张牌,获得一张【桃】?",
["$rfenghou__qiedai1"] = "达本蜀之降将,幸得君上重为卿相。",
["$rfenghou__qiedai2"] = "刚正易折,委屈得全,我自玲珑八面。",
["$rfenghou__qiedaim1"] = "蝼蚁尚且偷生,况我大将军乎。",
["$rfenghou__qiedaim2"] = "为保身家性命,做奔臣又如何?",
["~rfenghou__mengda"] = "司马公,吾等愿降!",
}
local zhangrangzhaozhong = General(extension, "rfenghou__zhangrangzhaozhong", "han", 3)
local rfenghou__jiedang = fk.CreateTriggerSkill{
name = "rfenghou__jiedang",
events = {fk.EventPhaseEnd},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and target == player and player.phase == Player.Play and not player:isKongcheng() then
local cards = player:getCardIds("h")
local cardtype = Fk:getCardById(cards[1]):getTypeString()
if not table.contains(player:getTableMark("@rfenghou__jiedang-turn"), cardtype.."_char") then
return table.every(cards, function (id)
return Fk:getCardById(id):getTypeString() == cardtype
end)
end
end
end,
on_use = function(self, event, target, player, data)
if player:isKongcheng() then return end
local cards = player:getCardIds("h")
player.room:addTableMark(player, "@rfenghou__jiedang-turn", Fk:getCardById(cards[1]):getTypeString().."_char")
player:showCards(cards)
player:gainAnExtraPhase(Player.Play)
end,
}
zhangrangzhaozhong:addSkill(rfenghou__jiedang)
local rfenghou__qiechong = fk.CreateActiveSkill{
name = "rfenghou__qiechong",
anim_type = "switch",
switch_skill_name = "rfenghou__qiechong",
card_num = 0,
target_num = 1,
prompt = function(self)
return "#rfenghou__qiechong_"..Self:getSwitchSkillState(self.name, false, true)
end,
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_filter = Util.FalseFunc,
target_filter = function(self, to_select, selected)
local to = Fk:currentRoom():getPlayerById(to_select)
if #selected == 0 and to and to_select ~= Self.id then
if Self:getSwitchSkillState(self.name, false) == fk.SwitchYang then
return not to:isKongcheng()
else
return not to:isNude()
end
end
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.tos[1])
local cards = {}
local isYang = player:getSwitchSkillState(self.name, true) == fk.SwitchYang
local returnToPile = function ()
cards = table.filter(cards, function (id) return room:getCardArea(id) == Card.Processing end)
if #cards > 0 then
cards = table.reverse(cards)
room:moveCards({ ids = cards, toArea = Card.DrawPile, moveReason = fk.ReasonPut, skillName = self.name })
end
end
if isYang then
player:drawCards(1, self.name)
cards = room:askForCardsChosen(player, to, 0, 2, "h", self.name)
else
local cid = room:askForCardChosen(player, to, "he", self.name)
room:obtainCard(player, cid, false, fk.ReasonPrey, player.id, self.name)
if not player.dead then
cards = room:getNCards(4)
room:moveCardTo(cards, Card.Processing, nil, fk.ReasonJustMove, self.name, nil, true, player.id)
-- 展示牌应该封装fakemove
end
end
if not player.dead and #cards > 0 then
local x = #room.logic:getEventsOfScope(GameEvent.Phase, 99, function(e)
return e.data[1] == player and e.data[2] == Player.Play
end, Player.HistoryTurn)
local my_cards = table.filter(player:getCardIds("h"), function(id)
return Fk:translate(Fk:getCardById(id).trueName, "zh_CN"):len() <= x
end)
if #my_cards > 0 then
local ex_cards = room:askForPoxi(player, "rfenghou__qiechong_exchange", {
{ isYang and to.general or "Top", cards },
{ "$Hand", my_cards },
}, {x}, true)
if #ex_cards > 0 then
local my_lose = {}
for i = #ex_cards, 1, -1 do
if table.contains(my_cards, ex_cards[i]) then
table.insert(my_lose, table.remove(ex_cards, i))
end
end
if isYang then
U.swapCards(room, player, player, to, my_lose, ex_cards, self.name, Player.Hand)
else
returnToPile()
if not player.dead then
U.swapCardsWithPile(player, my_lose, ex_cards, self.name, "Top", false, player.id)
end
end
end
end
end
returnToPile()
end,
}
zhangrangzhaozhong:addSkill(rfenghou__qiechong)
Fk:addPoxiMethod{
name = "rfenghou__qiechong_exchange",
card_filter = function(to_select, selected, data, extra_data)
if data == nil or extra_data == nil then return false end
local lenLimit = extra_data[1] or 0
if table.contains(data[2][2], to_select) then
return Fk:translate(Fk:getCardById(to_select).trueName, "zh_CN"):len() <= lenLimit
else
local count = 0
for _, id in ipairs(selected) do
if table.contains(data[1][2], id) then
count = count + 1
else
count = count - Fk:translate(Fk:getCardById(id).trueName, "zh_CN"):len()
end
end
return count < 0
end
end,
feasible = function(selected, data, extra_data)
if data == nil or #selected == 0 then return false end
local count = 0
for _, id in ipairs(selected) do
if table.contains(data[1][2], id) then
count = count + 1
else
count = count - Fk:translate(Fk:getCardById(id).trueName, "zh_CN"):len()
end
end
return count == 0
end,
prompt = function (data, extra_data)
if extra_data and extra_data[1] then
return "#rfenghou__qiechong-exchange:::"..string.format("%.0f", extra_data[1])
end
return " "
end,
default_choice = function ()
return {}
end,
}
Fk:loadTranslationTable{
["rfenghou__zhangrangzhaozhong"] = "张让赵忠",
["#rfenghou__zhangrangzhaozhong"] = "鹗踞中天",
["illustrator:rfenghou__zhangrangzhaozhong"] = "Greencias",
["designer:rfenghou__zhangrangzhaozhong"] = "快雪时晴",
["cv:rfenghou__zhangrangzhaozhong"] = "张让",
["rfenghou__jiedang"] = "结党",
[":rfenghou__jiedang"] = "回合每种类型限一次,出牌阶段结束时,若你手牌类型均相同,你可展示之并执行一个额外的出牌阶段。",
["@rfenghou__jiedang-turn"] = "结党",
["rfenghou__qiechong"] = "窃宠",
[":rfenghou__qiechong"] = "转换技,出牌阶段限一次,阳:你摸一张牌并观看一名其他角色至多两张手牌。阴:你获得一名其他角色一张牌并展示牌堆顶四张牌。若如此,你可用任意张牌名字数不大于X的手牌交换其中任意张牌,你因交换失去牌的牌名字数之和与获得牌的牌数须相等(X你为本回合进行的出牌阶段数量)。",
["#rfenghou__qiechong_yang"] = "窃宠:摸1张牌,观看其他角色至多2张手牌",
["#rfenghou__qiechong_yin"] = "窃宠:获得其他角色1张牌,展示牌堆顶4张牌",
["#rfenghou__qiechong-exchange"] = "窃宠:用任意张字数不大于 %arg 的手牌交换展示牌",
["rfenghou__qiechong_exchange"] = "窃宠换牌",
["$rfenghou__jiedang1"] = "古人云:宦者四星,在皇之侧,正是你我。",
["$rfenghou__jiedang2"] = "天家雨露重新,落在咱家怀里,自是一片赤心。",
["$rfenghou__qiechong1"] = "金貂玉带蟒袍新,便是关内侯也做得。",
["$rfenghou__qiechong2"] = "职掌六宫,出入荷恩,天子称咱阿父阿母。",
["~rfenghou__zhangrangzhaozhong"] = "被任执钧十余年,人间威福早享尽。",
}
local xiangchong = General(extension, "rfenghou__xiangchong", "han", 4)
local suzhen = fk.CreateActiveSkill{
name = "rfenghou__suzhen",
anim_type = "control",
card_num = 0,
target_num = 1,
prompt = "#rfenghou__suzhen",
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_filter = Util.FalseFunc,
target_filter = function(self, to_select, selected, selected_cards)
return #selected == 0
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local target = room:getPlayerById(effect.tos[1])
local use = U.askForPlayCard(room, target, nil, ".|.|.|.|.|basic", self.name, "#rfenghou__suzhen-use",
{bypass_times = true, extraUse = true})
if use then
if not target.dead then
target:drawCards(1, self.name)
end
else
use = U.askForPlayCard(room, player, nil, ".|.|.|.|.|basic", self.name, "#rfenghou__suzhen2-use::"..target.id,
{bypass_times = true, extraUse = true})
if use and not player.dead and not target.dead and not target:isNude() and
room:askForSkillInvoke(player, self.name, nil, "#rfenghou__suzhen-invoke::"..target.id) then
room:doIndicate(player.id, {target.id})
local card = room:askForCardChosen(player, target, "he", self.name, "#rfenghou__suzhen-discard::"..target.id)
room:throwCard(card, self.name, target, player)
end
end
local yes = true
if not target.dead and #target:getCardIds("e") > 0 then
local card = room:askForCard(target, 1, 1, true, self.name, true, ".|.|.|equip", "#rfenghou__suzhen-equip")
if #card > 0 then
yes = false
room:moveCardTo(card, Card.PlayerHand, target, fk.ReasonJustMove, self.name, nil, true, target.id)
if not target.dead then
target:drawCards(1, self.name)
end
end
end
if yes and not player.dead and #player:getCardIds("e") > 0 then
local card = room:askForCard(player, 1, 1, true, self.name, true, ".|.|.|equip", "#rfenghou__suzhen2-equip::"..target.id)
if #card > 0 then
room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, true, player.id)
if not player.dead and not target.dead and not target:isNude() and
room:askForSkillInvoke(player, self.name, nil, "#rfenghou__suzhen-invoke::"..target.id) then
room:doIndicate(player.id, {target.id})
card = room:askForCardChosen(player, target, "he", self.name, "#rfenghou__suzhen-discard::"..target.id)
room:throwCard(card, self.name, target, player)
end
end
end
yes = true
if not target.dead and not target:isKongcheng() then
local card = room:askForCard(target, 1, 1, false, self.name, true, ".|.|.|.|.|trick", "#rfenghou__suzhen-recast")
if #card > 0 then
yes = false
room:recastCard(card, target, self.name)
if not target.dead then
target:drawCards(1, self.name)
end
end
end
if yes and not player.dead and not player:isKongcheng() then
local card = room:askForCard(player, 1, 1, false, self.name, true, ".|.|.|.|.|trick", "#rfenghou__suzhen2-recast::"..target.id)
if #card > 0 then
room:recastCard(card, player, self.name)
if not player.dead and not target.dead and not target:isNude() and
room:askForSkillInvoke(player, self.name, nil, "#rfenghou__suzhen-invoke::"..target.id) then
room:doIndicate(player.id, {target.id})
card = room:askForCardChosen(player, target, "he", self.name, "#rfenghou__suzhen-discard::"..target.id)
room:throwCard(card, self.name, target, player)
end
end
end
end,
}
xiangchong:addSkill(suzhen)
Fk:loadTranslationTable{
["rfenghou__xiangchong"] = "向宠",
["#rfenghou__xiangchong"] = "能",
["illustrator:rfenghou__xiangchong"] = "凝聚永恒",
["designer:rfenghou__xiangchong"] = "CYC",
["rfenghou__suzhen"] = "肃阵",
[":rfenghou__suzhen"] = "出牌阶段限一次,你可以令一名角色依次选择是否执行:1.使用一张基本牌;2.收回装备区内一张牌;3.重铸一张锦囊牌。"..
"其每执行一项,摸一张牌;每拒绝一项,你可以执行之,若如此做,你可以弃置其一张牌。",
["#rfenghou__suzhen"] = "肃阵:令一名角色依次执行选项,其每执行一项摸一张牌",
["#rfenghou__suzhen-use"] = "肃阵:你可以使用一张基本牌,摸一张牌",
["#rfenghou__suzhen2-use"] = "肃阵:你可以使用一张基本牌,然后可以弃置 %dest 一张牌",
["#rfenghou__suzhen-equip"] = "肃阵:你可以收回装备区一张牌,摸一张牌",
["#rfenghou__suzhen2-equip"] = "肃阵:你可以收回装备区一张牌,然后可以弃置 %dest 一张牌",
["#rfenghou__suzhen-recast"] = "肃阵:你可以重铸一张锦囊牌,摸一张牌",
["#rfenghou__suzhen2-recast"] = "肃阵:你可以重铸一张锦囊牌,然后可以弃置 %dest 一张牌",
["#rfenghou__suzhen-invoke"] = "肃阵:是否弃置 %dest 一张牌?",
["#rfenghou__suzhen-discard"] = "肃阵:弃置 %dest 一张牌",
["$rfenghou__suzhen1"] = "行阵和睦,方可优劣得所。",
["$rfenghou__suzhen2"] = "识时达务,才可上和下睦。",
["~rfenghou__xiangchong"] = "蛮夷怀异,战乱难平……",
}
local xiahoushi = General(extension, "rfenghou__xiahoushi", "han", 3, 3, General.Female)
local rfenghou__qiaoshi = fk.CreateTriggerSkill{
name = "rfenghou__qiaoshi",
anim_type = "drawcard",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) or player:isKongcheng() then return false end
local names, card_ids, toProcess = {}, {}, {}
for _, id in ipairs(player:getCardIds("h")) do
local c = Fk:getCardById(id)
if c.type ~= Card.TypeBasic then return false end
table.insertIfNeed(names, c.name)
end
local room = player.room
local current_event = room.logic:getCurrentEvent()
local parent_event = current_event.parent
if parent_event ~= nil then
parent_event:searchEvents(GameEvent.MoveCards, 1, function (e)
for _, move in ipairs(e.data) do
if move.toArea == Card.Processing and move.from and move.from ~= player.id then
for _, info in ipairs(move.moveInfo) do
if (info.fromArea == Card.PlayerHand or info.fromArea == Card.PlayerEquip) then
table.insert(toProcess, info.cardId)
end
end
end
end
end, current_event)
end
for _, move in ipairs(data) do
if move.toArea == Card.DiscardPile then
if move.from ~= player.id then
for _, info in ipairs(move.moveInfo) do
if (info.fromArea == Card.PlayerHand or info.fromArea == Card.PlayerEquip)
or (info.fromArea == Card.Processing and table.contains(toProcess, info.cardId)) then
local c = Fk:getCardById(info.cardId)
if c.type == Card.TypeBasic and not table.contains(names, c.name) then
table.insert(card_ids, info.cardId)
end
end
end
end
end
end
card_ids = table.filter(card_ids, function(id) return room:getCardArea(id) == Card.DiscardPile end)
if #card_ids > 0 then
self.cost_data = {cards = card_ids}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
player:showCards(player:getCardIds("h"))
room:obtainCard(player, self.cost_data.cards, true, fk.ReasonJustMove, player.id, self.name)
end,
}
xiahoushi:addSkill(rfenghou__qiaoshi)
local rfenghou__yanyu = fk.CreateActiveSkill{
name = "rfenghou__yanyu",
anim_type = "support",
card_num = 1,
target_num = 1,
prompt = "#rfenghou__yanyu",
card_filter = function(self, to_select, selected)
return #selected == 0
end,
target_filter = function(self, to_select, selected, selected_cards)
return #selected == 0 and #selected_cards == 1 and to_select ~= Self.id and not
Fk:currentRoom():getPlayerById(to_select):isNude()
end,
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local lastCard, lastOne, num = effect.cards[1], player, Fk:getCardById(effect.cards[1]).number
room:recastCard(effect.cards, player, self.name)
local to = room:getPlayerById(effect.tos[1])
while true do
local temp = lastOne == player and to or player
if temp.dead or temp:isNude() then break end
lastOne = temp
local cards = room:askForCard(lastOne, 1, 1, true, self.name, false, ".", "#rfenghou__yanyu-card:::"..num)
lastCard = cards[1]
local tempNum = num
num = Fk:getCardById(lastCard).number
room:recastCard(cards, lastOne, self.name)
if num >= tempNum then break end
end
if Fk:getCardById(lastCard).suit == Card.Heart and not lastOne.dead then
room:recover { num = 1, skillName = self.name, who = lastOne, recoverBy = player }
end
end,
}
xiahoushi:addSkill(rfenghou__yanyu)
Fk:loadTranslationTable{
["rfenghou__xiahoushi"] = "夏侯氏",
["#rfenghou__xiahoushi"] = "",
["illustrator:rfenghou__xiahoushi"] = "鬼sa",
["designer:rfenghou__xiahoushi"] = "柠檬",
["rfenghou__qiaoshi"] = "樵拾",
[":rfenghou__qiaoshi"] = "其他角色的基本牌进入弃牌堆时,你可以展示均为基本牌且与之牌名不同的所有手牌,获得之。",
["rfenghou__yanyu"] = "燕语",
[":rfenghou__yanyu"] = "出牌阶段限一次,你可与一名其他角色交替重铸一张牌,直至所有重铸牌点数不为递减。若最后一张重铸牌为"..
"<font color='red'>♥</font>,重铸者回复1点体力。",
["#rfenghou__yanyu"] = "燕语:选择重铸一张牌,并选择一名其他角色,令其与你交替重铸牌!",
["#rfenghou__yanyu-card"] = "燕语:请重铸一张牌,若点数小于 %arg 令对方继续重铸!",
["$rfenghou__qiaoshi1"] = "樵烟亮亮升,待君归来时。",
["$rfenghou__qiaoshi2"] = "青翠枝繁茂,采拾心欢喜。",
["$rfenghou__yanyu1"] = "画堂欢燕飞,情许鸳鸯合。",
["$rfenghou__yanyu2"] = "欢娱在今夕,燕婉及良时。",
["~rfenghou__xiahoushi"] = "柴木潮湿,不可拾取。",
}
local liuyong = General(extension, "rfenghou__liuyong", "han", 3)
local zhuning = fk.CreateActiveSkill{
name = "rfenghou__zhuning",
anim_type = "support",
min_card_num = 1,
target_num = 1,
prompt = "#zhuning",
can_use = function(self, player)
if not player:isNude() then
if player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 then
return true
elseif player:usedSkillTimes(self.name, Player.HistoryPhase) == 1 then
return player:getMark("zhuning-phase") > 0
end
end
end,
card_filter = Util.TrueFunc,
target_filter = function(self, to_select, selected)
return #selected == 0 and to_select ~= Self.id
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local target = room:getPlayerById(effect.tos[1])
room:moveCardTo(effect.cards, Card.PlayerHand, target, fk.ReasonGive, self.name, "", false, player.id, "@@zhuning-inhand")
if not player.dead then
local cards = table.filter(U.getUniversalCards(room, "bt", false), function (id)
return Fk:getCardById(id).is_damage_card
end)
local use = U.askForUseRealCard(room, player, cards, nil, self.name, "#zhuning-use",
{expand_pile = cards, bypass_times = true}, true, true)
if use then
local use = {
card = Fk:cloneCard(use.card.name),
from = player.id,
tos = use.tos,
extraUse = true,
}
use.card.skillName = self.name
room:useCard(use)
if not player.dead and not use.damageDealt then
room:setPlayerMark(player, "zhuning-phase", 1)
end
end
end
end,
}
local function getFengxiangPlayer(room)
local nums = table.map(room.alive_players, function(p)
return #table.filter(p:getCardIds("h"), function(id)
return Fk:getCardById(id, true):getMark("@@zhuning-inhand") > 0
end)
end)
local n = math.max(table.unpack(nums))
if #table.filter(room.alive_players, function(p)
return #table.filter(p:getCardIds("h"), function(id)
return Fk:getCardById(id, true):getMark("@@zhuning-inhand") > 0
end) == n
end) > 1 then
return 0
else
return room.alive_players[table.indexOf(nums, n)].id
end
end
local fengxiang = fk.CreateTriggerSkill{
name = "rfenghou__fengxiang",
anim_type = "support",
frequency = Skill.Compulsory,
events = {fk.Damaged, fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) then
if event == fk.Damaged then
return target == player
else
local to = getFengxiangPlayer(player.room)
for _, move in ipairs(data) do
if move.extra_data and move.extra_data.fengxiang and move.extra_data.fengxiang ~= to then
return true
end
end
end
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
if event == fk.Damaged then
local to = getFengxiangPlayer(room)
if to ~= 0 then
room:doIndicate(player.id, {to})
to = room:getPlayerById(to)
if to:isWounded() then
room:recover({
who = to,
num = 1,
recoverBy = player,
skillName = self.name
})
end
else
player:drawCards(1, self.name)
end
else
player:drawCards(1, self.name)
end
end,
refresh_events = {fk.BeforeCardsMove},
can_refresh = function(self, event, target, player, data)
if player:hasSkill(self, true) then
for _, move in ipairs(data) do
for _, info in ipairs(move.moveInfo) do
if info.fromArea == Card.PlayerHand then
return true
end
end
if move.toArea == Card.PlayerHand then
return true
end
end
end
end,
on_refresh = function(self, event, target, player, data)
for _, move in ipairs(data) do
move.extra_data = move.extra_data or {}
move.extra_data.fengxiang = getFengxiangPlayer(player.room)
end
end,
}
liuyong:addSkill(zhuning)
liuyong:addSkill(fengxiang)
Fk:loadTranslationTable{
["rfenghou__liuyong"] = "刘永",
["#rfenghou__liuyong"] = "甘陵王",
["designer:rfenghou__liuyong"] = "笔枔",
["illustrator:rfenghou__liuyong"] = "黯荧岛工作室",
["rfenghou__zhuning"] = "诛佞",
[":rfenghou__zhuning"] = "出牌阶段限一次,你可以交给一名其他角色任意张牌,这些牌标记为“隙”,然后你可以视为使用一张不计次数的【杀】或伤害类锦囊牌,"..
"然后若此牌没有造成伤害,此技能本阶段改为“出牌阶段限两次”。",
["rfenghou__fengxiang"] = "封乡",
[":rfenghou__fengxiang"] = "锁定技,当你受到伤害后,手牌中“隙”唯一最多的角色回复1点体力(没有唯一最多的角色则改为你摸一张牌);"..
"当有角色因手牌数改变而使“隙”唯一最多的角色改变后,你摸一张牌。",
["@@zhuning-inhand"] = "隙",
["#zhuning"] = "诛佞:交给一名角色任意张牌(标记为“隙”),然后视为使用一张伤害牌",
["#zhuning-use"] = "诛佞:你可以视为使用一张不计次数的伤害牌",
["$rfenghou__zhuning1"] = "吾父之基业,岂能亡于奸宦之手!",
["$rfenghou__zhuning2"] = "纵与吾兄成隙,亦当除此蛀虫!",
["$rfenghou__fengxiang1"] = "百年扶汉积万骨,十载相隙累半生。",
["$rfenghou__fengxiang2"] = "一骑蓝翎魏旨到,王兄大梦可曾闻?",
["~rfenghou__liuyong"] = "刘公嗣!你睁开眼看看这八百里蜀川吧!",
}
local yanfuren = General(extension, "rfenghou__yanfuren", "han", 3, 3, General.Female)
local channi_viewas = fk.CreateViewAsSkill{
name = "rfenghou__channi_viewas",
anim_type = "offensive",
pattern = "duel",
card_filter = function(self, to_select, selected)
return Fk:currentRoom():getCardArea(to_select) ~= Player.Equip and #selected < Self:getMark("rfenghou__channi")
end,
view_as = function(self, cards)
if #cards == 0 then return end
local card = Fk:cloneCard("duel")
card:addSubcards(cards)
card.skillName = "rfenghou__channi_viewas"
return card
end,
}
local channi = fk.CreateActiveSkill{
name = "rfenghou__channi",
anim_type = "support",
prompt = "#rfenghou__channi-active",
min_card_num = 1,
target_num = 1,
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_filter = function(self, to_select, selected)
return Fk:currentRoom():getCardArea(to_select) ~= Card.PlayerEquip
end,
target_filter = function(self, to_select, selected)
return #selected == 0 and to_select ~= Self.id
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local target = room:getPlayerById(effect.tos[1])
local n = #effect.cards
room:moveCardTo(effect.cards, Player.Hand, target, fk.ReasonGive, self.name, nil, false, player.id)
room:setPlayerMark(target, self.name, n)
local success, data = room:askForUseActiveSkill(target, "rfenghou__channi_viewas", "#rfenghou__channi-invoke:"..player.id.."::"..n, true, {}, false)
room:setPlayerMark(target, self.name, 0)
if success then
local card = Fk:cloneCard("duel")
card.skillName = self.name
card:addSubcards(data.cards)
local use = {
from = target.id,
tos = table.map(data.targets, function(id) return {id} end),
card = card,
extra_data = {channi_data = {player.id, target.id, #data.cards}}
}
room:useCard(use)
end
end,
}
local channi_delay = fk.CreateTriggerSkill{
name = "#rfenghou__channi_delay",
events = {fk.Damage, fk.Damaged},
mute = true,
can_trigger = function(self, event, target, player, data)
if not player.dead and target and not target.dead and data.card and not data.chain and
table.contains(data.card.skillNames, channi.name) then
local room = player.room
local card_event = room.logic:getCurrentEvent():findParent(GameEvent.UseCard)
if not card_event then return false end
local use = card_event.data[1]
if use.extra_data then
local channi_data = use.extra_data.channi_data
if channi_data and channi_data[1] == player.id and channi_data[2] == target.id then
self.cost_data = channi_data[3]
return true
end
end
end
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
local room = player.room
if event == fk.Damage then
room:notifySkillInvoked(player, channi.name, "drawcard")
room:doIndicate(player.id, {target.id})
room:drawCards(target, self.cost_data, channi.name)
else
room:notifySkillInvoked(player, channi.name, "negative")
local n = player:getHandcardNum()
room:askForDiscard(player, n, n, false, channi.name, false)
end
end
}
local nifu = fk.CreateTriggerSkill{
name = "rfenghou__nifu",
anim_type = "drawcard",
frequency = Skill.Compulsory,
events = {fk.EventPhaseStart},
mute = true,
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and target.phase == Player.Finish and player:getHandcardNum() ~= 3
end,
on_use = function(self, event, target, player, data)
player:broadcastSkillInvoke(self.name)
local room = player.room
local n = player:getHandcardNum() - 3
if n < 0 then
room:notifySkillInvoked(player, self.name, "drawcard")
player:drawCards(-n, self.name)
else
room:notifySkillInvoked(player, self.name, "negative")
room:askForDiscard(player, n, n, false, self.name, false)
end
end,
}
Fk:addSkill(channi_viewas)
channi:addRelatedSkill(channi_delay)
yanfuren:addSkill(channi)
yanfuren:addSkill(nifu)
Fk:loadTranslationTable{
["rfenghou__yanfuren"] = "严夫人",
["#rfenghou__yanfuren"] = "霜天薄裳",
["illustrator:rfenghou__yanfuren"] = "君桓文化",
["rfenghou__channi"] = "谗逆",
[":rfenghou__channi"] = "出牌阶段限一次,你可以交给一名其他角色任意张手牌,然后该角色可以将X张手牌当一张【决斗】使用(X至多为你以此法交给其的牌数)。"..
"其因此使用【决斗】造成伤害后,其摸X张牌;其因此使用【决斗】受到伤害后,你弃置所有手牌。",
["rfenghou__nifu"] = "匿伏",
[":rfenghou__nifu"] = "锁定技,一名角色的结束阶段,你将手牌摸至或弃置至三张。",
["rfenghou__channi_viewas"] = "谗逆",
["#rfenghou__channi_delay"] = "谗逆",
["#rfenghou__channi-active"] = "发动 谗逆,将任意数量的手牌交给一名角色",
["#rfenghou__channi-invoke"] = "谗逆:你可以将至多%arg张手牌当一张【决斗】使用<br>若对目标造成伤害你摸等量牌,若你受到伤害则 %src 弃置所有手牌",
["$rfenghou__channi1"] = "宫、顺素不和,将军不在,此二人必难同心守城!",
["$rfenghou__channi2"] = "将军可信者唯掌上戟、堂中妻,切不可信顺、宫之流!",
["$rfenghou__nifu1"] = "我等一介弱女子,衣不当甲、手不掌兵,唯祈将军庇护。",
["$rfenghou__nifu2"] = "吾所愿者,非夫得高官厚禄,乃君可四季长安。",
["~rfenghou__yanfuren"] = "乱世浮萍,问归乡何处?",
}
local zhaoxiang = General(extension, "rfenghou__zhaoxiang", "han", 4, 4, General.Female)
local fanghun = fk.CreateTriggerSkill{
name = "rfenghou__fanghun",
events = {fk.TargetSpecified, fk.TargetConfirmed},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and data.card.trueName == "slash"
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
local room = player.room
room:addPlayerMark(player, "@meiying")
end,
on_lose = function (self, player, is_death)
player.room:setPlayerMark(player, "@meiying", 0)
end,
}
local fuhan = fk.CreateTriggerSkill{
name = "rfenghou__fuhan",
events = {fk.TurnStart},
frequency = Skill.Limited,
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player:getMark("@meiying") > 0 and
player:usedSkillTimes(self.name, Player.HistoryGame) == 0
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__fuhan-invoke")
end,
on_use = function(self, event, target, player, data)
local room = player.room
local n = player:getMark("@meiying")
room:setPlayerMark(player, "@meiying", 0)
room:handleAddLoseSkills(player, "-rfenghou__fanghun")
if player.dead then return end
local generals, same_g = {}, {}
for _, general_name in ipairs(room.general_pile) do
same_g = Fk:getSameGenerals(general_name)
table.insert(same_g, general_name)
same_g = table.filter(same_g, function (g_name)
local general = Fk.generals[g_name]
return general.kingdom == "shu" or general.subkingdom == "shu" or general.kingdom == "han" or general.subkingdom == "han"
end)
if #same_g > 0 then
table.insert(generals, table.random(same_g))
end
end
if #generals == 0 then return false end
generals = table.random(generals, n)
local skills = {}
local choices = {}
for _, general_name in ipairs(generals) do
local general = Fk.generals[general_name]
local g_skills = {}
for _, skill in ipairs(general.skills) do
if #skill.attachedKingdom == 0 or
(table.contains(skill.attachedKingdom, "shu") and player.kingdom == "shu") or
(table.contains(skill.attachedKingdom, "han") and player.kingdom == "han") then
table.insertIfNeed(g_skills, skill.name)
end
end
for _, s_name in ipairs(general.other_skills) do
local skill = Fk.skills[s_name]
if #skill.attachedKingdom == 0 or
(table.contains(skill.attachedKingdom, "shu") and player.kingdom == "shu") or
(table.contains(skill.attachedKingdom, "han") and player.kingdom == "han") then
table.insertIfNeed(g_skills, skill.name)
end
end
table.insertIfNeed(skills, g_skills)
if #choices == 0 and #g_skills > 0 then
choices = {g_skills[1]}
end
end
if #choices > 0 then
local result = player.room:askForCustomDialog(player, self.name,
"packages/aaa_fenghou/qml/ChooseGeneralSkillsBox.qml", {
generals, skills, 1, 2, "#rfenghou__fuhan-choice", false
})
if result ~= "" then
choices = json.decode(result)
end
room:handleAddLoseSkills(player, table.concat(choices, "|"), nil)
end
end,
}
zhaoxiang:addSkill(fanghun)
zhaoxiang:addSkill(fuhan)
Fk:loadTranslationTable{
["rfenghou__zhaoxiang"] = "赵襄",
["#rfenghou__zhaoxiang"] = "月痕芳影",
["illustrator:rfenghou__zhaoxiang"] = "疾速K",
["rfenghou__fanghun"] = "芳魂",
[":rfenghou__fanghun"] = "当你使用【杀】指定目标后或成为【杀】的目标后,你获得1个“梅影”标记。",
["rfenghou__fuhan"] = "扶汉",
[":rfenghou__fuhan"] = "限定技,回合开始时,你可以移去所有“梅影”标记并失去“芳魂”,然后从X张(X为移去“梅影”标记数)汉或蜀汉势力武将牌中选择"..
"并获得至多两个技能。",
--["#rfenghou__fanghun"] = "芳魂:弃1枚“梅影”标记发动“龙胆”并摸一张牌",
--["#rfenghou__fanghun_trigger"] = "芳魂",
["@meiying"] = "梅影",
["#rfenghou__fuhan-invoke"] = "扶汉:你可以移去“梅影”标记,获得两个蜀汉势力武将的技能!",
["#rfenghou__fuhan-choice"] = "扶汉:选择你要获得的至多2个技能",
["$rfenghou__fanghun1"] = "凝傲雪之梅为魄,英魂长存,独耀山河万古明!",
["$rfenghou__fanghun2"] = "铸凌霜之寒成剑,青锋出鞘,斩尽天下不臣贼!",
["$rfenghou__fuhan1"] = "逝者如斯,亘古长流,唯英烈之魂悬北斗而长存!",
["$rfenghou__fuhan2"] = "赵氏之女,跪祈诸公勿渡黄泉,暂留人间、佑大汉万年!",
["~rfenghou__zhaoxiang"] = "世受国恩,今当以身殉国。",
}
local liuche = General(extension, "rfenghou__liuche", "han", 4)
local rfenghou__kewang = fk.CreateTriggerSkill{
name = "rfenghou__kewang",
events = {fk.CardUsing},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and target == player then
return data.card.number ~= 0 and type(player:getMark("@rfenghou__kewang-turn")) == "number"
and player:getMark("@rfenghou__kewang-turn") ~= 0
and data.card.number % player:getMark("@rfenghou__kewang-turn") == 0
end
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
player:drawCards(1, self.name)
end,
refresh_events = {fk.CardUseFinished},
can_refresh = function (self, event, target, player, data)
if player:hasSkill(self, true) and target == player and player:getMark("@rfenghou__kewang-turn") == 0 then
local useEvent = player.room.logic:getEventsOfScope(GameEvent.UseCard, 1, function(e)
local use = e.data[1]
return use.from == player.id
end, Player.HistoryTurn)[1]
return useEvent and useEvent.data[1] == data
end
end,
on_refresh = function (self, event, target, player, data)
player.room:setPlayerMark(player, "@rfenghou__kewang-turn", data.card.number == 0 and "x" or data.card.number)
end,
}
liuche:addSkill(rfenghou__kewang)
local rfenghou__wuying = fk.CreateActiveSkill{
name = "rfenghou__wuying$",
anim_type = "support",
card_num = 1,
target_num = 1,
prompt = "#rfenghou__wuying",
card_filter = function(self, to_select, selected)
return #selected == 0 and Fk:getCardById(to_select).trueName == "slash"
end,
target_filter = function(self, to_select, selected, selected_cards)
return #selected == 0 and Self.id ~= to_select and #selected_cards > 0
end,
can_use = function(self, player)
return true
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.tos[1])
local cid = effect.cards[1]
if not cid then return end
room:obtainCard(to, cid, true, fk.ReasonGive, player.id, self.name)
if table.contains(to:getCardIds("h"), cid) and Fk:getCardById(cid).trueName == "slash" and to.kingdom == "han" then
U.askForUseRealCard(player.room, to, {cid}, ".", self.name, nil, nil, false, false)
end
end,
}
liuche:addSkill(rfenghou__wuying)
Fk:loadTranslationTable{
["rfenghou__liuche"] = "刘彻",
["#rfenghou__liuche"] = "汉武帝",
["designer:rfenghou__liuche"] = "低调的温柔",
["illustrator:rfenghou__liuche"] = "三国杀十周年",
["rfenghou__kewang"] = "可往",
[":rfenghou__kewang"] = "你每回合首次使用牌后,你本回合使用点数为之倍数的牌时摸一张牌。",
["@rfenghou__kewang-turn"] = "可往",
["rfenghou__wuying"] = "武英",
[":rfenghou__wuying"] = "主公技,出牌阶段,你可以将一张【杀】交给一名其他角色,若其为汉势力,令其使用之。",
["#rfenghou__wuying"] = "武英:将一张【杀】交给一名角色,若其为汉势力,令其使用之",
}
local liguang = General(extension, "rfenghou__liguang", "han", 4)
local rfenghou__feijiang = fk.CreateTriggerSkill{
name = "rfenghou__feijiang",
anim_type = "drawcard",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) then
return data.extra_data and data.extra_data.rfenghou__feijiangCount and data.extra_data.rfenghou__feijiangCount[player.id] ~= nil
end
end,
on_cost = function(self, event, target, player, data)
return true
end,
on_use = function(self, event, target, player, data)
local room = player.room
local count = data.extra_data.rfenghou__feijiangCount[player.id]
local cards = table.filter(room.draw_pile, function(id) return Fk:getCardById(id).is_damage_card end)
if #cards > 0 then
room:obtainCard(player, table.random(cards, count), true, fk.ReasonJustMove, player.id, self.name)
end
end,
refresh_events = {fk.AfterCardsMove},
can_refresh = function (self, event, target, player, data)
return player:hasSkill(self, true)
end,
on_refresh = function (self, event, target, player, data)
local mark, n = player:getMark("@rfenghou__feijiang-turn"), 0
for _, move in ipairs(data) do
if move.toArea == Card.DiscardPile then
n = n + #move.moveInfo
end
end
local count = ((mark+n) // 6) - (mark // 6)
if count > 0 then
data.extra_data = data.extra_data or {}
data.extra_data.rfenghou__feijiangCount = data.extra_data.rfenghou__feijiangCount or {}
data.extra_data.rfenghou__feijiangCount[player.id] = count
end
player.room:addPlayerMark(player, "@rfenghou__feijiang-turn", n)
end,
on_lose = function (self, player, is_death)
player.room:setPlayerMark(player, "@rfenghou__feijiang-turn", 0)
end,
}
liguang:addSkill(rfenghou__feijiang)
Fk:loadTranslationTable{
["rfenghou__liguang"] = "李广",
["#rfenghou__liguang"] = "",
["designer:rfenghou__liguang"] = "Romantic",
["illustrator:rfenghou__liguang"] = "三国杀十周年",
["rfenghou__feijiang"] = "飞将",
[":rfenghou__feijiang"] = "每回合内,每六张牌进入弃牌堆时,你检索一张伤害牌。",
["@rfenghou__feijiang-turn"] = "飞将",
}
local weizifu = General(extension, "rfenghou__weizifu", "han", 3, 3, General.Female)
local rfenghou__jianqi = fk.CreateActiveSkill{
name = "rfenghou__jianqi",
anim_type = "control",
card_num = 0,
target_num = 1,
prompt = "#rfenghou__jianqi",
interaction = function(self)
return UI.ComboBox { choices = {"rfenghou__jianqi_choose", "rfenghou__jianqi_top"} }
end,
card_filter = Util.FalseFunc,
target_filter = function(self, to_select, selected)
return #selected == 0
end,
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryGame) < 2
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.tos[1])
local generals = table.filter(room.general_pile, function(name)
return Fk.generals[name].kingdom == to.kingdom
end)
if #generals == 0 then return end
local general = generals[1]
if self.interaction.data == "rfenghou__jianqi_choose" then
general = room:askForGeneral(to, table.random(generals, 3), 1, true)
end
room:findGeneral(general)
room:changeHero(to, general, false, false, true, true)
end,
}
weizifu:addSkill(rfenghou__jianqi)
Fk:loadTranslationTable{
["rfenghou__weizifu"] = "卫子夫",
["#rfenghou__weizifu"] = "",
["designer:rfenghou__weizifu"] = "Romantic",
["illustrator:rfenghou__weizifu"] = "三国杀十周年",
["rfenghou__jianqi"] = "荐戚",
[":rfenghou__jianqi"] = "每局游戏限两次,出牌阶段,你可以选择一种变更规则并令一名角色按此规则变更武将牌。"..
"<br>*变更规则:1.从三张同势力武将牌中选择一张;2.替换武将牌为武将牌堆中首张同势力武将。",
["#rfenghou__jianqi"] = "荐戚:你可以令一名角色变更武将牌",
["rfenghou__jianqi_choose"] = "从三张同势力武将牌中选择一张",
["rfenghou__jianqi_top"] = "替换为武将牌堆中首张同势力武将",
}
return extension
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。