diff --git a/image/generals/joy__baosanniang.jpg b/image/generals/joy__baosanniang.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..09de831bb8a479cdc7710e3f59c29fea3f118b13
Binary files /dev/null and b/image/generals/joy__baosanniang.jpg differ
diff --git a/image/generals/joy__caoxiu.jpg b/image/generals/joy__caoxiu.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b66f65f8a378f1013b82f59f662db9ae106a4f39
Binary files /dev/null and b/image/generals/joy__caoxiu.jpg differ
diff --git a/image/generals/joy__caoying.jpg b/image/generals/joy__caoying.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8355139dc54e8126836fe78f5d2ce8f1966c024b
Binary files /dev/null and b/image/generals/joy__caoying.jpg differ
diff --git a/image/generals/joy__godganning.jpg b/image/generals/joy__godganning.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ab8abe24d4786175bcad39af1462262ad707ed9c
Binary files /dev/null and b/image/generals/joy__godganning.jpg differ
diff --git a/image/generals/joy__godguanyu.jpg b/image/generals/joy__godguanyu.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..aa1402944764ae60f09bf33148ac7a448d511dcc
Binary files /dev/null and b/image/generals/joy__godguanyu.jpg differ
diff --git a/image/generals/joy__godzhaoyun.jpg b/image/generals/joy__godzhaoyun.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..66756729a8b1b097d679d0858875f42690f7917a
Binary files /dev/null and b/image/generals/joy__godzhaoyun.jpg differ
diff --git a/image/generals/joy__godzhouyu.jpg b/image/generals/joy__godzhouyu.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fd481a1f6771594467d7a33ffd366f2ed89ec5c0
Binary files /dev/null and b/image/generals/joy__godzhouyu.jpg differ
diff --git a/image/generals/joy__guanping.jpg b/image/generals/joy__guanping.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1a69e46a406444af9329494b049f70458930a2d5
Binary files /dev/null and b/image/generals/joy__guanping.jpg differ
diff --git a/image/generals/joy__guansuo.jpg b/image/generals/joy__guansuo.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ef773edec4effbb4c8f1e2ac27a855bf01f9593a
Binary files /dev/null and b/image/generals/joy__guansuo.jpg differ
diff --git a/image/generals/joy__guanyinping.jpg b/image/generals/joy__guanyinping.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..21746a65540612079d09ecacb84675c55f39962f
Binary files /dev/null and b/image/generals/joy__guanyinping.jpg differ
diff --git a/image/generals/joy__sunru.jpg b/image/generals/joy__sunru.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b1f4cde4a7bb364789337b38af501c5b0c890c8d
Binary files /dev/null and b/image/generals/joy__sunru.jpg differ
diff --git a/image/generals/joy__xizhicai.jpg b/image/generals/joy__xizhicai.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..158b90a528e1e39cb79e7fc60b19dfd4645a7731
Binary files /dev/null and b/image/generals/joy__xizhicai.jpg differ
diff --git a/image/generals/joy__xushu.jpg b/image/generals/joy__xushu.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f6428190a17ff3853fc0dd8215bcddf98be9f4cd
Binary files /dev/null and b/image/generals/joy__xushu.jpg differ
diff --git a/image/generals/joy__zhangqiying.jpg b/image/generals/joy__zhangqiying.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0cee7c265afa52c4f1987963dcc02f2a749182a2
Binary files /dev/null and b/image/generals/joy__zhangqiying.jpg differ
diff --git a/image/generals/joy__zhaoxiang.jpg b/image/generals/joy__zhaoxiang.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d56e63cce0a11c0acd14c1d746e2ccae538c49da
Binary files /dev/null and b/image/generals/joy__zhaoxiang.jpg differ
diff --git a/image/generals/joyex__liaohua.jpg b/image/generals/joyex__liaohua.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..797c8c3b4ff70ff33e2942e71853a43fa41045f0
Binary files /dev/null and b/image/generals/joyex__liaohua.jpg differ
diff --git a/image/generals/joyex__sunqian.jpg b/image/generals/joyex__sunqian.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..76bc801c1288ba3f24c1e621a0259733d0700c44
Binary files /dev/null and b/image/generals/joyex__sunqian.jpg differ
diff --git a/image/generals/joyex__weiyan.jpg b/image/generals/joyex__weiyan.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..78aabb40ff493d3f666ce3cee589369d476cc791
Binary files /dev/null and b/image/generals/joyex__weiyan.jpg differ
diff --git a/image/generals/joysp__caiwenji.jpg b/image/generals/joysp__caiwenji.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1d1464148edb722badfbe3592c0f43658ba7b8dc
Binary files /dev/null and b/image/generals/joysp__caiwenji.jpg differ
diff --git a/image/generals/joysp__pangtong.jpg b/image/generals/joysp__pangtong.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..16466f42de3fac5259b995816ec36b5d41c89b99
Binary files /dev/null and b/image/generals/joysp__pangtong.jpg differ
diff --git a/joy_god.lua b/joy_god.lua
index 49739f90b20495a48daa105c96f6b1c154fcf8d0..3a283e94211d440c367045663b93237337dafbaf 100644
--- a/joy_god.lua
+++ b/joy_god.lua
@@ -1384,13 +1384,505 @@ Fk:loadTranslationTable{
[":joy__kuangxi"] = "锁定技,每当你造成伤害时,若场上存在“卫”标记,此伤害+1。",
}
+local godzhaoyun = General(extension, "joy__godzhaoyun", "god", 2)
+local juejing = fk.CreateTriggerSkill{
+ name = "joy__juejing",
+ anim_type = "drawcard",
+ frequency = Skill.Compulsory,
+ events = {fk.EnterDying, fk.AfterDying},
+ on_use = function(self, event, target, player, data)
+ player:drawCards(1, self.name)
+ end,
+}
+local juejing_maxcards = fk.CreateMaxCardsSkill{
+ name = "#joy__juejing_maxcards",
+ correct_func = function(self, player)
+ if player:hasSkill(juejing.name) then
+ return 3
+ end
+ end
+}
+juejing:addRelatedSkill(juejing_maxcards)
+local longhun = fk.CreateViewAsSkill{
+ name = "joy__longhun",
+ pattern = "peach,slash,jink,nullification",
+ card_filter = function(self, to_select, selected)
+ if #selected == 2 then
+ return false
+ elseif #selected == 1 then
+ return Fk:getCardById(to_select):compareSuitWith(Fk:getCardById(selected[1]))
+ else
+ local suit = Fk:getCardById(to_select).suit
+ local c
+ if suit == Card.Heart then
+ c = Fk:cloneCard("peach")
+ elseif suit == Card.Diamond then
+ c = Fk:cloneCard("fire__slash")
+ elseif suit == Card.Club then
+ c = Fk:cloneCard("jink")
+ elseif suit == Card.Spade then
+ c = Fk:cloneCard("nullification")
+ else
+ return false
+ end
+ return (Fk.currentResponsePattern == nil and c.skill:canUse(Self, c)) or (Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(c))
+ end
+ end,
+ view_as = function(self, cards)
+ if #cards == 0 or #cards > 2 then
+ return nil
+ end
+ local suit = Fk:getCardById(cards[1]).suit
+ local c
+ if suit == Card.Heart then
+ c = Fk:cloneCard("peach")
+ elseif suit == Card.Diamond then
+ c = Fk:cloneCard("fire__slash")
+ elseif suit == Card.Club then
+ c = Fk:cloneCard("jink")
+ elseif suit == Card.Spade then
+ c = Fk:cloneCard("nullification")
+ else
+ return nil
+ end
+ c.skillName = self.name
+ c:addSubcards(cards)
+ return c
+ end,
+ before_use = function(self, player, use)
+ local num = #use.card.subcards
+ if num == 2 then
+ local suit = Fk:getCardById(use.card.subcards[1]).suit
+ if suit == Card.Diamond then
+ use.additionalDamage = (use.additionalDamage or 0) + 1
+ player:drawCards(1, self.name)
+ elseif suit == Card.Heart then
+ use.additionalRecover = (use.additionalRecover or 0) + 1
+ player:drawCards(1, self.name)
+ end
+ end
+ end,
+}
+local longhun_obtaincard = fk.CreateTriggerSkill{
+ name = "#joy__longhun_obtaincard",
+ events = {fk.CardUseFinished},
+ mute = true,
+ can_trigger = function(self, event, target, player, data)
+ return target == player and table.contains(data.card.skillNames, "joy__longhun") and #data.card.subcards == 2 and Fk:getCardById(data.card.subcards[1]).color == Card.Black
+ end,
+ on_cost = function() return true end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local from = room.current
+ if from and not from.dead and not from:isNude() then
+ room:doIndicate(player.id, {from.id})
+ local card = room:askForCardChosen(player, from, "he", self.name)
+ room:obtainCard(player, card, false, fk.ReasonPrey)
+ end
+ end,
+}
+longhun:addRelatedSkill(longhun_obtaincard)
+godzhaoyun:addSkill(juejing)
+godzhaoyun:addSkill(longhun)
+Fk:loadTranslationTable{
+ ["joy__godzhaoyun"] = "神赵云",
+ ["#joy__godzhaoyun"] = "神威如龙",
+
+ ["joy__juejing"] = "绝境",
+ [":joy__juejing"] = "锁定技,你的手牌上限+3;当你进入濒死状态时或你的濒死结算结束后,你摸一张牌。",
+ ["joy__longhun"] = "龙魂",
+ ["#joy__longhun_obtaincard"] = "龙魂",
+ [":joy__longhun"] = "你可以将至多两张你的同花色的牌按以下规则使用或打出:红桃当【桃】,方块当火【杀】,梅花当【闪】,黑桃当【无懈可击】。"..
+ "若你以此法使用或打出了两张:红色牌,此牌回复伤害基数+1,且你摸一张牌;黑色牌,你获得当前回合角色一张牌。",
+}
+local godganning = General(extension, "joy__godganning", "god", 3, 6)
+local poxi = fk.CreateActiveSkill{
+ name = "joy__poxi",
+ anim_type = "control",
+ prompt = "#joy__poxi-prompt",
+ card_num = 0,
+ target_num = 1,
+ can_use = function(self, player)
+ return player:usedSkillTimes(self.name, Player.HistoryPhase) < 1
+ end,
+ card_filter = function() return false end,
+ target_filter = function(self, to_select, selected, selected_cards)
+ return #selected == 0 and to_select ~= Self.id and not Fk:currentRoom():getPlayerById(to_select):isKongcheng()
+ end,
+ on_use = function(self, room, effect)
+ local player = room:getPlayerById(effect.from)
+ local target = room:getPlayerById(effect.tos[1])
+ local player_hands = player:getCardIds("h")
+ local target_hands = target:getCardIds("h")
+ local cards = room:askForPoxi(player, "joy__poxi_discard", {
+ { player.general, player_hands },
+ { target.general, target_hands },
+ }, nil, true)
+ if #cards == 0 then return end
+ local cards1 = table.filter(cards, function(id) return table.contains(player_hands, id) end)
+ local cards2 = table.filter(cards, function(id) return table.contains(target_hands, id) end)
+ local moveInfos = {}
+ if #cards1 > 0 then
+ table.insert(moveInfos, {
+ from = player.id,
+ ids = cards1,
+ toArea = Card.DiscardPile,
+ moveReason = fk.ReasonDiscard,
+ proposer = effect.from,
+ skillName = self.name,
+ })
+ end
+ if #cards2 > 0 then
+ table.insert(moveInfos, {
+ from = target.id,
+ ids = cards2,
+ toArea = Card.DiscardPile,
+ moveReason = fk.ReasonDiscard,
+ proposer = effect.from,
+ skillName = self.name,
+ })
+ end
+ room:moveCards(table.unpack(moveInfos))
+ if player.dead then return false end
+ if #cards1 == 0 then
+ room:changeMaxHp(player, -1)
+ elseif #cards1 == 2 and player:isWounded() then
+ room:recover({
+ who = player,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name
+ })
+ elseif #cards1 == 3 then
+ room:drawCards(player, 3, self.name)
+ end
+ return false
+ end,
+}
+Fk:addPoxiMethod{
+ name = "joy__poxi_discard",
+ card_filter = function(to_select, selected, data)
+ local suit = Fk:getCardById(to_select).suit
+ if suit == Card.NoSuit then return false end
+ return not table.find(selected, function(id) return Fk:getCardById(id).suit == suit end)
+ and not (Self:prohibitDiscard(Fk:getCardById(to_select)) and table.contains(data[1][2], to_select))
+ end,
+ feasible = function(selected)
+ return #selected == 3
+ end,
+ prompt = function ()
+ return "魄袭:弃置双方手里三张不同花色的牌"
+ end
+}
+local gn_jieying = fk.CreateTriggerSkill{
+ name = "joy__gn_jieying",
+ anim_type = "drawcard",
+ events = {fk.DrawNCards, fk.EventPhaseStart, fk.TurnStart},
+ can_trigger = function(self, event, target, player, data)
+ if not player:hasSkill(self) then return false end
+ if event == fk.TurnStart then
+ return player == target and table.every(player.room.alive_players, function (p)
+ return p:getMark("@@joy__jieying_camp") == 0 end)
+ elseif event == fk.EventPhaseStart and target.phase ~= Player.Finish then
+ return false
+ end
+ return target:getMark("@@joy__jieying_camp") > 0
+ end,
+ on_cost = function(self, event, target, player, data)
+ if event == fk.EventPhaseStart and player == target then
+ local to = player.room:askForChoosePlayers(player, table.map(player.room:getOtherPlayers(player), function (p)
+ return p.id end), 1, 1, "#joy__gn_jieying-choose", self.name, true)
+ if #to > 0 then
+ self.cost_data = to[1]
+ return true
+ end
+ return false
+ end
+ return true
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ if event == fk.TurnStart then
+ room:addPlayerMark(player, "@@joy__jieying_camp")
+ elseif event == fk.DrawNCards then
+ data.n = data.n + 1
+ elseif event == fk.EventPhaseStart then
+ if player == target then
+ local tar = room:getPlayerById(self.cost_data)
+ room:setPlayerMark(player, "@@joy__jieying_camp", 0)
+ room:addPlayerMark(tar, "@@joy__jieying_camp")
+ else
+ room:setPlayerMark(target, "@@joy__jieying_camp", 0)
+ if not target:isKongcheng() then
+ local dummy = Fk:cloneCard("dilu")
+ dummy:addSubcards(target.player_cards[Player.Hand])
+ room:obtainCard(player.id, dummy, false, fk.ReasonPrey)
+ end
+ end
+ end
+ return false
+ end,
+
+ refresh_events = {fk.BuryVictim, fk.EventLoseSkill},
+ can_refresh = function(self, event, target, player, data)
+ return (event == fk.BuryVictim or data == self) and player:getMark("@@joy__jieying_camp") > 0
+ end,
+ on_refresh = function(self, event, target, player, data)
+ local room = player.room
+ if table.every(room.alive_players, function (p) return not p:hasSkill(self.name, true) end) then
+ room:setPlayerMark(player, "@@joy__jieying_camp", 0)
+ end
+ end,
+}
+local gn_jieying_targetmod = fk.CreateTargetModSkill{
+ name = "#joy__gn_jieying_targetmod",
+ residue_func = function(self, player, skill, scope)
+ if skill.trueName == "slash_skill" and player:getMark("@@joy__jieying_camp") > 0 and scope == Player.HistoryPhase then
+ return #table.filter(Fk:currentRoom().alive_players, function (p) return p:hasSkill(gn_jieying.name) end)
+ end
+ end,
+}
+local gn_jieying_maxcards = fk.CreateMaxCardsSkill{
+ name = "#joy__gn_jieying_maxcards",
+ correct_func = function(self, player)
+ if player:getMark("@@joy__jieying_camp") > 0 then
+ return #table.filter(Fk:currentRoom().alive_players, function (p) return p:hasSkill(gn_jieying.name) end)
+ else
+ return 0
+ end
+ end,
+}
+gn_jieying:addRelatedSkill(gn_jieying_targetmod)
+gn_jieying:addRelatedSkill(gn_jieying_maxcards)
+godganning:addSkill(poxi)
+godganning:addSkill(gn_jieying)
+Fk:loadTranslationTable{
+ ["joy__godganning"] = "神甘宁",
+ ["#joy__godganning"] = "江表之力牧",
+
+ ["joy__poxi"] = "魄袭",
+ [":joy__poxi"] = "出牌阶段限一次,你可以观看一名其他角色的手牌,然后你可以弃置你与其手里共计三张不同花色的牌。若如此做,根据此次弃置你的牌数量执行以下效果:没有,体力上限减1;两张,回复1点体力;三张,摸三张牌。",
+ ["joy__gn_jieying"] = "劫营",
+ [":joy__gn_jieying"] = "回合开始时,若没有角色有“营”标记,你获得一个“营”标记;结束阶段你可以将“营”标记交给一名其他角色;"..
+ "有“营”的角色摸牌阶段多摸一张牌、使用【杀】的次数上限+1、手牌上限+1。有“营”的其他角色的结束阶段,移去“营”,然后你获得其所有手牌。",
+ --欢杀劫营其他角色回合结束只移去“营”而不是转移到神甘宁头上(虽然没什么区别..)
+
+ ["joy__poxi_discard"] = "魄袭",
+ ["#joy__poxi-prompt"] = "魄袭:选择一名有手牌的其他角色,并可弃置你与其手牌中共计三张花色各不相同的牌",
+ ["@@joy__jieying_camp"] = "营",
+ ["#joy__poxi-choose"] = "魄袭:从双方的手牌中选出四张不同花色的牌弃置,或者点取消",
+ ["#joy__gn_jieying-choose"] = "劫营:你可将营标记交给其他角色",
+}
+local godguanyu = General(extension, "joy__godguanyu", "god", 5)
+local joy__wushen = fk.CreateViewAsSkill{
+ name = "joy__wushen",
+ anim_type = "offensive",
+ pattern = "slash",
+ card_filter = function(self, to_select, selected)
+ if #selected == 1 then return false end
+ return Fk:getCardById(to_select).suit == Card.Heart
+ end,
+ view_as = function(self, cards)
+ if #cards ~= 1 then
+ return nil
+ end
+ local c = Fk:cloneCard("slash")
+ c.skillName = self.name
+ c:addSubcard(cards[1])
+ return c
+ end,
+}
+local wushen_targetmod = fk.CreateTargetModSkill{
+ name = "#joy__wushen_targetmod",
+ anim_type = "offensive",
+ distance_limit_func = function(self, player, skill, card)
+ if player:hasSkill("joy__wushen") and skill.trueName == "slash_skill" and card.suit == Card.Heart then
+ return 999
+ end
+ return 0
+ end,
+}
+local wushen_trigger = fk.CreateTriggerSkill{
+ name = "#joy__wushen_trigger",
+ main_skill = joy__wushen,
+ mute = true,
+ events = {fk.AfterCardUseDeclared},
+ can_trigger = function(self, event, target, player, data)
+ if target == player and player:hasSkill(self) then
+ return data.card.trueName == "slash" and data.card.suit == Card.Heart
+ end
+ end,
+ on_cost = Util.TrueFunc,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ room:notifySkillInvoked(player, "joy__wushen", "offensive")
+ data.additionalDamage = (data.additionalDamage or 0) + 1
+ end,
+}
+local wuhun = fk.CreateTriggerSkill{
+ name = "joy__wuhun",
+ anim_type = "offensive",
+ frequency = Skill.Compulsory,
+ events = {fk.Damaged,fk.AfterDying, fk.Death},
+ can_trigger = function(self, event, target, player, data)
+ if target == player and player:hasSkill(self, false, true) then
+ if event == fk.Damaged then
+ return data.from and not data.from.dead and not player.dead
+ else
+ local availableTargets = {}
+ local n = 0
+ for _, p in ipairs(player.room.alive_players) do
+ if p:getMark("@joy__nightmare") > n then
+ availableTargets = {}
+ table.insert(availableTargets, p.id)
+ n = p:getMark("@joy__nightmare")
+ elseif p:getMark("@joy__nightmare") == n and n ~= 0 then
+ table.insert(availableTargets, p.id)
+ end
+ end
+ if #availableTargets > 0 then
+ self.cost_data = availableTargets
+ return true
+ end
+ end
+ end
+ return false
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ if event == fk.Damaged then
+ room:addPlayerMark(data.from, "@joy__nightmare", data.damage)
+ else
+ local p_id
+ if #self.cost_data > 1 then
+ p_id = room:askForChoosePlayers(player, self.cost_data, 1, 1, "#joy__wuhun-choose", self.name, false)[1]
+ else
+ p_id = self.cost_data[1]
+ end
+ local judge = {
+ who = room:getPlayerById(p_id),
+ reason = self.name,
+ pattern = "peach,god_salvation|.",
+ }
+ room:judge(judge)
+ if judge.card.name == "peach" or judge.card.name == "god_salvation" then return false end
+ local p = room:getPlayerById(p_id)
+ room:loseHp(p,5,self.name)
+ end
+ end,
+}
+joy__wushen:addRelatedSkill(wushen_targetmod)
+joy__wushen:addRelatedSkill(wushen_trigger)
+godguanyu:addSkill(joy__wushen)
+godguanyu:addSkill(wuhun)
+Fk:loadTranslationTable {
+ ["joy__godguanyu"] = "神关羽",
+ ["#joy__godguanyu"] = "神鬼再临",
+
+ ["joy__wushen"] = "武神",
+ [":joy__wushen"] = "你的♥手牌可以视为【杀】;你使用♥【杀】无距离限制且伤害+1。",
+ ["joy__wuhun"] = "武魂",
+ [":joy__wuhun"] = "锁定技,当你受到1点伤害后,伤害来源获得1枚“梦魇”;你脱离濒死状态或死亡时,令“梦魇”最多的一名其他角色判定,若不为【桃】或【桃园结义】,该角色流失5点体力。",
+ ["@joy__nightmare"] = "梦魇",
+ ["#joy__wuhun-choose"] = "武魂:选择一名“梦魇”最多的其他角色",
+}
+local godzhouyu = General(extension, "joy__godzhouyu", "god", 4)
+local qinyin = fk.CreateTriggerSkill{
+ name = "joy__qinyin",
+ events = {fk.EventPhaseEnd},
+ mute = true,
+ can_trigger = function(self, event, target, player, data)
+ if target == player and player:hasSkill(self) and player.phase == Player.Discard then
+ local x = 0
+ local logic = player.room.logic
+ 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.skillName == "game_rule" then
+ x = x + #move.moveInfo
+ if x > 0 then return true end
+ end
+ end
+ return false
+ end, Player.HistoryTurn)
+ return x > 0
+ end
+ end,
+
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local choices = {"loseHp","drawcard"}
+ if not table.every(room.alive_players, function (p) return not p:isWounded() end) then
+ table.insert(choices, 1, "recover")
+ end
+ local choice = room:askForChoice(player, choices, self.name)
+ if choice == "recover" then
+ for _, p in ipairs(room:getAlivePlayers()) do
+ if p:isWounded() then
+ room:recover{
+ who = p,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name
+ }
+ end
+ end
+ elseif choice == "loseHp" then
+ for _, p in ipairs(room:getAlivePlayers()) do
+ if not p.dead then room:loseHp(p, 1, self.name) end
+ end
+ elseif choice == "drawcard" then
+ for _, p in ipairs(room:getAlivePlayers()) do
+ if not p.dead then room:drawCards(p, 1, self.name) end
+ end
+ end
+ end,
+}
+local yeyan = fk.CreateTriggerSkill{
+ name = "joy__yeyan",
+ anim_type = "offensive",
+ events = {fk.EventPhaseStart},
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self) and
+ player.phase == Player.Start
+ end,
+ on_cost = function(self, event, target, player, data)
+ local room = player.room
+ local to = room:askForChoosePlayers(player, table.map(room:getOtherPlayers(player), Util.IdMapper), 1, 1, "#joy__yeyan-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
+ room:damage({
+ from = player,
+ to = room:getPlayerById(self.cost_data),
+ damage = 1,
+ damageType = fk.FireDamage,
+ skillName = self.name,
+ })
+ end,
+}
+godzhouyu:addSkill(qinyin)
+godzhouyu:addSkill(yeyan)
+Fk:loadTranslationTable{
+ ["joy__godzhouyu"] = "神周瑜",
+ ["#joy__godzhouyu"] = "赤壁的火神",
+ ["joy__qinyin"] = "琴音",
+ [":joy__qinyin"] = "弃牌阶段结束时,若你此阶段弃置过至少一张手牌,你可以选择:1. 令所有角色各回复1点体力;2. 令所有角色各失去1点体力。3.令所有角色各摸一张牌",
+ ["joy__yeyan"] = "业炎",
+ [":joy__yeyan"] = "出牌阶段开始时,你可以选择一名其他角色对其造成1点火焰伤害。",
+ ["#joy__yeyan-choose"] = "业炎:选择1名其他角色对其造成1点火焰伤害",
+ ["drawcard"] = "各摸一张牌"
+}
diff --git a/joy_shzl.lua b/joy_shzl.lua
index 51b408ea6a33ea42846c5901225543de7c7b0172..72a563c91a08effbb4d75ae251834fd519e03707 100644
--- a/joy_shzl.lua
+++ b/joy_shzl.lua
@@ -520,5 +520,96 @@ Fk:loadTranslationTable{
["#joyex__qizhi-choose"] = "奇制:弃置一名角色一张牌,若为%arg,你摸一张牌,否则其摸一张牌",
}
+local joyex__weiyan = General(extension, "joyex__weiyan", "shu", 4)
+local joyex__kuanggu = fk.CreateTriggerSkill{
+ name = "joyex__kuanggu",
+ anim_type = "drawcard",
+ events = {fk.Damage},
+ can_trigger = function(self, event, target, player, data)
+ return player:hasSkill(self) and target == player
+ end,
+ on_trigger = function(self, event, target, player, data)
+ self.cancel_cost = false
+ for i = 1, data.damage do
+ self:doCost(event, target, player, data)
+ if self.cost_data == "Cancel" or player.dead then break end
+ end
+ end,
+ on_cost = function(self, event, target, player, data)
+ local room = player.room
+ local choices = {"draw1", "Cancel"}
+ if player:isWounded() then
+ table.insert(choices, 2, "recover")
+ end
+ self.cost_data = room:askForChoice(player, choices, self.name)
+ return self.cost_data ~= "Cancel"
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ if self.cost_data == "recover" then
+ room:recover({
+ who = player,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name
+ })
+ elseif self.cost_data == "draw1" then
+ player:drawCards(1, self.name)
+ end
+ end,
+}
+local joyex__qimou_targetmod = fk.CreateTargetModSkill{
+ name = "#joyex__qimou_targetmod",
+ residue_func = function(self, player, skill, scope)
+ if skill.trueName == "slash_skill" and scope == Player.HistoryPhase then
+ return player:getMark("@joyex__qimou-turn") or 0
+ end
+ end,
+}
+local joyex__qimou_distance = fk.CreateDistanceSkill{
+ name = "#joyex__qimou_distance",
+ correct_func = function(self, from, to)
+ return -from:getMark("@joyex__qimou-turn")
+ end,
+}
+local joyex__qimou = fk.CreateActiveSkill{
+ name = "joyex__qimou",
+ anim_type = "offensive",
+ card_num = 0,
+ target_num = 0,
+ frequency = Skill.Limited,
+ interaction = function()
+ return UI.Spin {
+ from = 1,
+ to = Self.hp,
+ }
+ end,
+ can_use = function(self, player)
+ return player:usedSkillTimes(self.name, Player.HistoryGame) == 0 and player.hp > 0
+ end,
+ on_use = function(self, room, effect)
+ local player = room:getPlayerById(effect.from)
+ local tolose = self.interaction.data
+ room:loseHp(player, tolose, self.name)
+ if player.dead then return end
+ room:setPlayerMark(player, "@joyex__qimou-turn", tolose)
+ player:drawCards(1, self.name)
+ end,
+}
+joyex__qimou:addRelatedSkill(joyex__qimou_targetmod)
+joyex__qimou:addRelatedSkill(joyex__qimou_distance)
+joyex__weiyan:addSkill(joyex__kuanggu)
+joyex__weiyan:addSkill(joyex__qimou)
+Fk:loadTranslationTable{
+ ["joyex__weiyan"] = "界魏延",
+ ["#joyex__weiyan"] = "嗜血的独狼",
+
+ ["joyex__kuanggu"] = "狂骨",
+ [":joyex__kuanggu"] = "你对一名角色造成1点伤害后,你可以选择摸一张牌或回复1点体力。",
+ ["joyex__qimou"] = "奇谋",
+ [":joyex__qimou"] = "限定技,出牌阶段,你可以失去X点体力,摸1张牌,本回合内与其他角色计算距离-X且可以多使用X张杀。",
+ ["@joyex__qimou-turn"] = "奇谋",
+
+}
return extension
diff --git a/joy_sp.lua b/joy_sp.lua
index 923e353986cb1b6113099ec03d2879454d0d19a5..adbe47579133022fae25b50400f2cc948f031ec3 100644
--- a/joy_sp.lua
+++ b/joy_sp.lua
@@ -226,7 +226,184 @@ Fk:loadTranslationTable{
[":joy__benghuai"] = "锁定技,结束阶段,若你不是体力值最低的角色,则你失去1点体力或减少1点体力上限,并摸一张牌。",
}
+local joy__guanyinping = General(extension, "joy__guanyinping", "shu", 3, 3, General.Female)
+local joy__huxiao = fk.CreateTriggerSkill{
+ name = "joy__huxiao",
+ anim_type = "offensive",
+ events = {fk.Damage},
+ frequency = Skill.Compulsory,
+ can_trigger = function(self, event, target, player, data)
+ return player:hasSkill(self) and player == target and data.damageType == fk.FireDamage and not data.to.dead
+ end,
+ on_use = function(self, event, target, player, data)
+ if data.to.dead then return end
+ local mark = U.getMark(data.to, "@@joy__huxiao-turn")
+ table.insertIfNeed(mark, player.id)
+ player.room:setPlayerMark(data.to, "@@joy__huxiao-turn", mark)
+ end,
+}
+local ol__huxiao_targetmod = fk.CreateTargetModSkill{
+ name = "#joy__huxiao_targetmod",
+ bypass_times = function(self, player, skill, scope, card, to)
+ return table.contains(U.getMark(to, "@@joy__huxiao-turn"), player.id)
+ end,
+}
+joy__huxiao:addRelatedSkill(joy__huxiao_targetmod)
+local joy__wuji = fk.CreateTriggerSkill{
+ name = "joy__wuji",
+ anim_type = "special",
+ events = {fk.EventPhaseStart},
+ frequency = Skill.Wake,
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self) and player.phase == Player.Finish and player:usedSkillTimes(self.name, Player.HistoryGame) == 0
+ end,
+ can_wake = function(self, event, target, player, data)
+ local n = 0
+ U.getActualDamageEvents(player.room, 1, function(e)
+ local damage = e.data[1]
+ n = n + damage.damage
+ if n > 2 then return true end
+ end)
+ return n > 2
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ room:changeMaxHp(player, 1)
+ if player:isWounded() and not player.dead then
+ room:recover({ who = player, num = 1, recoverBy = player, skillName = self.name })
+ end
+ if player.dead then return end
+ for _, id in ipairs(Fk:getAllCardIds()) do
+ if Fk:getCardById(id).name == "blade" then
+ if room:getCardArea(id) == Card.DrawPile or room:getCardArea(id) == Card.DiscardPile or room:getCardArea(id) == Card.PlayerEquip then
+ room:moveCardTo(id, Card.PlayerHand, player, fk.ReasonPrey, self.name)
+ break
+ end
+ end
+ end
+ end,
+}
+joy__guanyinping:addSkill("ol__xuehen")
+joy__guanyinping:addSkill(joy__huxiao)
+joy__guanyinping:addSkill(joy__wuji)
+Fk:loadTranslationTable{
+ ["joy__guanyinping"] = "关银屏",
+ ["#joy__guanyinping"] = "武姬",
+
+ ["joy__huxiao"] = "虎啸",
+ [":joy__huxiao"] = "锁定技,当你对一名角色造成火焰伤害后,本回合你对其使用牌无次数限制。",
+ ["@@joy__huxiao-turn"] = "虎啸",
+ ["joy__wuji"] = "武继",
+ [":joy__wuji"] = "觉醒技,结束阶段,若你本回合造成过至少3点伤害,你加1点体力上限并回复1点体力,,然后从牌堆、弃牌堆或场上获得【青龙偃月刀】。",
+}
+
+local joyex__sunqian = General(extension, "joyex__sunqian", "shu", 3)
+local joyex__qianya = fk.CreateTriggerSkill{
+ name = "joyex__qianya",
+ anim_type = "support",
+ events = {fk.TargetConfirmed},
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self) and data.card.type == Card.TypeTrick and not player:isKongcheng()
+ end,
+ on_cost = function(self, event, target, player, data)
+ local tos, cards = player.room:askForChooseCardsAndPlayers(player, 1, player:getHandcardNum(), table.map(player.room:getOtherPlayers(player), Util.IdMapper), 1, 1, ".", "#joyex__qianya-invoke", self.name, true)
+ if #tos > 0 and #cards > 0 then
+ self.cost_data = {tos[1], cards}
+ return true
+ end
+ end,
+ on_use = function (self, event, target, player, data)
+ player.room:moveCardTo(self.cost_data[2], Card.PlayerHand, player.room:getPlayerById(self.cost_data[1]), fk.ReasonGive, self.name, "", true, player.id)
+ local room = player.room
+ local cards = room:getCardsFromPileByRule(".|.|.|.|.|^Equip")
+ if #cards > 0 and not player.dead then
+ local get = cards[1]
+ local card = Fk:getCardById(get)
+ room:obtainCard(player, get, false, fk.ReasonDraw)
+ end
+ end,
+}
+
+joyex__sunqian:addSkill(joyex__qianya)
+joyex__sunqian:addSkill("shuimeng")
+Fk:loadTranslationTable{
+ ["joyex__sunqian"] = "界孙乾",
+ ["#joyex__sunqian"] = "折冲樽俎",
+
+ ["joyex__qianya"] = "谦雅",
+ [":joyex__qianya"] = "当你成为锦囊牌的目标后,你可以将任意张手牌交给一名其他角色,并从牌堆获得一张非装备牌。",
+ ["#joyex__qianya-invoke"] = "谦雅:你可以将任意张手牌交给一名其他角色并获得一张非装备牌",
+}
+
+local xizhicai = General(extension, "joy__xizhicai", "wei", 3)
+local updataXianfu = function (room, player, target)
+ local mark = U.getMark(player, "xianfu")
+ table.insertIfNeed(mark[2], target.id)
+ room:setPlayerMark(player, "xianfu", mark)
+ local names = table.map(mark[2], function(pid) return Fk:translate(room:getPlayerById(pid).general) end)
+ room:setPlayerMark(player, "@xianfu", table.concat(names, ","))
+end
+local chouce = fk.CreateTriggerSkill{
+ name = "joy__chouce",
+ anim_type = "masochism",
+ events = {fk.Damaged},
+ on_trigger = function(self, event, target, player, data)
+ self.cancel_cost = false
+ for i = 1, data.damage do
+ if self.cancel_cost or not player:hasSkill(self) then break end
+ self:doCost(event, target, player, data)
+ end
+ end,
+ on_cost = function(self, event, target, player, data)
+ if player.room:askForSkillInvoke(player, self.name, data) then
+ return true
+ end
+ self.cancel_cost = true
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local judge = {
+ who = player,
+ reason = self.name,
+ pattern = ".|.|^nosuit",
+ }
+ room:judge(judge)
+ if judge.card.color == Card.Red then
+ local targets = table.map(room.alive_players, Util.IdMapper)
+ local tos = room:askForChoosePlayers(player, targets, 1, 1, "#joy__chouce-draw", self.name, false)
+ local to = room:getPlayerById(tos[1])
+ local num = 1
+ local mark = U.getMark(player, "xianfu")
+ if #mark > 0 and table.contains(mark[1], to.id) then
+ num = 2
+ updataXianfu (room, player, to)
+ end
+ to:drawCards(num, self.name)
+ elseif judge.card.color == Card.Black then
+ local targets = table.map(table.filter(room.alive_players, function(p) return not p:isAllNude() end), Util.IdMapper)
+ if #targets == 0 then return end
+ local tos = room:askForChoosePlayers(player, targets, 1, 1, "#joy__chouce-discard", self.name, false)
+ local to = room:getPlayerById(tos[1])
+ local card = room:askForCardChosen(player, to, "hej", self.name)
+ room:obtainCard(player,card,false, fk.ReasonPrey)
+ end
+ end,
+}
+xizhicai:addSkill("xianfu")
+xizhicai:addSkill("tiandu")
+xizhicai:addSkill(chouce)
+Fk:loadTranslationTable{
+ ["joy__xizhicai"] = "戏志才",
+ ["#joy__xizhicai"] = "负俗的天才",
+
+ ["joy__chouce"] = "筹策",
+ [":joy__chouce"] = "当你受到1点伤害后,你可以进行判定,若结果为:黑色,你获得一名角色区域里的一张牌;红色,你令一名角色摸一张牌(先辅的角色摸两张)。",
+
+ ["#joy__chouce-draw"] = "筹策: 令一名角色摸一张牌(若为先辅角色则摸两张)",
+ ["#joy__chouce-discard"] = "筹策: 获得一名角色区域里的一张牌",
+
+}
local sunshangxiang = General(extension, "joysp__sunshangxiang", "shu", 3, 3, General.Female)
local joy__liangzhu = fk.CreateTriggerSkill{
@@ -773,7 +950,158 @@ Fk:loadTranslationTable{
+local pangtong = General(extension, "joysp__pangtong", "wu", 3)
+local guolun = fk.CreateActiveSkill{
+ name = "joy__guolun",
+ anim_type = "control",
+ card_num = 0,
+ target_num = 1,
+ can_use = function(self, player)
+ return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
+ end,
+ card_filter = Util.FalseFunc,
+ target_filter = function(self, to_select, selected, selected_cards)
+ return #selected == 0 and to_select ~= Self.id and not Fk:currentRoom():getPlayerById(to_select):isKongcheng()
+ end,
+ on_use = function(self, room, effect)
+ local player = room:getPlayerById(effect.from)
+ local target = room:getPlayerById(effect.tos[1])
+ local id1 = room:askForCardChosen(player, target, "h", self.name)
+ target:showCards(id1)
+ if not target.dead and not player:isNude() then
+ local n1 = Fk:getCardById(id1).number
+ local card = room:askForCard(player, 1, 1, false, self.name, true, ".", "#joy__guolun-card:::"..tostring(n1))
+ if #card > 0 then
+ local id2 = card[1]
+ player:showCards(id2)
+ local n2 = Fk:getCardById(id2).number
+ if player.dead then return end
+ local move1 = {
+ from = effect.from,
+ ids = {id2},
+ to = effect.tos[1],
+ toArea = Card.PlayerHand,
+ moveReason = fk.ReasonJustMove,
+ proposer = effect.from,
+ skillName = self.name,
+ }
+ local move2 = {
+ from = effect.tos[1],
+ ids ={id1},
+ to = effect.from,
+ toArea = Card.PlayerHand,
+ moveReason = fk.ReasonJustMove,
+ proposer = effect.from,
+ skillName = self.name,
+ }
+ room:moveCards(move1, move2)
+ if n2 > n1 and not target.dead then
+ target:drawCards(1, self.name)
+ room:recover({
+ who = player,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name,
+ })
+ elseif n1 > n2 and not player.dead then
+ player:drawCards(2, self.name)
+ end
+ end
+ end
+ end,
+}
+local songsang = fk.CreateTriggerSkill{
+ name = "joy__songsang",
+ anim_type = "support",
+ events = {fk.Death},
+ 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
+ room:changeMaxHp(player, 1)
+ room:recover({
+ who = player,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name,
+ })
+ end,
+}
+pangtong:addSkill(guolun)
+pangtong:addSkill(songsang)
+pangtong:addSkill("zhanji")
+Fk:loadTranslationTable{
+ ["joysp__pangtong"] = "庞统",
+ ["#joysp__pangtong"] = "南州士冠",
+
+ ["joy__guolun"] = "过论",
+ [":joy__guolun"] = "出牌阶段限一次,你可以展示一名其他角色的一张手牌,然后你可以展示一张手牌,交换这两张牌"..
+ "若其选择的点数小,其摸一张牌,你回复一点体力;"..
+ "若你选择的点数小,你摸两张牌",
+ ["joy__songsang"] = "送丧",
+ [":joy__songsang"] = "当其他角色死亡时,你可加1点体力上限并回复1点体力。",
+
+ ["#joy__guolun-card"] = "过论:你可以选择一张牌并交换双方的牌(对方点数为%arg)",
+
+}
+
+local caiwenji = General(extension, "joysp__caiwenji", "wei", 3, 3, General.Female)
+local chenqing = fk.CreateTriggerSkill{
+ name = "joy__chenqing",
+ anim_type = "support",
+ events = {fk.EnterDying},
+ can_trigger = function(self, event, target, player, data)
+ return player:hasSkill(self) and player:usedSkillTimes(self.name, Player.HistoryTurn) == 0 and
+ not table.every(player.room.alive_players, function (p)
+ return p == player or p == target
+ end)
+ end,
+ on_cost = function(self, event, target, player, data)
+ local room = player.room
+ local targets = {}
+ for _, p in ipairs(room.alive_players) do
+ if p ~= target then
+ table.insert(targets, p.id)
+ end
+ end
+ if #targets == 0 then return end
+ local to = room:askForChoosePlayers(player, targets, 1, 1, "#joy__chenqing-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)
+ to:drawCards(5, self.name)
+ local cards = room:askForDiscard(to, 4, 4, true, self.name, false, ".", "#joy__chenqing-discard", true)
+ local suits = {}
+ for _, id in ipairs(cards) do
+ if Fk:getCardById(id).suit ~= Card.NoSuit then
+ table.insertIfNeed(suits, Fk:getCardById(id).suit)
+ end
+ end
+ room:throwCard(cards, self.name, to, to)
+ if #suits == 4 and not to.dead and not target.dead then
+ room:useVirtualCard("peach", nil, to, target, self.name)
+ end
+ end,
+}
+
+caiwenji:addSkill(chenqing)
+caiwenji:addSkill("mozhi")
+Fk:loadTranslationTable{
+ ["joysp__caiwenji"] = "蔡文姬",
+ ["#joysp__caiwenji"] = "金璧之才",
+ ["joy__chenqing"] = "陈情",
+ [":joy__chenqing"] = "每回合限一次,当一名角色进入濒死状态时,你可以令另一名角色摸五张牌,然后弃置四张牌,"..
+ "若其以此法弃置的四张牌的花色各不相同,则其视为对濒死状态的角色使用一张【桃】。",
+ ["#joy__chenqing-choose"] = "陈情:令一名角色摸五张牌然后弃四张牌,若花色各不相同视为对濒死角色使用【桃】",
+ ["#joy__chenqing-discard"] = "陈情:需弃置四张牌,若花色各不相同则视为对濒死角色使用【桃】",
+}
return extension
diff --git a/joy_ty.lua b/joy_ty.lua
index 4deec3392af25fcc001aaaca6537441f03c35615..05c407cb8108d3b97ce5f9ffff9490ba71575aa4 100644
--- a/joy_ty.lua
+++ b/joy_ty.lua
@@ -263,8 +263,625 @@ Fk:loadTranslationTable{
+local joy__guansuo = General(extension, "joy__guansuo", "shu", 4)
+local joy__zhengnan = fk.CreateTriggerSkill{
+ name = "joy__zhengnan",
+ anim_type = "drawcard",
+ events = {fk.EnterDying},
+ can_trigger = function(self, event, target, player, data)
+ return player:hasSkill(self) and (player:getMark(self.name) == 0 or not table.contains(player:getMark(self.name), target.id))
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local mark = player:getMark(self.name)
+ local n = 0
+ if target == player and player:hasSkill(self) then
+ n = 1
+ end
+ if mark == 0 then mark = {} end
+ table.insert(mark, target.id)
+ room:setPlayerMark(player, self.name, mark)
+ if player:isWounded() then
+ room:recover({
+ who = player,
+ num = 1+n,
+ recoverBy = player,
+ skillName = self.name
+ })
+ end
+ local choices = {"joy__wusheng", "joyex__dangxian", "ty_ex__zhiman"}
+ for i = 3, 1, -1 do
+ if player:hasSkill(choices[i], true) then
+ table.removeOne(choices, choices[i])
+ end
+ end
+ if #choices > 0 then
+ player:drawCards(1+n, self.name)
+ local choice = room:askForChoice(player, choices, self.name, "#joy__zhengnan-choice", true)
+ room:handleAddLoseSkills(player, choice, nil)
+ else
+ player:drawCards(3+n, self.name)
+ end
+ end,
+}
+local joy__xiefang = fk.CreateDistanceSkill{
+ name = "joy__xiefang",
+ correct_func = function(self, from, to)
+ if from:hasSkill(self) then
+ local n = 0
+ for _, p in ipairs(Fk:currentRoom().alive_players) do
+ if p.gender == General.Female then
+ n = n + 1
+ end
+ end
+ local m = math.max(n,1)
+ return -m
+ end
+ return 0
+ end,
+}
+local joy__xiefang_maxcards = fk.CreateMaxCardsSkill{
+ name = "#joy__xiefang_maxcards",
+ correct_func = function(self, player)
+ if player:hasSkill(self) then
+ local n = 0
+ for _, p in ipairs(Fk:currentRoom().alive_players) do
+ if p.gender == General.Female then
+ n = n + 1
+ end
+ end
+ local m = math.max(n,1)
+ return m
+ end
+ return 0
+ end,
+}
+
+
+local joy__wusheng = fk.CreateTriggerSkill{
+ name = "joy__wusheng",
+ anim_type = "offensive",
+ pattern = "slash",
+ events = {fk.TurnStart, fk.AfterCardUseDeclared},
+ can_trigger = function(self, event, target, player, data)
+ if target == player and player:hasSkill(self) then
+ return (event == fk.TurnStart) or (data.card.trueName == "slash" and data.card.color == Card.Red)
+ end
+ end,
+ on_cost = Util.TrueFunc,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ if event == fk.TurnStart then
+ room:notifySkillInvoked(player, "joy__wusheng", "drawcard")
+ local ids = room:getCardsFromPileByRule("slash|.|heart,diamond", 1, "allPiles")
+ if #ids > 0 then
+ room:obtainCard(player, ids[1], false, fk.ReasonPrey)
+ end
+ else
+ room:notifySkillInvoked(player, "joy__wusheng", "offensive")
+ data.additionalDamage = (data.additionalDamage or 0) + 1
+ end
+ end,
+}
+joy__xiefang:addRelatedSkill(joy__xiefang_maxcards)
+joy__guansuo:addSkill(joy__zhengnan)
+joy__guansuo:addSkill(joy__xiefang)
+joy__guansuo:addRelatedSkill(joy__wusheng)
+joy__guansuo:addRelatedSkill("joyex__dangxian")
+joy__guansuo:addRelatedSkill("ty_ex__zhiman")
+Fk:loadTranslationTable{
+ ["joy__guansuo"] = "关索",
+ ["#joy__guansuo"] = "倜傥孑侠",
+
+ ["joy__zhengnan"] = "征南",
+ [":joy__zhengnan"] = "每名角色限一次,当一名角色进入濒死状态时,你可以回复1点体力,然后摸一张牌并选择获得下列技能中的一个:"..
+ "〖武圣〗,〖当先〗和〖制蛮〗(若技能均已获得,则改为摸三张牌),若自己濒死,则回复体力数和摸牌数+1。",
+ ["joy__xiefang"] = "撷芳",
+ [":joy__xiefang"] = "锁定技,你计算与其他角色的距离-X,你的手牌上限+X(X为全场女性角色数且至少为1)。",
+ ["#joy__zhengnan-choice"] = "征南:选择获得的技能",
+ ["joy__wusheng"] = "武圣",
+ [":joy__wusheng"] = "回合开始时,你获得一张红色【杀】,你的红色【杀】伤害+1。",
+
+ ["$joy__wusheng_joy__guansuo"] = "我敬佩你的勇气。",
+ ["$joyex__dangxian_joy__guansuo"] = "时时居先,方可快人一步。",
+ ["$ty_ex__zhiman_joy__guansuo"] = "败军之将,自当纳贡!",
+}
+
+local joy__zhaoxiang = General(extension, "joy__zhaoxiang", "shu", 4, 4, General.Female)
+local joy__fuhan = fk.CreateTriggerSkill{
+ name = "joy__fuhan",
+ events = {fk.TurnStart},
+ frequency = Skill.Limited,
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self) and player:getMark("@meiying") > 0 and
+ player:usedSkillTimes(self.name, Player.HistoryGame) == 0
+ end,
+ on_cost = function(self, event, target, player, data)
+ return player.room:askForSkillInvoke(player, self.name, nil, "#joy__fuhan-invoke")
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local n = player:getMark("@meiying")
+ room:setPlayerMark(player, "@meiying", 0)
+ player:drawCards(n, self.name)
+ if player.dead then return end
+
+ local generals, same_g = {}, {}
+ for _, general_name in ipairs(room.general_pile) do
+ same_g = Fk:getSameGenerals(general_name)
+ table.insert(same_g, general_name)
+ same_g = table.filter(same_g, function (g_name)
+ local general = Fk.generals[g_name]
+ return (general.kingdom == "shu" or general.subkingdom == "shu") and general.package.extensionName == "joym"
+ end)
+ if #same_g > 0 then
+ table.insert(generals, table.random(same_g))
+ end
+ end
+ if #generals == 0 then return false end
+ generals = table.random(generals, math.max(4, #room.alive_players))
+
+ local skills = {}
+ local choices = {}
+ for _, general_name in ipairs(generals) do
+ local general = Fk.generals[general_name]
+ local g_skills = {}
+ for _, skill in ipairs(general.skills) do
+ if not (table.contains({Skill.Limited, Skill.Wake, Skill.Quest}, skill.frequency) or skill.lordSkill) and
+ (#skill.attachedKingdom == 0 or (table.contains(skill.attachedKingdom, "shu") and player.kingdom == "shu")) 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.Limited, Skill.Wake, Skill.Quest}, skill.frequency) or skill.lordSkill) and
+ (#skill.attachedKingdom == 0 or (table.contains(skill.attachedKingdom, "shu") and player.kingdom == "shu")) then
+ table.insertIfNeed(g_skills, skill.name)
+ end
+ end
+ table.insertIfNeed(skills, g_skills)
+ if #choices == 0 and #g_skills > 0 then
+ choices = {g_skills[1]}
+ end
+ end
+ if #choices > 0 then
+ local result = player.room:askForCustomDialog(player, self.name,
+ "packages/tenyear/qml/ChooseGeneralSkillsBox.qml", {
+ generals, skills, 1, 2, "#joy__fuhan-choice", false
+ })
+ if result ~= "" then
+ choices = json.decode(result)
+ end
+ room:handleAddLoseSkills(player, table.concat(choices, "|"), nil)
+ end
+
+ if not player.dead and player:isWounded() and
+ table.every(room.alive_players, function(p) return p.hp >= player.hp end) then
+ room:recover({
+ who = player,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name
+ })
+ end
+ end,
+}
+joy__zhaoxiang:addSkill("ty__fanghun")
+joy__zhaoxiang:addSkill(joy__fuhan)
+Fk:loadTranslationTable{
+ ["joy__zhaoxiang"] = "赵襄",
+ ["#joy__zhaoxiang"] = "拾梅鹊影",
+ ["joy__fuhan"] = "扶汉",
+ [":joy__fuhan"] = "限定技,回合开始时,若你有“梅影”标记,你可以移去所有“梅影”标记并摸等量的牌,然后从X张(X为存活人数且至少为4)蜀势力"..
+ "武将牌中选择并获得至多两个技能(限定技、觉醒技、主公技除外)。若此时你是体力值最低的角色,你回复1点体力。"..
+ '
(村:欢杀包特色,只会获得欢杀池内武将的技能)',
+ ["#joy__fuhan-invoke"] = "扶汉:你可以移去“梅影”标记,获得两个蜀势力武将的技能!",
+ ["#joy__fuhan-choice"] = "扶汉:选择你要获得的至多2个技能",
+}
+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
+ room:changeHero(to, "joy__guansuo", false, false, true)
+ end
+ if not to.dead then
+ to:drawCards(3, self.name)
+ 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"] = "你可以在以下时机弃置相应的标记来发动以下效果:
"..
+ "当一张判定牌生效前,你可以弃置“紫微”,然后将判定结果改为♠5或♥5;
"..
+ "当你于回合外需要使用【桃】时,你可以弃置“后土”,然后将你的一张手牌当【桃】使用;
"..
+ "当你对其他角色造成伤害时,你可以弃置“玉清”,此伤害+1;
"..
+ "当你受到伤害后,你可以弃置“勾陈”,然后你从牌堆中随机获得三种类型的牌各一张。",
+ ["joy__dianhua"] = "点化",
+ [":joy__dianhua"] = "准备阶段或结束阶段,你可以观看牌堆顶的X张牌(X为你的标记数+1)。若如此做,你将这些牌以任意顺序放回牌堆顶。",
+
+ ["#joy__zhenyi1"] = "真仪:你可以弃置♠紫微,将 %dest 的判定结果改为♠5或♥5",
+ ["#joy__zhenyi2"] = "真仪:你可以弃置♣后土,将一张手牌当【桃】使用",
+ ["#joy__zhenyi3"] = "真仪:你可以弃置♥玉清,对 %dest 造成的伤害+1",
+ ["#joy__zhenyi4"] = "真仪:你可以弃置♦勾陈,从牌堆中随机获得三种类型的牌各一张",
+ ["#joy__zhenyi_trigger"] = "真仪",
+ ["joy__zhenyi_spade"] = "将判定结果改为♠5",
+ ["joy__zhenyi_heart"] = "将判定结果改为♥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",
+
+}
return extension
diff --git a/joy_yj.lua b/joy_yj.lua
index d35dc9ddfbed11b828fc82c9db15eb65a78aa6a0..70f9de1b01feea85629a0c122667ad0edcaa4123 100644
--- a/joy_yj.lua
+++ b/joy_yj.lua
@@ -299,4 +299,268 @@ Fk:loadTranslationTable{
["#joy__kuangbi-draw"] = "匡弼:是否令 %dest 摸%arg张牌?",
["@@joy__kuangbi"] = "匡弼",
}
+
+local joy__guanping = General(extension, "joy__guanping", "shu", 4)
+local joy__longyin = fk.CreateTriggerSkill{
+ name = "joy__longyin",
+ anim_type = "support",
+ events = {fk.CardUsing},
+ can_trigger = function(self, event, target, player, data)
+ return player:hasSkill(self) and target.phase == Player.Play and data.card.trueName == "slash" and not player:isNude()
+ end,
+ on_cost = function(self, event, target, player, data)
+ local cards = player.room:askForDiscard(player, 1, 1, true, self.name, true, ".", "#joy__longyin-invoke::"..target.id, true)
+ if #cards > 0 then
+ self.cost_data = cards
+ return true
+ end
+ end,
+ on_use = function(self, event, target, player, data)
+ player.room:throwCard(self.cost_data, self.name, player, player)
+ if not data.extraUse then
+ data.extraUse = true
+ target:addCardUseHistory(data.card.trueName, -1)
+ end
+ if data.card.color == Card.Red and not player.dead then
+ player:drawCards(1, self.name)
+ end
+ if data.card.suit == Fk:getCardById(self.cost_data[1]).suit and player:usedSkillTimes("joy__jiezhong", Player.HistoryGame) > 0 then
+ player:setSkillUseHistory("joy__jiezhong", 0, Player.HistoryGame)
+ end
+ end,
+}
+local joy__jiezhong = fk.CreateTriggerSkill{
+ name = "joy__jiezhong",
+ anim_type = "drawcard",
+ frequency = Skill.Limited,
+ events = {fk.EventPhaseStart},
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self) and player.phase == Player.Play and
+ player.maxHp > player:getHandcardNum() and player:usedSkillTimes(self.name, Player.HistoryGame) == 0
+ end,
+ on_cost = function(self, event, target, player, data)
+ local draw = player.maxHp - player:getHandcardNum()
+ return player.room:askForSkillInvoke(player, self.name, nil, "#joy__jiezhong-invoke:::"..draw)
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local n = player.maxHp - player:getHandcardNum()
+ player:drawCards(n, self.name)
+ end,
+}
+joy__guanping:addSkill(joy__longyin)
+joy__guanping:addSkill(joy__jiezhong)
+Fk:loadTranslationTable{
+ ["joy__guanping"] = "关平",
+ ["#joy__guanping"] = "忠臣孝子",
+
+ ["joy__longyin"] = "龙吟",
+ [":joy__longyin"] = "每当一名角色在其出牌阶段使用【杀】时,你可以弃置一张牌令此【杀】不计入出牌阶段使用次数,若此【杀】为红色,你摸一张牌。"..
+ "若你以此法弃置的牌花色与此【杀】相同,你重置〖竭忠〗。",
+ ["#joy__longyin-invoke"] = "龙吟:你可以弃置一张牌令 %dest 的【杀】不计入次数限制",
+ ["joy__jiezhong"] = "竭忠",
+ [":joy__jiezhong"] = "限定技,出牌阶段开始时,若你的手牌数小于体力上限,你可以将手牌补至体力上限。",
+ ["#joy__jiezhong-invoke"] = "竭忠:是否发动“竭忠”摸%arg张牌? ",
+
+}
+
+local joy__xushu = General(extension, "joy__xushu", "shu", 3)
+local joy__jujian = fk.CreateTriggerSkill{
+ name = "joy__jujian",
+ 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.Finish or player.phase == Player.Start)and not player:isNude()
+ end,
+ on_cost = function(self, event, target, player, data)
+ local room = player.room
+ local tos, id = player.room:askForChooseCardAndPlayers(player, table.map(room.alive_players, Util.IdMapper), 1, 1, ".|.|.|.|.|^basic", "#joy__jujian-choose", self.name, true)
+ if #tos > 0 then
+ self.cost_data = {tos[1], id}
+ return true
+ end
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local to = room:getPlayerById(self.cost_data[1])
+ room:throwCard({self.cost_data[2]}, self.name, player, player)
+ local choices = {"draw2"}
+ if to:isWounded() then
+ table.insert(choices, "recover")
+ end
+ if not to.faceup or to.chained then
+ table.insert(choices, "joy__jujian_reset")
+ end
+ local choice = room:askForChoice(to, choices, self.name, nil, false, {"draw2", "recover", "joy__jujian_reset"})
+ if choice == "draw2" then
+ to:drawCards(2, self.name)
+ elseif choice == "recover" then
+ room:recover({
+ who = to,
+ num = 1,
+ recoverBy = player,
+ skillName = self.name
+ })
+ else
+ to:reset()
+ end
+ end,
+}
+joy__xushu:addSkill("wuyan")
+joy__xushu:addSkill(joy__jujian)
+Fk:loadTranslationTable{
+ ["joy__xushu"] = "徐庶",
+ ["#joy__xushu"] = "忠孝的侠士",
+
+ ["joy__jujian"] = "举荐",
+ [":joy__jujian"] = "准备或结束阶段,你可以弃置一张非基本牌,令一名角色选择一项:摸两张牌;回复1点体力;复原武将牌。",
+ ["#joy__jujian-choose"] = "举荐:你可以弃置一张非基本牌,令一名角色选择摸俩张牌/回复体力/复原武将牌",
+ ["joy__jujian_reset"] = "复原武将牌",
+
+}
+
+local joyex__liaohua = General(extension, "joyex__liaohua", "shu", 4)
+local joyex__dangxian = fk.CreateTriggerSkill{
+ name = "joyex__dangxian",
+ anim_type = "offensive",
+ events = {fk.TurnStart},
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self)
+ end,
+ on_use = function(self, event, target, player, data)
+ local cards = player.room:getCardsFromPileByRule("slash", 1)
+ if #cards > 0 then
+ player.room:obtainCard(player, cards[1], true, fk.ReasonJustMove)
+ end
+ player:gainAnExtraPhase(Player.Play)
+ end,
+}
+local joyex__fuli = fk.CreateTriggerSkill{
+ name = "joyex__fuli",
+ anim_type = "defensive",
+ frequency = Skill.Limited,
+ events = {fk.AskForPeaches},
+ 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:setPlayerMark(player, self.name, 1)
+ local kingdoms = {}
+ for _, p in ipairs(room:getAlivePlayers()) do
+ table.insertIfNeed(kingdoms, p.kingdom)
+ end
+ room:recover({
+ who = player,
+ num = math.min(#kingdoms, player.maxHp) - player.hp,
+ recoverBy = player,
+ skillName = self.name
+ })
+ if player:getHandcardNum() < #kingdoms and not player.dead then
+ player:drawCards(#kingdoms - player:getHandcardNum())
+ end
+ if #kingdoms > 3 and not player.dead then
+ player:turnOver()
+ end
+ end,
+}
+joyex__liaohua:addSkill(joyex__dangxian)
+joyex__liaohua:addSkill(joyex__fuli)
+Fk:loadTranslationTable{
+ ["joyex__liaohua"] = "界廖化",
+ ["#joyex__liaohua"] = "历尽沧桑",
+
+ ["joyex__dangxian"] = "当先",
+ [":joyex__dangxian"] = "回合开始时你进行一个额外的出牌阶段并摸一张【杀】。",
+ ["joyex__fuli"] = "伏枥",
+ [":joyex__fuli"] = "限定技,当你处于濒死状态时,你可以将体力回复至X点且手牌摸至X张(X为全场势力数)"..
+ "若X大于3,你翻面。",
+
+}
+
+local caoxiu = General(extension, "joy__caoxiu", "wei", 4)
+local joy__qingxi = fk.CreateTriggerSkill{
+ name = "joy__qingxi",
+ events = {fk.TargetSpecified},
+ anim_type = "offensive",
+ can_trigger = function(self, event, target, player, data)
+ return target == player and player:hasSkill(self) and (data.card.trueName == "slash" or data.card.trueName == "duel")
+ end,
+ on_cost = function(self, event, target, player, data)
+ local room = player.room
+ local n = 0
+ for _, p in ipairs(room.alive_players) do
+ if player:inMyAttackRange(p) then
+ n = n + 1
+ end
+ end
+ local max_num = #player:getEquipments(Card.SubtypeWeapon) > 0 and 4 or 2
+ n = math.min(n, max_num)
+ if player.room:askForSkillInvoke(player, self.name, data, "#joy__qingxi::" .. data.to..":"..n) then
+ self.cost_data = n
+ return true
+ end
+ end,
+ on_use = function(self, event, target, player, data)
+ local room = player.room
+ local to = room:getPlayerById(data.to)
+ local num = self.cost_data
+ if #room:askForDiscard(to, num, num, false, self.name, true, ".", "#joy__qingxi-discard:::"..num) == num then
+ local weapon = player:getEquipments(Card.SubtypeWeapon)
+ if #weapon > 0 then
+ room:throwCard(weapon, self.name, player, to)
+ end
+ else
+ data.extra_data = data.extra_data or {}
+ data.extra_data.ty_ex__qingxi = data.to
+ local judge = {
+ who = player,
+ reason = self.name,
+ pattern = ".|.|club,spade,heart,diamond",
+ }
+ room:judge(judge)
+ if judge.card.color == Card.Red then
+ data.disresponsive = true
+ elseif judge.card.color == Card.Black and not player.dead then
+ player:drawCards(2,self.name)
+ end
+ end
+ end,
+}
+local joy__qingxi_delay = fk.CreateTriggerSkill{
+ name = "#joy__qingxi_delay",
+ events = {fk.DamageCaused},
+ mute = true,
+ can_trigger = function(self, event, target, player, data)
+ if target == player then
+ local e = player.room.logic:getCurrentEvent():findParent(GameEvent.CardEffect)
+ if e then
+ local use = e.data[1]
+ if use.extra_data and use.extra_data.ty_ex__qingxi == data.to.id then
+ return true
+ end
+ end
+ end
+ end,
+ on_cost = Util.TrueFunc,
+ on_use = function(self, event, target, player, data)
+ data.damage = data.damage + 1
+ end,
+}
+joy__qingxi:addRelatedSkill(joy__qingxi_delay)
+caoxiu:addSkill("qianju")
+caoxiu:addSkill(joy__qingxi)
+Fk:loadTranslationTable{
+ ["joy__caoxiu"] = "界曹休",
+ ["#joy__caoxiu"] = "千里骐骥",
+
+ ["joy__qingxi"] = "倾袭",
+ [":joy__qingxi"] = "当你使用【杀】或【决斗】指定一名角色为目标后,你可以令其选择一项:"..
+ "1.弃置等同于你攻击范围内的角色数张手牌(至多为2,若你武器区里有武器牌则改为至多为4),然后弃置你装备区里的武器牌;"..
+ "2.令此牌对其造成的基础伤害值+1且你进行一次判定,若结果为红色,该角色不能响应此牌;若结果为黑色,你摸两张牌",
+ ["#joy__qingxi"] = "倾袭:可令 %dest 选一项:1.弃 %arg 张手牌并弃置你的武器;2.伤害+1且你判定,为红不能响应,为黑摸两张牌",
+ ["#joy__qingxi-discard"] = "倾袭:你需弃置 %arg 张手牌,否则伤害+1且其判定,结果为红你不能响应,结果为黑其摸两张牌",
+
+}
+
return extension