use of mage.abilities.effects.common.continuous.BoostControlledEffect in project mage by magefree.
the class BoldDefenseEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
if (KickedCondition.instance.apply(game, source)) {
game.addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn), source);
game.addEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE), source);
} else {
game.addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn), source);
}
return true;
}
use of mage.abilities.effects.common.continuous.BoostControlledEffect in project mage by magefree.
the class RitesOfInitiationEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
int numToDiscard = player.getAmount(0, player.getHand().size(), "Discard how many cards at random?", game);
player.discard(numToDiscard, true, false, source, game);
game.addEffect(new BoostControlledEffect(numToDiscard, 0, Duration.EndOfTurn), source);
return true;
}
return false;
}
use of mage.abilities.effects.common.continuous.BoostControlledEffect in project mage by magefree.
the class GuulDrazOverseerEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent land = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (controller != null && land != null) {
int boost = 1;
if (land.hasSubtype(SubType.SWAMP, game)) {
boost = 2;
}
game.addEffect(new BoostControlledEffect(boost, 0, Duration.EndOfTurn, true), source);
return true;
}
return false;
}
use of mage.abilities.effects.common.continuous.BoostControlledEffect in project mage by magefree.
the class CamaraderieEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int xValue = game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getSourceId(), source.getControllerId(), game);
player.gainLife(xValue, game, source);
player.drawCards(xValue, source, game);
game.addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn), source);
return true;
}
Aggregations