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

Passive BGE Devotion: parameterized (as percent) #78

Merged
merged 2 commits into from
Aug 24, 2024

Conversation

dsuchka
Copy link
Collaborator

@dsuchka dsuchka commented Aug 23, 2024

Use "Devotion 20" to have 20% bonus, "Devotion 25" for 25% and so on

Use "Devotion 20" to have 20% bonus, "Devotion 25" for 25% and so on
@APN-Pucky
Copy link
Owner

LGTM, two minor things I noticed:

Bug66;Bug66;Devotion

iirc was designed to catch crashes, maybe it should have Devotion 20 and/or Devotion 25. Now Devotion w/o percentage gives just 1%:

signed short bge_value = (tokens.size() > 1) ? boost::lexical_cast<signed short>(tokens[1]) : 1;

That is no problem to me, but something I wanted to raise here (I rarely use tuo nowadays).

Maybe you could add a X or N% to the GUI here after Devotion (no need to recompile just for the future)?

BGEffects := "none|SuperHeroism|Crackdown|Devotion|Unity|Iron-Will|Cold-Sleep|Blood-Vengeance|Oath-of-Loyalty|Furiosity|TemporalBacklash|CriticalReach|Devour|HaltedOrders|ZealotsPreservation|Virulence|Enfeeble all X|Enhance all S X|Evolve n S1 S2|Heal all X|Mortar X|Protect all X|Rally all X|Siege all X|Strike all X|Weaken all X|Brigade|Bloodlust X|Counterflux|Divert|EnduringRage|Fortification|Heroism|Metamorphosis|Megamorphosis|Revenge X|TurningTides"

@dsuchka
Copy link
Collaborator Author

dsuchka commented Aug 23, 2024

Now Devotion w/o percentage gives just 1%

Yes, I know about the issue. This is how the Passive BGE is implemented in the TUO. For some cases default value=1 is good choise (as for denominator for instance), for other ones — not.

I would keep it simple as possible and don't complicate the bge parsing process (to introduce default values), on the other hand I would also avoid workaround to use a default (20% or 40%) when it's 1%: no any guarantees that the Devotion BGE has a default (Devs use a new value every time as far as I see) and any default value is not correct ideologically (it's easy to forget to set a correct value next time). I would say it's better to throw an Exception when it's 1% rather than run a default value.

@APN-Pucky APN-Pucky merged commit 7099647 into APN-Pucky:master Aug 24, 2024
2 checks passed
@APN-Pucky
Copy link
Owner

Thanks! I'll prepare a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants