DomainValue()
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
DomainValue()
by LokiX » 27 Mar 2015, 17:10
Hi,
I'm trying to implement Allied Strategies, however that card needs the domain count of the target player not of the controller, XMage DomainValue() currently doesn't support this, and so I thought of adding another method 'calculate' to the existing DomainValue class which would be something like this
Or do you guys have any other suggestion that I might be missing?
I'm trying to implement Allied Strategies, however that card needs the domain count of the target player not of the controller, XMage DomainValue() currently doesn't support this, and so I thought of adding another method 'calculate' to the existing DomainValue class which would be something like this
- Code: Select all
public int calculate(Game game, Player target, Effect effect)
Or do you guys have any other suggestion that I might be missing?
Re: DomainValue()
by LevelX » 28 Mar 2015, 08:44
A new calculate method is no good idea. It wouldn't be compatible with the existing classes that use DynamicValues.
I would simply add a new boolean parameter to the DomainValue() class.
So the constructors would look like this.
I would simply add a new boolean parameter to the DomainValue() class.
So the constructors would look like this.
- Code: Select all
public DomainValue() {
this(1);
}
public DomainValue(boolean countTargetPlayer){
this(1, countTargetPlayer);
}
public DomainValue(Integer amount){
this(amount, false);
}
public DomainValue(Integer amount, boolean countTargetPlayer){
this.amount = amount;
}
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: DomainValue()
by LokiX » 28 Mar 2015, 18:52
Thanks, LevelX.
I had to modify it a bit for it to work but I think I got the general idea.
Will make a PR in a bit.
Thanks, again.
I had to modify it a bit for it to work but I think I got the general idea.
Will make a PR in a bit.
Thanks, again.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests