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

Volrath's Shapeshifter with Triskelion as topmost card of graveyard causes stack overflow #4723

Open
jumpinjackie opened this issue Feb 21, 2024 · 4 comments
Assignees
Labels
bug Something isn't working Game Mechanics keep no stale

Comments

@jumpinjackie
Copy link
Contributor

Describe the bug

If you resolve a Volrath's Shapeshifter and the topmost card of your graveyard is a Triskelion, the game will stack overflow and the game log is spammed with Volrath's Shapeshifter (as Triskelion?) coming into play with 3 +1/+1 counters over and over.

To Reproduce

  1. Get Triskelion into your graveyard
  2. Resolve a Volrath's Shapeshifter with Triskelion as the topmost card in your GY

Expected behavior

Volrath's Shapeshifter comes into play as a copy of Triskelion with 3 +1/+1 counters

Screenshots

2024-02-21 22_07_24-Forge_ 1 6 60-SNAPSHOT

Copy of the stack trace from the crash dialog attached as well

stacktrace.txt

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser N/A
  • Version 1.6.60-SNAPSHOT-02-20

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@Hanmac
Copy link
Contributor

Hanmac commented Feb 21, 2024

@tool4ever the Problem is the CloneState Replacement Effect getting copied.
also the Special check for if the ReplacementEffect has already been run for etb ones uses special logic for ones gained by StaticAbilities

maybe that helps to pinpoint the problem?

@Hanmac Hanmac added bug Something isn't working Game Mechanics labels Feb 21, 2024
@tool4ever
Copy link
Contributor

@Hanmac
I have it almost fixed like this:
image

But I think there is another logic error in the GainTextOf$ logic:
currently it would add the RE twice

  • once from the etbCounter into changedCardKeywordsByText
  • and another via state.getReplacementEffects() into ChangedCardTraitsByText

this results in it getting double the counters

how can we prevent that? 🤔

@Hanmac
Copy link
Contributor

Hanmac commented Feb 21, 2024

CloneText should probably only copy the Intrinsic Replacement Effects (the ones directly in state)

But I need to debug it

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Game Mechanics keep no stale
Projects
None yet
Development

No branches or pull requests

3 participants