Card-Forge / forge

An unofficial rules engine for the world's greatest card game.
https://card-forge.github.io/forge/
GNU General Public License v3.0
997 stars 567 forks source link

Cryptic Spires does not work properly #3652

Open Goddfrey opened 1 year ago

Goddfrey commented 1 year ago

Describe the bug Cryptic Spires says "As you create your deck, circle two of the colors below" (out of 5 basic mana colors). In game you can tap it to add one mana of either of the circled colors.

How it's implemented here in the quest mode is you choose the two colors before the game starts. Whatever I'm fine with it.

But the real bug is it produces two colorless when tapped.

To Reproduce Play Cryptic Spires Tap it for mana

Expected behavior Should add 1 mana of one of the chosen colors. Not two colorless.

Screenshots

cryptic-spires-bug

Desktop (please complete the following information):

github-actions[bot] commented 1 year ago

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

Hanmac commented 7 months ago

@tool4ever can you look into this Problem?

pfirpfel commented 6 months ago

Can confirm, still bugged. There is a color selection at the start of the game, but it still produces 2 colorless mana instead.

Hanmac commented 6 months ago

@pfirpfel that's because @tool4ever or others hasn't looked at the problem yet

Agetian commented 6 months ago

I tried debugging this, it looks like the information about the chosen colors is lost between the time it's actually chosen and the standard game flow begins. My guess is that this information is reset somewhere when the library is prepared or something along those lines, but I haven't been able to establish the exact cause yet. This should probably be done somewhere later in the chain of game events then?

Agetian commented 6 months ago

Actually, I'm not sure why this is happening, since the next thing after doing the Spires color choice routine is drawing the hand, and that doesn't seem to run anything that would reset the chosen color info :/

Agetian commented 6 months ago

By the time GameAction calls changeZone on the Spires when you play it as a land, the game tries to grab the last known info via getLKICopy, and the source in there already has no information on the chosen colors (the relevant array is empty).

tool4ever commented 6 months ago

This card was never implemented in a way that actually works... I might look into it if Alchemy releases a clone effect that's perpetual since that could then be used to simulate this too :D (the colors need to be copiable values)

Northmoc commented 6 months ago

I had the thought that there might actually be 10 different card scripts... each instance gets locked in when drafting / constructing decks... but got a little stuck on bringing the theory to completion

This could lead to implementing Attractions in Unfinity, too

Perpetual stuff might be lost between matches, though that is an interesting tactic too

Agetian commented 6 months ago

Ah, makes sense! :+1: