mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
updated some more cards with Role Assignment
This commit is contained in:
parent
dfdacfe5de
commit
2ca3a8a62a
3 changed files with 67 additions and 64 deletions
|
|
@ -0,0 +1,24 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.dynamicvalue.RoleAssignment;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CardTypeAssignment extends RoleAssignment<CardType> {
|
||||
|
||||
public CardTypeAssignment(CardType... subTypes) {
|
||||
super(subTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<CardType> makeSet(Card card, Game game) {
|
||||
return attributes
|
||||
.stream()
|
||||
.filter(subType -> card.getCardType().contains(subType))
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue