forked from External/mage
Add Subtype to the CardAttribute Framework
This is a massive change. I’ve refrained from unrelated refactoring when possible but there are still a lot of changes here.
This commit is contained in:
parent
a1a3c0c6a7
commit
282443c231
272 changed files with 514 additions and 493 deletions
|
|
@ -118,7 +118,7 @@ public class CardUtil {
|
|||
* @param card2
|
||||
* @return
|
||||
*/
|
||||
public static boolean shareSubtypes(Card card1, Card card2) {
|
||||
public static boolean shareSubtypes(Card card1, Card card2, Game game) {
|
||||
|
||||
if (card1 == null || card2 == null) {
|
||||
throw new IllegalArgumentException("Params can't be null");
|
||||
|
|
@ -126,14 +126,14 @@ public class CardUtil {
|
|||
|
||||
if (card1.getCardType().contains(CardType.CREATURE) && card2.getCardType().contains(CardType.CREATURE)) {
|
||||
if (card1.getAbilities().contains(ChangelingAbility.getInstance())
|
||||
|| card1.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)
|
||||
|| card1.getSubtype(game).contains(ChangelingAbility.ALL_CREATURE_TYPE)
|
||||
|| card2.getAbilities().contains(ChangelingAbility.getInstance())
|
||||
|| card2.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)) {
|
||||
|| card2.getSubtype(game).contains(ChangelingAbility.ALL_CREATURE_TYPE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (String subtype : card1.getSubtype()) {
|
||||
if (card2.getSubtype().contains(subtype)) {
|
||||
for (String subtype : card1.getSubtype(game)) {
|
||||
if (card2.getSubtype(game).contains(subtype)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue