修改获取卡组随从的逻辑
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) {
|
||||
let weight = 0;
|
||||
let effectId;
|
||||
for (let [,eff] of effectMap) {
|
||||
if (eff.stageunit_id == unitId) {
|
||||
weight = eff.weight;
|
||||
effectId = eff.id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!effectId) {
|
||||
const eff = effectMap.get(unitId)
|
||||
if (!eff) {
|
||||
error(`未找到效果卡的配置: ${unitId}`);
|
||||
}
|
||||
let weight = eff.weight;
|
||||
let effectId = eff.id;
|
||||
player.unitCfgs.set(effectId+'', weight);
|
||||
}
|
||||
this.room.battleMan.updatePlayer(player.id, player);
|
||||
|
Loading…
x
Reference in New Issue
Block a user