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

Refactor needed: Support for objects having multiple names #12805

Open
theelk801 opened this issue Sep 5, 2024 · 3 comments · May be fixed by #12839
Open

Refactor needed: Support for objects having multiple names #12805

theelk801 opened this issue Sep 5, 2024 · 3 comments · May be fixed by #12839
Assignees
Labels
refactoring Developers topics about code and programming

Comments

@theelk801
Copy link
Contributor

This is one that's been a long time coming but the introduction of the Room mechanic is gonna make this necessary. We're gonna need to refactor how names are handled in a way that resembles the way we handle subtypes, plus allow for cards like [[Spy Kit]]. I'm gonna start working on this unless anyone else really wants to do it.

@theelk801 theelk801 added the refactoring Developers topics about code and programming label Sep 5, 2024
@theelk801 theelk801 self-assigned this Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

Spy Kit - (Gatherer) (Scryfall) (EDHREC)

{2}
Artifact — Equipment
Equipped creature gets +1/+1 and has all names of nonlegendary creature cards in addition to its name.
Equip {2}

@JayDi85
Copy link
Member

JayDi85 commented Sep 5, 2024

It’s require to refactor “haveSameNames” usage — make sure it used with object param version, no strings only compare in cards/effects/abilities.

Also it’s require to use cache inside new continues effect or object (depends on implementation) — e.g. do not use db requests for creature names search, query/build it only one time on first call and in synchronized method. It’s important cause names compare used all around and must be protected from multiple AI simulations calls (big db queries in AI simulations can eats all memory — searching all names is big query for xmage).

BTW new effect applies to permanent, so no needs to store it in characteristics (e.g. no needs in cards) — permanent can store field like “hasAllCreatureNames” or like that.

@ssk97
Copy link
Contributor

ssk97 commented Sep 5, 2024

Currently, the only way for a MageObject to get more than 2 names at a time is for creatures equipped with Spy Kit, but I think it'd make more sense to have that be supported directly as part of the "names" object itself instead of attached to the card/permanent directly. Should definitely also clean up support for split cards' names. Might not be directly related, but it'd be nice if split cards had images while on the stack (of whichever half has been cast).

Not sure if it's worth the effort, but being theoretically able to support the Unfinity name sticker mechanic might be worth considering in the design of the new name system in case we ever get around to adding that. It is technically Commander-legal, after all.

@theelk801 theelk801 linked a pull request Sep 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Developers topics about code and programming
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants