mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
parent
2f7d7d4a96
commit
3a207442f4
|
@ -330,6 +330,7 @@ Item {
|
|||
dashboard.disableSkills();
|
||||
dashboard.retractAllPiles();
|
||||
selected_targets = [];
|
||||
autoPending = false;
|
||||
|
||||
if (popupBox.item != null) {
|
||||
popupBox.item.finished();
|
||||
|
@ -348,6 +349,7 @@ Item {
|
|||
dashboard.enableSkills();
|
||||
progress.visible = true;
|
||||
okCancel.visible = true;
|
||||
autoPending = false;
|
||||
endPhaseButton.visible = true;
|
||||
respond_play = false;
|
||||
}
|
||||
|
@ -379,6 +381,7 @@ Item {
|
|||
dashboard.disableSkills();
|
||||
progress.visible = true;
|
||||
respond_play = false;
|
||||
autoPending = false;
|
||||
roomScene.okCancel.visible = false;
|
||||
roomScene.okButton.enabled = false;
|
||||
roomScene.cancelButton.enabled = false;
|
||||
|
|
|
@ -187,9 +187,15 @@ function table:contains(element)
|
|||
end
|
||||
|
||||
function table:shuffle()
|
||||
for i = #self, 2, -1 do
|
||||
local j = math.random(i)
|
||||
self[i], self[j] = self[j], self[i]
|
||||
if #self == 2 then
|
||||
if math.random() < 0.5 then
|
||||
self[1], self[2] = self[2], self[1]
|
||||
end
|
||||
else
|
||||
for i = #self, 2, -1 do
|
||||
local j = math.random(i)
|
||||
self[i], self[j] = self[j], self[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
---@field public discard_pile integer[] @ 弃牌堆,也是卡牌id的数组
|
||||
---@field public processing_area integer[] @ 处理区,依然是卡牌id数组
|
||||
---@field public void integer[] @ 从游戏中除外区,一样的是卡牌id数组
|
||||
---@field public general_pile string[] @ 武将牌堆,这是武将名的数组
|
||||
---@field public card_place table<integer, CardArea> @ 每个卡牌的id对应的区域,一张表
|
||||
---@field public owner_map table<integer, integer> @ 每个卡牌id对应的主人,表的值是那个玩家的id,可能是nil
|
||||
---@field public status_skills Skill[] @ 这个房间中含有的状态技列表
|
||||
|
@ -80,6 +81,7 @@ function Room:initialize(_room)
|
|||
self.discard_pile = {}
|
||||
self.processing_area = {}
|
||||
self.void = {}
|
||||
self.general_pile = {}
|
||||
self.card_place = {}
|
||||
self.owner_map = {}
|
||||
self.status_skills = {}
|
||||
|
@ -803,7 +805,7 @@ function Room:notifyMoveCards(players, card_moves, forceVisible)
|
|||
-- if move is relevant to player's hands or equips, it should be open
|
||||
-- cards move from/to equip/judge/discard/processing should be open
|
||||
|
||||
if not (move.moveVisible or forceVisible or containArea(move.toArea, move.to and p:isBuddy(move.to))) then
|
||||
if not (move.moveVisible or forceVisible or containArea(move.toArea, move.to and p.isBuddy and p:isBuddy(move.to))) then
|
||||
for _, info in ipairs(move.moveInfo) do
|
||||
if not containArea(info.fromArea, move.from == p.id) then
|
||||
info.cardId = -1
|
||||
|
|
Loading…
Reference in New Issue
Block a user