use of mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect in project mage by magefree.
the class HuntedWumpusEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
if (!playerId.equals(controller.getId())) {
Effect effect = new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A, true);
effect.setTargetPointer(new FixedTarget(playerId));
effect.apply(game, source);
}
}
return true;
}
return false;
}
use of mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect in project mage by magefree.
the class CovertTechnicianEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int damage = (Integer) getValue("damage");
FilterCard filter = new FilterArtifactCard("artifact card with mana value " + damage + " or less");
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, damage + 1));
return new PutCardFromHandOntoBattlefieldEffect(filter).apply(game, source);
}
Aggregations