修改获取卡组随从的逻辑
This commit is contained in:
parent
2170e80fec
commit
05f1ff2398
@ -74,18 +74,12 @@ export class SelectHeroCommand extends Command<CardGameState, { client: Client,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let unitId of units) {
|
for (let unitId of units) {
|
||||||
let weight = 0;
|
const eff = effectMap.get(unitId)
|
||||||
let effectId;
|
if (!eff) {
|
||||||
for (let [,eff] of effectMap) {
|
|
||||||
if (eff.stageunit_id == unitId) {
|
|
||||||
weight = eff.weight;
|
|
||||||
effectId = eff.id;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!effectId) {
|
|
||||||
error(`未找到效果卡的配置: ${unitId}`);
|
error(`未找到效果卡的配置: ${unitId}`);
|
||||||
}
|
}
|
||||||
|
let weight = eff.weight;
|
||||||
|
let effectId = eff.id;
|
||||||
player.unitCfgs.set(effectId+'', weight);
|
player.unitCfgs.set(effectId+'', weight);
|
||||||
}
|
}
|
||||||
this.room.battleMan.updatePlayer(player.id, player);
|
this.room.battleMan.updatePlayer(player.id, player);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user