Search in sources :

Example 1 with PermanentInListPredicate

use of mage.filter.predicate.permanent.PermanentInListPredicate in project mage by magefree.

the class BalduvianWarlordUnblockEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());
    if (controller != null && permanent != null) {
        // Remove target creature from combat
        Effect effect = new RemoveFromCombatTargetEffect();
        effect.apply(game, source);
        // Make blocked creatures unblocked
        BlockedByOnlyOneCreatureThisCombatWatcher watcher = game.getState().getWatcher(BlockedByOnlyOneCreatureThisCombatWatcher.class);
        if (watcher != null) {
            Set<CombatGroup> combatGroups = watcher.getBlockedOnlyByCreature(permanent.getId());
            if (combatGroups != null) {
                for (CombatGroup combatGroup : combatGroups) {
                    if (combatGroup != null) {
                        combatGroup.setBlocked(false, game);
                    }
                }
            }
        }
        // Choose new creature to block
        if (permanent.isCreature(game)) {
            // according to the following mail response from MTG Rules Management about False Orders:
            // "if Player A attacks Players B and C, Player B's creatures cannot block creatures attacking Player C"
            // therefore we need to single out creatures attacking the target blocker's controller (disappointing, I know)
            List<Permanent> list = new ArrayList<>();
            for (CombatGroup combatGroup : game.getCombat().getGroups()) {
                if (combatGroup.getDefendingPlayerId().equals(permanent.getControllerId())) {
                    for (UUID attackingCreatureId : combatGroup.getAttackers()) {
                        Permanent targetsControllerAttacker = game.getPermanent(attackingCreatureId);
                        list.add(targetsControllerAttacker);
                    }
                }
            }
            Player targetsController = game.getPlayer(permanent.getControllerId());
            if (targetsController != null) {
                FilterAttackingCreature filter = new FilterAttackingCreature("creature attacking " + targetsController.getLogName());
                filter.add(new PermanentInListPredicate(list));
                TargetAttackingCreature target = new TargetAttackingCreature(1, 1, filter, true);
                if (target.canChoose(source.getSourceId(), controller.getId(), game)) {
                    while (!target.isChosen() && target.canChoose(source.getSourceId(), controller.getId(), game) && controller.canRespond()) {
                        controller.chooseTarget(outcome, target, source, game);
                    }
                } else {
                    return true;
                }
                Permanent chosenPermanent = game.getPermanent(target.getFirstTarget());
                if (chosenPermanent != null && chosenPermanent.isCreature(game)) {
                    CombatGroup chosenGroup = game.getCombat().findGroup(chosenPermanent.getId());
                    if (chosenGroup != null) {
                        // Relevant ruling for Balduvian Warlord:
                        // 7/15/2006 	If an attacking creature has an ability that triggers “When this creature becomes blocked,”
                        // it triggers when a creature blocks it due to the Warlord's ability only if it was unblocked at that point.
                        boolean notYetBlocked = chosenGroup.getBlockers().isEmpty();
                        chosenGroup.addBlockerToGroup(permanent.getId(), controller.getId(), game);
                        // 702.21h
                        game.getCombat().addBlockingGroup(permanent.getId(), chosenPermanent.getId(), controller.getId(), game);
                        if (notYetBlocked) {
                            game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, chosenPermanent.getId(), source, null));
                            Set<MageObjectReference> morSet = new HashSet<>();
                            morSet.add(new MageObjectReference(chosenPermanent, game));
                            for (UUID bandedId : chosenPermanent.getBandedCards()) {
                                CombatGroup bandedGroup = game.getCombat().findGroup(bandedId);
                                if (bandedGroup != null && chosenGroup.getBlockers().size() == 1) {
                                    morSet.add(new MageObjectReference(bandedId, game));
                                    game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, bandedId, source, null));
                                }
                            }
                            String key = UUID.randomUUID().toString();
                            game.getState().setValue("becameBlocked_" + key, morSet);
                            game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BATCH_BLOCK_NONCOMBAT, source.getSourceId(), source, source.getControllerId(), key, 0));
                        }
                        game.fireEvent(new BlockerDeclaredEvent(chosenPermanent.getId(), permanent.getId(), permanent.getControllerId()));
                    }
                    // a new blockingGroup is formed, so it's necessary to find it again
                    CombatGroup blockGroup = findBlockingGroup(permanent, game);
                    if (blockGroup != null) {
                        blockGroup.pickAttackerOrder(permanent.getControllerId(), game);
                    }
                }
            }
            return true;
        }
    }
    return false;
}
Also used : Player(mage.players.Player) PermanentInListPredicate(mage.filter.predicate.permanent.PermanentInListPredicate) Permanent(mage.game.permanent.Permanent) TargetPermanent(mage.target.TargetPermanent) FilterAttackingCreature(mage.filter.common.FilterAttackingCreature) RemoveFromCombatTargetEffect(mage.abilities.effects.common.RemoveFromCombatTargetEffect) TargetAttackingCreature(mage.target.common.TargetAttackingCreature) OneShotEffect(mage.abilities.effects.OneShotEffect) Effect(mage.abilities.effects.Effect) RemoveFromCombatTargetEffect(mage.abilities.effects.common.RemoveFromCombatTargetEffect) BlockedByOnlyOneCreatureThisCombatWatcher(mage.watchers.common.BlockedByOnlyOneCreatureThisCombatWatcher) BlockerDeclaredEvent(mage.game.events.BlockerDeclaredEvent) CombatGroup(mage.game.combat.CombatGroup) MageObjectReference(mage.MageObjectReference)

