Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BRD] Iron Jaws returning Caustic Bite once Stormbite applies, regardless #78

Closed
Random-Stack-Random-Day opened this issue Dec 29, 2021 · 4 comments
Labels
Bug Something is broken, or not working correctly. Pull Request The author proposed a fix - this issue is or should be a pull request.

Comments

@Random-Stack-Random-Day
Copy link
Contributor

Will check the code in a bit but something in newest version broke Iron Jaws.

Applies Stormbite, goes to Caustic, then stays on Caustic.

@Nik-Potokar
Copy link
Owner

Nik-Potokar commented Dec 29, 2021

Its due to some testing will be fixed/reverted shortly

Sorry!!

@Stein121
Copy link

I think I have a potential fix, it should only refresh duration with iron jaws if either stormbite or caustic is at 4 seconds left else it will cast gcd single target rotation. Might be dependent on other features, need some testing:

internal class BardIronJawsFeature : CustomCombo
{
protected override CustomComboPreset Preset => CustomComboPreset.BardIronJawsFeature;

    protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
        {
            if (actionID == BRD.IronJaws)
            {
            if (level < BRD.Levels.IronJaws)
            {
                var venomous = TargetHasEffect(BRD.Debuffs.VenomousBite);
                var windbite = TargetHasEffect(BRD.Debuffs.Windbite);
                var venomousDuration = FindTargetEffect(BRD.Debuffs.VenomousBite);
                var windbiteDuration = FindTargetEffect(BRD.Debuffs.Windbite);
                if ((venomous && windbite) && (venomousDuration.RemainingTime < 4 || windbiteDuration.RemainingTime < 4))
                    return BRD.IronJaws;

                if (!windbite)
                    return BRD.Windbite;
                if (!venomous)
                    return BRD.VenomousBite;
                else if (HasEffect(BRD.Buffs.StraightShotReady))
                    return OriginalHook(BRD.RefulgentArrow);
                return OriginalHook(BRD.BurstShot);
            }

            if (level < BRD.Levels.BiteUpgrade)
            {
                var venomous = TargetHasEffect(BRD.Debuffs.VenomousBite);
                var windbite = TargetHasEffect(BRD.Debuffs.Windbite);
                var venomousDuration = FindTargetEffect(BRD.Debuffs.VenomousBite);
                var windbiteDuration = FindTargetEffect(BRD.Debuffs.Windbite);
                if ((venomous && windbite) && (venomousDuration.RemainingTime < 4 || windbiteDuration.RemainingTime < 4))
                    return BRD.IronJaws;

                if (!windbite)
                    return BRD.Windbite;
                if (!venomous)
                    return BRD.VenomousBite;
                else if (HasEffect(BRD.Buffs.StraightShotReady))
                    return OriginalHook(BRD.RefulgentArrow);
                return OriginalHook(BRD.BurstShot);
            }

            var caustic = TargetHasEffect(BRD.Debuffs.CausticBite);
            var stormbite = TargetHasEffect(BRD.Debuffs.Stormbite);
            var causticDuration = FindTargetEffect(BRD.Debuffs.CausticBite);
            var stormbiteDuration = FindTargetEffect(BRD.Debuffs.Stormbite);
            var gauge = GetJobGauge<BRDGauge>();

            if ((caustic && stormbite) && (causticDuration.RemainingTime < 4 || stormbiteDuration.RemainingTime < 4))
                return BRD.IronJaws;
            if (!caustic)
                return BRD.CausticBite;
            if (!stormbite)
                return BRD.Stormbite;
            else if (gauge.SoulVoice == 100)
                return BRD.ApexArrow;

            if (HasEffect(BRD.Buffs.StraightShotReady))
                return OriginalHook(BRD.RefulgentArrow);
            return OriginalHook(BRD.BurstShot);
        }
    return actionID;
    }
}

@Iaotle
Copy link
Contributor

Iaotle commented Dec 30, 2021

@Stein121, could you make a pull request with the changes outlined? All you have to do is fork the repo and change the relevant file.

@Iaotle Iaotle added Bug Something is broken, or not working correctly. Pull Request The author proposed a fix - this issue is or should be a pull request. labels Dec 30, 2021
@Stein121
Copy link

Hey, seems like Nik already incorporated the fix, no need for pull request :)

@Iaotle Iaotle closed this as completed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken, or not working correctly. Pull Request The author proposed a fix - this issue is or should be a pull request.
Projects
None yet
Development

No branches or pull requests

4 participants