2023-04-09 05:35:35 +00:00
|
|
|
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-03-31 05:29:23 +00:00
|
|
|
local extension = Package:new("standard_cards", Package.CardPack)
|
|
|
|
extension.metadata = require "packages.standard_cards.metadata"
|
|
|
|
|
2022-12-18 04:52:52 +00:00
|
|
|
local slashSkill = fk.CreateActiveSkill{
|
|
|
|
name = "slash_skill",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = function(self, selected_cards)
|
|
|
|
local slash = Fk:cloneCard("slash")
|
|
|
|
slash.subcards = Card:getIdList(selected_cards)
|
|
|
|
local max_num = self:getMaxTargetNum(Self, slash) -- halberd
|
|
|
|
if max_num > 1 then
|
|
|
|
local num = #table.filter(Fk:currentRoom().alive_players, function (p)
|
|
|
|
return p ~= Self and not Self:isProhibited(p, slash)
|
|
|
|
end)
|
|
|
|
max_num = math.min(num, max_num)
|
|
|
|
end
|
|
|
|
slash.subcards = {}
|
|
|
|
return max_num > 1 and "#slash_skill_multi:::" .. max_num or "#slash_skill"
|
|
|
|
end,
|
2023-01-29 10:11:41 +00:00
|
|
|
max_phase_use_time = 1,
|
|
|
|
target_num = 1,
|
2024-01-24 19:13:57 +00:00
|
|
|
can_use = function(self, player, card, extra_data)
|
2024-02-04 14:29:54 +00:00
|
|
|
return (extra_data and extra_data.bypass_times) or player.phase ~= Player.Play or
|
2023-05-28 10:45:54 +00:00
|
|
|
table.find(Fk:currentRoom().alive_players, function(p)
|
2023-06-19 13:56:06 +00:00
|
|
|
return self:withinTimesLimit(player, Player.HistoryPhase, card, "slash", p)
|
2023-05-28 10:45:54 +00:00
|
|
|
end)
|
2022-12-20 04:51:54 +00:00
|
|
|
end,
|
2023-08-01 18:19:51 +00:00
|
|
|
mod_target_filter = function(self, to_select, selected, user, card, distance_limited)
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
local from = Fk:currentRoom():getPlayerById(user)
|
|
|
|
return from ~= player and not (distance_limited and not self:withinDistanceLimit(from, true, card, player))
|
|
|
|
end,
|
2024-01-24 19:13:57 +00:00
|
|
|
target_filter = function(self, to_select, selected, _, card, extra_data)
|
|
|
|
local count_distances = not (extra_data and extra_data.bypass_distances)
|
2023-02-21 05:44:24 +00:00
|
|
|
if #selected < self:getMaxTargetNum(Self, card) then
|
2022-12-18 04:52:52 +00:00
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
2024-01-24 19:13:57 +00:00
|
|
|
return self:modTargetFilter(to_select, selected, Self.id, card, count_distances) and
|
2024-02-04 14:29:54 +00:00
|
|
|
(
|
|
|
|
#selected > 0 or
|
|
|
|
Self.phase ~= Player.Play or
|
|
|
|
(extra_data and extra_data.bypass_times) or
|
|
|
|
self:withinTimesLimit(Self, Player.HistoryPhase, card, "slash", player)
|
|
|
|
)
|
2022-12-18 04:52:52 +00:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
2023-07-11 13:15:38 +00:00
|
|
|
local from = room:getPlayerById(effect.from)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
|
|
|
if not to.dead then
|
|
|
|
room:damage({
|
|
|
|
from = from,
|
|
|
|
to = to,
|
|
|
|
card = effect.card,
|
|
|
|
damage = 1,
|
|
|
|
damageType = fk.NormalDamage,
|
|
|
|
skillName = self.name
|
|
|
|
})
|
|
|
|
end
|
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,
|
2023-04-13 12:17:39 +00:00
|
|
|
is_damage_card = true,
|
2022-12-18 04:52:52 +00:00
|
|
|
skill = slashSkill,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
can_use = Util.FalseFunc,
|
2022-12-18 04:52:52 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
if effect.responseToEvent then
|
2023-06-19 13:56:06 +00:00
|
|
|
effect.responseToEvent.isCancellOut = true
|
2022-12-18 04:52:52 +00:00
|
|
|
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,
|
2024-02-04 07:55:44 +00:00
|
|
|
is_passive = true,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#peach_skill",
|
2023-08-01 18:19:51 +00:00
|
|
|
mod_target_filter = function(self, to_select)
|
|
|
|
return Fk:currentRoom():getPlayerById(to_select):isWounded() and
|
2023-08-03 13:08:01 +00:00
|
|
|
not table.find(Fk:currentRoom().alive_players, function(p)
|
2023-08-01 18:19:51 +00:00
|
|
|
return p.dying
|
|
|
|
end)
|
|
|
|
end,
|
2023-08-13 04:34:36 +00:00
|
|
|
can_use = function(self, player, card)
|
|
|
|
return player:isWounded() and not player:isProhibited(player, card)
|
2022-12-20 04:51:54 +00:00
|
|
|
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)
|
2023-07-11 13:15:38 +00:00
|
|
|
local player = room:getPlayerById(effect.from)
|
|
|
|
local target = room:getPlayerById(effect.to)
|
|
|
|
if target:isWounded() and not target.dead then
|
|
|
|
room:recover({
|
|
|
|
who = target,
|
|
|
|
num = 1,
|
|
|
|
card = effect.card,
|
|
|
|
recoverBy = player,
|
|
|
|
skillName = self.name
|
|
|
|
})
|
|
|
|
end
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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-12-09 13:57:47 +00:00
|
|
|
prompt = "#dismantlement_skill",
|
2023-01-29 10:11:41 +00:00
|
|
|
target_num = 1,
|
2023-10-06 19:22:57 +00:00
|
|
|
mod_target_filter = function(self, to_select, selected, user, card)
|
2023-08-01 18:19:51 +00:00
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
2023-10-06 19:22:57 +00:00
|
|
|
return user ~= to_select and not player:isAllNude()
|
2023-08-01 18:19:51 +00:00
|
|
|
end,
|
2023-10-06 19:22:57 +00:00
|
|
|
target_filter = function(self, to_select, selected, _, card)
|
|
|
|
if #selected < self:getMaxTargetNum(Self, card) then
|
|
|
|
return self:modTargetFilter(to_select, selected, Self.id, card)
|
2022-12-20 13:15:49 +00:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local from = room:getPlayerById(effect.from)
|
2023-07-11 13:15:38 +00:00
|
|
|
local to = room:getPlayerById(effect.to)
|
2023-12-02 16:21:52 +00:00
|
|
|
if from.dead or to.dead or to:isAllNude() then return end
|
2023-07-11 13:15:38 +00:00
|
|
|
local cid = room:askForCardChosen(from, to, "hej", self.name)
|
|
|
|
room:throwCard({cid}, self.name, to, from)
|
2022-12-20 13:15:49 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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-12-09 13:57:47 +00:00
|
|
|
prompt = "#snatch_skill",
|
2023-01-29 10:11:41 +00:00
|
|
|
distance_limit = 1,
|
2023-08-01 18:19:51 +00:00
|
|
|
mod_target_filter = function(self, to_select, selected, user, card, distance_limited)
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
local from = Fk:currentRoom():getPlayerById(user)
|
2023-08-03 07:24:17 +00:00
|
|
|
return from ~= player and not (player:isAllNude() or (distance_limited and not self:withinDistanceLimit(from, false, card, player)))
|
2023-08-01 18:19:51 +00:00
|
|
|
end,
|
2024-01-24 19:13:57 +00:00
|
|
|
target_filter = function(self, to_select, selected, _, card, extra_data)
|
|
|
|
local count_distances = not (extra_data and extra_data.bypass_distances)
|
2023-10-06 19:22:57 +00:00
|
|
|
if #selected < self:getMaxTargetNum(Self, card) then
|
2024-01-24 19:13:57 +00:00
|
|
|
return self:modTargetFilter(to_select, selected, Self.id, card, count_distances)
|
2022-09-14 05:01:10 +00:00
|
|
|
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)
|
2023-07-11 13:15:38 +00:00
|
|
|
local from = room:getPlayerById(effect.from)
|
2023-04-12 14:28:19 +00:00
|
|
|
local to = room:getPlayerById(effect.to)
|
2023-12-02 16:21:52 +00:00
|
|
|
if from.dead or to.dead or to:isAllNude() then return end
|
2023-07-11 13:15:38 +00:00
|
|
|
local cid = room:askForCardChosen(from, to, "hej", self.name)
|
|
|
|
room:obtainCard(from, cid, false, fk.ReasonPrey)
|
2022-09-14 05:01:10 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#duel_skill",
|
2023-10-06 19:22:57 +00:00
|
|
|
mod_target_filter = function(self, to_select, selected, user, card)
|
2023-08-01 18:19:51 +00:00
|
|
|
return user ~= to_select
|
|
|
|
end,
|
2023-10-06 19:22:57 +00:00
|
|
|
target_filter = function(self, to_select, selected, _, card)
|
|
|
|
if #selected < self:getMaxTargetNum(Self, card) then
|
|
|
|
return self:modTargetFilter(to_select, selected, Self.id, card)
|
2022-12-20 13:15:49 +00:00
|
|
|
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
|
2023-03-05 17:07:54 +00:00
|
|
|
local loopTimes = 1
|
|
|
|
if effect.fixedResponseTimes then
|
|
|
|
local canFix = currentResponser == to
|
|
|
|
if effect.fixedAddTimesResponsors then
|
|
|
|
canFix = table.contains(effect.fixedAddTimesResponsors, currentResponser.id)
|
|
|
|
end
|
|
|
|
|
|
|
|
if canFix then
|
|
|
|
if type(effect.fixedResponseTimes) == 'table' then
|
|
|
|
loopTimes = effect.fixedResponseTimes["slash"] or 1
|
|
|
|
elseif type(effect.fixedResponseTimes) == 'number' then
|
|
|
|
loopTimes = effect.fixedResponseTimes
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
local cardResponded
|
|
|
|
for i = 1, loopTimes do
|
2023-05-28 10:45:54 +00:00
|
|
|
cardResponded = room:askForResponse(currentResponser, 'slash', nil, nil, false, nil, effect)
|
2023-03-05 17:07:54 +00:00
|
|
|
if cardResponded then
|
|
|
|
room:responseCard({
|
|
|
|
from = currentResponser.id,
|
|
|
|
card = cardResponded,
|
|
|
|
responseToEvent = effect,
|
|
|
|
})
|
|
|
|
else
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
if not cardResponded then
|
2022-12-20 13:15:49 +00:00
|
|
|
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,
|
2023-05-28 10:45:54 +00:00
|
|
|
damage = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
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,
|
2023-04-13 12:17:39 +00:00
|
|
|
is_damage_card = true,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = duelSkill,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#collateral_skill",
|
2023-08-01 18:19:51 +00:00
|
|
|
mod_target_filter = function(self, to_select, selected, user, card, distance_limited)
|
|
|
|
local player = Fk:currentRoom():getPlayerById(to_select)
|
2024-01-29 02:19:10 +00:00
|
|
|
if #selected == 0 then
|
|
|
|
return user ~= to_select and player:getEquipment(Card.SubtypeWeapon) and not player:prohibitUse(Fk:cloneCard("slash"))
|
|
|
|
elseif #selected == 1 then
|
|
|
|
local target = Fk:currentRoom():getPlayerById(to_select)
|
|
|
|
local from = Fk:currentRoom():getPlayerById(selected[1])
|
|
|
|
return from:inMyAttackRange(target) and not from:isProhibited(player, Fk:cloneCard("slash"))
|
|
|
|
end
|
2023-08-01 18:19:51 +00:00
|
|
|
end,
|
2023-10-06 19:22:57 +00:00
|
|
|
target_filter = function(self, to_select, selected, _, card)
|
|
|
|
if #selected >= (self:getMaxTargetNum(Self, card) - 1) * 2 then
|
|
|
|
return false--修改借刀的目标选择
|
|
|
|
elseif #selected % 2 == 0 then
|
2024-01-29 02:19:10 +00:00
|
|
|
return self:modTargetFilter(to_select, {}, Self.id, card)
|
2023-10-06 19:22:57 +00:00
|
|
|
else
|
2024-01-29 02:19:10 +00:00
|
|
|
return self:modTargetFilter(selected[#selected], {}, Self.id, card)
|
|
|
|
and self:modTargetFilter(to_select, {selected[#selected]}, Self.id, card)
|
2022-12-20 13:15:49 +00:00
|
|
|
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)
|
2023-10-06 19:22:57 +00:00
|
|
|
local tos = {}
|
|
|
|
local exclusive = {}
|
|
|
|
for i, pid in ipairs(TargetGroup:getRealTargets(cardUseEvent.tos)) do
|
|
|
|
if i % 2 == 1 then
|
|
|
|
exclusive = { pid }
|
|
|
|
else
|
|
|
|
table.insert(exclusive, pid)
|
|
|
|
table.insert(tos, exclusive)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
cardUseEvent.tos = tos
|
2022-12-20 13:15:49 +00:00
|
|
|
end,
|
|
|
|
on_effect = function(self, room, effect)
|
2023-04-12 14:28:19 +00:00
|
|
|
local to = room:getPlayerById(effect.to)
|
2024-01-29 02:19:10 +00:00
|
|
|
if to.dead then return end
|
2023-07-11 13:15:38 +00:00
|
|
|
local prompt = "#collateral-slash:"..effect.from..":"..effect.subTargets[1]
|
|
|
|
if #effect.subTargets > 1 then
|
|
|
|
prompt = nil
|
|
|
|
end
|
2024-01-29 02:19:10 +00:00
|
|
|
local extra_data = {
|
|
|
|
must_targets = effect.subTargets,
|
|
|
|
bypass_times = true,
|
|
|
|
}
|
|
|
|
local use = room:askForUseCard(to, "slash", nil, prompt, nil, extra_data, effect)
|
2023-01-16 11:13:07 +00:00
|
|
|
if use then
|
2023-07-11 13:15:38 +00:00
|
|
|
use.extraUse = true
|
2023-01-16 11:13:07 +00:00
|
|
|
room:useCard(use)
|
2022-12-20 13:15:49 +00:00
|
|
|
else
|
2024-01-29 02:19:10 +00:00
|
|
|
local from = room:getPlayerById(effect.from)
|
|
|
|
if from.dead then return end
|
|
|
|
local weapons = to:getEquipments(Card.SubtypeWeapon)
|
|
|
|
if #weapons > 0 then
|
|
|
|
room:moveCardTo(weapons, Card.PlayerHand, from, fk.ReasonGive, "collateral", nil, true, to.id)
|
|
|
|
end
|
2022-12-20 13:15:49 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#ex_nihilo_skill",
|
|
|
|
mod_target_filter = Util.TrueFunc,
|
2023-08-13 04:34:36 +00:00
|
|
|
can_use = function(self, player, card)
|
|
|
|
return not player:isProhibited(player, card)
|
|
|
|
end,
|
2022-04-30 07:27:56 +00:00
|
|
|
on_use = function(self, room, cardUseEvent)
|
|
|
|
if not cardUseEvent.tos or #TargetGroup:getRealTargets(cardUseEvent.tos) == 0 then
|
|
|
|
cardUseEvent.tos = { { cardUseEvent.from } }
|
|
|
|
end
|
|
|
|
end,
|
2023-07-11 13:15:38 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local target = room:getPlayerById(effect.to)
|
|
|
|
if target.dead then return end
|
|
|
|
target:drawCards(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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
can_use = Util.FalseFunc,
|
2023-08-09 14:25:15 +00:00
|
|
|
on_use = function() RoomInstance:delay(1200) end,
|
2022-12-18 04:52:52 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
if effect.responseToEvent then
|
2023-06-19 13:56:06 +00:00
|
|
|
effect.responseToEvent.isCancellOut = true
|
2022-12-18 04:52:52 +00:00
|
|
|
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,
|
2024-02-04 07:55:44 +00:00
|
|
|
is_passive = true,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#savage_assault_skill",
|
2023-08-01 18:19:51 +00:00
|
|
|
can_use = Util.AoeCanUse,
|
|
|
|
on_use = Util.AoeOnUse,
|
|
|
|
mod_target_filter = function(self, to_select, selected, user, card, distance_limited)
|
|
|
|
return user ~= to_select
|
|
|
|
end,
|
2022-12-20 13:15:49 +00:00
|
|
|
on_effect = function(self, room, effect)
|
2023-05-28 10:45:54 +00:00
|
|
|
local cardResponded = room:askForResponse(room:getPlayerById(effect.to), 'slash', nil, nil, false, nil, effect)
|
2022-12-20 13:15:49 +00:00
|
|
|
|
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,
|
2023-05-28 10:45:54 +00:00
|
|
|
damage = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
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,
|
2023-04-13 12:17:39 +00:00
|
|
|
is_damage_card = true,
|
2023-07-11 15:16:46 +00:00
|
|
|
multiple_targets = true,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = savageAssaultSkill,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#archery_attack_skill",
|
2023-08-01 18:19:51 +00:00
|
|
|
can_use = Util.AoeCanUse,
|
|
|
|
on_use = Util.AoeOnUse,
|
|
|
|
mod_target_filter = function(self, to_select, selected, user, card, distance_limited)
|
|
|
|
return user ~= to_select
|
|
|
|
end,
|
2022-12-20 13:15:49 +00:00
|
|
|
on_effect = function(self, room, effect)
|
2023-05-28 10:45:54 +00:00
|
|
|
local cardResponded = room:askForResponse(room:getPlayerById(effect.to), 'jink', nil, nil, false, nil, effect)
|
2022-12-20 13:15:49 +00:00
|
|
|
|
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,
|
2023-05-28 10:45:54 +00:00
|
|
|
damage = 1,
|
2022-12-20 13:15:49 +00:00
|
|
|
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,
|
2023-04-13 12:17:39 +00:00
|
|
|
is_damage_card = true,
|
2023-07-11 15:16:46 +00:00
|
|
|
multiple_targets = true,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = archeryAttackSkill,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#god_salvation_skill",
|
2023-08-01 18:19:51 +00:00
|
|
|
can_use = Util.GlobalCanUse,
|
|
|
|
on_use = Util.GlobalOnUse,
|
2023-12-09 13:57:47 +00:00
|
|
|
mod_target_filter = Util.TrueFunc,
|
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)
|
2023-07-11 13:15:38 +00:00
|
|
|
local player = room:getPlayerById(effect.from)
|
|
|
|
local target = room:getPlayerById(effect.to)
|
|
|
|
if target:isWounded() and not target.dead then
|
|
|
|
room:recover({
|
|
|
|
who = target,
|
|
|
|
num = 1,
|
|
|
|
recoverBy = player,
|
|
|
|
card = effect.card,
|
|
|
|
skillName = self.name,
|
|
|
|
})
|
|
|
|
end
|
2022-12-20 13:15:49 +00:00
|
|
|
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,
|
2023-07-11 15:16:46 +00:00
|
|
|
multiple_targets = true,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = godSalvationSkill,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#amazing_grace_skill",
|
2023-08-01 18:19:51 +00:00
|
|
|
can_use = Util.GlobalCanUse,
|
|
|
|
on_use = Util.GlobalOnUse,
|
2023-12-09 13:57:47 +00:00
|
|
|
mod_target_filter = Util.TrueFunc,
|
2024-02-04 07:29:39 +00:00
|
|
|
on_action = function(self, room, use, finished)
|
|
|
|
if not finished then
|
|
|
|
local toDisplay = room:getNCards(#TargetGroup:getRealTargets(use.tos))
|
|
|
|
room:moveCards({
|
|
|
|
ids = toDisplay,
|
|
|
|
toArea = Card.Processing,
|
|
|
|
moveReason = fk.ReasonPut,
|
|
|
|
})
|
|
|
|
|
|
|
|
table.forEach(room.players, function(p)
|
|
|
|
room:fillAG(p, toDisplay)
|
|
|
|
end)
|
|
|
|
|
|
|
|
use.extra_data = use.extra_data or {}
|
|
|
|
use.extra_data.AGFilled = toDisplay
|
|
|
|
else
|
|
|
|
if use.extra_data and use.extra_data.AGFilled then
|
|
|
|
table.forEach(room.players, function(p)
|
|
|
|
room:closeAG(p)
|
|
|
|
end)
|
|
|
|
|
|
|
|
local toDiscard = table.filter(use.extra_data.AGFilled, function(id)
|
|
|
|
return room:getCardArea(id) == Card.Processing
|
|
|
|
end)
|
|
|
|
|
|
|
|
if #toDiscard > 0 then
|
|
|
|
room:moveCards({
|
|
|
|
ids = toDiscard,
|
|
|
|
toArea = Card.DiscardPile,
|
|
|
|
moveReason = fk.ReasonPutIntoDiscardPile,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
use.extra_data.AGFilled = nil
|
|
|
|
end
|
|
|
|
end,
|
2023-03-14 12:48:08 +00:00
|
|
|
on_effect = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
|
|
|
if not (effect.extra_data and effect.extra_data.AGFilled) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local chosen = room:askForAG(to, effect.extra_data.AGFilled, false, self.name)
|
|
|
|
room:takeAG(to, chosen, room.players)
|
|
|
|
room:obtainCard(effect.to, chosen, true, fk.ReasonPrey)
|
|
|
|
table.removeOne(effect.extra_data.AGFilled, chosen)
|
2022-12-20 13:15:49 +00:00
|
|
|
end
|
|
|
|
}
|
2023-03-14 12:48:08 +00:00
|
|
|
|
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,
|
2023-07-11 15:16:46 +00:00
|
|
|
multiple_targets = true,
|
2022-12-20 13:15:49 +00:00
|
|
|
skill = amazingGraceSkill,
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#lightning_skill",
|
|
|
|
mod_target_filter = Util.TrueFunc,
|
2023-08-13 04:34:36 +00:00
|
|
|
can_use = function(self, player, card)
|
|
|
|
return not player:isProhibited(player, card)
|
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,
|
2023-06-04 11:40:14 +00:00
|
|
|
moveReason = fk.ReasonUse
|
2022-12-20 10:40:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
self:onNullified(room, effect)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_nullified = function(self, room, effect)
|
|
|
|
local to = room:getPlayerById(effect.to)
|
2023-03-09 04:19:16 +00:00
|
|
|
local nextp = to
|
2023-03-04 17:28:59 +00:00
|
|
|
repeat
|
2023-08-24 13:37:06 +00:00
|
|
|
nextp = nextp:getNextAlive(true)
|
2023-04-30 10:51:05 +00:00
|
|
|
if nextp == to then break end
|
2023-06-15 13:19:57 +00:00
|
|
|
until not nextp:hasDelayedTrick("lightning") and not nextp:isProhibited(nextp, effect.card)
|
|
|
|
|
2023-03-04 17:28:59 +00:00
|
|
|
|
2023-04-30 10:51:05 +00:00
|
|
|
if effect.card:isVirtual() then
|
|
|
|
nextp:addVirtualEquip(effect.card)
|
|
|
|
end
|
|
|
|
|
2022-12-20 10:40:17 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#indulgence_skill",
|
2023-08-13 04:34:36 +00:00
|
|
|
mod_target_filter = function(self, to_select, selected, user, card, distance_limited)
|
|
|
|
return user ~= to_select
|
|
|
|
end,
|
|
|
|
target_filter = function(self, to_select, selected, _, card)
|
|
|
|
return #selected == 0 and self:modTargetFilter(to_select, selected, Self.id, card, true)
|
2022-12-20 10:40:17 +00:00
|
|
|
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,
|
2023-06-04 11:40:14 +00:00
|
|
|
moveReason = fk.ReasonUse
|
2022-12-20 10:40:17 +00:00
|
|
|
}
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2023-12-09 13:57:47 +00:00
|
|
|
return target == player and player:hasSkill(self) and player.phase == Player.Play and
|
2023-07-11 13:15:38 +00:00
|
|
|
data.card.trueName == "slash" and player:usedCardTimes("slash", Player.HistoryPhase) > 1
|
2023-02-21 05:44:24 +00:00
|
|
|
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")
|
2023-12-09 13:57:47 +00:00
|
|
|
room:sendLog{
|
|
|
|
type = "#InvokeSkill",
|
|
|
|
from = player.id,
|
|
|
|
arg = "crossbow",
|
|
|
|
}
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
|
|
|
}
|
2023-02-15 13:20:40 +00:00
|
|
|
local crossbowSkill = fk.CreateTargetModSkill{
|
|
|
|
name = "#crossbow_skill",
|
|
|
|
attached_equip = "crossbow",
|
2023-06-20 05:37:03 +00:00
|
|
|
bypass_times = function(self, player, skill, scope)
|
2023-12-09 13:57:47 +00:00
|
|
|
if player:hasSkill(self) and skill.trueName == "slash_skill"
|
2023-02-15 13:20:40 +00:00
|
|
|
and scope == Player.HistoryPhase then
|
2023-06-18 16:20:50 +00:00
|
|
|
return true
|
2023-02-15 13:20:40 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
crossbow,
|
|
|
|
crossbow:clone(Card.Diamond, 1),
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-03-20 12:49:23 +00:00
|
|
|
fk.MarkArmorNullified = "mark__armor_nullified"
|
|
|
|
|
|
|
|
local armorInvalidity = fk.CreateInvaliditySkill {
|
2023-06-11 04:45:12 +00:00
|
|
|
name = "armor_invalidity",
|
2023-03-20 12:49:23 +00:00
|
|
|
global = true,
|
|
|
|
invalidity_func = function(self, from, skill)
|
2023-07-11 13:15:38 +00:00
|
|
|
if from:getMark(fk.MarkArmorNullified) > 0 and skill.attached_equip then
|
|
|
|
for _, card in ipairs(Fk.cards) do
|
|
|
|
if card.sub_type == Card.SubtypeArmor and skill.attached_equip == card.name then
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2023-03-20 12:49:23 +00:00
|
|
|
end
|
|
|
|
}
|
|
|
|
Fk:addSkill(armorInvalidity)
|
|
|
|
|
|
|
|
local qingGangSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#qinggang_sword_skill",
|
|
|
|
attached_equip = "qinggang_sword",
|
|
|
|
frequency = Skill.Compulsory,
|
|
|
|
events = { fk.TargetSpecified },
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
2023-12-09 13:57:47 +00:00
|
|
|
return target == player and player:hasSkill(self) and
|
2023-03-20 12:49:23 +00:00
|
|
|
data.card and data.card.trueName == "slash"
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
2023-12-02 16:21:52 +00:00
|
|
|
local to = room:getPlayerById(data.to)
|
|
|
|
local use_event = room.logic:getCurrentEvent():findParent(GameEvent.UseCard, true)
|
|
|
|
if use_event == nil then return end
|
|
|
|
room:addPlayerMark(to, fk.MarkArmorNullified)
|
|
|
|
use_event:addCleaner(function()
|
|
|
|
room:removePlayerMark(to, fk.MarkArmorNullified)
|
|
|
|
end)
|
2023-03-20 12:49:23 +00:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
Fk:addSkill(qingGangSkill)
|
|
|
|
|
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,
|
2023-03-20 12:49:23 +00:00
|
|
|
equip_skill = qingGangSkill,
|
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)
|
2023-12-09 13:57:47 +00:00
|
|
|
return target == player and player:hasSkill(self) and (not data.chain) and
|
2023-03-07 02:21:56 +00:00
|
|
|
data.card and data.card.trueName == "slash" and not data.to:isNude()
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local to = data.to
|
|
|
|
for i = 1, 2 do
|
2023-07-11 13:15:38 +00:00
|
|
|
if player.dead or to.dead or to:isNude() then break end
|
2023-02-21 05:44:24 +00:00
|
|
|
local card = room:askForCardChosen(player, to, "he", self.name)
|
2023-07-11 13:15:38 +00:00
|
|
|
room:throwCard({card}, self.name, to, player)
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2023-12-09 13:57:47 +00:00
|
|
|
if target == player and player:hasSkill(self) and
|
2023-08-25 09:14:43 +00:00
|
|
|
data.card and data.card.trueName == "slash" then
|
2023-12-09 13:57:47 +00:00
|
|
|
local target = player.room:getPlayerById(data.to)
|
|
|
|
return player:compareGenderWith(target, true)
|
2023-08-25 09:14:43 +00:00
|
|
|
end
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local to = player.room:getPlayerById(data.to)
|
2023-07-11 13:15:38 +00:00
|
|
|
if to:isKongcheng() then
|
2023-02-21 05:44:24 +00:00
|
|
|
player:drawCards(1, self.name)
|
2023-07-11 13:15:38 +00:00
|
|
|
else
|
|
|
|
local result = room:askForDiscard(to, 1, 1, false, self.name, true, ".", "#double_swords-invoke:"..player.id)
|
|
|
|
if #result == 0 then
|
|
|
|
player:drawCards(1, self.name)
|
|
|
|
end
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-08-02 13:50:47 +00:00
|
|
|
events = {fk.CardEffectCancelledOut},
|
2023-02-21 05:44:24 +00:00
|
|
|
can_trigger = function(self, event, target, player, data)
|
2023-12-09 13:57:47 +00:00
|
|
|
return player:hasSkill(self) and data.from == player.id and data.card.trueName == "slash" and not player.room:getPlayerById(data.to).dead
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
|
|
|
on_cost = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
2023-08-02 13:50:47 +00:00
|
|
|
local use = room:askForUseCard(player, "slash", nil, "#blade_slash:" .. data.to,
|
|
|
|
true, { must_targets = {data.to}, exclusive_targets = {data.to}, bypass_distances = true, bypass_times = true })
|
2023-02-21 05:44:24 +00:00
|
|
|
if use then
|
2023-06-04 11:40:14 +00:00
|
|
|
use.extraUse = true
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-12-09 13:57:47 +00:00
|
|
|
prompt = "#spear_skill",
|
2023-02-21 05:44:24 +00:00
|
|
|
attached_equip = "spear",
|
|
|
|
pattern = "slash",
|
|
|
|
card_filter = function(self, to_select, selected)
|
|
|
|
if #selected == 2 then return false end
|
2024-02-04 07:30:27 +00:00
|
|
|
return table.contains(Self:getHandlyIds(true), to_select)
|
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")
|
2023-04-02 04:56:29 +00:00
|
|
|
c.skillName = "spear"
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-03-05 17:07:54 +00:00
|
|
|
events = {fk.CardEffectCancelledOut},
|
2023-02-21 05:44:24 +00:00
|
|
|
can_trigger = function(self, event, target, player, data)
|
2023-12-09 13:57:47 +00:00
|
|
|
return player:hasSkill(self) and data.from == player.id and data.card.trueName == "slash" and not player.room:getPlayerById(data.to).dead
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
|
|
|
on_cost = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
2023-07-11 13:15:38 +00:00
|
|
|
local pattern
|
|
|
|
if player:getEquipment(Card.SubtypeWeapon) then
|
|
|
|
pattern = ".|.|.|.|.|.|^"..tostring(player:getEquipment(Card.SubtypeWeapon))
|
|
|
|
else
|
|
|
|
pattern = "."
|
|
|
|
end
|
|
|
|
local cards = room:askForDiscard(player, 2, 2, true, self.name, true, pattern, "#axe-invoke::"..data.to, true)
|
|
|
|
if #cards > 0 then
|
|
|
|
self.cost_data = cards
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
room:throwCard(self.cost_data, "axe", player, player)
|
|
|
|
return true
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2023-12-09 13:57:47 +00:00
|
|
|
return target == player and player:hasSkill(self) and
|
2023-03-07 02:21:56 +00:00
|
|
|
data.card.trueName == "slash" and #TargetGroup:getRealTargets(data.tos) > 1
|
2023-02-21 05:44:24 +00:00
|
|
|
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)
|
2023-12-09 13:57:47 +00:00
|
|
|
if player:hasSkill(self) and skill.trueName == "slash_skill" then
|
2023-08-02 13:50:47 +00:00
|
|
|
local cards = card:isVirtual() and card.subcards or {card.id}
|
|
|
|
local handcards = player:getCardIds(Player.Hand)
|
|
|
|
if #cards == #handcards and table.every(cards, function(id) return table.contains(handcards, id) end) then
|
|
|
|
return 2
|
|
|
|
end
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2023-12-09 13:57:47 +00:00
|
|
|
local ret = target == player and player:hasSkill(self) and
|
2023-03-20 12:28:25 +00:00
|
|
|
data.card and data.card.trueName == "slash" and (not data.chain)
|
2023-02-21 05:44:24 +00:00
|
|
|
if ret then
|
|
|
|
---@type ServerPlayer
|
|
|
|
local to = data.to
|
2023-12-02 16:21:52 +00:00
|
|
|
return table.find(to:getCardIds(Player.Equip), function (id)
|
|
|
|
local card = Fk:getCardById(id)
|
|
|
|
return card.sub_type == Card.SubtypeDefensiveRide or card.sub_type == Card.SubtypeOffensiveRide
|
|
|
|
end)
|
2023-02-21 05:44:24 +00:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local to = data.to
|
2023-12-02 16:21:52 +00:00
|
|
|
local ride_tab = table.filter(to:getCardIds(Player.Equip), function (id)
|
|
|
|
local card = Fk:getCardById(id)
|
|
|
|
return card.sub_type == Card.SubtypeDefensiveRide or card.sub_type == Card.SubtypeOffensiveRide
|
|
|
|
end)
|
2023-02-21 05:44:24 +00:00
|
|
|
if #ride_tab == 0 then return end
|
2023-12-02 16:21:52 +00:00
|
|
|
local id = room:askForCardChosen(player, to, {
|
|
|
|
card_data = {
|
|
|
|
{ "equip_horse", ride_tab }
|
|
|
|
}
|
|
|
|
}, self.name)
|
|
|
|
room:throwCard({id}, self.name, to, player)
|
2023-02-21 05:44:24 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
extension:addCards({
|
2022-04-30 07:27:56 +00:00
|
|
|
kylinBow,
|
2022-04-08 10:39:58 +00:00
|
|
|
})
|
|
|
|
|
2023-03-05 17:07:54 +00:00
|
|
|
local eightDiagramSkill = fk.CreateTriggerSkill{
|
|
|
|
name = "#eight_diagram_skill",
|
|
|
|
attached_equip = "eight_diagram",
|
|
|
|
events = {fk.AskForCardUse, fk.AskForCardResponse},
|
|
|
|
can_trigger = function(self, event, target, player, data)
|
2023-12-09 13:57:47 +00:00
|
|
|
return target == player and player:hasSkill(self) and
|
2023-03-20 12:49:23 +00:00
|
|
|
(data.cardName == "jink" or (data.pattern and Exppattern:Parse(data.pattern):matchExp("jink|0|nosuit|none")))
|
2023-03-05 17:07:54 +00:00
|
|
|
end,
|
|
|
|
on_use = function(self, event, target, player, data)
|
|
|
|
local room = player.room
|
|
|
|
local judgeData = {
|
|
|
|
who = player,
|
|
|
|
reason = self.name,
|
|
|
|
pattern = ".|.|heart,diamond",
|
|
|
|
}
|
|
|
|
room:judge(judgeData)
|
|
|
|
|
|
|
|
if judgeData.card.color == Card.Red then
|
|
|
|
if event == fk.AskForCardUse then
|
|
|
|
data.result = {
|
|
|
|
from = player.id,
|
|
|
|
card = Fk:cloneCard('jink'),
|
|
|
|
}
|
2023-04-02 04:56:29 +00:00
|
|
|
data.result.card.skillName = "eight_diagram"
|
2023-03-05 17:07:54 +00:00
|
|
|
|
|
|
|
if data.eventData then
|
|
|
|
data.result.toCard = data.eventData.toCard
|
|
|
|
data.result.responseToEvent = data.eventData.responseToEvent
|
|
|
|
end
|
|
|
|
else
|
|
|
|
data.result = Fk:cloneCard('jink')
|
2023-04-02 04:56:29 +00:00
|
|
|
data.result.skillName = "eight_diagram"
|
2023-03-05 17:07:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|
|
|
|
Fk:addSkill(eightDiagramSkill)
|
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,
|
2023-03-05 17:07:54 +00:00
|
|
|
equip_skill = eightDiagramSkill,
|
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
|
2023-12-09 13:57:47 +00:00
|
|
|
return player.id == effect.to and player:hasSkill(self) and
|
2023-03-07 02:21:56 +00:00
|
|
|
effect.card.trueName == "slash" and effect.card.color == Card.Black
|
2023-02-21 05:44:24 +00:00
|
|
|
end,
|
2023-12-09 13:57:47 +00:00
|
|
|
on_use = Util.TrueFunc,
|
2023-02-21 05:44:24 +00:00
|
|
|
}
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
2023-02-27 02:23:48 +00:00
|
|
|
dofile "packages/standard_cards/i18n/init.lua"
|
|
|
|
|
2022-03-31 05:29:23 +00:00
|
|
|
return extension
|