magefree / magefree/mage

ClassCastException with copied spell Hulking Metamorph

Open
#13,548 2 comments 0 reactions 0 assignees View on GitHub
bug
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]]

![Image](https://github.com/user-attachments/assets/1d365c75-559b-4122-b655-da32c86e3ee6)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.