parent
0ad2f35783
commit
861d87849a
|
@ -83,7 +83,11 @@ function Client:moveCards(moves)
|
||||||
end
|
end
|
||||||
|
|
||||||
if move.to and move.toArea then
|
if move.to and move.toArea then
|
||||||
self:getPlayerById(move.to):addCards(move.toArea, move.ids, move.specialName)
|
local ids = move.ids
|
||||||
|
if (move.to ~= Self.id and move.toArea == Card.PlayerHand) or table.contains(ids, -1) then
|
||||||
|
ids = table.map(ids, function() return -1 end)
|
||||||
|
end
|
||||||
|
self:getPlayerById(move.to):addCards(move.toArea, ids, move.specialName)
|
||||||
elseif move.toArea == Card.DiscardPile then
|
elseif move.toArea == Card.DiscardPile then
|
||||||
table.insert(self.discard_pile, move.ids[1])
|
table.insert(self.discard_pile, move.ids[1])
|
||||||
end
|
end
|
||||||
|
@ -176,6 +180,7 @@ end
|
||||||
|
|
||||||
fk.client_callback["EnterRoom"] = function(jsonData)
|
fk.client_callback["EnterRoom"] = function(jsonData)
|
||||||
Self = ClientPlayer:new(fk.Self)
|
Self = ClientPlayer:new(fk.Self)
|
||||||
|
ClientInstance = Client:new() -- clear old client data
|
||||||
ClientInstance.players = {Self}
|
ClientInstance.players = {Self}
|
||||||
ClientInstance.alive_players = {Self}
|
ClientInstance.alive_players = {Self}
|
||||||
ClientInstance.discard_pile = {}
|
ClientInstance.discard_pile = {}
|
||||||
|
@ -275,6 +280,9 @@ fk.client_callback["AskForCardChosen"] = function(jsonData)
|
||||||
local judge = target.player_cards[Player.Judge]
|
local judge = target.player_cards[Player.Judge]
|
||||||
if not string.find(flag, "h") then
|
if not string.find(flag, "h") then
|
||||||
hand = {}
|
hand = {}
|
||||||
|
elseif target.id ~= Self.id then
|
||||||
|
-- FIXME: can not see other's handcard
|
||||||
|
hand = table.map(hand, function() return -1 end)
|
||||||
end
|
end
|
||||||
if not string.find(flag, "e") then
|
if not string.find(flag, "e") then
|
||||||
equip = {}
|
equip = {}
|
||||||
|
|
|
@ -371,4 +371,9 @@ function GetVirtualEquip(player, cid)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GetExpandPileOfSkill(skillName)
|
||||||
|
local skill = Fk.skills[skillName]
|
||||||
|
return skill and (skill.expand_pile or "") or ""
|
||||||
|
end
|
||||||
|
|
||||||
dofile "lua/client/i18n/init.lua"
|
dofile "lua/client/i18n/init.lua"
|
||||||
|
|
|
@ -73,12 +73,17 @@ local function matchCard(matcher, card)
|
||||||
matcher.place,
|
matcher.place,
|
||||||
placetable[Fk:currentRoom():getCardArea(card.id)]
|
placetable[Fk:currentRoom():getCardArea(card.id)]
|
||||||
) then
|
) then
|
||||||
|
local piles = table.filter(matcher.place, function(e)
|
||||||
|
return not table.contains(placetable, e)
|
||||||
|
end)
|
||||||
|
for _, pi in ipairs(piles) do
|
||||||
if ClientInstance then
|
if ClientInstance then
|
||||||
return Self:getPileNameOfId(card.id) and true or false
|
if Self:getPileNameOfId(card.id) == pi then return true end
|
||||||
else
|
else
|
||||||
for _, p in ipairs(RoomInstance.alive_players) do
|
for _, p in ipairs(RoomInstance.alive_players) do
|
||||||
local pile = p:getPileNameOfId(card.id)
|
local pile = p:getPileNameOfId(card.id)
|
||||||
if pile then return true end
|
if pile == pi then return true end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -181,7 +186,7 @@ local function parseMatcher(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
ret.suit = not table.contains(t[3], ".") and t[3] or nil
|
ret.suit = not table.contains(t[3], ".") and t[3] or nil
|
||||||
ret.place = not table.contains(t[4], ".") and t[4] or { "hand", "equip" }
|
ret.place = not table.contains(t[4], ".") and t[4] or nil
|
||||||
ret.generalName = not table.contains(t[5], ".") and t[5] or nil
|
ret.generalName = not table.contains(t[5], ".") and t[5] or nil
|
||||||
ret.cardType = not table.contains(t[6], ".") and t[6] or nil
|
ret.cardType = not table.contains(t[6], ".") and t[6] or nil
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ function Player:initialize()
|
||||||
self.gender = General.Male
|
self.gender = General.Male
|
||||||
self.seat = 0
|
self.seat = 0
|
||||||
self.next = nil
|
self.next = nil
|
||||||
self.phase = Player.PhaseNone
|
self.phase = Player.NotActive
|
||||||
self.faceup = true
|
self.faceup = true
|
||||||
self.chained = false
|
self.chained = false
|
||||||
self.dying = false
|
self.dying = false
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---@class UsableSkill : Skill
|
---@class UsableSkill : Skill
|
||||||
---@field max_use_time integer[]
|
---@field max_use_time integer[]
|
||||||
|
---@field expand_pile string
|
||||||
local UsableSkill = Skill:subclass("UsableSkill")
|
local UsableSkill = Skill:subclass("UsableSkill")
|
||||||
|
|
||||||
function UsableSkill:initialize(name, frequency)
|
function UsableSkill:initialize(name, frequency)
|
||||||
|
|
|
@ -138,8 +138,8 @@ end
|
||||||
---@param n integer
|
---@param n integer
|
||||||
---@return T|T[]
|
---@return T|T[]
|
||||||
function table.random(tab, n)
|
function table.random(tab, n)
|
||||||
n = n or 1
|
|
||||||
local n0 = n
|
local n0 = n
|
||||||
|
n = n or 1
|
||||||
if #tab == 0 then return nil end
|
if #tab == 0 then return nil end
|
||||||
local tmp = {table.unpack(tab)}
|
local tmp = {table.unpack(tab)}
|
||||||
local ret = {}
|
local ret = {}
|
||||||
|
@ -148,7 +148,7 @@ function table.random(tab, n)
|
||||||
table.insert(ret, table.remove(tmp, i))
|
table.insert(ret, table.remove(tmp, i))
|
||||||
n = n - 1
|
n = n - 1
|
||||||
end
|
end
|
||||||
return n0 == 1 and ret[1] or ret
|
return n0 == nil and ret[1] or ret
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param delimiter string
|
---@param delimiter string
|
||||||
|
|
|
@ -45,6 +45,7 @@ local function readUsableSpecToSkill(skill, spec)
|
||||||
spec.max_game_use_time or 9999,
|
spec.max_game_use_time or 9999,
|
||||||
}
|
}
|
||||||
skill.distance_limit = spec.distance_limit or skill.distance_limit
|
skill.distance_limit = spec.distance_limit or skill.distance_limit
|
||||||
|
skill.expand_pile = spec.expand_pile
|
||||||
end
|
end
|
||||||
|
|
||||||
local function readStatusSpecToSkill(skill, spec)
|
local function readStatusSpecToSkill(skill, spec)
|
||||||
|
|
|
@ -1489,7 +1489,7 @@ function Room:doCardEffect(cardEffectEvent)
|
||||||
|
|
||||||
if event == fk.PreCardEffect then
|
if event == fk.PreCardEffect then
|
||||||
if cardEffectEvent.card.skill:aboutToEffect(self, cardEffectEvent) then return end
|
if cardEffectEvent.card.skill:aboutToEffect(self, cardEffectEvent) then return end
|
||||||
if cardEffectEvent.card.name == "slash" and
|
if cardEffectEvent.card.trueName == "slash" and
|
||||||
not (
|
not (
|
||||||
cardEffectEvent.disresponsive or
|
cardEffectEvent.disresponsive or
|
||||||
cardEffectEvent.unoffsetable or
|
cardEffectEvent.unoffsetable or
|
||||||
|
|
|
@ -168,7 +168,7 @@ local luoyi = fk.CreateTriggerSkill{
|
||||||
end
|
end
|
||||||
|
|
||||||
local c = data.card
|
local c = data.card
|
||||||
return c and c.name == "slash" or c.name == "duel"
|
return c and c.trueName == "slash" or c.name == "duel"
|
||||||
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
|
||||||
|
@ -344,7 +344,7 @@ local paoxiaoAudio = fk.CreateTriggerSkill{
|
||||||
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
|
||||||
data.card.name == "slash" and
|
data.card.trueName == "slash" and
|
||||||
player:usedCardTimes("slash") > 1
|
player:usedCardTimes("slash") > 1
|
||||||
end,
|
end,
|
||||||
on_refresh = function(self, event, target, player, data)
|
on_refresh = function(self, event, target, player, data)
|
||||||
|
@ -359,7 +359,7 @@ local paoxiaoAudio = fk.CreateTriggerSkill{
|
||||||
local paoxiao = fk.CreateTargetModSkill{
|
local paoxiao = fk.CreateTargetModSkill{
|
||||||
name = "paoxiao",
|
name = "paoxiao",
|
||||||
residue_func = function(self, player, skill, scope)
|
residue_func = function(self, player, skill, scope)
|
||||||
if player:hasSkill(self.name) and skill.name == "slash_skill"
|
if player:hasSkill(self.name) and skill.trueName == "slash_skill"
|
||||||
and scope == Player.HistoryPhase then
|
and scope == Player.HistoryPhase then
|
||||||
return 999
|
return 999
|
||||||
end
|
end
|
||||||
|
@ -411,7 +411,7 @@ local kongcheng = fk.CreateProhibitSkill{
|
||||||
name = "kongcheng",
|
name = "kongcheng",
|
||||||
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.name == "slash" or card.name == "duel"
|
return card.trueName == "slash" or card.name == "duel"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ local longdan = fk.CreateViewAsSkill{
|
||||||
card_filter = function(self, to_select, selected)
|
card_filter = function(self, to_select, selected)
|
||||||
if #selected == 1 then return false end
|
if #selected == 1 then return false end
|
||||||
local c = Fk:getCardById(to_select)
|
local c = Fk:getCardById(to_select)
|
||||||
return c.name == "slash" or c.name == "jink"
|
return c.trueName == "slash" or c.name == "jink"
|
||||||
end,
|
end,
|
||||||
view_as = function(self, cards)
|
view_as = function(self, cards)
|
||||||
if #cards ~= 1 then
|
if #cards ~= 1 then
|
||||||
|
@ -434,7 +434,7 @@ local longdan = fk.CreateViewAsSkill{
|
||||||
end
|
end
|
||||||
local _c = Fk:getCardById(cards[1])
|
local _c = Fk:getCardById(cards[1])
|
||||||
local c
|
local c
|
||||||
if _c.name == "slash" then
|
if _c.trueName == "slash" then
|
||||||
c = Fk:cloneCard("jink")
|
c = Fk:cloneCard("jink")
|
||||||
elseif _c.name == "jink" then
|
elseif _c.name == "jink" then
|
||||||
c = Fk:cloneCard("slash")
|
c = Fk:cloneCard("slash")
|
||||||
|
@ -460,7 +460,7 @@ local tieqi = fk.CreateTriggerSkill{
|
||||||
events = {fk.TargetSpecified},
|
events = {fk.TargetSpecified},
|
||||||
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.name == "slash"
|
data.card.trueName == "slash"
|
||||||
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
|
||||||
|
@ -563,7 +563,7 @@ local keji = fk.CreateTriggerSkill{
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if event == fk.CardResponding then
|
if event == fk.CardResponding then
|
||||||
return data.card.name == "slash"
|
return data.card.trueName == "slash"
|
||||||
elseif event == fk.EventPhaseStart then
|
elseif event == fk.EventPhaseStart then
|
||||||
return player.phase == player.NotActive
|
return player.phase == player.NotActive
|
||||||
end
|
end
|
||||||
|
@ -658,7 +658,7 @@ local liuli = fk.CreateTriggerSkill{
|
||||||
events = {fk.TargetConfirming},
|
events = {fk.TargetConfirming},
|
||||||
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
|
local ret = target == player and player:hasSkill(self.name) and
|
||||||
data.card.name == "slash"
|
data.card.trueName == "slash"
|
||||||
if ret then
|
if ret then
|
||||||
self.target_list = {}
|
self.target_list = {}
|
||||||
local room = player.room
|
local room = player.room
|
||||||
|
@ -865,7 +865,7 @@ local wushuang = fk.CreateTriggerSkill{
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
data.fixedResponseTimes = data.fixedResponseTimes or {}
|
data.fixedResponseTimes = data.fixedResponseTimes or {}
|
||||||
if data.card.name == "slash" then
|
if data.card.trueName == "slash" then
|
||||||
data.fixedResponseTimes["jink"] = 2
|
data.fixedResponseTimes["jink"] = 2
|
||||||
else
|
else
|
||||||
data.fixedResponseTimes["slash"] = 2
|
data.fixedResponseTimes["slash"] = 2
|
||||||
|
|
|
@ -675,7 +675,7 @@ local crossbowAudio = fk.CreateTriggerSkill{
|
||||||
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
|
||||||
data.card.name == "slash" and
|
data.card.trueName == "slash" and
|
||||||
player:usedCardTimes("slash") > 1
|
player:usedCardTimes("slash") > 1
|
||||||
end,
|
end,
|
||||||
on_refresh = function(self, event, target, player, data)
|
on_refresh = function(self, event, target, player, data)
|
||||||
|
@ -688,7 +688,7 @@ local crossbowSkill = fk.CreateTargetModSkill{
|
||||||
name = "#crossbow_skill",
|
name = "#crossbow_skill",
|
||||||
attached_equip = "crossbow",
|
attached_equip = "crossbow",
|
||||||
residue_func = function(self, player, skill, scope)
|
residue_func = function(self, player, skill, scope)
|
||||||
if player:hasSkill(self.name) and skill.name == "slash_skill"
|
if player:hasSkill(self.name) and skill.trueName == "slash_skill"
|
||||||
and scope == Player.HistoryPhase then
|
and scope == Player.HistoryPhase then
|
||||||
return 999
|
return 999
|
||||||
end
|
end
|
||||||
|
@ -727,7 +727,7 @@ local iceSwordSkill = fk.CreateTriggerSkill{
|
||||||
events = {fk.DamageCaused},
|
events = {fk.DamageCaused},
|
||||||
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 and data.card.name == "slash" and not data.to:isNude()
|
data.card and data.card.trueName == "slash" and not data.to:isNude()
|
||||||
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
|
||||||
|
@ -760,7 +760,7 @@ local doubleSwordsSkill = fk.CreateTriggerSkill{
|
||||||
events = {fk.TargetSpecified},
|
events = {fk.TargetSpecified},
|
||||||
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 and data.card.name == "slash" and
|
data.card and data.card.trueName == "slash" and
|
||||||
(player.room:getPlayerById(data.to).gender ~= player.gender)
|
(player.room:getPlayerById(data.to).gender ~= player.gender)
|
||||||
end,
|
end,
|
||||||
on_use = function(self, event, target, player, data)
|
on_use = function(self, event, target, player, data)
|
||||||
|
@ -792,7 +792,7 @@ local bladeSkill = fk.CreateTriggerSkill{
|
||||||
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
|
if not player:hasSkill(self.name) then return end
|
||||||
local use = data ---@type CardUseStruct
|
local use = data ---@type CardUseStruct
|
||||||
if use.card.name == "jink" and use.toCard and use.toCard.name == "slash" then
|
if use.card.name == "jink" and use.toCard and use.toCard.trueName == "slash" then
|
||||||
local effect = use.responseToEvent
|
local effect = use.responseToEvent
|
||||||
return effect.from == player.id
|
return effect.from == player.id
|
||||||
end
|
end
|
||||||
|
@ -860,7 +860,7 @@ local axeSkill = fk.CreateTriggerSkill{
|
||||||
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
|
if not player:hasSkill(self.name) then return end
|
||||||
local effect = data ---@type CardEffectEvent
|
local effect = data ---@type CardEffectEvent
|
||||||
return effect.card.name == "slash" and effect.from == player.id
|
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
|
||||||
|
@ -887,7 +887,7 @@ local halberdAudio = fk.CreateTriggerSkill{
|
||||||
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
|
||||||
data.card.name == "slash" and #TargetGroup:getRealTargets(data.tos) > 1
|
data.card.trueName == "slash" and #TargetGroup:getRealTargets(data.tos) > 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
|
||||||
|
@ -899,7 +899,7 @@ local halberdSkill = fk.CreateTargetModSkill{
|
||||||
name = "#halberd_skill",
|
name = "#halberd_skill",
|
||||||
attached_equip = "halberd",
|
attached_equip = "halberd",
|
||||||
extra_target_func = function(self, player, skill, card)
|
extra_target_func = function(self, player, skill, card)
|
||||||
if player:hasSkill(self.name) and skill.name == "slash_skill"
|
if player:hasSkill(self.name) and skill.trueName == "slash_skill"
|
||||||
and #player:getCardIds(Player.Hand) == 1
|
and #player:getCardIds(Player.Hand) == 1
|
||||||
and player:getCardIds(Player.Hand)[1] == card.id then
|
and player:getCardIds(Player.Hand)[1] == card.id then
|
||||||
return 2
|
return 2
|
||||||
|
@ -926,7 +926,7 @@ local kylinBowSkill = fk.CreateTriggerSkill{
|
||||||
events = {fk.DamageCaused},
|
events = {fk.DamageCaused},
|
||||||
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
|
local ret = target == player and player:hasSkill(self.name) and
|
||||||
data.card and data.card.name == "slash"
|
data.card and data.card.trueName == "slash"
|
||||||
if ret then
|
if ret then
|
||||||
---@type ServerPlayer
|
---@type ServerPlayer
|
||||||
local to = data.to
|
local to = data.to
|
||||||
|
@ -1023,7 +1023,7 @@ local niohShieldSkill = fk.CreateTriggerSkill{
|
||||||
can_trigger = function(self, event, target, player, data)
|
can_trigger = function(self, event, target, player, data)
|
||||||
local effect = data ---@type CardEffectEvent
|
local effect = data ---@type CardEffectEvent
|
||||||
return player.id == effect.to and player:hasSkill(self.name) and
|
return player.id == effect.to and player:hasSkill(self.name) and
|
||||||
effect.card.name == "slash" and effect.card.color == Card.Black
|
effect.card.trueName == "slash" and effect.card.color == Card.Black
|
||||||
end,
|
end,
|
||||||
on_use = function() return true end,
|
on_use = function() return true end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,10 +160,13 @@ RowLayout {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Must manually analyze pattern here
|
||||||
|
let pile_list = cname.split("|")[4];
|
||||||
let pile_data = JSON.parse(Backend.callLuaFunction("GetAllPiles", [selfPhoto.playerid]));
|
let pile_data = JSON.parse(Backend.callLuaFunction("GetAllPiles", [selfPhoto.playerid]));
|
||||||
if (!(pile_data instanceof Array)) {
|
if (pile_list && pile_list !== "." && !(pile_data instanceof Array)) {
|
||||||
for (let pile_name in pile_data) {
|
pile_list = pile_list.split(",");
|
||||||
pile_data[pile_name].forEach(cid => {
|
for (let pile_name of pile_list) {
|
||||||
|
pile_data[pile_name] && pile_data[pile_name].forEach(cid => {
|
||||||
if (JSON.parse(Backend.callLuaFunction(
|
if (JSON.parse(Backend.callLuaFunction(
|
||||||
"CardFitPattern",
|
"CardFitPattern",
|
||||||
[cid, cname]
|
[cid, cname]
|
||||||
|
@ -180,7 +183,7 @@ RowLayout {
|
||||||
handcardAreaItem.enableCards(ids);
|
handcardAreaItem.enableCards(ids);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: expand pile
|
|
||||||
let ids = [], cards = handcardAreaItem.cards;
|
let ids = [], cards = handcardAreaItem.cards;
|
||||||
for (let i = 0; i < cards.length; i++) {
|
for (let i = 0; i < cards.length; i++) {
|
||||||
if (JSON.parse(Backend.callLuaFunction("CanUseCard", [cards[i].cid, Self.id])))
|
if (JSON.parse(Backend.callLuaFunction("CanUseCard", [cards[i].cid, Self.id])))
|
||||||
|
@ -251,10 +254,9 @@ RowLayout {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let pile_data = JSON.parse(Backend.callLuaFunction("GetAllPiles", [selfPhoto.playerid]));
|
let pile = Backend.callLuaFunction("GetExpandPileOfSkill", [pending_skill]);
|
||||||
if (!(pile_data instanceof Array)) {
|
let pile_ids = JSON.parse(Backend.callLuaFunction("GetPile", [selfPhoto.playerid, pile]));
|
||||||
for (let pile_name in pile_data) {
|
pile_ids.forEach(cid => {
|
||||||
pile_data[pile_name].forEach(cid => {
|
|
||||||
if (JSON.parse(Backend.callLuaFunction(
|
if (JSON.parse(Backend.callLuaFunction(
|
||||||
"ActiveCardFilter",
|
"ActiveCardFilter",
|
||||||
[pending_skill, cid, pendings, targets]
|
[pending_skill, cid, pendings, targets]
|
||||||
|
@ -265,8 +267,6 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handcardAreaItem.enableCards(enabled_cards);
|
handcardAreaItem.enableCards(enabled_cards);
|
||||||
|
|
||||||
|
|
|
@ -195,8 +195,8 @@ int PackMan::clone(const QString &u) {
|
||||||
int error = git_clone(&repo, url.toUtf8(), fileName.toUtf8(), &opt);
|
int error = git_clone(&repo, url.toUtf8(), fileName.toUtf8(), &opt);
|
||||||
if (error < 0) {
|
if (error < 0) {
|
||||||
GIT_FAIL;
|
GIT_FAIL;
|
||||||
QDir(fileName).removeRecursively();
|
// QDir(fileName).removeRecursively();
|
||||||
QDir(".").rmdir(fileName);
|
// QDir(".").rmdir(fileName);
|
||||||
} else {
|
} else {
|
||||||
if (Backend == nullptr)
|
if (Backend == nullptr)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
Loading…
Reference in New Issue