magefree / magefree/mage

Singletons need some improvements (abilities must be able to have source related settings like hints)

Open
#6,731 3 comments 0 reactions 0 assignees View on GitHub
Developers Discussion enhancement refactoring
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Current situation:
1. XMage implements many keyword abilities as singleton (one object instance for all cards, example: `HasteAbility`). It's easy to use for devs and easy to search abilities in code;
2. Keyword abilities can have different settings (e.g. with or without ability description, see #6728);
3. Singleton ability can't store any card related settings (it's same for all cards);

So it can be useful to implement special mechanics for card's related settings for singleton abilities. E.g. you can enable or disable full description on specific card. Interface like `KeywordAbility` with special methods.

Potential uses:
* Hide or show keyword ability's hint/description in card;
* Find all keyword abilities in card to show it as icons (see #4488);
* Find all keyword abilities in card to show full description like MTG Arena do (shows full keyword description for all keywords in card's hint even if that card's have only simple word in printed card);
* Combine multiple keywords as one rule (example: [Bontu the Glorified](https://scryfall.com/card/akh/82/bontu-the-glorified)).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.