Merge branch 'second' of http://git.kingsome.cn/node/card_svr into second
This commit is contained in:
commit
26535ddb69
@ -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