Volrath's Shapeshifter with Triskelion as topmost card of graveyard causes stack overflow
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
- Get Triskelion into your graveyard
- 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
Copy of the stack trace from the crash dialog attached as well
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.
@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
I have it almost fixed like this:
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()intoChangedCardTraitsByText
this results in it getting double the counters
how can we prevent that? 🤔
CloneText should probably only copy the Intrinsic Replacement Effects (the ones directly in state)
But I need to debug it
This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.