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

Fixed Release to the Wind not allowing to cast the exiled permanent #7416

Closed
wants to merge 2 commits into from

Conversation

weirddan455
Copy link
Contributor

Issue #7415

I think this was a zone change counter issue. Other cards using this method are cards that exile from top of library while Release to the Wind is passing it a Permanent. I tested that this fixed it and didn't break other cards that use it (tested with Mind's Desire) but wanted to send a PR to double check this is the correct way to fix the problem.

@JayDi85
Copy link
Member

JayDi85 commented Jan 20, 2021

  1. You cant apply effect to all cards in the exile zone (it can contains non related objects from other effects). Must be filtered for input cards only.

  2. It work with cards so call exileAndPlayFromExile from Release to the Wind with card param like game.getCard. Permanent from the battlefield is PermanentCard and it exists on battlefield only. I dont think what that PR changes needs.

Please try to fix Release to the Wind by card using -- is it working or not?

@weirddan455
Copy link
Contributor Author

@JayDi85 I tried using game.getCard in Release to the Wind and passing that. It was buggy. It left the card still sitting on the battlefield (did not go to exile) but also popped up the exile window and let me cast it again.

Would the exile zone be able to contain unrelated objects even with the exileId that's generated here?

UUID exileId = CardUtil.getExileZoneId(
controller.getId().toString()
+ "-" + game.getState().getTurnNum()
+ "-" + sourceObject.getIdName(), game
);

@JayDi85
Copy link
Member

JayDi85 commented Jan 20, 2021

Yes, it generates source related exile zone. Even without zcc (zcc is xmage's workaround to reset card as a new object after zone change). So another cards can be potentially puts cards here (from same object after blink, from same or another ability, etc).

I'll research that bug and response here later (is it fine or need improves).

@JayDi85 JayDi85 self-assigned this Jan 20, 2021
JayDi85 added a commit that referenced this pull request Jan 31, 2021
* AsThough: added documentation about code usage and restrictions;
* AsThough: added additional checks for correct usage;
* AsThough: simplified some code;
* PlayFromNotOwnHandZoneTargetEffect - added permanents support as targets;
* Release to the Wind - fixed that it can't cast exiled cards (#7415, #7416);
* Test framework: fixed that checkExileCount checking card's owner;
* GUI: fixed typo in Trample card icons;
@JayDi85
Copy link
Member

JayDi85 commented Jan 31, 2021

Original problem was in PlayFromNotOwnHandZoneTargetEffect -- it doesn't support permanents as a target. If you target a permanent on battlefield then game return PermanentCard or PermanentToken -- it still a Card interface, but not a real card (use getMainCard to find a real Card object from it).

Also PlayFromNotOwnHandZoneTargetEffect didn't make a difference between "play card" rule text (can play land and cast spell) and "cast card" rule text (can't play land but can cast spell).

It was fixed by 2d96d36.

Related changes for that issue:
shot_210131_223700
shot_210131_223846

@JayDi85 JayDi85 closed this Jan 31, 2021
@weirddan455 weirddan455 deleted the winds branch February 3, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants