代码拉取完成,页面将自动刷新
同步操作将从 北冰洋T/宝宝杀 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
local extension = Package("joy_qyhc")
extension.extensionName = "newjoy"
Fk:loadTranslationTable{
["joy_qyhc"] = "欢乐-群英荟萃",
}
local U = require "packages/utility/utility"
local zhangxuan = General(extension, "joy__zhangxuan", "wu", 4, 4, General.Female)
local tongli = fk.CreateTriggerSkill{
name = "joy__tongli",
anim_type = "offensive",
events = {fk.TargetSpecified},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self) and player.phase == Player.Play and data.firstTarget and
data.extra_data and data.extra_data.tongli_target and
not table.contains(data.card.skillNames, self.name) and player:getMark("@joy__tongli-phase") > 0 and
data.card.type ~= Card.TypeEquip and data.card.sub_type ~= Card.SubtypeDelayedTrick and
not (table.contains({"peach", "analeptic"}, data.card.trueName) and
table.find(player.room.alive_players, function(p) return p.dying end)) then
local suits = {}
for _, id in ipairs(player.player_cards[Player.Hand]) do
table.insertIfNeed(suits, Fk:getCardById(id).suit)
end
return #suits == player:getMark("@joy__tongli-phase")
end
end,
on_use = function(self, event, target, player, data)
data.extra_data = data.extra_data or {}
data.extra_data.tongli = {
from = player.id,
tos = data.extra_data.tongli_target,
times = player:getMark("@joy__tongli-phase")
}
end,
refresh_events = {fk.PreCardUse},
can_refresh = function(self, event, target, player, data)
return player == target and player:hasSkill(self, true) and player.phase == Player.Play and
not table.contains(data.card.skillNames, self.name)
end,
on_refresh = function(self, event, target, player, data)
local room = player.room
room:addPlayerMark(player, "@joy__tongli-phase", 1)
if type(data.tos) == "table" then
data.extra_data = data.extra_data or {}
data.extra_data.tongli_target = table.simpleClone(data.tos)
end
end,
}
local parseTongliUseStruct = function (player, name, targetGroup)
local card = Fk:cloneCard(name)
card.skillName = "joy__tongli"
if player:prohibitUse(card) then return nil end
local room = player.room
local all_tos = {}
for _, tos in ipairs(targetGroup) do
local passed_target = {}
for _, to in ipairs(tos) do
local target = room:getPlayerById(to)
if target.dead then return nil end
if #passed_target == 0 and player:isProhibited(target, card) then return nil end
if not card.skill:modTargetFilter(to, passed_target, player.id, card, false) then return nil end
table.insert(passed_target, to)
table.insert(all_tos, {to})
end
end
return {
from = player.id,
tos = (card.multiple_targets and card.skill:getMinTargetNum() == 0) and {} or all_tos,
card = card,
extraUse = true
}
end
local tongli_delay = fk.CreateTriggerSkill{
name = "#joy__tongli_delay",
events = {fk.CardUseFinished},
anim_type = "offensive",
can_trigger = function(self, event, target, player, data)
if data.extra_data and data.extra_data.tongli and not player.dead then
local dat = table.simpleClone(data.extra_data.tongli)
if dat.from == player.id then
local use = parseTongliUseStruct(player, data.card.name, dat.tos)
if use then
self.cost_data = use
return true
end
end
end
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
local dat = table.simpleClone(data.extra_data.tongli)
local use = table.simpleClone(self.cost_data)
local room = player.room
player:broadcastSkillInvoke("joy__tongli")
for _ = 1, dat.times, 1 do
room:useCard(use)
if player.dead then break end
end
end,
}
local joy__shezang = fk.CreateTriggerSkill{
name = "joy__shezang",
anim_type = "drawcard",
events = {fk.EnterDying},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and (target == player or player == player.room.current) and
player:usedSkillTimes(self.name, Player.HistoryTurn) == 0
end,
on_use = function(self, event, target, player, data)
local room = player.room
local suits = {1, 2, 3, 4}
local cards = {}
local pile = table.simpleClone(room.draw_pile)
while #pile > 0 and #cards < 4 do
local id = table.remove(pile, math.random(#pile))
if table.removeOne(suits, Fk:getCardById(id).suit) then
table.insert(cards, id)
end
end
if #cards > 0 then
room:moveCards({
ids = cards,
to = player.id,
toArea = Card.PlayerHand,
moveReason = fk.ReasonPrey,
proposer = player.id,
skillName = self.name,
moveVisible = true
})
end
end,
}
tongli:addRelatedSkill(tongli_delay)
zhangxuan:addSkill(tongli)
zhangxuan:addSkill(joy__shezang)
Fk:loadTranslationTable{
["joy__zhangxuan"] = "张嫙",
["joy__tongli"] = "同礼",
[":joy__tongli"] = "当你于出牌阶段内使用基本牌或普通锦囊牌指定目标后,若你手牌中的花色数等于你此阶段已使用牌的张数,你可令此牌效果额外执行X次(X为你手牌中的花色数)。",
["joy__shezang"] = "奢葬",
[":joy__shezang"] = "每回合限一次,当你或你回合内有角色进入濒死状态时,你可以从牌堆获得不同花色的牌各一张。",
["@joy__tongli-phase"] = "同礼",
["#joy__tongli_delay"] = "同礼",
}
local caoying = General(extension, "joy__caoying", "wei", 4, 4, General.Female)
local lingren = fk.CreateTriggerSkill{
name = "joy__lingren",
anim_type = "offensive",
events = {fk.TargetSpecified},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player.phase == Player.Play and data.firstTarget and
data.card.is_damage_card and player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
on_cost = function(self, event, target, player, data)
local to = player.room:askForChoosePlayers(player, AimGroup:getAllTargets(data.tos), 1, 1, "#joy__lingren-choose", self.name, true)
if #to > 0 then
self.cost_data = to[1]
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(self.cost_data)
local choices = {"joy__lingren_basic", "joy__lingren_trick", "joy__lingren_equip"}
local yes = room:askForChoices(player, choices, 0, 3, self.name, "#joy__lingren-choice::" .. self.cost_data, false)
for _, value in ipairs(yes) do
table.removeOne(choices, value)
end
local right = 0
for _, id in ipairs(to.player_cards[Player.Hand]) do
local str = "joy__lingren_"..Fk:getCardById(id):getTypeString()
if table.contains(yes, str) then
right = right + 1
table.removeOne(yes, str)
else
table.removeOne(choices, str)
end
end
right = right + #choices
room:sendLog{
type = "#joy__lingren_result",
from = player.id,
arg = tostring(right),
}
if right > 0 then
data.extra_data = data.extra_data or {}
data.extra_data.lingren = data.extra_data.lingren or {}
table.insert(data.extra_data.lingren, self.cost_data)
end
if right > 1 then
player:drawCards(2, self.name)
end
if right > 2 then
local skills = {}
if not player:hasSkill("ex__jianxiong", true) then
table.insert(skills, "ex__jianxiong")
end
if not player:hasSkill("joy__xingshang", true) then
table.insert(skills, "joy__xingshang")
end
room:setPlayerMark(player, self.name, skills)
room:handleAddLoseSkills(player, table.concat(skills, "|"), nil, true, false)
end
end,
}
local lingren_delay = fk.CreateTriggerSkill {
name = "#joy__lingren_delay",
mute = true,
events = {fk.DamageInflicted},
can_trigger = function(self, event, target, player, data)
if player.dead or data.card == nil or target ~= player then return false end
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]
return use.extra_data and use.extra_data.lingren and table.contains(use.extra_data.lingren, player.id)
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
data.damage = data.damage + 1
end,
refresh_events = {fk.TurnStart},
can_refresh = function(self, event, target, player, data)
return target == player and player:getMark("joy__lingren") ~= 0
end,
on_refresh = function(self, event, target, player, data)
local room = player.room
local skills = player:getMark("joy__lingren")
room:setPlayerMark(player, "joy__lingren", 0)
room:handleAddLoseSkills(player, "-"..table.concat(skills, "|-"), nil, true, false)
end,
}
local fujian = fk.CreateTriggerSkill {
name = "joy__fujian",
anim_type = "control",
frequency = Skill.Compulsory,
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player.phase == Player.Finish and
not table.find(player.room.alive_players, function(p) return p:isKongcheng() end)
end,
on_use = function(self, event, target, player, data)
local room = player.room
local targets = room:getOtherPlayers(player, false)
local to = table.random(targets)
room:doIndicate(player.id, {to.id})
U.viewCards(player, table.random(to.player_cards[Player.Hand], 1), self.name)
end,
}
lingren:addRelatedSkill(lingren_delay)
caoying:addSkill(lingren)
caoying:addSkill(fujian)
caoying:addRelatedSkill("ex__jianxiong")
caoying:addRelatedSkill("joy__xingshang")
Fk:loadTranslationTable{
["joy__caoying"] = "曹婴",
["#joy__caoying"] = "龙城凤鸣",
["joy__lingren"] = "凌人",
[":joy__lingren"] = "出牌阶段限一次,当你使用【杀】或伤害类锦囊牌指定目标后,你可以猜测其中一名目标角色的手牌区中是否有基本牌、锦囊牌或装备牌。"..
"若你猜对:至少一项,此牌对其造成的伤害+1;至少两项,你摸两张牌;三项,你获得技能〖奸雄〗和〖行殇〗直到你的下个回合开始。",
["joy__fujian"] = "伏间",
[":joy__fujian"] = "锁定技,结束阶段,你随机观看一名其他角色的一张手牌)。",
["#joy__lingren-choose"] = "凌人:你可以猜测其中一名目标角色的手牌中是否有基本牌、锦囊牌或装备牌",
["#joy__lingren-choice"] = "凌人:猜测%dest的手牌中是否有基本牌、锦囊牌或装备牌",
["joy__lingren_basic"] = "有基本牌",
["joy__lingren_trick"] = "有锦囊牌",
["joy__lingren_equip"] = "有装备牌",
["#joy__lingren_result"] = "%from 猜对了 %arg 项",
["joy__lingren_delay"] = "凌人",
}
local baosanniang = General(extension, "joy__baosanniang", "shu", 3, 3, General.Female)
local joy__wuniang = fk.CreateTriggerSkill{
name = "joy__wuniang",
anim_type = "control",
events = {fk.CardUsing, fk.CardResponding},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and data.card.trueName == "slash" and
not table.every(player.room:getOtherPlayers(player), function(p) return p:isNude() end)
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local prompt = "#joy__wuniang1-choose"
if player:usedSkillTimes("joy__xushen", Player.HistoryGame) > 0 and
table.find(room.alive_players, function(p) return string.find(p.general, "guansuo") end) then
prompt = "#joy__wuniang2-choose"
end
local to = room:askForChoosePlayers(player, table.map(table.filter(room:getOtherPlayers(player), function(p)
return not p:isNude() end), Util.IdMapper), 1, 1, prompt, self.name, true)
if #to > 0 then
self.cost_data = to[1]
return true
end
end,
on_use = function(self, event, player, target, data)
local room = player.room
local to = room:getPlayerById(self.cost_data)
local id = room:askForCardChosen(player, to, "he", self.name)
room:obtainCard(player.id, id, false, fk.ReasonPrey)
if not to.dead then
to:drawCards(1, self.name)
end
if player:usedSkillTimes("joy__xushen", Player.HistoryGame) > 0 then
for _, p in ipairs(room.alive_players) do
if string.find(p.general, "guansuo") and not p.dead then
p:drawCards(1, self.name)
end
end
end
end,
}
local joy__xushen = fk.CreateTriggerSkill{
name = "joy__xushen",
anim_type = "defensive",
frequency = Skill.Limited,
events = {fk.EnterDying},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player.dying and player:usedSkillTimes(self.name, Player.HistoryGame) == 0
end,
on_use = function(self, event, target, player, data)
local room = player.room
room:recover({
who = player,
num = 1,
recoverBy = player,
skillName = self.name
})
room:handleAddLoseSkills(player, "ty__zhennan", nil, true, false)
if player.dead or table.find(room.alive_players, function(p) return string.find(p.general, "guansuo") end) then return end
local targets = table.map(room:getOtherPlayers(player), Util.IdMapper)
local to = room:askForChoosePlayers(player, targets, 1, 1, "#joy__xushen-choose", self.name, true)
if #to > 0 then
to = room:getPlayerById(to[1])
if room:askForSkillInvoke(to, self.name, nil, "#joy__xushen-invoke") then
if player.general == "joy__baosanniang" then
room:notifySkillInvoked(player, "joy__xushen","drawcard")
room:changeHero(player,"joy_skin__baosanniang",false,false,true,false)
room:notifySkillInvoked(to, "joy__xushen","drawcard")
room:changeHero(to, "joy_skin__guansuo", false, false, true)
if not to.dead then
to:drawCards(3, self.name)
end
elseif player.deputyGeneral == "joy__baosanniang" then
room:notifySkillInvoked(player, "joy__xushen","drawcard")
room:changeHero(player,"joy_skin__baosanniang",false,true,true,false)
room:notifySkillInvoked(to, "joy__xushen","drawcard")
room:changeHero(to, "joy_skin__guansuo", false, false, true)
if not to.dead then
to:drawCards(3, self.name)
end
else
room:changeHero(to, "joy__guansuo", false, false, true)
if not to.dead then
to:drawCards(3, self.name)
end
end
end
end
end,
}
baosanniang:addSkill(joy__wuniang)
baosanniang:addSkill(joy__xushen)
baosanniang:addRelatedSkill("ty__zhennan")
Fk:loadTranslationTable{
["joy__baosanniang"] = "鲍三娘",
["#joy__baosanniang"] = "南中武娘",
["joy__wuniang"] = "武娘",
[":joy__wuniang"] = "当你使用或打出【杀】时,你可以获得一名其他角色的一张牌,若如此做,其摸一张牌。若你已发动〖许身〗,则关索也摸一张牌。",
["joy__xushen"] = "许身",
[":joy__xushen"] = "限定技,当你进入濒死状态后,你可以回复1点体力并获得技能〖镇南〗,然后如果你脱离濒死状态且关索不在场,"..
"你可令一名其他角色选择是否用关索代替其武将并令其摸三张牌",
["joy__zhennan"] = "镇南",
[":joy__zhennan"] = "当有角色使用普通锦囊牌指定目标后,若此牌目标数大于1,你可以对一名其他角色造成1点伤害。",
["#joy__wuniang1-choose"] = "武娘:你可以获得一名其他角色的一张牌,其摸一张牌",
["#joy__wuniang2-choose"] = "武娘:你可以获得一名其他角色的一张牌,其摸一张牌,关索摸一张牌",
["#joy__xushen-choose"] = "许身:你可以令一名其他角色摸三张牌并选择是否变身为欢乐杀关索!",
["#joy__xushen-invoke"]= "许身:你可以变身为欢乐杀关索!",
}
local zhangqiying = General(extension, "joy__zhangqiying", "qun", 3, 3, General.Female)
local zhenyi = fk.CreateViewAsSkill{
name = "joy__zhenyi",
anim_type = "support",
pattern = "peach",
prompt = "#joy__zhenyi2",
card_num = 1,
card_filter = function(self, to_select, selected)
return #selected == 0
end,
before_use = function(self, player)
player.room:removePlayerMark(player, "@@faluclub", 1)
end,
view_as = function(self, cards)
if #cards ~= 1 then return nil end
local c = Fk:cloneCard("peach")
c.skillName = self.name
c:addSubcard(cards[1])
return c
end,
enabled_at_play = Util.FalseFunc,
enabled_at_response = function(self, player)
return player.phase == Player.NotActive and player:getMark("@@faluclub") > 0
end,
}
local zhenyi_trigger = fk.CreateTriggerSkill {
name = "#joy__zhenyi_trigger",
main_skill = zhenyi,
events = {fk.AskForRetrial, fk.DamageCaused, fk.Damaged},
mute = true,
can_trigger = function(self, event, target, player, data)
if player:hasSkill(zhenyi.name) then
if event == fk.AskForRetrial then
return player:getMark("@@faluspade") > 0
elseif event == fk.DamageCaused then
return target == player and player:getMark("@@faluheart") > 0 and data.to ~= player
elseif event == fk.Damaged then
return target == player and player:getMark("@@faludiamond") > 0
end
end
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local prompt
if event == fk.AskForRetrial then
prompt = "#joy__zhenyi1::"..target.id
elseif event == fk.DamageCaused then
prompt = "#joy__zhenyi3::"..data.to.id
elseif event == fk.Damaged then
prompt = "#joy__zhenyi4"
end
return room:askForSkillInvoke(player, zhenyi.name, nil, prompt)
end,
on_use = function(self, event, target, player, data)
local room = player.room
player:broadcastSkillInvoke(zhenyi.name)
if event == fk.AskForRetrial then
room:notifySkillInvoked(player, zhenyi.name, "control")
room:removePlayerMark(player, "@@faluspade", 1)
local choice = room:askForChoice(player, {"joy__zhenyi_spade", "joy__zhenyi_heart"}, zhenyi.name)
local new_card = Fk:cloneCard(data.card.name, choice == "joy__zhenyi_spade" and Card.Spade or Card.Heart, 5)
new_card.skillName = zhenyi.name
new_card.id = data.card.id
data.card = new_card
room:sendLog{
type = "#ChangedJudge",
from = player.id,
to = { data.who.id },
arg2 = new_card:toLogString(),
arg = zhenyi.name,
}
elseif event == fk.DamageCaused then
room:notifySkillInvoked(player, zhenyi.name, "offensive")
room:removePlayerMark(player, "@@faluheart", 1)
data.damage = data.damage + 1
elseif event == fk.Damaged then
room:notifySkillInvoked(player, zhenyi.name, "masochism")
room:removePlayerMark(player, "@@faludiamond", 1)
local cards = {}
table.insertTable(cards, room:getCardsFromPileByRule(".|.|.|.|.|basic"))
table.insertTable(cards, room:getCardsFromPileByRule(".|.|.|.|.|trick"))
table.insertTable(cards, room:getCardsFromPileByRule(".|.|.|.|.|equip"))
if #cards > 0 then
room:moveCards({
ids = cards,
to = player.id,
toArea = Card.PlayerHand,
moveReason = fk.ReasonJustMove,
proposer = player.id,
skillName = zhenyi.name,
})
end
end
end,
}
local dianhua = fk.CreateTriggerSkill{
name = "joy__dianhua",
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 or player.phase == Player.Finish)
end,
on_cost = function(self, event, target, player, data)
local n = 1
for _, suit in ipairs({"spade", "club", "heart", "diamond"}) do
if player:getMark("@@falu"..suit) > 0 then
n = n + 1
end
end
if player.room:askForSkillInvoke(player, self.name) then
self.cost_data = n
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
room:askForGuanxing(player, room:getNCards(self.cost_data), nil, {0, 0}, self.name)
end,
}
zhenyi:addRelatedSkill(zhenyi_trigger)
zhangqiying:addSkill("falu")
zhangqiying:addSkill(zhenyi)
zhangqiying:addSkill(dianhua)
Fk:loadTranslationTable{
["joy__zhangqiying"] = "张琪瑛",
["#joy__zhangqiying"] = "禳祷西东",
["joy__zhenyi"] = "真仪",
[":joy__zhenyi"] = "你可以在以下时机弃置相应的标记来发动以下效果:<br>"..
"当一张判定牌生效前,你可以弃置“紫微”,然后将判定结果改为♠5或<font color='red'>♥5</font>;<br>"..
"当你于回合外需要使用【桃】时,你可以弃置“后土”,然后将你的一张手牌当【桃】使用;<br>"..
"当你对其他角色造成伤害时,你可以弃置“玉清”,此伤害+1;<br>"..
"当你受到伤害后,你可以弃置“勾陈”,然后你从牌堆中随机获得三种类型的牌各一张。",
["joy__dianhua"] = "点化",
[":joy__dianhua"] = "准备阶段或结束阶段,你可以观看牌堆顶的X张牌(X为你的标记数+1)。若如此做,你将这些牌以任意顺序放回牌堆顶。",
["#joy__zhenyi1"] = "真仪:你可以弃置♠紫微,将 %dest 的判定结果改为♠5或<font color='red'>♥5</font>",
["#joy__zhenyi2"] = "真仪:你可以弃置♣后土,将一张手牌当【桃】使用",
["#joy__zhenyi3"] = "真仪:你可以弃置<font color='red'>♥</font>玉清,对 %dest 造成的伤害+1",
["#joy__zhenyi4"] = "真仪:你可以弃置<font color='red'>♦</font>勾陈,从牌堆中随机获得三种类型的牌各一张",
["#joy__zhenyi_trigger"] = "真仪",
["joy__zhenyi_spade"] = "将判定结果改为♠5",
["joy__zhenyi_heart"] = "将判定结果改为<font color='red'>♥</font>5",
}
local joy__sunru = General(extension, "joy__sunru", "wu", 3, 3, General.Female)
local joy__xiecui = fk.CreateTriggerSkill{
name = "joy__xiecui",
anim_type = "offensive",
events = {fk.DamageCaused},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and target and not target.dead and target == player.room.current and data.card then
return player:usedSkillTimes(self.name, Player.HistoryTurn) == 0 and
#U.getActualDamageEvents(player.room, 1, function(e) return e.data[1].from == target end) == 0
end
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, data, "#joy__xiecui-invoke:"..data.from.id..":"..data.to.id)
end,
on_use = function(self, event, target, player, data)
local room = player.room
data.damage = data.damage + 1
if not target.dead and target:getHandcardNum() > target.hp and room:getCardArea(data.card) == Card.Processing then
room:addPlayerMark(target, MarkEnum.AddMaxCardsInTurn, 1)
room:moveCardTo(data.card, Card.PlayerHand, target, fk.ReasonPrey, self.name)
end
end,
}
joy__sunru:addSkill(joy__xiecui)
joy__sunru:addSkill("youxu")
Fk:loadTranslationTable{
["joy__sunru"] = "孙茹",
["#joy__sunru"] = "呦呦鹿鸣",
["joy__xiecui"] = "撷翠",
[":joy__xiecui"] = "每当一名角色于其回合内使用牌首次造成伤害时,你可令此伤害+1。若该角色手牌数大于等于体力值,其获得此伤害牌且本回合手牌上限+1。",
["#joy__xiecui-invoke"] = "撷翠:你可以令 %src 对 %dest造成的伤害+1",
}
local caojinyu = General(extension, "joy__caojinyu", "wei", 3, 3, General.Female)
caojinyu:addSkill("yuqi")
caojinyu:addSkill("shanshen")
caojinyu:addSkill("xianjing")
Fk:loadTranslationTable{
["joy__caojinyu"] = "曹金玉",
["#joy__caojinyu"] = "金乡公主",
["$yuqi_joy__caojinyu1"] = "玉儿摔倒了,要阿娘抱抱。 ",
["$yuqi_joy__caojinyu2"] = "这么漂亮的雪花,为什么只能在寒冬呢? ",
["$shanshen_joy__caojinyu1"] = "人家只想做安安静静的小淑女。 ",
["$shanshen_joy__caojinyu2"] = " 雪花纷飞,独存寒冬。",
["$xianjing_joy__caojinyu1"] = " 得父母之爱,享公主之礼遇。",
["$xianjing_joy__caojinyu2"] = " 哼,可不要小瞧女孩子啊。",
["~joy__caojinyu"] = "娘亲,雪人不怕冷吗? ",
}
local fengyu = General(extension, "joy__fengshu", "qun", 3, 3, General.Female)
fengyu:addSkill("tiqi")
fengyu:addSkill("baoshu")
Fk:loadTranslationTable{
["joy__fengshu"] = "冯妤",
["#joy__fengshu"] = "泣珠伊人",
}
local caohua = General(extension, "joy__caohua", "wei", 3, 3, General.Female)
caohua:addSkill("caiyi")
caohua:addSkill("guili")
Fk:loadTranslationTable{
["joy__caohua"] = "曹华",
["#joy__caohua"] = "殊凰求凤",
}
local xuelingyun = General(extension, "joy__xuelingyun", "wei", 3, 3, General.Female)
xuelingyun:addSkill("xialei")
xuelingyun:addSkill("anzhi")
Fk:loadTranslationTable{
["joy__xuelingyun"] = "薛灵芸",
["#joy__xuelingyun"] = "霓裳缀红泪",
}
local quanhuijie = General(extension, "joy__quanhuijie", "wu", 3, 3, General.Female)
local ligong = fk.CreateTriggerSkill{
name = "joy__ligong",
frequency = Skill.Wake,
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:usedSkillTimes(self.name, Player.HistoryGame) == 0
end,
can_wake = function(self, event, target, player, data)
return player:hasSkill("huishu", true) and
(player:getMark("huishu1") > 1 or player:getMark("huishu2") > 3 or player:getMark("huishu3") > 2)
end,
on_use = function(self, event, target, player, data)
local room = player.room
room:changeMaxHp(player, 1)
room:recover({
who = player,
num = 1,
recoverBy = player,
skillName = self.name
})
room:handleAddLoseSkills(player, "-yishu", nil)
local generals = {"nya__daqiao", "nya__xiaoqiao","joyex__sunshangxiang","joyex__daqiao","joy__zhoufei", "joyex__xiaoqiao","joy__wuguotai","joy__bulianshi","joy__sunluban","joy__xushi",
"joy__sunluyu","joysp__daqiao","joysp__xiaoqiao","joy__zhangxuan","joy__sunru","joy__panshu","joy__zhaoyanw","joy__zhangyao","joy__tenggongzhu","joy__zhouyi","joy__luyusheng",}
if #generals == 0 then return false end
generals = table.random(generals, 4)
local skills = {}
for _, general_name in ipairs(generals) do
local general = Fk.generals[general_name]
local g_skills = {}
for _, skill in ipairs(general.skills) do
if not (table.contains({Skill.Quest}, skill.frequency) or skill.lordSkill) and
(#skill.attachedKingdom == 0 or (table.contains(skill.attachedKingdom, "wu") and player.kingdom == "wu")) 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 not (table.contains({Skill.Quest}, skill.frequency) or skill.lordSkill) and
(#skill.attachedKingdom == 0 or (table.contains(skill.attachedKingdom, "wu") and player.kingdom == "wu")) then
table.insertIfNeed(g_skills, skill.name)
end
end
table.insertIfNeed(skills, g_skills)
end
local result = player.room:askForCustomDialog(player, self.name,
"packages/tenyear/qml/ChooseGeneralSkillsBox.qml", {
generals, skills, 1, 2, "#ligong-choice", true
})
local choices = {}
if result ~= "" then
choices = json.decode(result)
end
if #choices == 0 then
player:drawCards(3, self.name)
else
room:handleAddLoseSkills(player, "-huishu|"..table.concat(choices, "|"), nil)
end
end,
}
quanhuijie:addSkill("huishu")
quanhuijie:addSkill("yishu")
quanhuijie:addSkill(ligong)
Fk:loadTranslationTable{
["joy__quanhuijie"] = "全惠解",
["#joy__quanhuijie"] = "春宫早深",
["joy__ligong"] = "离宫",
[":joy__ligong"] = "觉醒技,准备阶段,若〖慧淑〗有数字达到5,你加1点体力上限并回复1点体力,失去〖易数〗,"..
"然后从随机四个吴国女性武将中选择至多两个技能获得并失去〖慧淑〗(如果不获得技能则改为摸三张牌)。"..
'<br /><font color="red">(村:欢杀包特色,只会获得欢杀池内武将的技能,没说不能拿的技能就是能拿)</font>',
}
local fanyufeng = General(extension, "joy__fanyufeng", "qun", 3, 3, General.Female)
fanyufeng:addSkill("bazhan")
fanyufeng:addSkill("jiaoying")
Fk:loadTranslationTable{
["joy__fanyufeng"] = "樊玉凤",
["#joy__fanyufeng"] = "红鸾寡宿",
}
local panshu = General(extension, "joy__panshu", "wu", 3, 3, General.Female)
panshu:addSkill("zhiren")
panshu:addSkill("yaner")
Fk:loadTranslationTable{
["joy__panshu"] = "潘淑",
["#joy__panshu"] = "神女",
}
local zhaoyanw = General(extension, "joy__zhaoyanw", "wu", 3, 3, General.Female)
zhaoyanw:addSkill("jinhui")
zhaoyanw:addSkill("qingman")
Fk:loadTranslationTable{
["joy__zhaoyanw"] = "赵嫣",
["#joy__zhaoyanw"] = "霞蔚青歇",
}
local zhangyao = General(extension, "joy__zhangyao", "wu", 3, 3, General.Female)
zhangyao:addSkill("yuanyu")
zhangyao:addSkill("xiyan")
Fk:loadTranslationTable{
["joy__zhangyao"] = "张媱",
["#joy__zhangyao"] = "琼楼孤蒂",
}
local lvlingqi = General(extension, "joy__lvlingqi", "qun", 4, 4, General.Female)
lvlingqi:addSkill("guowu")
lvlingqi:addSkill("zhuangrong")
lvlingqi:addRelatedSkill("shenwei")
lvlingqi:addRelatedSkill("wushuang")
Fk:loadTranslationTable{
["joy__lvlingqi"] = "吕玲绮",
["#joy__lvlingqi"] = "无双虓姬",
["$shenwei_joy__lvlingqi1"] = "继父神威,无坚不摧!",
["$shenwei_joy__lvlingqi2"] = "我乃温侯吕奉先之女!",
["$wushuang_joy__lvlingqi1"] = "猛将策良骥,长戟破敌营。",
["$wushuang_joy__lvlingqi2"] = "杀气腾剑戟,严风卷戎装。",
}
local wanniangongzhu = General(extension, "joy__wanniangongzhu", "qun", 3, 3, General.Female)
wanniangongzhu:addSkill("zhenge")
wanniangongzhu:addSkill("xinghan")
Fk:loadTranslationTable{
["joy__wanniangongzhu"] = "万年公主",
["#joy__wanniangongzhu"] = "还汉明珠",
}
local tenggongzhu = General(extension, "joy__tenggongzhu", "wu", 3, 3, General.Female)
tenggongzhu:addSkill("xingchong")
tenggongzhu:addSkill("liunian")
Fk:loadTranslationTable{
["joy__tenggongzhu"] = "滕公主",
["#joy__tenggongzhu"] = "芳华荏苒",
}
local zhouyi = General(extension, "joy__zhouyi", "wu", 3, 3, General.Female)
zhouyi:addSkill("zhukou")
zhouyi:addSkill("mengqing")
zhouyi:addRelatedSkill("yuyun")
Fk:loadTranslationTable{
["joy__zhouyi"] = "周夷",
["#joy__zhouyi"] = "靛情雨黛",
}
local luyi = General(extension, "joy__luyi", "qun", 3, 3, General.Female)
local function searchFuxueCards(room, findOne)
if #room.discard_pile == 0 then return {} end
local ids = {}
local discard_pile = table.simpleClone(room.discard_pile)
local logic = room.logic
local events = logic.event_recorder[GameEvent.MoveCards] or Util.DummyTable
for i = #events, 1, -1 do
local e = events[i]
for _, move in ipairs(e.data) do
for _, info in ipairs(move.moveInfo) do
local id = info.cardId
if table.removeOne(discard_pile, id) then
if move.toArea == Card.DiscardPile and move.moveReason ~= fk.ReasonUse then
table.insertIfNeed(ids, id)
if findOne then
return ids
end
end
end
end
end
if #discard_pile == 0 then break end
end
return ids
end
local fuxue = fk.CreateTriggerSkill{
name = "joy__fuxue",
anim_type = "drawcard",
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self) then
if player.phase == Player.Start then
return #searchFuxueCards(player.room, true) > 0
elseif player.phase == Player.Finish then
return player:isKongcheng() or
table.every(player.player_cards[Player.Hand], function(id) return Fk:getCardById(id):getMark("@@joy__fuxue-inhand") == 0 end)
end
end
end,
on_cost = function(self, event, target, player, data)
if player.phase == Player.Start then
return player.room:askForSkillInvoke(player, self.name, nil, "#joy__fuxue-invoke:::"..player.hp)
else
return true
end
end,
on_use = function(self, event, target, player, data)
if player.phase == Player.Start then
local room = player.room
local cards = searchFuxueCards(room, false)
if #cards == 0 then return false end
table.sort(cards, function (a, b)
local cardA, cardB = Fk:getCardById(a), Fk:getCardById(b)
if cardA.type == cardB.type then
if cardA.sub_type == cardB.sub_type then
if cardA.name == cardB.name then
return a > b
else
return cardA.name > cardB.name
end
else
return cardA.sub_type < cardB.sub_type
end
else
return cardA.type < cardB.type
end
end)
local get = room:askForCardsChosen(player, player, 1, player.hp, {
card_data = {
{ self.name, cards }
}
}, self.name)
if #get > 0 then
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(get)
room:obtainCard(player.id, dummy, true, fk.ReasonJustMove)
for _, id in ipairs(get) do
if room:getCardArea(id) == Card.PlayerHand and room:getCardOwner(id) == player then
room:setCardMark(Fk:getCardById(id), "@@joy__fuxue-inhand", 1)
end
end
end
else
player:drawCards(player.hp, self.name)
end
end,
refresh_events = {fk.TurnEnd},
can_refresh = function(self, event, target, player, data)
return target == player and not player:isKongcheng()
end,
on_refresh = function(self, event, target, player, data)
for _, id in ipairs(player.player_cards[Player.Hand]) do
player.room:setCardMark(Fk:getCardById(id), "@@joy__fuxue-inhand", 0)
end
end,
}
local yaoyi = fk.CreateTriggerSkill{
name = "joy__yaoyi",
anim_type = "special",
frequency = Skill.Compulsory,
events = {fk.GameStart},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self)
end,
on_use = function(self, event, target, player, data)
local room = player.room
for _, p in ipairs(player.room:getAlivePlayers()) do
local yes = true
for _, skill in ipairs(p.player_skills) do
if skill.switchSkillName then
yes = false
break
end
end
if yes then
room:handleAddLoseSkills(p, "joy__shoutan", nil, true, false)
end
end
end,
refresh_events = {fk.Deathed},
can_refresh = function(self, event, target, player, data)
return target == player and player:hasSkill(self, true, true)
end,
on_refresh = function(self, event, target, player, data)
local room = player.room
for _, p in ipairs(room:getAllPlayers()) do
room:handleAddLoseSkills(p, "-joy__shoutan", nil, true, true)
end
end,
}
local yaoyi_prohibit = fk.CreateProhibitSkill{
name = "#joy__yaoyi_prohibit",
frequency = Skill.Compulsory,
is_prohibited = function(self, from, to, card)
if table.find(Fk:currentRoom().alive_players, function(p) return p:hasSkill("joy__yaoyi") end) then
if from ~= to then
local fromskill = {}
for _, skill in ipairs(from.player_skills) do
if skill.switchSkillName then
table.insertIfNeed(fromskill, skill.switchSkillName)
end
end
local toskill = {}
for _, skill in ipairs(to.player_skills) do
if skill.switchSkillName then
table.insertIfNeed(toskill, skill.switchSkillName)
end
end
if #fromskill == 0 or #toskill == 0 then return false end
if #fromskill > 1 then
end
return from:getSwitchSkillState(fromskill[1], false) == to:getSwitchSkillState(toskill[1], false)
end
end
end,
}
local shoutan_refresh = fk.CreateTriggerSkill{
name = "#joy__shoutan_refresh",
mute = true,
frequency = Skill.Compulsory,
events = {fk.AfterCardUseDeclared},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player:getMark("joy__shoutan-phase") > 0
end,
on_use = function(self, event, target, player, data)
player.room:setPlayerMark(player,"joy__shoutan-phase",0)
end
}
local shoutan = fk.CreateActiveSkill{
name = "joy__shoutan",
anim_type = "switch",
switch_skill_name = "joy__shoutan",
card_num = function()
if Self:hasSkill("joy__yaoyi") then
return 0
else
return 1
end
end,
target_num = 0,
can_use = function(self, player)
if player:hasSkill("joy__yaoyi") then
return true and player:getMark("joy__shoutan-phase") == 0
else
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end
end,
card_filter = function(self, to_select, selected)
if Self:hasSkill("joy__yaoyi") then
return false
elseif #selected == 0 and Fk:currentRoom():getCardArea(to_select) ~= Card.PlayerEquip then
if Self:getSwitchSkillState(self.name, false) == fk.SwitchYang then
return Fk:getCardById(to_select).color ~= Card.Black
else
return Fk:getCardById(to_select).color == Card.Black
end
end
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
if player:hasSkill("joy__yaoyi") then
room:setPlayerMark(player,"joy__shoutan-phase",1)
end
room:throwCard(effect.cards, self.name, player, player)
end,
}
yaoyi:addRelatedSkill(shoutan_refresh)
yaoyi:addRelatedSkill(yaoyi_prohibit)
luyi:addSkill(fuxue)
luyi:addSkill(yaoyi)
luyi:addRelatedSkill(shoutan)
Fk:loadTranslationTable{
["joy__luyi"] = "卢弈",
["#joy__luyi"] = "落子惊鸿",
["joy__fuxue"] = "复学",
[":joy__fuxue"] = "准备阶段,你可以从弃牌堆中获得至多X张不因使用而进入弃牌堆的牌。结束阶段,若你手中没有以此法获得的牌,你摸X张牌。(X为你的体力值)",
["joy__yaoyi"] = "邀弈",
[":joy__yaoyi"] = "锁定技,游戏开始时,所有没有转换技的角色获得〖手谈〗;你发动〖手谈〗无需弃置牌且无次数限制。"..
'<br /><font color="grey">(防止永动,每次发动手谈后需使用一张牌后才可再次发动)</font>'..
"<br>所有角色使用牌只能指定自己及与自己转换技状态不同的角色为目标。",
["joy__shoutan"] = "手谈",
[":joy__shoutan"] = "转换技,出牌阶段限一次,你可以弃置一张:阳:非黑色手牌;阴:黑色手牌。",
["#joy__fuxue-invoke"] = "复学:你可以获得弃牌堆中至多%arg张不因使用而进入弃牌堆的牌",
["@@joy__fuxue-inhand"] = "复学",
["#joy__shoutan_refresh"] = "邀弈",
["is_selected"] = "已选择",
["$joy__fuxue1"] = " ",
["$joy__fuxue2"] = " ",
["$joy__yaoyi1"] = " ",
["$joy__yaoyi2"] = " ",
["$joy__shoutan1"] = " ",
["$joy__shoutan2"] = " ",
["~joy__luyi"] = " ",
}
local yinfuren = General(extension, "joy__yinfuren", "wei", 3, 3, General.Female)
local yingyu = fk.CreateTriggerSkill{
name = "joy__yingyu",
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.Play or (player.phase == Player.Finish and player:usedSkillTimes("joy__yongbi", Player.HistoryGame) > 0))
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local targets = table.map(table.filter(room.alive_players, function(p)
return not p:isKongcheng() end), Util.IdMapper)
if #targets < 2 then return end
local tos = room:askForChoosePlayers(player, targets, 2, 2, "#yingyu-choose", self.name, true)
if #tos == 2 then
self.cost_data = tos
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local target1 = room:getPlayerById(self.cost_data[1])
local target2 = room:getPlayerById(self.cost_data[2])
room:doIndicate(player.id, {self.cost_data[1]})
local id1 = room:askForCardChosen(player, target1, "h", self.name)
room:doIndicate(player.id, {self.cost_data[2]})
local id2 = room:askForCardChosen(player, target2, "h", self.name)
target1:showCards(id1)
target2:showCards(id2)
if Fk:getCardById(id1).suit ~= Fk:getCardById(id2).suit and
Fk:getCardById(id1).suit ~= Card.NoSuit and Fk:getCardById(id1).suit ~= Card.NoSuit then
local to = room:askForChoosePlayers(player, self.cost_data, 1, 1, "#yingyu2-choose", self.name, false)
if #to > 0 then
to = to[1]
else
to = table.random(self.cost_data)
end
if to == target1.id then
room:obtainCard(self.cost_data[1], id2, true, fk.ReasonPrey)
else
room:obtainCard(self.cost_data[2], id1, true, fk.ReasonPrey)
end
end
end,
}
local yongbi = fk.CreateActiveSkill{
name = "joy__yongbi",
anim_type = "support",
min_card_num = 1,
target_num = 1,
can_use = function(self, player)
return not player:isKongcheng() and player:usedSkillTimes(self.name, Player.HistoryGame) == 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 cards = effect.cards
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(cards)
room:moveCardTo(cards, Player.Hand, target, fk.ReasonGive, self.name, nil, false)
local suits = {}
for _, id in ipairs(dummy.subcards) do
if Fk:getCardById(id, true).suit ~= Card.NoSuit then
table.insertIfNeed(suits, Fk:getCardById(id, true).suit)
end
end
if #suits > 1 then
room:addPlayerMark(player, MarkEnum.AddMaxCards, 2)
room:addPlayerMark(target, MarkEnum.AddMaxCards, 2)
end
if #suits > 2 then
room:setPlayerMark(player, "@@joy__yongbi", 1)
room:setPlayerMark(target, "@@joy__yongbi", 1)
end
end,
}
local yongbi_trigger = fk.CreateTriggerSkill{
name = "#joy__yongbi_trigger",
anim_type = "defensive",
events = {fk.DamageInflicted},
can_trigger = function(self, event, target, player, data)
return target == player and player:getMark("@@joy__yongbi") > 0 and data.damage > 1
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
data.damage = data.damage - 1
end,
}
yongbi:addRelatedSkill(yongbi_trigger)
yinfuren:addSkill(yingyu)
yinfuren:addSkill(yongbi)
Fk:loadTranslationTable{
["joy__yinfuren"] = "尹夫人",
["#joy__yinfuren"] = "委身允翕",
["joy__yingyu"] = "媵予",
[":joy__yingyu"] = "准备阶段,你可以展示两名角色的各一张手牌,若花色不同,则你选择其中的一名角色获得另一名角色的展示牌。(若你已发动过〖拥嬖〗,则结束阶段也可发动此技能)",
["joy__yongbi"] = "拥嬖",
[":joy__yongbi"] = "限定技,出牌阶段,你可将任意手牌交给一名其他角色。根据其中牌的花色数量,"..
"你与其永久获得以下效果:至少两种,手牌上限+2;至少三种,受到大于1点的伤害时伤害-1。",
["@@joy__yongbi"] = "拥嬖",
["#joy__yongbi_trigger"] = "拥嬖",
}
local guozhao = General(extension, "joy__guozhao", "wei", 3, 3, General.Female)
guozhao:addSkill("pianchong")
guozhao:addSkill("zunwei")
Fk:loadTranslationTable{
["joy__guozhao"] = "郭照",
["#joy__guozhao"] = "碧海青天",
}
local laiyinger = General(extension, "joy__laiyinger", "qun", 3, 3, General.Female)
local xiaowu = fk.CreateActiveSkill{
name = "joy__xiaowu",
anim_type = "offensive",
prompt = "#xiaowu",
max_card_num = 0,
target_num = 1,
interaction = function(self)
return UI.ComboBox { choices = {"xiaowu_clockwise", "xiaowu_anticlockwise"} }
end,
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) < 1
end,
card_filter = Util.FalseFunc,
target_filter = function(self, to_select, selected, selected_cards)
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 players = room:getOtherPlayers(player)
local targets = {}
local choice = self.interaction.data
for i = 1, #players, 1 do
local real_i = i
if choice == "xiaowu_anticlockwise" then
real_i = #players + 1 - real_i
end
local temp = players[real_i]
table.insert(targets, temp)
if temp == target then break end
end
room:doIndicate(player.id, table.map(targets, Util.IdMapper))
local x = 0
local to_damage = {}
for _, p in ipairs(targets) do
if not p.dead and not player.dead then
choice = room:askForChoice(p, {"xiaowu_draw1", "draw1"}, self.name, "#xiawu_draw:" .. player.id)
if choice == "xiaowu_draw1" then
player:drawCards(1, self.name)
x = x+1
elseif choice == "draw1" then
p:drawCards(1, self.name)
table.insert(to_damage, p.id)
end
end
end
if not player.dead then
local n = 0
if x > 0 then
n = x%2
n = n + x//2
end
room:addPlayerMark(player, "@xiaowu_sand",n)
if x < #to_damage then
room:sortPlayersByAction(to_damage)
for _, pid in ipairs(to_damage) do
local p = room:getPlayerById(pid)
if not p.dead then
room:damage{ from = player, to = p, damage = 1, skillName = self.name }
end
end
end
end
end,
}
laiyinger:addSkill(xiaowu)
laiyinger:addSkill("huaping")
laiyinger:addRelatedSkill("shawu")
Fk:loadTranslationTable{
["joy__laiyinger"] = "来莺儿",
["#joy__laiyinger"] = "雀台歌女",
["joy__xiaowu"] = "绡舞",
[":joy__xiaowu"] = "出牌阶段限一次,你可以从你的上家或下家起选择任意名座位连续的其他角色,每名角色依次选择一项:1.令你摸一张牌;2.自己摸一张牌。"..
"选择完成后,你获得X个“沙”标记(X为选择令你摸牌的角色数的一半,向上取整);若自己摸牌的选择人数较多,你对这些角色各造成1点伤害。",
}
local yanfuren = General(extension, "joy__yanfuren", "qun", 3, 3, General.Female)
local channi_viewas = fk.CreateViewAsSkill{
name = "joy__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("joy__channi")
end,
view_as = function(self, cards)
if #cards == 0 then return end
local card = Fk:cloneCard("duel")
card:addSubcards(cards)
card.skillName = "joy__channi"
return card
end,
}
local channi = fk.CreateActiveSkill{
name = "joy__channi",
anim_type = "support",
prompt = "#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, "joy__channi_viewas", "#joy__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 = "#joy__channi_delay",
events = {fk.Damage, fk.DamageInflicted},
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
local cards = player.player_cards[Player.Hand]
if #cards > 0 then
if room:askForSkillInvoke(player,self.name,data,"#joy__channi_damaged") then
room:notifySkillInvoked(player, "joy__channi", "negative")
room:throwCard(cards,self.name,player)
return true
end
end
end
end
}
local nifu = fk.CreateTriggerSkill{
name = "joy__nifu",
anim_type = "drawcard",
frequency = Skill.Compulsory,
events = {fk.TurnEnd},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and player:getHandcardNum() ~= 3
end,
on_use = function(self, event, target, player, data)
local n = player:getHandcardNum() - 3
if n < 0 then
player:drawCards(-n, self.name)
else
player.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{
["joy__yanfuren"] = "严夫人",
["#joy__yanfuren"] = "霜天薄裳",
["joy__channi"] = "谗逆",
[":joy__channi"] = "出牌阶段限一次,你可以交给一名其他角色任意张手牌,然后该角色可以将至多等量张手牌当一张【决斗】使用。"..
"其因此使用【决斗】造成伤害后,其摸X张牌;其因此使用【决斗】受到伤害时,你可以弃置所有手牌(至少为1)防止此伤害。",
["joy__nifu"] = "匿伏",
[":joy__nifu"] = "锁定技,每个回合结束时,你将手牌摸至或弃置至三张。",
["#joy__channi-invoke"] = "谗逆:你可以将至多%arg张手牌当一张【决斗】使用<br>若对目标造成伤害你摸等量牌",
["#joy__channi_damaged"] = "馋逆:是否弃置所有手牌防止此【决斗】的伤害",
["joy__channi_viewas"] = "馋逆",
["#joy__channi_delay"] = "馋逆",
}
local xiahoulingnv = General(extension, "joy__xiahoulingnv", "wei", 4, 4, General.Female)
local fuping = fk.CreateViewAsSkill{
name = "joy__fuping",
anim_type = "special",
pattern = ".",
prompt = "#fuping-viewas",
interaction = function()
if type(Self:getMark("@$fuping")) ~= "table" then return end
local all_names, names = Self:getMark("@$fuping"), {}
local used_names = type(Self:getMark("fuping-turn")) == "table" and Self:getMark("fuping-turn") or {}
for _, name in ipairs(all_names) do
if not table.contains(used_names, name) then
local to_use = Fk:cloneCard(name)
to_use.skillName = "fuping"
if ((Fk.currentResponsePattern == nil and Self:canUse(to_use) and not Self:prohibitUse(to_use)) or
(Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(to_use))) then
table.insertIfNeed(names, name)
end
end
end
if #names == 0 then return end
return UI.ComboBox {choices = names, all_choices = all_names}
end,
card_filter = function(self, to_select, selected)
return #selected < 1 and Fk:getCardById(to_select).type ~= Card.TypeBasic
end,
view_as = function(self, cards)
if #cards ~= 1 or not self.interaction.data then return end
local card = Fk:cloneCard(self.interaction.data)
card:addSubcard(cards[1])
card.skillName = self.name
return card
end,
enabled_at_play = function(self, player)
local names = player:getMark("@$fuping")
if type(names) ~= "table" then return false end
local used_names = type(player:getMark("fuping-turn")) == "table" and player:getMark("fuping-turn") or {}
for _, name in ipairs(names) do
if not table.contains(used_names, name) then
local to_use = Fk:cloneCard(name)
to_use.skillName = self.name
if player:canUse(to_use) and not player:prohibitUse(to_use) then
return true
end
end
end
end,
enabled_at_response = function(self, player, response)
local names = player:getMark("@$fuping")
if type(names) ~= "table" then return false end
local used_names = type(player:getMark("fuping-turn")) == "table" and player:getMark("fuping-turn") or {}
for _, name in ipairs(names) do
if not table.contains(used_names, name) then
local to_use = Fk:cloneCard(name)
to_use.skillName = self.name
if (Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(to_use)) then
return true
end
end
end
end,
before_use = function(self, player, useData)
local names = type(player:getMark("fuping-turn")) == "table" and player:getMark("fuping-turn") or {}
table.insert(names, useData.card.trueName)
player.room:setPlayerMark(player, "fuping-turn", names)
end,
}
local fuping_trigger = fk.CreateTriggerSkill{
name = "#joy__fuping_trigger",
events = {fk.CardUseFinished},
main_skill = fuping,
can_trigger = function(self, event, target, player, data)
if target == player or not player:hasSkill(fuping.name) or #player:getAvailableEquipSlots() == 0 then return false end
if data.card.type ~= Card.TypeEquip and table.contains(TargetGroup:getRealTargets(data.tos), player.id) then
local mark = player:getMark("@$fuping")
return type(mark) ~= "table" or not table.contains(mark, data.card.trueName)
end
end,
on_cost = function(self, event, target, player, data)
local all_choices = {"WeaponSlot", "ArmorSlot", "DefensiveRideSlot", "OffensiveRideSlot", "TreasureSlot"}
local subtypes = {Card.SubtypeWeapon, Card.SubtypeArmor, Card.SubtypeDefensiveRide, Card.SubtypeOffensiveRide, Card.SubtypeTreasure}
local choices = {}
for i = 1, 5, 1 do
if #player:getAvailableEquipSlots(subtypes[i]) > 0 then
table.insert(choices, all_choices[i])
end
end
table.insert(all_choices, "Cancel")
table.insert(choices, "Cancel")
local choice = player.room:askForChoice(player, choices, fuping.name, "#fuping-choice:::" .. data.card.trueName, false, all_choices)
if choice ~= "Cancel" then
self.cost_data = choice
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
player:broadcastSkillInvoke(fuping.name)
room:abortPlayerArea(player, {self.cost_data})
local mark = type(player:getMark("@$fuping")) == "table" and player:getMark("@$fuping") or {}
table.insertIfNeed(mark, data.card.trueName)
room:setPlayerMark(player, "@$fuping", mark)
end,
}
local fuping_targetmod = fk.CreateTargetModSkill{
name = "#joy__fuping_targetmod",
bypass_distances = function(self, player, skill, card, to)
return player:hasSkill(fuping.name) and #player:getAvailableEquipSlots() == 1
end,
}
local weilie = fk.CreateActiveSkill{
name = "joy__weilie",
anim_type = "support",
prompt = function ()
local max_times = type(Self:getMark("@$fuping")) == "table" and #Self:getMark("@$fuping") or 0
return "#joy__weilie-active:::" .. tostring(max_times - Self:usedSkillTimes("weilie", Player.HistoryGame) + 1)
end,
can_use = function(self, player)
local max_times = type(player:getMark("@$fuping")) == "table" and #player:getMark("@$fuping") or 0
return player:usedSkillTimes(self.name, Player.HistoryGame) <= max_times
end,
card_filter = function(self, to_select, selected, targets)
return #selected == 0
end,
target_filter = function(self, to_select, selected, cards)
return #selected == 0 and Fk:currentRoom():getPlayerById(to_select):isWounded()
end,
target_num = 1,
card_num = 1,
on_use = function(self, room, effect)
local from = room:getPlayerById(effect.from)
room:throwCard(effect.cards, self.name, from, from)
local target = room:getPlayerById(effect.tos[1])
room:recover({
who = target,
num = 1,
recoverBy = from,
skillName = self.name
})
if not target.dead then
room:drawCards(target, 1, self.name)
end
end,
}
fuping:addRelatedSkill(fuping_trigger)
fuping:addRelatedSkill(fuping_targetmod)
xiahoulingnv:addSkill(fuping)
xiahoulingnv:addSkill(weilie)
Fk:loadTranslationTable{
["joy__xiahoulingnv"] = "夏侯令女",
["#joy__xiahoulingnv"] = "女义如山",
["joy__fuping"] = "浮萍",
[":joy__fuping"] = "当其他角色以你为目标的基本牌或锦囊牌牌结算后,若你未记录此牌,你可以废除一个装备栏并记录此牌。"..
"你可以将一张非基本牌当记录的牌使用或打出(每种牌名每回合限一次)。若你的装备栏均已废除,你使用牌无距离限制。",
["joy__weilie"] = "炜烈",
[":joy__weilie"] = "每局游戏限一次,出牌阶段,你可以弃置一张牌令一名角色回复1点体力并摸一张牌。你每次发动〖浮萍〗记录牌名时,"..
"此技能可发动次数+1。",
["#joy__fuping_trigger"] = "浮萍",
["#joy__weilie-active"] = "发动 炜烈,弃置一张牌令一名已受伤的角色回复体力(剩余 %arg 次)并摸1张牌",
}
local luyusheng = General(extension, "joy__luyusheng", "wu", 3, 3, General.Female)
local zhente = fk.CreateTriggerSkill{
name = "joy__zhente",
anim_type = "defensive",
events = {fk.TargetConfirmed},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self) and data.from ~= player.id then
return data.card:isCommonTrick() or data.card.type == Card.TypeBasic
end
end,
on_cost = function(self, event, target, player, data)
if player.room:askForSkillInvoke(player, self.name, nil,
"#zhente-invoke:".. data.from .. "::" .. data.card:toLogString() .. ":" .. data.card:getColorString()) then
player.room:doIndicate(player.id, {data.from})
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(data.from)
local color = data.card:getColorString()
local choice = room:askForChoice(to, {
"zhente_negate::" .. tostring(player.id) .. ":" .. data.card.name,
"zhente_colorlimit:::" .. color
}, self.name)
if choice:startsWith("zhente_negate") then
table.insertIfNeed(data.nullifiedTargets, player.id)
else
local colorsRecorded = type(to:getMark("@zhente-turn")) == "table" and to:getMark("@zhente-turn") or {}
table.insertIfNeed(colorsRecorded, color)
room:setPlayerMark(to, "@zhente-turn", colorsRecorded)
end
end,
}
local zhente_prohibit = fk.CreateProhibitSkill{
name = "#joy__zhente_prohibit",
prohibit_use = function(self, player, card)
local mark = player:getMark("@zhente-turn")
return type(mark) == "table" and table.contains(mark, card:getColorString())
end,
}
local zhiwei = fk.CreateTriggerSkill{
name = "joy__zhiwei",
events = {fk.GameStart, fk.TurnStart, fk.AfterCardsMove, fk.Damage, fk.Damaged},
mute = true,
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) then
if event == fk.GameStart then
return true
elseif event == fk.TurnStart then
return player == target and player:getMark(self.name) == 0
elseif event == fk.AfterCardsMove then
if player.phase ~= Player.Discard then return false end
local zhiwei_id = player:getMark(self.name)
if zhiwei_id == 0 then return false end
local room = player.room
local to = room:getPlayerById(zhiwei_id)
if to == nil or to.dead then return false end
for _, move in ipairs(data) do
if move.from == player.id and move.moveReason == fk.ReasonDiscard then
for _, info in ipairs(move.moveInfo) do
if (info.fromArea == Card.PlayerHand or info.fromArea == Card.PlayerEquip) and
room:getCardArea(info.cardId) == Card.DiscardPile then
return true
end
end
end
end
elseif event == fk.Damage then
return target ~= nil and not target.dead and player:getMark(self.name) == target.id
elseif event == fk.Damaged then
return target ~= nil and not target.dead and player:getMark(self.name) == target.id and not player:isKongcheng()
end
end
end,
on_cost = function(self, event, target, player, data)
local room = player.room
if event == fk.TurnStart then
local targets = table.map(room:getOtherPlayers(player, false), Util.IdMapper)
local to = room:askForChoosePlayers(player, targets, 1, 1, "#zhiwei-choose", self.name, true, true)
if #to > 0 then
self.cost_data = to[1]
return true
end
return false
elseif event == fk.Damaged then
local card = room:askForCard(player,1,1,false,self.name,true,".","#joy__zhiwei-give")
if #card > 0 then
self.cost_data = card
return true
end
else
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
if event == fk.TurnStart then
room:notifySkillInvoked(player, self.name, "special")
player:broadcastSkillInvoke(self.name)
room:setPlayerMark(player, self.name, self.cost_data)
elseif event == fk.GameStart then
room:notifySkillInvoked(player, self.name, "special")
player:broadcastSkillInvoke(self.name)
local targets = table.map(room:getOtherPlayers(player, false), Util.IdMapper)
if #targets == 0 then return false end
local to = room:askForChoosePlayers(player, targets, 1, 1, "#zhiwei-choose", self.name, false, true)
if #to > 0 then
room:setPlayerMark(player, self.name, to[1])
end
elseif event == fk.AfterCardsMove then
local zhiwei_id = player:getMark(self.name)
if zhiwei_id == 0 then return false end
local to = room:getPlayerById(zhiwei_id)
if to == nil or to.dead then return false end
local cards = {}
for _, move in ipairs(data) do
if move.from == player.id and move.moveReason == fk.ReasonDiscard then
for _, info in ipairs(move.moveInfo) do
if (info.fromArea == Card.PlayerHand or info.fromArea == Card.PlayerEquip) and
room:getCardArea(info.cardId) == Card.DiscardPile then
table.insertIfNeed(cards, info.cardId)
end
end
end
end
if #cards > 0 then
player:showCards(cards)
if room:askForSkillInvoke(player,self.name,data,"#joy__zhiwei-discard") then
room:notifySkillInvoked(player, self.name, "support")
player:broadcastSkillInvoke(self.name)
room:setPlayerMark(player, "@joy__zhiwei", to.general)
room:moveCards({
ids = cards,
to = zhiwei_id,
toArea = Card.PlayerHand,
moveReason = fk.ReasonPrey,
proposer = player.id,
skillName = self.name,
})
end
end
elseif event == fk.Damage then
room:notifySkillInvoked(player, self.name, "drawcard")
player:broadcastSkillInvoke(self.name)
room:setPlayerMark(player, "@joy__zhiwei", target.general)
room:drawCards(player, 1, self.name)
elseif event == fk.Damaged then
local card = self.cost_data[1]
if not target.dead then
room:obtainCard(target,card,false,fk.ReasonGive)
end
end
end,
refresh_events = {fk.BuryVictim},
can_refresh = function(self, event, target, player, data)
return player:getMark(self.name) == target.id
end,
on_refresh = function(self, event, target, player, data)
local room = player.room
room:setPlayerMark(player, self.name, 0)
room:setPlayerMark(player, "@joy__zhiwei", 0)
end,
}
zhente:addRelatedSkill(zhente_prohibit)
luyusheng:addSkill(zhente)
luyusheng:addSkill(zhiwei)
Fk:loadTranslationTable{
["joy__luyusheng"] = "陆郁生",
["#joy__luyusheng"] = "义姑",
["joy__zhente"] = "贞特",
[":joy__zhente"] = "当你成为其他角色使用基本牌或普通锦囊牌的目标后,你可令其选择一项:1.本回合不能再使用此颜色的牌;2.此牌对你无效。",
["joy__zhiwei"] = "至微",
[":joy__zhiwei"] = "游戏开始时,你选择一名其他角色,该角色造成伤害后,你摸一张牌;该角色受到伤害后,你可以给予其一张手牌。"..
"你弃牌阶段弃置的牌可以给予该角色。准备阶段,若场上没有“至微”角色,你可以重新选择一名其他角色。",
["#joy__zhiwei-give"] = "至微:是否给予“至微”角色一张手牌?",
["#joy__zhiwei-discard"] = "至微:是否将你弃牌阶段弃置的牌全部给予“至微”角色?",
["@joy__zhiwei"] = "至微",
["$joy__zhente1"] = " ",
["$joy__zhente2"] = " ",
["$joy__zhiwei1"] = " ",
["$joy__zhiwei2"] = " ",
["~joy__luyusheng"] = " ",
}
local zhangning = General(extension, "joy__zhangning", "qun", 3, 3, General.Female)
local tianze = fk.CreateTriggerSkill{
name = "joy__tianze",
events = {fk.CardUseFinished},
anim_type = "offensive",
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and target ~= player and target.phase == Player.Play and data.card.color == Card.Black and
player:usedSkillTimes(self.name, Player.HistoryTurn) == 0 and not player:isNude()
end,
on_cost = function(self, event, target, player, data)
local card = player.room:askForDiscard(player, 1, 1, true, self.name, true, ".|.|spade,club|hand,equip", "#joy__tianze-invoke::"..target.id, true)
if #card > 0 then
self.cost_data = card
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
room:doIndicate(player.id, {target.id})
room:throwCard(self.cost_data, self.name, player, player)
room:damage{ from = player, to = target, damage = 1, skillName = self.name}
end,
}
local tianze_draw = fk.CreateTriggerSkill{
name = "#joy__tianze_draw",
events = {fk.FinishJudge},
anim_type = "drawcard",
mute = true,
can_trigger = function(self, event, target, player, data)
return target ~= player and player:hasSkill(tianze.name) and data.card.color == Card.Black
end,
on_cost = function() return true end,
on_use = function(self, event, target, player, data)
player:broadcastSkillInvoke(tianze.name)
player.room:notifySkillInvoked(player, tianze.name, self.anim_type)
player.room:drawCards(player, 1, self.name)
end,
}
local difa = fk.CreateActiveSkill{
name = "joy__difa",
anim_type = "drawcard",
prompt = "#joy__difa",
can_use = function(self, player)
return not player:isKongcheng() and player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
end,
card_num = 1,
card_filter = function(self, to_select, selected)
return #selected < 1 and Fk:getCardById(to_select).color == Card.Red
end,
target_num = 0,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
room:moveCards({
ids = effect.cards,
from = player.id,
toArea = Card.DiscardPile,
skillName = self.name,
moveReason = fk.ReasonPutIntoDiscardPile,
proposer = player.id
})
if player.dead then return end
player:drawCards(1,self.name)
local allCardMapper = {}
local allCardNames = {}
for _, id in ipairs(Fk:getAllCardIds()) do
local card = Fk:getCardById(id)
if card.type == Card.TypeTrick and room:getCardArea(id) == Card.DrawPile then
if allCardMapper[card.name] == nil then
allCardMapper[card.name] = {}
table.insert(allCardNames, card.name)
end
table.insert(allCardMapper[card.name], id)
end
end
if #allCardNames == 0 then return end
local cardName = room:askForChoice(player, allCardNames, self.name)
room:moveCardTo(table.random(allCardMapper[cardName]), Card.PlayerHand, player, fk.ReasonPrey, self.name)
end,
}
tianze:addRelatedSkill(tianze_draw)
zhangning:addSkill(tianze)
zhangning:addSkill(difa)
Fk:loadTranslationTable{
["joy__zhangning"] = "张宁",
["#joy__zhangning"] = "大贤后人",
["joy__tianze"] = "天则",
[":joy__tianze"] = "每回合限一次,当其他角色于其出牌阶段内使用一张黑色牌结算后,你可以弃置一张黑色牌对其造成1点伤害;其他角色的黑色判定牌生效后,你摸一张牌。",
["joy__difa"] = "地法",
[":joy__difa"] = "出牌阶段限一次,你可以重铸一张红色牌,然后声明一种锦囊牌的牌名,从牌堆获得一张。",
["#joy__tianze-invoke"] = "天则:每回合限一次,你可弃置一张黑色牌来对%dest造成1点伤害",
["#joy__difa"] = "地法:你可重铸一张红色牌,然后检索一张锦囊牌",
["$joy__tianze1"] = " ",
["$joy__tianze2"] = " ",
["$joy__difa1"] = " ",
["$joy__difa2"] = " ",
["~joy__zhangning"] = " ",
}
local bianfuren = General(extension, "joy__bianfuren", "wei", 3, 3, General.Female)
local wanwei = fk.CreateTriggerSkill{
name = "joy__wanwei",
anim_type = "support",
events = {fk.EnterDying, fk.AfterDying},
can_trigger = function(self, event, target, player, data)
if event == fk.EnterDying then
return player:hasSkill(self) and target ~= player and not player:isNude() and
player:usedSkillTimes(self.name, Player.HistoryRound) == 0
else
return not target.dead and data.extra_data and data.extra_data.ofl__fuding and data.extra_data.ofl__fuding[1] == player.id and
not player.dead
end
end,
on_cost = function(self, event, target, player, data)
if event == fk.EnterDying then
local cards = player.room:askForCard(player, 1, 5, true, self.name, true, ".", "#joy__wanwei-invoke::"..target.id)
if #cards > 0 then
self.cost_data = cards
return true
end
else
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
if event == fk.EnterDying then
room:moveCardTo(self.cost_data, Card.PlayerHand, target, fk.ReasonGive, self.name)
data.extra_data = data.extra_data or {}
data.extra_data.ofl__fuding = {player.id, #self.cost_data}
else
player:drawCards(data.extra_data.ofl__fuding[2], self.name)
if player:isWounded() and not player.dead then
room:recover{
who = player,
num = 1,
recoverBy = player,
skillName = self.name
}
end
end
end,
}
local yuejian = fk.CreateViewAsSkill{
name = "joy__yuejian",
pattern = ".|.|.|.|.|basic",
prompt = "#joy__yuejian",
interaction = function()
local names = {}
for _, id in ipairs(Fk:getAllCardIds()) do
local card = Fk:getCardById(id)
if card.type == Card.TypeBasic and not card.is_derived then
local to_use = Fk:cloneCard(card.name)
if ((Fk.currentResponsePattern == nil and Self:canUse(to_use) and not Self:prohibitUse(to_use)) or
(Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(to_use))) then
table.insertIfNeed(names, card.name)
end
end
end
return UI.ComboBox { choices = names }
end,
card_filter = function(self, to_select, selected)
return false
end,
view_as = function(self, cards)
if not self.interaction.data then return nil end
local card = Fk:cloneCard(self.interaction.data)
card.skillName = self.name
return card
end,
enabled_at_play = function(self, player)
return player:getMark("joy__yuejian-turn") == 0
end,
enabled_at_response = function(self, player, response)
return not response and player:getMark("joy__yuejian-turn") == 0
end,
}
local yuejian_record = fk.CreateTriggerSkill{
name = "#joy__yuejian_record",
refresh_events = {fk.AfterCardUseDeclared, fk.EventAcquireSkill},
can_refresh = function(self, event, target, player, data)
if event == fk.AfterCardUseDeclared then
return target == player and data.card.type == Card.TypeBasic and player:getMark("joy__yuejian-turn") == 0
elseif target == player and data == self and player:getMark("joy__yuejian-turn") == 0 then
return #player.room.logic:getEventsOfScope(GameEvent.UseCard, 1, function(e)
local use = e.data[1]
return use.from == player.id and use.card.type == Card.TypeBasic
end, Player.HistoryRound) > 0
end
end,
on_refresh = function(self, event, target, player, data)
player.room:setPlayerMark(player, "joy__yuejian-turn", 1)
end,
}
local yuejian_maxcards = fk.CreateMaxCardsSkill{
name = "#joy__yuejian_maxcards",
frequency = Skill.Compulsory,
correct_func = function(self, player)
if player:hasSkill("joy__yuejian") then
return player.maxHp
else
return 0
end
end,
}
yuejian:addRelatedSkill(yuejian_record)
yuejian:addRelatedSkill(yuejian_maxcards)
bianfuren:addSkill(wanwei)
bianfuren:addSkill(yuejian)
Fk:loadTranslationTable{
["joy__bianfuren"] = "卞夫人",
["#joy__bianfuren"] = "内助贤后",
["joy__wanwei"] = "挽危",
[":joy__wanwei"] = "每轮限一次,当一名其他角色进入濒死状态时,你可以交给其至多五张牌,若如此做,当其脱离濒死状态时,你摸等量牌并回复1点体力。",
["joy__yuejian"] = "约俭",
[":joy__yuejian"] = "你的手牌上限+X(X为你的体力上限)。当你需使用一张基本牌时,若你本回合未使用过基本牌,你可以视为使用之。",
["#joy__wanwei-invoke"] = "挽危:你可以交给 %dest 至多五张牌,其脱离濒死状态后你摸等量牌并回复1点体力",
["#joy__yuejian"] = "约俭:你可以视为使用一张基本牌",
}
return extension
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。