jianyu/jianyu.lua

1445 lines
61 KiB
Lua
Raw Normal View History

2023-12-04 10:53:55 +00:00
local extension = Package:new("jy_jianyu")
2023-12-01 11:29:51 +00:00
extension.extensionName = "jianyu"
Fk:loadTranslationTable {
["jy_jianyu"] = "<font color=\"red\"><strong>监狱</strong></font>",
2023-12-01 11:29:51 +00:00
["god"] = "神话再临·神",
["xjb"] = "",
["tym"] = "",
2023-12-04 10:53:55 +00:00
["skl"] = "",
2023-12-04 15:01:20 +00:00
["buffed"] = "加强",
2023-12-01 11:29:51 +00:00
}
2023-12-04 15:01:20 +00:00
-- 熊简自豪
local xjb__jianzihao = General(extension, "xjb__jianzihao", "qun", 3, 3, General.Male)
2023-12-01 11:29:51 +00:00
-- 红温
local jy_hongwen = fk.CreateFilterSkill{
name = "jy_hongwen",
2023-12-01 11:29:51 +00:00
card_filter = function(self, to_select, player)
2023-12-01 13:16:29 +00:00
return (to_select.suit == Card.Spade or to_select.suit == Card.Club) and player:hasSkill(self)
2023-12-01 11:29:51 +00:00
end,
view_as = function(self, to_select)
if to_select.suit == Card.Club then
return Fk:cloneCard(to_select.name, Card.Diamond, to_select.number)
2023-12-01 13:16:29 +00:00
else -- Spade
2023-12-01 11:29:51 +00:00
return Fk:cloneCard(to_select.name, Card.Heart, to_select.number)
end
end,
}
-- 走位
local jy_zouwei = fk.CreateDistanceSkill{
name = "jy_zouwei",
2023-12-01 11:29:51 +00:00
correct_func = function(self, from, to)
-- 有装备时视为-1
if from:hasSkill(self) and #from:getCardIds(Player.Equip) ~= 0 then
-- 请使用#from:getCardIds(Player.Equip)来代表长度,
-- 如果你只用from:getCardIds(Player.Equip)的话是代表这个数组
2023-12-01 11:29:51 +00:00
return -1
end
-- 没装备时视为+1
if to:hasSkill(self) and #to:getCardIds(Player.Equip) == 0 then
2023-12-01 11:29:51 +00:00
return 1
end
return 0
end,
}
-- TODO: 没写好之前先禁用
-- -- 参考自孙尚香formation君刘备
-- local jy_zouwei_audio = fk.CreateTriggerSkill{
-- name = "#jy_zouwei_audio",
-- refresh_events = {fk.AfterCardsMove},
-- -- 这个函数只有在装备区牌量变动时才检测
-- can_refresh = function(self, event, target, player, data)
-- if not player:hasSkill(self) then return end
-- for _, move in ipairs(data) do -- 对着抄的,开始第一个循环
-- if move.from == player.id or move.to == player.id then -- 这行对着抄的,判断是否是自己家
-- for _, info in ipairs(move.moveInfo) do -- 对着抄的,第二个循环
-- if info.fromArea == Card.PlayerEquip or info.toArea == Card.PlayerEquip then -- 对着抄的,在这里判断是去哪个区的
-- -- 不知道为啥用不了
-- if #player:getCardIds(Player.Equip) > 0 then -- 他进了你的装备区之后你的装备数量为1
-- print("检测到装备不等于0")
-- return true
-- end
-- -- 下面这个可以运行
-- if #player:getCardIds(Player.Equip) == 0 and info.fromArea == Card.PlayerEquip then -- 他出了你的装备区之后你的装备数量为0
-- return true
-- end
-- end
-- end
-- end
-- end
-- end,
-- on_refresh = function(self, event, target, player, data)
-- local room = player.room
-- -- 有装备时,-1马
-- if #player:getCardIds(player.Equip) > 0 then
-- room:notifySkillInvoked(player, "jy_zouwei", "offensive")
-- player:broadcastSkillInvoke("jy_zouwei", 1)
-- -- 无装备时,+1马
-- elseif #player:getCardIds(player.Equip) == 0 then
-- room:notifySkillInvoked(player, "jy_zouwei", "defensive")
-- player:broadcastSkillInvoke("jy_zouwei", 2)
-- end
-- end,
-- }
-- jy_zouwei:addRelatedSkill(jy_zouwei_audio)
2023-12-01 11:29:51 +00:00
2023-12-01 13:16:29 +00:00
-- 圣弩
-- 参考自formation包的君刘备
local jy_shengnu = fk.CreateTriggerSkill{
name = "jy_shengnu",
2023-12-01 13:16:29 +00:00
anim_type = 'drawcard',
events = {fk.AfterCardsMove},
-- frequency = Skill.Compulsory, -- 我觉得还是把这个关掉比较好,因为多个简自豪的时候会混乱。
2023-12-01 13:16:29 +00:00
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
for _, move in ipairs(data) do
if move.to ~= player.id and (move.toArea == Card.PlayerEquip or move.toArea == Card.DiscardPile) then
for _, info in ipairs(move.moveInfo) do
if Fk:getCardById(info.cardId).name == "crossbow" then
return true
end
end
end
end
end,
on_use = function(self, event, target, player, data)
local ids = {}
for _, move in ipairs(data) do
if move.to ~= player.id and (move.toArea == Card.PlayerEquip or move.toArea == Card.DiscardPile) then
for _, info in ipairs(move.moveInfo) do
if Fk:getCardById(info.cardId).name == "crossbow" then
table.insert(ids, info.cardId)
end
end
end
end
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(ids)
player.room:obtainCard(player, dummy, true, fk.ReasonPrey)
end,
}
2023-12-01 11:29:51 +00:00
-- 洗澡
local jy_xizao = fk.CreateTriggerSkill{
name = "jy_xizao",
2023-12-01 11:29:51 +00:00
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
if player.dead then return end
-- player:reset()
player:drawCards(3, self.name)
if player.dead or not player:isWounded() then return end
-- 将体力回复至1点
room:recover({
who = player,
num = math.min(1, player.maxHp) - player.hp,
recoverBy = player,
skillName = self.name,
})
player:turnOver()
end,
}
-- 开局
2023-12-01 14:39:43 +00:00
-- 参考forest包贾诩 刘备 god包神曹操
local jy_kaiju = fk.CreateTriggerSkill{
name = "jy_kaiju", -- jy_kaiju$是主公技
2023-12-01 14:39:43 +00:00
anim_type = "masochism",
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.Start
2023-12-01 14:39:43 +00:00
end,
on_use = function(self, event, target, player, data)
local room = player.room
for _, p in ipairs(room:getOtherPlayers(player, true)) do
if not p:isAllNude() and not player.dead then -- 如果我自己死了,那就不要继续了
-- local id = room:askForCardChosen(p, p, "he", "#jy_kaiju-choose")
-- 只能和
-- room:obtainCard(player, id, false, fk.ReasonPrey)
-- 一起用原因不明。下面这个实现方法也可以。测了一圈感觉是obtainCard的问题。
local id = room:askForCard(p, 1, 1, true, self.name, false, nil, "#jy_kaiju-choose")
room:moveCardTo(id, Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, false, nil)
2023-12-01 14:39:43 +00:00
room:useVirtualCard("slash", nil, p, player, self.name, true) -- 杀
end
end
end,
}
-- local id = room:askForCardChosen(player, p, "hej", self.name) -- 我选他一张牌
2023-12-01 14:39:43 +00:00
xjb__jianzihao:addSkill(jy_kaiju)
xjb__jianzihao:addSkill(jy_hongwen)
xjb__jianzihao:addSkill(jy_zouwei)
xjb__jianzihao:addSkill(jy_shengnu)
xjb__jianzihao:addSkill(jy_xizao)
-- xjb__jianzihao:addSkill(jy_zhuanhui)
2023-12-01 11:29:51 +00:00
Fk:loadTranslationTable{
["xjb__jianzihao"] = "简自豪",
2023-12-01 11:29:51 +00:00
["jy_kaiju"] = "开局",
2023-12-05 10:54:36 +00:00
[":jy_kaiju"] = [[使<br>
2023-12-04 15:01:20 +00:00
<font size="1"><i></i></font>]],
["$jy_kaiju1"] = "不是啊我炸一对鬼的时候我在打什么打一对10。一对10他四个9炸我我不输了吗",
["$jy_kaiju2"] = "怎么赢啊?你别瞎说啊!",
["$jy_kaiju3"] = "打这牌怎么打?兄弟们快教我,我看着头晕!",
["$jy_kaiju4"] = "好亏呀,我每一波都。",
["$jy_kaiju5"] = "被秀了,操。",
2023-12-07 03:59:07 +00:00
["$jy_kaiju6"] = "从未如此美妙的开局请为我欢呼为我喝喝彩OK",
["$jy_kaiju7"] = "如此美妙的开局,这是我近两天来第一次啊!",
["$jy_kaiju8"] = "Oh my God我要珍惜这段时光我要好好地将它珍惜",
["#jy_kaiju-choose"] = "交给简自豪一张牌,视为对他使用【杀】",
["jy_hongwen"] = "红温",
[":jy_hongwen"] = "锁定技,你的♠牌视为<font color='red'>♥</font>牌,你的♣牌视为<font color='red'>♦</font>牌。",
["$jy_hongwen1"] = "唉,不该出水银的。",
["$jy_hongwen2"] = "哎,兄弟我为什么不打四带两对儿啊,兄弟?",
["$jy_hongwen3"] = "好难受啊!",
["$jy_hongwen4"] = "操,可惜!",
["$jy_hongwen5"] = "那他咋想的呀?",
["jy_zouwei"] = "走位",
[":jy_zouwei"] = "锁定技,当你的装备区没有牌时,其他角色计算与你的距离时,始终+1当你的装备区有牌时你计算与其他角色的距离时始终-1。",
["$jy_zouwei1"] = "玩一下,不然我是不是一张牌没有出啊兄弟?",
["$jy_zouwei2"] = "完了呀!",
["jy_shengnu"] = "圣弩",
[":jy_shengnu"] = "当【诸葛连弩】移至弃牌堆或其他角色的装备区时,你可以获得此【诸葛连弩】。",
["$jy_shengnu1"] = "哎兄弟们我这个牌不能拆吧?",
["$jy_shengnu2"] = "补刀瞬间回来了!",
2023-12-07 03:59:07 +00:00
["$jy_shengnu3"] = "恶心我,我也恶心你啊,互恶心呗!",
["jy_xizao"] = "洗澡",
[":jy_xizao"] = "限定技当你处于濒死状态时你可以将体力恢复至1摸三张牌然后翻面。",
["$jy_xizao1"] = "呃啊啊啊啊啊啊啊!!",
["$jy_xizao2"] = "也不是稳赢吧,我觉得赢了!",
2023-12-07 03:59:07 +00:00
["$jy_xizao3"] = "真的我是真玩不了,这跟变态没关系,我好他妈的气!",
2023-12-01 11:29:51 +00:00
["~xjb__jianzihao"] = "好像又要倒下了……",
2023-12-01 11:29:51 +00:00
}
2023-12-02 09:49:17 +00:00
-- 第二代简自豪
local tym__jianzihao = General(extension, "tym__jianzihao", "qun", 3, 3, General.Male)
2023-12-02 09:49:17 +00:00
local jy_sanjian = fk.CreateTriggerSkill{
name = "jy_sanjian",
2023-12-02 16:23:02 +00:00
anim_type = "drawcard",
frequency = Skill.Compulsory,
events = {fk.EventPhaseStart}, -- 事件开始时
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) -- 如果是我这个角色如果是有这个技能的角色如果是出牌阶段如果这个角色的装备数是3
2023-12-03 08:04:13 +00:00
and player.phase == Player.Play and #player:getCardIds(Player.Equip) == 3
2023-12-02 16:23:02 +00:00
end,
on_use = function(self, event, target, player, data)
local room = player.room
2023-12-03 08:04:13 +00:00
room:useVirtualCard("analeptic", nil, player, player, self.name, false)
room:useVirtualCard("ex_nihilo", nil, player, player, self.name, false)
2023-12-02 16:23:02 +00:00
end,
}
local jy_kaiju_2 = fk.CreateActiveSkill{
name = "jy_kaiju_2",
2023-12-03 08:04:13 +00:00
anim_type = "offensive",
can_use = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
2023-12-02 16:23:02 +00:00
end,
2023-12-03 08:04:13 +00:00
card_filter = function(self, card)
return false
end,
card_num = 0,
target_filter = function(self, to_select, selected)
-- 判断目标是否有谦逊
local is_qianxun = false
for _, s in ipairs(Fk:currentRoom():getPlayerById(to_select).player_skills) do
if s.name == "qianxun" then
is_qianxun = true
2023-12-02 16:23:02 +00:00
end
end
2023-12-03 08:04:13 +00:00
-- 不会写这个,我想直接以顺手牵羊的形式判断能不能被顺
-- local player = Fk:currentRoom():getPlayerById(Self.id)
-- local snatch = Fk:cloneCard("snatch")
-- local is_qianxun = Fk:currentRoom():getPlayerById(to_select):isProhibited(player, snatch)
-- print(Fk:currentRoom():getPlayerById(to_select).general.name, " 的is_qianxun的值为 ", is_qianxun)
return to_select ~= Self.id and not is_qianxun and -- 如果目标不是自己,而且没有谦逊
not Fk:currentRoom():getPlayerById(to_select):isAllNude() -- 而且不是裸装。函数要用冒号
end,
min_target_num = 1,
on_use = function(self, room, use)
local player = room:getPlayerById(use.from)
for _, to in ipairs(use.tos) do
local p = room:getPlayerById(to)
if not player.dead then
room:useVirtualCard("snatch", nil, player, p, self.name, true) -- 顺
-- 顺手牵羊,但不能被无懈可击响应(那我为啥不直接顺?)
-- local snatch = Fk:cloneCard("snatch")
-- snatch.skillName = self.name
-- local new_use = { ---@type CardUseStruct
-- from = use.from, -- 应该是直接传id
-- tos = { { to } },
-- card = snatch,
-- prohibitedCardNames = { "nullification" },
-- }
-- room:useCard(new_use)
room:useVirtualCard("slash", nil, p, player, self.name, true) -- 杀
end
2023-12-03 08:04:13 +00:00
end
2023-12-02 16:23:02 +00:00
end,
}
2023-12-02 09:49:17 +00:00
local jy_xizao_2 = fk.CreateTriggerSkill{
name = "jy_xizao_2",
2023-12-02 16:23:02 +00:00
anim_type = "defensive",
frequency = Skill.Limited,
events = {fk.AskForPeaches},
can_trigger = function(self, event, target, player, data)
2023-12-03 08:04:13 +00:00
return target == player and player:hasSkill(self) and player.dying and
player:usedSkillTimes(self.name, Player.HistoryGame) == 0 and #player:getCardIds(Player.Equip) ~= 0
2023-12-02 16:23:02 +00:00
end,
on_use = function(self, event, target, player, data)
local room = player.room
if player.dead then return end
-- player:reset()
player:drawCards(3, self.name)
if player.dead or not player:isWounded() then return end
-- 将体力回复至3点
room:recover({
who = player,
num = math.min(1, player.maxHp) - player.hp,
recoverBy = player,
skillName = self.name,
})
2023-12-03 08:04:13 +00:00
equip_num = #player:getCardIds(Player.Equip)
player:throwAllCards("e")
player:drawCards(equip_num)
2023-12-02 16:23:02 +00:00
end,
}
2023-12-02 09:49:17 +00:00
tym__jianzihao:addSkill(jy_kaiju_2)
tym__jianzihao:addSkill(jy_sanjian)
2023-12-06 16:36:10 +00:00
tym__jianzihao:addSkill("hongyan") -- 这个技能要加风火林山包才能触发!
2023-12-04 15:01:20 +00:00
tym__jianzihao:addSkill("jy_zouwei")
2023-12-05 10:54:36 +00:00
tym__jianzihao:addSkill("jy_shengnu")
tym__jianzihao:addSkill(jy_xizao_2)
2023-12-02 09:49:17 +00:00
2023-12-02 16:23:02 +00:00
Fk:loadTranslationTable{
2023-12-04 15:01:20 +00:00
["tym__jianzihao"] = "界简自豪",
2023-12-02 16:23:02 +00:00
["jy_kaiju_2"] = "开局",
[":jy_kaiju_2"] = "出牌阶段限一次,你选择若干名角色。你对他们【顺手牵羊】,然后被他们【杀】。",
["$jy_kaiju_21"] = "不是啊我炸一对鬼的时候我在打什么打一对10。一对10他四个9炸我我不输了吗",
["$jy_kaiju_22"] = "怎么赢啊?你别瞎说啊!",
["$jy_kaiju_23"] = "打这牌怎么打?兄弟们快教我,我看着头晕!",
["$jy_kaiju_24"] = "好亏呀,我每一波都。",
["$jy_kaiju_25"] = "被秀了,操。",
2023-12-07 03:59:07 +00:00
["$jy_kaiju_26"] = "从未如此美妙的开局请为我欢呼为我喝喝彩OK",
["$jy_kaiju_27"] = "如此美妙的开局,这是我近两天来第一次啊!",
["$jy_kaiju_28"] = "Oh my God我要珍惜这段时光我要好好地将它珍惜",
["jy_sanjian"] = "三件",
2023-12-06 06:08:57 +00:00
[":jy_sanjian"] = [[3使<br>
2023-12-04 15:01:20 +00:00
<font size="1"><i></i></font>]],
["$jy_sanjian1"] = "也不是稳赢吧,我觉得赢了!",
2023-12-02 16:23:02 +00:00
["jy_xizao_2"] = "洗澡",
[":jy_xizao_2"] = "限定技当你处于濒死状态且装备区有牌时你可以弃掉所有装备区的牌、将体力恢复至1然后每以此法弃掉一张牌你摸一张牌。",
["$jy_xizao_21"] = "呃啊啊啊啊啊啊啊!!",
["$jy_xizao_22"] = "也不是稳赢吧,我觉得赢了!",
2023-12-07 03:59:07 +00:00
["$jy_xizao_23"] = "真的我是真玩不了,这跟变态没关系,我好他妈的气!",
2023-12-02 16:23:02 +00:00
["~tym__jianzihao"] = "好像又要倒下了……",
2023-12-02 16:23:02 +00:00
}
2023-12-02 09:49:17 +00:00
2023-12-04 15:01:20 +00:00
-- 尚李元浩
2023-12-04 10:53:55 +00:00
local skl__liyuanhao = General(extension, "skl__liyuanhao", "qun", 3, 3, General.Male)
-- 虎啸
-- 参考自铁骑,屯田,脑洞包明哲,克己(原来克己已经监视了使用和打出了,不用写那么复杂)
local jy_huxiao = fk.CreateTriggerSkill{
name = "jy_huxiao",
2023-12-04 10:53:55 +00:00
anim_type = "special",
events = {fk.CardResponding, fk.TargetSpecified}, -- 包括了使用和打出
2023-12-04 10:53:55 +00:00
-- frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and data.card.trueName == "slash" then
2023-12-04 14:31:31 +00:00
-- 使用是TS打出是CR
if event == fk.TargetSpecified or event == fk.CardResponding then
return target == player
end
2023-12-04 10:53:55 +00:00
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(room:getNCards(1))
player:addToPile("skl__liyuanhao_xiao", dummy, true, self.name)
end,
}
-- 啸酒
-- 注释里是为了测试改成无中生有。保留在这里以防你后面还需要测试。
local jy_huxiao_analeptic = fk.CreateViewAsSkill{
name = "jy_huxiao_analeptic",
2023-12-04 10:53:55 +00:00
anim_type = "defensive",
pattern = "analeptic",
-- pattern = "ex_nihilo",
2023-12-04 10:53:55 +00:00
expand_pile = "skl__liyuanhao_xiao",
card_filter = function(self, to_select, selected)
if #selected == 1 then return false end
local xiaos = Self:getPile("skl__liyuanhao_xiao")
if #xiaos == 0 then return false end
return Self:getPileNameOfId(to_select) == "skl__liyuanhao_xiao"
2023-12-04 10:53:55 +00:00
end,
view_as = function(self, cards)
if #cards ~= 1 then
return nil
end
local c = Fk:cloneCard("analeptic")
-- local c = Fk:cloneCard("ex_nihilo")
2023-12-04 10:53:55 +00:00
c.skillName = self.name
-- print("克隆的牌c的参数c.name ", c.name, " c.trueName ", c.trueName)
2023-12-04 10:53:55 +00:00
c:addSubcard(cards[1])
return c
end,
}
-- 啸闪
local jy_huxiao_jink = fk.CreateViewAsSkill{
name = "jy_huxiao_jink",
2023-12-04 10:53:55 +00:00
anim_type = "defensive",
pattern = "jink",
2023-12-04 10:53:55 +00:00
expand_pile = "skl__liyuanhao_xiao",
card_filter = function(self, to_select, selected)
if #selected == 1 then return false end
local xiaos = Self:getPile("skl__liyuanhao_xiao")
if #xiaos == 0 then return false end
return Self:getPileNameOfId(to_select) == "skl__liyuanhao_xiao"
2023-12-04 10:53:55 +00:00
end,
view_as = function(self, cards)
if #cards ~= 1 then
return nil
end
local c = Fk:cloneCard("jink")
2023-12-04 10:53:55 +00:00
c.skillName = self.name
c:addSubcard(cards[1])
return c
end,
}
-- 二段
-- 首先BeforeCardsMove判断一次是否有牌进/出你的特殊区,然后如果有,
-- 再在AfterCardsMove里判断是否这张牌是啸而且啸的数量变成了2。
-- 参考自周泰界周泰国战formation守成
local jy_erduanxiao = fk.CreateTriggerSkill{
name = "jy_erduanxiao",
anim_type = "negative",
2023-12-04 10:53:55 +00:00
events = {fk.BeforeCardsMove}, -- 理论上来说每次牌的移动只有同一个方向的
-- frequency = Skill.Compulsory,
2023-12-04 10:53:55 +00:00
mute = true,
-- can_trigger = function(self, event, target, player, data)
-- -- 只判断是否有牌进出了你的特殊区,而不判断它是否是啸(因为比较复杂,等确定有可能了之后再判断,节省资源)
2023-12-05 10:54:36 +00:00
-- if player:hasSkill(self) then -- 如果是有二段啸的角色
-- local xiaos = player:getPile("skl__liyuanhao_xiao")
-- player.is_xiao_changing = false -- 默认这次没有变化
-- if #xiaos == 1 or #xiaos == 3 then -- 如果啸是1或3
-- -- 1是可以触发的3不知道为啥触发不了。难道viewas不会移动牌吗
-- -- 我觉得有可能是这个原因。明天可以改成“用完牌之后”之类的。
-- if #xiaos == 3 then print("二段笑(一段)已经检测到#xiaos为", #xiaos) end
-- for _, move in ipairs(data) do -- 如果有一张牌是进入或者离开我的特殊区,那么这个函数可以触发
-- if (move.to == player.id and move.toArea == Card.PlayerSpecial) or
-- (move.from == player.id and move.fromArea == Card.PlayerSpecial) then
-- -- 去找一段代码,检测自己特殊区的牌离开的
-- print("二段笑(一段)已经检测有牌从特殊区变动", #xiaos)
-- -- 检测不到离开
-- if move.to == player.id and move.toArea == Card.PlayerSpecial then
-- print("二段笑(一段)已经检测有牌来到特殊区", #xiaos)
-- end
-- if move.from == player.id and move.fromArea == Card.PlayerSpecial then
-- print("二段笑(一段)已经检测有牌从特殊区离开", #xiaos)
-- end
-- return true
-- end
-- end
-- end
-- end
-- end,
-- -- 根据守成改的版本现在可以3-2了但是不能1-2
-- -- 我真的不知道为什么了。这样吧,把两个版本综合一下,写到下一个里面,这个就算完成了。以后再改。
-- can_trigger = function(self, event, target, player, data)
-- if not player:hasSkill(self) then return end -- 如果我自己没有这个技能,那就算了
-- local xiaos = player:getPile("skl__liyuanhao_xiao")
-- player.is_xiao_changing = false
-- for _, move in ipairs(data) do -- 第一层循环,不知道为啥
-- if move.from then -- 照着抄的,牌离开
-- print("有牌正打算离开")
-- if move.from == player.id then
-- print("有牌正打算从你家离开")
-- if #xiaos == 3 then
-- print("啸是3")
-- for _, info in ipairs(move.moveInfo) do -- 还有第二层循环。我自己的代码里没有第二层
-- if info.fromArea == Card.PlayerSpecial then
-- print("有牌正打算从你家特殊区离开")
-- return true
-- end
-- end
-- end
-- end
-- elseif move.to then -- 照着抄的,牌离开
-- print("有牌正打算来")
-- if move.to == player.id then
-- print("有牌正打算来你家")
-- if #xiaos == 1 then
-- print("啸是1")
-- for _, info in ipairs(move.moveInfo) do -- 还有第二层循环。我自己的代码里没有第二层
-- if info.toArea == Card.PlayerSpecial then
-- print("有牌正打算来你家特殊区")
-- return true
-- end
-- end
-- end
-- end
-- end
-- end
-- end, -- 每个参数的结尾都要逗号。can_trigger是一个参数
-- 测试通过。1-23-2都可以顺利触发。
-- 我猜想原因是1-2的时候可能有多张牌进出而3-2的时候只会有一张牌出去。但我搞不懂这个数据结构
-- 不知道为什么有一个是两层循环,有一个是一层循环。
2023-12-04 10:53:55 +00:00
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return end -- 如果我自己没有这个技能,那就算了
2023-12-04 10:53:55 +00:00
local xiaos = player:getPile("skl__liyuanhao_xiao")
player.is_xiao_changing = false
-- 判断是否有牌出去
for _, move in ipairs(data) do -- 第一层循环,不知道为啥
if move.from then -- 照着抄的,牌离开
-- print("有牌正打算离开")
if move.from == player.id then
-- print("有牌正打算从你家离开")
if #xiaos == 3 then
-- print("啸是3")
for _, info in ipairs(move.moveInfo) do -- 还有第二层循环。我自己的代码里没有第二层
if info.fromArea == Card.PlayerSpecial then
-- print("有牌正打算从你家特殊区离开")
return true
end
end
end
end
end
end
-- 判断是否有牌进来
if #xiaos == 1 then -- 如果啸是1
2023-12-04 10:53:55 +00:00
for _, move in ipairs(data) do -- 如果有一张牌是进入或者离开我的特殊区,那么这个函数可以触发
if (move.to == player.id and move.toArea == Card.PlayerSpecial) or
(move.from == player.id and move.fromArea == Card.PlayerSpecial) then
-- 去找一段代码,检测自己特殊区的牌离开的
-- print("二段笑(一段)已经检测有牌从特殊区变动", #xiaos)
-- 检测不到离开
-- if move.to == player.id and move.toArea == Card.PlayerSpecial then
-- print("二段笑(一段)已经检测有牌来到特殊区", #xiaos)
-- end
return true
end
2023-12-04 10:53:55 +00:00
end
end
end, -- 每个参数的结尾都要逗号。can_trigger是一个参数
on_trigger = function(self, event, target, player, data)
-- 触发之后,设置变量,告诉下一个函数有没有可能在发生变化
2023-12-04 10:53:55 +00:00
player.is_xiao_changing = true
-- print("二段笑(第一段) on_trigger已触发现在是", player.is_xiao_changing, #player:getPile("skl__liyuanhao_xiao"))
2023-12-04 10:53:55 +00:00
end,
}
local jy_erduanxiao_trigger = fk.CreateTriggerSkill{
name = "#jy_erduanxiao_trigger",
2023-12-04 10:53:55 +00:00
events = {fk.AfterCardsMove},
anim_type = "masochism",
2023-12-04 10:53:55 +00:00
frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
return #player:getPile("skl__liyuanhao_xiao") == 2 and -- 如果啸为2
2023-12-04 10:53:55 +00:00
player.is_xiao_changing -- 如果啸有可能在变化
end,
on_trigger = function(self, event, target, player, data)
-- print("二段笑(第二段)已触发,", player.is_xiao_changing, #player:getPile("skl__liyuanhao_xiao"))
2023-12-04 10:53:55 +00:00
local room = player.room
local choice = room:askForChoice(player, {"#lose_xiao", "#lose_hp_1"}, self.name)
if choice == "#lose_xiao" then
local xiaos = player:getPile("skl__liyuanhao_xiao")
room:throwCard(xiaos, self.name, player, player) -- 把啸全部扔掉
2023-12-04 10:53:55 +00:00
elseif choice == "#lose_hp_1" then
room:loseHp(player, 1, self.name) -- 失去一点体力
2023-12-04 10:53:55 +00:00
player.is_xiao_changing = false
end
end,
}
jy_erduanxiao:addRelatedSkill(jy_erduanxiao_trigger)
2023-12-04 10:53:55 +00:00
-- 三件 已完成 测试通过
local jy_husanjian = fk.CreateTriggerSkill{
name = "jy_husanjian",
2023-12-04 10:53:55 +00:00
frequency = Skill.Compulsory,
anim_type = "offensive",
2023-12-04 10:53:55 +00:00
events = {fk.DamageCaused},
can_trigger = function(self, event, target, player, data)
if not (target == player and player:hasSkill(self)) then return false end
-- 现在 target 已经是 player并且 player 拥有这个技能了。这个时候再来看他的装备区
local weapon = Fk:getCardById(player:getEquipment(Card.SubtypeWeapon))
local armor = Fk:getCardById(player:getEquipment(Card.SubtypeArmor))
local defensive_ride = Fk:getCardById(player:getEquipment(Card.SubtypeDefensiveRide))
local offensive_ride = Fk:getCardById(player:getEquipment(Card.SubtypeOffensiveRide))
local treasure = Fk:getCardById(player:getEquipment(Card.Treasure))
return not weapon and
armor and
defensive_ride and
not offensive_ride and
not treasure
-- 有且只有防具和+1马
end,
on_use = function(self, event, target, player, data)
local room = player.room
player:broadcastSkillInvoke(self.name)
room:notifySkillInvoked(player, self.name, "masochism") -- 如果这个技能改了,建议把这里的特效也改一下。
data.damage = data.damage - 1
2023-12-04 10:53:55 +00:00
end,
}
-- TODO: 加一个触发效果器
2023-12-04 10:53:55 +00:00
skl__liyuanhao:addSkill(jy_huxiao)
skl__liyuanhao:addSkill(jy_huxiao_analeptic)
skl__liyuanhao:addSkill(jy_huxiao_jink)
skl__liyuanhao:addSkill(jy_erduanxiao)
skl__liyuanhao:addSkill(jy_husanjian)
2023-12-04 10:53:55 +00:00
Fk:loadTranslationTable {
["skl__liyuanhao"] = "李元浩",
["skl__liyuanhao_xiao"] = "",
["jy_huxiao"] = "虎啸",
2023-12-05 10:54:36 +00:00
[":jy_huxiao"] = [[使
2023-12-04 15:01:20 +00:00
<br><font size="1"><i></i></font>]],
2023-12-04 10:53:55 +00:00
["jy_huxiao_analeptic"] = "横刀",
[":jy_huxiao_analeptic"] = [[使
2023-12-04 15:01:20 +00:00
<br><font size="1"><i></i></font>]],
2023-12-04 10:53:55 +00:00
["jy_huxiao_jink"] = "立马",
[":jy_huxiao_jink"] = [[使
2023-12-04 15:01:20 +00:00
<br><font size="1"><i></i></font>]],
2023-12-04 10:53:55 +00:00
["jy_erduanxiao"] = "二段",
2023-12-05 10:54:36 +00:00
[":jy_erduanxiao"] = "锁定技,当你的角色牌上有且仅有两张【啸】时,你选择失去一点体力或失去所有【啸】。",
["#jy_erduanxiao_trigger"] = "二段",
["#lose_xiao"] = "失去所有【啸】",
["#lose_hp_1"] = "失去一点体力",
2023-12-04 10:53:55 +00:00
["jy_husanjian"] = "三件",
[":jy_husanjian"] = [[-1
<br><font size="1"><i>使使</i></font>]],
2023-12-04 10:53:55 +00:00
}
2023-12-04 15:01:20 +00:00
-- 唐李元浩
local tym__liyuanhao = General(extension, "tym__liyuanhao", "qun", 3, 3, General.Male)
-- 界虎啸
-- 参考自铁骑,屯田,脑洞包明哲,克己(原来克己已经监视了使用和打出了,不用写那么复杂)
local jy_huxiao_2 = fk.CreateTriggerSkill{
name = "jy_huxiao_2",
anim_type = "special",
events = {fk.CardResponding, fk.TargetSpecified}, -- 包括了使用和打出
-- frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and data.card.trueName == "slash" then
-- 使用是TS打出是CR
if event == fk.TargetSpecified or event == fk.CardResponding then
return target == player
end
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(room:getNCards(1))
player:addToPile("tym__liyuanhao_xiao", dummy, true, self.name)
end,
}
2023-12-04 15:01:20 +00:00
-- 界啸酒
-- 注释里是为了测试改成无中生有。保留在这里以防你后面还需要测试。
local jy_huxiao_analeptic_2 = fk.CreateViewAsSkill{
name = "jy_huxiao_analeptic_2",
anim_type = "defensive",
pattern = "analeptic",
-- pattern = "ex_nihilo",
expand_pile = "tym__liyuanhao_xiao",
card_filter = function(self, to_select, selected)
if #selected == 1 then return false end
local xiaos = Self:getPile("tym__liyuanhao_xiao")
if #xiaos == 0 then return false end
return Self:getPileNameOfId(to_select) == "tym__liyuanhao_xiao"
end,
view_as = function(self, cards)
if #cards ~= 1 then
return nil
end
local c = Fk:cloneCard("analeptic")
-- local c = Fk:cloneCard("ex_nihilo")
c.skillName = self.name
-- print("克隆的牌c的参数c.name ", c.name, " c.trueName ", c.trueName)
c:addSubcard(cards[1])
return c
end,
}
-- 界啸闪
local jy_huxiao_jink_2 = fk.CreateViewAsSkill{
name = "jy_huxiao_jink_2",
anim_type = "defensive",
pattern = "jink",
expand_pile = "tym__liyuanhao_xiao",
card_filter = function(self, to_select, selected)
if #selected == 1 then return false end
local xiaos = Self:getPile("tym__liyuanhao_xiao")
if #xiaos == 0 then return false end
return Self:getPileNameOfId(to_select) == "tym__liyuanhao_xiao"
end,
view_as = function(self, cards)
if #cards ~= 1 then
return nil
end
local c = Fk:cloneCard("jink")
c.skillName = self.name
c:addSubcard(cards[1])
return c
end,
}
-- 界二段
-- 这里的jy_erduanxiao_2全部都是抄上面普通李元浩的因为只有数值差异。如果上面的改了这里也得改
2023-12-04 15:01:20 +00:00
local jy_erduanxiao_2 = fk.CreateTriggerSkill{
name = "jy_erduanxiao_2",
2023-12-06 17:38:30 +00:00
anim_type = "support",
2023-12-04 15:01:20 +00:00
events = {fk.BeforeCardsMove}, -- 理论上来说每次牌的移动只有同一个方向的
-- frequency = Skill.Compulsory,
2023-12-04 15:01:20 +00:00
mute = true,
-- 测试通过。1-23-2都可以顺利触发。
-- 我猜想原因是1-2的时候可能有多张牌进出而3-2的时候只会有一张牌出去。但我搞不懂这个数据结构
-- 不知道为什么有一个是两层循环,有一个是一层循环。
2023-12-04 15:01:20 +00:00
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return end -- 如果我自己没有这个技能,那就算了
local xiaos = player:getPile("tym__liyuanhao_xiao")
player.is_xiao_changing = false
-- 判断是否有牌出去
for _, move in ipairs(data) do -- 第一层循环,不知道为啥
if move.from then -- 照着抄的,牌离开
-- print("有牌正打算离开")
if move.from == player.id then
-- print("有牌正打算从你家离开")
if #xiaos == 3 then
-- print("啸是3")
for _, info in ipairs(move.moveInfo) do -- 还有第二层循环。我自己的代码里没有第二层
if info.fromArea == Card.PlayerSpecial then
-- print("有牌正打算从你家特殊区离开")
return true
end
end
end
end
end
end
-- 判断是否有牌进来
if #xiaos == 1 then -- 如果啸是1
2023-12-04 15:01:20 +00:00
for _, move in ipairs(data) do -- 如果有一张牌是进入或者离开我的特殊区,那么这个函数可以触发
if (move.to == player.id and move.toArea == Card.PlayerSpecial) or
(move.from == player.id and move.fromArea == Card.PlayerSpecial) then
-- 去找一段代码,检测自己特殊区的牌离开的
-- print("二段笑(一段)已经检测有牌从特殊区变动", #xiaos)
-- 检测不到离开
-- if move.to == player.id and move.toArea == Card.PlayerSpecial then
-- print("二段笑(一段)已经检测有牌来到特殊区", #xiaos)
-- end
return true
end
2023-12-04 15:01:20 +00:00
end
end
end, -- 每个参数的结尾都要逗号。can_trigger是一个参数
on_trigger = function(self, event, target, player, data)
2023-12-04 15:01:20 +00:00
-- 触发之后,设置变量,告诉下一个函数有没有可能在发生变化
player.is_xiao_changing = true
-- print("二段笑(第一段) on_trigger已触发现在是", player.is_xiao_changing, #player:getPile("tym__liyuanhao_xiao"))
2023-12-04 15:01:20 +00:00
end,
}
local jy_erduanxiao_trigger_2 = fk.CreateTriggerSkill{
name = "#jy_erduanxiao_trigger_2",
events = {fk.AfterCardsMove},
frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
2023-12-05 10:54:36 +00:00
return player:hasSkill(self) and -- 如果是有二段啸的角色
#player:getPile("tym__liyuanhao_xiao") == 2 and -- 如果啸为2
2023-12-04 15:01:20 +00:00
player.is_xiao_changing -- 如果啸有可能在变化
end,
on_cost = function(self, event, target, player, data)
2023-12-04 15:01:20 +00:00
-- print("jy_erduanxiao_trigger 已触发现在player.is_xiao_changing的值是", player.is_xiao_changing)
local room = player.room
-- 如果体力不是满的,两个选项都有;如果是满的,就黑掉【恢复体力】那个按钮。这个改动不需要改到标李元浩那边去,因为标李元浩是掉血。
if player.hp ~= player.maxHp then
self.choice = room:askForChoice(player, {"#lose_xiao_2", "#lose_hp_1_2"}, self.name)
else
self.choice = room:askForChoice(player, {"#lose_xiao_2"}, self.name, nil, nil, {"#lose_xiao_2", "#lose_hp_1_2"})
end
return true
end,
on_use = function(self, event, target, player, data)
2023-12-05 16:45:47 +00:00
local xiaos = player:getPile("tym__liyuanhao_xiao")
if self.choice == "#lose_xiao_2" then
-- 将所有【啸】纳入自己的手牌
player.room:moveCardTo(xiaos, Card.PlayerHand, player, fk.ReasonJustMove, self.name, "tym__liyuanhao_xiao", true, player.id)
elseif self.choice == "#lose_hp_1_2" then
2023-12-05 16:45:47 +00:00
-- 弃掉所有【啸】
room:throwCard(xiaos, self.name, player, player) -- 把啸全部扔掉
-- 回复1点体力
player.room:recover({
2023-12-04 15:01:20 +00:00
who = player,
num = 1,
recoverBy = player,
skillName = self.name,
})
end
end,
}
jy_erduanxiao_2:addRelatedSkill(jy_erduanxiao_trigger_2)
-- 界三件 已完成 测试通过
2023-12-04 15:01:20 +00:00
local jy_husanjian_2 = fk.CreateTriggerSkill{
name = "jy_husanjian_2",
frequency = Skill.Compulsory,
anim_type = "offensive",
events = {fk.DamageCaused},
can_trigger = function(self, event, target, player, data)
if not (target == player and player:hasSkill(self)) then return false end
-- 现在 target 已经是 player并且 player 拥有这个技能了。这个时候再来看他的装备区
local weapon = Fk:getCardById(player:getEquipment(Card.SubtypeWeapon))
local armor = Fk:getCardById(player:getEquipment(Card.SubtypeArmor))
local defensive_ride = Fk:getCardById(player:getEquipment(Card.SubtypeDefensiveRide))
local offensive_ride = Fk:getCardById(player:getEquipment(Card.SubtypeOffensiveRide))
local treasure = Fk:getCardById(player:getEquipment(Card.Treasure))
return weapon and
not armor and
not defensive_ride and
offensive_ride and
2023-12-04 15:01:20 +00:00
not treasure
-- 有且只有武器和-1马
2023-12-04 15:01:20 +00:00
end,
on_use = function(self, event, target, player, data)
local room = player.room
player:broadcastSkillInvoke(self.name)
room:notifySkillInvoked(player, self.name, "offensive")
2023-12-04 15:01:20 +00:00
data.damage = data.damage + 1
end,
}
-- TODO: 加一个触发效果器
2023-12-04 15:01:20 +00:00
2023-12-05 10:54:36 +00:00
-- 因为是两个不同的角色,两个角色的特殊区是不能通用的,所以必须分开写代码。
tym__liyuanhao:addSkill(jy_huxiao_2)
tym__liyuanhao:addSkill(jy_huxiao_analeptic_2)
tym__liyuanhao:addSkill(jy_huxiao_jink_2)
2023-12-04 15:01:20 +00:00
tym__liyuanhao:addSkill(jy_erduanxiao_2)
-- tym__liyuanhao:addSkill(jy_husanjian_2)
2023-12-04 15:01:20 +00:00
2023-12-04 10:53:55 +00:00
Fk:loadTranslationTable {
2023-12-04 15:01:20 +00:00
["tym__liyuanhao"] = "界李元浩",
["tym__liyuanhao_xiao"] = "<font color=\"gold\">啸</font>",
["jy_huxiao_2"] = "虎啸",
2023-12-05 10:54:36 +00:00
[":jy_huxiao_2"] = [[使
<br><font size="1"><i></i></font>]],
["jy_huxiao_analeptic_2"] = "横刀",
[":jy_huxiao_analeptic_2"] = [[使
<br><font size="1"><i></i></font>]],
["jy_huxiao_jink_2"] = "立马",
[":jy_huxiao_jink_2"] = [[使
<br><font size="1"><i></i></font>]],
2023-12-04 15:01:20 +00:00
["jy_erduanxiao_2"] = "二段",
2023-12-05 16:45:47 +00:00
[":jy_erduanxiao_2"] = "锁定技,当你的角色牌上有且仅有两张【啸】时,你选择:弃掉所有【啸】并恢复一点体力,或将所有【啸】纳入手牌。",
2023-12-04 15:01:20 +00:00
["#jy_erduanxiao_trigger_2"] = "二段",
["#lose_xiao_2"] = "将所有【啸】纳入手牌",
2023-12-05 16:45:47 +00:00
["#lose_hp_1_2"] = "弃掉所有【啸】并恢复一点体力",
2023-12-04 10:53:55 +00:00
}
2023-12-06 06:08:57 +00:00
-- -- -- 侯国玉
-- local tym__houguoyu = General(extension, "tym__houguoyu", "qun", 5, 5, General.Male)
2023-12-06 06:08:57 +00:00
-- tym__houguoyu:addSkill(jy_husanjian_2)
-- -- tym__houguoyu:addSkill("biyue")
2023-12-06 06:08:57 +00:00
-- Fk:loadTranslationTable {
-- ["tym__houguoyu"] = "侯国玉",
-- ["houguoyu"] = "侯国玉",
2023-12-05 16:45:47 +00:00
2023-12-06 06:08:57 +00:00
-- ["jy_husanjian_2"] = "三件",
-- [":jy_husanjian_2"] = [[锁定技,当你的装备区有且仅有武器和进攻马时,你造成的伤害+1。
-- <br><font size="1"><i>虎三件,有时也可以指【卢登的激荡】、【虚空之杖】和【灭世者的死亡之帽】。</i></font>]],
-- }
2023-12-04 10:53:55 +00:00
-- 高天亮
2023-12-05 10:54:36 +00:00
local xjb__gaotianliang = General(extension, "xjb__gaotianliang", "qun", 4, 4, General.Male)
local jy_yuyu = fk.CreateTriggerSkill{
name = "jy_yuyu",
2023-12-04 10:53:55 +00:00
anim_type = "masochism",
events = {fk.Damaged},
-- 遗计就是没有can_trigger的遗计也不用判断player.hasSkill(self),也不用判断伤害目标是自己,因为被省略了
2023-12-04 10:53:55 +00:00
on_trigger = function(self, event, target, player, data)
2023-12-05 10:54:36 +00:00
local room = player.room
self.this_time_slash = false
if data.card and data.from and data.card.trueName == "slash" then -- 如果是杀
if not data.from:hasMark("@jy_gaotianliang_enemy") then
self.this_time_slash = true -- 如果他是因为这次伤害变成了天敌那么写在this_time_slash里
room:setPlayerMark(data.from, "@jy_gaotianliang_enemy", "") -- 空字符串也是true
end
end
if self.this_time_slash or not data.from:hasMark("@jy_gaotianliang_enemy") then -- 如果他不是敌人
2023-12-04 10:53:55 +00:00
self:doCost(event, target, player, data)
end
end,
on_cost = function(self, event, target, player, data)
2023-12-05 10:54:36 +00:00
if player.room:askForSkillInvoke(player, self.name, data) then -- 那么问是否要发动
2023-12-04 10:53:55 +00:00
return true
end
end,
on_use = function(self, event, target, player, data)
player:drawCards(3)
player:turnOver()
2023-12-05 10:54:36 +00:00
self.this_time_slash = false
2023-12-04 10:53:55 +00:00
end,
}
xjb__gaotianliang:addSkill(jy_yuyu)
2023-12-04 10:53:55 +00:00
Fk:loadTranslationTable {
["xjb__gaotianliang"] = "高天亮",
["jy_yuyu"] = "玉玉",
2023-12-06 06:08:57 +00:00
[":jy_yuyu"] = [[使
]],
["@jy_gaotianliang_enemy"] = "高天亮之敌",
2023-12-07 03:59:07 +00:00
["$jy_yuyu1"] = "我……我真的很想听到你们说话……",
["$jy_yuyu2"] = "我天天被队霸欺负,他们天天骂我。",
["$jy_yuyu3"] = "(听不清)",
["~xjb__gaotianliang"] = "顶不住啦!我每天都活在水深火热里面。",
2023-12-06 06:08:57 +00:00
}
-- -- 赵乾熙
local tym__zhaoqianxi = General(extension, "tym__zhaoqianxi", "qun", 3, 3, General.Male)
2023-12-06 06:08:57 +00:00
-- 参考自藤甲。要把DamageInflicted改成DamageCaused就是你对别人造成伤害的意思。
-- 如果是DamageInflicted就是别人对你造成伤害的意思。
local jy_yuanshen = fk.CreateTriggerSkill{
name = "jy_yuanshen",
frequency = Skill.Compulsory,
anim_type = "offensive",
events = {fk.DamageCaused},
can_trigger = function(self, event, target, player, data)
if not (target == player and player:hasSkill(self)) then return false end
return data.damageType ~= fk.NormalDamage
end,
on_use = function(self, event, target, player, data)
data.damage = data.damage + 1
end,
}
local jy_huoji = fk.CreateViewAsSkill{
name = "jy_huoji",
anim_type = "offensive",
2023-12-07 06:42:29 +00:00
pattern = "slash",
2023-12-06 06:08:57 +00:00
card_filter = function(self, to_select, selected)
return #selected == 0 and Fk:getCardById(to_select).suit == Card.Spade and Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
end,
view_as = function(self, cards)
if #cards ~= 1 then return end
local card = Fk:cloneCard("fire__slash")
card.skillName = self.name
card:addSubcard(cards[1])
return card
end,
}
local jy_leiji = fk.CreateViewAsSkill{
name = "jy_leiji",
anim_type = "offensive",
2023-12-07 06:42:29 +00:00
pattern = "slash",
card_filter = function(self, to_select, selected)
return #selected == 0 and Fk:getCardById(to_select).suit == Card.Club and Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
end,
view_as = function(self, cards)
if #cards ~= 1 then return end
local card = Fk:cloneCard("thunder__slash")
card.skillName = self.name
card:addSubcard(cards[1])
return card
end,
}
2023-12-06 06:08:57 +00:00
tym__zhaoqianxi:addSkill(jy_yuanshen)
-- tym__zhaoqianxi:addSkill(jy_huoji) -- 已经够厉害了,不能再加技能了。
-- tym__zhaoqianxi:addSkill(jy_leiji)
2023-12-06 06:08:57 +00:00
Fk:loadTranslationTable {
["tym__zhaoqianxi"] = "赵乾熙",
["jy_yuanshen"] = "原神",
[":jy_yuanshen"] = [[+1
2023-12-08 05:01:45 +00:00
<font size="1"><br>+2
<br>+1
+13</font>]],
2023-12-06 06:08:57 +00:00
["jy_huoji"] = "帽猫",
[":jy_huoji"] = [[你可以将一张♠手牌当作【火杀】使用或打出。]],
["jy_leiji"] = "猫帽",
[":jy_leiji"] = [[使
2023-12-06 06:08:57 +00:00
<br /><font size="1"><i><s>Beryl抽满命林尼歪了六次</s></i></font>]],
2023-12-04 10:53:55 +00:00
}
2023-12-06 06:08:57 +00:00
-- 界赵乾熙
local tym__zhaoqianxi_2 = General(extension, "tym__zhaoqianxi_2", "qun", 4, 4, General.Male)
2023-12-06 06:08:57 +00:00
-- tym__zhaoqianxi_2.hidden = true
-- TODO被铁索连环的目标如果因为这次伤害受到了元素反应那么不会让其他被铁索连环的目标受到附着效果。
-- 这是因为is_jy_yuanshen_2_triggered。目前已经删除了这个变量以后再处理。但是这样的问题是
2023-12-08 05:07:38 +00:00
-- 如果场上有多个有这个技能的角色那么既会附着又会负面效果铁索连环的副目标会受到2点额外伤害
local jy_yuanshen_2 = fk.CreateTriggerSkill{
name = "jy_yuanshen_2",
frequency = Skill.Compulsory,
2023-12-06 16:36:10 +00:00
anim_type = "offensive",
events = {fk.DamageInflicted},
can_trigger = function(self, event, target, player, data) -- player是我自己只能让我自己播放这个动画
if not player:hasSkill(self) then return false end
-- return data.damageType ~= fk.NormalDamage and not data.is_jy_yuanshen_2_triggered -- 如果这次没有被其他的该技能响应
return data.damageType ~= fk.NormalDamage
end,
on_use = function(self, event, target, player, data)
local room = player.room
if data.damageType then
-- 使用for循环以方便后面添加元素反应类型。每次只会有一种反应发生。
-- element[1]是A属性类型element[2]是A对应的附着标记
-- element[3]是A要反应的附着标记Belement[4]是要造成的效果
-- element[5]是这个反应需要造成的广播提示
-- Lua 的数组从1开始
for _, element in ipairs({
{fk.FireDamage, "@jy_yuanshen_2_pyro", "@jy_yuanshen_2_electro",
function(self, event, target, player, data) data.damage = data.damage + 1 end,
"#jy_yuanshen_2_reaction_1",
},
{fk.ThunderDamage, "@jy_yuanshen_2_electro", "@jy_yuanshen_2_pyro",
function(self, event, target, player, data)
2023-12-08 05:01:45 +00:00
-- player.room:askForDiscard(data.to, 2, 2, true, self.name, false, nil, "#jy_yuanshen_2_overload_discard")
2023-12-08 05:38:55 +00:00
data.to:turnOver() -- 受到伤害的人翻面
end,
"#jy_yuanshen_2_reaction_2",
},
}) do
if data.damageType == element[1] then -- 如果是A属性伤害
if data.to:getMark(element[3]) ~= 0 then -- 如果目标有B附着
room:setPlayerMark(data.to, element[3], 0) -- 将B附着解除
room:doBroadcastNotify("ShowToast", Fk:translate(element[5])) -- 广播发生了元素反应。先广播再造成效果!
element[4](self, event, target, player, data) -- 造成效果
-- data.is_jy_yuanshen_2_triggered = true -- 如果有多个拥有这个技能的人,告诉他不用再发动了
return -- 结束了,不用判断下面的了
end
2023-12-06 16:36:10 +00:00
if data.to:getMark(element[2]) == 0 then -- 如果目标没有A附着
room:setPlayerMark(data.to, element[2], 1) -- 造成A附着
return
end
end
end
end
end,
}
2023-12-06 06:08:57 +00:00
-- 参考自悲歌
-- 因为如果每个无属性伤害都触发这个技能的话会极大增加等待时间,所以我的建议是更改成悲歌,只响应【杀】
local jy_fumo = fk.CreateTriggerSkill{
name = "jy_fumo",
anim_type = "masochism",
events = {fk.DamageInflicted},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and
data.damageType == fk.NormalDamage and data.card and
data.card.trueName == "slash" and not data.to.dead and not player:isNude()
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local card = room:askForDiscard(player, 1, 1, true, self.name, true, ".", "#jy_fumo-invoke::"..target.id, true)
if #card > 0 then
2023-12-08 05:38:55 +00:00
room:doIndicate(player.id, {target.id}) -- 播放指示线
self.cost_data = card
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
2023-12-08 05:38:55 +00:00
room:throwCard(self.cost_data, self.name, player, player)
if target.dead then return false end
2023-12-08 05:38:55 +00:00
card = Fk:getCardById(self.cost_data[1]) -- 这张被弃掉的牌是通过self.cost_data传过来的是一个int table你得转化成一张card
2023-12-08 05:01:45 +00:00
if card.color == Card.Red then
data.damageType = fk.FireDamage
2023-12-08 05:01:45 +00:00
elseif card.color == Card.Black then
data.damageType = fk.ThunderDamage
end
end,
}
2023-12-06 06:08:57 +00:00
tym__zhaoqianxi_2:addSkill(jy_yuanshen_2)
tym__zhaoqianxi_2:addSkill(jy_fumo)
2023-12-06 06:08:57 +00:00
Fk:loadTranslationTable {
["tym__zhaoqianxi_2"] = "界赵乾熙",
2023-12-06 06:08:57 +00:00
["jy_yuanshen_2"] = "原神",
[":jy_yuanshen_2"] = [[<!-- 锁定技,所有<font color="purple">雷电伤害</font>都会令目标进入<font color="purple">【雷电】</font>状态,
<font color="red"></font><font color="red"></font>
<br /><font color="purple"></font><font color="red"></font>
<font color="red"></font><font color="purple"></font>使+1
<font color="red"></font><font color="purple"></font>
<font color="purple"></font><font color="red"></font>-->
2023-12-08 16:34:35 +00:00
<font color="red"></font><font color="purple"></font>1.
2. <font color="purple"></font><font color="red"></font>+1]],
["#jy_yuanshen_2_reaction_1"] = [[<font color="red">火焰伤害</font>与<font color="purple">【雷电】</font>发生反应,伤害+1]],
["#jy_yuanshen_2_reaction_2"] = [[<font color="purple">雷电伤害</font>与<font color="red">【火焰】</font>发生反应,目标翻面]],
["@jy_yuanshen_2_pyro"] = [[<font color="red">火焰</font>]],
["@jy_yuanshen_2_electro"] = [[<font color="purple">雷电</font>]],
["#jy_yuanshen_2_overload_discard"] = [[<font color="purple"></font><font color="red"></font>
2023-12-08 05:01:45 +00:00
]],
2023-12-06 06:08:57 +00:00
["jy_fumo"] = "附魔",
["#jy_fumo-invoke"] = "附魔:%dest 受到伤害,你可以弃置一张牌,改为属性伤害",
2023-12-08 04:51:52 +00:00
[":jy_fumo"] = [[使
<font color="red"></font>
<font color="purple"></font>]],
2023-12-06 13:24:54 +00:00
}
-- 阿伟罗
local xjb__aweiluo = General(extension, "xjb__aweiluo", "qun", 3, 3, General.Male)
2023-12-07 07:38:38 +00:00
-- 只能传手牌
2023-12-06 13:24:54 +00:00
local jy_youlong = fk.CreateTriggerSkill{
name = "jy_youlong",
2023-12-06 14:30:46 +00:00
anim_type = "support",
2023-12-06 17:38:30 +00:00
frequency = Skill.Compulsory,
2023-12-06 13:24:54 +00:00
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self)
2023-12-06 16:51:47 +00:00
and player.phase == Player.Start
2023-12-06 13:24:54 +00:00
end,
on_use = function(self, event, target, player, data)
local room = player.room
2023-12-07 07:38:38 +00:00
for _, p in ipairs(room:getAlivePlayers(player, true)) do
if not p:isKongcheng() then -- 如果他有手牌
local id = room:askForCard(p, 1, 1, false, self.name, false, nil, "#jy_youlong-choose")
local next = p.next -- 下家
while next.dead do -- 一直找,直到找到一个活的下家
next = next.next
end
room:moveCardTo(id, Card.PlayerHand, next, fk.ReasonJustMove, self.name, nil, false, player.id)
2023-12-06 13:24:54 +00:00
end
end
end,
}
2023-12-06 14:30:46 +00:00
-- 核爆
local jy_hebao = fk.CreateTriggerSkill{
name = "jy_hebao",
anim_type = "special",
events = {fk.EventPhaseEnd},
2023-12-06 14:30:46 +00:00
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and player.phase == Player.Start
2023-12-06 14:30:46 +00:00
end,
on_cost = function(self, event, target, player, data)
local room = player.room
2023-12-06 14:35:57 +00:00
local id = room:askForCard(player, 1, 1, false, self.name, true, nil, "#jy_hebao-choose")
2023-12-06 14:30:46 +00:00
player:addToPile("xjb__aweiluo_dian", id, true, self.name)
end,
}
2023-12-06 16:36:10 +00:00
-- 跳水
local jy_tiaoshui = fk.CreateTriggerSkill{
name = "jy_tiaoshui",
anim_type = "special",
events = {fk.Damaged},
on_use = function(self, event, target, player, data)
local room = player.room
local dians = player:getPile("xjb__aweiluo_dian")
-- 以后“选择一张特殊区的牌并且弃掉”这个要求就这么写。
local id = room:askForCard(player, 1, 1, false, self.name, true, ".|.|.|xjb__aweiluo_dian|.|.|.", "#jy_tiaoshui", "xjb__aweiluo_dian", true)
room:throwCard(id, self.id, player, player)
-- askForDiscard 函数是不能对特殊区的牌生效的
-- local id = room:askForDiscard(player, 1, 1, false, self.name, true, ".|.|.|xjb__aweiluo_dian|.|.|.", "#jy_tiaoshui", false, true)
end,
}
2023-12-07 03:59:07 +00:00
-- 罗绞
-- 抄自上面的jy_erduanxiao_2
local jy_luojiao = fk.CreateTriggerSkill{
name = "jy_luojiao",
anim_type = "offensive",
events = {fk.BeforeCardsMove}, -- 理论上来说每次牌的移动只有同一个方向的
-- frequency = Skill.Compulsory,
mute = true,
can_trigger = function(self, event, target, player, data)
2023-12-07 04:16:17 +00:00
if not player:hasSkill(self) then return end
2023-12-07 03:59:07 +00:00
local dians = player:getPile("xjb__aweiluo_dian")
player.is_dian_changing = false
2023-12-07 07:38:38 +00:00
-- 判断是否有牌进出特殊区。这个函数得同时负责南蛮和万箭。
player.is_luojiao_archery_attack_may_triggering = false -- 先清理自家变量
-- 为什么不用data传参数因为这里是BeforeCardsMove后面是AfterCardsMove两个不是同一个事件。
2023-12-07 03:59:07 +00:00
-- 判断是否有牌出去
for _, move in ipairs(data) do
if move.from then -- 照着抄的,牌离开
2023-12-07 04:16:17 +00:00
-- print("有牌正打算离开")
2023-12-07 03:59:07 +00:00
if move.from == player.id then
2023-12-07 04:16:17 +00:00
-- print("有牌正打算从你家离开")
2023-12-07 07:38:38 +00:00
for _, info in ipairs(move.moveInfo) do
if info.fromArea == Card.PlayerSpecial then
-- print("有牌正打算从你家特殊区离开")
-- 如果点是5那么有可能可以触发万箭齐发
if #dians == 5 then player.is_luojiao_archery_attack_may_triggering = true end
return true
2023-12-07 03:59:07 +00:00
end
end
end
end
end
2023-12-06 18:40:55 +00:00
2023-12-07 03:59:07 +00:00
-- 判断是否有牌进来
2023-12-07 07:38:38 +00:00
for _, move in ipairs(data) do -- 如果有一张牌是进入我的特殊区,那么这个函数可以触发
if move.to == player.id and move.toArea == Card.PlayerSpecial then
-- print("有牌正打算来你家特殊区, return true")
-- 如果点是3那么有可能可以触发万箭齐发
if #dians == 3 then player.is_luojiao_archery_attack_may_triggering = true end
return true
2023-12-07 03:59:07 +00:00
end
end
end,
2023-12-06 17:38:30 +00:00
2023-12-07 03:59:07 +00:00
on_trigger = function(self, event, target, player, data)
-- 触发之后,设置变量,告诉下一个函数有没有可能在发生变化
2023-12-07 04:16:17 +00:00
-- print("罗绞1没问题已isdianchanging设为true")
2023-12-07 03:59:07 +00:00
player.is_dian_changing = true
end,
}
local jy_luojiao_archery_attack = fk.CreateTriggerSkill{
name = "#jy_luojiao_archery_attack",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
2023-12-07 07:38:38 +00:00
return player.is_luojiao_archery_attack_may_triggering == true and -- 如果有可能触发万箭齐发
#player:getPile("xjb__aweiluo_dian") == 4 and -- 如果点为4
2023-12-07 03:59:07 +00:00
player.is_dian_changing -- 如果点有可能在变化
end,
2023-12-06 17:38:30 +00:00
2023-12-07 03:59:07 +00:00
on_cost = function(self, event, target, player, data)
player.is_dian_changing = false -- 在这里就要变为false
2023-12-07 04:16:17 +00:00
if player.room:askForSkillInvoke(player, self.name, nil, "#jy_luojiao_archery_attack_ask") then -- 那么问是否要发动
2023-12-07 03:59:07 +00:00
return true
end
end,
2023-12-06 17:38:30 +00:00
2023-12-07 03:59:07 +00:00
on_use = function(self, event, target, player, data)
local room = player.room
2023-12-07 13:07:48 +00:00
room:useVirtualCard("archery_attack", nil, player, room:getOtherPlayers(player, true), self.name, true)
2023-12-07 03:59:07 +00:00
end
}
local jy_luojiao_savage_assault = fk.CreateTriggerSkill{
name = "#jy_luojiao_savage_assault",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
local dians = player:getPile("xjb__aweiluo_dian")
-- 判断花色是否全部不同,触发南蛮入侵
2023-12-07 13:07:48 +00:00
if #dians == 0 then return false end -- 熊俊博说1张也可以发动南蛮那就把==1删掉
2023-12-07 03:59:07 +00:00
dict = {}
for _, c in ipairs(dians) do
local suit = Fk:getCardById(c).suit
if dict[suit] then
2023-12-07 04:16:17 +00:00
-- print("有相同的花色,不执行")
2023-12-07 03:59:07 +00:00
return false
else
dict[suit] = true
end
end
2023-12-07 07:38:38 +00:00
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and -- 本回合还没使用过
player.is_dian_changing -- 是否有新的点进出导致南蛮入侵
2023-12-07 03:59:07 +00:00
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#jy_luojiao_savage_assault_ask")
end,
on_use = function(self, event, target, player, data)
local room = player.room
2023-12-07 07:38:38 +00:00
-- player.is_jy_luojiao_archery_attack_used = true
2023-12-07 13:07:48 +00:00
room:useVirtualCard("savage_assault", nil, player, room:getOtherPlayers(player, true), self.name, true)
2023-12-07 03:59:07 +00:00
player.is_dian_changing = false
end
}
jy_luojiao:addRelatedSkill(jy_luojiao_archery_attack)
jy_luojiao:addRelatedSkill(jy_luojiao_savage_assault)
2023-12-06 17:38:30 +00:00
2023-12-06 16:36:10 +00:00
-- 玉玊
local jy_yusu = fk.CreateTriggerSkill{
name = "jy_yusu",
anim_type = "special",
events = {fk.CardUsing},
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
2023-12-06 16:51:47 +00:00
if player.phase ~= Player.NotActive and data.card and
data.card.type == Card.TypeBasic and target == player then -- target == player使用者是你自己
2023-12-06 16:36:10 +00:00
return true
end
end,
on_cost = function(self, event, target, player, data)
local room = player.room
2023-12-06 16:51:47 +00:00
-- if not player:getMark("@jy_yusu_basic_count") then room:setPlayerMark(player, "@jy_yusu_basic_count", 0) print("basic_count被设置成0") end
room:addPlayerMark(player, "@jy_yusu_basic_count")
basic_count = player:getMark("@jy_yusu_basic_count")
-- print("basic_count现在是", basic_count)
2023-12-06 16:36:10 +00:00
if basic_count % 2 == 0 and basic_count ~= 0 then
return room:askForSkillInvoke(player, self.name)
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local id = data.card
player:addToPile("xjb__aweiluo_dian", id, true, self.name)
end,
}
local jy_yusu_set_0 = fk.CreateTriggerSkill{
name = "#jy_yusu_start",
mute = true,
frequency = Skill.Compulsory,
2023-12-06 16:51:47 +00:00
visible = false,
2023-12-06 16:36:10 +00:00
events = {fk.EventPhaseStart}, -- EventPhaseStart的意思是一个阶段的开始并不是回合开始阶段
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self)
2023-12-06 16:36:10 +00:00
and (player.phase == Player.Play or player.phase == Player.Finish)
end,
on_use = function(self, event, target, player, data)
local room = player.room
2023-12-06 16:51:47 +00:00
room:setPlayerMark(player, "@jy_yusu_basic_count", 0)
2023-12-07 07:38:38 +00:00
-- player.is_jy_luojiao_archery_attack_used = false
2023-12-06 16:51:47 +00:00
-- print("你的回合已开始/结束给你设成了0")
2023-12-06 16:36:10 +00:00
end,
}
jy_yusu:addRelatedSkill(jy_yusu_set_0)
2023-12-06 16:51:47 +00:00
2023-12-06 14:30:46 +00:00
xjb__aweiluo:addSkill(jy_youlong)
xjb__aweiluo:addSkill(jy_hebao)
2023-12-06 16:36:10 +00:00
xjb__aweiluo:addSkill(jy_tiaoshui)
2023-12-07 03:59:07 +00:00
xjb__aweiluo:addSkill(jy_luojiao)
2023-12-06 16:36:10 +00:00
xjb__aweiluo:addSkill(jy_yusu)
2023-12-06 13:24:54 +00:00
Fk:loadTranslationTable {
["xjb__aweiluo"] = "阿伟罗",
2023-12-06 16:36:10 +00:00
["xjb__aweiluo_dian"] = "",
2023-12-06 14:30:46 +00:00
["jy_youlong"] = "游龙",
2023-12-06 14:34:19 +00:00
["#jy_youlong-choose"] = "游龙:你需要选择一张牌交给下家",
2023-12-07 03:59:07 +00:00
[":jy_youlong"] = "锁定技,你的回合开始时,从你开始,每名玩家选择一张手牌交给下家。",
["$jy_youlong1"] = "翩若惊鸿!婉若游龙!",
2023-12-06 14:30:46 +00:00
["jy_hebao"] = "核爆",
[":jy_hebao"] = "你的回合开始时,你可以将一张手牌置于你的武将牌上,称为【点】。",
2023-12-07 07:38:38 +00:00
["#jy_hebao-choose"] = "选择一张手牌成为【点】,可取消",
["$jy_hebao1"] = "Siu~",
2023-12-06 14:30:46 +00:00
["jy_tiaoshui"] = "跳水",
2023-12-07 03:59:07 +00:00
[":jy_tiaoshui"] = "当你受到伤害时,你可以弃掉一张【点】。",
2023-12-06 16:36:10 +00:00
["#jy_tiaoshui"] = "弃掉一张【点】",
2023-12-07 07:38:38 +00:00
["$jy_tiaoshui1"] = "Siu, hahahaha!",
2023-12-06 14:30:46 +00:00
["jy_luojiao"] = "罗绞",
[":jy_luojiao"] = [[1使
4使
2023-12-08 05:07:38 +00:00
<br><font size="1">
</font>]],
2023-12-06 18:40:55 +00:00
["#jy_luojiao_archery_attack"] = "罗绞·万箭齐发",
["#jy_luojiao_savage_assault"] = "罗绞·南蛮入侵",
2023-12-07 03:59:07 +00:00
["#jy_luojiao_archery_attack_ask"] = "【点】数量为4是否发动 罗绞·万箭齐发",
["#jy_luojiao_savage_assault_ask"] = "【点】花色不同,是否发动 罗绞·南蛮入侵,每回合限一次",
2023-12-07 07:38:38 +00:00
["$jy_luojiao1"] = "Muchas gracias afición, esto es para vosotros, Siuuu",
2023-12-08 05:07:38 +00:00
-- TODO: 不会触发这条语音,但我暂时懒得改了
2023-12-06 14:30:46 +00:00
["jy_yusu"] = "玉玊",
2023-12-06 17:38:30 +00:00
[":jy_yusu"] = "出牌阶段,你每使用第二张基本牌时,可以将其作为【点】置于你的武将牌上。",
2023-12-06 16:51:47 +00:00
["@jy_yusu_basic_count"] = "玉玊",
2023-12-07 07:38:38 +00:00
["$jy_yusu1"] = "Siu...",
2023-12-07 03:59:07 +00:00
["~xjb__aweiluo"] = "Cristiano is a sex offender!",
2023-12-06 14:30:46 +00:00
}
2023-12-06 06:08:57 +00:00
2023-12-01 11:29:51 +00:00
Fk:loadTranslationTable {
2023-12-02 09:49:17 +00:00
["jianzihao"] = "简自豪",
2023-12-01 11:29:51 +00:00
["houguoyu"] = "侯国玉",
2023-12-04 10:53:55 +00:00
["liyuanhao"] = "李元浩",
["aweiluo"] = "阿伟罗",
["gaotianliang"] = "高天亮",
2023-12-06 06:08:57 +00:00
["zhaoqianxi"] = "赵乾熙",
2023-12-01 11:29:51 +00:00
}
return extension