1 Star 0 Fork 6

张大北 / OL

forked from Qsgs-Fans / OL 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ol_exyj.lua 2.64 KB
一键复制 编辑 原始数据 按行查看 历史
local extension = Package("ol_exyj")
extension.extensionName = "ol"
local U = require "packages/utility/utility"
Fk:loadTranslationTable{
["ol_exyj"] = "OL-界一将成名",
}
local lingtong = General(extension, "ol_ex__lingtong", "wu", 4)
local ol_ex__xuanfeng = fk.CreateTriggerSkill{
name = "ol_ex__xuanfeng",
anim_type = "control",
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill(self) then
for _, move in ipairs(data) do
if move.from == player.id then
local n = 0
for _, info in ipairs(move.moveInfo) do
if info.fromArea == Card.PlayerHand then
n = n + 1
elseif info.fromArea == Card.PlayerEquip then
n = 2
end
end
if n > 1 then
return table.find(player.room:getOtherPlayers(player), function(p) return not p:isNude() end)
end
end
end
end
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local targets = table.map(table.filter(room:getOtherPlayers(player), function(p)
return not p:isNude() end), Util.IdMapper)
while player.room:askForSkillInvoke(player, self.name) do
local to = room:askForChoosePlayers(player, targets, 1, 1, "#xuanfeng-choose", self.name, true)
if #to > 0 then
self.cost_data = to[1]
return true
end
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local to = room:getPlayerById(self.cost_data)
local card = room:askForCardChosen(player, to, "he", self.name)
room:throwCard({card}, self.name, to, player)
local targets = table.map(table.filter(room:getOtherPlayers(player), function(p)
return not p:isNude() end), Util.IdMapper)
if #targets == 0 or player.dead then return end
to = room:askForChoosePlayers(player, targets, 1, 1, "#xuanfeng-choose", self.name, true)
if #to > 0 then
to = room:getPlayerById(to[1])
card = room:askForCardChosen(player, to, "he", self.name)
room:throwCard({card}, self.name, to, player)
end
end,
}
lingtong:addSkill(ol_ex__xuanfeng)
Fk:loadTranslationTable{
["ol_ex__lingtong"] = "界凌统",
["ol_ex__xuanfeng"] = "旋风",
[":ol_ex__xuanfeng"] = "当你失去装备区里的牌后,或一次性失去至少两张牌后,你可以依次弃置至多两名其他角色共计至多两张牌。",
["$ol_ex__xuanfeng1"] = "短兵相接,让敌人丢盔弃甲!",
["$ol_ex__xuanfeng2"] = "攻敌不备,看他们闻风而逃!",
["~ol_ex__lingtong"] = "先……停一下吧……",
}
return extension
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/buaa18376457/ol.git
git@gitee.com:buaa18376457/ol.git
buaa18376457
ol
OL
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891