use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.
the class ElvishBranchbenderToken method apply.
@Override
public boolean apply(Game game, Ability source) {
int xValue = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
// fix
ContinuousEffect effect = new BecomesCreatureTargetEffect(new ElvishBranchbenderToken(xValue), false, false, Duration.EndOfTurn);
effect.setTargetPointer(targetPointer);
game.addEffect(effect, source);
return false;
}
use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.
the class AwakenElementalToken method apply.
@Override
public boolean apply(Game game, Ability source) {
UUID targetId = null;
for (Target target : source.getTargets()) {
targetId = target.getFirstTarget();
}
if (targetId != null) {
FixedTarget fixedTarget = new FixedTarget(targetId, game);
ContinuousEffect continuousEffect = new BecomesCreatureTargetEffect(new AwakenElementalToken(), false, true, Duration.EndOfGame);
continuousEffect.setTargetPointer(fixedTarget);
game.addEffect(continuousEffect, source);
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3));
effect.setTargetPointer(fixedTarget);
return effect.apply(game, source);
}
return true;
}
use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.
the class PrimalAdversaryToken method apply.
@Override
public boolean apply(Game game, Ability source) {
Integer timesPaid = (Integer) getValue("timesPaid");
if (timesPaid == null || timesPaid <= 0) {
return false;
}
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(timesPaid)), false, staticText);
ability.addEffect(new BecomesCreatureTargetEffect(new PrimalAdversaryToken(), false, true, Duration.Custom));
ability.addTarget(new TargetPermanent(0, timesPaid, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS));
game.fireReflexiveTriggeredAbility(ability, source);
return true;
}
use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.
the class EmergentSequenceWatcher method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
// put land
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A);
player.searchLibrary(target, source, game);
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
Permanent permanent = null;
if (card != null) {
player.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
permanent = game.getPermanent(target.getFirstTarget());
}
player.shuffleLibrary(source, game);
if (permanent == null) {
return true;
}
// boost land
game.addEffect(new BecomesCreatureTargetEffect(new FractalToken(), false, true, Duration.Custom).setTargetPointer(new FixedTarget(permanent, game)), source);
// rules
// The last sentence of Emergent Sequence’s ability counts the land it put onto the battlefield.
// (2021-04-16)
// no ETB yet, so add +1 manually
int amount = 1 + EmergentSequenceWatcher.getAmount(source.getControllerId(), game);
permanent.addCounters(CounterType.P1P1.createInstance(amount), source.getControllerId(), source, game);
return true;
}
use of mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect in project mage by magefree.
the class DestinySpinnerEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int pt = DestinySpinnerCount.instance.calculate(game, source, this);
game.addEffect(new BecomesCreatureTargetEffect(new CreatureToken(pt, pt, "").withSubType(SubType.ELEMENTAL).withAbility(TrampleAbility.getInstance()).withAbility(HasteAbility.getInstance()), false, true, Duration.EndOfTurn), source);
return true;
}
Aggregations