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

Attraction Support #5357

Merged
merged 28 commits into from
Jul 2, 2024
Merged

Attraction Support #5357

merged 28 commits into from
Jul 2, 2024

Conversation

Jetz72
Copy link
Contributor

@Jetz72 Jetz72 commented Jun 2, 2024

First draft of Attractions. Still has a few hurdles to clear but you can add an Attraction section to a deck and play them in game (with deck conformance disabled since there are only two so far).

The weirdest new component to all this, and one I was most looking for feedback on, is something I'm calling "functional variants" - a property used to reconcile different prints with the same card name having different behavior (namely, the lights).
The script for an Attraction looks like this:

Name:Information Booth
ManaCost:no cost
Types:Artifact Attraction
Variant:A:Lights:2 6
Variant:B:Lights:3 6
Variant:C:Lights:4 6
Variant:D:Lights:5 6
K:Visit:TrigDraw
SVar:TrigDraw:DB$ Draw | SpellDescription$ Draw a card.
Oracle:Visit — Draw a card.

The lines beginning with Variant:Name match to the same name specified in an optional additional parameter in the edition file:

218a U Information Booth @Gaboleps $A
218b U Information Booth @Gaboleps $B
218c U Information Booth @Gaboleps $C
218d U Information Booth @Gaboleps $D

When a card is generated via CardFactory, if there's a variant name specified for the paper card, any matching Variant lines in the script will be applied in addition to the rest of the script. So far it's only been tested with Lights, but it's designed to work with any property. The intent was that it would also enable implementations for some variants of other Un-cards, such as Everythingamajig and Garbage Elemental. There are still some parts of the implementation that need smoothing out, but it works as a proof-of-concept for now, and some input would be nice before spending more time polishing it up.

I think most of the rest is relatively straightforward, with the Attraction deck largely precedented by Planechase and Scheme decks. There are still some things left to do, which is why I'm putting this up as a draft for now. My list includes:

  • Prize keyword
  • TriggerClaimPrize
  • Mobile Deck builder support
  • Adventure deck builder support?
  • Figure out the merge move logic - If you animate one, mutate something onto it, and then it leaves the battlefield, where does it end up? Does it matter if a token or commander is involved?
  • "number of attractions you visited this turn"
  • Deck generation rules - attraction synergy + generating an attraction deck if needed
  • AI logic
  • Detail description for Visit keyword. Currently shows Visit:TrigScry
  • Attraction roll result dialog has an extra "Result:" in its text

Nice-to-haves:

  • Astrotorium card backs
  • Light icons in the card details instead of numbers
  • Reorganize RollDiceEffect.rollDiceForPlayer to remove dependency on SpellAbility - Right now rollToVisitYourAttractions() copypastes most of rollDiceForPlayer
  • Move functional variant properties to a different ICardFace implementation (Tried it; turned into an exercise in code duplication without much obvious benefit. May revisit someday.)

Jetz added 2 commits June 2, 2024 02:08
# Conflicts:
#	forge-core/src/main/java/forge/card/CardRules.java
@tool4ever tool4ever added the Unfinity Wacky stuff label Jun 2, 2024
Jetz and others added 22 commits June 2, 2024 09:28
# Conflicts:
#	forge-core/src/main/java/forge/card/CardRules.java
Untangled some oracle text methods in Card and CardState
Sly Spy, Everythingamajig, and two Garbage Elementals
Visit card text fix.
2 more Attractions
# Conflicts:
#	forge-core/src/main/java/forge/card/CardFace.java
#	forge-core/src/main/java/forge/card/CardRules.java
…fting the responsibility of recognizing potential Commanders elsewhere.
# Conflicts:
#	forge-core/src/main/java/forge/deck/DeckFormat.java
@Jetz72 Jetz72 marked this pull request as ready for review June 23, 2024 16:24
@Jetz72
Copy link
Contributor Author

Jetz72 commented Jun 23, 2024

Moving from draft PR to full PR.

Features added:
Attraction support
7 Attraction support cards
13 Attraction cards
Functional Variant support
3 cards that use functional variants, two with one variant implemented, one with two variants.
Overhaul for Deck Editor on mobile - now supports extra deck sections for variant cards.
-TabPageScreen now supports adding new tabs after initialization.
-You can now programmatically initiate an Advanced Search.

Things not yet done, investigated, and/or tested:
Draft/Limited play
Adventure Mode Deck Editor
Deck generation, generating an Attraction deck if needed and adding Attraction synergy cards to the main deck
Images on downloads.cardforge.org
Some better icons for deck sections on Mobile

Things that'd be nice to do at some point down the line:
Light icons in the card details instead of numbers
Astrotorium card backs
A way to view the Attraction Deck and Junkyard zones

Jetz added 2 commits June 24, 2024 20:06
# Conflicts:
#	forge-game/src/main/java/forge/game/player/Player.java
Consolidated rollToVisitAttractions logic back into RollDiceEffect.
tehdiplomat
tehdiplomat previously approved these changes Jul 2, 2024
@tehdiplomat tehdiplomat merged commit 3a61118 into Card-Forge:master Jul 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unfinity Wacky stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants