-
Notifications
You must be signed in to change notification settings - Fork 783
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
Morph rework and check spell characteristics #11178
Conversation
Morph is a special action that doesn't use the stack. Is this covered in your code? |
This pull request doesn't change TurnFaceUpAbility (the special action to turn a face-down card face-up), it just changes how a card in your hand with (Mega)Morph turns into a 2/2 face-down creature on the battlefield. |
I like the direction |
Not sure if I should add it here or create a new thread but here it goes. When I play a morph card (I am a newbie, learning slowly with my friend) then I can't check the card and some times forget what they all do/are! Could we get an option when moving over the card with the mouse the original side will show up instead of that generic morph? Thanks |
should fix #7160 ? |
Fixed the cast ability (it incorrectly had setWorksFaceDown set) and removed SpellAbilityType.FACE_DOWN_CREATURE since it was only used for Zoetic Cavern and is thus no longer needed. I believe this PR is now ready for review. |
Two more issues to check that I think might be resolved by this rework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for separating out into logical commits, it really helped streamline the review. Basically, all the changes look good to me. There are a couple minor style things that should be easy to address. The main thing I'd like to see is some sort of documentation to guide future developers into correctly using the spell characteristics check when applicable.
.../src/main/java/mage/abilities/effects/common/continuous/CastAsThoughItHadFlashAllEffect.java
Show resolved
Hide resolved
… instead of returning false
…rphRework_v2 # Conflicts: # Mage.Sets/src/mage/cards/b/Banefire.java
Second issue is definitely fixed by making morph involved in the characteristics checking. First issue seems to have two parts. The first is fixed while the second is not. Fixing that I think involves moving the "can't cast" effects from CAST_SPELL_LATE to CAST_SPELL events, but there's probably other bits involved that I haven't investigated. |
If you allows to activate it then it's not GUI issue, it's a critical game engine issue and must be fixed (AI will use it, users can use it too).
It's ok |
It does not. The permanent kept the Now without |
Morph should be a separate SpellAbility rather than an AlternativeSourceCostsImpl. Changing this allows me to support the interaction with [[Liberator, Urza's Battlethopter]] and remove a lot of the code special casing [[Zoetic Cavern]].
Also, changed tests which "Cast X" to require the exact name, instead of just checking the start. Previously it allowed casting with alternative modes without actually naming them, which doesn't seem like good behavior.
Fixes #10168
Fixes #11162
Fixes #7160
Fixes #7121
Fixes #4294
Fixes #7138
Needs more testing and is currently missing some more of the abilities that should be checking spell characteristics rather than the card's, but the basic idea is complete.CompletedThis also allows me to convert AlternativeSourceCostsImpl to use CostTags once that change be merged, since Morph doesn't fit well with it as-is.