修正生成卡组失败的bug

This commit is contained in:
zhl 2020-12-03 21:10:45 +08:00
parent 79f827166e
commit f4ca2d46c2
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ export class SelectPetCommand extends Command<CardGameState, {client: Client,
dstpet = dstplayer.pets.get(pos+'');
}
let cardpoint = moreAp;
//TODO:
let data = {srcplayer: player, card: targetCard.effect, cardpoint, eff_cnt, dstplayer, dstpet}
this.room.battleMan.useCard(data);
return [new TurnEndCommand()];

View File

@ -18,7 +18,7 @@ let gameUtil = {
let countMap: Map<number, number> = new Map();
let localId = 1;
for (let [id, cfg] of numCfgMap) {
for (let i = 0; i < cfg.count; i++) {
for (let i = 0; i <= cfg.count; i++) {
if (cfg.type_id == 1) {
let effid = this.getRandomEffect(cfg.weightArr, effCfgMap, countMap);
let card = new Card(localId ++, cfg.point, cfg.type_id, effid);