Example 2 with PermanentInListPredicate

use of mage.filter.predicate.permanent.PermanentInListPredicate in project mage by magefree.

the class BrineHagEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
    if (sourcePermanent != null) {
        List<Permanent> list = new ArrayList<>();
        for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
            Player player = game.getPlayer(playerId);
            if (player != null) {
                for (Permanent creature : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game)) {
                    if (sourcePermanent.getDealtDamageByThisTurn().contains(new MageObjectReference(creature.getId(), game))) {
                        list.add(creature);
                    }
                }
            }
        }
        if (!list.isEmpty()) {
            FilterCreaturePermanent filter = new FilterCreaturePermanent();
            filter.add(new PermanentInListPredicate(list));
            game.addEffect(new SetPowerToughnessAllEffect(0, 2, Duration.Custom, filter, true), source);
        }
        return true;
    }
    return false;
}
Also used : SetPowerToughnessAllEffect(mage.abilities.effects.common.continuous.SetPowerToughnessAllEffect) Player(mage.players.Player) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) PermanentInListPredicate(mage.filter.predicate.permanent.PermanentInListPredicate) Permanent(mage.game.permanent.Permanent) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) ArrayList(java.util.ArrayList) UUID(java.util.UUID) MageObjectReference(mage.MageObjectReference)

Example 3 with PermanentInListPredicate

use of mage.filter.predicate.permanent.PermanentInListPredicate in project mage by magefree.

