代码拉取完成,页面将自动刷新
同步操作将从 北冰洋T/宝宝杀 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
local extension = Package:new("joy_token", Package.CardPack)
Fk:loadTranslationTable{
["joy_token"] = "欢乐杀衍生牌",
}
local U = require "packages/utility/utility"
local siege_engine_slash = fk.CreateViewAsSkill{
name = "joy__siege_engine_slash",
card_filter = Util.FalseFunc,
view_as = function(self, cards)
local card = Fk:cloneCard("slash")
card.skillName = "#joy__siege_engine_skill"
return card
end,
}
Fk:addSkill(siege_engine_slash)
local siegeEngineSkill = fk.CreateTriggerSkill{
name = "#joy__siege_engine_skill",
attached_equip = "joy__siege_engine",
events = {fk.EventPhaseStart, fk.Damage, fk.BeforeCardsMove, fk.TargetSpecified},
can_trigger = function(self, event, target, player, data)
if event == fk.EventPhaseStart then
return target == player and player:hasSkill(self) and player.phase == Player.Play
elseif event == fk.Damage then
return target == player and player:hasSkill(self) and data.card and table.contains(data.card.skillNames, self.name) and
U.damageByCardEffect(player.room) and not data.to.dead and not data.to:isNude()
elseif event == fk.BeforeCardsMove then
if player:getEquipment(Card.SubtypeWeapon) and Fk:getCardById(player:getEquipment(Card.SubtypeWeapon)).name == "joy__siege_engine" and
(player:getMark("joy__xianzhu1") == 0 and player:getMark("joy__xianzhu2") == 0 and player:getMark("joy__xianzhu3") == 0) then
for _, move in ipairs(data) do
return move.from == player.id
end
end
elseif event == fk.TargetSpecified then
return target == player and player:hasSkill(self) and data.card.trueName == "slash" and player:getMark("joy__xianzhu1") > 0
end
end,
on_cost = function(self, event, target, player, data)
if event == fk.EventPhaseStart then
local success, dat = player.room:askForUseActiveSkill(player, "joy__siege_engine_slash", "#joy__siege_engine-invoke", true)
if success then
self.cost_data = dat
return true
end
else
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
if event == fk.EventPhaseStart then
local card = Fk:cloneCard("slash")
card.skillName = self.name
room:useCard{
from = player.id,
tos = table.map(self.cost_data.targets, function(id) return {id} end),
card = card,
extraUse = true,
}
elseif event == fk.Damage then
local cards = room:askForCardsChosen(player, data.to, 1, 1 + player:getMark("joy__xianzhu3"), "he", self.name)
room:throwCard(cards, self.name, data.to, player)
elseif event == fk.BeforeCardsMove then
for _, move in ipairs(data) do
if move.from == player.id and move.toArea ~= Card.Void then
for _, info in ipairs(move.moveInfo) do
if info.fromArea == Card.PlayerEquip and move.moveReason == fk.ReasonDiscard then
if Fk:getCardById(info.cardId, true).name == "joy__siege_engine" then
room:notifySkillInvoked(player, self.name, "defensive")
return true
end
end
end
end
end
elseif event == fk.TargetSpecified then
room:addPlayerMark(room:getPlayerById(data.to), fk.MarkArmorNullified)
data.extra_data = data.extra_data or {}
data.extra_data.siege_engineNullified = data.extra_data.siege_engineNullified or {}
data.extra_data.siege_engineNullified[tostring(data.to)] = (data.extra_data.siege_engineNullified[tostring(data.to)] or 0) + 1
end
end,
refresh_events = {fk.CardUseFinished},
can_refresh = function(self, event, target, player, data)
return data.extra_data and data.extra_data.siege_engineNullified
end,
on_refresh = function(self, event, target, player, data)
local room = player.room
for key, num in pairs(data.extra_data.siege_engineNullified) do
local p = room:getPlayerById(tonumber(key))
if p:getMark(fk.MarkArmorNullified) > 0 then
room:removePlayerMark(p, fk.MarkArmorNullified, num)
end
end
data.siege_engineNullified = nil
end,
}
local siege_engine_targetmod = fk.CreateTargetModSkill{
name = "#joy__siege_engine_targetmod",
distance_limit_func = function(self, player, skill, card, to)
if skill.trueName == "slash_skill" and card and card.trueName == "slash" and player:getMark("joy__xianzhu1") > 0 then
return 999
end
end,
extra_target_func = function(self, player, skill, card)
if skill.trueName == "slash_skill" and card and table.contains(card.skillNames, "#joy__siege_engine_skill") then
return player:getMark("joy__xianzhu2")
end
end,
}
siegeEngineSkill:addRelatedSkill(siege_engine_targetmod)
Fk:addSkill(siegeEngineSkill)
local siegeEngine = fk.CreateWeapon{
name = "&joy__siege_engine",
suit = Card.Spade,
number = 9,
attack_range = 2,
equip_skill = siegeEngineSkill,
}
extension:addCard(siegeEngine)
Fk:loadTranslationTable{
["joy__siege_engine"] = "大攻车",
[":joy__siege_engine"] = "装备牌·武器<br /><b>攻击范围</b>:2<br /><b>武器技能</b>:出牌阶段开始时,你可以视为使用一张【杀】(不计入次数),当此【杀】对目标角色造成伤害后,你弃置其一张牌。"..
"若此牌未升级,则不能被弃置。离开装备区后销毁。<br>升级选项:<br>1.此【杀】无视距离和防具(装备大攻车后的所有【杀】);<br>2.此【杀】可指定目标+1;<br>3.此【杀】造成伤害后弃牌数+1。",
["#joy__siege_engine_skill"] = "大攻车",
["joy__siege_engine_slash"] = "大攻车",
["#joy__siege_engine-invoke"] = "大攻车:你可以视为使用【杀】",
}
return extension
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。