It is currently 28 Apr 2024, 16:59
   
Text Size

Mandatory targets

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

Re: Mandatory targets

Postby LevelX » 22 Jun 2014, 23:39

I had to modify the condition to take care about minNumTargets = 0.
However, that doesn't handle situations where minNumTargets > 0 && minNumTargets < maxNumtargets, where the "Done" Button has to work also.
Seems like there is no such call of the method yet.

Code: Select all
    public TargetCardInLibrary(int minNumTargets, int maxNumTargets, FilterCard filter) {
        super(minNumTargets, maxNumTargets, Zone.LIBRARY, filter);
       
        this.setRequired(minNumTargets > 0 && !filter.hasPredicates());
        this.librarySearchLimit = Integer.MAX_VALUE;
    }
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Mandatory targets

Postby quercitron » 23 Jun 2014, 13:41

I'm not sure it should be handled this way. I think required status and number of targets should be independent on this level. If target is required, it just means that at least minNumTargets have to be chosen, if possible.
I'll investigate how this issue can be solved.
quercitron
 
Posts: 17
Joined: 09 Nov 2011, 08:32
Has thanked: 0 time
Been thanked: 1 time

Re: Mandatory targets

Postby LevelX » 23 Jun 2014, 14:01

quercitron wrote:I'm not sure it should be handled this way. I think required status and number of targets should be independent on this level. If target is required, it just means that at least minNumTargets have to be chosen, if possible.
Agreed, but it didn't work.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Mandatory targets

Postby LevelX » 24 Jun 2014, 23:38

Had to do some more change to target to fix bug with Kruphix’s Insight and probably more cards.

https://github.com/magefree/mage/commit/5ae1f6306bb1ea7db6c9e74cb6c21f3a20d133da
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Mandatory targets

Postby quercitron » 28 Jun 2014, 23:12

I've moved handling of cases when minNumTargets < maxNumTargets to HumanPlayer implementation. I hope it will work right.
quercitron
 
Posts: 17
Joined: 09 Nov 2011, 08:32
Has thanked: 0 time
Been thanked: 1 time

Previous

Return to Developers Talk

Who is online

Users browsing this forum: No registered users and 9 guests


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 9 guests

Login Form