コード例 #1
0
        /// <summary>
        /// <remarks>Any raised exception will terminate the strategy.</remarks>
        /// </summary>
        protected override NextRaidAction GetNextRaidAction(RaidSnapshot raidSnapshot)
        {
            if (raidSnapshot.Turn == 0)
            {
                return(EnableChargeAttack.Action.ContinueWith(_ =>
                                                              _.GetHeroById(ZooeyId).UseAbility(1).ContinueWith(_1 =>
                                                                                                                _1.GetHeroById(NierId).UseAbility(0).ContinueWith(_2 =>
                                                                                                                                                                  // Cast charge attack reactivation on the avatar
                                                                                                                                                                  _2.GetHeroById(NierId).UseAbility(1, 0).ContinueWith(_3 =>
                                                                                                                                                                                                                       _3.GetHeroById(KoluluId).UseAbility(1).ContinueWith(_4 =>
                                                                                                                                                                                                                                                                           _4.GetAvatar().UseAbility(0).ContinueWith(_5 =>
                                                                                                                                                                                                                                                                                                                     _5.UseSummon(DeathSummonId).ContinueWith(_6 =>
                                                                                                                                                                                                                                                                                                                                                              _6.Attack()))))))));
            }

            if (raidSnapshot.Turn == 12)
            {
                raidSnapshot.UseSummon(ShivaSummonId).ContinueWith(_ => _.Attack());
            }

            if (!raidSnapshot.Enemies[0].CantMove())
            {
                return(Wait.For(50));
            }

            return(raidSnapshot.Attack());
        }
        protected override NextRaidAction GetNextRaidAction(RaidSnapshot raidSnapshot)
        {
            if (raidSnapshot.Turn == 0)
            {
                return(DisableChargeAttack.Action.ContinueWith(_1 =>
                                                               _1.GetAvatar().UseAbility(0).ContinueWith(_2 =>
                                                                                                         _2.GetHeroById(JeanneDArcId).UseAbility(3).ContinueWith(_3 =>
                                                                                                                                                                 _3.GetHeroById(ShivaId).UseAbility(0).ContinueWith(_4 =>
                                                                                                                                                                                                                    _4.GetHeroById(NayaId).UseAbility(2).ContinueWith(_5 =>
                                                                                                                                                                                                                                                                      _5.UseSummon(TheSunSummonId).ContinueWith(_6 =>
                                                                                                                                                                                                                                                                                                                _6.Attack())))))));
            }

            if (raidSnapshot.Turn <= 10 && ShouldLeaveRaid(raidSnapshot))
            {
                return(Terminate.Action);
            }

            if (raidSnapshot.Turn == 6)
            {
                return(raidSnapshot.GetHeroById(NayaId).UseAbility(0).ContinueWith(_ => _.Attack()));
            }

            if (raidSnapshot.Turn == 9)
            {
                // Shiva party buff -> Triple attack burst time
                return(raidSnapshot.GetHeroById(ShivaId).UseAbility(1).ContinueWith(_1 =>
                                                                                    _1.GetHeroById(NayaId).UseAbility(1).ContinueWith(_2 =>
                                                                                                                                      _2.UseSummon(ShivaSummonId).ContinueWith(_3 =>
                                                                                                                                                                               _3.Attack()))));
            }

            if (raidSnapshot.Turn == 10)
            {
                // Tien assassin break burst time
                if (!this.burstSetupComplete)
                {
                    raidSnapshot.GetAvatar().UseAbility(0).ContinueWith(_1 =>
                                                                        _1.GetHeroById(TienId).UseAbility(1).ContinueWith(_2 =>
                                                                                                                          _2.GetHeroById(TienId).UseAbility(3).ContinueWith(_3 =>
                                                                                                                                                                            _3.UseSummon(TheSunSummonId).ContinueWith(_ =>
                    {
                        this.burstSetupComplete = true;
                        return(Pass.Action);
                    }))));
                }

                // If for some reason Bahamut has still not moved into its wind phase, wait for it to for damage optimization
                return(raidSnapshot.Enemies[0].HpPercentage > 60 ? (NextRaidAction)Wait.For(50) : raidSnapshot.Attack());
            }

            if (raidSnapshot.Turn == 11)
            {
                return(raidSnapshot.UseSummon(ShivaSummonId).ContinueWith(_ => _.Attack()));
            }

            if (raidSnapshot.Turn == 12)
            {
                // Stack up Tien's ability 3 echoes
                raidSnapshot.GetHeroById(TienId).UseAbility(2).ContinueWith(_1 =>
                                                                            _1.UseSummon(ShivaSummonId).ContinueWith(_2 =>
                                                                                                                     _2.Attack()));
            }

            return(new Attack
            {
                TargetIndex = 0,
                EnableChargeAttack = false,
            });
        }