public async Task CreatePartyMemberWithCraftEssence()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            List <PartyMember> party = new List <PartyMember>();

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses resolvedClasses = AutofacUtility.ResolveScope(scope);

                List <EquipBasicJson> equipBasicJsonList = await resolvedClasses.AtlasAcademyClient.GetListBasicEquipInfo();

                EquipBasicJson equipBasicJson    = equipBasicJsonList.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                List <ServantBasicJson> basicJsonList = await resolvedClasses.AtlasAcademyClient.GetListBasicServantInfo();

                ServantBasicJson servantBasicJson = basicJsonList.Find(s => s.Id.ToString() == WireMockUtility.DANTES_AVENGER);
                PartyMember      partyMember      = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses, 1, false, chaldeaSuperscope);

                using (new AssertionScope())
                {
                    partyMember.Servant.ServantBasicInfo.Id.ToString().Should().Be(WireMockUtility.DANTES_AVENGER);
                    partyMember.EquippedCraftEssence.Mlb.Should().BeTrue();
                    partyMember.NpCharge.Should().Be(100.0f);
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Get the craft essence info
 /// </summary>
 /// <param name="craftEssenceJson">Basic information for a craft essence</param>
 /// <param name="level">The level of the craft essence</param>
 /// <param name="isMlb">Max limit broken craft essence</param>
 /// <returns></returns>
 public static CraftEssence GetCraftEssence(EquipBasicJson craftEssenceJson, int level = 1, bool isMlb = false)
 {
     return(new CraftEssence
     {
         CraftEssenceLevel = level,
         Mlb = isMlb,
         CraftEssenceInfo = craftEssenceJson
     });
 }
예제 #3
0
        public async Task GetListBasicEquipInfo()
        {
            _wiremockFixture.CheckIfMockServerInUse();

            List <EquipBasicJson> mockResponse = new List <EquipBasicJson>();
            EquipBasicJson        json         = new EquipBasicJson
            {
                Id = 0
            };

            mockResponse.Add(json);

            _wiremockFixture.MockServer
            .Given(Request.Create().WithPath($"/export/{REGION}/basic_equip.json").UsingGet())
            .RespondWith(Response.Create().WithStatusCode(200).WithHeader(CONTENT_TYPE_HEADER, CONTENT_TYPE_APPLICATION_JSON).WithBodyAsJson(mockResponse));

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses         resolvedClasses = AutofacUtility.ResolveScope(scope);
                List <EquipBasicJson> response        = await resolvedClasses.AtlasAcademyClient.GetListBasicEquipInfo();

                response.First().Should().BeEquivalentTo(json);
            }
        }
        public async Task LancelotLoopDoubleSkadi()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson    = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.FRAGMENT_2004_ID)
                };

                #region Party Data
                // Lancelot (Berserker)
                ServantBasicJson basicJson     = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.LANCELOT_BERSERKER);
                PartyMember      partyLancelot = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaSuperscope);

                partyLancelot.Servant.SkillLevels = new int[] { 6, 8, 10 };
                party.Add(partyLancelot);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 2, false);

                party.Add(partySkadi);

                // Skadi Support
                PartyMember partySkadiSupport = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySkadiSupport);
                #endregion

                List <EnemyMob> enemyMobs = GetGardenMob();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 1);        // Fragment of 2004's NP gain buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 1, party, enemyMobs, 1); // Skadi (support) quick up buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyLancelot).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyLancelot.Servant.ServantBasicInfo.Name} has {partyLancelot.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1);    // Skadi NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyLancelot, 3, party, enemyMobs, 1); // Zerkalot NP gain up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyLancelot).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyLancelot.Servant.ServantBasicInfo.Name} has {partyLancelot.NpCharge}% charge after the 2nd fight");

                partyLancelot.NpCharge.Should().Be(46);

                // NOTE: To avoid bottom line 46%, card against mecha and NP lancelot to get consistent NP
                partyLancelot.NpCharge = 49.0f;

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);        // Fragment of 2004's NP strength buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 3, party, enemyMobs, 1); // Skadi NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 2, party, enemyMobs, 1); // Skadi enemy defense down

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyLancelot).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                _output.WriteLine($"{partyLancelot.Servant.ServantBasicInfo.Name} has {partyLancelot.NpCharge}% charge after the 3rd fight");

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(0);
                    partyLancelot.NpCharge.Should().Be(36);
                }
            }
        }
        public async Task AtalanteNp1LoopDoubleSkadiArash()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson         = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.HOLY_NIGHT_SUPPER_CE);
                CraftEssence   chaldeaHolyNightSupper = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                equipBasicJson = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence chaldeaKscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 20);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.PLUGSUIT_ID)
                };

                #region Party Data
                // Atalante (Archer)
                ServantBasicJson basicJson     = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ATALANTE_ARCHER);
                PartyMember      partyAtalante = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, false, chaldeaHolyNightSupper);

                partyAtalante.Servant.SkillLevels = new int[] { 10, 4, 10 };
                party.Add(partyAtalante);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partySkadi);

                // Skadi Support
                PartyMember partySkadiSupport = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySkadiSupport);

                // Arash
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ARASH_ARCHER);
                PartyMember partyArash = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaKscope);

                party.Add(partyArash);
                #endregion

                List <EnemyMob> enemyMobs = GetGardenMob();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partyAtalante, 3, party, enemyMobs, 1);     // Atalante 3T NP gain up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 1, party, enemyMobs, 1); // Skadi (support) quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 3, party, enemyMobs, 1); // Skadi (support) NP charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAtalante).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 3, 3, 4); // Swap Skadi (support) with Arash

                resolvedClasses.ServantSkillActivation.SkillActivation(partyArash, 3, party, enemyMobs);

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyArash).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                List <EnemyMob> waveSurvivors = enemyMobs.FindAll(e => e.WaveNumber == WaveNumberEnum.Second);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                waveSurvivors.Count(h => h.Health.NearlyEqual(11842.398f)).Should().Be(1);
                enemyMobs.RemoveAll(e => e.WaveNumber == WaveNumberEnum.Second);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 2nd fight");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyAtalante, 1, party, enemyMobs, 1);     // Atalante party quick up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1);        // Skadi NP charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down

                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);        // Plugsuit attack up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAtalante).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 3rd fight");

                FrequentlyUsed.ShowSurvivingEnemyHealth(enemyMobs, _output);

                enemyMobs.Count(h => h.Health.NearlyEqual(5291.2344f)).Should().Be(1);
            }
        }
        public async Task FinalWaveAtalanteNp1()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson         = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.HOLY_NIGHT_SUPPER_CE);
                CraftEssence   chaldeaHolyNightSupper = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.PLUGSUIT_ID)
                };

                #region Party Data
                // Atalante (Archer)
                ServantBasicJson basicJson     = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ATALANTE_ARCHER);
                PartyMember      partyAtalante = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, false, chaldeaHolyNightSupper);

                partyAtalante.Servant.SkillLevels = new int[] { 10, 8, 10 };
                party.Add(partyAtalante);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partySkadi);

                // Skadi Support
                PartyMember partySkadiSupport = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySkadiSupport);

                // Waver
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.WAVER_CASTER);
                PartyMember partyWaver = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partyWaver);
                #endregion

                List <EnemyMob> enemyMobs = GetGardenMob();

                /* Simulate final phase */
                enemyMobs.RemoveAll(e => e.WaveNumber != WaveNumberEnum.Third);

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyAtalante, 1, party, enemyMobs, 1);     // Atalante party quick up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1);        // Skadi NP charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 1, party, enemyMobs, 1); // Skadi (support) quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 3, party, enemyMobs, 1); // Skadi (support) NP charge

                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 3, 3, 4);  // Swap Skadi (support) with Waver
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);        // Plugsuit attack up

                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 1, party, enemyMobs, 1);        // Waver crit up to Atalante with 30% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 2, party, enemyMobs, 1);        // Waver defense up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 3, party, enemyMobs, 1);        // Waver attack up to party with 10% charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAtalante).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 3rd fight");

                FrequentlyUsed.ShowSurvivingEnemyHealth(enemyMobs, _output);

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(0);
                }
            }
        }
        public async Task ArcherNodeValkyrieSkadiWaver()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson         = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.HOLY_NIGHT_SUPPER_CE);
                CraftEssence   chaldeaHolyNightSupper = FrequentlyUsed.GetCraftEssence(equipBasicJson, 85, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.PLUGSUIT_ID)
                };

                #region Party Data
                // Valkyrie
                ServantBasicJson basicJson     = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.VALKYRIE_LANCER);
                PartyMember      partyValkyrie = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 2, false, chaldeaHolyNightSupper);

                party.Add(partyValkyrie);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partySkadi);

                // Waver
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.WAVER_CASTER);
                PartyMember partyWaver = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partyWaver);

                // Skadi Support
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySupportSkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySupportSkadi);
                #endregion

                List <EnemyMob> enemyMobs = GetEnemyChristmas2018();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partyValkyrie, 1, party, enemyMobs);        // Valkyrie quick and NP STR up
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 1, party, enemyMobs, 1);        // Waver crit damage on Valkyrie with 30% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 2, party, enemyMobs, 1);        // Waver defense up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 3, party, enemyMobs, 1);        // Waver attack up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 3, 3, 4);  // Plugsuit swap Waver for Skadi (support)
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 1, party, enemyMobs, 1); // Skadi quick up buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyValkyrie).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyValkyrie.Servant.ServantBasicInfo.Name} has {partyValkyrie.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(mysticCode);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1); // Skadi NP charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyValkyrie).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyValkyrie.Servant.ServantBasicInfo.Name} has {partyValkyrie.NpCharge}% charge after the 2nd fight");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(mysticCode);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs);           // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 2, party, enemyMobs);    // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 3, party, enemyMobs, 1); // Skadi (support) NP charge
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);        // Plugsuit ATK up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyValkyrie).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                enemyMobs.Count.Should().Be(0);
            }
        }
        public async Task ArcherNodeParvatiDoubleSkadiByReference()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                // Reference: https://www.youtube.com/watch?v=oBs_YT1ac-Y
                EquipBasicJson equipBasicJson    = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 7,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.ARTIC_ID)
                };

                #region Party Data
                // Parvati
                ServantBasicJson servantBasicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.PARVATI_LANCER);
                PartyMember      partyParvati     = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses, 2, false, chaldeaSuperscope);

                partyParvati.Servant.SkillLevels = new int[] { 10, 4, 4 }; // adjust to the reference video

                party.Add(partyParvati);

                // Skadi
                servantBasicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses);

                partySkadi.Servant.SkillLevels = new int[] { 7, 7, 8 }; // adjust to the reference video

                party.Add(partySkadi);

                // Skadi Support
                servantBasicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySupportSkadi = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses, 1, true);

                party.Add(partySupportSkadi);
                #endregion

                List <EnemyMob> enemyMobs = GetEnemyChristmas2018();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 1, party, enemyMobs, 1); // Skadi (support) quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 1, party, enemyMobs, 1);      // Parvati quick up buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 1st fight\n");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1); // Skadi NP buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 2nd fight");

                List <EnemyMob> waveSurvivors = enemyMobs.FindAll(w => w.WaveNumber == WaveNumberEnum.Second);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                waveSurvivors.Count.Should().Be(1);
                waveSurvivors.Any(h => h.Health < 30000.0f).Should().BeTrue();

                // To stay in line with the reference video
                enemyMobs.RemoveAll(w => w.WaveNumber == WaveNumberEnum.Second);
                _output.WriteLine($"Assume carding kills last monster...\n");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 2, party, enemyMobs, 1);      // Parvati ATK, DEF, Star Drop Rate, & Crit Rate Up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 3, party, enemyMobs, 1); // Skadi (support) NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 2, party, enemyMobs, 1);        // Artic ATK & NP STR up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                waveSurvivors = enemyMobs.FindAll(w => w.WaveNumber == WaveNumberEnum.Third);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                using (new AssertionScope())
                {
                    waveSurvivors.Count.Should().Be(1);
                    waveSurvivors.Any(h => h.Health < 21000.0f).Should().BeTrue();
                }
            }
        }
        public async Task ArcherNodeArashParvatiMerlinSkadi()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson         = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.HOLY_NIGHT_SUPPER_CE);
                CraftEssence   chaldeaHolyNightSupper = FrequentlyUsed.GetCraftEssence(equipBasicJson, 88, true);

                equipBasicJson = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence chaldeaKscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 20, false);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.FRAGMENT_2004_ID)
                };

                #region Party Data
                // Arash
                ServantBasicJson basicJson  = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ARASH_ARCHER);
                PartyMember      partyArash = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaHolyNightSupper);

                partyArash.Servant.SkillLevels = new int[] { 6, 6, 10 };
                party.Add(partyArash);

                // Parvati
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.PARVATI_LANCER);
                PartyMember partyParvati = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 2, false, chaldeaKscope);

                party.Add(partyParvati);

                // Merlin
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.MERLIN_CASTER);
                PartyMember partyMerlin = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partyMerlin);

                // Skadi Support
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadiSupport = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySkadiSupport);
                #endregion

                List <EnemyMob> enemyMobs = GetEnemyChristmas2018();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partyArash, 3, party, enemyMobs);  // Arash NP charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMerlin, 1, party, enemyMobs); // Merlin ATK UP and NP charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyArash).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 1, party, enemyMobs, 2); // Skadi (support) quick buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 1, party, enemyMobs);         // Parvati quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 2);        // Fragment NP gain buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 2nd fight");

                List <EnemyMob> waveSurvivors = enemyMobs.FindAll(w => w.WaveNumber == WaveNumberEnum.Second);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                waveSurvivors.Count(h => h.Health.NearlyEqual(39286.863f)).Should().Be(1);

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(mysticCode);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 2, party, enemyMobs);         // Parvati ATK, DEF, Star Drop Rate, & Crit Rate Up
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 3, party, enemyMobs, 2);      // Parvati NP charge to self
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 2, party, enemyMobs);    // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 3, party, enemyMobs, 2); // Skadi NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 2);        // Fragment NP STR up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                waveSurvivors = enemyMobs.FindAll(w => w.WaveNumber == WaveNumberEnum.Third);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(2);
                    waveSurvivors.Count(h => h.Health.NearlyEqual(46759.25f)).Should().Be(1);
                }
            }
        }
        public async Task ArcherNodeParvatiDoubleSkadiWaver5CraftEssence()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson         = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.HOLY_NIGHT_SUPPER_CE);
                CraftEssence   chaldeaHolyNightSupper = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.PLUGSUIT_ID)
                };

                #region Party Data
                // Parvati
                ServantBasicJson basicJson    = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.PARVATI_LANCER);
                PartyMember      partyParvati = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 2, false, chaldeaHolyNightSupper);

                party.Add(partyParvati);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partySkadi);

                // Skadi Support
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySupportSkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySupportSkadi);

                // Waver
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.WAVER_CASTER);
                PartyMember partyWaver = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partyWaver);
                #endregion

                List <EnemyMob> enemyMobs = GetEnemyChristmas2018();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 1, party, enemyMobs, 1); // Skadi (support) quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 3, party, enemyMobs, 1); // Skadi (support) NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 1, party, enemyMobs, 1);      // Parvati quick up buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 3, 3, 4);  // Plugsuit swap Skadi (support) for Waver
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 1, party, enemyMobs, 1);        // Waver crit damage on Parvati with 30% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 2, party, enemyMobs, 1);        // Waver defense up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 3, party, enemyMobs, 1);        // Waver attack up to party with 10% charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 2nd fight");

                List <EnemyMob> waveSurvivors = enemyMobs.FindAll(w => w.WaveNumber == WaveNumberEnum.Second);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(mysticCode);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);   // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1);   // Skadi NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 2, party, enemyMobs, 1); // Parvati ATK, DEF, Star Drop Rate, & Crit Rate Up
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);   // Plugsuit ATK up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                waveSurvivors = enemyMobs.FindAll(w => w.WaveNumber == WaveNumberEnum.Third);
                FrequentlyUsed.ShowSurvivingEnemyHealth(waveSurvivors, _output);

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(1);
                    waveSurvivors.Any(h => h.Health < 4000.0f).Should().BeTrue();
                }
            }
        }
        public async Task ArcherNodeParvatiDoubleSkadiNoCard()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson    = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.FRAGMENT_2004_ID)
                };

                #region Party Data
                // Parvati
                ServantBasicJson servantBasicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.PARVATI_LANCER);
                PartyMember      partyParvati     = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses, 4, false, chaldeaSuperscope);

                partyParvati.Servant.SkillLevels = new int[] { 9, 8, 10 };

                party.Add(partyParvati);

                // Skadi
                servantBasicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses);

                party.Add(partySkadi);

                // Skadi Support
                servantBasicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySupportSkadi = await FrequentlyUsed.PartyMemberAsync(servantBasicJson, party, resolvedClasses, 1, true);

                party.Add(partySupportSkadi);
                #endregion

                List <EnemyMob> enemyMobs = GetEnemyChristmas2018();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 1, party, enemyMobs, 1); // Skadi (support) quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 1, party, enemyMobs, 1);      // Parvati quick up buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1);   // Skadi NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyParvati, 2, party, enemyMobs, 1); // Parvati ATK, DEF, Star Drop Rate, & Crit Rate Up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyParvati.Servant.ServantBasicInfo.Name} has {partyParvati.NpCharge}% charge after the 2nd fight");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 3, party, enemyMobs, 1); // Skadi (support) NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);        // Fragment of 2004 NP STR up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySupportSkadi, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyParvati).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                enemyMobs.Count.Should().Be(0);
            }
        }
        public async Task PlugsuitWaverAstolfoDailyDoors()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.PLUGSUIT_ID)
                };

                #region Craft Essence Data
                EquipBasicJson equipBasicJson         = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.HOLY_NIGHT_SUPPER_CE);
                CraftEssence   chaldeaHolyNightSupper = FrequentlyUsed.GetCraftEssence(equipBasicJson, 33, true);

                equipBasicJson = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);
                #endregion

                #region Party Data
                // Waver
                ServantBasicJson basicJson  = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.WAVER_CASTER);
                PartyMember      partyWaver = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 2);

                party.Add(partyWaver);

                // Astolfo Rider
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ASTOLFO_RIDER);
                PartyMember partyAstolfo = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaHolyNightSupper);

                partyAstolfo.Servant.ServantLevel = 100;

                party.Add(partyAstolfo);

                // Spartacus Berserker
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SPARTACUS_BERSERKER);
                PartyMember partySpartacus = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaSuperscope);

                party.Add(partySpartacus);

                // Waver Support
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.WAVER_CASTER);
                PartyMember partyMemberSupportCaster = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partyMemberSupportCaster);
                #endregion

                /* Node data */
                #region First Wave
                EnemyMob doorSaint1 = new EnemyMob
                {
                    Id            = 0,
                    Name          = "Door of the Saint",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 14464.0f,
                    Traits        = new List <string>()
                };

                EnemyMob doorChampion1 = new EnemyMob
                {
                    Id            = 1,
                    Name          = "Door of the Champion",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 23716.0f,
                    Traits        = new List <string>()
                };

                EnemyMob doorSaint2 = new EnemyMob
                {
                    Id            = 2,
                    Name          = "Door of the Saint",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 14464.0f,
                    Traits        = new List <string>()
                };
                #endregion

                #region Second Wave
                EnemyMob doorSaint3 = new EnemyMob
                {
                    Id            = 3,
                    Name          = "Door of the Saint",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 14464.0f,
                    Traits        = new List <string>()
                };

                EnemyMob doorChampion2 = new EnemyMob
                {
                    Id            = 4,
                    Name          = "Door of the Champion",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 23716.0f,
                    Traits        = new List <string>()
                };

                EnemyMob doorChampion3 = new EnemyMob
                {
                    Id            = 5,
                    Name          = "Door of the Champion",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 23716.0f,
                    Traits        = new List <string>()
                };
                #endregion

                #region Third Wave
                EnemyMob doorChampion4 = new EnemyMob
                {
                    Id            = 6,
                    Name          = "Door of the Champion",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 29596.0f,
                    Traits        = new List <string>()
                };

                EnemyMob doorChampion5 = new EnemyMob
                {
                    Id            = 7,
                    Name          = "Door of the Champion",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 23716.0f,
                    Traits        = new List <string>()
                };

                EnemyMob doorChampion6 = new EnemyMob
                {
                    Id            = 8,
                    Name          = "Door of the Champion",
                    ClassName     = ClassRelationEnum.Caster,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 23716.0f,
                    Traits        = new List <string>()
                };
                #endregion

                List <EnemyMob> enemyMobs = new List <EnemyMob>
                {
                    doorSaint1, doorChampion1, doorSaint2,       // wave 1
                    doorSaint3, doorChampion2, doorChampion3,    // wave 2
                    doorChampion4, doorChampion5, doorChampion6  // wave 3
                };

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partySpartacus).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyAstolfo, 3, party, enemyMobs, 1); // Astolfo NP charge & crit stars & crit damage

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAstolfo).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 1, party, enemyMobs, 2); // Waver crit damage on Astolfo with 30% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 2, party, enemyMobs, 2); // Waver defense up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyWaver, 3, party, enemyMobs, 2); // Waver attack up to party with 10% charge

                _output.WriteLine("--- Before party swap ---");
                foreach (PartyMember partyMember in party)
                {
                    _output.WriteLine(partyMember.Servant.ServantBasicInfo.Name);
                }

                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 3, 3, 4); // Swap spartacus with Waver

                _output.WriteLine("\n--- After party swap ---");
                foreach (PartyMember partyMember in party)
                {
                    _output.WriteLine(partyMember.Servant.ServantBasicInfo.Name);
                }

                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 1, party, enemyMobs, 2); // Waver (support) crit damage on Astolfo with 30% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 2, party, enemyMobs, 2); // Waver (support) defense up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 3, party, enemyMobs, 2); // Waver (support) attack up to party with 10% charge
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 2, party, enemyMobs, 2, 3);            // Stun 3rd enemy on the field with plugsuit

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAstolfo).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(0);
                    party.IndexOf(partyMemberSupportCaster).Should().Be(2);
                    party.IndexOf(partySpartacus).Should().Be(3);
                }
            }
        }
        public async Task FlamingMansionLB2Dantes()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson    = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 4,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.ARTIC_ID)
                };

                #region Party Data
                // Dantes
                ServantBasicJson basicJson           = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.DANTES_AVENGER);
                PartyMember      partyMemberAttacker = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, false, chaldeaSuperscope);

                party.Add(partyMemberAttacker);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partyMemberCaster = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partyMemberCaster);

                // Skadi Support
                PartyMember partyMemberSupportCaster = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partyMemberSupportCaster);
                #endregion

                /* Enemy node data */
                #region First Wave
                EnemyMob walkure1 = new EnemyMob
                {
                    Id            = 0,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 13933.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure2 = new EnemyMob
                {
                    Id            = 1,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 14786.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob muspell1 = new EnemyMob
                {
                    Id            = 2,
                    Name          = "Muspell",
                    ClassName     = ClassRelationEnum.Berserker,
                    AttributeName = AttributeRelationEnum.Earth,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 23456.0f,
                    Traits        = new List <string>
                    {
                        "giant", "humanoid", "genderMale", "superGiant"
                    }
                };
                #endregion

                #region Second Wave
                EnemyMob muspell2 = new EnemyMob
                {
                    Id            = 3,
                    Name          = "Muspell",
                    ClassName     = ClassRelationEnum.Berserker,
                    AttributeName = AttributeRelationEnum.Earth,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 25554.0f,
                    Traits        = new List <string>
                    {
                        "giant", "humanoid", "genderMale", "superGiant"
                    }
                };

                EnemyMob walkure3 = new EnemyMob
                {
                    Id            = 4,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 19047.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob muspell3 = new EnemyMob
                {
                    Id            = 5,
                    Name          = "Muspell",
                    ClassName     = ClassRelationEnum.Berserker,
                    AttributeName = AttributeRelationEnum.Earth,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 26204.0f,
                    Traits        = new List <string>
                    {
                        "giant", "humanoid", "genderMale", "superGiant"
                    }
                };
                #endregion

                #region Third Wave
                EnemyMob walkure4 = new EnemyMob
                {
                    Id            = 6,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 42926.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure5 = new EnemyMob
                {
                    Id            = 7,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 180753.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob muspell4 = new EnemyMob
                {
                    Id            = 8,
                    Name          = "Muspell",
                    ClassName     = ClassRelationEnum.Berserker,
                    AttributeName = AttributeRelationEnum.Earth,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 61289.0f,
                    Traits        = new List <string>
                    {
                        "giant", "humanoid", "genderMale", "superGiant"
                    }
                };
                #endregion

                List <EnemyMob> enemyMobs = new List <EnemyMob>
                {
                    walkure1, walkure2, muspell1, // 1st wave
                    muspell2, walkure3, muspell3, // 2nd wave
                    walkure4, walkure5, muspell4  // 3rd wave
                };

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberCaster, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 1, party, enemyMobs, 1); // Skadi (support) quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberAttacker, 2, party, enemyMobs, 1);      // Dante's 2nd skill

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyMemberAttacker).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyMemberAttacker.Servant.ServantBasicInfo.Name} has {partyMemberAttacker.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberCaster, 3, party, enemyMobs, 1); // Skadi NP buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyMemberAttacker).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyMemberAttacker.Servant.ServantBasicInfo.Name} has {partyMemberAttacker.NpCharge}% charge after the 2nd fight");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 3, party, enemyMobs, 1); // Skadi (support) NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberCaster, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberAttacker, 1, party, enemyMobs, 1);      // Dante's 1st skill
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 2, party, enemyMobs, 1);               // Artic mystic code ATK and NP damage up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyMemberAttacker).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                foreach (EnemyMob enemyMob in enemyMobs.FindAll(e => e.Health > 0.0f))
                {
                    _output.WriteLine($"{enemyMob.Name} has {enemyMob.Health} HP left");
                }

                _output.WriteLine($"{partyMemberAttacker.Servant.ServantBasicInfo.Name} has {partyMemberAttacker.NpCharge}% charge after the 3rd fight");

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(1);
                    enemyMobs.Find(e => e.Health > 0.0f).Health.Should().Be(47025.5f);
                    partyMemberAttacker.NpCharge.Should().Be(52);
                }
            }
        }
        public async Task CastleSnowIceLB2ArashZerkalotJack()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 10,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.FRAGMENT_2004_ID)
                };

                #region Craft Essence Data
                EquipBasicJson equipBasicJson    = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaSuperscope = FrequentlyUsed.GetCraftEssence(equipBasicJson, 100, true);
                CraftEssence   chaldeaMlbKscope  = FrequentlyUsed.GetCraftEssence(equipBasicJson, 30, true);

                equipBasicJson = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.IMAGINARY_ELEMENT_CE);
                CraftEssence chaldeaImaginaryElement = FrequentlyUsed.GetCraftEssence(equipBasicJson, 36, true);
                #endregion

                #region Party Data
                // Lancelot Berserker
                ServantBasicJson basicJson     = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.LANCELOT_BERSERKER);
                PartyMember      partyLancelot = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaSuperscope);

                party.Add(partyLancelot);

                // Arash
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ARASH_ARCHER);
                PartyMember partyArash = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaImaginaryElement);

                party.Add(partyArash);

                // Jack
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.JACK_ASSASSIN);
                PartyMember partyJack = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, false, chaldeaMlbKscope);

                party.Add(partyJack);

                // Skadi Support
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partyMemberSupportCaster = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, false);

                party.Add(partyMemberSupportCaster);
                #endregion

                /* Node data */
                #region First Wave
                EnemyMob walkure1 = new EnemyMob
                {
                    Id            = 0,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 9884.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure2 = new EnemyMob
                {
                    Id            = 1,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 10889.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure3 = new EnemyMob
                {
                    Id            = 2,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.First,
                    Health        = 10664.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };
                #endregion

                #region Second Wave
                EnemyMob walkure4 = new EnemyMob
                {
                    Id            = 3,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 30279.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure5 = new EnemyMob
                {
                    Id            = 4,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 24599.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure6 = new EnemyMob
                {
                    Id            = 5,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Second,
                    Health        = 33264.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };
                #endregion

                #region Third Wave
                EnemyMob walkure7 = new EnemyMob
                {
                    Id            = 6,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 41136.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure8 = new EnemyMob
                {
                    Id            = 7,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 49586.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };

                EnemyMob walkure9 = new EnemyMob
                {
                    Id            = 8,
                    Name          = "Walkure",
                    ClassName     = ClassRelationEnum.Rider,
                    AttributeName = AttributeRelationEnum.Sky,
                    WaveNumber    = WaveNumberEnum.Third,
                    Health        = 180432.0f,
                    Traits        = new List <string>
                    {
                        "divine", "humanoid", "genderFemale"
                    }
                };
                #endregion

                List <EnemyMob> enemyMobs = new List <EnemyMob>
                {
                    walkure1, walkure2, walkure3, // 1st wave
                    walkure4, walkure5, walkure6, // 2nd wave
                    walkure7, walkure8, walkure9  // 3rd wave
                };

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partyArash, 3, party, enemyMobs, 1); // Arash NP charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyArash).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyLancelot, 3, party, enemyMobs, 1);            // Zerkalot NP gain up
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 1, party, enemyMobs, 1); // Skadi quick buff up

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyLancelot).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyLancelot.Servant.ServantBasicInfo.Name} has {partyLancelot.NpCharge}% charge after the 2nd fight");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partyMemberSupportCaster, 3, party, enemyMobs, 1); // Skadi (support) NP buff
                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 1, party, enemyMobs, 1);               // Fragment of 2004's NP strength buff
                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyLancelot).Should().BeTrue();
                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyJack).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                _output.WriteLine($"{partyLancelot.Servant.ServantBasicInfo.Name} has {partyLancelot.NpCharge}% charge after the 3rd fight");
                _output.WriteLine($"{partyJack.Servant.ServantBasicInfo.Name} has {partyJack.NpCharge}% charge after the 3rd fight");

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(0);
                    partyLancelot.NpCharge.Should().Be(27);
                }
            }
        }
        public async Task AtalanteNp1LoopDoubleSkadiHelena()
        {
            _wireMockFixture.CheckIfMockServerInUse();
            _wireMockUtility.AddStubs(_wireMockFixture);

            using (var scope = _container.BeginLifetimeScope())
            {
                ScopedClasses      resolvedClasses    = AutofacUtility.ResolveScope(scope);
                ConstantExportJson constantExportJson = await FrequentlyUsed.GetConstantExportJsonAsync(resolvedClasses.AtlasAcademyClient);

                List <PartyMember> party = new List <PartyMember>();

                EquipBasicJson equipBasicJson = constantExportJson.ListEquipBasicJson.Find(c => c.Id.ToString() == WireMockUtility.KSCOPE_CE);
                CraftEssence   chaldeaKscope  = FrequentlyUsed.GetCraftEssence(equipBasicJson, 20);

                MysticCode mysticCode = new MysticCode
                {
                    MysticCodeLevel = 9,
                    MysticCodeInfo  = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo(WireMockUtility.PLUGSUIT_ID)
                };

                #region Party Data
                // Atalante (Archer)
                ServantBasicJson basicJson     = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.ATALANTE_ARCHER);
                PartyMember      partyAtalante = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 5, false, chaldeaKscope);

                partyAtalante.Servant.SkillLevels = new int[] { 10, 4, 10 };
                party.Add(partyAtalante);

                // Skadi
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadi = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                party.Add(partySkadi);

                // Helena (Caster)
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.HELENA_CASTER);
                PartyMember partyHelena = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses);

                partyHelena.Servant.SkillLevels = new int[] { 10, 4, 10 };
                party.Add(partyHelena);

                // Skadi Support
                basicJson = constantExportJson.ListServantBasicJson.Find(s => s.Id.ToString() == WireMockUtility.SKADI_CASTER);
                PartyMember partySkadiSupport = await FrequentlyUsed.PartyMemberAsync(basicJson, party, resolvedClasses, 1, true);

                party.Add(partySkadiSupport);
                #endregion

                List <EnemyMob> enemyMobs = GetGardenMob();

                /* Simulate node combat */
                // Fight 1/3
                resolvedClasses.ServantSkillActivation.SkillActivation(partyAtalante, 3, party, enemyMobs, 1);     // Atalante 3T NP gain up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 1, party, enemyMobs, 1);        // Skadi quick up buff
                resolvedClasses.ServantSkillActivation.SkillActivation(partyHelena, 1, party, enemyMobs, 1);       // Helena party 20% NP charge
                resolvedClasses.ServantSkillActivation.SkillActivation(partyHelena, 3, party, enemyMobs, 1);       // Helena 3T party QAB card type buff

                resolvedClasses.ServantSkillActivation.SkillActivation(mysticCode, 3, party, enemyMobs, 3, 3, 4);  // Swap Helena with Skadi (support)

                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 1, party, enemyMobs, 1); // Skadi (support) quick up buff

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAtalante).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.First, constantExportJson);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 1st fight");

                // Fight 2/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 3, party, enemyMobs, 1); // Skadi NP charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAtalante).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Second, constantExportJson);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 2nd fight");

                // Fight 3/3
                resolvedClasses.ServantSkillActivation.AdjustSkillCooldowns(party);
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadi, 2, party, enemyMobs, 1);        // Skadi enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partyAtalante, 1, party, enemyMobs, 1);     // Atalante party quick up
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 2, party, enemyMobs, 1); // Skadi (support) enemy defense down
                resolvedClasses.ServantSkillActivation.SkillActivation(partySkadiSupport, 3, party, enemyMobs, 1); // Skadi (support) NP charge

                resolvedClasses.CombatFormula.AddPartyMemberToNpChain(party, partyAtalante).Should().BeTrue();
                resolvedClasses.CombatFormula.NoblePhantasmChainSimulator(party, enemyMobs, WaveNumberEnum.Third, constantExportJson);

                _output.WriteLine($"{partyAtalante.Servant.ServantBasicInfo.Name} has {partyAtalante.NpCharge}% charge after the 3rd fight");

                using (new AssertionScope())
                {
                    enemyMobs.Count.Should().Be(0);
                    partyAtalante.NpCharge.Should().Be(69);
                }
            }
        }