/// <summary> /// <remarks>Any raised exception will terminate the strategy.</remarks> /// </summary> public override NextRaidAction GetNextRaidAction(RaidSnapshot raidSnapshot) { if (raidSnapshot.Turn == 1) { return(Turn1Setup(raidSnapshot)); } if (raidSnapshot.Turn <= 11 && ShouldLeaveRaid(raidSnapshot)) { return(Terminate.Action); } if (raidSnapshot.Turn == 7) { return(raidSnapshot.GetHeroById(NayaId).UseAbility(0)); } if (raidSnapshot.Turn == 10) { // 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 == 11) { // Tien assassin break burst time raidSnapshot.GetHeroById(TienId).UseAbility(1).ContinueWith(_1 => _1.GetHeroById(TienId).UseAbility(3).ContinueWith(_2 => _2.UseSummon(TheSunSummonId).ContinueWith(_3 => // If for some reason Bahamut has still not moved into its wind phase, wait for it to for damage optimization _3.Enemies[0].HpPercentage > 60 ? (NextRaidAction)Wait.For(50) : _3.Attack()))); } if (raidSnapshot.Turn == 12) { return(raidSnapshot.UseSummon(ShivaSummonId).ContinueWith(_ => _.Attack())); } if (raidSnapshot.Turn == 13) { // Stack up Tien's ability 2 echoes raidSnapshot.GetHeroById(TienId).UseAbility(1).ContinueWith(_1 => _1.UseSummon(ShivaSummonId).ContinueWith(_2 => _2.Attack())); } if (raidSnapshot.Turn == 14) { return(raidSnapshot.UseSummon(ShivaSummonId).ContinueWith(_ => _.Attack())); } return(new Attack { TargetIndex = 0, EnableChargeAttack = false, }); }
/// <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()); }
// Disable charge attack -> Shiva ability 1 -> Naya ability 2 -> Summon the Sun -> Attack private static NextRaidAction Turn1Setup(RaidSnapshot raidSnapshot) { return(DisableChargeAttack.Action.ContinueWith(_1 => _1.GetHeroById(ShivaId).UseAbility(0).ContinueWith(_2 => _2.GetHeroById(NayaId).UseAbility(2).ContinueWith(_3 => _3.UseSummon(TheSunSummonId).ContinueWith(_4 => _4.Attack()))))); }
public abstract NextRaidAction GetNextRaidAction(RaidSnapshot raidSnapshot);
public static NextRaidAction UseSummon(this RaidSnapshot raidSnapshot, Guid summonId) { throw new NotImplementedException(); }
public static Attack Attack(this RaidSnapshot raidSnapshot) { throw new NotImplementedException(); }
/// <summary> /// Leave the raid if win condition is gone (front line alive) /// </summary> private static bool ShouldLeaveRaid(RaidSnapshot raidSnapshot) { return(raidSnapshot.Allies.All(hero => hero.IsAlive())); }
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, }); }
/// <summary> /// <remarks>Any raised exception will terminate the strategy.</remarks> /// </summary> protected abstract NextRaidAction GetNextRaidAction(RaidSnapshot raidSnapshot);