magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.9k stars 774 forks source link

More changes for hand cards yellow frames #467

Closed magenoxx closed 10 years ago

magenoxx commented 10 years ago

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.

a1ea312e-0c31-11e4-9c7b-f312a5d97f17

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.

magenoxx commented 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

magenoxx commented 10 years ago

now creatures that can attack also are marked with yellow

magenoxx commented 10 years ago

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.

LevelX2 commented 10 years ago

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.

LevelX2 commented 10 years ago

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.

magenoxx commented 10 years ago

Cycling - done

magenoxx commented 10 years ago

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; }

LevelX2 commented 10 years ago

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.

magenoxx commented 10 years ago

another bug with the filter lands: image 24-07-14 at 20 17

LevelX2 commented 10 years ago

Another thing that should be changed is that instants have the yellow frame also if the player has no priority to play something.

instantsyellowwithout havingpriority

LevelX2 commented 10 years ago

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.

LevelX2 commented 10 years ago

@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.

magenoxx commented 10 years ago

made attackers marking with blue 0e2255f