the class FalseOrdersUnblockEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());
    if (controller == null || permanent == null) {
        return false;
    }
    // Remove target creature from combat
    Effect effect = new RemoveFromCombatTargetEffect();
    effect.apply(game, source);
    // Make blocked creatures unblocked
    BlockedByOnlyOneCreatureThisCombatWatcher watcher = game.getState().getWatcher(BlockedByOnlyOneCreatureThisCombatWatcher.class);
    if (watcher != null) {
        Set<CombatGroup> combatGroups = watcher.getBlockedOnlyByCreature(permanent.getId());
        if (combatGroups != null) {
            for (CombatGroup combatGroup : combatGroups) {
                if (combatGroup != null) {
                    combatGroup.setBlocked(false, game);
                }
            }
        }
    }
    if (!permanent.isCreature(game) || !controller.chooseUse(Outcome.Benefit, "Have " + permanent.getLogName() + " block an attacking creature?", source, game)) {
        return false;
    }
    // Choose new creature to block
    // according to the following mail response from MTG Rules Management about False Orders:
    // "if Player A attacks Players B and C, Player B's creatures cannot block creatures attacking Player C"
    // therefore we need to single out creatures attacking the target blocker's controller (disappointing, I know)
    List<Permanent> list = new ArrayList<>();
    for (CombatGroup combatGroup : game.getCombat().getGroups()) {
        if (combatGroup.getDefendingPlayerId().equals(permanent.getControllerId())) {
            for (UUID attackingCreatureId : combatGroup.getAttackers()) {
                Permanent targetsControllerAttacker = game.getPermanent(attackingCreatureId);
                list.add(targetsControllerAttacker);
            }
        }
    }
    Player targetsController = game.getPlayer(permanent.getControllerId());
    if (targetsController == null) {
        return false;
    }
    FilterAttackingCreature filter = new FilterAttackingCreature("creature attacking " + targetsController.getLogName());
    filter.add(new PermanentInListPredicate(list));
    TargetAttackingCreature target = new TargetAttackingCreature(1, 1, filter, true);
    if (target.canChoose(source.getSourceId(), controller.getId(), game)) {
        while (!target.isChosen() && target.canChoose(source.getSourceId(), controller.getId(), game) && controller.canRespond()) {
            controller.chooseTarget(outcome, target, source, game);
        }
    } else {
        return true;
    }
    Permanent chosenPermanent = game.getPermanent(target.getFirstTarget());
    if (chosenPermanent == null || !chosenPermanent.isCreature(game)) {
        return false;
    }
    CombatGroup chosenGroup = game.getCombat().findGroup(chosenPermanent.getId());
    if (chosenGroup != null) {
        // Relevant ruling for Balduvian Warlord:
        // 7/15/2006 	If an attacking creature has an ability that triggers “When this creature becomes blocked,”
        // it triggers when a creature blocks it due to the Warlord's ability only if it was unblocked at that point.
        boolean notYetBlocked = chosenGroup.getBlockers().isEmpty();
        chosenGroup.addBlockerToGroup(permanent.getId(), controller.getId(), game);
        // 702.21h
        game.getCombat().addBlockingGroup(permanent.getId(), chosenPermanent.getId(), controller.getId(), game);
        if (notYetBlocked) {
            game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, chosenPermanent.getId(), source, null));
            Set<MageObjectReference> morSet = new HashSet<>();
            morSet.add(new MageObjectReference(chosenPermanent, game));
            for (UUID bandedId : chosenPermanent.getBandedCards()) {
                CombatGroup bandedGroup = game.getCombat().findGroup(bandedId);
                if (bandedGroup != null && chosenGroup.getBlockers().size() == 1) {
                    morSet.add(new MageObjectReference(bandedId, game));
                    game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, bandedId, source, null));
                }
            }
            String key = UUID.randomUUID().toString();
            game.getState().setValue("becameBlocked_" + key, morSet);
            game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BATCH_BLOCK_NONCOMBAT, source.getSourceId(), source, source.getControllerId(), key, 0));
        }
        game.fireEvent(new BlockerDeclaredEvent(chosenPermanent.getId(), permanent.getId(), permanent.getControllerId()));
    }
    // a new blockingGroup is formed, so it's necessary to find it again
    CombatGroup blockGroup = findBlockingGroup(permanent, game);
    if (blockGroup != null) {
        blockGroup.pickAttackerOrder(permanent.getControllerId(), game);
    }
    return true;
}
Also used : Player(mage.players.Player) ObjectSourcePlayer(mage.filter.predicate.ObjectSourcePlayer) PermanentInListPredicate(mage.filter.predicate.permanent.PermanentInListPredicate) FilterPermanent(mage.filter.FilterPermanent) Permanent(mage.game.permanent.Permanent) TargetPermanent(mage.target.TargetPermanent) FilterAttackingCreature(mage.filter.common.FilterAttackingCreature) RemoveFromCombatTargetEffect(mage.abilities.effects.common.RemoveFromCombatTargetEffect) TargetAttackingCreature(mage.target.common.TargetAttackingCreature) OneShotEffect(mage.abilities.effects.OneShotEffect) Effect(mage.abilities.effects.Effect) RemoveFromCombatTargetEffect(mage.abilities.effects.common.RemoveFromCombatTargetEffect) BlockedByOnlyOneCreatureThisCombatWatcher(mage.watchers.common.BlockedByOnlyOneCreatureThisCombatWatcher) BlockerDeclaredEvent(mage.game.events.BlockerDeclaredEvent) CombatGroup(mage.game.combat.CombatGroup) MageObjectReference(mage.MageObjectReference)

