2022-03-31 05:29:23 +00:00
|
|
|
local extension = Package:new("standard_cards", Package.CardPack)
|
|
|
|
extension.metadata = require "packages.standard_cards.metadata"
|
|
|
|
|
2022-04-15 10:37:20 +00:00
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["standard_cards"] = "标+EX"
|
2022-04-15 10:37:20 +00:00
|
|
|
}
|
|
|
|
|
2023-02-15 11:54:35 +00:00
|
|
|
Fk:loadTranslationTable{
|
|
|
|
["unknown_card"] = '<font color="#B5BA00"><b>未知牌</b></font>',
|
|
|
|
["log_spade"] = "♠",
|
|
|
|
["log_heart"] = '<font color="#CC3131">♥</font>',
|
|
|
|
["log_club"] = "♣",
|
|
|
|
["log_diamond"] = '<font color="#CC3131">♦</font>',
|
|
|
|
["log_nosuit"] = "无花色",
|
|
|
|
["nosuit"] = "无花色",
|
|
|
|
["spade"] = "黑桃",
|
|
|
|
["heart"] = "红桃",
|
|
|
|
["club"] = "梅花",
|
|
|
|
["diamond"] = "方块",
|
|
|
|
}
|
|
|
|
|
2022-12-18 04:52:52 +00:00
|
|
|
local slashSkill = fk.CreateActiveSkill{
|
|
|
|
name = "slash_skill",
|
2023-01-29 10:11:41 +00:00
|
|
|
max_phase_use_time = 1,
|
|
|
|
target_num = 1,
|
2022-12-20 04:51:54 +00:00
|
|
|
can_use = function(self, player)
|
2023-01-29 10:11:41 +00:00
|
|
|
return player:usedCardTimes("slash", Player.HistoryPhase) < self:getMaxUseTime(Self, Player.HistoryPhase)
|
2022-12-20 04:51:54 +00:00
|
|
|
end,
|
2023-02-21 05:44:24 +00:00
|
|
|
target_filter = function(self, to_select, selected, _, card)
|
|
|
|
if #selected < self:getMaxTargetNum(Self, card) then
|
2022-12-18 04:52:52 +00:00
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
2022-12-20 04:51:54 +00:00
|
|
|
return Self ~= player and Self:inMyAttackRange(player)
|
2022-12-18 04:52:52 +00:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = effect.to
|
|
|
|
local from = effect.from
|
2023-02-26 08:51:29 +00:00
|
|
|
|
2022-12-20 04:51:54 +00:00
|
|
|
room:damage({
|
2023-02-15 11:54:35 +00:00
|
|
|
from = room:getPlayerById(from),
|
|
|
|
to = room:getPlayerById(to),
|
2023-01-21 16:49:11 +00:00
|
|
|
card = effect.card,
|
2022-12-20 13:15:49 +00:00
|
|
|
damage = 1 + (effect.addtionalDamage or 0),
|
2022-12-20 04:51:54 +00:00
|
|
|
damageType = fk.NormalDamage,
|
|
|
|
skillName = self.name
|
|
|
|
})
|
2022-12-18 04:52:52 +00:00
|
|
|
end
|
|
|
|
}
|
2022-03-31 05:29:23 +00:00
|
|
|
local slash = fk.CreateBasicCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "slash",
|
|
|
|
number = 7,
|
|
|
|
suit = Card.Spade,
|
2022-12-18 04:52:52 +00:00
|
|
|
skill = slashSkill,
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
|
|
|
["slash"] = "杀",
|
2023-01-29 10:11:41 +00:00
|
|
|
["#slash-jink"] = "%src 对你使用了杀,请使用 %arg 张闪",
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
|
|
|
slash,
|
|
|
|
slash:clone(Card.Spade, 8),
|
|
|
|
slash:clone(Card.Spade, 8),
|
|
|
|
slash:clone(Card.Spade, 9),
|
|
|
|
slash:clone(Card.Spade, 9),
|
|
|
|
slash:clone(Card.Spade, 10),
|
|
|
|
slash:clone(Card.Spade, 10),
|
|
|
|
|
|
|
|
slash:clone(Card.Club, 2),
|
|
|
|
slash:clone(Card.Club, 3),
|
|
|
|
slash:clone(Card.Club, 4),
|
|
|
|
slash:clone(Card.Club, 5),
|
|
|
|
slash:clone(Card.Club, 6),
|
|
|
|
slash:clone(Card.Club, 7),
|
|
|
|
slash:clone(Card.Club, 8),
|
|
|
|
slash:clone(Card.Club, 8),
|
|
|
|
slash:clone(Card.Club, 9),
|
|
|
|
slash:clone(Card.Club, 9),
|
|
|
|
slash:clone(Card.Club, 10),
|
|
|
|
slash:clone(Card.Club, 10),
|
|
|
|
slash:clone(Card.Club, 11),
|
|
|
|
slash:clone(Card.Club, 11),
|
|
|
|
|
|
|
|
slash:clone(Card.Heart, 10),
|
|
|
|
slash:clone(Card.Heart, 10),
|
|
|
|
slash:clone(Card.Heart, 11),
|
|
|
|
|
|
|
|
slash:clone(Card.Diamond, 6),
|
|
|
|
slash:clone(Card.Diamond, 7),
|
|
|
|
slash:clone(Card.Diamond, 8),
|
|
|
|
slash:clone(Card.Diamond, 9),
|
|
|
|
slash:clone(Card.Diamond, 10),
|
|
|
|
slash:clone(Card.Diamond, 13),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-18 04:52:52 +00:00
|
|
|
local jinkSkill = fk.CreateActiveSkill{
|
|
|
|
name = "jink_skill",
|
2022-12-18 13:19:35 +00:00
|
|
|
can_use = function()
|
|
|
|
return false
|
|
|
|
end,
|
2022-12-18 04:52:52 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
if effect.responseToEvent then
|
|
|
|
effect.responseToEvent.isCancellOut = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local jink = fk.CreateBasicCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "jink",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 2,
|
2022-12-18 04:52:52 +00:00
|
|
|
skill = jinkSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["jink"] = "闪",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
jink,
|
|
|
|
jink:clone(Card.Heart, 2),
|
|
|
|
jink:clone(Card.Heart, 13),
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
jink:clone(Card.Diamond, 2),
|
|
|
|
jink:clone(Card.Diamond, 2),
|
|
|
|
jink:clone(Card.Diamond, 3),
|
|
|
|
jink:clone(Card.Diamond, 4),
|
|
|
|
jink:clone(Card.Diamond, 5),
|
|
|
|
jink:clone(Card.Diamond, 6),
|
|
|
|
jink:clone(Card.Diamond, 7),
|
|
|
|
jink:clone(Card.Diamond, 8),
|
|
|
|
jink:clone(Card.Diamond, 9),
|
|
|
|
jink:clone(Card.Diamond, 10),
|
|
|
|
jink:clone(Card.Diamond, 11),
|
|
|
|
jink:clone(Card.Diamond, 11),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 04:51:54 +00:00
|
|
|
local peachSkill = fk.CreateActiveSkill{
|
|
|
|
name = "peach_skill",
|
|
|
|
can_use = function(self, player)
|
|
|
|
return player:isWounded()
|
|
|
|
end,
|
2022-12-20 10:40:17 +00:00
|
|
|
on_use = function(self, room, use)
|
|
|
|
if not use.tos or #TargetGroup:getRealTargets(use.tos) == 0 then
|
|
|
|
use.tos = { { use.from } }
|
|
|
|
end
|
|
|
|
end,
|
2022-12-20 04:51:54 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = effect.to
|
|
|
|
local from = effect.from
|
2023-02-26 08:51:29 +00:00
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
room:recover({
|
2023-02-15 11:54:35 +00:00
|
|
|
who = room:getPlayerById(to),
|
2022-12-20 04:51:54 +00:00
|
|
|
num = 1,
|
|
|
|
recoverBy = from,
|
|
|
|
skillName = self.name
|
2022-12-20 13:15:49 +00:00
|
|
|
})
|
2022-12-20 04:51:54 +00:00
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local peach = fk.CreateBasicCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "peach",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 3,
|
2022-12-20 04:51:54 +00:00
|
|
|
skill = peachSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["peach"] = "桃",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
peach,
|
|
|
|
peach:clone(Card.Heart, 4),
|
|
|
|
peach:clone(Card.Heart, 6),
|
|
|
|
peach:clone(Card.Heart, 7),
|
|
|
|
peach:clone(Card.Heart, 8),
|
|
|
|
peach:clone(Card.Heart, 9),
|
|
|
|
peach:clone(Card.Heart, 12),
|
|
|
|
peach:clone(Card.Heart, 12),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local dismantlementSkill = fk.CreateActiveSkill{
|
|
|
|
name = "dismantlement_skill",
|
2023-01-29 10:11:41 +00:00
|
|
|
target_num = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
target_filter = function(self, to_select, selected)
|
2023-02-26 07:01:14 +00:00
|
|
|
if #selected < self:getMaxTargetNum(Self) then
|
2022-12-20 13:15:49 +00:00
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
return Self ~= player and not player:isAllNude()
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
2023-01-29 10:11:41 +00:00
|
|
|
if to:isAllNude() then return end
|
2022-12-20 13:15:49 +00:00
|
|
|
local from = room:getPlayerById(effect.from)
|
|
|
|
local cid = room:askForCardChosen(
|
|
|
|
from,
|
|
|
|
to,
|
|
|
|
"hej",
|
|
|
|
self.name
|
|
|
|
)
|
|
|
|
|
|
|
|
room:throwCard(cid, self.name, to, from)
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local dismantlement = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "dismantlement",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 3,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = dismantlementSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["dismantlement"] = "过河拆桥",
|
2023-01-16 11:13:07 +00:00
|
|
|
["dismantlement_skill"] = "过河拆桥",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
dismantlement,
|
|
|
|
dismantlement:clone(Card.Spade, 4),
|
|
|
|
dismantlement:clone(Card.Spade, 12),
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
dismantlement:clone(Card.Club, 3),
|
|
|
|
dismantlement:clone(Card.Club, 4),
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
dismantlement:clone(Card.Heart, 12),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-09-14 05:01:10 +00:00
|
|
|
local snatchSkill = fk.CreateActiveSkill{
|
|
|
|
name = "snatch_skill",
|
2023-01-29 10:11:41 +00:00
|
|
|
distance_limit = 1,
|
2022-09-14 05:01:10 +00:00
|
|
|
target_filter = function(self, to_select, selected)
|
|
|
|
if #selected == 0 then
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
2023-01-29 10:11:41 +00:00
|
|
|
return Self ~= player and Self:distanceTo(player) <= self:getDistanceLimit(Self)
|
2022-09-14 05:01:10 +00:00
|
|
|
and not player:isAllNude()
|
|
|
|
end
|
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
target_num = 1,
|
2022-09-14 05:01:10 +00:00
|
|
|
on_effect = function(self, room, effect)
|
2022-12-18 04:52:52 +00:00
|
|
|
local to = effect.to
|
2022-09-14 05:01:10 +00:00
|
|
|
local from = effect.from
|
|
|
|
local cid = room:askForCardChosen(
|
|
|
|
room:getPlayerById(from),
|
|
|
|
room:getPlayerById(to),
|
|
|
|
"hej",
|
2022-12-20 13:15:49 +00:00
|
|
|
self.name
|
2022-09-14 05:01:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
room:obtainCard(from, cid)
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local snatch = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "snatch",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 3,
|
2022-09-14 05:01:10 +00:00
|
|
|
skill = snatchSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["snatch"] = "顺手牵羊",
|
2023-01-16 11:13:07 +00:00
|
|
|
["snatch_skill"] = "顺手牵羊",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
snatch,
|
|
|
|
snatch:clone(Card.Spade, 4),
|
|
|
|
snatch:clone(Card.Spade, 11),
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
snatch:clone(Card.Diamond, 3),
|
|
|
|
snatch:clone(Card.Diamond, 4),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local duelSkill = fk.CreateActiveSkill{
|
|
|
|
name = "duel_skill",
|
|
|
|
target_filter = function(self, to_select, selected)
|
|
|
|
if #selected == 0 then
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
return Self ~= player
|
|
|
|
end
|
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
target_num = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
|
|
|
local from = room:getPlayerById(effect.from)
|
|
|
|
local responsers = { to, from }
|
|
|
|
local currentTurn = 1
|
|
|
|
local currentResponser = to
|
|
|
|
|
|
|
|
while currentResponser:isAlive() do
|
|
|
|
if effect.disresponsive or table.contains(effect.disresponsiveList or {}, currentResponser.id) then
|
|
|
|
break
|
|
|
|
end
|
|
|
|
|
2023-01-16 11:13:07 +00:00
|
|
|
local cardResponded = room:askForResponse(currentResponser, 'slash')
|
|
|
|
if cardResponded then
|
2022-12-20 13:15:49 +00:00
|
|
|
room:responseCard({
|
|
|
|
from = currentResponser.id,
|
2023-01-16 11:13:07 +00:00
|
|
|
card = cardResponded,
|
2022-12-20 13:15:49 +00:00
|
|
|
responseToEvent = effect,
|
|
|
|
})
|
|
|
|
else
|
|
|
|
break
|
|
|
|
end
|
|
|
|
|
|
|
|
currentTurn = currentTurn % 2 + 1
|
|
|
|
currentResponser = responsers[currentTurn]
|
|
|
|
end
|
|
|
|
|
|
|
|
if currentResponser:isAlive() then
|
|
|
|
room:damage({
|
2023-02-15 11:54:35 +00:00
|
|
|
from = responsers[currentTurn % 2 + 1],
|
|
|
|
to = currentResponser,
|
2023-01-21 16:49:11 +00:00
|
|
|
card = effect.card,
|
2022-12-20 13:15:49 +00:00
|
|
|
damage = 1 + (effect.addtionalDamage or 0),
|
|
|
|
damageType = fk.NormalDamage,
|
|
|
|
skillName = self.name,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local duel = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "duel",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = duelSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["duel"] = "决斗",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
duel,
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
duel:clone(Card.Club, 1),
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
duel:clone(Card.Diamond, 1),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local collateralSkill = fk.CreateActiveSkill{
|
|
|
|
name = "collateral_skill",
|
|
|
|
target_filter = function(self, to_select, selected)
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
if #selected == 0 then
|
|
|
|
return Self ~= player and player:getEquipment(Card.SubtypeWeapon)
|
|
|
|
elseif #selected == 1 then
|
|
|
|
return Fk:currentRoom():getPlayerById(selected[1]):inMyAttackRange(player)
|
|
|
|
end
|
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
target_num = 2,
|
2022-12-20 13:15:49 +00:00
|
|
|
on_use = function(self, room, cardUseEvent)
|
|
|
|
cardUseEvent.tos = { { cardUseEvent.tos[1][1], cardUseEvent.tos[2][1] } }
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
2023-01-16 11:13:07 +00:00
|
|
|
local use = room:askForUseCard(
|
|
|
|
room:getPlayerById(effect.to),
|
|
|
|
"slash", nil, nil, nil, { must_targets = effect.subTargets }
|
|
|
|
)
|
2022-12-20 13:15:49 +00:00
|
|
|
|
2023-01-16 11:13:07 +00:00
|
|
|
if use then
|
|
|
|
room:useCard(use)
|
2022-12-20 13:15:49 +00:00
|
|
|
else
|
|
|
|
room:obtainCard(effect.from, room:getPlayerById(effect.to):getEquipment(Card.SubtypeWeapon), true, fk.ReasonGive)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local collateral = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "collateral",
|
|
|
|
suit = Card.Club,
|
|
|
|
number = 12,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = collateralSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["collateral"] = "借刀杀人",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
collateral,
|
|
|
|
collateral:clone(Card.Club, 13),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
local exNihiloSkill = fk.CreateActiveSkill{
|
|
|
|
name = "ex_nihilo_skill",
|
|
|
|
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, cardEffectEvent)
|
2022-12-18 04:52:52 +00:00
|
|
|
room:drawCards(room:getPlayerById(cardEffectEvent.to), 2, "ex_nihilo")
|
2022-04-30 07:27:56 +00:00
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local exNihilo = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "ex_nihilo",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 7,
|
|
|
|
skill = exNihiloSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["ex_nihilo"] = "无中生有",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
exNihilo,
|
|
|
|
exNihilo:clone(Card.Heart, 8),
|
|
|
|
exNihilo:clone(Card.Heart, 9),
|
|
|
|
exNihilo:clone(Card.Heart, 11),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-18 04:52:52 +00:00
|
|
|
local nullificationSkill = fk.CreateActiveSkill{
|
|
|
|
name = "nullification_skill",
|
2022-12-20 04:51:54 +00:00
|
|
|
can_use = function()
|
|
|
|
return false
|
|
|
|
end,
|
2022-12-18 04:52:52 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
if effect.responseToEvent then
|
|
|
|
effect.responseToEvent.isCancellOut = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local nullification = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "nullification",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 11,
|
2022-12-18 04:52:52 +00:00
|
|
|
skill = nullificationSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["nullification"] = "无懈可击",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
nullification,
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
nullification:clone(Card.Club, 12),
|
|
|
|
nullification:clone(Card.Club, 13),
|
2022-04-08 10:39:58 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
nullification:clone(Card.Diamond, 12),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local savageAssaultSkill = fk.CreateActiveSkill{
|
|
|
|
name = "savage_assault_skill",
|
|
|
|
on_use = function(self, room, cardUseEvent)
|
|
|
|
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
|
|
|
|
cardUseEvent.tos = {}
|
|
|
|
for _, player in ipairs(room:getOtherPlayers(room:getPlayerById(cardUseEvent.from))) do
|
|
|
|
TargetGroup:pushTargets(cardUseEvent.tos, player.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
2023-01-16 11:13:07 +00:00
|
|
|
local cardResponded = nil
|
2022-12-20 13:15:49 +00:00
|
|
|
if not (effect.disresponsive or table.contains(effect.disresponsiveList or {}, effect.to)) then
|
2023-01-16 11:13:07 +00:00
|
|
|
cardResponded = room:askForResponse(room:getPlayerById(effect.to), 'slash')
|
2022-12-20 13:15:49 +00:00
|
|
|
end
|
|
|
|
|
2023-01-16 11:13:07 +00:00
|
|
|
if cardResponded then
|
2022-12-20 13:15:49 +00:00
|
|
|
room:responseCard({
|
|
|
|
from = effect.to,
|
2023-01-16 11:13:07 +00:00
|
|
|
card = cardResponded,
|
2022-12-20 13:15:49 +00:00
|
|
|
responseToEvent = effect,
|
|
|
|
})
|
|
|
|
else
|
|
|
|
room:damage({
|
2023-02-15 11:54:35 +00:00
|
|
|
from = room:getPlayerById(effect.from),
|
|
|
|
to = room:getPlayerById(effect.to),
|
2023-01-21 16:49:11 +00:00
|
|
|
card = effect.card,
|
2022-12-20 13:15:49 +00:00
|
|
|
damage = 1 + (effect.addtionalDamage or 0),
|
|
|
|
damageType = fk.NormalDamage,
|
|
|
|
skillName = self.name,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local savageAssault = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "savage_assault",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 7,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = savageAssaultSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["savage_assault"] = "南蛮入侵",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
savageAssault,
|
|
|
|
savageAssault:clone(Card.Spade, 13),
|
|
|
|
savageAssault:clone(Card.Club, 7),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local archeryAttackSkill = fk.CreateActiveSkill{
|
|
|
|
name = "archery_attack_skill",
|
|
|
|
on_use = function(self, room, cardUseEvent)
|
|
|
|
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
|
|
|
|
cardUseEvent.tos = {}
|
|
|
|
for _, player in ipairs(room:getOtherPlayers(room:getPlayerById(cardUseEvent.from))) do
|
|
|
|
TargetGroup:pushTargets(cardUseEvent.tos, player.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
2023-01-16 11:13:07 +00:00
|
|
|
local cardResponded = nil
|
2022-12-20 13:15:49 +00:00
|
|
|
if not (effect.disresponsive or table.contains(effect.disresponsiveList or {}, effect.to)) then
|
2023-01-16 11:13:07 +00:00
|
|
|
cardResponded = room:askForResponse(room:getPlayerById(effect.to), 'jink')
|
2022-12-20 13:15:49 +00:00
|
|
|
end
|
|
|
|
|
2023-01-16 11:13:07 +00:00
|
|
|
if cardResponded then
|
2022-12-20 13:15:49 +00:00
|
|
|
room:responseCard({
|
|
|
|
from = effect.to,
|
2023-01-16 11:13:07 +00:00
|
|
|
card = cardResponded,
|
2022-12-20 13:15:49 +00:00
|
|
|
responseToEvent = effect,
|
|
|
|
})
|
|
|
|
else
|
|
|
|
room:damage({
|
2023-02-15 11:54:35 +00:00
|
|
|
from = room:getPlayerById(effect.from),
|
|
|
|
to = room:getPlayerById(effect.to),
|
2023-01-21 16:49:11 +00:00
|
|
|
card = effect.card,
|
2022-12-20 13:15:49 +00:00
|
|
|
damage = 1 + (effect.addtionalDamage or 0),
|
|
|
|
damageType = fk.NormalDamage,
|
|
|
|
skillName = self.name,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local archeryAttack = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "archery_attack",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = archeryAttackSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["archery_attack"] = "万箭齐发",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
archeryAttack,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local godSalvationSkill = fk.CreateActiveSkill{
|
|
|
|
name = "god_salvation_skill",
|
|
|
|
on_use = function(self, room, cardUseEvent)
|
|
|
|
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
|
|
|
|
cardUseEvent.tos = {}
|
|
|
|
for _, player in ipairs(room:getAlivePlayers()) do
|
|
|
|
TargetGroup:pushTargets(cardUseEvent.tos, player.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
2023-02-15 11:54:35 +00:00
|
|
|
about_to_effect = function(self, room, effect)
|
|
|
|
if not room:getPlayerById(effect.to):isWounded() then
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
2022-12-20 13:15:49 +00:00
|
|
|
room:recover({
|
2023-02-15 11:54:35 +00:00
|
|
|
who = room:getPlayerById(effect.to),
|
2022-12-20 13:15:49 +00:00
|
|
|
num = 1,
|
|
|
|
skillName = self.name,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local godSalvation = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "god_salvation",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = godSalvationSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["god_salvation"] = "桃园结义",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
godSalvation,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 13:15:49 +00:00
|
|
|
local amazingGraceSkill = fk.CreateActiveSkill{
|
|
|
|
name = "amazing_grace_skill",
|
|
|
|
on_use = function(self, room, cardUseEvent)
|
|
|
|
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
|
|
|
|
cardUseEvent.tos = {}
|
|
|
|
for _, player in ipairs(room:getAlivePlayers()) do
|
|
|
|
TargetGroup:pushTargets(cardUseEvent.tos, player.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, cardEffectEvent)
|
|
|
|
room:getPlayerById(cardEffectEvent.to):drawCards(1, 'god_salvation')
|
|
|
|
end
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local amazingGrace = fk.CreateTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "amazing_grace",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 3,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = amazingGraceSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["amazing_grace"] = "五谷丰登",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
amazingGrace,
|
|
|
|
amazingGrace:clone(Card.Heart, 4),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 10:40:17 +00:00
|
|
|
local lightningSkill = fk.CreateActiveSkill{
|
|
|
|
name = "lightning_skill",
|
|
|
|
can_use = function(self, player)
|
2023-01-29 10:11:41 +00:00
|
|
|
return not Self:hasDelayedTrick("lightning")
|
2022-12-20 10:40:17 +00:00
|
|
|
end,
|
|
|
|
on_use = function(self, room, use)
|
|
|
|
if not use.tos or #TargetGroup:getRealTargets(use.tos) == 0 then
|
|
|
|
use.tos = { { use.from } }
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
|
|
|
local judge = {
|
|
|
|
who = to,
|
|
|
|
reason = "lightning",
|
2023-01-29 10:11:41 +00:00
|
|
|
pattern = ".|2~9|spade",
|
2022-12-20 10:40:17 +00:00
|
|
|
}
|
|
|
|
room:judge(judge)
|
|
|
|
local result = judge.card
|
|
|
|
if result.suit == Card.Spade and result.number >= 2 and result.number <= 9 then
|
|
|
|
room:damage{
|
2023-02-15 11:54:35 +00:00
|
|
|
to = to,
|
2022-12-20 10:40:17 +00:00
|
|
|
damage = 3,
|
2023-01-21 16:49:11 +00:00
|
|
|
card = effect.card,
|
2022-12-20 10:40:17 +00:00
|
|
|
damageType = fk.ThunderDamage,
|
|
|
|
skillName = self.name,
|
|
|
|
}
|
|
|
|
|
|
|
|
room:moveCards{
|
|
|
|
ids = { effect.cardId },
|
|
|
|
toArea = Card.DiscardPile,
|
|
|
|
moveReason = fk.ReasonPutIntoDiscardPile
|
|
|
|
}
|
|
|
|
else
|
|
|
|
self:onNullified(room, effect)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_nullified = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
|
|
|
local nextp = to:getNextAlive()
|
|
|
|
room:moveCards{
|
2023-01-16 11:13:07 +00:00
|
|
|
ids = room:getSubcardsByRule(effect.card, { Card.Processing }),
|
2022-12-20 10:40:17 +00:00
|
|
|
to = nextp.id,
|
|
|
|
toArea = Card.PlayerJudge,
|
|
|
|
moveReason = fk.ReasonPut
|
|
|
|
}
|
|
|
|
end,
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local lightning = fk.CreateDelayedTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "lightning",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 1,
|
2022-12-20 10:40:17 +00:00
|
|
|
skill = lightningSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["lightning"] = "闪电",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
lightning,
|
|
|
|
lightning:clone(Card.Heart, 12),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2022-12-20 10:40:17 +00:00
|
|
|
local indulgenceSkill = fk.CreateActiveSkill{
|
|
|
|
name = "indulgence_skill",
|
|
|
|
target_filter = function(self, to_select, selected)
|
|
|
|
if #selected == 0 then
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
if Self ~= player then
|
2023-01-29 10:11:41 +00:00
|
|
|
return not player:hasDelayedTrick("indulgence")
|
2022-12-20 10:40:17 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end,
|
2023-02-26 07:01:14 +00:00
|
|
|
target_num = 1,
|
2022-12-20 10:40:17 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
|
|
|
local judge = {
|
|
|
|
who = to,
|
|
|
|
reason = "indulgence",
|
2023-01-29 10:11:41 +00:00
|
|
|
pattern = ".|.|spade,club,diamond",
|
2022-12-20 10:40:17 +00:00
|
|
|
}
|
|
|
|
room:judge(judge)
|
|
|
|
local result = judge.card
|
|
|
|
if result.suit ~= Card.Heart then
|
|
|
|
to:skip(Player.Play)
|
|
|
|
end
|
|
|
|
self:onNullified(room, effect)
|
|
|
|
end,
|
|
|
|
on_nullified = function(self, room, effect)
|
|
|
|
room:moveCards{
|
2023-01-16 11:13:07 +00:00
|
|
|
ids = room:getSubcardsByRule(effect.card, { Card.Processing }),
|
2022-12-20 10:40:17 +00:00
|
|
|
toArea = Card.DiscardPile,
|
|
|
|
moveReason = fk.ReasonPutIntoDiscardPile
|
|
|
|
}
|
|
|
|
end,
|
|
|
|
}
|
2022-04-08 10:39:58 +00:00
|
|
|
local indulgence = fk.CreateDelayedTrickCard{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "indulgence",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 6,
|
2022-12-20 10:40:17 +00:00
|
|
|
skill = indulgenceSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["indulgence"] = "乐不思蜀",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
indulgence,
|
|
|
|
indulgence:clone(Card.Club, 6),
|
|
|
|
indulgence:clone(Card.Heart, 6),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local crossbowAudio = fk.CreateTriggerSkill{
|
|
|
|
name = "#crossbowAudio",
|
|
|
|
refresh_events = {fk.CardUsing},
|
|
|
|
can_refresh = function(self, event, target, player, data)
|
|
|
|
return target == player and player:hasSkill(self.name) and
|
|
|
|
data.card.name == "slash" and
|
|
|
|
player:usedCardTimes("slash") > 1
|
|
|
|
end,
|
|
|
|
on_refresh = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
room:broadcastPlaySound("./packages/standard_cards/audio/card/crossbow")
|
|
|
|
room:setEmotion(player, "./packages/standard_cards/image/anim/crossbow")
|
|
|
|
end,
|
|
|
|
}
|
2023-02-15 13:20:40 +00:00
|
|
|
local crossbowSkill = fk.CreateTargetModSkill{
|
|
|
|
name = "#crossbow_skill",
|
|
|
|
attached_equip = "crossbow",
|
|
|
|
residue_func = function(self, player, skill, scope)
|
|
|
|
if player:hasSkill(self.name) and skill.name == "slash_skill"
|
|
|
|
and scope == Player.HistoryPhase then
|
|
|
|
return 999
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
}
|
2023-02-21 05:44:24 +00:00
|
|
|
crossbowSkill:addRelatedSkill(crossbowAudio)
|
2023-02-15 13:20:40 +00:00
|
|
|
Fk:addSkill(crossbowSkill)
|
|
|
|
|
2022-04-08 10:39:58 +00:00
|
|
|
local crossbow = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "crossbow",
|
|
|
|
suit = Card.Club,
|
|
|
|
number = 1,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 1,
|
2023-02-15 13:20:40 +00:00
|
|
|
equip_skill = crossbowSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["crossbow"] = "诸葛连弩",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
crossbow,
|
|
|
|
crossbow:clone(Card.Diamond, 1),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local qingGang = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "qinggang_sword",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 6,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 2,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["qinggang_sword"] = "青釭剑",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
qingGang,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local iceSwordSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#ice_sword_skill",
|
|
|
|
attached_equip = "ice_sword",
|
|
|
|
events = {fk.DamageCaused},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
|
|
|
return target == player and player:hasSkill(self.name) and
|
|
|
|
data.card and data.card.name == "slash" and not data.to:isNude()
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local to = data.to
|
|
|
|
for i = 1, 2 do
|
|
|
|
if to:isNude() then break end
|
|
|
|
local card = room:askForCardChosen(player, to, "he", self.name)
|
|
|
|
room:throwCard(card, self.name, to, player)
|
|
|
|
end
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
}
|
|
|
|
Fk:addSkill(iceSwordSkill)
|
|
|
|
|
2022-04-08 10:39:58 +00:00
|
|
|
local iceSword = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "ice_sword",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 2,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 2,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = iceSwordSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["ice_sword"] = "寒冰剑",
|
2023-02-21 05:44:24 +00:00
|
|
|
["#ice_sword_skill"] = "寒冰剑",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
iceSword,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local doubleSwordsSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#double_swords_skill",
|
|
|
|
attached_equip = "double_swords",
|
|
|
|
events = {fk.TargetSpecified},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
|
|
|
return target == player and player:hasSkill(self.name) and
|
|
|
|
data.card and data.card.name == "slash" and
|
|
|
|
(player.room:getPlayerById(data.to).gender ~= player.gender)
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local to = player.room:getPlayerById(data.to)
|
|
|
|
local result = room:askForDiscard(to, 1, 1, false, self.name, true)
|
|
|
|
if #result == 0 then
|
|
|
|
player:drawCards(1, self.name)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
Fk:addSkill(doubleSwordsSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local doubleSwords = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "double_swords",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 2,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 2,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = doubleSwordsSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["double_swords"] = "雌雄双股剑",
|
2023-02-21 05:44:24 +00:00
|
|
|
["#double_swords_skill"] = "雌雄双股剑",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
doubleSwords,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local bladeSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#blade_skill",
|
|
|
|
attached_equip = "blade",
|
|
|
|
events = {fk.CardUseFinished},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
|
|
|
if not player:hasSkill(self.name) then return end
|
|
|
|
local use = data ---@type CardUseStruct
|
|
|
|
if use.card.name == "jink" and use.toCard and use.toCard.name == "slash" then
|
|
|
|
local effect = use.responseToEvent
|
|
|
|
return effect.from == player.id
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_cost = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local use = room:askForUseCard(player, "slash", nil, "#blade_slash:" .. target.id,
|
|
|
|
true, { must_targets = {target.id} })
|
|
|
|
if use then
|
|
|
|
self.cost_data = use
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
player.room:useCard(self.cost_data)
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
Fk:addSkill(bladeSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local blade = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "blade",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 5,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 3,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = bladeSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["blade"] = "青龙偃月刀",
|
2023-02-21 05:44:24 +00:00
|
|
|
["#blade_skill"] = "青龙偃月刀",
|
|
|
|
["#blade_slash"] = "你可以发动“青龙偃月刀”对 %src 再使用一张杀",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
blade,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local spearSkill = fk.CreateViewAsSkill{
|
|
|
|
name = "spear_skill",
|
|
|
|
attached_equip = "spear",
|
|
|
|
pattern = "slash",
|
|
|
|
card_filter = function(self, to_select, selected)
|
|
|
|
if #selected == 2 then return false end
|
2023-02-26 07:01:14 +00:00
|
|
|
return Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
|
|
|
view_as = function(self, cards)
|
|
|
|
if #cards ~= 2 then
|
|
|
|
return nil
|
|
|
|
end
|
|
|
|
local c = Fk:cloneCard("slash")
|
|
|
|
c:addSubcards(cards)
|
|
|
|
return c
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
Fk:addSkill(spearSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local spear = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "spear",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 12,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 3,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = spearSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["spear"] = "丈八蛇矛",
|
2023-02-21 05:44:24 +00:00
|
|
|
["spear_skill"] = "丈八矛",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
spear,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local axeSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#axe_skill",
|
|
|
|
attached_equip = "axe",
|
|
|
|
events = {fk.CardEffecting},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
|
|
|
if not player:hasSkill(self.name) then return end
|
|
|
|
local effect = data ---@type CardEffectEvent
|
|
|
|
return effect.card.name == "jink" and effect.responseToEvent and
|
|
|
|
effect.responseToEvent.from == player.id and
|
|
|
|
effect.toCard.name == "slash"
|
|
|
|
end,
|
|
|
|
on_cost = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local ret = room:askForDiscard(player, 2, 2, true, self.name, true)
|
|
|
|
if #ret > 0 then return true end
|
|
|
|
end,
|
|
|
|
on_use = function() return true end,
|
|
|
|
}
|
|
|
|
Fk:addSkill(axeSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local axe = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "axe",
|
|
|
|
suit = Card.Diamond,
|
|
|
|
number = 5,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 3,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = axeSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["axe"] = "贯石斧",
|
2023-02-21 05:44:24 +00:00
|
|
|
["#axe_skill"] = "贯石斧",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
axe,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local halberdAudio = fk.CreateTriggerSkill{
|
|
|
|
name = "#halberdAudio",
|
|
|
|
refresh_events = {fk.CardUsing},
|
|
|
|
can_refresh = function(self, event, target, player, data)
|
|
|
|
return target == player and player:hasSkill(self.name) and
|
|
|
|
data.card.name == "slash" and #TargetGroup:getRealTargets(data.tos) > 1
|
|
|
|
end,
|
|
|
|
on_refresh = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
room:broadcastPlaySound("./packages/standard_cards/audio/card/halberd")
|
|
|
|
room:setEmotion(player, "./packages/standard_cards/image/anim/halberd")
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
local halberdSkill = fk.CreateTargetModSkill{
|
|
|
|
name = "#halberd_skill",
|
|
|
|
attached_equip = "halberd",
|
|
|
|
extra_target_func = function(self, player, skill, card)
|
|
|
|
if player:hasSkill(self.name) and skill.name == "slash_skill"
|
|
|
|
and #player:getCardIds(Player.Hand) == 1
|
|
|
|
and player:getCardIds(Player.Hand)[1] == card.id then
|
|
|
|
return 2
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
halberdSkill:addRelatedSkill(halberdAudio)
|
|
|
|
Fk:addSkill(halberdSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local halberd = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "halberd",
|
|
|
|
suit = Card.Diamond,
|
|
|
|
number = 12,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 4,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = halberdSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["halberd"] = "方天画戟",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
halberd,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local kylinBowSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#kylin_bow_skill",
|
|
|
|
attached_equip = "kylin_bow",
|
|
|
|
events = {fk.DamageCaused},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
|
|
|
local ret = target == player and player:hasSkill(self.name) and
|
|
|
|
data.card and data.card.name == "slash"
|
|
|
|
if ret then
|
|
|
|
---@type ServerPlayer
|
|
|
|
local to = data.to
|
|
|
|
return to:getEquipment(Card.SubtypeDefensiveRide) or
|
|
|
|
to:getEquipment(Card.SubtypeOffensiveRide)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local to = data.to
|
|
|
|
local ride_tab = {}
|
|
|
|
if to:getEquipment(Card.SubtypeDefensiveRide) then
|
|
|
|
table.insert(ride_tab, "+1")
|
|
|
|
end
|
|
|
|
if to:getEquipment(Card.SubtypeOffensiveRide) then
|
|
|
|
table.insert(ride_tab, "-1")
|
|
|
|
end
|
|
|
|
if #ride_tab == 0 then return end
|
|
|
|
local choice = room:askForChoice(player, ride_tab, self.name)
|
|
|
|
if choice == "+1" then
|
|
|
|
room:throwCard(to:getEquipment(Card.SubtypeDefensiveRide), self.name, to, player)
|
|
|
|
else
|
|
|
|
room:throwCard(to:getEquipment(Card.SubtypeOffensiveRide), self.name, to, player)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
|
|
|
Fk:addSkill(kylinBowSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local kylinBow = fk.CreateWeapon{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "kylin_bow",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 5,
|
2022-12-20 04:51:54 +00:00
|
|
|
attack_range = 5,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = kylinBowSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["kylin_bow"] = "麒麟弓",
|
2023-02-21 05:44:24 +00:00
|
|
|
["#kylin_bow_skill"] = "麒麟弓",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
kylinBow,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local eightDiagram = fk.CreateArmor{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "eight_diagram",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 2,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["eight_diagram"] = "八卦阵",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
eightDiagram,
|
|
|
|
eightDiagram:clone(Card.Club, 2),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
local niohShieldSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#nioh_shield_skill",
|
|
|
|
attached_equip = "nioh_shield",
|
|
|
|
frequency = Skill.Compulsory,
|
|
|
|
events = {fk.PreCardEffect},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
|
|
|
local effect = data ---@type CardEffectEvent
|
|
|
|
return player.id == effect.to and player:hasSkill(self.name) and
|
|
|
|
effect.card.name == "slash" and effect.card.color == Card.Black
|
|
|
|
end,
|
|
|
|
on_use = function() return true end,
|
|
|
|
}
|
|
|
|
Fk:addSkill(niohShieldSkill)
|
2022-04-08 10:39:58 +00:00
|
|
|
local niohShield = fk.CreateArmor{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "nioh_shield",
|
|
|
|
suit = Card.Club,
|
|
|
|
number = 2,
|
2023-02-21 05:44:24 +00:00
|
|
|
equip_skill = niohShieldSkill,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["nioh_shield"] = "仁王盾",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
niohShield,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-01-04 06:21:29 +00:00
|
|
|
local horseSkill = fk.CreateDistanceSkill{
|
|
|
|
name = "horse_skill",
|
|
|
|
global = true,
|
|
|
|
correct_func = function(self, from, to)
|
|
|
|
local ret = 0
|
|
|
|
if from:getEquipment(Card.SubtypeOffensiveRide) then
|
|
|
|
ret = ret - 1
|
|
|
|
end
|
|
|
|
if to:getEquipment(Card.SubtypeDefensiveRide) then
|
|
|
|
ret = ret + 1
|
|
|
|
end
|
|
|
|
return ret
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
if not Fk.skills["horse_skill"] then
|
|
|
|
Fk:addSkill(horseSkill)
|
|
|
|
end
|
|
|
|
|
2022-04-08 10:39:58 +00:00
|
|
|
local diLu = fk.CreateDefensiveRide{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "dilu",
|
|
|
|
suit = Card.Club,
|
|
|
|
number = 5,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["dilu"] = "的卢",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
diLu,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local jueYing = fk.CreateDefensiveRide{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "jueying",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 5,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["jueying"] = "绝影",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
jueYing,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local zhuaHuangFeiDian = fk.CreateDefensiveRide{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "zhuahuangfeidian",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 13,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["zhuahuangfeidian"] = "爪黄飞电",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
zhuaHuangFeiDian,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local chiTu = fk.CreateOffensiveRide{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "chitu",
|
|
|
|
suit = Card.Heart,
|
|
|
|
number = 5,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["chitu"] = "赤兔",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
chiTu,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local daYuan = fk.CreateOffensiveRide{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "dayuan",
|
|
|
|
suit = Card.Spade,
|
|
|
|
number = 13,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["dayuan"] = "大宛",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
daYuan,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
local ziXing = fk.CreateOffensiveRide{
|
2022-04-30 07:27:56 +00:00
|
|
|
name = "zixing",
|
2023-02-15 11:54:35 +00:00
|
|
|
suit = Card.Diamond,
|
|
|
|
number = 13,
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
Fk:loadTranslationTable{
|
2022-04-30 07:27:56 +00:00
|
|
|
["zixing"] = "紫骍",
|
2022-04-08 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
ziXing,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
2022-03-31 05:29:23 +00:00
|
|
|
|
|
|
|
return extension
|