SolastaMods / SolastaUnfinishedBusiness

MIT License
142 stars 66 forks source link

Eldritch smite pops up only when a critical hit #3145

Closed HIEROT closed 1 year ago

HIEROT commented 1 year ago

It should behave like a paladin's smite, and possibly it will be very nice if a button to on/off critical smite is provided just like a paladin AutoSave_2.sav.zip Thank you in advance!

HIEROT commented 1 year ago

And I remember in the last few versions of mod, it behaves as it should be. Maybe something was modified unexpectedly

ThyWoof commented 1 year ago

In fact there is an option for that. Are you sure you don't have Enable Paladin Smite Toggle enabled and forgot to enable the toggle?

this is the logic there.

                        // This is used to only offer smites on critical hits
                        if (!criticalHit &&
                            Main.Settings.AddPaladinSmiteToggle &&
                            !hero.IsToggleEnabled((ActionDefinitions.Id)ExtraActionId.PaladinSmiteToggle))
                        {
                            break;
                        }

here without setting enabled on Mod UI. image

toggle disabled. no smites offered. image

not a bug.

HIEROT commented 1 year ago

I mean the toggle of invocation eldritch smite of a warlock. I was sure that the toggle for a paladin is there but not for a warlock. image

ThyWoof commented 1 year ago

Oh I see. Will check

ThyWoof commented 1 year ago

fixed in dev.

added an additional check to let this smite type go without the toggle. For now won't add any toggle.

                        // This is used to only offer smites on critical hits
                        if (!criticalHit &&
                            // allows EldritchSmite to pass through
                            featureDefinition is not FeatureDefinitionAdditionalDamage &&
                            // allows PaladinSmite to pass through
                            Main.Settings.AddPaladinSmiteToggle &&
                            !hero.IsToggleEnabled((ActionDefinitions.Id)ExtraActionId.PaladinSmiteToggle))
                        {
                            break;
                        }
HIEROT commented 1 year ago

@ThyWoof In the newest version after POI is released, the problem seems to happen again.

HIEROT commented 1 year ago

if (!criticalHit && Main.Settings.AddPaladinSmiteToggle && featureDefinition is not FeatureDefinitionAdditionalDamage && !hero.IsToggleEnabled((ActionDefinitions.Id)ExtraActionId.PaladinSmiteToggle)) { break; } I noticed that the not is missing in the newest dev. Adding it fixs the issue.