@@ -101,6 +101,11 @@ private bool InMeleeCombo
101101 AID . Impact
102102 ] ;
103103
104+ public float MeleeComboLength => 1.5f + 1.5f + 2.2f // sword gcds are fixed duration
105+ + ( Unlocked ( AID . Verholy ) ? GCDLength : 0 )
106+ + ( Unlocked ( AID . Scorch ) ? GCDLength : 0 )
107+ + ( Unlocked ( AID . Resolution ) ? GCDLength : 0 ) ;
108+
104109 protected override float GetCastTime ( AID aid )
105110 {
106111 if ( DualcastLeft > GCD )
@@ -130,6 +135,8 @@ public enum GCDPriority : int
130135 public enum OGCDPriority : int
131136 {
132137 None = 0 ,
138+ C6 = 375 ,
139+ AccelCap = 390 ,
133140 Fleche = 400 ,
134141 Manafic = 450 ,
135142 Pref = 475 ,
@@ -282,8 +289,8 @@ void doit(GCDPriority p, in Strategy strategy, Enemy? primaryTarget)
282289 LowestMana >= 89
283290 // start combo early for buff window
284291 || CanWeave ( AID . Embolden , extraFixedDelay : 5.2f ) && strategy . Buffs != OffensiveStrategy . Delay
285- // full combo is 12.7s
286- || EmboldenLeft > GCD + 12.7f
292+ // full melee combo length, minus full duration of resolution (GCD), minus full duration of scorch (GCD) since resolution is not generally expected to be covered by buffs
293+ || EmboldenLeft > GCD + ( MeleeComboLength - GCDLength * 2 )
287294 )
288295 doit ( GCDPriority . MeleeStart , strategy , primaryTarget ) ;
289296
@@ -303,15 +310,16 @@ private void OGCD(in Strategy strategy, Enemy? primaryTarget)
303310 if ( ! InCombo && PostOpener )
304311 PushOGCD ( AID . Manafication , Player , OGCDPriority . Manafic ) ;
305312
306- if ( GetCastTime ( NextGCD ) > 0 )
307- PushOGCD ( AID . Swiftcast , Player ) ;
313+ SwiftAlign ( strategy ) ;
308314
309- PushOGCD ( AID . Fleche , primaryTarget , OGCDPriority . Fleche ) ;
315+ var flechr = ReadyIn ( AID . Fleche ) ;
316+ var cr = ReadyIn ( AID . ContreSixte ) ;
317+ PushOGCD ( AID . Fleche , primaryTarget , CombatTimer < 10 ? OGCDPriority . Fleche : ( OGCDPriority . C6 + ( flechr < cr ? 1 : 0 ) ) ) ;
318+ PushOGCD ( AID . ContreSixte , BestAOETarget , OGCDPriority . C6 + ( cr < flechr ? 1 : 0 ) ) ;
310319
311320 if ( CanWeave ( MaxChargesIn ( AID . Acceleration ) , 0.6f , 2 ) )
312- PushOGCD ( AID . Acceleration , Player ) ;
321+ PushOGCD ( AID . Acceleration , Player , OGCDPriority . AccelCap ) ;
313322
314- PushOGCD ( AID . ContreSixte , BestAOETarget ) ;
315323 PushOGCD ( AID . Engagement , primaryTarget ) ;
316324
317325 if ( strategy . Dash . IsEnabled ( ) )
@@ -322,7 +330,9 @@ private void OGCD(in Strategy strategy, Enemy? primaryTarget)
322330
323331 UsePrefulgence ( strategy ) ;
324332
325- if ( CanFitGCD ( RaidBuffsLeft , 1 ) && AccelLeft <= GCD && GrandImpactReady <= GCD )
333+ // if we can't fit another melee combo in current buffs, use acceleration for an extra slow cast + grand impact
334+ if ( AccelLeft <= GCD && GrandImpactReady <= GCD &&
335+ CanFitGCD ( EmboldenLeft , 1 ) && ! InCombo && NextGCD is not ( AID . Riposte or AID . Moulinet ) )
326336 PushOGCD ( AID . Acceleration , Player ) ;
327337
328338 if ( MP <= Player . HPMP . MaxMP * 0.7f )
@@ -359,4 +369,13 @@ void UsePrefulgence(in Strategy strategy)
359369 if ( shouldUse )
360370 PushOGCD ( AID . Prefulgence , ResolveTargetOverride ( strategy . Prefulgence ) ?? BestAOETarget , OGCDPriority . Pref ) ;
361371 }
372+
373+ void SwiftAlign ( in Strategy strategy )
374+ {
375+ if ( ! CanWeave ( AID . Fleche ) && CanWeave ( AID . Fleche , 1 ) && GetCastTime ( NextGCD ) > 0 )
376+ PushOGCD ( AID . Swiftcast , Player ) ;
377+
378+ if ( ! CanWeave ( AID . ContreSixte ) && CanWeave ( AID . ContreSixte , 1 ) && GetCastTime ( NextGCD ) > 0 )
379+ PushOGCD ( AID . Swiftcast , Player ) ;
380+ }
362381}
0 commit comments