ClassCastException with copied spell Hulking Metamorph
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
reported on discord, occurred when [[Hulking Metamorph]] was copied with [[Mendicant Core, Guidelight]]

This appears to be the only cast without an instanceof check, so it must be researched, how a copied stack object can end up with case PROTOTYPE but not be a PrototypeAbility - something calling `getCharacteristics()`
https://github.com/magefree/mage/blob/4d8028adb999ce98719c4f728a571cfa22d94741/Mage/src/main/java/mage/constants/SpellAbilityCastMode.java#L76
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at Mage/src/main/java/mage/constants/SpellAbilityCastMode.java around line 76 and trace getCharacteristics() for a copied Hulking Metamorph stack object created with Mendicant Core, Guidelight, especially the PROTOTYPE path. Done means explaining why the object is not a PrototypeAbility and resolving the ClassCastException for that scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100