Example 4 with PermanentInListPredicate

use of mage.filter.predicate.permanent.PermanentInListPredicate in project mage by magefree.

the class DrainPowerEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Player targetPlayer = game.getPlayer(source.getFirstTarget());
    if (targetPlayer != null) {
        List<Permanent> ignorePermanents = new ArrayList<>();
        Map<Permanent, List<ActivatedManaAbilityImpl>> manaAbilitiesMap = new HashMap<>();
        TargetPermanent target = null;
        while (true) {
            targetPlayer.setPayManaMode(true);
            manaAbilitiesMap.clear();
            for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, targetPlayer.getId(), game)) {
                if (!ignorePermanents.contains(permanent)) {
                    List<ActivatedManaAbilityImpl> manaAbilities = new ArrayList<>();
                    abilitySearch: for (Ability ability : permanent.getAbilities()) {
                        if (ability instanceof ActivatedAbility && ability.getAbilityType() == AbilityType.MANA) {
                            ActivatedManaAbilityImpl manaAbility = (ActivatedManaAbilityImpl) ability;
                            if (manaAbility.canActivate(targetPlayer.getId(), game).canActivate()) {
                                // so it's necessary to filter them out manually - might be buggy in some fringe cases
                                for (ManaCost manaCost : manaAbility.getManaCosts()) {
                                    if (!targetPlayer.getManaPool().getMana().includesMana(manaCost.getMana())) {
                                        continue abilitySearch;
                                    }
                                }
                                manaAbilities.add(manaAbility);
                            }
                        }
                    }
                    if (!manaAbilities.isEmpty()) {
                        manaAbilitiesMap.put(permanent, manaAbilities);
                    }
                }
            }
            if (manaAbilitiesMap.isEmpty()) {
                break;
            }
            List<Permanent> permList = new ArrayList<>(manaAbilitiesMap.keySet());
            Permanent permanent;
            if (permList.size() > 1 || target != null) {
                FilterLandPermanent filter2 = new FilterLandPermanent("land you control to tap for mana (remaining: " + permList.size() + ')');
                filter2.add(new PermanentInListPredicate(permList));
                target = new TargetPermanent(1, 1, filter2, true);
                while (!target.isChosen() && target.canChoose(source.getSourceId(), targetPlayer.getId(), game) && targetPlayer.canRespond()) {
                    targetPlayer.chooseTarget(Outcome.Neutral, target, source, game);
                }
                permanent = game.getPermanent(target.getFirstTarget());
            } else {
                permanent = permList.get(0);
            }
            if (permanent != null) {
                int i = 0;
                for (ActivatedManaAbilityImpl manaAbility : manaAbilitiesMap.get(permanent)) {
                    i++;
                    if (manaAbilitiesMap.get(permanent).size() <= i || targetPlayer.chooseUse(Outcome.Neutral, "Activate mana ability \"" + manaAbility.getRule() + "\" of " + permanent.getLogName() + "? (Choose \"no\" to activate next mana ability)", source, game)) {
                        boolean originalCanUndo = manaAbility.isUndoPossible();
                        // prevents being able to undo Drain Power
                        manaAbility.setUndoPossible(false);
                        if (targetPlayer.activateAbility(manaAbility, game)) {
                            ignorePermanents.add(permanent);
                        }
                        // resets undoPossible to its original state
                        manaAbility.setUndoPossible(originalCanUndo);
                        break;
                    }
                }
            }
        }
        targetPlayer.setPayManaMode(false);
        // 106.12. One card (Drain Power) causes one player to lose unspent mana and another to add “the mana lost this way.” (Note that these may be the same player.)
        // This empties the former player's mana pool and causes the mana emptied this way to be put into the latter player's mana pool. Which permanents, spells, and/or
        // abilities produced that mana are unchanged, as are any restrictions or additional effects associated with any of that mana.
        List<ManaPoolItem> manaItems = targetPlayer.getManaPool().getManaItems();
        targetPlayer.getManaPool().emptyPool(game);
        for (ManaPoolItem manaPoolItem : manaItems) {
            controller.getManaPool().addMana(manaPoolItem.isConditional() ? manaPoolItem.getConditionalMana() : manaPoolItem.getMana(), game, source, Duration.EndOfTurn.equals(manaPoolItem.getDuration()));
        }
        return true;
    }
    return false;
}
Also used : ActivatedAbility(mage.abilities.ActivatedAbility) Ability(mage.abilities.Ability) TargetPlayer(mage.target.TargetPlayer) Player(mage.players.Player) PermanentInListPredicate(mage.filter.predicate.permanent.PermanentInListPredicate) FilterLandPermanent(mage.filter.common.FilterLandPermanent) Permanent(mage.game.permanent.Permanent) TargetPermanent(mage.target.TargetPermanent) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ActivatedManaAbilityImpl(mage.abilities.mana.ActivatedManaAbilityImpl) ActivatedAbility(mage.abilities.ActivatedAbility) FilterLandPermanent(mage.filter.common.FilterLandPermanent) ManaPoolItem(mage.players.ManaPoolItem) ManaCost(mage.abilities.costs.mana.ManaCost) ArrayList(java.util.ArrayList) List(java.util.List) TargetPermanent(mage.target.TargetPermanent)

