加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tyj_org.lua 3.41 KB
一键复制 编辑 原始数据 按行查看 历史
Maaaaars 提交于 2024-10-03 21:42 . 国战包
local extension = Package:new("tyj_org")
extension.extensionName = "tyj"
Fk:loadTranslationTable{
["tyj_org"] = "汤圆原创将",
["tyj"]='汤圆原创包'
}
local U = require "packages/utility/utility"
local tyj__zhangte = General:new(extension, "tyj__zhangte", "wei", 4,4)
Fk:loadTranslationTable{
["tyj__zhangte"] = "张特",
["#tyj__zhangte"] = "城筑翻降",
["designer:tyj__zhangte"] = "汤圆",
["cv:tyj__zhangte"] = "官方",
["illustrator:tyj__zhangte"] = "光城",
}
local tyj__fanzhu = fk.CreateTriggerSkill{
name = "tyj__fanzhu",
events = {fk.EventPhaseStart},
anim_type = "drawcard",
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) and target.phase == Player.Start and target:isAlive() then
return not player:isNude()
end
end,
on_cost = function(self, event, target, player, data)
local room=player.room
local cards = room:askForCard(player, 1, 999, true, self.name, true, ".", "#tyj__fanzhu-card")
if #cards > 0 then
self.cost_data=cards
return true end
end,
on_use = function(self, event, target, player, data)
local room=player.room
local cardstable={}
room:recastCard(self.cost_data, player, self.name)
for i=1,99 do
local use=U.askForUseRealCard(room, player, nil, nil, self.name,"对自己使用一张牌",{include_targets = {player.id}, bypass_times = true},true)
if use then
room:useCard(use)
table.insertIfNeed(cardstable,use.card:getSuitString(true))
else break end
end
local mark=nil
if #cardstable == 0 then
room:setPlayerMark(player,"@@tyj_fanzhu_baned-turn",1)
else
room:setPlayerMark(player,"@tyj_fanzhu_can-turn",cardstable)
local to = room:askForChoosePlayers(player, table.map(room:getOtherPlayers(player), function (p)
return p.id end), 1, 1, "翻筑:你可以令一名角色本回合不能使用这些花色的牌", self.name, true)
if #to > 0 then
to = room:getPlayerById(to[1])
room:setPlayerMark(to,"@tyj_fanzhu_cant-turn",cardstable)
end
end
end,
}
local tyj__fanzhu_prohibit = fk.CreateProhibitSkill{
name = "#tyj__fanzhu_prohibit",
prohibit_use = function(self, player, card)
return (player:getMark("@tyj_fanzhu_cant-turn") ~= 0 and table.contains(player:getMark("@tyj_fanzhu_cant-turn"), card:getSuitString(true))) or (player:getMark("@tyj_fanzhu_can-turn") ~= 0 and not table.contains(player:getMark("@tyj_fanzhu_can-turn"), card:getSuitString(true))) or player:getMark("@@tyj_fanzhu_baned-turn")~=0
end,
}
tyj__fanzhu:addRelatedSkill(tyj__fanzhu_prohibit)
tyj__zhangte:addSkill(tyj__fanzhu)
Fk:loadTranslationTable{
["tyj__fanzhu"]="翻筑",
[":tyj__fanzhu"]="一名角色的准备阶段,你可以重铸任意张牌并使用任意张牌(目标需包含你),令你本回合只能使用此次使用过的花色的牌,然后你可以令一名其他角色本回合不能使用这些花色的牌。",
["@tyj_fanzhu_can-turn"]="能使用",
["@tyj_fanzhu_cant-turn"]="不能使用",
["@@tyj_fanzhu_baned-turn"]="不能使用牌",
["#tyj__fanzhu-card"] = "翻筑:你可以重铸任意张牌",
}
return extension
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化