Mandatory targets
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
Re: Mandatory targets
by 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.
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;
}
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: Mandatory targets
by 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.
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
by LevelX » 23 Jun 2014, 14:01
Agreed, but it didn't work.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.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: Mandatory targets
by 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
https://github.com/magefree/mage/commit/5ae1f6306bb1ea7db6c9e74cb6c21f3a20d133da
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: Mandatory targets
by 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
20 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 9 guests