mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
reworked Conflux to use new RoleAssigner class
This commit is contained in:
parent
a6300e30e5
commit
dfdacfe5de
2 changed files with 64 additions and 106 deletions
|
|
@ -0,0 +1,24 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.dynamicvalue.RoleAssignment;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ColorAssignment extends RoleAssignment<String> {
|
||||
|
||||
public ColorAssignment() {
|
||||
super("W", "U", "B", "R", "G");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<String> makeSet(Card card, Game game) {
|
||||
Set<String> strings = new HashSet<>();
|
||||
for (char c : card.getColor(game).toString().toCharArray()) {
|
||||
strings.add("" + c);
|
||||
}
|
||||
return strings;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue