feat(稷下学宫): c67747d87到5ff932e83

This commit is contained in:
luying
2023-09-04 14:48:16 +08:00
parent 9b391ef61f
commit 58e58a8a38
16 changed files with 10586 additions and 9645 deletions

View File

@@ -44,7 +44,7 @@ export class HandleAddCard {
cards.push({ index, cardCode, cardId });
}
let charaCode = genCode(8);
this.addCharas.push({ ...this.getCommonParam(), cards, charaCode, charaId: id, maxHp, hp: maxHp, ap: 0, shield: 0, roundSkill: 0, apSkill: 0 });
this.addCharas.push({ ...this.getCommonParam(), cards, charaCode, charaId: id, maxHp, hp: maxHp, ap: 0, shield: 0, others: '', roundSkill: 0, apSkill: 0 });
return charaCode;
}
@@ -71,7 +71,7 @@ export class HandleAddCard {
public pushHolyCard(id: number) {
let cardCode = genCode(8);
this.addHolyCards.push({
...this.getCommonParam(), cardCode, cardId: id, type: ROUGE_LIKE_CARD_TYPE.HOLY, useCount: this.getHolyUseCount(id)
...this.getCommonParam(), cardCode, cardId: id, type: ROUGE_LIKE_CARD_TYPE.HOLY, useCount: 0
});
return cardCode
}
@@ -138,7 +138,8 @@ export class HandleAddCard {
await RougelikeCharaModel.bulkWriteUpdate([...charas.values()]);
charasMap = new Map([...charasMap, ...charas])
}
if (cards && Object.entries(cards).length > 0) {
if (cards && cards.size > 0) {
await RougelikeCardModel.bulkWriteUpdate([...cards.values()])
cardsMap = new Map([...cardsMap, ...cards])
}
}