Card-Forge / Card-Forge/forge

Keyword texts generated by Type

Open
#9,453 7 comments 0 reactions 1 assignee Claimed by @Hanmac View on GitHub
Game Mechanics keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
163

Description

Related to #9418

Hexproof from uses `Hexproof::`
Currently, there is:
* `Hexproof:Card.Red:red` to make `Hexproof from red`
* `Hexproof:Card.Instant:instants` to make `Hexproof from instants`

In case of ColorWords, CardTypes (and SubTypes?), i want to simplify the logic so that it can work from Quality, and generate the Valid and Desc from there.

There is some logic already in KeywordWithType:
https://github.com/Card-Forge/forge/blob/58f56db850627e3b53d16503599be19a0930b59a/forge-game/src/main/java/forge/game/keyword/KeywordWithType.java#L34-L49

What stuff i need:
* the part for the new `getTitle` function returning `Hexproof from <>` that is currently created in Card: (this might be plural for CardTypes)
https://github.com/Card-Forge/forge/blob/bdb3dd15642708f9b7f08be50aebd755180db12f/forge-game/src/main/java/forge/game/card/Card.java#L2551-L2562
* the part of Valid and ValidDesc, currently only used for Enchant stuff, but might be used for KeywordFactory
https://github.com/Card-Forge/forge/blob/58f56db850627e3b53d16503599be19a0930b59a/forge-game/src/main/java/forge/game/card/Card.java#L7143-L7144
* the part used in reminder text, might be different from the ValidDesc (see Outlaw)

The `Valid:Desc` variant should still work for more complex ones, but `Hexproof:red` and `Hexproof:Artifact` should be enough for simple versions.
This might help other Keywords, too like Protection.

In later work, we might use this to differ if a keyword is affected by TextChanges instead of creating a new one.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.