diff --git a/image/generals/rfenghou__liuyong.jpg b/image/generals/rfenghou__liuyong.jpg new file mode 100644 index 0000000000000000000000000000000000000000..87dcfadf1e721739f4af28503d6a288251d52cb7 Binary files /dev/null and b/image/generals/rfenghou__liuyong.jpg differ diff --git a/image/generals/rfenghou__yanfuren.jpg b/image/generals/rfenghou__yanfuren.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3d0a8150b826c9313c9e3a19e8c8e15985233293 Binary files /dev/null and b/image/generals/rfenghou__yanfuren.jpg differ diff --git a/rfenghou_han.lua b/rfenghou_han.lua index 414d82f2a5b5a511322c84bd1c30c3ef829018ff..a5fd53bfc9895816959c027ee5b6e1183248e260 100644 --- a/rfenghou_han.lua +++ b/rfenghou_han.lua @@ -1818,5 +1818,292 @@ Fk:loadTranslationTable{ ["#rfenghou__yanyu-card"] = "燕语:请重铸一张牌,若点数小于 %arg 令对方继续重铸!", } +local liuyong = General(extension, "rfenghou__liuyong", "han", 3) +local zhuning = fk.CreateActiveSkill{ + name = "rfenghou__zhuning", + anim_type = "support", + min_card_num = 1, + target_num = 1, + prompt = "#zhuning", + can_use = function(self, player) + if not player:isNude() then + if player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 then + return true + elseif player:usedSkillTimes(self.name, Player.HistoryPhase) == 1 then + return player:getMark("zhuning-phase") > 0 + end + end + end, + card_filter = Util.TrueFunc, + target_filter = function(self, to_select, selected) + return #selected == 0 and to_select ~= Self.id + end, + on_use = function(self, room, effect) + local player = room:getPlayerById(effect.from) + local target = room:getPlayerById(effect.tos[1]) + room:moveCardTo(effect.cards, Card.PlayerHand, target, fk.ReasonGive, self.name, "", false, player.id, "@@zhuning-inhand") + if not player.dead then + local cards = table.filter(U.getUniversalCards(room, "bt", false), function (id) + return Fk:getCardById(id).is_damage_card + end) + local use = U.askForUseRealCard(room, player, cards, nil, self.name, "#zhuning-use", + {expand_pile = cards, bypass_times = true}, true, true) + if use then + local use = { + card = Fk:cloneCard(use.card.name), + from = player.id, + tos = use.tos, + extraUse = true, + } + use.card.skillName = self.name + room:useCard(use) + if not player.dead and not use.damageDealt then + room:setPlayerMark(player, "zhuning-phase", 1) + end + end + end + end, +} +local function getFengxiangPlayer(room) + local nums = table.map(room.alive_players, function(p) + return #table.filter(p:getCardIds("h"), function(id) + return Fk:getCardById(id, true):getMark("@@zhuning-inhand") > 0 + end) + end) + local n = math.max(table.unpack(nums)) + if #table.filter(room.alive_players, function(p) + return #table.filter(p:getCardIds("h"), function(id) + return Fk:getCardById(id, true):getMark("@@zhuning-inhand") > 0 + end) == n + end) > 1 then + return 0 + else + return room.alive_players[table.indexOf(nums, n)].id + end +end +local fengxiang = fk.CreateTriggerSkill{ + name = "rfenghou__fengxiang", + anim_type = "support", + frequency = Skill.Compulsory, + events = {fk.Damaged, fk.AfterCardsMove}, + can_trigger = function(self, event, target, player, data) + if player:hasSkill(self) then + if event == fk.Damaged then + return target == player + else + local to = getFengxiangPlayer(player.room) + for _, move in ipairs(data) do + if move.extra_data and move.extra_data.fengxiang and move.extra_data.fengxiang ~= to then + return true + end + end + end + end + end, + on_use = function(self, event, target, player, data) + local room = player.room + if event == fk.Damaged then + local to = getFengxiangPlayer(room) + if to ~= 0 then + room:doIndicate(player.id, {to}) + to = room:getPlayerById(to) + if to:isWounded() then + room:recover({ + who = to, + num = 1, + recoverBy = player, + skillName = self.name + }) + end + else + player:drawCards(1, self.name) + end + else + player:drawCards(1, self.name) + end + end, + + refresh_events = {fk.BeforeCardsMove}, + can_refresh = function(self, event, target, player, data) + if player:hasSkill(self, true) then + for _, move in ipairs(data) do + for _, info in ipairs(move.moveInfo) do + if info.fromArea == Card.PlayerHand then + return true + end + end + if move.toArea == Card.PlayerHand then + return true + end + end + end + end, + on_refresh = function(self, event, target, player, data) + for _, move in ipairs(data) do + move.extra_data = move.extra_data or {} + move.extra_data.fengxiang = getFengxiangPlayer(player.room) + end + end, +} +liuyong:addSkill(zhuning) +liuyong:addSkill(fengxiang) +Fk:loadTranslationTable{ + ["rfenghou__liuyong"] = "刘永", + ["#rfenghou__liuyong"] = "甘陵王", + ["designer:rfenghou__liuyong"] = "笔枔", + ["illustrator:rfenghou__liuyong"] = "黯荧岛工作室", + + ["rfenghou__zhuning"] = "诛佞", + [":rfenghou__zhuning"] = "出牌阶段限一次,你可以交给一名其他角色任意张牌,这些牌标记为“隙”,然后你可以视为使用一张不计次数的【杀】或伤害类锦囊牌,".. + "然后若此牌没有造成伤害,此技能本阶段改为“出牌阶段限两次”。", + ["rfenghou__fengxiang"] = "封乡", + [":rfenghou__fengxiang"] = "锁定技,当你受到伤害后,手牌中“隙”唯一最多的角色回复1点体力(没有唯一最多的角色则改为你摸一张牌);".. + "当有角色因手牌数改变而使“隙”唯一最多的角色改变后,你摸一张牌。", + ["@@zhuning-inhand"] = "隙", + ["#zhuning"] = "诛佞:交给一名角色任意张牌(标记为“隙”),然后视为使用一张伤害牌", + ["#zhuning-use"] = "诛佞:你可以视为使用一张不计次数的伤害牌", + + ["$zhuning1"] = "此剑半丈,当斩奸佞人头!", + ["$zhuning2"] = "此身八尺,甘为柱国之石。", + ["$fengxiang1"] = "北风摧蜀地,王爵换乡侯。", + ["$fengxiang2"] = "汉皇可负我,我不负父兄。", + ["~liuyong"] = "他日若是凛风起,你自长哭我自笑。", +} + +local yanfuren = General(extension, "rfenghou__yanfuren", "han", 3, 3, General.Female) +local channi_viewas = fk.CreateViewAsSkill{ + name = "rfenghou__channi_viewas", + anim_type = "offensive", + pattern = "duel", + card_filter = function(self, to_select, selected) + return Fk:currentRoom():getCardArea(to_select) ~= Player.Equip and #selected < Self:getMark("rfenghou__channi") + end, + view_as = function(self, cards) + if #cards == 0 then return end + local card = Fk:cloneCard("duel") + card:addSubcards(cards) + card.skillName = "rfenghou__channi_viewas" + return card + end, +} +local channi = fk.CreateActiveSkill{ + name = "rfenghou__channi", + anim_type = "support", + prompt = "#rfenghou__channi-active", + min_card_num = 1, + target_num = 1, + can_use = function(self, player) + return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 + end, + card_filter = function(self, to_select, selected) + return Fk:currentRoom():getCardArea(to_select) ~= Card.PlayerEquip + end, + target_filter = function(self, to_select, selected) + return #selected == 0 and to_select ~= Self.id + end, + on_use = function(self, room, effect) + local player = room:getPlayerById(effect.from) + local target = room:getPlayerById(effect.tos[1]) + local n = #effect.cards + room:moveCardTo(effect.cards, Player.Hand, target, fk.ReasonGive, self.name, nil, false, player.id) + room:setPlayerMark(target, self.name, n) + local success, data = room:askForUseActiveSkill(target, "rfenghou__channi_viewas", "#rfenghou__channi-invoke:"..player.id.."::"..n, true, {}, false) + room:setPlayerMark(target, self.name, 0) + if success then + local card = Fk:cloneCard("duel") + card.skillName = self.name + card:addSubcards(data.cards) + local use = { + from = target.id, + tos = table.map(data.targets, function(id) return {id} end), + card = card, + extra_data = {channi_data = {player.id, target.id, #data.cards}} + } + room:useCard(use) + end + end, +} +local channi_delay = fk.CreateTriggerSkill{ + name = "#rfenghou__channi_delay", + events = {fk.Damage, fk.Damaged}, + mute = true, + can_trigger = function(self, event, target, player, data) + if not player.dead and target and not target.dead and data.card and not data.chain and + table.contains(data.card.skillNames, channi.name) then + local room = player.room + local card_event = room.logic:getCurrentEvent():findParent(GameEvent.UseCard) + if not card_event then return false end + local use = card_event.data[1] + if use.extra_data then + local channi_data = use.extra_data.channi_data + if channi_data and channi_data[1] == player.id and channi_data[2] == target.id then + self.cost_data = channi_data[3] + return true + end + end + end + end, + on_cost = Util.TrueFunc, + on_use = function(self, event, target, player, data) + local room = player.room + if event == fk.Damage then + room:notifySkillInvoked(player, channi.name, "drawcard") + room:doIndicate(player.id, {target.id}) + room:drawCards(target, self.cost_data, channi.name) + else + room:notifySkillInvoked(player, channi.name, "negative") + local n = player:getHandcardNum() + room:askForDiscard(player, n, n, false, channi.name, false) + end + end +} + +local nifu = fk.CreateTriggerSkill{ + name = "rfenghou__nifu", + anim_type = "drawcard", + frequency = Skill.Compulsory, + events = {fk.EventPhaseStart}, + mute = true, + can_trigger = function(self, event, target, player, data) + return player:hasSkill(self) and target.phase == Player.Finish and player:getHandcardNum() ~= 3 + end, + on_use = function(self, event, target, player, data) + player:broadcastSkillInvoke(self.name) + local room = player.room + local n = player:getHandcardNum() - 3 + if n < 0 then + room:notifySkillInvoked(player, self.name, "drawcard") + player:drawCards(-n, self.name) + else + room:notifySkillInvoked(player, self.name, "negative") + room:askForDiscard(player, n, n, false, self.name, false) + end + end, +} +Fk:addSkill(channi_viewas) +channi:addRelatedSkill(channi_delay) +yanfuren:addSkill(channi) +yanfuren:addSkill(nifu) +Fk:loadTranslationTable{ + ["rfenghou__yanfuren"] = "严夫人", + ["#rfenghou__yanfuren"] = "霜天薄裳", + ["illustrator:rfenghou__yanfuren"] = "君桓文化", + ["rfenghou__channi"] = "谗逆", + [":rfenghou__channi"] = "出牌阶段限一次,你可以交给一名其他角色任意张手牌,然后该角色可以将X张手牌当一张【决斗】使用(X至多为你以此法交给其的牌数)。".. + "其因此使用【决斗】造成伤害后,其摸X张牌;其因此使用【决斗】受到伤害后,你弃置所有手牌。", + ["rfenghou__nifu"] = "匿伏", + [":rfenghou__nifu"] = "锁定技,一名角色的结束阶段,你将手牌摸至或弃置至三张。", + ["rfenghou__channi_viewas"] = "谗逆", + ["#rfenghou__channi_delay"] = "谗逆", + ["#rfenghou__channi-active"] = "发动 谗逆,将任意数量的手牌交给一名角色", + ["#rfenghou__channi-invoke"] = "谗逆:你可以将至多%arg张手牌当一张【决斗】使用
若对目标造成伤害你摸等量牌,若你受到伤害则 %src 弃置所有手牌", + + ["$rfenghou__channi1"] = "此人心怀叵测,将军当拔剑诛之!", + ["$rfenghou__channi2"] = "请夫君听妾身之言,勿为小人所误!", + ["$rfenghou__nifu1"] = "当为贤妻宜室,莫做妒妇祸家。", + ["$rfenghou__nifu2"] = "将军且往沙场驰骋,妾身自有苟全之法。", + ["~rfenghou__yanfuren"] = "妾身绝不会害将军呀!", +} + return extension