Enforce read-side and write-side query structure #2377
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
The current tag db is too lenient on how the buffs get added to a formula. Some formulas are added to
et:self
while others toet:selfBuff
. This makes the system hard to design as it needs to accommodate both possibilities. This PR enforces more structure onet:
as follows.On the read side:
et:self
,self.final.atk
yields thefinal.atk
from character/weapon/artifact/etc,et:*Buff
with appropriatesheet:
,selfBuff.final.atk.sheet("Nahida")
yields Nahida's contribution toself.final.atk
.On the write side:
sheet:undefined
orsheet:static
write toet:self
,et:selfBuff
/teamBuff
/notSelfBuff
(i.e.,et:*Buff
),et:*Buff
,This structure allows the buff system to be design as
It however requires linkage from
self:
<=et:*Buff
at all time, so we also addnoTeamData
in case there is no team member (and sosrc:dst:
are unnecessary).Issue or discord link
https://discord.com/channels/785153694478893126/1189329506842984570/1272737073522278570
Testing/validation
Unit tests are added to enforce write-side entries.
Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)
yarn run mini-ci
locally to validate format and lint.