修正生成卡组失败的bug
This commit is contained in:
parent
79f827166e
commit
f4ca2d46c2
@ -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()];
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user