frzyc / genshin-optimizer

An Artifact optimizer for Genshin Impact.
https://frzyc.github.io/genshin-optimizer/
MIT License
750 stars 218 forks source link

Custom Target Expressions #2184

Open tisseandorius opened 1 month ago

tisseandorius commented 1 month ago

Describe your changes

I added support for custom target expressions and a convenient editor. image

Since the last PR I have found at least one indisputably correct way to use CTE.

Example: https://discord.com/channels/785153694478893126/1035719815622561892/1244630283052126298 Another example: https://discord.com/channels/785153694478893126/1035720633167921313/1237378233666633850

Testing/validation

The optimizer sometimes refuses to work with some large expressions. Like this: image

This can be bypassed by slightly changing the form of the expression without changing the essence. image

Also, this case is calculated incorrectly. Although when it is used as part of a larger expression, it is calculated as expected. image

I can't fix it. It's an engine issue. I preferred to forget about it until the transition to Pando.

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

github-actions[bot] commented 1 month ago

[sr-frontend] [Tue Jun 4 19:41:06 UTC 2024] - Deployed 4902508b759189a6270c65aef05c36abf0089107 to https://genshin-optimizer-prs.github.io/pr/2184/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Jun 4 19:41:35 UTC 2024] - Deployed 4902508b759189a6270c65aef05c36abf0089107 to https://genshin-optimizer-prs.github.io/pr/2184/frontend (Takes 3-5 minutes after this completes to be available)

frzyc commented 3 weeks ago

@tisseandorius I am still not convinced that Custom Target expression is the solution towards somewhat niche usecases. Can you elaborate on which usecases that existing multi-target features cannot cover? I am not sure I can understand from the discord link you sent.