Page 1 of 1

Added support for sacrifice to UnlessCost

PostPosted: 15 Jul 2012, 07:53
by ArsenalNut
I added the ability to use sacrifice costs for an UnlessCost. I only converted Rathi Dragon to the new capability because I wanted to make sure everyone was ok with implementation. I changed how the input works for choosing the cards to sacrifice. Clicking a card once adds it to the sacrifice list. Clicking a card again removes it from the list. The selected cards are displayed in the prompt panel. Once the required number of cards are chosen, the OK button gets enabled. The cards are only sacrificed after the OK button is pressed so the user can change or cancel their choices without removing the cards permanently.

Re: Added support for sacrifice to UnlessCost

PostPosted: 15 Jul 2012, 12:37
by friarsol
ArsenalNut wrote:I added the ability to use sacrifice costs for an UnlessCost. I only converted Rathi Dragon to the new capability because I wanted to make sure everyone was ok with implementation. I changed how the input works for choosing the cards to sacrifice. Clicking a card once adds it to the sacrifice list. Clicking a card again removes it from the list. The selected cards are displayed in the prompt panel. Once the required number of cards are chosen, the OK button gets enabled. The cards are only sacrificed after the OK button is pressed so the user can change or cancel their choices without removing the cards permanently.
This sounds good to me. Is it more intuitive to do left click to add to the list, right click to remove from the list? We already use this for Attacking and Blocking logics.

Re: Added support for sacrifice to UnlessCost

PostPosted: 15 Jul 2012, 14:26
by ArsenalNut
friarsol wrote:
ArsenalNut wrote:I added the ability to use sacrifice costs for an UnlessCost. I only converted Rathi Dragon to the new capability because I wanted to make sure everyone was ok with implementation. I changed how the input works for choosing the cards to sacrifice. Clicking a card once adds it to the sacrifice list. Clicking a card again removes it from the list. The selected cards are displayed in the prompt panel. Once the required number of cards are chosen, the OK button gets enabled. The cards are only sacrificed after the OK button is pressed so the user can change or cancel their choices without removing the cards permanently.
This sounds good to me. Is it more intuitive to do left click to add to the list, right click to remove from the list? We already use this for Attacking and Blocking logics.
To do the left click add, right click remove, I needed to add a new class that extends Input. I wanted to get feedback on the new input sequence to activate sacrifice before I added a new class. I can definitely implement it that way if that is the community's preference.

I also think it would make things more intuitive to a add visual clue indicating which cards are selected like a different colored highlight similar to the mouse over. I could not figure out where to begin to add such an effect. Any pointers?

Re: Added support for sacrifice to UnlessCost

PostPosted: 15 Jul 2012, 14:35
by friarsol
ArsenalNut wrote:I also think it would make things more intuitive to a add visual clue indicating which cards are selected like a different colored highlight similar to the mouse over. I could not figure out where to begin to add such an effect. Any pointers?
CardPanel.paintChildren() has the function that paints icons on top of images. We use this for Attacking/Blocking/Phasing etc. I had planned on using this (somehow) for "being currently used in cost payment" when I thought I might have time to handle it. I'm not sure what the best way would be, but we should be able to manage something?

Re: Added support for sacrifice to UnlessCost

PostPosted: 15 Jul 2012, 14:45
by Sloth
friarsol wrote:CardPanel.paintChildren() has the function that paints icons on top of images. We use this for Attacking/Blocking/Phasing etc. I had planned on using this (somehow) for "being currently used in cost payment" when I thought I might have time to handle it. I'm not sure what the best way would be, but we should be able to manage something?
We already had an icon for this. Was it made by you marc?

Re: Added support for sacrifice to UnlessCost

PostPosted: 15 Jul 2012, 18:01
by moomarc
Sloth wrote:
friarsol wrote:CardPanel.paintChildren() has the function that paints icons on top of images. We use this for Attacking/Blocking/Phasing etc. I had planned on using this (somehow) for "being currently used in cost payment" when I thought I might have time to handle it. I'm not sure what the best way would be, but we should be able to manage something?
We already had an icon for this. Was it made by you marc?
Yip. Originally made when Sol was working on something similar over here (link might be wrong if you have a different sort order, but its near the start of the thread). I'd probably redesign now to match our other card state icons, but its something for now.

Re: Added support for sacrifice to UnlessCost

PostPosted: 16 Jul 2012, 04:39
by ArsenalNut
Updated the Unless sacrifice functionality. It is now using a right click to unselect a card. The selections are also highlighted with a magenta boundary and an icon is put on each selection. I am using the graveyard icon right now because I didn't have anything nicer (hint hint Moomarc :)) I added the selection highlight to the border also, because the icons are hard to see for stacked cards.

Re: Added support for sacrifice to UnlessCost

PostPosted: 16 Jul 2012, 05:30
by moomarc
ArsenalNut wrote:Updated the Unless sacrifice functionality. It is now using a right click to unselect a card. The selections are also highlighted with a magenta boundary and an icon is put on each selection. I am using the graveyard icon right now because I didn't have anything nicer (hint hint Moomarc :)) I added the selection highlight to the border also, because the icons are hard to see for stacked cards.
Ooh, so you're trying to tell me that the old icon I linked to was too ugly! :cry: Just kidding. I'll throw something together later today.

Re: Added support for sacrifice to UnlessCost

PostPosted: 16 Jul 2012, 08:26
by moomarc
Okay, the new icon is in the sprite and I've linked up the coords etc. I kept it generic so that it can be used for other cost types if they get expanded to use the same system.