use of mage.abilities.condition.CompoundCondition in project mage by magefree.
the class SanctuaryInterveningIfTriggeredAbility method makeAndCondition.
private static Condition makeAndCondition(ObjectColor color1, ObjectColor color2) {
FilterPermanent filter1 = new FilterPermanent();
filter1.add(new ColorPredicate(color1));
Condition condition1 = new PermanentsOnTheBattlefieldCondition(filter1);
FilterPermanent filter2 = new FilterPermanent();
filter2.add(new ColorPredicate(color2));
Condition condition2 = new PermanentsOnTheBattlefieldCondition(filter2);
return new CompoundCondition(condition1, condition2);
}
Aggregations