加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rfenghou_wu.lua 56.99 KB
一键复制 编辑 原始数据 按行查看 历史
RalphR 提交于 2024-12-16 14:18 . 明置牌MarkEnum
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424
local extension = Package("rfenghou_wu")
extension.extensionName = "aaa_fenghou"
local U = require "packages/utility/utility"
local RUtil = require "packages/aaa_fenghou/utility/rfenghou_util"
local DIY = require "packages/diy_utility/diy_utility"
Fk:loadTranslationTable{
["rfenghou_wu"] = "鎏吴",
["rfuyao"] = "扶摇",
}
local function AddWinAudio(general)
local Win = fk.CreateActiveSkill{ name = general.name.."_win_audio" }
Win.package = extension
Fk:addSkill(Win)
end
--FY008 朱异 by扬林
local zhuyi = General(extension, "rfuyao__zhuyi", "wu", 4)
local ruyuan = fk.CreateTriggerSkill{
name = "rfenghou__ruyuan",
anim_type = "offensive",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and target.phase == Player.Finish and player:getMark("rfenghou__ruyuan-round") == 0 and
not target.dead then
local n = 0
if table.every(player.room:getOtherPlayers(target), function (p)
return p:getHandcardNum() ~= target:getHandcardNum()
end) then
n = n + 1
end
if table.every(player.room:getOtherPlayers(target), function (p)
return p.hp ~= target.hp
end) then
n = n + 1
end
if n > 0 then
if player == target then n = 2 end
self.cost_data = {n = n, tos = {target.id}}
return true
end
end
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__ruyuan"..self.cost_data.n.."-invoke::"..target.id)
end,
on_use = function(self, event, target, player, data)
local room = player.room
if self.cost_data.n == 2 then
local _,dat = room:askForUseActiveSkill(player, "rfenghou__ruyuan_active", "#rfenghou__ruyuan-ironchain", true)
if dat then
if #dat.targets > 0 then
room:useVirtualCard("iron_chain", nil, player, table.map(dat.targets, Util.Id2PlayerMapper), self.name)
else
room:broadcastPlaySound("./audio/system/recast")
player:drawCards(1, "recast")
end
end
end
room:damage{
from = player,
to = target,
damage = 1,
damageType = fk.FireDamage,
skillName = self.name,
}
end,
}
local rfenghou__ruyuan_active = fk.CreateActiveSkill{
name = "rfenghou__ruyuan_active",
card_filter = Util.FalseFunc,
interaction = function()
return UI.ComboBox { choices = {"method_use", "recast"} }
end,
target_filter = function(self, to_select, selected)
if self.interaction.data == "recast" then return false end
local card = Fk:cloneCard("iron_chain")
card.skillName = ruyuan.name
local to = Fk:currentRoom():getPlayerById(to_select)
return #selected < card.skill:getMaxTargetNum(Self, card) and Self:canUseTo(card, to)
end,
feasible = function(self, selected, selected_cards)
return #selected > 0 or self.interaction.data == "recast"
end,
}
Fk:addSkill(rfenghou__ruyuan_active)
local huayan = fk.CreateTriggerSkill{
name = "rfenghou__huayan",
anim_type = "offensive",
events = {fk.DamageCaused},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and data.damageType == fk.FireDamage and not target.dead and not player:isNude() and
player:getMark("@@rfenghou_readying:::"..self.name) == 0 and
#player.room.logic:getActualDamageEvents(2, function (e)
local damage = e.data[1]
return damage.damageType == fk.FireDamage and damage.from == player and damage.to == target
end, Player.HistoryGame, 1) == 1
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__huayan-invoke::"..target.id)
end,
on_use = function(self, event, target, player, data)
local room = player.room
room:doIndicate(player.id, {target.id})
data.damage = data.damage + 3
room:setPlayerMark(player, "@rfenghou__huayan", 4)
player:throwAllCards("he")
end,
}
local huayan_delay = fk.CreateTriggerSkill{
name = "#rfenghou__huayan_delay",
mute = true,
events = {"fk.RfenghouSkillReady", fk.RoundEnd},
can_trigger = function(self, event, target, player, data)
if event == "fk.RfenghouSkillReady" then
return target == player and data == huayan
else
return player:getMark("@rfenghou__huayan") > 0
end
end,
on_cost = Util.TrueFunc,
on_use = function (self, event, target, player, data)
local room = player.room
if event == "fk.RfenghouSkillReady" then
room:setPlayerMark(player, "@rfenghou__huayan", 0)
else
room:removePlayerMark(player, "@rfenghou__huayan", 1)
if player:getMark("@rfenghou__huayan") == 0 then
room:killPlayer({who = player.id})
end
end
end,
}
huayan.RfenghouReadySkill = true
huayan:addRelatedSkill(huayan_delay)
zhuyi:addSkill(ruyuan)
zhuyi:addSkill(huayan)
AddWinAudio(zhuyi)
Fk:loadTranslationTable{
["rfuyao__zhuyi"] = "朱异",
["#rfuyao__zhuyi"] = "梁断弦櫜",
["illustrator:rfuyao__zhuyi"] = "哥达耀",
["designer:rfuyao__zhuyi"] = "扬林",
["cv:rfuyao__zhuyi"] = "超绝天",
["rfenghou__ruyuan"] = "如渊",
[":rfenghou__ruyuan"] = "一名角色的结束阶段,若其体力值或手牌数为场上唯一值,你可对其造成一点火焰伤害;若两项均为唯一值或其为你,你可先视为使用或重铸一张【铁索连环】。",
["#rfenghou__ruyuan1-invoke"] = "如渊:你可以对 %dest 造成1点火焰伤害",
["#rfenghou__ruyuan2-invoke"] = "如渊:你可以对 %dest 造成1点火焰伤害,且此前可视为使用【铁索】",
["rfenghou__ruyuan_active"] = "如渊",
["#rfenghou__ruyuan-ironchain"] = "如渊:你可视为使用或重铸【铁索连环】",
["rfenghou__huayan"] = "化焱",
[":rfenghou__huayan"] = "<a href='rfenghou_ready_skill'>蓄势技</a>,当你对一名角色第二次造成火焰伤害时,你可以弃置所有牌,令此伤害+3,"..
"若如此做,此后算起的第四轮结束时,若你未重置此技能,你阵亡。",
["#rfenghou__huayan-invoke"] = "化焱:你可以弃置所有牌,令 %dest 受到的伤害+3!",
["@rfenghou__huayan"] = "化焱",
["@@rfenghou_readying:::rfenghou__huayan"] = "化焱失效",
["$rfenghou__ruyuan1"] = "此心战战,如临深而履薄。",
["$rfenghou__ruyuan2"] = "上下无常,涉道浅、没足深。",
["$rfenghou__huayan1"] = "南岳干、钟山铜,应机方获隼。",
["$rfenghou__huayan2"] = "丙丁火、藏乎兑,此兆一线生。",
["~rfuyao__zhuyi"] = "功名难望、林木无枝。",
["$rfuyao__zhuyi_win_audio"] = "岂有蛟龙愁失水?更无鹰隼与高秋。",
}
--HY001 孙弘 by 廷玉
local sunhong = General(extension, "rfenghou__sunhong", "wu", 4)
local lvedong = fk.CreateTriggerSkill{
name = "rfenghou__lvedong",
anim_type = "special",
events = {fk.DrawNCards, fk.EventPhaseProceeding},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self) then
local n = 0
if event == fk.DrawNCards then
player.room.logic:getEventsOfScope(GameEvent.MoveCards, 1, function(e)
for _, move in ipairs(e.data) do
if move.from == player.id and move.moveReason == fk.ReasonDiscard and move.proposer == player.id then
n = n + #move.moveInfo
end
end
if n > 0 then
return true
end
end, Player.HistoryGame)
elseif event == fk.EventPhaseProceeding and player.phase == Player.Discard and not player:isNude() then
player.room.logic:getEventsOfScope(GameEvent.MoveCards, 1, function(e)
for _, move in ipairs(e.data) do
if move.from == player.id and move.moveReason == fk.ReasonDiscard then
n = n + #move.moveInfo
end
end
if n > 0 then
return true
end
end, Player.HistoryGame)
end
if n > 0 then
self.cost_data = 2 * n
return true
end
end
end,
on_cost = function(self, event, target, player, data)
if event == fk.DrawNCards then
local choices = {}
for i = 0, self.cost_data, 1 do
table.insert(choices, tostring(i))
end
table.insert(choices, "Cancel")
local choice = player.room:askForChoice(player, choices, self.name, "#rfenghou__lvedong-draw")
if choice ~= "Cancel" then
self.cost_data = {choice = choice}
return true
end
elseif event == fk.EventPhaseProceeding then
local cards = player.room:askForDiscard(player, self.cost_data, 999, true, self.name, true, nil,
"#rfenghou__lvedong-discard:::"..self.cost_data, true)
if #cards > 0 then
self.cost_data = {cards = cards}
return true
end
end
end,
on_use = function(self, event, target, player, data)
if event == fk.DrawNCards then
data.n = tonumber(self.cost_data.choice)
elseif event == fk.EventPhaseProceeding then
player._phase_end = true
player.room:throwCard(self.cost_data.cards, self.name, player, player)
end
end,
}
local jiao = fk.CreateTriggerSkill{
name = "rfenghou__jiao",
anim_type = "drawcard",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and not player:isKongcheng() then
for _, move in ipairs(data) do
if move.from == player.id and (move.extra_data or {}).rfenghou__jiao1 then
return true
end
end
end
end,
on_cost = function (self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__jiao-draw")
end,
on_use = function(self, event, target, player, data)
player:drawCards(2, self.name)
end,
refresh_events = {fk.AfterCardsMove},
can_refresh = function (self, event, target, player, data)
return player:hasSkill(self, true) and (player:getMark("jiao_lose-round") == 0 or player:getMark("jiao_get-round") == 0)
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
for _, move in ipairs(data) do
if move.from == player.id then
for _, info in ipairs(move.moveInfo) do
if info.fromArea == Card.PlayerHand or info.fromArea == Card.PlayerEquip then
if player:getMark("jiao_lose-round") == 0 then
room:setPlayerMark(player, "jiao_lose-round", 1)
move.extra_data = move.extra_data or {}
move.extra_data.rfenghou__jiao1 = true
end
end
end
end
if move.to == player.id and move.toArea == Card.PlayerHand then
if player:getMark("jiao_get-round") == 0 then
room:setPlayerMark(player, "jiao_get-round", 1)
move.extra_data = move.extra_data or {}
move.extra_data.rfenghou__jiao2 = true
end
end
end
end,
}
local jiao2 = fk.CreateTriggerSkill{
name = "#rfenghou__jiao",
anim_type = "negative",
main_skill = jiao,
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(jiao) and player:getHandcardNum() > 1 then
for _, move in ipairs(data) do
if move.to == player.id and (move.extra_data or {}).rfenghou__jiao2 then
return true
end
end
end
end,
on_cost = function (self, event, target, player, data)
local cards = player.room:askForDiscard(player, 2, 2, true, "rfenghou__jiao", true, nil, "#rfenghou__jiao-discard", true)
if #cards == 2 then
self.cost_data = {cards = cards}
return true
end
end,
on_use = function(self, event, target, player, data)
player.room:throwCard(self.cost_data.cards, "rfenghou__jiao", player, player)
end,
}
jiao:addRelatedSkill(jiao2)
sunhong:addSkill(lvedong)
sunhong:addSkill(jiao)
Fk:loadTranslationTable{
["rfenghou__sunhong"] = "孙弘",
["#rfenghou__sunhong"] = "休休之鸠",
["illustrator:rfenghou__sunhong"] = "",
["designer:rfenghou__sunhong"] = "廷玉",
["rfenghou__lvedong"] = "略懂",
[":rfenghou__lvedong"] = "摸牌阶段,你可以改为摸至多你上次弃置牌数两倍的牌;弃牌阶段,你可以改为弃置至少你上次摸牌数两倍的牌。",
["rfenghou__jiao"] = "极傲",
[":rfenghou__jiao"] = "当你失去牌后,若你本轮未获得过牌,你可以摸两张牌;当你获得牌后,若你本轮未失去过牌,你可以弃置两张牌。",
["#rfenghou__lvedong-draw"] = "略懂:现在是摸牌阶段,是否要更改摸牌数?",
["#rfenghou__lvedong-discard"] = "略懂:现在是弃牌阶段,是否要改为弃置至少%arg张牌?",
["#rfenghou__jiao-draw"] = "极傲:是否摸两张牌?",
["#rfenghou__jiao"] = "极傲",
["#rfenghou__jiao-discard"] = "极傲:是否弃置两张牌?",
["$rfenghou__lvedong1"] = "据图谋不轨,今奉诏索命。",
["$rfenghou__lvedong2"] = "休妄论芍陂之战,当诛之。",
["$rfenghou__jiao1"] = "宦海如薄冰,求生逐富贵。",
["$rfenghou__jiao2"] = "吾不欲为鱼肉,故为刀俎。",
["~rfenghou__sunhong"] = "孙弘",
}
--HY002 朱异 by yyuaN
local zhuyi = General(extension, "rfenghou__zhuyi", "wu", 4)
local kunzhao = fk.CreateTriggerSkill{
name = "rfenghou__kunzhao",
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
table.find(player.room:getOtherPlayers(player), function(p)
return not p:isNude()
end)
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local targets = table.filter(room:getOtherPlayers(player), function(p)
return not p:isNude()
end)
local to = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, 1,
"#rfenghou__kunzhao-choose", self.name, true)
if #to > 0 then
self.cost_data = {tos = to}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(self.cost_data.tos[1])
local card = room:askForCard(to, 1, 1, true, self.name, false, nil, "#rfenghou__kunzhao-give:"..player.id)
room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonGive, self.name, nil, false, to.id)
if player.dead or to.dead then return end
local choice = room:askForChoice(to, {"1", "2", "3"}, self.name, "#rfenghou__kunzhao-choice:"..player.id)
room:addPlayerMark(player, MarkEnum.SlashResidue.."-turn", tonumber(choice))
room:sendLog({
type = "#rfenghou__kunzhao_residue",
from = player.id,
arg = choice,
toast = true,
})
end,
}
local ranzhong = fk.CreateActiveSkill{
name = "rfenghou__ranzhong",
anim_type = "drawcard",
min_card_num = 1,
target_num = 0,
prompt = "#rfenghou__ranzhong",
can_use = function(self, player)
local card = Fk:cloneCard("slash")
local n = card.skill:getMaxUseTime(player, Player.HistoryPhase, card, nil) or 0
return player:usedCardTimes("slash", Player.HistoryPhase) < n
end,
card_filter = Util.TrueFunc,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
room:loseHp(player, 1, self.name)
if player.dead then return end
room:recastCard(effect.cards, player, self.name)
end,
}
local ranzhong_trigger = fk.CreateTriggerSkill{
name = "#rfenghou__ranzhong_trigger",
mute = true,
main_skill = ranzhong,
events = {fk.CardUseFinished},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(ranzhong) and data.card.trueName == "slash" and player.phase == Player.Play and
not data.extraUse and not player:isKongcheng() then
local card = Fk:cloneCard("slash")
local n = card.skill:getMaxUseTime(player, Player.HistoryPhase, card, nil) or 0
if player:usedCardTimes("slash", Player.HistoryPhase) == n then
return not table.find(player:getCardIds("h"), function (id)
return Fk:getCardById(id).trueName == "slash" and (player:isWounded() or player:getHandcardNum() < player.hp)
end)
end
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
player:showCards(player:getCardIds("h"))
if player.dead then return end
if player:isWounded() then
room:recover({
who = player,
num = 1,
recoverBy = player,
skillName = "rfenghou__ranzhong",
})
end
if player.dead or player:getHandcardNum() >= player.hp then return end
player:drawCards(player.hp - player:getHandcardNum(), "rfenghou__ranzhong")
end
}
ranzhong:addRelatedSkill(ranzhong_trigger)
zhuyi:addSkill(kunzhao)
zhuyi:addSkill(ranzhong)
Fk:loadTranslationTable{
["rfenghou__zhuyi"] = "朱异",
["#rfenghou__zhuyi"] = "枉戍力",
["illustrator:rfenghou__zhuyi"] = "哥达耀",
["designer:rfenghou__zhuyi"] = "yyuaN",
["cv:rfenghou__zhuyi"] = "超绝天",
["rfenghou__kunzhao"] = "困沼",
[":rfenghou__kunzhao"] = "准备阶段,你可以令一名其他角色交给你一张牌,然后其选择令你本回合出牌阶段使用【杀】次数增加1~3次。",
["rfenghou__ranzhong"] = "燃忠",
[":rfenghou__ranzhong"] = "出牌阶段,若你未达到使用【杀】次数上限,你可失去1点体力并重铸任意张牌;当你使用【杀】结算后,若本次使用【杀】"..
"使你达到使用【杀】次数上限且你手牌中没有【杀】,你可以展示所有手牌,回复1点体力并将手牌摸至体力值。",
["#rfenghou__kunzhao-choose"] = "困沼:令一名角色交给你一张牌,然后其令你本回合使用【杀】次数上限增加",
["#rfenghou__kunzhao-give"] = "困沼:请交给 %src 一张牌",
["#rfenghou__kunzhao-choice"] = "困沼:选择令 %src 本回合出牌阶段使用【杀】增加的次数",
["#rfenghou__kunzhao_residue"] = "%from 使用【杀】次数 +%arg",
["#rfenghou__ranzhong"] = "燃忠:你可以失去1点体力,重铸任意张牌",
["#rfenghou__ranzhong_trigger"] = "燃忠",
["$rfenghou__kunzhao1"] = "此心战战,如临深而履薄。",
["$rfenghou__kunzhao2"] = "上下无常,涉道浅、没足深。",
["$rfenghou__ranzhong1"] = "南岳干、钟山铜,应机方获隼。",
["$rfenghou__ranzhong2"] = "丙丁火、藏乎兑,此兆一线生。",
["~rfenghou__zhuyi"] = "功名难望、林木无枝。",
}
local weiwenzhugezhi = General(extension, "rfenghou__weiwenzhugezhi", "wu", 4)
local rfenghou__mingchao = fk.CreateActiveSkill{
name = "rfenghou__mingchao",
anim_type = "drawcard",
prompt = function (self)
return "#rfenghou__mingchao:::"..(Self:usedSkillTimes(self.name) + 1)
end,
target_num = 0,
interaction = function()
return UI.ComboBox { choices = {"rfenghou__mingchao1", "rfenghou__mingchao2"} }
end,
card_filter = function(self, to_select, selected)
if not table.contains(Self.player_cards[Player.Hand], to_select) then return false end
if table.contains(DIY.GetShownCards(Self), to_select) then return false end
if #selected == (Self:usedSkillTimes(self.name) + 1) then return false end
if self.interaction.data == "rfenghou__mingchao1" then
return true
else
return not Self:prohibitDiscard(Fk:getCardById(to_select))
end
end,
can_use = function(self, player)
return not player:isKongcheng()
end,
feasible = function(self, selected, selected_cards)
return #selected_cards == Self:usedSkillTimes(self.name) + 1
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local cards = table.simpleClone(effect.cards)
if self.interaction.data == "rfenghou__mingchao1" then
DIY.ShowCards(player, cards)
if not player.dead then
player:drawCards(1, self.name)
end
else
room:throwCard(cards, self.name, player, player)
while not player.dead do
cards = table.filter(cards, function(id)
return room:getCardArea(id) == Card.DiscardPile and
(Fk:getCardById(id).trueName == "slash" or Fk:getCardById(id).type == Card.TypeEquip)
end)
if #cards == 0 then break end
local use = U.askForUseRealCard(room, player, cards, ".", self.name, "#rfenghou__mingchao-use", {expand_pile = cards}, true)
if use then
table.removeOne(cards, use.card.id)
room:useCard(use)
else
break
end
end
end
end,
}
weiwenzhugezhi:addSkill(rfenghou__mingchao)
Fk:loadTranslationTable{
["rfenghou__weiwenzhugezhi"] = "卫温诸葛直",
["#rfenghou__weiwenzhugezhi"] = "谜络长洲",
["designer:rfenghou__weiwenzhugezhi"] = "祭祀",
["rfenghou__mingchao"] = "鸣潮",
[":rfenghou__mingchao"] = "出牌阶段,你可以选一项:1.明置X张暗置牌并摸一张牌;2.弃置X张暗置牌并使用其中的【杀】与装备牌。(X为本回合此技能发动次数+1)",
["rfenghou__mingchao1"] = "明置牌并摸一张牌",
["rfenghou__mingchao2"] = "弃暗置牌并使用其中杀与装备",
["@rfenghou__mingchao"] = "鸣潮",
["#rfenghou__mingchao"] = "鸣潮:你可以明置或弃置 %arg 张暗置牌",
["#rfenghou__mingchao-use"] = "鸣潮:你可使用其中的【杀】与装备牌",
["$rfenghou__mingchao1"] = "宦海沉浮,生死难料!",
["$rfenghou__mingchao2"] = "跨海南征,波涛起浮。",
["~rfenghou__weiwenzhugezhi"] = "吾皆海岱清士,岂料生死易逝。",
}
local sunluban = General(extension, "rfenghou__sunluban", "wu", 3, 3, General.Female)
local rfenghou__luanzheng = fk.CreateTriggerSkill{
name = "rfenghou__luanzheng",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
if player.phase == Player.Start then
return table.find(player.room.alive_players, function (p)
return #p:getCardIds("e") > 0
end)
elseif player.phase == Player.Finish then
return player:getMark("rfenghou__luanzheng-turn") ~= 0
end
end,
on_cost = function (self, event, target, player, data)
local room = player.room
if player.phase == Player.Finish then return true end
local tos = room:askForChooseToMoveCardInBoard(player, "#rfenghou__luanzheng-choose:::1", self.name, true, "e", true)
if #tos > 1 then
self.cost_data = tos
return true
end
end,
on_use = function (self, event, target, player, data)
local room = player.room
if player.phase == Player.Start then
local excludeIds = {}
for i = 1, 3 do
local tos
if i == 1 then
tos = table.simpleClone(self.cost_data)
else
tos = room:askForChooseToMoveCardInBoard(player, "#rfenghou__luanzheng-choose:::"..i, self.name, true, "e", true, excludeIds)
if #tos ~= 2 then break end
end
tos = table.map(tos, Util.Id2PlayerMapper)
local move = room:askForMoveCardInBoard(player, tos[1], tos[2], self.name, "e", nil, excludeIds)
if player.dead or not move then return end
table.insert(excludeIds, move.card.id)
room:addTableMark(player, "rfenghou__luanzheng-turn", {move.from, move.card.id})
end
else
local mark = player:getTableMark("rfenghou__luanzheng-turn")
local num = #mark
for _, info in ipairs(mark) do
local to = room:getPlayerById(info[1])
local cid = info[2]
local card = Fk:getCardById(cid)
if not to.dead and room:getCardArea(cid) == Card.PlayerEquip then
local targets = table.filter(room.alive_players, function(p) return p:canMoveCardIntoEquip(cid, false) end)
if #targets > 0 then
local tos = player.room:askForChoosePlayers(to, table.map(targets, Util.IdMapper), 1, 1,
"#rfenghou__luanzheng-replace:::"..Fk:getCardById(cid):toLogString(), self.name, true)
if #tos > 0 then
room:moveCardIntoEquip(room:getPlayerById(tos[1]), cid, self.name, false, to)
end
end
end
if table.contains(to:getCardIds("e"), cid) then
num = num - 1
end
end
if num > 0 then
player:drawCards(num, self.name)
end
end
end,
}
sunluban:addSkill(rfenghou__luanzheng)
local rfenghou__shejin = fk.CreateTriggerSkill{
name = "rfenghou__shejin",
events = {fk.HpChanged},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and target == player
and table.find(player.room.alive_players, function (p) return not p:isNude() end)
end,
on_cost = function (self, event, target, player, data)
local room = player.room
local targets = table.filter(room.alive_players, function (p) return not p:isNude() end)
local tos = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, 1, "#rfenghou__shejin-choose", self.name, true)
if #tos > 0 then
self.cost_data = {tos = tos}
return true
end
end,
on_use = function (self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(self.cost_data.tos[1])
if player.dead or to:isNude() then return end
local cards = room:askForCardsChosen(player, to, 1, 3, "he", self.name)
room:throwCard(cards, self.name, to, player)
if not to.dead and room:askForSkillInvoke(to, self.name, nil, "#rfenghou__shejin-draw:::"..#cards) then
room:setPlayerMark(to, "@@rfenghou__shejin-turn", 1)
cards = table.filter(to:drawCards(#cards, self.name), function(id) return table.contains(to:getCardIds("h"), id) end)
if #cards > 0 and not to.dead then
DIY.ShowCards(to, cards)
end
end
end,
}
local rfenghou__shejin_prohibit = fk.CreateProhibitSkill{
name = "#rfenghou__shejin_prohibit",
prohibit_use = function(self, player, card)
if player:getMark("@@rfenghou__shejin-turn") > 0 then
local cards = Card:getIdList(card)
return table.find(cards, function(id) return not table.contains(DIY.GetShownCards(player), id) end)
end
end,
}
rfenghou__shejin:addRelatedSkill(rfenghou__shejin_prohibit)
sunluban:addSkill(rfenghou__shejin)
Fk:loadTranslationTable{
["rfenghou__sunluban"] = "孙鲁班",
["#rfenghou__sunluban"] = "",
["designer:rfenghou__sunluban"] = "",
["rfenghou__luanzheng"] = "乱政",
[":rfenghou__luanzheng"] = "准备阶段,你可以移动场上至多三张装备牌,结束阶段,所有角色依次可以移动其因此失去的牌,最后每有一张牌未归原位,你摸一张牌。",
["#rfenghou__luanzheng-choose"] = "乱政:你可以移动场上装备牌(第 %arg 个,至多 3 个)",
["#rfenghou__luanzheng-replace"] = "乱政:你曾失去%arg,选择一名角色,将之移动至其装备区!",
["rfenghou__shejin"] = "涉矜",
[":rfenghou__shejin"] = "你的体力值变化后,你可以弃置一名角色至多三张牌,其可以摸等量张牌并明置,令其本回合不能使用暗置牌。",
["#rfenghou__shejin-choose"] = "涉矜:你可以弃置一名角色至多三张牌",
["@@rfenghou__shejin-turn"] = "涉矜中",
["#rfenghou__shejin-draw"] = "涉矜:你可以摸 %arg 张牌并明置,且本回合仅能使用明置牌",
["$rfenghou__luanzheng1"] = "我的好妹妹,来世莫要生于帝王家。",
["$rfenghou__luanzheng2"] = "至尊有诏,不从长公主者,斩!",
["$rfenghou__shejin1"] = "本宫比之猛虎,谁更使人惧乎?",
["$rfenghou__shejin2"] = "猛虎食人心肝,本宫灭人神魂。",
["~rfenghou__sunluban"]= "生于朱楼高阙,谈何亲情?",
}
local sunxiu = General(extension, "rfenghou__sunxiu", "wu", 3)
local yuling = fk.CreateTriggerSkill{
name = "rfenghou__yuling",
anim_type = "control",
events = {fk.RoundEnd},
can_trigger = function (self, event, target, player, data)
if player:hasSkill(self) then
local room = player.room
local targets = {}
room.logic:getEventsOfScope(GameEvent.UseCard, 1, function (e)
local use = e.data[1]
if use.card.trueName == "slash" then
table.insert(targets, use.from)
return true
end
end, Player.HistoryRound)
room.logic:getEventsOfScope(GameEvent.MoveCards, 1, function (e)
for _, move in ipairs(e.data) do
if move.from and move.moveReason == fk.ReasonDiscard then
for _, info in ipairs(move.moveInfo) do
if Fk:getCardById(info.cardId).trueName == "slash" then
table.insert(targets, move.from)
return true
end
end
end
end
end, Player.HistoryRound)
room.logic:getEventsByRule(GameEvent.UseCard, 1, function (e)
local use = e.data[1]
if use.card.trueName == "slash" then
table.insert(targets, use.from)
return true
end
end, room.logic:getCurrentEvent().id)
targets = table.filter(targets, function (id)
return not room:getPlayerById(id).dead
end)
if #targets > 0 then
room:sortPlayersByAction(targets)
self.cost_data = {tos = targets}
return true
end
end
end,
on_cost = function (self, event, target, player, data)
local room = player.room
for _, pid in ipairs(self.cost_data.tos) do
room:addPlayerMark(room:getPlayerById(pid), "@rfenghou__yuling")
end
local invoke = room:askForSkillInvoke(player, self.name, nil, "#rfenghou__yuling-invoke")
for _, pid in ipairs(self.cost_data.tos) do
room:setPlayerMark(room:getPlayerById(pid), "@rfenghou__yuling", 0)
end
return invoke
end,
on_use = function (self, event, target, player, data)
local room = player.room
local tos = table.map(self.cost_data.tos, Util.Id2PlayerMapper)
local me = table.contains(tos, player) and player
for _, to in ipairs(tos) do
if not to.dead and not to:isNude() then
if me and not me.dead and me ~= to then
local cid = room:askForCardChosen(me, to, "he", self.name)
room:askForYiji(me, {cid}, room:getOtherPlayers(to), self.name, 1, 1, "#rfenghou__yuling-card:"..to.id, {cid})
else
room:askForYiji(to, to:getCardIds("he"), room:getOtherPlayers(to), self.name, 1, 1, "#rfenghou__yuling-card:"..to.id)
end
end
end
end,
}
local yizhu = fk.CreateActiveSkill{
name = "rfenghou__yizhu",
mute = true,
card_num = 0,
target_num = 1,
prompt = function (self, selected_cards)
if Self:getMark("@!rfenghou1") == 1 then
return "#rfenghou__yizhu1"
elseif Self:getMark("@!rfenghou2") == 1 then
return "#rfenghou__yizhu2"
elseif Self:getMark("@!rfenghou3") == 1 then
return "#rfenghou__yizhu3"
end
end,
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)
if #selected == 0 then
if Self:getMark("@!rfenghou1") == 1 then
return not Fk:currentRoom():getPlayerById(to_select).chained
else
return true
end
end
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local target = room:getPlayerById(effect.tos[1])
room:notifySkillInvoked(player, self.name, "control")
if player:getMark("@!rfenghou1") == 1 then
player:broadcastSkillInvoke(self.name, table.random({1, 2}))
RUtil.RfenghouSwitch(player, 3)
room:addTableMark(player, self.name, target.id)
target:setChainState(true)
elseif player:getMark("@!rfenghou2") == 1 then
player:broadcastSkillInvoke(self.name, table.random({3, 4}))
RUtil.RfenghouSwitch(player, 3)
target:turnOver()
elseif player:getMark("@!rfenghou3") == 1 then
player:broadcastSkillInvoke(self.name, table.random({5, 6}))
RUtil.RfenghouSwitch(player, 3)
room:killPlayer{who = target.id, damage = {to = target, damage = 1, from = player}} -- 虚构damage非常危险
end
end,
}
yizhu.RfenghouReadySkill = true
local yizhu_trigger = fk.CreateTriggerSkill{
name = "#rfenghou__yizhu_trigger",
mute = true,
events = {fk.ChainStateChanged},
can_trigger = function (self, event, target, player, data)
return player:hasSkill(yizhu, true) and not target.chained and table.contains(player:getTableMark("rfenghou__yizhu"), target.id)
end,
on_cost = Util.TrueFunc,
on_use = function (self, event, target, player, data)
local room = player.room
room:notifySkillInvoked(player, "rfenghou__yizhu", "special")
player:broadcastSkillInvoke("rfenghou__yizhu", table.random({7, 8}))
room:setPlayerMark(player, "@!rfenghou1", 1)
room:setPlayerMark(player, "@!rfenghou2", 0)
room:setPlayerMark(player, "@!rfenghou3", 0)
room:setPlayerMark(player, "@@rfenghou_readying:::rfenghou__yizhu", 0)
room.logic:trigger("fk.RfenghouSkillReady", player, yizhu, false)
end,
refresh_events = {fk.EventAcquireSkill, fk.EventLoseSkill},
can_refresh = function (self, event, target, player, data)
return target == player and data == yizhu
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
if event == fk.EventAcquireSkill then
room:setPlayerMark(player, "@!rfenghou1", 1)
else
for i = 1, 3, 1 do
room:setPlayerMark(player, "@!rfenghou__cuoyi"..i, 0)
end
end
end,
}
local yuxing = fk.CreateTriggerSkill{
name = "rfenghou__yuxing$",
anim_type = "support",
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:canUse(Fk:cloneCard("await_exhausted"))
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#rfenghou__yuxing-invoke")
end,
on_use = function(self, event, target, player, data)
local room = player.room
local card = Fk:cloneCard("await_exhausted")
card.skillName = self.name
local use = {
from = player.id,
card = card,
}
use.extra_data = use.extra_data or {}
use.extra_data.rfenghou__yuxing = player.id
room:useCard(use)
if player.dead then return end
local cards = player:getTableMark("rfenghou__yuxing-tmp")
room:setPlayerMark(player, "rfenghou__yuxing-tmp", 0)
cards = table.filter(cards, function (id)
return table.contains(room.discard_pile, id)
end)
if #cards < 2 then return end
cards = room:askForGuanxing(player, cards, {2, 2}, nil, self.name, true, {"Top", "pile_discard"}).top
if #cards == 2 then
room:moveCards({
ids = table.reverse(cards),
toArea = Card.DrawPile,
moveReason = fk.ReasonPut,
skillName = self.name,
proposer = player.id,
})
end
end,
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 == "await_exhausted_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__yuxing == 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)
local mark = player:getTableMark("rfenghou__yuxing-tmp")
table.insertTableIfNeed(mark, self.cost_data)
player.room:setPlayerMark(player, "rfenghou__yuxing-tmp", mark)
end,
}
yizhu:addRelatedSkill(yizhu_trigger)
sunxiu:addSkill(yuling)
sunxiu:addSkill(yizhu)
sunxiu:addSkill(yuxing)
Fk:loadTranslationTable{
["rfenghou__sunxiu"] = "孙休",
["#rfenghou__sunxiu"] = "孤翼不折",
["illustrator:rfenghou__sunxiu"] = "兴游",
["designer:rfenghou__sunxiu"] = "zzcclll朱苦力",
["cv:rfenghou__sunxiu"] = "zzcclll朱苦力",
["rfenghou__yuling"] = "御凌",
[":rfenghou__yuling"] = "每轮结束时,你可以令本轮最先使用【杀】、最先弃置【杀】、最后使用【杀】的角色依次分配一张牌。若含你,均由你分配。",
["rfenghou__yizhu"] = "抑诛",
[":rfenghou__yizhu"] = "转换技,<a href='rfenghou_ready_skill'>蓄势技</a>,出牌阶段,你可以令一名角色①横置②翻面③死亡。"..
"当你发动①选择的角色武将牌重置后,重置此技能的转换技选项和蓄势技状态。",
["rfenghou__yuxing"] = "聿兴",
[":rfenghou__yuxing"] = "主公技,准备阶段,你可以视为使用【以逸待劳】,结算后将因此弃置的两张牌置于牌堆顶。",
["#rfenghou__yuling-invoke"] = "御凌:是否令满足条件的角色各分配一张牌?",
["#rfenghou__yuling-card"] = "御凌:请分配 %src 的一张牌",
["@rfenghou__yuling"] = "御凌分配",
["#rfenghou__yizhu1"] = "抑诛:你可以令一名角色横置!",
["#rfenghou__yizhu2"] = "抑诛:你可以令一名角色翻面!",
["#rfenghou__yizhu3"] = "抑诛:你可以杀死一名角色!",
["@@rfenghou_readying:::rfenghou__yizhu"] = "抑诛失效",
["#rfenghou__yizhu_trigger"] = "抑诛",
["#rfenghou__yuxing-invoke"] = "聿兴:是否视为使用【以逸待劳】?",
["$rfenghou__yuling1"] = "御国之术者,政出于一。",
["$rfenghou__yuling2"] = "天命有常者,在予一人。",
["$rfenghou__yizhu1"] = "彼招摇过市,其心可知也。",
["$rfenghou__yizhu2"] = "彼跋扈至此,令孤芒刺在背。",
["$rfenghou__yizhu3"] = "庙堂甚高,无卿之禄。",
["$rfenghou__yizhu4"] = "金樽共汝饮,公自求多福吧。",
["$rfenghou__yizhu5"] = "白刃不相饶!",
["$rfenghou__yizhu6"] = "诛此獠!使乱臣贼子惧。",
["$rfenghou__yizhu7"] = "尔来非亮剑之时也。",
["$rfenghou__yizhu8"] = "诛枭立威,非之时也,且姑待之。",
["$rfenghou__yuxing1"] = "群贤皆蜂至,良策自涌来!",
["$rfenghou__yuxing2"] = "闻良臣之言,如闻丝竹之音,足可慰也!",
["~rfenghou__sunxiu"] = "社稷无常奉,君臣无常位……",
}
local lie = General(extension, "rfenghou__lie", "wu", 3, 3, General.Female)
local rfenghou__mingqi = fk.CreateActiveSkill{
name = "rfenghou__mingqi",
anim_type = "drawcard",
prompt = "#rfenghou__mingqi",
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_num = 0,
card_filter = Util.FalseFunc,
target_num = 0,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local cards = {}
while not player.dead do
local top = room:getNCards(1)[1]
room:moveCardTo(top, Card.Processing, nil, fk.ReasonJustMove, self.name, nil, true, player.id)
local bad = Fk:getCardById(top).type == Card.TypeEquip
room:setCardEmotion(top, bad and "judgebad" or "judgegood")
table.insert(cards, top)
room:delay(600)
if bad then
break
end
end
cards = table.filter(cards, function(id) return room:getCardArea(id) == Card.Processing end)
if not player.dead and #cards > 0 then
local targets = table.map(room.alive_players, Util.IdMapper)
if #targets > 0 then
local chosen = room:askForPoxi(player, "rfenghou__mingqi_choose", {
{ self.name, cards },
}, {}, false)
room:obtainCard(player, chosen, true, fk.ReasonJustMove, player.id, self.name)
local num = math.min(#chosen, #player:getCardIds("he"))
if num > 0 then
local tos, giveCards = room:askForChooseCardsAndPlayers(player, num, num, table.map(room:getOtherPlayers(player, false),
Util.IdMapper), 0, 1, ".", "#rfenghou__mingqi-give:::"..num, self.name, false)
if #tos > 0 then
room:obtainCard(room:getPlayerById(tos[1]), giveCards, true, fk.ReasonGive, player.id, self.name)
else
room:throwCard(giveCards, self.name, player, player)
end
end
end
end
cards = table.filter(cards, function(id) return room:getCardArea(id) == Card.Processing end)
if #cards > 0 then
room:moveCardTo(cards, Card.DiscardPile, nil, fk.ReasonJudge)
end
end,
}
local rfenghou__mingqi_trigger = fk.CreateTriggerSkill{
name = "#rfenghou__mingqi_trigger",
refresh_events = {fk.AfterDrawPileShuffle},
can_refresh = function(self, event, target, player, data)
local e = player.room.logic:getCurrentEvent():findParent(GameEvent.SkillEffect)
return e and e.data[3] == rfenghou__mingqi and e.data[2] == player
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
room.logic:getCurrentEvent():findParent(GameEvent.SkillEffect):addExitFunc(function()
if not player.dead then
room:killPlayer{who = player.id}
end
end)
end,
}
rfenghou__mingqi:addRelatedSkill(rfenghou__mingqi_trigger)
lie:addSkill(rfenghou__mingqi)
Fk:addPoxiMethod{
name = "rfenghou__mingqi_choose",
card_filter = function(to_select, selected, data, extra_data)
if data == nil or extra_data == nil then return false end
if table.find(selected, function (id)
return Fk:getCardById(id).trueName == Fk:getCardById(to_select).trueName
end) then return false end
local count = Fk:translate(Fk:getCardById(to_select).trueName, "zh_CN"):len()
for _, id in ipairs(selected) do
count = count + Fk:translate(Fk:getCardById(id).trueName, "zh_CN"):len()
end
return count <= 10
end,
feasible = function(selected, data, extra_data)
return #selected > 0
end,
prompt = function ()
return "#rfenghou__mingqi-card"
end,
default_choice = function (data, extra_data)
return data and {data[1][2][1]} or {}
end,
}
local rfenghou__huangzhu = fk.CreateTriggerSkill{
name = "rfenghou__huangzhu",
events = {fk.Death},
anim_type = "support",
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self, false, true) and target == player
end,
on_cost = function(self, event, target, player, data)
local tos = player.room:askForChoosePlayers(player, table.map(player.room.alive_players, Util.IdMapper), 1, 1, "#rfenghou__huangzhu-choose", self.name, true)
if #tos > 0 then
self.cost_data = {tos = tos}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(self.cost_data.tos[1])
local ids, types = {}, {}
local piles = table.connect(room.draw_pile, room.discard_pile)
while #piles > 0 do
local id = table.remove(piles, math.random(#piles))
if Fk:getCardById(id).type == Card.TypeEquip and table.insertIfNeed(types, Fk:getCardById(id).sub_type) then
table.insertIfNeed(ids, id)
end
end
if #ids > 0 then
room:moveCardTo(ids, Player.Hand, to, fk.ReasonJustMove, self.name)
end
end,
}
lie:addSkill(rfenghou__huangzhu)
Fk:loadTranslationTable{
["rfenghou__lie"] = "李娥",
["#rfenghou__lie"] = "炉尸传说",
["illustrator:rfenghou__lie"] = "",
["designer:rfenghou__lie"] = "会乱武的袁绍",
["rfenghou__mingqi"] = "命祈",
[":rfenghou__mingqi"] = "出牌阶段限一次,你可以亮出牌堆顶的牌至亮出装备牌,然后获得亮出牌中任意张名称不同且名称字数之和不大于10的牌并选择:1.交给一名角色等量张牌;2.弃置等量张牌;若你以此法使得牌堆洗切,你于结算完成后死亡。",
["#rfenghou__mingqi"] = "命祈:你可以亮出牌堆顶牌直到亮出装备牌",
["#rfenghou__mingqi-card"] = "选择牌名不同且牌名字数之和不大于10的牌",
["rfenghou__mingqi_choose"] = "命祈 选牌",
["#rfenghou__mingqi_trigger"] = "命祈",
["#rfenghou__mingqi-give"] = "命祈:你须选择 %arg 张牌交给一名其他角色,不选目标则弃置之",
["rfenghou__huangzhu"] = "衁铸",
[":rfenghou__huangzhu"] = "当你死亡时,你可以令一名角色从牌堆获得所有副类别的装备各一张。",
["#rfenghou__huangzhu-choose"] = "衁铸:请选择一名角色,令其获得所有副类别的装备各一张",
}
local shiyi = General(extension, "rfenghou__shiyi", "wu", 3)
local zoujian = fk.CreateTriggerSkill{
name = "rfenghou__zoujian",
anim_type = "control",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and target ~= player and target.phase == Player.Discard and not target.dead and
player:getHandcardNum() > 1
end,
on_cost = function(self, event, target, player, data)
local cards = player.room:askForDiscard(player, 2, 2, false, self.name, true, nil,
"#rfenghou__zoujian::"..target.id, true)
if #cards == 2 then
self.cost_data = {tos = {target.id}, cards = cards}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local cards = self.cost_data.cards
local n = math.abs(Fk:getCardById(cards[1]).number - Fk:getCardById(cards[2]).number)
local orig = target:getMaxCards()
room:throwCard(cards, self.name, player, player)
if not player.dead then
player:drawCards(1, self.name)
end
if not target.dead then
room:setPlayerMark(target, "@rfenghou__zoujian-round", tostring(n))
if n < orig and target:isWounded() then
room:recover{
who = target,
num = 1,
recoverBy = player,
skillName = self.name,
}
end
end
end,
}
local zoujian_maxcards = fk.CreateMaxCardsSkill{
name = "#rfenghou__zoujian_maxcards",
fixed_func = function(self, player)
if player:getMark("@rfenghou__zoujian-round") ~= 0 then
return tonumber(player:getMark("@rfenghou__zoujian-round"))
end
end
}
local gongzhui = fk.CreateTriggerSkill{
name = "rfenghou__gongzhui",
anim_type = "support",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and player:isKongcheng() and player:usedSkillTimes(self.name, Player.HistoryRound) == 0 then
local ret = false
for _, move in ipairs(data) do
if move.from == player.id then
for _, info in ipairs(move.moveInfo) do
if info.fromArea == Card.PlayerHand then
ret = true
break
end
end
end
end
if ret then
return table.find(player.room.alive_players, function(p)
return p:getHandcardNum() < math.min(p:getMaxCards(), 5)
end)
end
end
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local targets = table.filter(room.alive_players, function(p)
return p:getHandcardNum() < math.min(p:getMaxCards(), 5)
end)
local n = player.hp == 1 and 2 or 1
local tos = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, n,
"#rfenghou__gongzhui-choose:::"..n, self.name, true)
if #tos > 0 then
room:sortPlayersByAction(tos)
self.cost_data = {tos = tos}
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
for _, id in ipairs(self.cost_data.tos) do
local p = room:getPlayerById(id)
if not p.dead and p:getHandcardNum() < math.min(p:getMaxCards(), 5) then
p:drawCards(math.min(p:getMaxCards(), 5) - p:getHandcardNum(), self.name)
end
end
end,
}
zoujian:addRelatedSkill(zoujian_maxcards)
shiyi:addSkill(zoujian)
shiyi:addSkill(gongzhui)
Fk:loadTranslationTable{
["rfenghou__shiyi"] = "是仪",
["#rfenghou__shiyi"] = "冠玉未瑕",
["illustrator:rfenghou__shiyi"] = "凡果",
["designer:rfenghou__shiyi"] = "一网打尽岁月",
["rfenghou__zoujian"] = "诹谏",
[":rfenghou__zoujian"] = "一名其他角色的弃牌阶段开始时,你可以弃置两张手牌并摸一张牌,然后将其此轮手牌上限改为这两张牌点数之差。"..
"若因此减少,其回复1点体力。",
["rfenghou__gongzhui"] = "恭追",
[":rfenghou__gongzhui"] = "每轮限一次,当你失去最后的手牌后,你可以令一名角色将手牌补至手牌上限(至多为五),若你体力值为1,可以额外选择"..
"一名角色。",
["#rfenghou__zoujian"] = "诹谏:你可弃2张手牌并摸1张牌,将 %dest 本轮手牌上限改为这两牌点数之差",
["@rfenghou__zoujian-round"] = "诹谏",
["#rfenghou__gongzhui-choose"] = "恭追:你可以令%arg名角色将手牌补至手牌上限(至多为五)",
["$rfenghou__zoujian1"] = "臣所言者皆为所知者,辞不敢移。",
["$rfenghou__zoujian2"] = "少主有至尊之风,可尽心佐之。",
["$rfenghou__gongzhui1"] = "不羡秋月春风,只擎殿陛砖瓦。",
["$rfenghou__gongzhui2"] = "此身长于草木,当为国之柱石。",
["~rfenghou__shiyi"] = "欲从真龙,奈何年迈。",
}
local dongfeng = General(extension, "rfenghou__dongfeng", "wu", 3)
local rfenghou__ganjin = fk.CreateActiveSkill{
name = "rfenghou__ganjin",
anim_type = "switch",
switch_skill_name = "rfenghou__ganjin",
card_num = 0,
target_num = 1,
card_filter = Util.FalseFunc,
prompt = function (self)
local effect = Self:getSwitchSkillState(self.name) == fk.SwitchYang and "rfenghou__ganjin_recover" or "rfenghou__ganjin_draw"
return "#rfenghou__ganjin:::"..effect
end,
target_filter = function(self, to_select, selected)
if #selected > 0 then return false end
local to = Fk:currentRoom():getPlayerById(to_select)
if Self:getSwitchSkillState(self.name) == fk.SwitchYang and not to:isWounded() then return false end
return true
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 to = room:getPlayerById(effect.tos[1])
if player:getSwitchSkillState(self.name, true) == fk.SwitchYang then
room:recover { num = 1, skillName = self.name, who = to, recoverBy = player }
else
to:drawCards(2, self.name)
end
if to.dead or to:isNude() then return end
local _, dat = room:askForUseActiveSkill(to, "rfenghou__ganjin_other", "#rfenghou__ganjin-other")
if not dat then return end
local choice, cards = dat.interaction, dat.cards
if choice == "rfenghou__ganjin_use" then
room:useCard{ card = Fk:getCardById(cards[1]), from = to.id, tos = {{to.id}} }
else
room:recastCard(cards, to, self.name)
end
player:setSkillUseHistory(self.name, 0, Player.HistoryPhase)
end,
}
local rfenghou__ganjin_other = fk.CreateActiveSkill{
name = "rfenghou__ganjin_other",
anim_type = "offensive",
card_num = 1,
target_num = 0,
interaction = function()
return UI.ComboBox { choices = {"rfenghou__ganjin_use", "rfenghou__ganjin_recast"} }
end,
card_filter = function(self, to_select, selected)
local card = Fk:getCardById(to_select)
if #selected > 0 or card.color ~= Card.Red then return false end
if card.type == Card.TypeEquip or card.is_passive or (not card.multiple_targets and card.skill:getMinTargetNum() == 0) then
if self.interaction.data == "rfenghou__ganjin_recast" then return true end
if table.contains(Self:getCardIds("e"), to_select) or Self:prohibitUse(card) or Self:isProhibited(Self, card) then return false end
return Self:canUse(card)
end
end,
}
Fk:addSkill(rfenghou__ganjin_other)
local rfenghou__ganjin_record = fk.CreateTriggerSkill{
name = "#rfenghou__ganjin_record",
refresh_events = {fk.EnterDying, fk.EventAcquireSkill},
can_refresh = function(self, event, target, player, data)
if event == fk.EnterDying then
return target == player and player:getMark("rfenghou__ganjin_dying") == 0
else
return target == player and data == rfenghou__ganjin
end
end,
on_refresh = function (self, event, target, player, data)
local room = player.room
if event == fk.EnterDying then
room:setPlayerMark(player, "rfenghou__ganjin_dying", 1)
else
room.logic:getEventsOfScope(GameEvent.Dying, 1, function(e)
local who = room:getPlayerById(e.data[1].who)
if who and who:getMark("rfenghou__ganjin_dying") == 0 then
room:setPlayerMark(who, "rfenghou__ganjin_dying", 1)
end
end, Player.HistoryGame)
end
end,
}
rfenghou__ganjin:addRelatedSkill(rfenghou__ganjin_record)
dongfeng:addSkill(rfenghou__ganjin)
local rfenghou__zhuilu = fk.CreateTriggerSkill{
name = "rfenghou__zhuilu",
events = {fk.EnterDying},
frequency = Skill.Limited,
can_trigger = function (self, event, target, player, data)
return player:hasSkill(self) and target == player and player:usedSkillTimes(self.name, Player.HistoryGame) == 0
end,
on_cost = function (self, event, target, player, data)
local room = player.room
local tos = room:askForChoosePlayers(player, table.map(room.alive_players, Util.IdMapper), 1, 1, "#rfenghou__zhuilu-choose", self.name, true)
if #tos > 0 then
self.cost_data = { tos = tos }
return true
end
end,
on_use = function (self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(self.cost_data.tos[1])
room:handleAddLoseSkills(to, "rfenghou__shengxi|rfenghou__quji")
end,
}
dongfeng:addSkill(rfenghou__zhuilu)
local shengxi = fk.CreateTriggerSkill{
name = "rfenghou__shengxi",
anim_type = "drawcard",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return player == target and player:hasSkill(self) and player.phase == Player.Finish and
#player.room.logic:getActualDamageEvents(1, function(e) return e.data[1].from == player end) == 0
end,
on_use = function(self, event, target, player, data)
player:drawCards(2, self.name)
end,
}
dongfeng:addRelatedSkill(shengxi)
local quji = fk.CreateActiveSkill{
name = "rfenghou__quji",
anim_type = "support",
min_card_num = function ()
return Self:getLostHp()
end,
min_target_num = 1,
prompt = function ()
return "#rfenghou__quji:::"..Self:getLostHp()
end,
can_use = function(self, player)
return player:isWounded() and player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_filter = function(self, to_select, selected)
return #selected < Self:getLostHp()
end,
target_filter = function(self, to_select, selected, cards)
return #selected < Self:getLostHp() and Fk:currentRoom():getPlayerById(to_select):isWounded()
and #cards == Self:getLostHp()
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
local loseHp = table.find(effect.cards, function(id) return Fk:getCardById(id).color == Card.Black end)
room:throwCard(effect.cards, self.name, player, player)
local tos = effect.tos
room:sortPlayersByAction(tos)
for _, pid in ipairs(tos) do
local to = room:getPlayerById(pid)
if not to.dead and to:isWounded() then
room:recover({
who = to,
num = 1,
recoverBy = player,
skillName = self.name
})
end
end
if loseHp and not player.dead then
room:loseHp(player, 1, self.name)
end
end,
}
dongfeng:addRelatedSkill(quji)
Fk:loadTranslationTable{
["rfenghou__dongfeng"] = "董奉",
["#rfenghou__dongfeng"] = "",
["illustrator:rfenghou__dongfeng"] = "",
["designer:rfenghou__dongfeng"] = "会乱武的袁绍",
["rfenghou__ganjin"] = "甘津",
[":rfenghou__ganjin"] = "转换技,出牌阶段限一次,你可令一名角色①回复1点体力②摸两张牌,然后该角色可使用或重铸一张不能指定其他角色为目标的"..
"红色牌以令〖甘津〗视为未发动。",
["#rfenghou__ganjin"] = "甘津:令一名角色:%arg",
["rfenghou__ganjin_recover"] = "回复1点体力",
["rfenghou__ganjin_draw"] = "摸2张牌",
["#rfenghou__ganjin-other"] = "你可以使用或重铸一张不能指定其他角色为目标的红色牌以重置“甘津”",
["rfenghou__ganjin_use"] = "使用",
["rfenghou__ganjin_recast"] = "重铸",
["rfenghou__ganjin_other"] = "甘津",
["rfenghou__zhuilu"] = "坠露",
[":rfenghou__zhuilu"] = "限定技,你进入濒死时,可以令一名角色获得“生息”、“去疾”。",
["#rfenghou__zhuilu-choose"] = "坠露:你可以令一名角色获得“生息”、“去疾”",
["rfenghou__quji"] = "去疾",
[":rfenghou__quji"] = "出牌阶段限一次,你可以弃置X张牌并选择至多X名已受伤的角色,令这些角色各回复1点体力,然后若你以此法弃置过的牌中有黑色牌,你失去1点体力。(X为你已损失的体力值)",
["#rfenghou__quji"] = "去疾:弃置%arg张牌,令至多等量角色回复体力,若弃了黑色牌,你失去1点体力",
["rfenghou__shengxi"] = "生息",
[":rfenghou__shengxi"] = "结束阶段,若你于此回合内未造成过伤害,你可摸两张牌。",
["$rfenghou__zhuilu1"] = "",
["$rfenghou__zhuilu2"] = "",
}
return extension
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化