4 DSK + 7 DSC cards (#6099)

* Support The Tale of Tamiyo

* Support Kianne, Corrupted Memory
This commit is contained in:
Fulgur14
2024-09-11 12:24:44 +02:00
committed by GitHub
parent bd1f48d530
commit d76b798526
18 changed files with 130 additions and 25 deletions

View File

@@ -3999,7 +3999,7 @@ public class CardFactoryUtil {
" | Description$ Horsemanship (" + inst.getReminderText() + ")";
inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic));
} else if (keyword.equals("Intimidate")) {
String effect = "Mode$ CantBlockBy | ValidAttacker$ Creature.Self | ValidBlocker$ Creature.nonArtifact+notSharesColorWith | Secondary$ True " +
String effect = "Mode$ CantBlockBy | ValidAttacker$ Creature.Self | ValidBlocker$ Creature.nonArtifact+!SharesColorWith | Secondary$ True " +
" | Description$ Intimidate (" + inst.getReminderText() + ")";
inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic));
} else if (keyword.startsWith("Landwalk")) {

View File

@@ -726,7 +726,6 @@ public class CardProperty {
}
final String restriction = property.split("SharesColorWith ")[1];
switch (restriction) {
case "MostProminentColor":
byte mask = CardFactoryUtil.getMostProminentColors(game.getCardsIn(ZoneType.Battlefield));
@@ -778,19 +777,6 @@ public class CardProperty {
byte mostProm = CardFactoryUtil.getMostProminentColors(game.getCardsIn(ZoneType.Battlefield));
return ColorSet.fromMask(mostProm).hasAnyColor(MagicColor.fromName(color));
} else if (property.startsWith("notSharesColorWith")) {
if (property.equals("notSharesColorWith")) {
if (card.sharesColorWith(source)) {
return false;
}
} else {
final String restriction = property.split("notSharesColorWith ")[1];
for (final Card c : sourceController.getCardsIn(ZoneType.Battlefield)) {
if (c.isValid(restriction, sourceController, source, spellAbility) && card.sharesColorWith(c)) {
return false;
}
}
}
} else if (property.startsWith("MostProminentCreatureTypeInLibrary")) {
final CardCollectionView list = sourceController.getCardsIn(ZoneType.Library);
for (String s : CardFactoryUtil.getMostProminentCreatureType(list)) {
@@ -849,6 +835,14 @@ public class CardProperty {
return false;
}
} else {
// Special case to prevent list from comparing with itself
if (property.startsWith("sharesCardTypeWithOther")) {
final String restriction = property.split("sharesCardTypeWithOther ")[1];
CardCollection list = AbilityUtils.getDefinedCards(source, restriction, spellAbility);
list.remove(card);
return Iterables.any(list, CardPredicates.sharesCardTypeWith(card));
}
final String restriction = property.split("sharesCardTypeWith ")[1];
switch (restriction) {
case "Imprinted":
@@ -1507,6 +1501,14 @@ public class CardProperty {
if (card.getCMC() % 2 != 1) {
return false;
}
} else if (property.equals("powerEven")) {
if (card.getNetPower() % 2 != 0) {
return false;
}
} else if (property.equals("powerOdd")) {
if (card.getNetPower() % 2 != 1) {
return false;
}
} else if (property.equals("cmcChosenEvenOdd")) {
if (!source.hasChosenEvenOdd()) {
return false;