mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
implement [MKM] Agency Outfitter (#12034)
* Fix move cards log messages * Sludge Titan: Only track milled cards in public zones
This commit is contained in:
parent
ebdbdc494c
commit
f0740c6f09
6 changed files with 159 additions and 9 deletions
|
|
@ -4704,6 +4704,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
successfulMovedCards.add(permanent);
|
||||
if (!game.isSimulation()) {
|
||||
Player eventPlayer = game.getPlayer(info.event.getPlayerId());
|
||||
fromZone = info.event.getFromZone();
|
||||
if (eventPlayer != null && fromZone != null) {
|
||||
game.informPlayers(eventPlayer.getLogName() + " puts "
|
||||
+ GameLog.getColoredObjectIdName(permanent) + " from "
|
||||
|
|
|
|||
|
|
@ -6,10 +6,13 @@ import mage.cards.Card;
|
|||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetCard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
|
@ -21,7 +24,7 @@ import java.util.UUID;
|
|||
* <p>
|
||||
* almost identical to {@link TargetCardAndOrCardInLibrary}
|
||||
*/
|
||||
public class TargetCardAndOrCardInGraveyard extends TargetCardInGraveyard {
|
||||
public class TargetCardAndOrCard extends TargetCard {
|
||||
|
||||
private static FilterCard makeFilter(Predicate<? super Card> firstPredicate,
|
||||
Predicate<? super Card> secondPredicate,
|
||||
|
|
@ -42,25 +45,29 @@ public class TargetCardAndOrCardInGraveyard extends TargetCardInGraveyard {
|
|||
/**
|
||||
* a [firstType] card and/or a [secondType] card
|
||||
*/
|
||||
protected TargetCardAndOrCardInGraveyard(Predicate<? super Card> firstPredicate, Predicate<? super Card> secondPredicate, String filterText) {
|
||||
super(0, 2, makeFilter(firstPredicate, secondPredicate, filterText));
|
||||
protected TargetCardAndOrCard(Predicate<? super Card> firstPredicate, Predicate<? super Card> secondPredicate, String filterText) {
|
||||
super(0, 2, Zone.ALL, makeFilter(firstPredicate, secondPredicate, filterText));
|
||||
this.assignment = new PredicateCardAssignment(firstPredicate, secondPredicate);
|
||||
}
|
||||
|
||||
public TargetCardAndOrCardInGraveyard(CardType firstType, CardType secondType) {
|
||||
public TargetCardAndOrCard(String firstName, String secondName) {
|
||||
this(new NamePredicate(firstName), new NamePredicate(secondName), "a card named " + firstName + " and/or a card named " + secondName);
|
||||
}
|
||||
|
||||
public TargetCardAndOrCard(CardType firstType, CardType secondType) {
|
||||
this(firstType.getPredicate(), secondType.getPredicate(), makeFilterText(
|
||||
CardUtil.getTextWithFirstCharLowerCase(firstType.toString()),
|
||||
CardUtil.getTextWithFirstCharLowerCase(secondType.toString())));
|
||||
}
|
||||
|
||||
protected TargetCardAndOrCardInGraveyard(final TargetCardAndOrCardInGraveyard target) {
|
||||
protected TargetCardAndOrCard(final TargetCardAndOrCard target) {
|
||||
super(target);
|
||||
this.assignment = target.assignment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetCardAndOrCardInGraveyard copy() {
|
||||
return new TargetCardAndOrCardInGraveyard(this);
|
||||
public TargetCardAndOrCard copy() {
|
||||
return new TargetCardAndOrCard(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -10,6 +10,7 @@ import mage.constants.SubType;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
|
@ -52,6 +53,10 @@ public class TargetCardAndOrCardInLibrary extends TargetCardInLibrary {
|
|||
CardUtil.getTextWithFirstCharLowerCase(secondType.toString())));
|
||||
}
|
||||
|
||||
public TargetCardAndOrCardInLibrary(String firstName, String secondName) {
|
||||
this(new NamePredicate(firstName), new NamePredicate(secondName), "a card named " + firstName + " and/or a card named " + secondName);
|
||||
}
|
||||
|
||||
public TargetCardAndOrCardInLibrary(SubType firstType, SubType secondType) {
|
||||
this(firstType.getPredicate(), secondType.getPredicate(), makeFilterText(firstType.getDescription(), secondType.getDescription()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue