代码拉取完成,页面将自动刷新
local extension=Package("ao")
extension.extensionName="jbs"
local U = require "packages/utility/utility"
local T = require "packages/jbs/record/Theorem"
local books=require"packages/jbs/record/jbsdatabase/readone"
Fk:loadTranslationTable{
["jbsao"]="GBS",
["ao"]="GBS—傲乱",
["jbsv"]="vup",
}
local wuyaowang=General:new(extension,"jbs_wuyaowang","qun",3,3)
local fuwen=fk.CreateTriggerSkill{
name = "jbs__fuwen",
events = {fk.GameStart},
frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self.name) and not player.dead
end,
on_use = function(self, event, target, player, data)
local room = player.room
local choices= {"jbs__fuwenred", "jbs__fuwenblue","jbs__fuwengreen"}
local gen={}
for i = 1, 3, 1 do
local choice = room:askForChoice(player, choices, self.name ,"#jbsklfuwen-choice",true)
if choice == "jbs__fuwenred" then
room:addPlayerMark(player,"@jbs_fuwen-red",1)
room:changeMaxHp(player, 1)
room:recover({
who = player,
num = 1,
recoverBy = player,
skillName = self.name
})
gen[i]="shu"
elseif choice == "jbs__fuwenblue" then
room:addPlayerMark(player,"@jbs_fuwen-blue",1)
gen[i]="wei"
elseif choice == "jbs__fuwengreen" then
room:addPlayerMark(player,"@jbs_fuwen-green",1)
gen[i]="wu"
end
end
if #gen~=3 then
gen={"shu","shu","shu"}
end
local existingGenerals = {}
local generals = {}
table.forEach(room.players, function(p)
table.insertTable(existingGenerals, {p.general, p.deputyGeneral})
end)
for i=1,3,1 do
local general = table.map(Fk:getGeneralsRandomly(1, Fk:getAllGenerals(), existingGenerals,
(function(p) return (p.kingdom ~= gen[i]) end)), function(g) return g.name end)[1]
table.insert(generals,general)
end
local skills = {}
local choices = {}
for _, general_name in ipairs(generals) do
local general = Fk.generals[general_name]
local g_skills = {}
--加载技能
for _, skill in ipairs(general.skills) do
table.insertIfNeed(g_skills, skill.name)
end
for _, s_name in ipairs(general.other_skills) do
local skill = Fk.skills[s_name]
table.insertIfNeed(g_skills, skill.name)
end
table.insertIfNeed(skills, g_skills)
if #choices == 0 and #g_skills > 0 then
choices = {g_skills[1]}
end
end
if #choices > 0 then
local result = player.room:askForCustomDialog(player, self.name,
"packages/tenyear/qml/ChooseGeneralSkillsBox.qml", {
generals, skills, 1, 1, "#ao_fuwen-choice", false
})
if result ~= "" then
choices = json.decode(result)
end
room:handleAddLoseSkills(player, table.concat(choices, "|"), nil)
end
--[[老巫妖王
local names = {}
while #names < 1 do
local general = Fk.generals[room:askForGeneral(player, generals, 1)]
local choices = {}
for _, s in ipairs(general:getSkillNameList()) do
local skill = Fk.skills[s]
if not player:hasSkill(skill, true, true) then
table.insertIfNeed(choices, skill.name)
end
end
if #choices > 0 then
local choice = room:askForChoice(player, choices, self.name, "#jbs__fuwenred-invoke", true)
table.insert(names, choice)
end
end
room:handleAddLoseSkills(player, table.concat(names, "|"), nil, true, false)
--]]
end,
}
local fuwen_red = fk.CreateTriggerSkill{
name = "#jbs__fuwen_red",
events = {fk.PreHpRecover},
frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
return target==player and player:hasSkill("jbs__fuwen") and player:getMark("@jbs_fuwen-red")>0 and not player.dead
end,
on_use = function(self, event, target, player, data)
local room = player.room
local x= player:getMark("@jbs_fuwen-red")
room:changeMaxHp(player, x)
end,
}
--[[
local fuwen_blue = fk.CreateTriggerSkill{
name = "#jbs__fuwen_blue",
frequency = Skill.Compulsory,
anim_type = "masochism",
events = {fk.Damaged},
can_trigger = function(self, event, target, player, data)
return target==player and player:hasSkill("jbs__fuwen") and player:getMark("@jbs_fuwen-blue")>0 and not player.dead
end,
on_use = function(self, event, target, player, data)
local room = player.room
for i=1 ,player:getMark("@jbs_fuwen-blue") do
local cards = player.room:getCardsFromPileByRule(".|.|.|.|.|trick")
if #cards > 0 then
room:obtainCard(player, cards[1], true, fk.ReasonJustMove)
end
end
end,
}
--]]
local fuwen_blue = fk.CreateTriggerSkill{
name = "#jbs__fuwen_blue",
frequency = Skill.Compulsory,
anim_type = "drawcard",
events = {fk.CardUsing},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill("jbs__fuwen") and player:getMark("@jbs_fuwen-blue")>0 and not player.dead and
data.card.type == Card.TypeTrick
end,
on_use = function(self, event, target, player, data)
local room = player.room
local x= player:getMark("@jbs_fuwen-blue")
room:notifySkillInvoked(player, self.name, "drawcard")
player:drawCards(x,self.name)
end,
}
--[[
local fuwen_green = fk.CreateTriggerSkill{
name = "#jbs__fuwen_green",
mute = true,
frequency = Skill.Compulsory,
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self.name) and player.phase == Player.Start and player:getMark("@jbs_fuwen-green")>0
end,
on_use = function(self, event, target, player, data)
local room = player.room
local x= player:getMark("@jbs_fuwen-green")
room:notifySkillInvoked(player, self.name, "drawcard")
player:drawCards(x,self.name)
end,
}
--]]
local fuwen_green = fk.CreateTriggerSkill{
name = "#jbs__fuwen_green",
mute = true,
frequency = Skill.Compulsory,
events = {fk.AfterCardsMove},
can_trigger = function(self, event, target, player, data)
if player:hasSkill("jbs__fuwen") and player:getMark("@jbs_fuwen-green")>0 and player:usedSkillTimes(self.name,Player.HistoryTurn)<player.hp then
for _, move in ipairs(data) do
return move.to == player.id and move.toArea == Player.Hand and move.skillName ~= self.name
end
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local x= player:getMark("@jbs_fuwen-green")
room:notifySkillInvoked(player, self.name, "drawcard")
player:drawCards(x,self.name)
end,
}
local fuwen_green_maxcards = fk.CreateMaxCardsSkill{
name = "#fuwen_green_maxcards",
correct_func = function(self, player)
if player:hasSkill(self.name) then
return player:getMark("@jbs_fuwen-green")
else
return 0
end
end,
}
--fuwen:addRelatedSkill(fuwen_red)
fuwen:addRelatedSkill(fuwen_blue)
fuwen:addRelatedSkill(fuwen_green)
fuwen:addRelatedSkill(fuwen_green_maxcards)
wuyaowang:addSkill(fuwen)
Fk:loadTranslationTable{
["jbs_ailei"]="艾蕾",
["#jbs_ailei"]="最后的贤者",
["jbs__xianzhe"]="贤者",
[":jbs__xianzhe"]="游戏开始时,你可以从4名未加入游戏的群势力武将中选择并获得1个技能(限定技、觉醒技、主公技除外)。",
["jbs__zhongmo"]="终末",
[":jbs__zhongmo"]="准备阶段,你可以失去其他技能,然后从4名群势力武将中选择并获得x+1个技能(x为你以此法失去的技能数且至少为2,至多5)",
["#jbs__zhongmo-invoke"]="你可以失去其他技能,然后获得等额技能!",
["#jbs__xianzhe-invoke"]="贤者:你可以获得一个群势力武将的技能!",
["#jbs__duopo-invoke"]="贤者:你可以获得一个群势力武将的技能!",
["#jbs__duopo-s"]="夺魄:你可以获得一个魏势力武将的技能!",
["#ao_xianzhe-choice"]="你可以至多获得%arg个群势力武将的技能",
["jbs_wuyaowang"]="巫妖王",
["jbs_sairen"]="塞壬",
["jbs__haiyao"]="海妖",
[":jbs__haiyao"]="锁定技,当一名角色受到伤害后,你增加等同伤害值的体力上限。",
["jbs__duopo"]="夺魄",
[":jbs__duopo"]="出牌阶段限一次,你可以失去2x点体力上限,然后你从4名未加入游戏的魏势力武将牌中选择中选择并获得一个技能。(x为该技能发动过的次数,起始为1)",
["jbs__fuwen"]="符文",
["#jbsklfuwen-choice"]="装备一个符文",
[":jbs__fuwen"]="锁定技。游戏开始时,巫妖王为可以选择为自己装备三个三色符文:<br>"..
"<font color='red'>鲜血符文</font>:获得鲜血符文时增加自身一点体力和体力上限;<br>"..
"<font color='blue'>寒冰符文</font>:每拥有一个寒冰符文,你使用锦囊牌时摸1张牌;<br>"..
"<font color='green'>邪恶符文</font>:每拥有一个邪恶符文,你手牌上限+1且每回合前X次不因此技能获得牌时摸1张牌。(X为你的体力值)<br>符文选择完毕后,根据你的符文选择从对应势力武将中选择并获得1个技能。",
["#ao_fuwen-choice"]="从对应符文势力武将中选择并获得至多1个技能",
["@jbs_fuwen-red"]="鲜血",
["@jbs_fuwen-blue"]="寒冰",
["@jbs_fuwen-green"]="邪恶",
["#jbs__fuwen_blue"]="符文",
["#jbs__fuwen_red"]="符文",
["#jbs__fuwen_green"]="符文",
["jbs__fuwenred"]="鲜血符文",
["jbs__fuwenblue"]="寒冰符文",
["jbs__fuwengreen"]="邪恶符文",
[":jbs__fuwenred"]="获得鲜血符文时增加自身一点体力和体力上限",
[":jbs__fuwenblue"]="每拥有一个寒冰符文,你使用锦囊牌时摸1张牌",
[":jbs__fuwengreen"]="每拥有一个邪恶符文,你手牌上限+1且每回合前X次不因此技能获得牌时摸1张牌。",
["#jbs__fuwenred-invoke"]="发现并获得一个武将的技能,",
["#jbs__fuwenblue-invoke"]="发现并获得一个魏势力武将的技能,",
["#jbs__fuwengreen-invoke"]="发现并获得一个吴势力武将的技能,",
["#ao_duopo-choice"]="夺魄:选择一个技能获得",
}
local liujie=General:new(extension,"jbs_liujieshenwang","god",6,6)
local diandeng= fk.CreateTriggerSkill{
name = "jbs__diandeng",
anim_type = "special",
frequency = Skill.Compulsory,
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self.name)
and player.phase == Player.Finish
end,
on_use = function(self, event, target, player, data)
local room =player.room
local x=math.random(1, 6)
if player:getMark("@@jbs_hanhai")>0 and player:getMark("@@jbs_dizang")>0 and player:getMark("@@jbs_shikong")>0 and
player:getMark("@@jbs_hundun")>0 and player:getMark("@@jbs_huanjing")>0 and player:getMark("@@jbs_tianxuan")>0 then
x=7
end
if x==1 then
if player:getMark("@@jbs_dizang")>0 then
room:setPlayerMark(player, "@@jbs_dizang",0)
room:setPlayerMark(player, "@@jbs_hanhai",0)
room:setPlayerMark(player, "@@jbs_hundun",0)
room:setPlayerMark(player, "@@jbs_huanjing",0)
room:setPlayerMark(player, "@@jbs_tianxuan",0)
room:setPlayerMark(player, "@@jbs_shikong",0)
else
room:addPlayerMark(player, "@@jbs_dizang")
room:changeShield(player,2)
end
elseif x==2 then
if player:getMark("@@jbs_hanhai")>0 then
room:setPlayerMark(player, "@@jbs_dizang",0)
room:setPlayerMark(player, "@@jbs_hanhai",0)
room:setPlayerMark(player, "@@jbs_hundun",0)
room:setPlayerMark(player, "@@jbs_huanjing",0)
room:setPlayerMark(player, "@@jbs_tianxuan",0)
room:setPlayerMark(player, "@@jbs_shikong",0)
else
room:addPlayerMark(player, "@@jbs_hanhai")
room:recover{
who = player,
num = 2,
recoverBy = player,
skillName = self.name
}
end
elseif x==3 then
if player:getMark("@@jbs_hundun")>0 then
room:setPlayerMark(player, "@@jbs_dizang",0)
room:setPlayerMark(player, "@@jbs_hanhai",0)
room:setPlayerMark(player, "@@jbs_hundun",0)
room:setPlayerMark(player, "@@jbs_huanjing",0)
room:setPlayerMark(player, "@@jbs_tianxuan",0)
room:setPlayerMark(player, "@@jbs_shikong",0)
else
room:addPlayerMark(player, "@@jbs_hundun")
end
elseif x==4 then
if player:getMark("@@jbs_tianxuan")>0 then
room:setPlayerMark(player, "@@jbs_dizang",0)
room:setPlayerMark(player, "@@jbs_hanhai",0)
room:setPlayerMark(player, "@@jbs_hundun",0)
room:setPlayerMark(player, "@@jbs_huanjing",0)
room:setPlayerMark(player, "@@jbs_tianxuan",0)
room:setPlayerMark(player, "@@jbs_shikong",0)
else
room:addPlayerMark(player, "@@jbs_tianxuan")
end
elseif x==5 then
if player:getMark("@@jbs_huanjing")>0 then
room:setPlayerMark(player, "@@jbs_dizang",0)
room:setPlayerMark(player, "@@jbs_hanhai",0)
room:setPlayerMark(player, "@@jbs_hundun",0)
room:setPlayerMark(player, "@@jbs_huanjing",0)
room:setPlayerMark(player, "@@jbs_tianxuan",0)
room:setPlayerMark(player, "@@jbs_shikong",0)
else
room:addPlayerMark(player, "@@jbs_huanjing")
end
elseif x==6 then
if player:getMark("@@jbs_shikong")>0 then
room:setPlayerMark(player, "@@jbs_dizang",0)
room:setPlayerMark(player, "@@jbs_hanhai",0)
room:setPlayerMark(player, "@@jbs_hundun",0)
room:setPlayerMark(player, "@@jbs_huanjing",0)
room:setPlayerMark(player, "@@jbs_tianxuan",0)
room:setPlayerMark(player, "@@jbs_shikong",0)
else
room:addPlayerMark(player, "@@jbs_shikong")
local to = room:askForChoosePlayers(player, table.map(player.room.alive_players, function (p)
return p.id end), 1, 1, "#jbs_shikong-damage", self.name, false)
if #to > 0 then
room:doIndicate(player.id, {to[1]})
room:damage{
from = player,
to = room:getPlayerById(to[1]),
damage = 1,
damageType = fk.ThunderDamage,
skillName = self.name,
}
end
end
end
end,
}
local diandeng_trigger=fk.CreateTriggerSkill{
name = "#diandeng_trigger",
mute=true,
events = {fk.EventPhaseStart,fk.DamageInflicted,fk.DamageCaused},
frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
if event==fk.EventPhaseStart then
return target == player and player:hasSkill(self.name) and
player.phase == Player.Start and (player:getMark("@@jbs_dizang")>0 or player:getMark("@@jbs_hanhai")>0 or player:getMark("@@jbs_hundun")>0 or player:getMark("@@jbs_shikong")>0)
elseif event==fk.DamageCaused then
return target == player and player:hasSkill(self.name) and player:getMark("@@jbs_huanjing")>0
else
return target == player and player:hasSkill(self.name) and player:getMark("@@jbs_tianxuan")>0
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
if event==fk.EventPhaseStart then
if player:getMark("@@jbs_dizang")>0 then
room:changeShield(player,1)
end
if player:getMark("@@jbs_hanhai")>0 then
room:recover{
who = player,
num = 1,
recoverBy = player,
skillName = self.name
}
end
if player:getMark("@@jbs_hundun")>0 then
local targets = table.map(table.filter(room.alive_players, function(p) return not p:isAllNude() end), function(p) return p.id end)
local to = room:askForChoosePlayers(player, targets, 1, 1, "#jbs_hundun_choose2", self.name, false)
if #to > 0 then
local cards = room:askForCardsChosen(player,room:getPlayerById(to[1]), 1, 3, "hej", self.name)
if #cards > 0 then
room:throwCard(cards, self.name, room:getPlayerById(to[1]), player)
end
end
end
if player:getMark("@@jbs_shikong")>0 then
player:drawCards(2,self.name)
player:gainAnExtraPhase(Player.Play)
end
elseif event==fk.DamageCaused then
data.damage=data.damage+1
else
if data.damage>1 then
return true
end
end
end,
}
diandeng:addRelatedSkill(diandeng_trigger)
liujie:addSkill(diandeng)
Fk:loadTranslationTable{
["jbs_liujieshenwang"]="六界御神",
["jbs__diandeng"]="点灯",
[":jbs__diandeng"]="锁定技。①结束阶段,随机领悟一个六界秘法:<br>"..
"地葬秘法:领悟时获得2点护甲;准备阶段开始时,获得1点护甲;<br>"..
"瀚海秘法:领悟时回复2点体力;准备阶段开始时,获得回复1点体力;<br>"..
"混沌秘法:准备阶段开始时,弃置一名其他角色至多3张牌;<br>"..
"天玄秘法:受到伤害时,若伤害值大于1,你防止此伤害;<br>"..
"幻境秘法:造成的伤害+1;<br>"..
"时空秘法:领悟时对一名角色造成1点雷电伤害,准备阶段开始时,你摸2张牌,然后执行一个额外的出牌阶段。<br>"..
"②当你领悟了重复的秘法,清空已领悟的所有秘法;你领悟全部6个秘法后,结束阶段将不再领悟新的秘法。<br>",
["jbs__suodeng"]="锁灯",
[":jbs__suodeng"]="出牌阶段限一次,你可以失去1点体力上限,令【点灯】回合结束时领悟的秘法数+1。",
["@@jbs_dizang"]="地葬",
["@@jbs_hanhai"]="瀚海",
["@@jbs_hundun"]="混沌",
["@@jbs_tianxuan"]="天玄",
["@@jbs_huanjing"]="幻境",
["@@jbs_shikong"]="时空",
["#diandeng_trigger"]="点灯",
["#jbs_shikong-damage"]="对1名角色造成1点雷电伤害",
["#jbs_hundun_choose2"]="弃置一名角色至多3张牌",
}
--local menglong=General:new(extension,"jbs_menglong","shu",4)
local liutang=General:new(extension,"jbs_liutang","wu",6)
liutang:addSkill("roulin")
local xingnu=fk.CreateTriggerSkill{
name = "jbs__xingnu",
anim_type = "negative",
frequency = Skill.Compulsory,
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
if target == player and player:hasSkill(self.name) and player.phase == Player.Start then
return true
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
local choice = room:askForChoice(player, {"loseHp", "loseMaxHp"}, self.name)
if choice == "loseMaxHp" then
room:changeMaxHp(player, -1)
local to = room:askForChoosePlayers(player, table.map(room:getOtherPlayers(player), function (p)
return p.id end), 1, 1, "#xingnu-choose2", self.name, false)
if #to > 0 then
local victim =room:getPlayerById(to[1])
if victim.gender ~=General.Female then
victim.gender=General.Female
end
room:addPlayerMark(victim,"@jbs_xingnu",1)
room:addPlayerMark(victim, MarkEnum.MinusMaxCards, 1)
local n=0
for _, p in ipairs(room:getOtherPlayers(player)) do
if p:getMark("@jbs_xingnu")>0 then
n=n+1
end
end
if n>=2 then
room:handleAddLoseSkills(player, "jiuchi", nil, true, false)
room:handleAddLoseSkills(player, "jbs__yinsi", nil, true, false)
end
end
else
room:loseHp(player, 1, self.name)
local targets = {}
for _, p in ipairs(room:getOtherPlayers(player)) do
if p.gender == General.Female then
table.insertIfNeed(targets, p.id)
end
end
if #targets > 0 then
local to = room:askForChoosePlayers(player, targets, 1, 1, "#xingnu-choose1", self.name, false)
local slash = Fk:cloneCard "slash"
slash.skillName = self.name
room:useCard {
from = target.id,
tos = table.map(to,function(pid) return { pid } end),
card = slash,
extraUse = true,
}
end
end
end,
}
local xingnu_buff = fk.CreateTriggerSkill{
name = "#jbs__xingnu_buff",
anim_type = "drawcard",
frequency = Skill.Compulsory,
events = {fk.DrawNCards},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self.name)
end,
on_use = function(self, event, target, player, data)
local room=player.room
local n=0
for _, p in ipairs(room:getOtherPlayers(player)) do
if p:getMark("@jbs_xingnu")>0 then
n=n+1
end
end
if event==fk.DrawNCards then
if n>=1 then
data.n = data.n+n
end
end
end,
}
local yinsi = fk.CreateTriggerSkill{
name = "jbs__yinsi",
--mute = true,
events = {fk.EventPhaseStart},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self.name) and player.phase == Player.Start
end,
on_use = function(self, event, target, player, data)
local room = player.room
--[[
if player:isWounded() then
room:recover({
who = player,
num = 1,
recoverBy = player,
skillName = self.name
})
end
]]--
local targets = {}
for _, p in ipairs(room:getOtherPlayers(player)) do
if p.gender == General.Female and p:getMark(self.name) == 0 then
table.insertIfNeed(targets, p.id)
end
end
if #targets > 0 then
local to = room:askForChoosePlayers(player, targets, 1, 1, "#yinsi-choose1", self.name, false)
local victim =room:getPlayerById(to[1])
local skills = table.map(Fk.generals[victim.general].skills, function(s) return s.name end)
for i , skill in ipairs(skills) do
player.room:handleAddLoseSkills(player, skill, nil)
end
room:addPlayerMark(victim,self.name,1)
if victim:getMark("@jbs_xingnu")>0 then
if not victim:isKongcheng() then
local dummy = Fk:cloneCard("dilu")
dummy:addSubcards(victim.player_cards[Player.Hand])
room:obtainCard(player.id, dummy, false, fk.ReasonPrey)
end
end
end
end,
}
xingnu:addRelatedSkill(xingnu_buff)
liutang:addSkill(xingnu)
liutang:addRelatedSkill(yinsi)
Fk:loadTranslationTable{
["jbs_menglong"]="梦龙",
["jbs_liutang"]="刘唐",
["jbs__xingnu"]="星怒",
[":jbs__xingnu"]="锁定技,准备阶段,你选择1项:1.失去一点体力,然后视为对一名女性角色使用了一张无限制的【杀】;"..
"<br>2.失去一点体力上限,使一名其他角色获得1枚“星怒”标记。拥有“星怒”标记的角色性别变为女性且手牌上限-x(x为其“星怒”标记数)。<br>"..
"你根据场上“星怒”人数n获得以下效果:<br>n>=1,你摸牌阶段摸牌数+n;<br>n>=2,获得【酒池】和【上海】",
["jbs__yinsi"]="上海",
[":jbs__yinsi"]="准备阶段开始时,你可以选择一名女性角色,获得其武将牌上所有技能,若其为“星怒”,同时获得其所有手牌。每名角色限一次",
["#jbs__xingnu_buff"]="星怒",
["@jbs_xingnu"]="星怒",
["loseMaxHp"] = "减1点体力上限,使一名角色获得“星怒”标记",
["loseHp"] = "失去1点体力,视为对一名女性角色使用了一张【杀】",
["#xingnu-choose1"]="视为对一名女性角色使用了一张【杀】",
["#xingnu-choose2"]="使一名角色获得1枚“星怒”标记",
["#yinsi-choose1"]="选择一名女性角色,获得其所有技能",
}
local function jbs__leiji(room, player,target,strname,n)
local x=0
for i = 1, n, 1 do
local judge = {
who = target,
reason = strname,
pattern = ".|.|spade",
}
room:judge(judge)
if judge.card.suit == Card.Spade then
room:damage{
from = player,
to = target,
damage = 2,
damageType = fk.ThunderDamage,
skillName = strname,
}
x=x+1
end
end
if x==0 then
return true
end
end
local mingdixiuluo=General:new(extension,"jbs_mingdixiuluo","qun",4)
local diming= fk.CreateTriggerSkill{
name = "jbs__diming",
anim_type = "support",
events = {fk.RoundStart,fk.AfterDying},
frequency = Skill.Compulsory,
can_trigger = function(self, event, target, player, data)
if event==fk.AfterDying then
return not target.dead and player:hasSkill(self.name)
else
return player:hasSkill(self.name)
end
end,
on_use = function(self, event, target, player, data)
local room = player.room
if event==fk.RoundStart then
if not player:isWounded() then
player:gainAnExtraTurn()
else
room:addPlayerMark(player,"@jbs_diming",1)
end
else
room:addPlayerMark(player,"@jbs_diming",1)
end
end,
}
local diming_maxcards = fk.CreateMaxCardsSkill{
name = "#diming_maxcards",
correct_func = function(self, player)
if player:hasSkill(self.name) then
return player:getMark("@jbs_diming")
else
return 0
end
end,
}
local nailuo = fk.CreateTriggerSkill{
name = "jbs__nailuo",
anim_type = "offensive",
events = {fk.Deathed},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self.name) and
data.damage and data.damage.from and data.damage.from == player
end,
on_cost = function(self, event, target, player, data)
local room = player.room
local targets = table.map(room:getOtherPlayers(player), Util.IdMapper)
local tos = room:askForChoosePlayers(player, targets, 1, 1, '#jbs_xiuluo_nailuo:::'..math.max(1,player:getMark("@jbs_diming")), self.name)
if #tos > 0 then
self.cost_data = tos[1]
return true
end
end,
on_use = function(self, event, target, player, data)
local room=player.room
local x=math.max(1,player:getMark("@jbs_diming"))
local to = self.cost_data
local tgt = room:getPlayerById(to)
jbs__leiji(room,player,tgt,self.name,x)
end,
}
local juesha = fk.CreateTriggerSkill{
name = "jbs__juesha",
anim_type = "drawcard",
events = {fk.CardUsing, fk.CardResponding},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self.name) and data.card.type==Card.TypeBasic and player:usedSkillTimes(self.name, Player.HistoryTurn)==0
end,
on_use = function(self, event, target, player, data)
local room=player.room
local x=math.min(math.max(1,player:getMark("@jbs_diming")),5)
local to = room:askForChoosePlayers(player,
table.map(room:getOtherPlayers(player), Util.IdMapper), 1, 1,
'#jbs_xiuluo_nailuo:::'..1, self.name, false)[1]
local tgt = room:getPlayerById(to)
if jbs__leiji(room,player,tgt,self.name,1) then
player:drawCards(x)
end
end,
}
diming:addRelatedSkill(diming_maxcards)
mingdixiuluo:addSkill(diming)
mingdixiuluo:addSkill(juesha)
--mingdixiuluo:addSkill(nailuo)
Fk:loadTranslationTable{
["jbs_mingdixiuluo"]="冥帝修罗",
["jbs__diming"]="帝命",
[":jbs__diming"]="锁定技,每轮开始时,若你未受伤,你进行一个额外回合;若你已受伤,则获得1个“命”标记;当一名角色脱离濒死状态时,你获得1个“命”标记"..
"你的手牌上限+x(x为“命”标记数目)",
["jbs__juesha"]="绝煞",
[":jbs__juesha"]="每回合限一次,当你使用或打出一张基本牌时,你对一名其他角色进行1次雷击,若雷击失败,你摸x张牌(x为“命”的数目且至少为1,至多为5)",
["jbs__nailuo"]="奈落",
["jbs__anfa"]="暗罚",
[":jbs__anfa"]="",
[":jbs__nailuo"]="你杀死一名角色后,可以对一名其他角色进行x次雷击(x为“命”数目且至少为1);",
["#diming_maxcards"]="帝命",
["@jbs_diming"]="命",
['#jbs_xiuluo_nailuo']="选择一名角色对其进行%arg次雷击",
}
local ex_maolei=General:new(extension,"jbsv__ex_maolei","vtuber",4,4,General.Female)
local ex_ouxiang=fk.CreateViewAsSkill{
name = "jbs__ex_ouxiang",
prompt="#ouxiang_choose",
min_card_num = 1,
pattern = ".",
enabled_at_play = function(self, player)
return not player:isKongcheng()
end,
interaction = function()
local names = {}
for _, id in ipairs(Fk:getAllCardIds()) do
local card = Fk:getCardById(id)
if (card.type == Card.TypeBasic or card:isCommonTrick()) and not card.is_derived then
local to_use = Fk:cloneCard(card.name)
if ((Fk.currentResponsePattern == nil and card.skill:canUse(Self, to_use) and not Self:prohibitUse(to_use)) or
(Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(to_use))) then
table.insertIfNeed(names, card.name)
end
end
end
if #names == 0 then return false end
return UI.ComboBox { choices = names }
end,
card_filter = function(self, to_select, selected)
if #selected == 0 then
return true
elseif #selected == 1 then
return Fk:getCardById(to_select).suit ~= Fk:getCardById(selected[1]).suit
elseif #selected == 2 then
return Fk:getCardById(to_select).suit ~= Fk:getCardById(selected[1]).suit and
Fk:getCardById(to_select).suit ~= Fk:getCardById(selected[2]).suit
elseif #selected == 3 then
return Fk:getCardById(to_select).suit ~= Fk:getCardById(selected[1]).suit and
Fk:getCardById(to_select).suit ~= Fk:getCardById(selected[2]).suit and Fk:getCardById(to_select).suit ~= Fk:getCardById(selected[3]).suit
elseif #selected == 4 then
return false
end
end,
view_as = function(self, cards)
if #cards == 0 or #cards > 4 then
return nil
end
local card = Fk:cloneCard(self.interaction.data)
card:addSubcards(cards)
card.skillName = self.name
return card
end,
enabled_at_response = function(self, player, response)
return not player:isKongcheng()
end,
}
local ex_ouxiang_trigger = fk.CreateTriggerSkill{
name = "#ex_ouxiang_trigger",
events = {fk.CardUseFinished},
can_trigger = function(self, event, target, player, data)
return target == player and table.contains(data.card.skillNames, "jbs__ex_ouxiang")
end,
on_cost = function(self, event, target, player, data)
return true
end,
on_use = function(self, event, target, player, data)
local x=#data.card.subcards
local room = player.room
if not player.dead then
for i = 1, x, 1 do
if i == 1 then
room:damage{
from = nil,
to = player,
damage =4-x,
skillName = self.name,
}
elseif i == 2 then
player:drawCards(math.min(4-x,1))
elseif i == 3 then
room:recover{
who = player,
num = 1,
recoverBy = player,
skillName = self.name
}
elseif i == 4 and player:getMark("ouxiang4") == 0 then
local existingGenerals = {}
table.forEach(room.players, function(p)
table.insertTable(existingGenerals, {p.general, p.deputyGeneral})
end)
local generals = table.map(Fk:getGeneralsRandomly(4, Fk:getAllGenerals(), existingGenerals,
(function(p) return (p.gender ~= General.Female) end)), function(g) return g.name end)
local names = {}
while #names < 2 do
local general = Fk.generals[room:askForGeneral(player, generals, 1)]
local choices = {}
for _, s in ipairs(general:getSkillNameList()) do
local skill = Fk.skills[s]
if not player:hasSkill(skill, true, true) and skill.frequency ~= Skill.Limited and skill.frequency ~= Skill.Wake then
table.insertIfNeed(choices, skill.name)
end
end
if #choices > 0 then
local choice = room:askForChoice(player, choices, self.name, "#ty__fuhan-choice", true)
table.insert(names, choice)
end
end
room:handleAddLoseSkills(player, table.concat(names, "|"), nil, true, false)
room:setPlayerMark(player,"ouxiang4",1)
else
local skills = {}
local pskills = {}
for _, skill in ipairs(player.player_skills) do
if not string.find(skill.name, "#") then
table.insert(pskills, skill.name)
end
end
table.insert(pskills, "Cancel")
local choice = room:askForChoice(player, pskills, self.name, "#ouxiang-choice1")
if choice == "Cancel" then
break
else
room:handleAddLoseSkills(player, "-"..choice, nil, true, false)
end
for _, general in ipairs(Fk:getAllGenerals()) do
for _, skill in ipairs(general.skills) do
if not player:hasSkill(skill) then
table.insertIfNeed(skills, skill.name)
end
end
end
if #skills > 0 then
local skill = room:askForChoice(player, table.random(skills, math.min(3, #skills)), self.name, "#ouxiang-chooseskill::"..player.id, true)
room:handleAddLoseSkills(player, skill, nil, true, false)
end
end
end
end
end,
}
ex_ouxiang:addRelatedSkill(ex_ouxiang_trigger)
ex_maolei:addSkill(ex_ouxiang)
local qihainana7mi=General:new(extension,"jbsv__qihai","vtuber",4,4,General.Female)
local jiejin=fk.CreateTriggerSkill{
name = "jbs__jiejin",
frequency = Skill.Compulsory,
anim_type = "defensive",
events = {fk.DamageInflicted},
can_trigger = function(self, event, target, player, data)
return target == player and player:hasSkill(self.name)
end,
on_use = function(self, event, target, player, data)
local room = player.room
local judge = {
who =player,
reason = self.name,
pattern = ".",
}
room:judge(judge)
local suit=judge.card:getSuitString()
if table.contains({ "spade", "heart", "club", "diamond" }, suit) then
local m = player:getMark("jbs__jiejinRecord")
if m == 0 then
m = suit
elseif type(m) == "string" then
local suits = m:split("+")
if table.contains(suits, suit) then
table.removeOne(suits, suit)
m = table.concat(suits, "+")
room:setPlayerMark(player, self.name, 1)
else
table.insertIfNeed(suits, suit)
m = table.concat(suits, "+")
end
end
room:setPlayerMark(player, "jbs__jiejinRecord", m)
local card_suits_table = {
spade = "♠",
club = "♣",
heart = "♥",
diamond = "♦",
}
room:setPlayerMark(player, "@jbs__jiejinRecord", table.concat(
table.map(m:split("+"), function(s) return card_suits_table[s] end)
, ""))
if player:getMark(self.name)>0 then
room:setPlayerMark(player, self.name, 0)
return true
end
end
end,
}
local huixuan = fk.CreateTriggerSkill{
name = "jbs__huixuan",
anim_type = "drawcard",
events = {fk.CardUsing, fk.CardResponding},
can_trigger = function(self, event, target, player, data)
if not type(player:getMark("jbs__jiejinRecord"))=="table" then return end
return target == player and player:hasSkill(self.name) and type(player:getMark("jbs__jiejinRecord"))=="table" and
table.contains(player:getMark("jbs__jiejinRecord"):split("+"), data.card:getSuitString())
end,
on_use = function(self, event, target, player, data)
player:drawCards(1)
end,
}
qihainana7mi:addSkill(jiejin)
qihainana7mi:addSkill(huixuan)
Fk:loadTranslationTable{
["jbsv__ex_maolei"]="猫雷",
["jbs__ex_ouxiang"]="偶像",
["#ex_ouxiang_trigger"]="偶像",
[":jbs__ex_ouxiang"]="你可以将至多4张花色均不同的牌当任意基本牌或非延时锦囊牌使用或打出(至少一张)。若如此做,此牌成功结算后你依次执行x项:"..
"<br>1.受到4-x点伤害;"..
"<br>2.摸4-x张牌"..
"<br>3.回复1点体力"..
"<br>4.从4名未加入游戏的女性武将中选择2个技能获得(限定技,觉醒技,主公技除外)。执行此项后,移除该项"..
"<br>5.你可以重铸你的一个技能(从3个随机已开通技能中发现一个以替代原技能)"..
"<br>(x=你以此法使用的牌数)",
["#ouxiang-chooseskill"] = "偶像:选择令%dest获得的技能",
["#ouxiang-choice1"] = "偶像:选择一个技能将其重铸",
["jbsv__qihai"]="七海nana7mi",
["jbs__jiejin"]="结晶",
[":jbs__jiejin"]="锁定技,当你受到伤害时,你可以进行1次判定,若结果花色未被记录,则记录此花色,若已被记录,则防止此伤害并清除该花色的记录。",
["jbs__huixuan"]="回旋",
[":jbs__huixuan"]="当你使用或打出1张牌时,若该牌花色已被记录,你可以摸1张牌.",
["@jbs__jiejinRecord"]="结晶",
}
--local ziyin=General:new(extension,"jbsao__ziyin","shu",4,4,General.Female)
--local naiya=General:new(extension,"jbsao__naiya","wei",4,4,General.Female)
local wangchuanchuan=General:new(extension,"jbsao__wangchuanchuan","wei",4,4,General.Female)
local moren= fk.CreateTriggerSkill{
name = "jbs__moren",
frequency = Skill.Compulsory,
events = {fk.CardUsing, fk.CardResponding,fk.EventPhaseEnd},
can_trigger = function(self, event, target, player, data)
if event==fk.EventPhaseEnd then
return player.phase == Player.Finish and target == player and player:hasSkill(self.name)
else
return target == player and player:hasSkill(self.name) and player.phase ~= Player.NotActive
end
end,
on_use = function(self, event, target, player, data)
local room=player.room
if event==fk.EventPhaseEnd then
local n=player:getMark("@jbs__monengren")//3
room:removePlayerMark(player,"@jbs__monengren",n)
if n//2>0 then
player:drawCards(n//2)
end
else
room:addPlayerMark(player,"@jbs__monengren",1)
end
end,
}
wangchuanchuan:addSkill(moren)
Fk:loadTranslationTable{
["jbsao__ziyin"]="紫音",
["jbsao__naiya"]="奈亚",
["jbsao__yeying"]="夜樱",
["jbsao__wangchuanchuan"]="忘川川",
["jbs__juying"]="聚樱",
[":jbs__juying"]="锁定技,游戏开始时,你获得六张的“阴间”牌,然后你进行一次“聚樱”(你展示两张未展示的阴间牌组成双将)并摸2张牌。当你因休整而返回游戏后,你进行一次“聚樱”并摸2张牌。"..
" 你获得你亮出“阴间”牌的技能。",
["@&jbs_juying"]="阴间",
["jbs__hunzhou"]="魂咒",
[":jbs__hunzhou"]="锁定技,你死亡时,若你拥有技能“聚樱”且你仍有未出亮出的“阴间”牌,则改为休整一轮;回合结束时,你死亡。",
["jbs__moren"]="魔刃",
[":jbs__moren"]="锁定技,你的回合内,你每使用或打出1张牌,便获得1层【剑势】。结束阶段,你失去1/3的【剑势】",
["@jbs__monengren"]="剑势",
}
local nezha=General:new(extension,"jbsao__nezha","god",3)
local santou=fk.CreateTriggerSkill{
name = "jbs__santou",
anim_type = "defensive",
frequency = Skill.Compulsory,
events = {fk.DamageInflicted},
can_trigger = function(self, event, target, player, data)
if not player:hasSkill(self.name) then return false end
return target == player
end,
on_use = function(self, event, target, player, data)
local room=player.room
local n= player.hp%3
if n==0 then
room:addPlayerMark(data.from,"jbssantou1-turn",1)
elseif n==1 and data.card and data.card.color and data.card.color == Card.Red then
room:setPlayerMark(player,"jbssantou2-turn",1)
room:addPlayerMark(data.from,"jbssantou1-turn",1)
elseif n==2 and data.damageType~=1 then
room:setPlayerMark(player,"jbssantou3-turn",1)
room:addPlayerMark(data.from,"jbssantou1-turn",1)
end
if (n==0 and data.from:getMark("jbssantou1-turn")>1 ) or(n==1 and player:getMark("jbssantou2-turn")>0 ) or (n==2 and player:getMark("jbssantou3-turn")>0 )
then
room:loseHp(player,1)
end
return true
end,
}
local liubi= fk.CreateViewAsSkill{
name = "jbs__liubi",
pattern = ".",
interaction = function()
local names = {}
for _, id in ipairs(Fk:getAllCardIds()) do
local card = Fk:getCardById(id)
if (card.type == Card.TypeBasic or card:isCommonTrick()) and not card.is_derived then
local to_use = Fk:cloneCard(card.name)
if ((Fk.currentResponsePattern == nil and card.skill:canUse(Self, to_use) and not Self:prohibitUse(to_use)) or
(Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(to_use))) then
table.insertIfNeed(names, card.name)
end
end
end
if #names == 0 then return false end
return UI.ComboBox { choices = names }
end,
card_filter = Util.FalseFunc,
view_as = function(self, cards)
if not self.interaction.data then return end
local card = Fk:cloneCard(self.interaction.data)
card.skillName = self.name
return card
end,
before_use = function(self, player, use)
local room = player.room
local choices = {}
for i = 1, 5 do
if #player:getAvailableEquipSlots(i+2) > 0 then -- 五个装备区编号是3到7 详见 Card.SubtypeWeapon
table.insert(choices, "abortEquipArea"..i)
end
end
if not table.contains(player.sealedSlots, Player.JudgeSlot) then
table.insert(choices, "abortJudgingArea")
end
if #choices == 0 then return false end
local choice = room:askForChoice(player, choices, "jbs__liubiask", "#jbs__liubi-ask")
if choice == "abortJudgingArea" then
room:abortPlayerArea(player, {Player.JudgeSlot})
else
local i = tonumber(string.match(choice, "%d"))
local slots = {Player.WeaponSlot, Player.ArmorSlot, Player.DefensiveRideSlot, Player.OffensiveRideSlot, Player.TreasureSlot}
local slot = slots[i]
room:abortPlayerArea(player, {slot})
end
end,
enabled_at_play = function(self, player)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and
(#player:getAvailableEquipSlots() > 0 or not table.contains(player.sealedSlots, Player.JudgeSlot))
end,
enabled_at_response = function(self, player, response)
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and
(#player:getAvailableEquipSlots() > 0 or not table.contains(player.sealedSlots, Player.JudgeSlot))
end,
}
nezha:addSkill(santou)
nezha:addSkill(liubi)
Fk:loadTranslationTable{
["jbsao__nezha"]="哪吒",
["jbs__santou"]="三头",
[":jbs__santou"]="锁定技,防止你受到的所有伤害。<br>"..
"若你本回合已防止过该伤害来源的伤害且你体力值模3同余3,你失去1体力;<br>"..
"若防止的伤害为属性伤害且你体力值模3同余2,你失去1体力;<br>"..
"若防止的伤害为红色牌造成的伤害且你体力值为模3同余1,你失去1体力。",
["#jbs__santou_trigger"]="三头",
["jbs__liubi"]="六臂",
[":jbs__liubi"]="每回合限一次,你可以废除你的判定区或装备区里的一个装备栏,视为使用一张任意基本牌或普通锦囊牌。",
["jbs__liubiask"]="六臂:废除一个区域",
["jbs__liubi-ask"]="六臂:废除一个区域",
["$jbs__santou1"] = "任尔计策奇略,我自随机应对。",
["$jbs__santou2"] = "三相显圣,何惧雷劫地火。",
["$jbs__liubi1"] = "手执火尖枪,红绫混天、乾坤难困我。",
["$jbs__liubi2"] = "脚踏风火轮,金印番天、剑辟阴阳。",
["rh_firstchoice"]="第一次选择,选择想要发动的时机(融合技能时机与所选技能时机相同)",
["rh_secondchoice"]="第二次选择,选择想要发动的效果(融合技能效果与所选技能效果相同)",
}
local zp=T.creategenandtanslatene({extension,"jbsao__ex__gulong","qun",4,4},{"顾龙","声色犬马"})
local dizhu=T.creategenandtanslatene({extension,"jbsao__dizhu","qun",4,4},{"老地主","模式专属"})
dizhu.total_hidden=true
dizhu:addSkill("m_bahu")
dizhu:addSkill("m_feiyang")
--效果池
local effectpool={
usesharelatetarget={"huanfu","lingren","gongjian","zhuilie","wanyi","canmou","zhuosheng","xiaoshi","hulie","ol__dulie","tushe","kuansai","qizhi","huoshou","jianzhengq","zhuandui","ol_ex__liegong","wushuang","tieji","roulin","zuoding"},
datato={"duorui","ex__tieji","liegong","liyu","qiaomeng"},
phasedraw={"ex__luoyi","jiangchi","xiaoren","ty__luochong"},
drawn={"nos__juejing","yongsi","luoyi","yingzi","ex__yingzi","zishou","haoshi"},
phasedis={"guzheng","guizao","ol_ex__jushou","jushou","chenyong","xiaoren","ty__luochong","panqin"},
phasejudge={"zhenglun","xiaoren","xiaoren"},
anydying={"nos__jiefan","sanku"},
phaseuse={"qingjiao","jiqiaos","ty__luochong","longsong","panqin","liantao"},
turnrelate={"liantao","yongzu","lanjiang","haoyi","xianmou","miyi","sijun","zhengqing","ol_ex__jushou","jushou","chenyong","yuyan","xiaoren","ty__luochong"},
anyphase={"fensi","yangkuang","xiongshu","zhuijix","zhaoran","caiyuan","ol__huishi","qingleng","jinming","bolan","zhuri","hongtu","shelie","kongsheng","zuilun","zhengu","ol_ex__shensu","shensu","zaiqi","ol_ex__shensu","tuxi","keji","fangquan","ol_ex__fangquan","ex__luoyi","qiaobian"},
datacard={"zhefu","yizhao","ciwei","zhongyong","wangliec","tiandu","jianxiong","juxiang","ol_ex__yaowu","longyin"},
datafrom={"huqi","jianhui","ol__xibing","enyuan","nos__enyuan","qiaoyan","ex__fankui","fankui","ex__ganglie","ganglie","wangxi","ol__xibing"},
datafromid={"cihuang","zhenlie"},
datatocard={},
datafromidcard={"xiaoshi","ol__dulie","xiangle","congjian","shouxi","zhuandui","maihuo","shiyuan"},
datatofrom={"beige","ol_ex__beige","naxiang","qiaoyan"},
anydamage={"chuanwu","shanzhuan","zhidao","chengxiang","nos__chengxiang","qianlong","ty__baobian","lvli","yiwu","sanshou","qiwu","kuangbao","junlue","tianxiang","lianhuo","huisheng","ol_ex__tianxiang","tianxiang","ol_ex__weimu","yuce","jiaojin","qingxi"},
}
--触发时机池
local triggerpool={
--弃牌阶段
phasedis={"guzheng","cangzhuo","kuizhu"},
phasedraw={"ol__huishi","shelie","zaiqi","tongbo","caishi","tuxi","ex__luoyi","xunxun","n_jizhan"},
--摸牌阶段
phasejudge={"yonglue","haoshi","ex__tuxi"},
--判定阶段
anydying={"nos__jiefan","buyi","juejing"},
--濒死
drawn={"nos__juejing","luoyi","yingzi","ex__yingzi","yongsi"},
--摸牌阶段修改摸牌数时
phaseuse = {"xiongshu","zhuijix","zhaoran","bolan","qiangzhi","xiantu","cuike","longnu","yili","chezheng","jigong","fangquan","ol_ex__fangquan"},
--出牌阶段开始
otphase = {"qimei","caiyuan","qingleng","hongtu","kunfen","zhuri","kongsheng","zuilun","zhengu","ol_ex__shensu","shensu","jinqu","benghuai","ol_ex__zaiqi","y13__jushou","huimin","fuzhu","daiyan","fumian","qinqing","xingxue","qiaoshi","qieting","bingyi","zhiyan","juece","qianxi","ol_ex__jushou","biyue","ex__biyue","ol_ex__piaoling","ex__luoshen","zhuhai","wangzun","jujian"},
--其他阶段,包括回合开始结束啥的
turnrelate={"jinming","ol_ex__botu","ol_ex__huashen","goude","qimei","caiyuan","qingleng","hongtu","kunfen","kongsheng","zuilun","zhengu","jinqu","benghuai","ol_ex__zaiqi","y13__jushou","biyue","ex__biyue","ol_ex__piaoling","ex__luoshen","zhuhai","wangzun","jujian","fuzhu","daiyan","fumian","qinqing","xingxue","qiaoshi","xingxue","qiaoshi","qieting","bingyi","zhiyan","juece","qianxi"},
--其他阶段,包括回合开始结束啥的(和上面重了)
usesharelatetarget={"yifa","hulie","tushe","kuansai","qizhi","huoshou","lianzheng","zuoding","ol_ex__liegong","liegong","ex__tieji","tieji","roulin"},
--使用fk.TargetSpecified时机的
datato = {},
datatocard={"n_jizhan","qingxi","nos__qianxi","beige","ol_ex__beige","lieren","yizhong","pojun","shiyong","ol_ex__yaowu","yaowu","kuangfu","qiaomeng","liyu","jianxiong"},
--使用有data.to和data.card的
datafrom = {"hanzhan"},
--有datafrom的
datatofrom={"yimie","naxiang","ol__xibing","qiaoyan","qiwu","wuhun","ex__fankui","fankui","ex__ganglie","ganglie",},
--有data.from和data.to的
bothdamage = {"junlue","kuangbao","naxiang","jianhui"},
--造成和受到伤害都包含的
damaged={"qiaoyan","ol_ex__ninge","wuhun","zhengrong","tianxiang","lianhuo","huisheng","anjian","nos__qianxi","beige","ol_ex__beige","lieren","ol_ex__tianxiang","ex__jianxiong","ex__fankui","fankui","ex__ganglie","ganglie","jianxiong","yiji","ex__yiji","zhiyu","wangxi","ol_ex__tianxiang","jianxiong","zhichi","quanji","yuce","shiyong","ol_ex__yaowu","yaowu"},
--受到伤害的
damage = {"yimie","duoshou","duorui","qingxi","ol_ex__kuanggu","kuanggu","ol_ex__weimu","ol_ex__xinsheng","xinsheng","pojun","kuangfu","qiaomeng","liyu"},
--造成伤害的
datacard={"shenpin","ex__paoxiao","guidao","guicai","ol_ex__guidao","funan","nos__zhenlie","wuyan","tiandu","ol_ex__leiji"},
--有data.card的
usetos={"cihuang","zhenlie","liuli","qiuyuan","shouxi","jianxiang","congjianx","ol__dulie","fuyin","jiaojin","congjian","xiangle","jiang","mengjin","nos__wuyan","canmou","ciwei","quanbian","xiaoshi","benxi","zhongyong","wangliec","wushuang","zhuandui","pizhuan","juzhan","wumou","shicai","jianying","zenhui","nos__mieji","ex__jizhi","jizhi","ex__qianxun","longyin"},
--有use.tos的一般都是usestruct相关时机的技能
}
local containsElement=function (mainTable, subTable)
for _, subValue in ipairs(subTable) do
return table.contains(mainTable, subValue)
end
return false
end
local function getonuseeffect(room,player,skill)
--这个函数用来给来自某个triggerpool的技能配对对应的效果池
local toreturn ={}
local sskill=Fk.skills[skill]--技能对象
local aboutphase={fk.EventPhaseStart}--关于阶段的技能
local aboutusecard={fk.TargetSpecified,fk.DamageCaused}--关于伤害的技能
local damabout={fk.Damage,fk.Damaged,fk.DamageCaused,fk.DamageInflicted}--关于伤害的技能
--任何技能都可以配对effectpool.any的技能
if containsElement(sskill.events,aboutphase) then
toreturn = table.connect(toreturn,effectpool.anyphase)
toreturn = table.connect(toreturn,effectpool.phasedis)
toreturn = table.connect(toreturn,effectpool.phasedraw)
end
if containsElement(sskill.events,aboutusecard) then
toreturn = table.connect(toreturn,effectpool.datatocard)
end
if containsElement(sskill.events,damabout) then
toreturn = table.connect(toreturn,effectpool.damaged)
toreturn = table.connect(toreturn,effectpool.damage)
toreturn = table.connect(toreturn,effectpool.bothdamage)
end
if table.contains(triggerpool.drawn,skill) then
toreturn = table.connect(toreturn,effectpool.drawn)
end
if table.contains(triggerpool.phaseuse,skill) then
toreturn = table.connect(toreturn,effectpool.anyphase)
toreturn = table.connect(toreturn,effectpool.phaseuse)
end
if table.contains(triggerpool.phaseuse,skill) then
toreturn = table.connect(toreturn,effectpool.anyphase)
toreturn = table.connect(toreturn,effectpool.phaseuse)
end
if table.contains(triggerpool.otphase,skill) then
toreturn = table.connect(toreturn,effectpool.anyphase)
end
if table.contains(triggerpool.turnrelate,skill) then
toreturn = table.connect(toreturn,effectpool.turnrelate)
end
if table.contains(triggerpool.usesharelatetarget,skill) then
toreturn = table.connect(toreturn,effectpool.usesharelatetarget)
toreturn = table.connect(toreturn,effectpool.datacard)
toreturn = table.connect(toreturn,effectpool.usetos)
end
if table.contains(triggerpool.damage,skill) or table.contains(triggerpool.damaged,skill) or table.contains(triggerpool.bothdamage,skill) then
toreturn = table.connect(toreturn,effectpool.anydamage)
toreturn = table.connect(toreturn,effectpool.datato)
end
if table.contains(triggerpool.datato,skill) or table.contains(triggerpool.datatofrom,skill) or table.contains(triggerpool.bothdamage,skill) then
toreturn = table.connect(toreturn,effectpool.datato)
end
if table.contains(triggerpool.datatocard,skill) then
toreturn = table.connect(toreturn,effectpool.datatocard)
toreturn = table.connect(toreturn,effectpool.datacard)
end
if table.contains(triggerpool.datafrom,skill) or table.contains(triggerpool.datatofrom,skill) or table.contains(triggerpool.damage,skill) then
toreturn = table.connect(toreturn,effectpool.datafrom)
end
if table.contains(triggerpool.datacard,skill) then
toreturn = table.connect(toreturn,effectpool.datacard)
end
if table.contains(triggerpool.anydying,skill) then
toreturn = table.connect(toreturn,effectpool.anydying)
end
if table.contains(triggerpool.datatofrom,skill) then
toreturn = table.connect(toreturn,effectpool.datatofrom)
toreturn = table.connect(toreturn,effectpool.usesharelatetarget)
end
if table.contains(triggerpool.usetos) then
toreturn = table.connect(toreturn,effectpool.datafromid)
toreturn = table.connect(toreturn,effectpool.usetos)
toreturn = table.connect(toreturn,effectpool.datacard)
end
return toreturn
end
local jbs__qishe = fk.CreateTriggerSkill{
name = "jbs__qishe",
frequency = Skill.Compulsory,
events = {fk.GameStart},
can_trigger = function(self, event, target, player, data)
return player:hasSkill(self)
end,
on_use = function(self, event, target, player, data)
local room = player.room
--room:abortPlayerArea(player, { Player.ArmorSlot,Player.WeaponSlot})
--room:addPlayerEquipSlots(player, { Player.OffensiveRideSlot,Player.DefensiveRideSlot, })
local mark={}--记录一下融合素材
local x=1
--时机池
local firstpool={"ex__fankui","yingzi","guanxing","wushuang","guicai","liuli","js__yingshi","jbstg__zhaoyan","biyue","jizhi","duanchang"
,"ty__luochong","joy__tazhen","tycl__jianxiong","zhengnan","hs__buqu","ty__zhennan","tiandu","lvli",
"qiaoyan","ol_ex__ninge","wuhun","zhengrong","tianxiang","lianhuo","huisheng","nos__qianxi","beige","ol_ex__beige","lieren","ol_ex__tianxiang","ex__jianxiong","ex__fankui","fankui","ex__ganglie","ganglie","jianxiong","yiji",
"ex__yiji","zhiyu","wangxi","ol_ex__tianxiang","jianxiong","zhichi","quanji","yuce","shiyong","ol_ex__yaowu","yaowu","cihuang","zhenlie","liuli","qiuyuan","shouxi","jianxiang","congjianx","fuyin","jiaojin","congjian","xiangle","jiang","mengjin","nos__wuyan","canmou","ciwei","quanbian","xiaoshi","benxi","zhongyong","wangliec","wushuang",
"zhuandui","pizhuan","juzhan","wumou","shicai","jianying","zenhui","nos__mieji","ex__jizhi","jizhi","ex__qianxun","longyin",
"qimei","caiyuan","qingleng","hongtu","kunfen","zhuri","kongsheng","zuilun","zhengu","ol_ex__shensu","shensu","jinqu","benghuai","ol_ex__zaiqi","y13__jushou","huimin","fuzhu","daiyan","fumian","qinqing","xingxue","qiaoshi","qieting","bingyi",
"zhiyan","juece","qianxi","ol_ex__jushou","biyue","ex__biyue","ol_ex__piaoling","ex__luoshen","zhuhai","wangzun","jujian"}
for loop = 1, 30, 1 do
local skill=Fk.skills["jbs__ronghe"..loop]
if table.contains(skill,"fk.jbsrh") then
x=loop
break
end
end
local firstname=T.skillpoolget(player,room,firstpool,5,1,"rh_firstchoice")
local skill=Fk.skills["jbs__ronghe"..x]
local firstskill=Fk.skills[firstname]
--local tevn=firstskill.events
local effecttos = getonuseeffect(room,player,firstname)
skill.events= firstskill.events
skill.trigger=firstskill.trigger
skill.triggerable= firstskill.triggerable
skill.priority=1
for _, event in ipairs(skill.events) do
skill.priority_table[event] = skill.priority
end
--]]
--效果池
local secondpool={"guanxing","leiji","jushou","kuanggu","jieming","fangzhu","zaiqi","juejing","n_lingxiu","n_yunyou"
,"n_dianlun","ol_ex__miji","zhengnan","guanxing","js__pianchong","jbs__xianzhe","jbstg__zhaoyan","jizhi","ty__luochong","joy__tazhen",
"tycl__jianxiong","chushan","ty_ex__chengxiang","ty__zhennan","cansi","juanxia","guixin","guyin","chouce","lvli","ty__baobian"
,"mingjie","fanyin","peiqi","ty__tunjiang", "poyuan", "xialei","qianlong", "fensi","nuanhui"
,"dingcuo","xianwei","qizhou","baobian","yifa","qimei","quanbian","yipo","douchan","duoshou","kunfen","goude","benxi","qiangzhi","xiantu","pizhuan","meihun","zhiti","cuike","longnu","silun","ol_ex__ninge","juejing","guixin","wumou","chezheng","jinqu","y13__jiewei","jianxiang","huimin","daiyan","fumian","qingxian","juexiang","caishi","qinqing","guizao","chanxin","jigong","xingxue","qiaoshi","huituo","pingkou","youdi","faen","nos__faen","bingyi","zhiyan","juece","miji","leiji","ex__leiji","ol_ex__jieming","ol_ex__kuanggu","kuanggu","biyue","ex__biyue","guanxing","ex__guanxing","ol_ex__fenji","ol_ex__piaoling","yiji","jiang","yinghun","xiaoji","ex__jianxiong","zhiyu","yiji","ex__yiji","ex__luoshen","xunxun","zhaxiang","ex__qianxun","lianying","wangzun","luoshen","cangzhuo","ol_ex__shebian","jieming","tuntian",
"ol_ex__tuntian","ex__qingjian","jiyuan","jujian","xuanfeng","buyi","nos__miji","qianxi","jingce","xiaoren"}
if #effecttos>0 then
secondpool=table.connect(secondpool,effecttos)
end
--for
--if table.contains(tevn)
local secondname=T.skillpoolget(player,room,secondpool,5,1,"rh_secondchoice")
local secondskill=Fk.skills[secondname]
--skill.triggerable=toskill.triggerable
--[
skill.cost=secondskill.cost
skill.use=secondskill.use
skill.refresh_events=secondskill.refresh_events
skill.canRefresh=secondskill.canRefresh
skill.refresh=secondskill.refresh
--]]
table.insert(mark,firstname)
table.insert(mark,secondname)
--room:setTag("jbs__ronghe_names",mark)
room:setPlayerMark(player,"@[jbsjw_sanjue]honghe",mark)
room:handleAddLoseSkills(player,"jbs__ronghe"..x)
end,
}
T.translate("@[jbsjw_sanjue]honghe","融合素材")
T.translate("jbs__ronghe_names","融合素材")
local function rhgenerateArray()
local arr = {}
for i = 1, 100 do
arr[i] = i
end
return arr
end
local rhArray = rhgenerateArray()
for loop = 1, 30, 1 do
local jbs__ronghe = fk.CreateTriggerSkill{
name = "jbs__ronghe"..loop,
events = {"fk.jbsrh"},
on_trigger=function(self, event, target, player, data)
local s=player.room:getTag("jbs__ronghe_names")
local g=Fk.skills[s[1]]
return g and table.contains(g.events,event) and g.trigger(self, event, target, player, data)
and table.contains(g.events,event)
end,
can_trigger = function(self, event, target, player, data)
local s=player.room:getTag("jbs__ronghe_names")
local g=Fk.skills[s[1]]
return g and table.contains(g.events,event) and g.triggerable(self, event, target, player, data)
end,
on_cost = function(self, event, target, player, data)
local s=player.room:getTag("jbs__ronghe_names")
local g=Fk.skills[s[2]]
return g and g.cost(self, event, target, player, data)
end,
on_use = function(self, event, target, player, data)
local s=player.room:getTag("jbs__ronghe_names")
local g=Fk.skills[s[2]]
return g and g.use(self, event, target, player, data)
end,
refresh_events = rhArray,
can_refresh = function(self, event, target, player, data)
local s=player.room:getTag("jbs__ronghe_names")
local g=Fk.skills[s[2]]
return g and table.contains(g.refresh_events ,event) and g.canRefresh(self, event, target, player, data)
end,
on_refresh = function(self, event, target, player, data)
local s=player.room:getTag("jbs__ronghe_names")
local g=Fk.skills[s[2]]
return g and table.contains(g.refresh_events ,event) and g.refresh(self, event, target, player, data) and table.contains(g.refresh_events ,event)
end
}
Fk:addSkill(jbs__ronghe)
T.skilltranslate("jbs__ronghe"..loop,{"融合",[[该技能为自定义技能。效果由融合素材决定!(具体描述点击“融合素材”标记查看)]]})
end
zp:addSkill(jbs__qishe)
zp:addRelatedSkill("jbs__ronghe1")
T.skilltranslate("jbs__qishe",{"聚变",[[锁定技。游戏开始时,你可以创建一个自定义的触发技能。]]})
T.skilltranslate("jbs__ronghe",{"融合",[[该技能为自定义技能。效果由融合素材决定!(具体描述点击“融合素材”标记查看)]]})
local mading=T.creategenandtanslatene({extension,"jbs__mading","qun",4,4},{"丁真","好好学习,天天向上"})
T.skilltranslate("jbs__baibian",{"求知",[[你可以读书。..<a href='read_log'>开始阅读</a>]]})
local baibian = fk.CreateTriggerSkill{
name = "jbs__baibian",
}
local log="请选择:<br>".."<a href='read_1_1'>大小姐的保镖</a>".."<br><br>"..
"<a href='read_2_1'>86_不存在的战场02</a>".."<br><br>"..
"<a href='read_3_1'>为美好的世界献上祝福!01</a>".."<br><br>"
for j ,book in ipairs(books) do
local toget= T.spiltstring(book,5000)
for i,v in ipairs(toget) do
local s="<a href='read_"..j.."_" .. i + 1 .. "'>下一页</a>".."<br>"..v.."<br>".."<a href='read_"..j.."_" .. i + 1 .. "'>下一页</a>"
Fk:loadTranslationTable{
["read_"..j.."_"..i] = s,
}
end
end
mading.hidden=true
mading:addSkill(baibian)
Fk:loadTranslationTable{
["read_log"]=log,
}
return extension
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。