From 54fc69d9ef81085ef649f52940d4d815f3236eb8 Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 24 Dec 2020 20:33:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=B3=95=E6=9C=AF=E6=88=96=E9=9A=8F=E4=BB=8E?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/assistant.util.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/assistant.util.ts b/src/utils/assistant.util.ts index 440b68c..170b406 100644 --- a/src/utils/assistant.util.ts +++ b/src/utils/assistant.util.ts @@ -153,15 +153,16 @@ let assistantUtil = { let effectMap: Map = global.$cfg.get(BaseConst.EFFECTCARD); let spellCards: Card[] = []; // 优先取随从 - let petCount = 1; + let petCount = 0; for (let [,pet] of dstPlayer.pets) { - if (pet.state == 1) petCount ++; + if (pet.state == 1 && !pet.isHero) petCount ++; } let noMorePet = petCount >= new GameEnv().maxPlayerPetCount; + let noPet = Math.random2(0, 100) > 70; for (let card of cards) { let effect = effectMap.get(card.effect); // if (effect.type_id == EffectType.unit && dstPlayer.unitCfgs.has(card.effect + '')) { - if (card.type == CardType.variable_unit && !noMorePet) { + if (card.type == CardType.variable_unit && !noMorePet && !noPet) { result = card; break; } else if (effect.type_id == EffectType.skill) {