Closed magenoxx closed 10 years ago
instants are not displayed with yellow anymore when choosing creatures to attack with all cards are displayed with yellow on discard now
now creatures that can attack also are marked with yellow
note: for some reason when you undo selecting attacker with "Undo" - yellow frame don't appear. but it appears if you undo with the card click. needs to be investigated.
What about abilities like Cycling? I'm now used to the yellow frames and I guess it would be nice to see if I can use at all any ability of a hand card. If I can cycle a hand card (e.g. Tranquil Thicket) I get no yellow frame now. Other example: BloodrushAbility.
Mabe something that can also be improved: Cards that can't be played because of not given conditions (implemented with replacement effects) , will be shown as playable also if they are not playable.
Examples:
!!! OK, I checked this and all the effect here, that restrict if a card can be cast ar no replacement effects. All of them are continuous effects that change the rules. So they are not correctly implemented in XMage.
Cycling - done
Rakdos, Lord of Riots is not implemented correctly. We need some other way for restriction effects.
Actually yellow frames are added with the help of PlayerImpl.canPlay() method. We can call continuous effects there as we do with cost modification effects: game.getContinuousEffects().costModification(copy, game);
So we need similar solution. Maybe something like (pseudo code): game.getContinuousEffects().restrictPaymentOrActivation(copy, game); if (!copy.canActivate) { return false; }
Yes, the Rakdos restriction was implemented as a cost. I changed it to use a replacement effect, like other cards with this type of restriction are implemented. That fixed the out of memory bug. But this implementation is also not correct. As pointed out in issue #474, this kind of effects are rule changing layered continuous effects.
I' going to implement a solution in the next days (first for the effects concerning the cast event), that can (I hope so) the canPlay() check taken into account.
So after this planned change the show playable frame will be drawn correctly concerning this kind of cards.
another bug with the filter lands:
Another thing that should be changed is that instants have the yellow frame also if the player has no priority to play something.
Another thing to add. Select cards in hand (like cost of Dream Halls) should also add a frame to the cards that can be selected.
@magenoxx What about to color the frames for select attacking / blocking or discard in other colors? That would be a useful additional optical information. Like e.g. red for discard and blue for attack.
Extracted from comment: https://github.com/magefree/mage/commit/5dc2a1b8f52daaa0b2b6a20542233d9e4ffc3cbb#commitcomment-7014361
Showing the playable cards, marks the instants also with a yellow frame in steps where it's not possible to play an instant. E.g. Declare attackers step, declare blockers stap and also Cleanup phase where I discard cards above my hand limit.
It would be better to not highlight instants in this phase.
More logical would be if in declare attacker step only possible attackers get a yellow frame. Declare blockers Step: First all possible blockers and as soon as a blocker was selected all attackers are highlighted he is able to block. And in cleanup phase - discard step, all hand cards have a yellow frame because all can be selected for discard.