2 Star 1 Fork 1

墨樱/MahjongSoul

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
MahjongSoul_tokenT.lua 50.13 KB
一键复制 编辑 原始数据 按行查看 历史
墨樱 提交于 2024-10-30 01:03 . no message
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456
local extension = Package:new("MahjongSoul_tokenT", Package.CardPack)
extension.extensionName = "MahjongSoul"
Fk:loadTranslationTable {
["MahjongSoul_tokenT"] = "神武衍生牌",
}
local U = require "packages/utility/utility"
local mk_jiejia_sk = fk.CreateActiveSkill {
name = "mk_jiejia_skill",
prompt = "#mk_jiejia_skill",
target_filter = function(self, to_select, selected, _, card)
return #selected == 0 and Self.id ~= to_select and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
target_num = 1,
on_effect = function(self, room, effect)
local to = room:getPlayerById(effect.to)
if to.dead then return end
room:addPlayerMark(to, MarkEnum.UncompulsoryInvalidity .. "-turn")
to:turnOver()
end
}
local mk_jiejia = fk.CreateTrickCard {
name = "&mk_jiejia",
suit = Card.NoSuit,
number = 13,
skill = mk_jiejia_sk,
}
extension:addCards({
mk_jiejia,
})
Fk:loadTranslationTable {
["mk_jiejia"] = "解",
["#mk_jiejia_skill"] = "对一名其他角色使用,令其翻面且其本回非锁定技失效。",
[":mk_jiejia"] = "对一名其他角色使用,令其翻面且其本回合非锁定技失效。",
}
local mk_huoshang_sk = fk.CreateActiveSkill {
name = "mk_huoshang_skill",
prompt = "#mk_huoshang_skill",
target_filter = function(self, to_select, selected, _, card)
return #selected == 0 and Self.id ~= to_select and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
target_num = 1,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
if to.dead then return end
room:damage({
from = from,
to = to,
damage = to.hp,
skillName = self.name,
damageType = fk.FireDamage
})
if not to.dead and to:isWounded() then
room:recover {
who = to,
num = 1,
recoverBy = to,
skillName = self.name
}
end
end
}
local mk_huoshang = fk.CreateTrickCard {
name = "&mk_huoshang",
suit = Card.NoSuit,
number = 13,
skill = mk_huoshang_sk,
}
extension:addCards({
mk_huoshang,
})
Fk:loadTranslationTable {
["mk_huoshang"] = "火",
[":mk_huoshang"] = "选择一名其他角色,对其造成当前体力的火焰伤害,若其没有死亡,其回复一点体力",
["mk_huoshang_skill"] = "火",
["#mk_huoshang_skill"] = "选择一名其他角色,对其造成当前体力的火焰伤害,若其没有死亡,其回复一点体力",
}
local mk_zhulu_sk = fk.CreateActiveSkill {
name = "mk_zhulu_skill",
prompt = "#mk_zhulu_skill",
min_target_num = 1,
target_filter = function(self, to_select, selected, _, card)
return #selected < self:getMaxTargetNum(Self, card) and to_select ~= Self.id and
(Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy") and
#Fk:currentRoom():getPlayerById(to_select):getCardIds(Player.Equip) ~= #Self:getCardIds(Player.Equip)
end,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
room:useVirtualCard("slash", nil, from, to, self.name, true)
end
}
local mk_zhulu = fk.CreateTrickCard {
name = "&mk_zhulu",
suit = Card.NoSuit,
number = 13,
skill = mk_zhulu_sk,
}
extension:addCards({
mk_zhulu,
})
Fk:loadTranslationTable {
["mk_zhulu"] = "逐",
[":mk_zhulu"] = "选择任意名装备区牌数与你不同的角色,视为对其使用一张无距离和次数限制的【杀】",
["mk_zhulu_skill"] = "逐",
["#mk_zhulu_skill"] = "选择任意名装备区牌数与你不同的角色,视为对其使用一张无距离和次数限制的【杀】",
}
local mk_xiuyang_sk = fk.CreateActiveSkill {
name = "mk_xiuyang_skill",
prompt = "#mk_xiuyang_skill",
min_target_num = 1,
target_filter = function(self, to_select, selected, _, card)
return #selected < self:getMaxTargetNum(Self, card) and to_select ~= Self.id and
(Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
on_effect = function(self, room, effect)
local to = room:getPlayerById(effect.to)
if to.dead or table.contains(to.sealedSlots, Player.JudgeSlot) or to:hasDelayedTrick("indulgence") then return end
local card = Fk:cloneCard("indulgence")
card:addSubcards(room:getNCards(1))
card.skillName = self.name
to:addVirtualEquip(card)
room:moveCardTo(card, Player.Judge, to, fk.ReasonPut, self.name)
end
}
local mk_xiuyang = fk.CreateTrickCard {
name = "&mk_xiuyang",
suit = Card.NoSuit,
number = 13,
skill = mk_xiuyang_sk,
}
extension:addCards({
mk_xiuyang,
})
Fk:loadTranslationTable {
["mk_xiuyang"] = "休",
[":mk_xiuyang"] = "选择任意名其他角色,将牌堆顶的一张牌视为【乐不思蜀】置入其判定区(无需合法性检测)",
["mk_xiuyang_skill"] = "休",
["#mk_xiuyang_skill"] = "选择任意名其他角色,将牌堆顶的一张牌视为【乐不思蜀】置入其判定区",
}
local mk_jiezi_sk = fk.CreateActiveSkill {
name = "mk_jiezi_skill",
prompt = "#mk_jiezi_skill",
min_target_num = 1,
target_filter = function(self, to_select, selected, _, card)
return #selected < self:getMaxTargetNum(Self, card) and to_select ~= Self.id and
(Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
on_effect = function(self, room, effect)
local to = room:getPlayerById(effect.to)
if to.dead or table.contains(to.sealedSlots, Player.JudgeSlot) or to:hasDelayedTrick("supply_shortage") then return end
local card = Fk:cloneCard("supply_shortage")
card:addSubcards(room:getNCards(1))
card.skillName = self.name
to:addVirtualEquip(card)
room:moveCardTo(card, Player.Judge, to, fk.ReasonPut, self.name)
end
}
local mk_jiezi = fk.CreateTrickCard {
name = "&mk_jiezi",
suit = Card.NoSuit,
number = 13,
skill = mk_jiezi_sk,
}
extension:addCards({
mk_jiezi,
})
Fk:loadTranslationTable {
["mk_jiezi"] = "辎",
["#mk_jiezi_skill"] = "选择任意名其他角色,将牌堆顶的一张牌视为【兵粮寸断】置入其判定区(无需合法性检测)",
[":mk_jiezi"] = "选择任意名其他角色,将牌堆顶的一张牌视为【兵粮寸断】置入其判定区(无需合法性检测)",
}
local mk_binglin_sk = fk.CreateActiveSkill {
name = "mk_binglin_skill",
prompt = "#mk_binglin_skill",
target_num = 1,
target_filter = function(self, to_select, selected, _, card)
return #selected == 0 and to_select ~= Self.id and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
local cards = {}
while not to.dead and not from.dead do
local cid = room:getNCards(1)[1]
table.insert(cards, cid)
room:moveCardTo(cid, Card.Processing, nil, fk.ReasonPut, self.name)
room:delay(50)
local card = Fk:getCardById(cid, true)
if card.trueName == "slash" and not from:prohibitUse(card) and not from:isProhibited(to, card) then
room:setCardEmotion(cid, "judgegood")
room:delay(500)
room:useCard({
card = card,
from = from.id,
tos = { { to.id } },
extraUse = true,
})
elseif card.trueName == "jink" then
room:setCardEmotion(cid, "judgebad")
break
end
end
cards = table.filter(cards, function(id) return room:getCardArea(id) == Card.Processing end)
if #cards > 0 then
room:moveCardTo(cards, Card.DiscardPile, nil, fk.ReasonPutIntoDiscardPile, self.name, nil, true, from.id)
end
end
}
local mk_binglin = fk.CreateTrickCard {
name = "&mk_binglin",
suit = Card.NoSuit,
number = 13,
skill = mk_binglin_sk,
}
extension:addCards({
mk_binglin,
})
Fk:loadTranslationTable {
["mk_binglin"] = "兵",
[":mk_binglin"] = "选择一名其他角色,依次展示牌堆顶的牌,若为【杀】对其使用,否则弃置,直到展示的牌是【闪】",
["mk_binglin_skill"] = "兵",
["#mk_binglin_skill"] = "选择一名其他角色,依次展示牌堆顶的牌,若为【杀】对其使用,否则弃置,直到展示的牌是【闪】",
}
local mk_niepan_sk = fk.CreateActiveSkill {
name = "mk_niepan_skill",
prompt = "#mk_niepan_skill",
mod_target_filter = Util.TrueFunc,
can_use = function(self, player, card)
return (player.general == "sw__xy" or player.deputyGeneral == "sw__xy")
end,
on_use = function(self, room, cardUseEvent)
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
cardUseEvent.tos = { { cardUseEvent.from } }
end
end,
on_effect = function(self, room, effect)
local target = room:getPlayerById(effect.to)
if target.dead or target:isKongcheng() then return end
local cards = target:getCardIds("h")
room:recastCard(cards, target, self.name)
local draw, rec = 0, 0
for _, id in ipairs(cards) do
if Fk:getCardById(id).type ~= Card.TypeBasic then
draw = draw + 1
end
if Fk:getCardById(id).suit == Card.Heart then
rec = rec + 1
end
end
if rec > 0 and not target.dead and target:isWounded() then
room:recover {
who = target,
num = math.min(target.maxHp - target.hp, rec),
recoverBy = target,
skillName = self.name
}
end
if not target.dead and draw > 0 then
target:drawCards(draw, self.name)
end
end
}
local mk_niepan = fk.CreateTrickCard {
name = "&mk_niepan",
suit = Card.NoSuit,
number = 13,
skill = mk_niepan_sk,
}
extension:addCards({
mk_niepan,
})
Fk:loadTranslationTable {
["mk_niepan"] = "涅",
[":mk_niepan"] = "对你使用,重铸所有手牌,其中:每有一张红桃牌,你回复一点体力;每有一张非基本牌,你摸一张牌",
["mk_niepan_skill"] = "涅",
["#mk_niepan_skill"] = "重铸所有手牌,其中:每有一张红桃牌,你回复一点体力;每有一张非基本牌,你摸一张牌",
}
local mk_yihuan_sk = fk.CreateActiveSkill {
name = "mk_yihuan_skill",
prompt = "#mk_yihuan_skill",
target_num = 1,
target_filter = function(self, to_select, selected, _, card)
return #selected == 0 and to_select ~= Self.id and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
if from.dead or to.dead or to:isKongcheng() then return false end
local num = math.ceil(to:getHandcardNum() / 2)
local cards = room:askForCard(to, num, num, false, self.name, false, ".", "#mk_yihuan-card:" .. from.id .. "::" ..
num)
to:showCards(cards)
local choices = { "mk_yihuan_shangban" }
local x = to:getHandcardNum() - #cards
if x > 0 then
table.insert(choices, "mk_yihuan_xiaban:::" .. tostring(x))
end
local choice = U.askforViewCardsAndChoice(from, cards, choices, self.name, "#mk_yihuan-choice::" .. to.id)
if choice ~= "mk_yihuan_shangban" then
cards = table.filter(to.player_cards[Player.Hand], function(id)
return not table.contains(cards, id)
end)
end
room:moveCardTo(cards, Card.PlayerHand, from, fk.ReasonPrey, self.name, nil, choice == "mk_yihuan_shangban", from.id)
end
}
local mk_yihuan = fk.CreateTrickCard {
name = "&mk_yihuan",
suit = Card.NoSuit,
number = 13,
skill = mk_yihuan_sk,
}
extension:addCards({
mk_yihuan,
})
Fk:loadTranslationTable {
["mk_yihuan"] = "缓",
[":mk_yihuan"] = "令一名其他角色展示一半手牌(向上取整),你选择获得其展示的牌或未展示的牌",
["mk_yihuan_skill"] = "缓",
["#mk_yihuan_skill"] = "令一名其他角色展示一半手牌(向上取整),你选择获得其展示的牌或未展示的牌",
["#mk_yihuan-card"] = "缓:展示 %arg 张手牌,%src 选择获得你展示的牌或未展示的牌",
["#mk_yihuan-choice"] = "缓:选择获得 %dest 的牌",
["mk_yihuan_shangban"] = "获得其展示的牌",
["mk_yihuan_xiaban"] = "获得其未展示的 %arg 张牌",
}
local mk_tuji_sk = fk.CreateActiveSkill {
name = "mk_tuji_skill",
prompt = "#mk_tuji_skill",
min_target_num = 1,
target_filter = function(self, to_select, selected, _, card)
return #selected < self:getMaxTargetNum(Self, card) and to_select ~= Self.id and
(Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy")
end,
on_action = function(self, room, use, finished)
if not finished then
local player = room:getPlayerById(use.from)
local type = room:askForChoice(player, { "basic", "trick", "equip", "Cancel" }, self.name)
if type ~= "Cancel" then
use.extra_data = use.extra_data or {}
use.extra_data.mk_tuji_type = type
end
end
end,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
if from.dead or to.dead or to:isAllNude() then return end
local cards = {}
local type = (effect.extra_data or {}).mk_tuji_type
if type then
cards = table.filter(to:getCardIds("hej"), function(id)
return Fk:getCardById(id):getTypeString() == type
end)
end
if #cards == 0 then
cards = to:getCardIds("hej")
end
if #cards > 0 then
room:moveCardTo(table.random(cards), Card.PlayerHand, from, fk.ReasonPrey, self.name, nil, false, from.id)
end
end
}
local mk_tuji = fk.CreateTrickCard {
name = "&mk_tuji",
suit = Card.NoSuit,
number = 13,
skill = mk_tuji_sk,
}
extension:addCards({
mk_tuji,
})
Fk:loadTranslationTable {
["mk_tuji"] = "突",
[":mk_tuji"] = "对任意名其他角色使用,随机获得其区域内一张牌(你可选择优先获得的牌类型!)",
["mk_tuji_skill"] = "突",
["#mk_tuji_skill"] = "对任意名其他角色使用,随机获得其区域内一张牌(你可选择优先获得的牌类型!)",
}
local mk_shoulie_sk = fk.CreateActiveSkill {
name = "mk_shoulie",
prompt = "#mk_shoulie",
mod_target_filter = Util.TrueFunc,
target_filter = function(self, to_select, selected, _, card)
if #selected < self:getMaxTargetNum(Self) and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy") then
return self:modTargetFilter(to_select, selected, Self.id, card, false)
end
end,
target_num = 1,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
if to.dead then return end
room:setPlayerMark(to, "@!mk_hunter", 1)
room:useVirtualCard("slash", nil, from, to, self.name, true)
end
}
local mk_shoulie_trigger = fk.CreateTriggerSkill {
name = "mk_shoulie_trigger",
global = true,
mute = true,
priority = 0.1,
events = { fk.DamageInflicted },
can_trigger = function(self, event, target, player, data)
return target == player and player:getMark("@!mk_hunter") > 0 and data.from and not data.from.dead and
data.from:hasSkill("sw_fengyin")
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
data.damage = data.damage + 1
end,
}
Fk:addSkill(mk_shoulie_trigger)
local mk_shoulie = fk.CreateTrickCard {
name = "&mk_shoulie",
suit = Card.NoSuit,
number = 13,
skill = mk_shoulie_sk,
}
extension:addCards({
mk_shoulie,
})
Fk:loadTranslationTable {
["mk_shoulie"] = "狩",
["#mk_shoulie"] = "令一名其他角色成为你的狩猎目标,立即视为对其使用一张【杀】;你对狩猎目标造成的伤害+1",
[":mk_shoulie"] = "令一名其他角色成为你的狩猎目标,立即视为对其使用一张【杀】;你对狩猎目标造成的伤害+1",
}
local mk_yinlei_sk = fk.CreateActiveSkill {
name = "mk_yinlei",
prompt = "#mk_yinlei",
mod_target_filter = Util.TrueFunc,
target_filter = function(self, to_select, selected, _, card)
if #selected < self:getMaxTargetNum(Self) and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy") then
return self:modTargetFilter(to_select, selected, Self.id, card, false)
end
end,
target_num = 1,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
for i = 1, 3, 1 do
local judge = {
who = to,
reason = "lightning",
pattern = ".|2~12|spade",
}
room:judge(judge)
if judge.card.suit == Card.Spade and judge.card.number >= 2 and judge.card.number <= 12 then
room:damage {
to = to,
damage = 3,
damageType = fk.ThunderDamage,
skillName = self.name,
}
break
else
from:drawCards(1)
end
if from.dead or to.dead then
break
end
end
end
}
local mk_yinlei = fk.CreateTrickCard {
name = "&mk_yinlei",
suit = Card.NoSuit,
number = 13,
skill = mk_yinlei_sk,
}
extension:addCards({
mk_yinlei,
})
Fk:loadTranslationTable {
["mk_yinlei"] = "雷",
["#mk_yinlei"] = "令一名角色进行三次点数为2~12的闪电判定,每次判定失败你摸一张牌,判定生效后结束",
[":mk_yinlei"] = "令一名角色进行三次点数为2~12的闪电判定,每次判定失败你摸一张牌,判定生效后结束",
}
local mk_wangzun_sk = fk.CreateActiveSkill {
name = "mk_wangzun",
prompt = "#mk_wangzun",
mod_target_filter = Util.TrueFunc,
target_filter = function(self, to_select, selected, _, card)
if #selected < self:getMaxTargetNum(Self) and (Self.general == "sw__xy" or Self.deputyGeneral == "sw__xy") then
return self:modTargetFilter(to_select, selected, Self.id, card, false)
end
end,
target_num = 1,
on_effect = function(self, room, effect)
local from = room:getPlayerById(effect.from)
local to = room:getPlayerById(effect.to)
if #table.filter(room.alive_players, function(p)
return #p:getCardIds(Player.Hand) > #from:getCardIds(Player.Hand)
end) then
local draw = 0
for _, p in ipairs(room:getOtherPlayers(to)) do
draw = math.max(draw, p:getHandcardNum())
end
to:drawCards(draw - to:getHandcardNum(), self.name)
end
to:gainAnExtraTurn()
room:setPlayerMark(to, "@@mk_fangquan", 1)
end
}
local mk_wangzun_trigger = fk.CreateTriggerSkill {
name = "mk_wangzun_trigger",
global = true,
mute = true,
priority = 0.1,
events = { fk.EventPhaseEnd },
can_trigger = function(self, event, target, player, data)
return target:getMark("@@mk_fangquan") > 0 and target.phase == Player.Play and
table.find(player.room.alive_players, function(p) return p.general == "sw__xy" end)
end,
on_cost = Util.TrueFunc,
on_use = function(self, event, target, player, data)
if not target:isKongcheng() then
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(target.player_cards[Player.Hand])
player.room:obtainCard(
table.find(player.room.alive_players, function(p) return p.general == "sw__xy" end).id, dummy, false,
fk.ReasonPrey)
player.room:setPlayerMark(target, "@@mk_fangquan", 0)
end
end,
}
Fk:addSkill(mk_wangzun_trigger)
local mk_wangzun = fk.CreateTrickCard {
name = "&mk_wangzun",
suit = Card.NoSuit,
number = 13,
skill = mk_wangzun_sk,
}
extension:addCards({
mk_wangzun,
})
Fk:loadTranslationTable {
["mk_wangzun"] = "妄",
["@@mk_fangquan"] = "妄",
["#mk_wangzun"] = "令一名角色将手牌摸至全场最多,然后于本回合结束后执行一个额外的回合,此回合结束时,你获得其所有牌",
[":mk_wangzun"] = "令一名角色将手牌摸至全场最多,然后于本回合结束后执行一个额外的回合,此回合结束时,你获得其所有牌",
["mk_wangzun_trigger"] = "妄",
}
local fz_Archer_sk = fk.CreateActiveSkill {
name = "fz_Archer",
}
local fz_Archer = fk.CreateTrickCard {
name = "&fz_Archer",
suit = Card.NoSuit,
number = 1,
skill = fz_Archer_sk,
}
extension:addCards({
fz_Archer,
})
Fk:loadTranslationTable {
["fz_Archer"] = "弓兵",
[":fz_Archer"] = "〖弓兵〗:你使用的【杀】可以额外指定至多三个目标",
}
local fz_Saber_sk = fk.CreateActiveSkill {
name = "fz_Saber",
}
local fz_Saber = fk.CreateTrickCard {
name = "&fz_Saber",
suit = Card.NoSuit,
number = 1,
skill = fz_Saber_sk,
}
extension:addCards({
fz_Saber,
})
Fk:loadTranslationTable {
["fz_Saber"] = "剑士",
[":fz_Saber"] = "〖剑士〗:出牌阶段限一次,你可以获得一张随机的武器牌,然后令本回合使用【杀】的次数+1",
}
local fz_Lancer_sk = fk.CreateActiveSkill {
name = "fz_Lancer",
}
local fz_Lancer = fk.CreateTrickCard {
name = "&fz_Lancer",
suit = Card.NoSuit,
number = 1,
skill = fz_Lancer_sk,
}
extension:addCards({
fz_Lancer,
})
Fk:loadTranslationTable {
["fz_Lancer"] = "枪兵",
[":fz_Lancer"] = "〖枪兵〗:锁定技,其他角色无法响应你使用的牌",
}
local fz_Rider_sk = fk.CreateActiveSkill {
name = "fz_Rider",
}
local fz_Rider = fk.CreateTrickCard {
name = "&fz_Rider",
suit = Card.NoSuit,
number = 1,
skill = fz_Rider_sk,
}
extension:addCards({
fz_Rider,
})
Fk:loadTranslationTable {
["fz_Rider"] = "骑兵",
[":fz_Rider"] = "〖骑兵〗:锁定技,其他角色至你的距离+X;你至其他角色的距离-X(X为你的装备区牌数)",
}
local fz_Berserker_sk = fk.CreateActiveSkill {
name = "fz_Berserker",
}
local fz_Berserker = fk.CreateTrickCard {
name = "&fz_Berserker",
suit = Card.NoSuit,
number = 1,
skill = fz_Berserker_sk,
}
extension:addCards({
fz_Berserker,
})
Fk:loadTranslationTable {
["fz_Berserker"] = "狂战",
[":fz_Berserker"] = "〖狂战〗:锁定技,你使用【杀】无次数限制且造成的伤害+1",
}
local fz_Assassin_sk = fk.CreateActiveSkill {
name = "fz_Assassin",
}
local fz_Assassin = fk.CreateTrickCard {
name = "&fz_Assassin",
suit = Card.NoSuit,
number = 1,
skill = fz_Assassin_sk,
}
extension:addCards({
fz_Assassin,
})
Fk:loadTranslationTable {
["fz_Assassin"] = "隐匿",
[":fz_Assassin"] = "〖隐匿〗:锁定技,防止你每回合受到的首次伤害;你的【杀】视为毒【杀】",
}
local fz_Caster_sk = fk.CreateActiveSkill {
name = "fz_Caster",
}
local fz_Caster = fk.CreateTrickCard {
name = "&fz_Caster",
suit = Card.NoSuit,
number = 1,
skill = fz_Caster_sk,
}
extension:addCards({
fz_Caster,
})
Fk:loadTranslationTable {
["fz_Caster"] = "术师",
[":fz_Caster"] = "〖术师〗:锁定技,当你使用未被记录的锦囊牌后,摸一张牌,然后记录此牌,若此牌为伤害牌,额外结算一次",
}
local fz_Avenger_sk = fk.CreateActiveSkill {
name = "fz_Avenger",
}
local fz_Avenger = fk.CreateTrickCard {
name = "&fz_Avenger",
suit = Card.NoSuit,
number = 1,
skill = fz_Avenger_sk,
}
extension:addCards({
fz_Avenger,
})
Fk:loadTranslationTable {
["fz_Avenger"] = "复仇",
[":fz_Avenger"] = "〖复仇〗:限定技,出牌阶段,你令一名角色对你造成两点伤害,然后令其判定,若结果不为红桃,你对其造成三点伤害",
}
local fz_Ruler_sk = fk.CreateActiveSkill {
name = "fz_Ruler",
}
local fz_Ruler = fk.CreateTrickCard {
name = "&fz_Ruler",
suit = Card.NoSuit,
number = 1,
skill = fz_Ruler_sk,
}
extension:addCards({
fz_Ruler,
})
Fk:loadTranslationTable {
["fz_Ruler"] = "裁定",
[":fz_Ruler"] = "〖裁定〗:限定技,出牌阶段,你令一名其他角色于其下个回合结束前所有技能失效",
}
local fz_Alterego_sk = fk.CreateActiveSkill {
name = "fz_Alterego",
}
local fz_Alterego = fk.CreateTrickCard {
name = "&fz_Alterego",
suit = Card.NoSuit,
number = 1,
skill = fz_Alterego_sk,
}
extension:addCards({
fz_Alterego,
})
Fk:loadTranslationTable {
["fz_Alterego"] = "他我",
[":fz_Alterego"] = "〖他我〗:限定技,出牌阶段,你视为对至多三名其他角色使用一张火【杀】,若造成伤害,本局游戏你造成的伤害永久+1",
}
local fz_Foreigner_sk = fk.CreateActiveSkill {
name = "fz_Foreigner",
}
local fz_Foreigner = fk.CreateTrickCard {
name = "&fz_Foreigner",
suit = Card.NoSuit,
number = 1,
skill = fz_Foreigner_sk,
}
extension:addCards({
fz_Foreigner,
})
Fk:loadTranslationTable {
["fz_Foreigner"] = "神临",
[":fz_Foreigner"] = "〖神临〗:限定技,出牌阶段,你可以将所有英灵技能及已生效的效果传递给一名其他角色,然后你死亡",
}
local mdks_yeyun_skill = fk.CreateTriggerSkill {
name = "#mdks_yeyun_skill",
attached_equip = "mdks_yeyun",
frequency = Skill.Compulsory,
events = { fk.CardUsing },
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and target == player then
if event == fk.CardUsing and not (data.card:isVirtual() and #data.card.subcards == 0) then
return data.card.is_damage_card
end
end
end,
on_use = function(self, event, target, player, data)
player.room:notifySkillInvoked(player, self.name, "drawcard")
if event == fk.CardUsing then
player:drawCards(1, self.name)
end
end,
}
Fk:addSkill(mdks_yeyun_skill)
local mdks_yeyun = fk.CreateWeapon {
name = "&mdks_yeyun",
suit = Card.Spade,
number = 13,
attack_range = 3,
equip_skill = mdks_yeyun_skill,
}
extension:addCard(mdks_yeyun)
Fk:loadTranslationTable {
["mdks_yeyun"] = "夜陨",
[":mdks_yeyun"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:锁定技,你使用非虚拟伤害牌时,摸一张牌。",
["#mdks_yeyun_skill"] = "夜陨",
}
local ym_louguan_sk = fk.CreateTriggerSkill {
name = "#ym_louguan_sk",
attached_equip = "ym_louguan",
events = { fk.AfterCardUseDeclared },
can_trigger = function(self, _, target, player, data)
return target == player and player:hasSkill(self) and data.card.trueName == "slash" and
#player:getTableMark( "@$sw_yaohun") > 0
end,
on_cost = function(self, event, target, player, data)
local all_choices = {}
local mark = player:getTableMark( "@$sw_yaohun")
for _, name in ipairs(mark) do
local card = Fk:cloneCard(name)
table.insertIfNeed(all_choices, card.name)
end
local choices = table.simpleClone(all_choices)
table.removeOne(choices, data.card.name)
if #choices > 0 and player.room:askForSkillInvoke(player, self.name) then
local choice = player.room:askForChoice(player, choices, self.name, nil, false, all_choices)
self.cost_data = choice
return true
end
end,
on_use = function(self, event, target, player, data)
local mark = player:getTableMark( "@$sw_yaohun")
player.room:notifySkillInvoked(player, "ym_louguan_sk", "support")
player.room:doBroadcastNotify("ShowToast", "<font color='red'>此【杀】已被转化为" .. Fk:translate(self.cost_data) .. "</font>")
local card = Fk:cloneCard(self.cost_data, data.card.suit, data.card.number)
for k, v in pairs(data.card) do
if card[k] == nil then
card[k] = v
end
end
if data.card:isVirtual() then
card.subcards = data.card.subcards
else
card.id = data.card.id
end
card.skillNames = data.card.skillNames
card.skillName = "ym_louguan"
data.card = card
table.removeOne(mark, self.cost_data)
player.room:setPlayerMark(player, "@$sw_yaohun", #mark > 0 and mark or 0)
end,
}
local ym_louguan_sk_tar = fk.CreateTargetModSkill {
name = "#ym_louguan_sk_tar",
residue_func = function(self, player, skill, scope, card)
if card and player:hasSkill(self.name) and card.trueName == "slash" and scope == Player.HistoryPhase then
return 2
end
end
}
ym_louguan_sk:addRelatedSkill(ym_louguan_sk_tar)
Fk:addSkill(ym_louguan_sk)
local ym_louguan = fk.CreateWeapon {
name = "&ym_louguan",
suit = Card.Diamond,
number = 7,
attack_range = 2,
equip_skill = ym_louguan_sk,
}
extension:addCard(ym_louguan)
Fk:loadTranslationTable {
["ym_louguan"] = "楼观剑",
["#ym_louguan_sk_tar"] = "楼观剑",
["#ym_louguan_sk"] = "楼观剑",
[":ym_louguan"] = "装备牌·武器<br/><b>攻击范围</b>:2<br/><b>武器技能</b>:出牌阶段限一次,当你声明使用的【杀】后,你可以将此【杀】改为你〖妖魂〗记录的牌并移除记录;你使用【杀】的次数+2",
}
local xl_cygs_skill = fk.CreateActiveSkill {
name = "xl_cygs_skill",
attached_equip = "xl_cygs",
anim_type = "support",
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)
return #selected == 0 and to_select ~= Self.id
end,
on_use = function(self, room, effect)
local player = room:getPlayerById(effect.from)
player:broadcastSkillInvoke("sw_yineng", math.random(3, 4))
local n = 0
for _, ids in ipairs(room:getAlivePlayers()) do
room:setPlayerMark(ids, "ganshe_record", ids.hp)
end
local first = room:getPlayerById(effect.tos[1])
local targets = { first }
local temp = first:getLastAlive()
while temp ~= first do
if not temp.dead then
table.insert(targets, temp)
end
temp = temp:getLastAlive()
end
table.removeOne(targets, player)
for _, target in ipairs(targets) do
if not target.dead then
local last = target:getLastAlive()
if last == player then
last = player:getLastAlive()
end
local use = {
from = target.id,
tos = { { last.id } },
card = Fk:cloneCard("fire__slash"),
extraUse = true,
}
use.card.skillName = self.name
room:useCard(use)
if use.damageDealt then
n = n + 1
room:setPlayerMark(last, "ganshe_damaged", 1)
end
end
end
if n == 0 then
player:drawCards(#player.room.alive_players)
end
for _, tar in ipairs(room:getAlivePlayers()) do
if tar:getMark("ganshe_damaged") > 0 then
local names = {}
for _, id in ipairs(Fk:getAllCardIds()) do
local card = Fk:getCardById(id)
if not card.is_derived then
if card.trueName ~= "peach" and card.trueName ~= "analeptic" then
table.insertIfNeed(names, card.trueName)
end
end
end
if #names > 0 then
local choice = room:askForChoice(player, names, self.name, "#baozou-choice:" .. tar.id)
room:setPlayerMark(tar, "@xl_xingxiegive", choice)
room:setPlayerMark(tar, "xl_xingxiefrom", player.id)
tar.hp = math.min(tar.maxHp, tar:getMark("ganshe_record"))
room:broadcastProperty(tar, "hp")
room:setPlayerMark(tar, "ganshe_record", 0)
end
end
end
end,
}
Fk:addSkill(xl_cygs_skill)
local xl_cygs = fk.CreateTreasure {
name = "&xl_cygs",
suit = Card.Spade,
number = 6,
equip_skill = xl_cygs_skill,
}
extension:addCard(xl_cygs)
Fk:loadTranslationTable {
["xl_cygs"] = "次元干涉",
["xl_cygs_skill"] = "干涉",
[":xl_cygs_skill"] = "出牌阶段限一次,你选择一名角色,从其开始的其他所有角色依次视为对自己上家使用一张火【杀】," ..
"所有角色均结算完毕后,你令受到伤害的角色获得『星屑』,然后将其体力调整至发动此效果前,若没有角色因此受伤,你摸X张牌(X为存活角色数)",
[":xl_cygs"] = "装备牌·宝物<br /><b>宝物技能</b>:出牌阶段限一次,你选择一名角色,从其开始的其他所有角色依次视为对自己上家使用一张火【杀】," ..
"所有角色均结算完毕后,你令受到伤害的角色获得『星屑』,然后将其体力调整至发动此效果前,若没有角色因此受伤,你摸X张牌(X为存活角色数)",
}
--将输入的小数点转化为百分比,"%.0f%%"中.0等于小数点后的位数
function numbfb(num)
return string.format("%.0f%%", num * 100)
end
--将输入的整数设置为百分比
function zsbfb(number)
return tostring(number) .. "%"
end
local zhuhuo_jiuxiao_sk = fk.CreateActiveSkill {
name = "zhuhuo_jiuxiao_skill",
prompt = "#zhuhuo_jiuxiao_skill",
mod_target_filter = Util.TrueFunc,
can_use = function(self, player, card)
return (player.general == "bh2__jiuxiao" or player.deputyGeneral == "bh2__jiuxiao")
end,
on_use = function(self, room, cardUseEvent)
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
cardUseEvent.tos = { { cardUseEvent.from } }
end
end,
on_effect = function(self, room, effect)
local target = room:getPlayerById(effect.to)
if target:getMark("@jx_chongneng") == 0 then
room:setPlayerMark(target, "@jx_chongneng", zsbfb(30))
elseif target:getMark("@jx_chongneng") ~= 0 then
local num1 = tonumber(string.sub(target:getMark("@jx_chongneng"), 1, -2))
room:setPlayerMark(target, "@jx_chongneng", zsbfb(num1 + 30))
end
end
}
local zhuhuo_jiuxiao = fk.CreateTrickCard {
name = "&zhuhuo_jiuxiao",
suit = Card.Heart,
number = 1,
skill = zhuhuo_jiuxiao_sk,
special_skills = { "recast" },
}
extension:addCards({
zhuhuo_jiuxiao,
zhuhuo_jiuxiao:clone(Card.Heart, 2),
zhuhuo_jiuxiao:clone(Card.Heart, 3),
zhuhuo_jiuxiao:clone(Card.Heart, 4),
zhuhuo_jiuxiao:clone(Card.Heart, 5),
zhuhuo_jiuxiao:clone(Card.Heart, 6),
zhuhuo_jiuxiao:clone(Card.Heart, 7),
zhuhuo_jiuxiao:clone(Card.Heart, 8),
zhuhuo_jiuxiao:clone(Card.Heart, 9),
zhuhuo_jiuxiao:clone(Card.Heart, 10),
zhuhuo_jiuxiao:clone(Card.Heart, 11),
zhuhuo_jiuxiao:clone(Card.Heart, 12),
zhuhuo_jiuxiao:clone(Card.Heart, 13),
})
Fk:loadTranslationTable {
["zhuhuo_jiuxiao"] = "逐火之蛾",
[":zhuhuo_jiuxiao"] = "对你使用,为你增加30%武器充能",
["zhuhuo_jiuxiao_skill"] = "逐火之蛾",
["#zhuhuo_jiuxiao_skill"] = "对你使用,为你增加30%武器充能",
}
local sw_zy_zhongpao_sk = fk.CreateTriggerSkill {
name = "#sw_zy_zhongpao_sk",
attached_equip = "zy_zhongpao",
events = { fk.DamageCaused },
can_trigger = function(self, event, target, player, data)
local n = tonumber(string.sub(player:getMark("@jx_chongneng"), 1, -2))
return target == player and player:hasSkill(self) and player:getMark("@jx_chongneng") ~= 0 and n >= 25 and
#player:getPile("zy_zhongyan") ~= 0
end,
on_cost = function(self, event, target, player, data)
local n = 0
for _, p in ipairs(player.room.alive_players) do
if player:inMyAttackRange(p) then
n = n + 1
end
end
return player.room:askForSkillInvoke(player, self.name, nil, "#zp-invoke:::" .. n)
end,
on_use = function(self, event, target, player, data)
local room = player.room
local tar = data.to
local num1 = tonumber(string.sub(target:getMark("@jx_chongneng"), 1, -2))
if num1 >= 26 then
room:setPlayerMark(target, "@jx_chongneng", zsbfb(num1 - 25))
else
room:setPlayerMark(target, "@jx_chongneng", 0)
end
local n = 0
for _, p in ipairs(room.alive_players) do
if player:inMyAttackRange(p) then
n = n + 1
end
end
local cards = room:askForCard(tar, n, n, false, self.name, true, nil, "#zp_dis-ask:::" .. n)
if #cards > 0 then
room:throwCard(cards, self.name, tar, tar)
else
room:addPlayerMark(tar, "@zp_juli-", 1)
end
end
}
local sw_zy_zhongpao_sk_attackrange = fk.CreateAttackRangeSkill {
name = "#sw_zy_zhongpao_sk_attackrange",
correct_func = function(self, from, to)
if from:getMark("@zp_juli-") > 0 then
return -from:getMark("@zp_juli-")
end
end,
}
sw_zy_zhongpao_sk:addRelatedSkill(sw_zy_zhongpao_sk_attackrange)
Fk:addSkill(sw_zy_zhongpao_sk)
local zy_zhongpao = fk.CreateWeapon {
name = "&zy_zhongpao",
suit = Card.Diamond,
number = 1,
attack_range = 9,
equip_skill = sw_zy_zhongpao_sk,
}
extension:addCards({
zy_zhongpao,
})
Fk:loadTranslationTable {
["zy_zhongpao"] = "终焉-重炮",
[":zy_zhongpao"] = "装备牌·武器<br /><b>攻击范围</b>:9<br /><b>武器技能</b>:当你对其他角色造成伤害时,你可以消耗25%充能,令其选择弃置X张手牌或本局游戏攻击距离-1(X为你攻击范围内的角色数)",
["@zp_juli-"] = "终焉",
["#sw_zy_zhongpao_sk"] = "重炮",
["#zp_dis-ask"] = "重炮:弃置%arg张手牌或点击取消令攻击距离永久-1",
["#zp-invoke"] = "重炮:是否消耗25%充能,令其选择弃置 %arg 张手牌或本局游戏攻击距离-1",
}
local sw_zy_shuangbi_sk = fk.CreateTriggerSkill {
name = "#sw_zy_shuangbi_sk",
attached_equip = "zy_shuangbi",
events = { fk.TargetSpecified },
can_trigger = function(self, event, target, player, data)
local n = tonumber(string.sub(player:getMark("@jx_chongneng"), 1, -2))
return player:hasSkill(self) and data.card and target == player and player:getMark("@jx_chongneng") ~= 0 and n >= 30 and
data.card.trueName == "slash" and player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and
#player:getPile("zy_zhongyan") ~= 0
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#shuangbi-invoke")
end,
on_use = function(self, event, target, player, data)
local room = player.room
local num1 = tonumber(string.sub(target:getMark("@jx_chongneng"), 1, -2))
if num1 >= 36 then
room:setPlayerMark(target, "@jx_chongneng", zsbfb(num1 - 35))
else
room:setPlayerMark(target, "@jx_chongneng", 0)
end
local use = {
from = player.id,
tos = { { data.to } },
card = Fk:cloneCard("thunder__slash"),
extraUse = true,
}
use.card.skillName = self.name
room:useCard(use)
if use.damageDealt then
for _, p in ipairs(room.players) do
if use.damageDealt[p.id] then
if p:getMark("@@shuangbi_jl-turn") == 0 then
room:setPlayerMark(p, "@@shuangbi_jl-turn", 1)
end
end
end
end
end,
refresh_events = { fk.PreHpRecover },
can_refresh = function(self, event, target, player, data)
return target:getMark("@@shuangbi_jl-turn") > 0
end,
on_refresh = function(self, event, target, player, data)
data.num = 0
end
}
Fk:addSkill(sw_zy_shuangbi_sk)
local zy_shuangbi = fk.CreateWeapon {
name = "&zy_shuangbi",
suit = Card.Diamond,
number = 1,
attack_range = 2,
equip_skill = sw_zy_shuangbi_sk,
}
extension:addCards({
zy_shuangbi,
})
Fk:loadTranslationTable {
["zy_shuangbi"] = "终焉-双匕",
[":zy_shuangbi"] = "装备牌·武器<br /><b>攻击范围</b>:2<br /><b>武器技能</b>:每阶段限一次,当你使用【杀】指定目标时,你可以消耗35%充能,视为对其使用一张雷【杀】,若造成伤害,其本回合无法回复体力",
["#sw_zy_shuangbi_sk"] = "双匕",
["@@shuangbi_jl-turn"] = "禁疗",
["#shuangbi-invoke"] = "双匕:是否对其追加雷【杀】,若造成伤害对其附加禁疗效果",
}
local sw_zy_jujian_sk = fk.CreateTriggerSkill {
name = "#sw_zy_jujian_sk",
attached_equip = "zy_jujian",
events = { fk.DamageInflicted },
can_trigger = function(self, event, target, player, data)
local n = tonumber(string.sub(player:getMark("@jx_chongneng"), 1, -2))
return player:hasSkill(self.name) and target == player and player:getMark("@jx_chongneng") ~= 0 and n >= 60 and
data.from and data.from ~= player and #player:getPile("zy_zhongyan") ~= 0
end,
on_cost = function(self, event, target, player, data)
return player.room:askForSkillInvoke(player, self.name, nil, "#jujian-invoke:" .. data.from.id)
end,
on_use = function(self, event, target, player, data)
local room = player.room
local num1 = tonumber(string.sub(target:getMark("@jx_chongneng"), 1, -2))
if num1 >= 56 then
room:setPlayerMark(target, "@jx_chongneng", zsbfb(num1 - 55))
else
room:setPlayerMark(target, "@jx_chongneng", 0)
end
data.damage = data.damage - data.damage
local use = {
from = player.id,
tos = { { data.from.id } },
card = Fk:cloneCard("slash"),
extraUse = true,
}
use.card.skillName = self.name
room:useCard(use)
end,
refresh_events = { fk.DamageCaused },
can_refresh = function(self, event, target, player, data)
if not player:hasSkill(self) then return false end
return data.from == player and data.card and data.card.trueName == "slash" and
table.contains(data.card.skillNames, self.name)
end,
on_refresh = function(self, event, target, player, data)
data.damage = data.damage + 1
end,
}
Fk:addSkill(sw_zy_jujian_sk)
local zy_jujian = fk.CreateWeapon {
name = "&zy_jujian",
suit = Card.Diamond,
number = 1,
attack_range = 4,
equip_skill = sw_zy_jujian_sk,
}
extension:addCards({
zy_jujian,
})
Fk:loadTranslationTable {
["zy_jujian"] = "终焉-巨剑",
[":zy_jujian"] = "装备牌·武器<br /><b>攻击范围</b>:4<br /><b>武器技能</b>:当你受到伤害时,你可以消耗55%充能,防止此伤害并视为对伤害来源使用一张伤害+1的【杀】",
["#sw_zy_jujian_sk"] = "巨剑",
["#jujian-invoke"] = "巨剑:是否防止此伤害,对 %src 使用一张【杀】",
}
local yy_yyjm_sk = fk.CreateTriggerSkill {
name = "#yy_yyjm_sk",
attached_equip = "yy_ydjm",
frequency = Skill.Compulsory,
events = { fk.CardUseFinished },
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self) and target == player and data.tos and
table.find(TargetGroup:getRealTargets(data.tos),
function(id) return id ~= player.id and not player.room:getPlayerById(id).dead end) and not data.damageDealt
end,
on_use = function(self, event, target, player, data)
local room = player.room
local targets = TargetGroup:getRealTargets(data.tos)
for _, id in ipairs(targets) do
target = room:getPlayerById(id)
room:addPlayerMark(target, "@ydjm_mieque", 1)
end
end,
}
local yy_yyjm_sk_ttargetmod = fk.CreateTargetModSkill {
name = "#yy_yyjm_sk_ttargetmod",
bypass_distances = function(self, player, skill, card, to)
return table.find(player:getEquipments(Card.SubtypeWeapon), function(id)
return Fk:getCardById(id).name == "yy_ydjm"
end) and to and to:getMark("@cymy_suming") > 0
end,
}
local qyn_cymy_sk_jxtarget_mod = fk.CreateTargetModSkill {
name = "#qyn_cymy_sk_jxtarget_mod",
bypass_times = function(self, player, skill, scope, card, to)
return table.find(player:getEquipments(Card.SubtypeWeapon), function(id)
return Fk:getCardById(id).name == "yy_ydjm"
end) and scope == Player.HistoryPhase and to and to:getMark("@ydjm_mieque") > 0 and
player:getMark("xingdan_yichu") > 0
end,
}
yy_yyjm_sk:addRelatedSkill(qyn_cymy_sk_jxtarget_mod)
yy_yyjm_sk:addRelatedSkill(yy_yyjm_sk_ttargetmod)
Fk:addSkill(yy_yyjm_sk)
local yy_ydjm = fk.CreateWeapon {
name = "&yy_ydjm",
suit = Card.Club,
number = 5,
attack_range = 2,
equip_skill = yy_yyjm_sk,
}
extension:addCards({
yy_ydjm,
})
Fk:loadTranslationTable {
["yy_ydjm"] = "妖刀·寂灭",
[":yy_ydjm"] = "装备牌·武器<br /><b>攻击范围</b>:2<br /><b>武器技能</b>:锁定技,当你对其他角色使用牌结算后,若此牌未造成伤害,令其获得一层『灭却』;你对有『宿命』的角色使用牌无距离限制。",
["#qyn_cymy_sk_jxtarget_mod"] = "寂灭",
["#yy_yyjm_sk_ttargetmod"] = "寂灭",
["@ydjm_mieque"] = "灭却",
["#yy_yyjm_sk"] = "寂灭",
}
local qyn_cymy_sk = fk.CreateTriggerSkill {
name = "#qyn_cymy_sk",
attached_equip = "qyn_cymy",
frequency = Skill.Compulsory,
events = { fk.CardUseFinished },
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self) and data.tos and
table.find(TargetGroup:getRealTargets(data.tos),
function(id) return id ~= player.id and not player.room:getPlayerById(id).dead end) and
data.card.is_damage_card
end,
on_use = function(self, event, target, player, data)
local room = player.room
local targets = TargetGroup:getRealTargets(data.tos)
for _, id in ipairs(targets) do
target = room:getPlayerById(id)
room:addPlayerMark(target, "@cymy_suming", 1)
end
end,
}
local qyn_cymy_sk_target_mod = fk.CreateTargetModSkill {
name = "#qyn_cymy_sk_target_mod",
bypass_times = function(self, player, skill, scope, card, to)
return table.find(player:getEquipments(Card.SubtypeWeapon), function(id)
return Fk:getCardById(id).name == "qyn_cymy"
end) and scope == Player.HistoryPhase and to and to:getMark("@ydjm_mieque") > 0
end,
}
local yy_yyjm_sk_jxttargetmod = fk.CreateTargetModSkill {
name = "#yy_yyjm_sk_jxttargetmod",
bypass_distances = function(self, player, skill, card, to)
return table.find(player:getEquipments(Card.SubtypeWeapon), function(id)
return Fk:getCardById(id).name == "qyn_cymy"
end) and to and to:getMark("@cymy_suming") > 0 and player:getMark("kongzhen_yichu") > 0
end,
}
qyn_cymy_sk:addRelatedSkill(yy_yyjm_sk_jxttargetmod)
qyn_cymy_sk:addRelatedSkill(qyn_cymy_sk_target_mod)
Fk:addSkill(qyn_cymy_sk)
local qyn_cymy = fk.CreateWeapon {
name = "&qyn_cymy",
suit = Card.Diamond,
number = 5,
attack_range = 2,
equip_skill = qyn_cymy_sk,
}
extension:addCards({
qyn_cymy,
})
Fk:loadTranslationTable {
["qyn_cymy"] = "超越·命运",
[":qyn_cymy"] = "装备牌·武器<br /><b>攻击范围</b>:4<br /><b>武器技能</b>:锁定技,当你对其他角色使用牌结算后,若此牌为伤害牌,令其获得一层『宿命』;你对有『灭却』的角色使用牌无次数限制。",
["#yy_yyjm_sk_jxttargetmod"] = "命运",
["#qyn_cymy_sk_target_mod"] = "命运",
["@cymy_suming"] = "宿命",
["#qyn_cymy_sk"] = "宿命",
}
local mj_dzt_skill = fk.CreateTriggerSkill {
name = "#mj_dzt_skill",
attached_equip = "mj_duanzaotai",
}
Fk:addSkill(mj_dzt_skill)
local dzt_juliup = fk.CreateAttackRangeSkill {
name = "dzt_juliup",
global = true,
priority = 0,
correct_func = function(self, from, to)
if from:getMark("rd_juli") > 0 then
return from:getMark("rd_juli")
end
end,
}
Fk:addSkill(dzt_juliup)
local mj_duanzaotai = fk.CreateTreasure {
name = "&mj_duanzaotai",
suit = Card.Heart,
number = 13,
equip_skill = mj_dzt_skill,
on_install = function(self, room, player)
if player:isAlive() and self.equip_skill:isEffectable(player) then
local mark = player:getTableMark( "@[:]mj_rongduan")
if self:getMark("rd_zhu") ~= 0 or self:getMark("rd_fu") ~= 0 then
table.insert(mark, self:getMark("rd_zhu"))
table.insert(mark, self:getMark("rd_fu"))
end
--丈八添加技能
if self:getMark("rd_zhu") == "rd_zhangbamao_zhu" then
room:handleAddLoseSkills(player, "rd_zhangbamao_zhu&", nil, true, false)
end
if self:getMark("rd_fu") == "rd_zhangbamao_fu" then
room:handleAddLoseSkills(player, "rd_zhangbamao_fu&", nil, true, false)
end
--神啸添加技能
if self:getMark("rd_zhu") == "rd_shenxiao_zhu" then
room:handleAddLoseSkills(player, "rd_shenxiao_zhu&", nil, true, false)
end
if self:getMark("rd_fu") == "rd_shenxiao_fu" then
room:handleAddLoseSkills(player, "rd_shenxiao_fu&", nil, true, false)
end
--八卦阵添加技能
if self:getMark("rd_zhu") == "rd_baguazhen_zhu" then
room:handleAddLoseSkills(player, "rd_baguazhen_zhu&", nil, true, false)
end
--藤甲护甲/血量上限
if self:getMark("rd_zhu") == "rd_tengjia_zhu&" then
room:changeShield(player, 1)
end
if self:getMark("rd_fu") == "rd_tengjia_fu&" then
room:changeMaxHp(player, 2)
end
--女装添加技能
if self:getMark("rd_zhu") == "rd_nvzhuang_zhu" then
room:handleAddLoseSkills(player, "rd_nvzhuang_zhu&", nil, true, false)
end
room:setPlayerMark(player, "@[:]mj_rongduan", #mark > 0 and mark or 0)
room:setCardMark(self, "rd_zhu", 0)
room:setCardMark(self, "rd_fu", 0)
end
end,
on_uninstall = function(self, room, player)
if player:isAlive() and self.equip_skill:isEffectable(player) then
local mark = player:getTableMark( "@[:]mj_rongduan")
for _, s in ipairs(mark) do
if s == "rd_tengjia_zhu&" then
room:changeShield(player, -1)
end
if s == "rd_tengjia_fu&" then
room:changeMaxHp(player, -2)
end
end
room:setPlayerMark(player, "@[:]mj_rongduan", 0)
room:setPlayerMark(player, "rd_juli", 0)
if player:getMark("@renwang_zhu") ~= 0 then
room:setPlayerMark(player, "@renwang_zhu", 0)
end
--丈八删除技能
if player:hasSkill("rd_zhangbamao_zhu&", true) or player:hasSkill("rd_zhangbamao_fu&", true) then
room:handleAddLoseSkills(player, "-rd_zhangbamao_zhu&", nil, true, false)
room:handleAddLoseSkills(player, "-rd_zhangbamao_fu&", nil, true, false)
end
--神啸删除技能
if player:hasSkill("rd_shenxiao_zhu&", true) or player:hasSkill("rd_shenxiao_fu&", true) then
room:handleAddLoseSkills(player, "-rd_shenxiao_zhu&", nil, true, false)
room:handleAddLoseSkills(player, "-rd_shenxiao_fu&", nil, true, false)
end
--八卦阵删除技能
if player:hasSkill("rd_baguazhen_zhu&", true) then
room:handleAddLoseSkills(player, "-rd_baguazhen_zhu&", nil, true, false)
end
--女装移除技能
if player:hasSkill("rd_nvzhuang_zhu&", true) then
room:handleAddLoseSkills(player, "-rd_nvzhuang_zhu&", nil, true, false)
end
--红莲移除技能
if player:getMark("honglian_skill") ~= 0 then
local skills = player:getMark("honglian_skill")
room:setPlayerMark(player, "honglian_skill", 0)
skills = table.filter(skills, function(sk_name)
return player:hasSkill(sk_name, true)
end)
if #skills == 0 then return false end
room:handleAddLoseSkills(player, "-" .. table.concat(skills, "|-"), nil, true, false)
end
--修罗戟移除技能
if player:getMark("xiuluoji_zhu") ~= 0 or player:getMark("xiuluoji_fu") ~= 0 then
local skills = { "pf_wushuang", "mashu", "xiuluo", "pf_shenwei" }
room:setPlayerMark(player, "xiuluoji_zhu", 0)
room:setPlayerMark(player, "xiuluoji_fu", 0)
room:handleAddLoseSkills(player, "-" .. table.concat(skills, "|-"), nil, true, false)
end
end
end,
}
extension:addCards({
mj_duanzaotai,
})
Fk:loadTranslationTable {
["mj_duanzaotai"] = "精械锻造台",
["#mj_dzt_skill"] = "锻造",
["@[:]mj_rongduan"] = "锻造台",
[":mj_duanzaotai"] = "装备牌·宝物<br /><b>技能</b>:置入装备区时,获得锻造台上已经被锻造的武器;离开装备区时,失去这些武器",
}
return extension
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ink-cherry-blossom/MahjongSoul.git
git@gitee.com:ink-cherry-blossom/MahjongSoul.git
ink-cherry-blossom
MahjongSoul
MahjongSoul
master

搜索帮助