效果卡和点数翻倍卡也带上效果id
This commit is contained in:
parent
2275361655
commit
de583e3351
@ -40,5 +40,5 @@ gameServer.define('general_room', GeneralRoom);
|
||||
// register colyseus monitor AFTER registering your room handlers
|
||||
app.use("/colyseus", monitor());
|
||||
|
||||
gameServer.listen(port);
|
||||
gameServer.listen(port).then(()=>{});
|
||||
console.log(`Listening on ws://localhost:${ port }`)
|
||||
|
@ -19,16 +19,19 @@ let gameUtil = {
|
||||
|
||||
let countMap: Map<number, number> = new Map();
|
||||
let localId = 1;
|
||||
for (let [id, cfg] of numCfgMap) {
|
||||
for (let [, cfg] of numCfgMap) {
|
||||
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);
|
||||
cards.push(card);
|
||||
} else {
|
||||
let card = new Card(localId ++, cfg.point, cfg.type_id, 0);
|
||||
cards.push(card);
|
||||
}
|
||||
let effid = this.getRandomEffect(cfg.weightArr, effCfgMap, countMap);
|
||||
let card = new Card(localId ++, cfg.point, cfg.type_id, effid);
|
||||
cards.push(card);
|
||||
// if (cfg.type_id == 1) {
|
||||
// let effid = this.getRandomEffect(cfg.weightArr, effCfgMap, countMap);
|
||||
// let card = new Card(localId ++, cfg.point, cfg.type_id, effid);
|
||||
// cards.push(card);
|
||||
// } else {
|
||||
// let card = new Card(localId ++, cfg.point, cfg.type_id, 0);
|
||||
// cards.push(card);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user