调整添加卡片至用户的方法的日志
This commit is contained in:
parent
36bbf13410
commit
d44f00c29f
@ -22,7 +22,6 @@ export class OnJoinCommand extends Command<CardGameState, {
|
||||
if (count >= this.room.maxClients) {
|
||||
return;
|
||||
}
|
||||
let isRobot = false;
|
||||
// begin of set seat and team
|
||||
let idx = count;
|
||||
let seatSet = new Set([0,1,2,3])
|
||||
@ -50,12 +49,7 @@ export class OnJoinCommand extends Command<CardGameState, {
|
||||
let high = (this.room.score * fc.get(70035).number / 100) | 0;
|
||||
uinfo = await randomUserInfo(low, high, accounts)
|
||||
}
|
||||
if (accountId && accountId == 'robot') {
|
||||
isRobot = true;
|
||||
accountId = uinfo.accountid
|
||||
} else if (!accountId) {
|
||||
accountId = uinfo.accountid
|
||||
}
|
||||
accountId = uinfo.accountid
|
||||
|
||||
const team = (idx == 1 || idx == 2) ? 1 : 0;
|
||||
// end of set seat and team
|
||||
|
@ -219,6 +219,7 @@ let gameUtil = {
|
||||
},
|
||||
pushInPlayerCards(player: Player, cards: Card[]) {
|
||||
const effectMap = global.$cfg.get(BaseConst.EFFECTCARD);
|
||||
cardLog(`add: ${player.id} ${cards.map(o => [o.id, o.effect, o.type])}`)
|
||||
for (let card of cards) {
|
||||
// 如果card的type == 11, 说明是自选随从卡, 则替换成玩家牌组中的卡
|
||||
if (card.type == CardType.variable_unit && effectMap.get(card.effect).type_id == EffectType.variable_unit) {
|
||||
@ -227,7 +228,6 @@ let gameUtil = {
|
||||
player.cards.set(card.id + '', card);
|
||||
player.cardSet.add(card.id + '');
|
||||
}
|
||||
cardLog(`add: ${player.id} ${cards.map(o => [o.id, o.effect, o.type])}`)
|
||||
},
|
||||
/**
|
||||
* 往玩家的卡组里添加卡
|
||||
|
Loading…
x
Reference in New Issue
Block a user