Merge branch 'master' of http://git.kingsome.cn/node/card_svr
This commit is contained in:
commit
e277e8006f
@ -14,7 +14,7 @@ export class SelectPetCommand extends Command<CardGameState, {client: Client,
|
||||
pos: number,
|
||||
effCards: number[]
|
||||
}> {
|
||||
execute({client, cardId, playerId, pos, effCards} = this.payload) {
|
||||
async execute({client, cardId, playerId, pos, effCards} = this.payload) {
|
||||
let sessionId = client.sessionId;
|
||||
let player = this.state.players.get(sessionId);
|
||||
let ap = 0;
|
||||
@ -74,12 +74,6 @@ export class SelectPetCommand extends Command<CardGameState, {client: Client,
|
||||
let newCount = player.extraTime - Math.min(count, 0);
|
||||
player.extraTime = Math.max(newCount, 0);
|
||||
}
|
||||
// if (this.room.mainClock?.active) {
|
||||
// let count = this.room.mainClock.elapsedTime - singleton(GameEnv).playerActTime * 1000;
|
||||
// let newCount = player.extraTime - count;
|
||||
// player.extraTime = Math.max(newCount, 0);
|
||||
// this.room.mainClock.clear();
|
||||
// }
|
||||
|
||||
let dstplayer = this.state.players.get(playerId);
|
||||
let dstpet;
|
||||
@ -88,8 +82,8 @@ export class SelectPetCommand extends Command<CardGameState, {client: Client,
|
||||
}
|
||||
let cardpoint = moreAp + ap;
|
||||
let data = {srcplayer: player, card: targetCard.effect, cardpoint, eff_cnt, dstplayer, dstpet, dbpt_cnt}
|
||||
this.room.battleMan.useCard(data);
|
||||
//TODO:: 增加技能延时
|
||||
let time = this.room.battleMan.useCard(data);
|
||||
await this.delay(time);
|
||||
return [new TurnEndCommand()];
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user