standard fix (#221)
This commit is contained in:
parent
2ab9ad017a
commit
fdf2ccc75b
|
@ -310,10 +310,10 @@ local fanSkill = fk.CreateTriggerSkill{
|
||||||
return target == player and player:hasSkill(self.name) and data.card.name == "slash"
|
return target == player and player:hasSkill(self.name) and data.card.name == "slash"
|
||||||
end,
|
end,
|
||||||
on_use = function(_, _, _, _, data)
|
on_use = function(_, _, _, _, data)
|
||||||
local fireSlash = Fk:cloneCard("fire__slash")
|
local card = Fk:cloneCard("fire__slash")
|
||||||
fireSlash.skillName = "fan"
|
card.skillName = "fan"
|
||||||
fireSlash:addSubcard(data.card)
|
card:addSubcard(data.card)
|
||||||
data.card = fireSlash
|
data.card = card
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
Fk:addSkill(fanSkill)
|
Fk:addSkill(fanSkill)
|
||||||
|
|
|
@ -11,16 +11,14 @@ local jianxiong = fk.CreateTriggerSkill{
|
||||||
events = {fk.Damaged},
|
events = {fk.Damaged},
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
local room = target.room
|
local room = target.room
|
||||||
return data.card ~= nil and
|
return target == player and player:hasSkill(self.name) and data.card and
|
||||||
target == player and
|
|
||||||
target:hasSkill(self.name) and not target.dead and
|
|
||||||
table.find(data.card:isVirtual() and data.card.subcards or {data.card.id}, function(id) return room:getCardArea(id) == Card.Processing end)
|
table.find(data.card:isVirtual() and data.card.subcards or {data.card.id}, function(id) return room:getCardArea(id) == Card.Processing end)
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local dummy = Fk:cloneCard("jueying")
|
local dummy = Fk:cloneCard("jueying")
|
||||||
dummy:addSubcards(table.filter(data.card:isVirtual() and data.card.subcards or {data.card.id}, function(id) return room:getCardArea(id) == Card.Processing end))
|
dummy:addSubcards(table.filter(data.card:isVirtual() and data.card.subcards or {data.card.id}, function(id) return room:getCardArea(id) == Card.Processing end))
|
||||||
room:obtainCard(player.id, dummy, false)
|
room:obtainCard(player.id, dummy, false, fk.ReasonJustMove)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,21 +121,24 @@ local fankui = fk.CreateTriggerSkill{
|
||||||
name = "fankui",
|
name = "fankui",
|
||||||
anim_type = "masochism",
|
anim_type = "masochism",
|
||||||
events = {fk.Damaged},
|
events = {fk.Damaged},
|
||||||
frequency = Skill.NotFrequent,
|
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
local room = target.room
|
if target == player and player:hasSkill(self.name) and data.from and not data.from.dead then
|
||||||
local from = data.from
|
if data.from == player then
|
||||||
return from ~= nil and
|
return #player.player_cards[Player.Equip] > 0
|
||||||
target == player and
|
else
|
||||||
target:hasSkill(self.name) and
|
return not data.from:isNude()
|
||||||
(not from:isNude()) and
|
end
|
||||||
not target.dead
|
end
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local from = data.from
|
local from = data.from
|
||||||
local card = room:askForCardChosen(player, from, "he", self.name)
|
local flag = "he"
|
||||||
room:obtainCard(player.id, card, false)
|
if from == player then
|
||||||
|
flag = "e"
|
||||||
|
end
|
||||||
|
local card = room:askForCardChosen(player, from, flag, self.name)
|
||||||
|
room:obtainCard(player.id, card, false, fk.ReasonPrey)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local simayi = General:new(extension, "simayi", "wei", 3)
|
local simayi = General:new(extension, "simayi", "wei", 3)
|
||||||
|
@ -149,21 +150,19 @@ local ganglie = fk.CreateTriggerSkill{
|
||||||
anim_type = "masochism",
|
anim_type = "masochism",
|
||||||
events = {fk.Damaged},
|
events = {fk.Damaged},
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
return target == player and
|
return target == player and player:hasSkill(self.name)
|
||||||
target:hasSkill(self.name) and
|
|
||||||
not target.dead
|
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local from = data.from
|
local from = data.from
|
||||||
if from then room:doIndicate(player.id, {from.id}) end
|
if from and not from.dead then room:doIndicate(player.id, {from.id}) end
|
||||||
local judge = {
|
local judge = {
|
||||||
who = player,
|
who = player,
|
||||||
reason = self.name,
|
reason = self.name,
|
||||||
pattern = ".|.|^heart",
|
pattern = ".|.|^heart",
|
||||||
}
|
}
|
||||||
room:judge(judge)
|
room:judge(judge)
|
||||||
if judge.card.suit ~= Card.Heart and from then
|
if judge.card.suit ~= Card.Heart and from and not from.dead then
|
||||||
local discards = room:askForDiscard(from, 2, 2, false, self.name, true)
|
local discards = room:askForDiscard(from, 2, 2, false, self.name, true)
|
||||||
if #discards == 0 then
|
if #discards == 0 then
|
||||||
room:damage{
|
room:damage{
|
||||||
|
@ -184,25 +183,13 @@ local tuxi = fk.CreateTriggerSkill{
|
||||||
anim_type = "control",
|
anim_type = "control",
|
||||||
events = {fk.EventPhaseStart},
|
events = {fk.EventPhaseStart},
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
local ret = (target == player and player:hasSkill(self.name) and player.phase == Player.Draw)
|
return target == player and player:hasSkill(self.name) and player.phase == Player.Draw and
|
||||||
if ret then
|
table.find(player.room:getOtherPlayers(player), function(p) return not p:isKongcheng() end)
|
||||||
local room = player.room
|
|
||||||
for _, p in ipairs(room:getOtherPlayers(player)) do
|
|
||||||
if not p:isKongcheng() then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
on_cost = function(self, event, target, player, data)
|
on_cost = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local other = room:getOtherPlayers(player)
|
local targets = table.map(table.filter(room:getOtherPlayers(player), function(p)
|
||||||
local targets = {}
|
return not p:isKongcheng() end), function (p) return p.id end)
|
||||||
for _, p in ipairs(other) do
|
|
||||||
if not p:isKongcheng() then
|
|
||||||
table.insert(targets, p.id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local result = room:askForChoosePlayers(player, targets, 1, 2, "#tuxi-ask", self.name)
|
local result = room:askForChoosePlayers(player, targets, 1, 2, "#tuxi-ask", self.name)
|
||||||
if #result > 0 then
|
if #result > 0 then
|
||||||
|
@ -213,9 +200,12 @@ local tuxi = fk.CreateTriggerSkill{
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
for _, id in ipairs(self.cost_data) do
|
for _, id in ipairs(self.cost_data) do
|
||||||
|
if player.dead then return end
|
||||||
local p = room:getPlayerById(id)
|
local p = room:getPlayerById(id)
|
||||||
local c = room:askForCardChosen(player, p, "h", self.name)
|
if not p.dead then
|
||||||
room:obtainCard(player.id, c, false)
|
local c = room:askForCardChosen(player, p, "h", self.name)
|
||||||
|
room:obtainCard(player.id, c, false, fk.ReasonPrey)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
@ -233,34 +223,38 @@ local luoyi = fk.CreateTriggerSkill{
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
data.n = data.n - 1
|
data.n = data.n - 1
|
||||||
end,
|
end,
|
||||||
|
}
|
||||||
refresh_events = {fk.DamageCaused},
|
local luoyi_trigger = fk.CreateTriggerSkill{
|
||||||
can_refresh = function(self, event, target, player, data)
|
name = "#luoyi_trigger",
|
||||||
if target ~= player or player:usedSkillTimes(self.name) == 0 then
|
mute = true,
|
||||||
return
|
events = {fk.DamageCaused},
|
||||||
end
|
can_trigger = function(self, event, target, player, data)
|
||||||
|
return target == player and player:usedSkillTimes("luoyi", Player.HistoryTurn) > 0 and
|
||||||
if data.chain then return end
|
not data.chain and data.card and (data.card.trueName == "slash" or data.card.name == "duel")
|
||||||
|
|
||||||
local c = data.card
|
|
||||||
return c and c.trueName == "slash" or c.name == "duel"
|
|
||||||
end,
|
end,
|
||||||
on_refresh = function(self, event, target, player, data)
|
on_cost = function(self, event, target, player, data)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
room:broadcastSkillInvoke(self.name)
|
room:broadcastSkillInvoke("luoyi")
|
||||||
room:notifySkillInvoked(player, self.name)
|
room:notifySkillInvoked(player, "luoyi")
|
||||||
data.damage = data.damage + 1
|
data.damage = data.damage + 1
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
local xuchu = General:new(extension, "xuchu", "wei", 4)
|
local xuchu = General:new(extension, "xuchu", "wei", 4)
|
||||||
|
luoyi:addRelatedSkill(luoyi_trigger)
|
||||||
xuchu:addSkill(luoyi)
|
xuchu:addSkill(luoyi)
|
||||||
|
|
||||||
local tiandu = fk.CreateTriggerSkill{
|
local tiandu = fk.CreateTriggerSkill{
|
||||||
name = "tiandu",
|
name = "tiandu",
|
||||||
|
anim_type = "drawcard",
|
||||||
events = {fk.FinishJudge},
|
events = {fk.FinishJudge},
|
||||||
|
can_trigger = function(self, event, target, player, data)
|
||||||
|
return target == player and player:hasSkill(self.name) and player.room:getCardArea(data.card) == Card.Processing
|
||||||
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
player.room:obtainCard(player.id, data.card, true, fk.ReasonJustMove)
|
||||||
room:obtainCard(player.id, data.card)
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
local yiji = fk.CreateTriggerSkill{
|
local yiji = fk.CreateTriggerSkill{
|
||||||
|
@ -295,8 +289,7 @@ local luoshen = fk.CreateTriggerSkill{
|
||||||
anim_type = "drawcard",
|
anim_type = "drawcard",
|
||||||
events = {fk.EventPhaseStart},
|
events = {fk.EventPhaseStart},
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
return target == player and player:hasSkill(self.name) and
|
return target == player and player:hasSkill(self.name) and player.phase == Player.Start
|
||||||
player.phase == Player.Start
|
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
|
@ -304,28 +297,18 @@ local luoshen = fk.CreateTriggerSkill{
|
||||||
local judge = {
|
local judge = {
|
||||||
who = player,
|
who = player,
|
||||||
reason = self.name,
|
reason = self.name,
|
||||||
pattern = ".|A~K|spade,club",
|
pattern = ".|.|spade,club",
|
||||||
}
|
}
|
||||||
room:judge(judge)
|
room:judge(judge)
|
||||||
if judge.card.color ~= Card.Black then
|
if judge.card.color ~= Card.Black then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
room:obtainCard(player.id, judge.card, true, fk.ReasonJustMove)
|
||||||
if not room:askForSkillInvoke(player, self.name) then
|
if player.dead or not room:askForSkillInvoke(player, self.name) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
refresh_events = {fk.FinishJudge},
|
|
||||||
can_refresh = function(self, event, target, player, data)
|
|
||||||
return target == player and player:hasSkill(self.name) and
|
|
||||||
data.reason == self.name and data.card.color == Card.Black
|
|
||||||
end,
|
|
||||||
on_refresh = function(self, event, target, player, data)
|
|
||||||
local room = player.room
|
|
||||||
room:obtainCard(player.id, data.card)
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
local qingguo = fk.CreateViewAsSkill{
|
local qingguo = fk.CreateViewAsSkill{
|
||||||
name = "qingguo",
|
name = "qingguo",
|
||||||
|
@ -350,18 +333,6 @@ local zhenji = General:new(extension, "zhenji", "wei", 3, 3, General.Female)
|
||||||
zhenji:addSkill(luoshen)
|
zhenji:addSkill(luoshen)
|
||||||
zhenji:addSkill(qingguo)
|
zhenji:addSkill(qingguo)
|
||||||
|
|
||||||
local rendetrig = fk.CreateTriggerSkill{
|
|
||||||
name = "#rendetrig",
|
|
||||||
mute = true,
|
|
||||||
refresh_events = {fk.EventPhaseStart},
|
|
||||||
can_refresh = function(self, event, target, player, data)
|
|
||||||
return target == player and player:hasSkill(self.name) and player.phase == Player.NotActive
|
|
||||||
end,
|
|
||||||
on_refresh = function(self, event, target, player, data)
|
|
||||||
local room = player.room
|
|
||||||
room:setPlayerMark(player, "_rende_cards", 0)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
local rende = fk.CreateActiveSkill{
|
local rende = fk.CreateActiveSkill{
|
||||||
name = "rende",
|
name = "rende",
|
||||||
anim_type = "support",
|
anim_type = "support",
|
||||||
|
@ -377,21 +348,21 @@ local rende = fk.CreateActiveSkill{
|
||||||
local target = room:getPlayerById(effect.tos[1])
|
local target = room:getPlayerById(effect.tos[1])
|
||||||
local player = room:getPlayerById(effect.from)
|
local player = room:getPlayerById(effect.from)
|
||||||
local cards = effect.cards
|
local cards = effect.cards
|
||||||
local marks = player:getMark("_rende_cards")
|
local marks = player:getMark("_rende_cards-phase")
|
||||||
local dummy = Fk:cloneCard'slash'
|
local dummy = Fk:cloneCard'slash'
|
||||||
dummy:addSubcards(cards)
|
dummy:addSubcards(cards)
|
||||||
room:obtainCard(target.id, dummy, false, fk.ReasonGive)
|
room:obtainCard(target.id, dummy, false, fk.ReasonGive)
|
||||||
room:addPlayerMark(player, "_rende_cards", #cards)
|
room:addPlayerMark(player, "_rende_cards-phase", #cards)
|
||||||
if marks < 2 and marks + #cards >= 2 and player:isWounded() then
|
if marks < 2 and marks + #cards >= 2 and player:isWounded() then
|
||||||
room:recover{
|
room:recover{
|
||||||
who = player,
|
who = player,
|
||||||
num = 1,
|
num = 1,
|
||||||
|
recoverBy = player,
|
||||||
skillName = self.name
|
skillName = self.name
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
rende:addRelatedSkill(rendetrig)
|
|
||||||
|
|
||||||
local jijiang = fk.CreateViewAsSkill{
|
local jijiang = fk.CreateViewAsSkill{
|
||||||
name = "jijiang$",
|
name = "jijiang$",
|
||||||
|
@ -551,11 +522,7 @@ local kongchengAudio = fk.CreateTriggerSkill{
|
||||||
end,
|
end,
|
||||||
on_refresh = function(self, event, target, player, data)
|
on_refresh = function(self, event, target, player, data)
|
||||||
player.room:broadcastSkillInvoke("kongcheng")
|
player.room:broadcastSkillInvoke("kongcheng")
|
||||||
player.room:doAnimate("InvokeSkill", {
|
player.room:notifySkillInvoked(player, "kongcheng", "defensive")
|
||||||
name = "kongcheng",
|
|
||||||
player = player.id,
|
|
||||||
skill_type = "defensive",
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
local kongcheng = fk.CreateProhibitSkill{
|
local kongcheng = fk.CreateProhibitSkill{
|
||||||
|
@ -563,7 +530,7 @@ local kongcheng = fk.CreateProhibitSkill{
|
||||||
frequency = Skill.Compulsory,
|
frequency = Skill.Compulsory,
|
||||||
is_prohibited = function(self, from, to, card)
|
is_prohibited = function(self, from, to, card)
|
||||||
if to:hasSkill(self.name) and to:isKongcheng() then
|
if to:hasSkill(self.name) and to:isKongcheng() then
|
||||||
return card.trueName == "slash" or card.name == "duel"
|
return card.trueName == "slash" or card.trueName == "duel"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -646,9 +613,7 @@ local jizhi = fk.CreateTriggerSkill{
|
||||||
anim_type = "drawcard",
|
anim_type = "drawcard",
|
||||||
events = {fk.CardUsing},
|
events = {fk.CardUsing},
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
return target == player and player:hasSkill(self.name) and
|
return target == player and player:hasSkill(self.name) and data.card:isCommonTrick()
|
||||||
data.card.type == Card.TypeTrick and
|
|
||||||
data.card.sub_type ~= Card.SubtypeDelayedTrick
|
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
player:drawCards(1, self.name)
|
player:drawCards(1, self.name)
|
||||||
|
@ -657,12 +622,8 @@ local jizhi = fk.CreateTriggerSkill{
|
||||||
local qicai = fk.CreateTargetModSkill{
|
local qicai = fk.CreateTargetModSkill{
|
||||||
name = "qicai",
|
name = "qicai",
|
||||||
frequency = Skill.Compulsory,
|
frequency = Skill.Compulsory,
|
||||||
bypass_distances = function(self, player, skill)
|
bypass_distances = function(self, player, skill, card)
|
||||||
local card_name = string.sub(skill.name, 1, -7) -- assuming all card skill is named with name_skill
|
return player:hasSkill(self.name) and card and card.type == Card.TypeTrick
|
||||||
local card = Fk:cloneCard(card_name)
|
|
||||||
if player:hasSkill(self.name) and card.type == Card.TypeTrick then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
local huangyueying = General:new(extension, "huangyueying", "shu", 3, 3, General.Female)
|
local huangyueying = General:new(extension, "huangyueying", "shu", 3, 3, General.Female)
|
||||||
|
@ -673,14 +634,14 @@ local zhiheng = fk.CreateActiveSkill{
|
||||||
name = "zhiheng",
|
name = "zhiheng",
|
||||||
anim_type = "drawcard",
|
anim_type = "drawcard",
|
||||||
can_use = function(self, player)
|
can_use = function(self, player)
|
||||||
return player:usedSkillTimes(self.name) == 0
|
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
|
||||||
end,
|
end,
|
||||||
target_num = 0,
|
target_num = 0,
|
||||||
min_card_num = 1,
|
min_card_num = 1,
|
||||||
on_use = function(self, room, effect)
|
on_use = function(self, room, effect)
|
||||||
local from = room:getPlayerById(effect.from)
|
local from = room:getPlayerById(effect.from)
|
||||||
room:throwCard(effect.cards, self.name, from)
|
room:throwCard(effect.cards, self.name, from, from)
|
||||||
room:drawCards(from, #effect.cards, self.name)
|
from:drawCards(#effect.cards, self.name)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,7 +737,7 @@ local kurou = fk.CreateActiveSkill{
|
||||||
local from = room:getPlayerById(effect.from)
|
local from = room:getPlayerById(effect.from)
|
||||||
room:loseHp(from, 1, self.name)
|
room:loseHp(from, 1, self.name)
|
||||||
if from:isAlive() then
|
if from:isAlive() then
|
||||||
room:drawCards(from, 2, self.name)
|
from:drawCards(2, self.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -794,7 +755,7 @@ local yingzi = fk.CreateTriggerSkill{
|
||||||
local fanjian = fk.CreateActiveSkill{
|
local fanjian = fk.CreateActiveSkill{
|
||||||
name = "fanjian",
|
name = "fanjian",
|
||||||
can_use = function(self, player)
|
can_use = function(self, player)
|
||||||
return player:usedSkillTimes(self.name) < 1 and not player:isKongcheng()
|
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and not player:isKongcheng()
|
||||||
end,
|
end,
|
||||||
card_filter = function() return false end,
|
card_filter = function() return false end,
|
||||||
target_filter = function(self, to_select, selected)
|
target_filter = function(self, to_select, selected)
|
||||||
|
@ -806,7 +767,7 @@ local fanjian = fk.CreateActiveSkill{
|
||||||
local target = room:getPlayerById(effect.tos[1])
|
local target = room:getPlayerById(effect.tos[1])
|
||||||
local choice = room:askForChoice(target, {"spade", "heart", "club", "diamond"}, self.name)
|
local choice = room:askForChoice(target, {"spade", "heart", "club", "diamond"}, self.name)
|
||||||
local card = room:askForCardChosen(target, player, 'h', self.name)
|
local card = room:askForCardChosen(target, player, 'h', self.name)
|
||||||
room:obtainCard(target.id, card, true)
|
room:obtainCard(target.id, card, true, fk.ReasonPrey)
|
||||||
if Fk:getCardById(card):getSuitString() ~= choice then
|
if Fk:getCardById(card):getSuitString() ~= choice then
|
||||||
room:damage{
|
room:damage{
|
||||||
from = player,
|
from = player,
|
||||||
|
@ -860,8 +821,7 @@ local liuli = fk.CreateTriggerSkill{
|
||||||
on_cost = function(self, event, target, player, data)
|
on_cost = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local prompt = "#liuli-target"
|
local prompt = "#liuli-target"
|
||||||
local plist, cid = room:askForChooseCardAndPlayers(player,
|
local plist, cid = room:askForChooseCardAndPlayers(player, self.target_list, 1, 1, nil, prompt, self.name, true)
|
||||||
self.target_list, 1, 1, nil, prompt, self.name, true)
|
|
||||||
if #plist > 0 then
|
if #plist > 0 then
|
||||||
self.cost_data = {plist[1], cid}
|
self.cost_data = {plist[1], cid}
|
||||||
return true
|
return true
|
||||||
|
@ -947,14 +907,13 @@ local jieyin = fk.CreateActiveSkill{
|
||||||
name = "jieyin",
|
name = "jieyin",
|
||||||
anim_type = "support",
|
anim_type = "support",
|
||||||
can_use = function(self, player)
|
can_use = function(self, player)
|
||||||
return player:usedSkillTimes(self.name) == 0
|
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
|
||||||
end,
|
end,
|
||||||
card_filter = function(self, to_select, selected)
|
card_filter = function(self, to_select, selected)
|
||||||
return #selected < 2 and Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
|
return #selected < 2 and Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
|
||||||
end,
|
end,
|
||||||
target_filter = function(self, to_select, selected)
|
target_filter = function(self, to_select, selected)
|
||||||
local target = Fk:currentRoom():getPlayerById(to_select)
|
local target = Fk:currentRoom():getPlayerById(to_select)
|
||||||
local name = target.general
|
|
||||||
return target:isWounded() and
|
return target:isWounded() and
|
||||||
target.gender == General.Male
|
target.gender == General.Male
|
||||||
and #selected < 1
|
and #selected < 1
|
||||||
|
@ -963,18 +922,18 @@ local jieyin = fk.CreateActiveSkill{
|
||||||
card_num = 2,
|
card_num = 2,
|
||||||
on_use = function(self, room, effect)
|
on_use = function(self, room, effect)
|
||||||
local from = room:getPlayerById(effect.from)
|
local from = room:getPlayerById(effect.from)
|
||||||
room:throwCard(effect.cards, self.name, from)
|
room:throwCard(effect.cards, self.name, from, from)
|
||||||
room:recover({
|
room:recover({
|
||||||
who = room:getPlayerById(effect.tos[1]),
|
who = room:getPlayerById(effect.tos[1]),
|
||||||
num = 1,
|
num = 1,
|
||||||
recoverBy = effect.from,
|
recoverBy = room:getPlayerById(effect.from),
|
||||||
skillName = self.name
|
skillName = self.name
|
||||||
})
|
})
|
||||||
if from:isWounded() then
|
if from:isWounded() then
|
||||||
room:recover({
|
room:recover({
|
||||||
who = room:getPlayerById(effect.from),
|
who = room:getPlayerById(effect.from),
|
||||||
num = 1,
|
num = 1,
|
||||||
recoverBy = effect.from,
|
recoverBy = room:getPlayerById(effect.from),
|
||||||
skillName = self.name
|
skillName = self.name
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -988,7 +947,7 @@ local qingnang = fk.CreateActiveSkill{
|
||||||
name = "qingnang",
|
name = "qingnang",
|
||||||
anim_type = "support",
|
anim_type = "support",
|
||||||
can_use = function(self, player)
|
can_use = function(self, player)
|
||||||
return player:usedSkillTimes(self.name) == 0
|
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
|
||||||
end,
|
end,
|
||||||
card_filter = function(self, to_select, selected, targets)
|
card_filter = function(self, to_select, selected, targets)
|
||||||
return #selected == 0 and Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
|
return #selected == 0 and Fk:currentRoom():getCardArea(to_select) ~= Player.Equip
|
||||||
|
@ -1000,11 +959,11 @@ local qingnang = fk.CreateActiveSkill{
|
||||||
card_num = 1,
|
card_num = 1,
|
||||||
on_use = function(self, room, effect)
|
on_use = function(self, room, effect)
|
||||||
local from = room:getPlayerById(effect.from)
|
local from = room:getPlayerById(effect.from)
|
||||||
room:throwCard(effect.cards, self.name, from)
|
room:throwCard(effect.cards, self.name, from, from)
|
||||||
room:recover({
|
room:recover({
|
||||||
who = room:getPlayerById(effect.tos[1]),
|
who = room:getPlayerById(effect.tos[1]),
|
||||||
num = 1,
|
num = 1,
|
||||||
recoverBy = effect.from,
|
recoverBy = room:getPlayerById(effect.from),
|
||||||
skillName = self.name
|
skillName = self.name
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
@ -1050,7 +1009,7 @@ local wushuang = fk.CreateTriggerSkill{
|
||||||
if event == fk.TargetSpecified then
|
if event == fk.TargetSpecified then
|
||||||
return target == player and table.contains({ "slash", "duel" }, data.card.trueName)
|
return target == player and table.contains({ "slash", "duel" }, data.card.trueName)
|
||||||
else
|
else
|
||||||
return data.to == player.id and data.card.name == "duel"
|
return data.to == player.id and data.card.trueName == "duel"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
|
@ -1071,7 +1030,7 @@ local lijian = fk.CreateActiveSkill{
|
||||||
name = "lijian",
|
name = "lijian",
|
||||||
anim_type = "offensive",
|
anim_type = "offensive",
|
||||||
can_use = function(self, player)
|
can_use = function(self, player)
|
||||||
return player:usedSkillTimes(self.name) == 0
|
return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
|
||||||
end,
|
end,
|
||||||
card_filter = function(self, to_select, selected)
|
card_filter = function(self, to_select, selected)
|
||||||
return #selected == 0
|
return #selected == 0
|
||||||
|
@ -1083,14 +1042,16 @@ local lijian = fk.CreateActiveSkill{
|
||||||
target_num = 2,
|
target_num = 2,
|
||||||
min_card_num = 1,
|
min_card_num = 1,
|
||||||
on_use = function(self, room, use)
|
on_use = function(self, room, use)
|
||||||
room:throwCard(use.cards, self.name, room:getPlayerById(use.from))
|
local player = room:getPlayerById(use.from)
|
||||||
|
room:throwCard(use.cards, self.name, player, player)
|
||||||
local duel = Fk:cloneCard("duel")
|
local duel = Fk:cloneCard("duel")
|
||||||
duel.skillName = self.name
|
duel.skillName = self.name
|
||||||
local new_use = {} ---@type CardUseStruct
|
local new_use = { ---@type CardUseStruct
|
||||||
new_use.from = use.tos[2]
|
from = use.tos[2],
|
||||||
new_use.tos = { { use.tos[1] } }
|
tos = { { use.tos[1] } },
|
||||||
new_use.card = duel
|
card = duel,
|
||||||
new_use.prohibitedCardNames = { "nullification" }
|
prohibitedCardNames = { "nullification" },
|
||||||
|
}
|
||||||
room:useCard(new_use)
|
room:useCard(new_use)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -1103,7 +1064,7 @@ local biyue = fk.CreateTriggerSkill{
|
||||||
and player.phase == Player.Finish
|
and player.phase == Player.Finish
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
player:drawCards(1)
|
player:drawCards(1, self.name)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
local diaochan = General:new(extension, "diaochan", "qun", 3, 3, General.Female)
|
local diaochan = General:new(extension, "diaochan", "qun", 3, 3, General.Female)
|
||||||
|
|
|
@ -31,6 +31,7 @@ Fk:loadTranslationTable({
|
||||||
["duel"] = "Duel",
|
["duel"] = "Duel",
|
||||||
|
|
||||||
["collateral"] = "Collateral",
|
["collateral"] = "Collateral",
|
||||||
|
["#collateral-slash"] = "Collateral:You shall play Slash to %dest , or %src obtain your weapon",
|
||||||
|
|
||||||
["ex_nihilo"] = "Ex Nihilo",
|
["ex_nihilo"] = "Ex Nihilo",
|
||||||
|
|
||||||
|
@ -57,16 +58,18 @@ Fk:loadTranslationTable({
|
||||||
|
|
||||||
["double_swords"] = "Double Sword",
|
["double_swords"] = "Double Sword",
|
||||||
["#double_swords_skill"] = "Double Sword",
|
["#double_swords_skill"] = "Double Sword",
|
||||||
|
["#double_swords-invoke"] = "Double Sword:You shall discard 1 handcard,or %src draw 1",
|
||||||
|
|
||||||
["blade"] = "Blade",
|
["blade"] = "Blade",
|
||||||
["#blade_skill"] = "Blade",
|
["#blade_skill"] = "Blade",
|
||||||
["#blade_slash"] = "You can use Blade to use Slash to %src again",
|
["#blade_slash"] = "Blade: You may use Slash to %src again",
|
||||||
|
|
||||||
["spear"] = "Spear",
|
["spear"] = "Spear",
|
||||||
["spear_skill"] = "Spear",
|
["spear_skill"] = "Spear",
|
||||||
|
|
||||||
["axe"] = "Axe",
|
["axe"] = "Axe",
|
||||||
["#axe_skill"] = "Axe",
|
["#axe_skill"] = "Axe",
|
||||||
|
["#axe-invoke"] = "Axe:You may discard 2 cards to ensure your Slash effective to %dest",
|
||||||
|
|
||||||
["halberd"] = "Halberd",
|
["halberd"] = "Halberd",
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@ Fk:loadTranslationTable{
|
||||||
|
|
||||||
["collateral"] = "借刀杀人",
|
["collateral"] = "借刀杀人",
|
||||||
[":collateral"] = "锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:装备区内有武器牌且攻击范围内有【杀】的合法目标的一名其他角色A(你需要选择一名A攻击范围内的【杀】的合法目标B)<br /><b>效果</b>:A须对B使用一张【杀】,否则你获得A装备区内的武器牌。",
|
[":collateral"] = "锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:装备区内有武器牌且攻击范围内有【杀】的合法目标的一名其他角色A(你需要选择一名A攻击范围内的【杀】的合法目标B)<br /><b>效果</b>:A须对B使用一张【杀】,否则你获得A装备区内的武器牌。",
|
||||||
|
["#collateral-slash"] = "借刀杀人:你需对 %dest 使用【杀】,否则 %src 获得你的武器",
|
||||||
|
|
||||||
["ex_nihilo"] = "无中生有",
|
["ex_nihilo"] = "无中生有",
|
||||||
[":ex_nihilo"] = "锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:你<br /><b>效果</b>:目标角色摸两张牌。",
|
[":ex_nihilo"] = "锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:你<br /><b>效果</b>:目标角色摸两张牌。",
|
||||||
|
@ -87,6 +88,7 @@ Fk:loadTranslationTable{
|
||||||
["amazing_grace"] = "五谷丰登",
|
["amazing_grace"] = "五谷丰登",
|
||||||
[":amazing_grace"] = "锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:所有角色<br /><b>效果</b>:你亮出牌堆顶等于角色数的牌,每名目标角色获得其中一张牌,然后将其余的牌置入弃牌堆。",
|
[":amazing_grace"] = "锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:所有角色<br /><b>效果</b>:你亮出牌堆顶等于角色数的牌,每名目标角色获得其中一张牌,然后将其余的牌置入弃牌堆。",
|
||||||
["amazing_grace_skill"] = "五谷选牌",
|
["amazing_grace_skill"] = "五谷选牌",
|
||||||
|
["Please choose cards"] = "请选择一张卡牌",
|
||||||
|
|
||||||
["lightning"] = "闪电",
|
["lightning"] = "闪电",
|
||||||
[":lightning"] = "延时锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:你<br /><b>效果</b>:将此牌置于目标角色判定区内。其判定阶段进行判定:若结果为黑桃2-9,其受到3点雷电伤害并将【闪电】置入弃牌堆,否则将【闪电】移动至其下家判定区内。",
|
[":lightning"] = "延时锦囊牌<br /><b>时机</b>:出牌阶段<br /><b>目标</b>:你<br /><b>效果</b>:将此牌置于目标角色判定区内。其判定阶段进行判定:若结果为黑桃2-9,其受到3点雷电伤害并将【闪电】置入弃牌堆,否则将【闪电】移动至其下家判定区内。",
|
||||||
|
@ -107,11 +109,12 @@ Fk:loadTranslationTable{
|
||||||
["double_swords"] = "雌雄双股剑",
|
["double_swords"] = "雌雄双股剑",
|
||||||
[":double_swords"] = "装备牌·武器<br /><b>攻击范围</b>:2<br /><b>武器技能</b>:每当你指定异性角色为【杀】的目标后,你可以令其选择一项:弃置一张手牌,或令你摸一张牌。",
|
[":double_swords"] = "装备牌·武器<br /><b>攻击范围</b>:2<br /><b>武器技能</b>:每当你指定异性角色为【杀】的目标后,你可以令其选择一项:弃置一张手牌,或令你摸一张牌。",
|
||||||
["#double_swords_skill"] = "雌雄双股剑",
|
["#double_swords_skill"] = "雌雄双股剑",
|
||||||
|
["#double_swords-invoke"] = "雌雄双股剑:你需弃置一张手牌,否则 %src 摸一张牌",
|
||||||
|
|
||||||
["blade"] = "青龙偃月刀",
|
["blade"] = "青龙偃月刀",
|
||||||
[":blade"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:每当你使用的【杀】被【闪】抵消后,你可以对该角色再使用一张【杀】(无距离限制且不能选择额外目标)。",
|
[":blade"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:每当你使用的【杀】被【闪】抵消后,你可以对该角色再使用一张【杀】(无距离限制且不能选择额外目标)。",
|
||||||
["#blade_skill"] = "青龙偃月刀",
|
["#blade_skill"] = "青龙偃月刀",
|
||||||
["#blade_slash"] = "你可以发动“青龙偃月刀”对 %src 再使用一张杀",
|
["#blade_slash"] = "青龙偃月刀:你可以对 %src 再使用一张【杀】",
|
||||||
|
|
||||||
["spear"] = "丈八蛇矛",
|
["spear"] = "丈八蛇矛",
|
||||||
[":spear"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:你可以将两张手牌当【杀】使用或打出。",
|
[":spear"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:你可以将两张手牌当【杀】使用或打出。",
|
||||||
|
@ -121,6 +124,7 @@ Fk:loadTranslationTable{
|
||||||
["axe"] = "贯石斧",
|
["axe"] = "贯石斧",
|
||||||
[":axe"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:每当你使用的【杀】被【闪】抵消后,你可以弃置两张牌,则此【杀】继续造成伤害。",
|
[":axe"] = "装备牌·武器<br /><b>攻击范围</b>:3<br /><b>武器技能</b>:每当你使用的【杀】被【闪】抵消后,你可以弃置两张牌,则此【杀】继续造成伤害。",
|
||||||
["#axe_skill"] = "贯石斧",
|
["#axe_skill"] = "贯石斧",
|
||||||
|
["#axe-invoke"] = "贯石斧:你可以弃置两张牌,令你对 %dest 使用的【杀】依然生效",
|
||||||
|
|
||||||
["halberd"] = "方天画戟",
|
["halberd"] = "方天画戟",
|
||||||
[":halberd"] = "装备牌·武器<br /><b>攻击范围</b>:4<br /><b>武器技能</b>:锁定技。你使用最后的手牌【杀】可以额外选择至多两名目标。",
|
[":halberd"] = "装备牌·武器<br /><b>攻击范围</b>:4<br /><b>武器技能</b>:锁定技。你使用最后的手牌【杀】可以额外选择至多两名目标。",
|
||||||
|
@ -134,7 +138,7 @@ Fk:loadTranslationTable{
|
||||||
["#eight_diagram_skill"] = "八卦阵",
|
["#eight_diagram_skill"] = "八卦阵",
|
||||||
|
|
||||||
["nioh_shield"] = "仁王盾",
|
["nioh_shield"] = "仁王盾",
|
||||||
[":nioh_shield"] = "装备牌·防具<br /><b>防具技能</b>:锁定技。黑色【杀】对你无效。",
|
[":nioh_shield"] = "装备牌·防具<br /><b>防具技能</b>:锁定技,黑色【杀】对你无效。",
|
||||||
|
|
||||||
["dilu"] = "的卢",
|
["dilu"] = "的卢",
|
||||||
[":dilu"] = "装备牌·坐骑<br /><b>坐骑技能</b>:其他角色与你的距离+1。",
|
[":dilu"] = "装备牌·坐骑<br /><b>坐骑技能</b>:其他角色与你的距离+1。",
|
||||||
|
|
|
@ -61,17 +61,18 @@ local slashSkill = fk.CreateActiveSkill{
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_effect = function(self, room, effect)
|
on_effect = function(self, room, effect)
|
||||||
local to = effect.to
|
local from = room:getPlayerById(effect.from)
|
||||||
local from = effect.from
|
local to = room:getPlayerById(effect.to)
|
||||||
|
if not to.dead then
|
||||||
room:damage({
|
room:damage({
|
||||||
from = room:getPlayerById(from),
|
from = from,
|
||||||
to = room:getPlayerById(to),
|
to = to,
|
||||||
card = effect.card,
|
card = effect.card,
|
||||||
damage = 1,
|
damage = 1,
|
||||||
damageType = fk.NormalDamage,
|
damageType = fk.NormalDamage,
|
||||||
skillName = self.name
|
skillName = self.name
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local slash = fk.CreateBasicCard{
|
local slash = fk.CreateBasicCard{
|
||||||
|
@ -166,16 +167,17 @@ local peachSkill = fk.CreateActiveSkill{
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_effect = function(self, room, effect)
|
on_effect = function(self, room, effect)
|
||||||
local to = effect.to
|
local player = room:getPlayerById(effect.from)
|
||||||
local from = effect.from
|
local target = room:getPlayerById(effect.to)
|
||||||
|
if target:isWounded() and not target.dead then
|
||||||
room:recover({
|
room:recover({
|
||||||
who = room:getPlayerById(to),
|
who = target,
|
||||||
num = 1,
|
num = 1,
|
||||||
card = effect.card,
|
card = effect.card,
|
||||||
recoverBy = room:getPlayerById(from),
|
recoverBy = player,
|
||||||
skillName = self.name
|
skillName = self.name
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local peach = fk.CreateBasicCard{
|
local peach = fk.CreateBasicCard{
|
||||||
|
@ -206,17 +208,11 @@ local dismantlementSkill = fk.CreateActiveSkill{
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_effect = function(self, room, effect)
|
on_effect = function(self, room, effect)
|
||||||
local to = room:getPlayerById(effect.to)
|
|
||||||
if to:isAllNude() then return end
|
|
||||||
local from = room:getPlayerById(effect.from)
|
local from = room:getPlayerById(effect.from)
|
||||||
local cid = room:askForCardChosen(
|
local to = room:getPlayerById(effect.to)
|
||||||
from,
|
if to.dead or to:isAllNude() then return end
|
||||||
to,
|
local cid = room:askForCardChosen(from, to, "hej", self.name)
|
||||||
"hej",
|
room:throwCard({cid}, self.name, to, from)
|
||||||
self.name
|
|
||||||
)
|
|
||||||
|
|
||||||
room:throwCard(cid, self.name, to, from)
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local dismantlement = fk.CreateTrickCard{
|
local dismantlement = fk.CreateTrickCard{
|
||||||
|
@ -251,17 +247,11 @@ local snatchSkill = fk.CreateActiveSkill{
|
||||||
end,
|
end,
|
||||||
target_num = 1,
|
target_num = 1,
|
||||||
on_effect = function(self, room, effect)
|
on_effect = function(self, room, effect)
|
||||||
|
local from = room:getPlayerById(effect.from)
|
||||||
local to = room:getPlayerById(effect.to)
|
local to = room:getPlayerById(effect.to)
|
||||||
local from = effect.from
|
if to.dead or to:isAllNude() then return end
|
||||||
if to:isAllNude() then return end
|
local cid = room:askForCardChosen(from, to, "hej", self.name)
|
||||||
local cid = room:askForCardChosen(
|
room:obtainCard(from, cid, false, fk.ReasonPrey)
|
||||||
room:getPlayerById(from),
|
|
||||||
to,
|
|
||||||
"hej",
|
|
||||||
self.name
|
|
||||||
)
|
|
||||||
|
|
||||||
room:obtainCard(from, cid)
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local snatch = fk.CreateTrickCard{
|
local snatch = fk.CreateTrickCard{
|
||||||
|
@ -379,11 +369,14 @@ local collateralSkill = fk.CreateActiveSkill{
|
||||||
end,
|
end,
|
||||||
on_effect = function(self, room, effect)
|
on_effect = function(self, room, effect)
|
||||||
local to = room:getPlayerById(effect.to)
|
local to = room:getPlayerById(effect.to)
|
||||||
if not to:getEquipment(Card.SubtypeWeapon) then return end
|
if to.dead or not to:getEquipment(Card.SubtypeWeapon) then return end
|
||||||
local use = room:askForUseCard(to, "slash", nil, nil, nil,
|
local prompt = "#collateral-slash:"..effect.from..":"..effect.subTargets[1]
|
||||||
{ must_targets = effect.subTargets }, effect)
|
if #effect.subTargets > 1 then
|
||||||
|
prompt = nil
|
||||||
|
end
|
||||||
|
local use = room:askForUseCard(to, "slash", nil, prompt, nil, { must_targets = effect.subTargets }, effect)
|
||||||
if use then
|
if use then
|
||||||
|
use.extraUse = true
|
||||||
room:useCard(use)
|
room:useCard(use)
|
||||||
else
|
else
|
||||||
room:obtainCard(effect.from,
|
room:obtainCard(effect.from,
|
||||||
|
@ -411,8 +404,10 @@ local exNihiloSkill = fk.CreateActiveSkill{
|
||||||
cardUseEvent.tos = { { cardUseEvent.from } }
|
cardUseEvent.tos = { { cardUseEvent.from } }
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_effect = function(self, room, cardEffectEvent)
|
on_effect = function(self, room, effect)
|
||||||
room:drawCards(room:getPlayerById(cardEffectEvent.to), 2, "ex_nihilo")
|
local target = room:getPlayerById(effect.to)
|
||||||
|
if target.dead then return end
|
||||||
|
target:drawCards(2, "ex_nihilo")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local exNihilo = fk.CreateTrickCard{
|
local exNihilo = fk.CreateTrickCard{
|
||||||
|
@ -542,12 +537,17 @@ local godSalvationSkill = fk.CreateActiveSkill{
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_effect = function(self, room, effect)
|
on_effect = function(self, room, effect)
|
||||||
room:recover({
|
local player = room:getPlayerById(effect.from)
|
||||||
who = room:getPlayerById(effect.to),
|
local target = room:getPlayerById(effect.to)
|
||||||
num = 1,
|
if target:isWounded() and not target.dead then
|
||||||
recoverBy = room:getPlayerById(effect.from),
|
room:recover({
|
||||||
skillName = self.name,
|
who = target,
|
||||||
})
|
num = 1,
|
||||||
|
recoverBy = player,
|
||||||
|
card = effect.card,
|
||||||
|
skillName = self.name,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
local godSalvation = fk.CreateTrickCard{
|
local godSalvation = fk.CreateTrickCard{
|
||||||
|
@ -765,9 +765,8 @@ local crossbowAudio = fk.CreateTriggerSkill{
|
||||||
name = "#crossbowAudio",
|
name = "#crossbowAudio",
|
||||||
refresh_events = {fk.CardUsing},
|
refresh_events = {fk.CardUsing},
|
||||||
can_refresh = function(self, event, target, player, data)
|
can_refresh = function(self, event, target, player, data)
|
||||||
return target == player and player:hasSkill(self.name) and
|
return target == player and player:hasSkill(self.name) and player.phase == Player.Play and
|
||||||
data.card.trueName == "slash" and
|
data.card.trueName == "slash" and player:usedCardTimes("slash", Player.HistoryPhase) > 1
|
||||||
player:usedCardTimes("slash") > 1
|
|
||||||
end,
|
end,
|
||||||
on_refresh = function(self, event, target, player, data)
|
on_refresh = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
|
@ -807,10 +806,13 @@ local armorInvalidity = fk.CreateInvaliditySkill {
|
||||||
name = "armor_invalidity",
|
name = "armor_invalidity",
|
||||||
global = true,
|
global = true,
|
||||||
invalidity_func = function(self, from, skill)
|
invalidity_func = function(self, from, skill)
|
||||||
return
|
if from:getMark(fk.MarkArmorNullified) > 0 and skill.attached_equip then
|
||||||
from:getMark(fk.MarkArmorNullified) > 0 and
|
for _, card in ipairs(Fk.cards) do
|
||||||
from:getEquipment(Card.SubtypeArmor) ~= nil and
|
if card.sub_type == Card.SubtypeArmor and skill.attached_equip == card.name then
|
||||||
skill.attached_equip == Fk:getCardById(from:getEquipment(Card.SubtypeArmor)).name
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
Fk:addSkill(armorInvalidity)
|
Fk:addSkill(armorInvalidity)
|
||||||
|
@ -875,9 +877,9 @@ local iceSwordSkill = fk.CreateTriggerSkill{
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local to = data.to
|
local to = data.to
|
||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
if to:isNude() then break end
|
if player.dead or to.dead or to:isNude() then break end
|
||||||
local card = room:askForCardChosen(player, to, "he", self.name)
|
local card = room:askForCardChosen(player, to, "he", self.name)
|
||||||
room:throwCard(card, self.name, to, player)
|
room:throwCard({card}, self.name, to, player)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -908,9 +910,13 @@ local doubleSwordsSkill = fk.CreateTriggerSkill{
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local to = player.room:getPlayerById(data.to)
|
local to = player.room:getPlayerById(data.to)
|
||||||
local result = room:askForDiscard(to, 1, 1, false, self.name, true)
|
if to:isKongcheng() then
|
||||||
if #result == 0 then
|
|
||||||
player:drawCards(1, self.name)
|
player:drawCards(1, self.name)
|
||||||
|
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
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -997,31 +1003,33 @@ extension:addCards({
|
||||||
spear,
|
spear,
|
||||||
})
|
})
|
||||||
|
|
||||||
local axeProhibit = fk.CreateProhibitSkill{
|
|
||||||
name = "#axe_prohibit",
|
|
||||||
prohibit_discard = function(self, player, card)
|
|
||||||
return player:hasSkill(self.name) and card and card.name == "axe" and
|
|
||||||
Fk.currentResponseReason == "#axe_skill" and
|
|
||||||
Fk:currentRoom():getCardArea(card.id) == Player.Equip
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
local axeSkill = fk.CreateTriggerSkill{
|
local axeSkill = fk.CreateTriggerSkill{
|
||||||
name = "#axe_skill",
|
name = "#axe_skill",
|
||||||
attached_equip = "axe",
|
attached_equip = "axe",
|
||||||
events = {fk.CardEffectCancelledOut},
|
events = {fk.CardEffectCancelledOut},
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
if not player:hasSkill(self.name) then return end
|
return player:hasSkill(self.name) and data.from == player.id and data.card.trueName == "slash"
|
||||||
local effect = data ---@type CardEffectEvent
|
|
||||||
return effect.card.trueName == "slash" and effect.from == player.id
|
|
||||||
end,
|
end,
|
||||||
on_cost = function(self, event, target, player, data)
|
on_cost = function(self, event, target, player, data)
|
||||||
local room = player.room
|
local room = player.room
|
||||||
local ret = room:askForDiscard(player, 2, 2, true, self.name, true)
|
local pattern
|
||||||
if #ret > 0 then return true end
|
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
|
||||||
end,
|
end,
|
||||||
on_use = function() return true end,
|
|
||||||
}
|
}
|
||||||
axeSkill:addRelatedSkill(axeProhibit)
|
|
||||||
Fk:addSkill(axeSkill)
|
Fk:addSkill(axeSkill)
|
||||||
local axe = fk.CreateWeapon{
|
local axe = fk.CreateWeapon{
|
||||||
name = "axe",
|
name = "axe",
|
||||||
|
|
|
@ -262,7 +262,7 @@ test2.shield = 5
|
||||||
test2:addSkill("rende")
|
test2:addSkill("rende")
|
||||||
test2:addSkill(cheat)
|
test2:addSkill(cheat)
|
||||||
test2:addSkill(control)
|
test2:addSkill(control)
|
||||||
test2:addSkill(test_vs)
|
--test2:addSkill(test_vs)
|
||||||
--test2:addSkill(test_trig)
|
--test2:addSkill(test_trig)
|
||||||
test2:addSkill(damage_maker)
|
test2:addSkill(damage_maker)
|
||||||
test2:addSkill(change_hero)
|
test2:addSkill(change_hero)
|
||||||
|
|
Loading…
Reference in New Issue