Example 5 with PermanentInListPredicate

use of mage.filter.predicate.permanent.PermanentInListPredicate in project mage by magefree.

the class RagingRiverEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
        List<Permanent> left = new ArrayList<>();
        List<Permanent> right = new ArrayList<>();
        for (UUID defenderId : game.getCombat().getPlayerDefenders(game)) {
            Player defender = game.getPlayer(defenderId);
            if (defender != null) {
                List<Permanent> leftLog = new ArrayList<>();
                List<Permanent> rightLog = new ArrayList<>();
                FilterControlledCreaturePermanent filterBlockers = new FilterControlledCreaturePermanent("creatures without flying you control to assign to the \"left\" pile (creatures not chosen will be assigned to the \"right\" pile)");
                filterBlockers.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
                Target target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filterBlockers, true);
                if (target.canChoose(source.getSourceId(), defenderId, game)) {
                    if (defender.chooseTarget(Outcome.Neutral, target, source, game)) {
                        for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), defenderId, game)) {
                            if (target.getTargets().contains(permanent.getId())) {
                                left.add(permanent);
                                leftLog.add(permanent);
                            } else if (filterBlockers.match(permanent, source.getSourceId(), defenderId, game)) {
                                right.add(permanent);
                                rightLog.add(permanent);
                            }
                        }
                    }
                    // it could be nice to invoke some graphic indicator of which creature is Left or Right in this spot
                    StringBuilder sb = new StringBuilder("Left pile of ").append(defender.getLogName()).append(": ");
                    sb.append(leftLog.stream().map(MageObject::getLogName).collect(Collectors.joining(", ")));
                    game.informPlayers(sb.toString());
                    sb = new StringBuilder("Right pile of ").append(defender.getLogName()).append(": ");
                    sb.append(rightLog.stream().map(MageObject::getLogName).collect(Collectors.joining(", ")));
                    game.informPlayers(sb.toString());
                }
            }
        }
        for (UUID attackers : game.getCombat().getAttackers()) {
            Permanent attacker = game.getPermanent(attackers);
            if (attacker != null && Objects.equals(attacker.getControllerId(), controller.getId())) {
                CombatGroup combatGroup = game.getCombat().findGroup(attacker.getId());
                if (combatGroup != null) {
                    FilterCreaturePermanent filter = new FilterCreaturePermanent();
                    Player defender = game.getPlayer(combatGroup.getDefendingPlayerId());
                    if (defender != null) {
                        if (left.isEmpty() && right.isEmpty()) {
                            // shortcut in case of no labeled blockers available
                            filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
                        } else {
                            List<Permanent> leftLog = left.stream().filter(permanent -> permanent.getControllerId() != null).filter(permanent -> permanent.isControlledBy(defender.getId())).collect(Collectors.toList());
                            List<Permanent> rightLog = right.stream().filter(permanent -> permanent.getControllerId() != null).filter(permanent -> permanent.isControlledBy(defender.getId())).collect(Collectors.toList());
                            if (controller.choosePile(outcome, attacker.getName() + ": attacking " + defender.getName(), leftLog, rightLog, game)) {
                                filter.add(Predicates.not(Predicates.or(new AbilityPredicate(FlyingAbility.class), new PermanentInListPredicate(left))));
                                game.informPlayers(attacker.getLogName() + ": attacks left (" + defender.getLogName() + ")");
                            } else {
                                filter.add(Predicates.not(Predicates.or(new AbilityPredicate(FlyingAbility.class), new PermanentInListPredicate(right))));
                                game.informPlayers(attacker.getLogName() + ": attacks right (" + defender.getLogName() + ")");
                            }
                        }
                        RestrictionEffect effect = new CantBeBlockedByAllTargetEffect(filter, Duration.EndOfCombat);
                        effect.setTargetPointer(new FixedTarget(attacker.getId(), game));
                        game.addEffect(effect, source);
                    }
                }
            }
        }
        return true;
    }
    return false;
}
Also used : Target(mage.target.Target) RestrictionEffect(mage.abilities.effects.RestrictionEffect) CantBeBlockedByAllTargetEffect(mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect) Predicates(mage.filter.predicate.Predicates) Player(mage.players.Player) FixedTarget(mage.target.targetpointer.FixedTarget) ArrayList(java.util.ArrayList) AttacksWithCreaturesTriggeredAbility(mage.abilities.common.AttacksWithCreaturesTriggeredAbility) CardType(mage.constants.CardType) FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) MageObject(mage.MageObject) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) CombatGroup(mage.game.combat.CombatGroup) FlyingAbility(mage.abilities.keyword.FlyingAbility) PermanentInListPredicate(mage.filter.predicate.permanent.PermanentInListPredicate) Outcome(mage.constants.Outcome) OneShotEffect(mage.abilities.effects.OneShotEffect) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) CardSetInfo(mage.cards.CardSetInfo) Objects(java.util.Objects) Duration(mage.constants.Duration) Game(mage.game.Game) List(java.util.List) CardImpl(mage.cards.CardImpl) Permanent(mage.game.permanent.Permanent) AbilityPredicate(mage.filter.predicate.mageobject.AbilityPredicate) TargetControlledCreaturePermanent(mage.target.common.TargetControlledCreaturePermanent) Ability(mage.abilities.Ability) FixedTarget(mage.target.targetpointer.FixedTarget) Player(mage.players.Player) PermanentInListPredicate(mage.filter.predicate.permanent.PermanentInListPredicate) FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) Permanent(mage.game.permanent.Permanent) TargetControlledCreaturePermanent(mage.target.common.TargetControlledCreaturePermanent) ArrayList(java.util.ArrayList) FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) MageObject(mage.MageObject) TargetControlledCreaturePermanent(mage.target.common.TargetControlledCreaturePermanent) Target(mage.target.Target) FixedTarget(mage.target.targetpointer.FixedTarget) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) FlyingAbility(mage.abilities.keyword.FlyingAbility) UUID(java.util.UUID) RestrictionEffect(mage.abilities.effects.RestrictionEffect) AbilityPredicate(mage.filter.predicate.mageobject.AbilityPredicate) CombatGroup(mage.game.combat.CombatGroup) CantBeBlockedByAllTargetEffect(mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect)

Aggregations

PermanentInListPredicate (mage.filter.predicate.permanent.PermanentInListPredicate)6 Permanent (mage.game.permanent.Permanent)6 Player (mage.players.Player)6 ArrayList (java.util.ArrayList)4 CombatGroup (mage.game.combat.CombatGroup)4 List (java.util.List)3 UUID (java.util.UUID)3 MageObjectReference (mage.MageObjectReference)3 OneShotEffect (mage.abilities.effects.OneShotEffect)3 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)3 BlockerDeclaredEvent (mage.game.events.BlockerDeclaredEvent)3 TargetPermanent (mage.target.TargetPermanent)3 HashMap (java.util.HashMap)2 Ability (mage.abilities.Ability)2 Effect (mage.abilities.effects.Effect)2 RemoveFromCombatTargetEffect (mage.abilities.effects.common.RemoveFromCombatTargetEffect)2 FilterAttackingCreature (mage.filter.common.FilterAttackingCreature)2 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)2 Target (mage.target.Target)2 TargetAttackingCreature (mage.target.common.TargetAttackingCreature)2