use of mage.game.events.EntersTheBattlefieldEvent in project mage by magefree.
the class BorealOutriderEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
if (creature != null) {
creature.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game, event.getAppliedEffects());
discard();
}
return false;
}
use of mage.game.events.EntersTheBattlefieldEvent in project mage by magefree.
the class KalainReclusivePainterEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
if (creature == null) {
return false;
}
int manaPaid = ManaPaidSourceWatcher.getTreasurePaid(creature.getId(), game);
if (manaPaid < 1) {
return false;
}
creature.addCounters(CounterType.P1P1.createInstance(manaPaid), source.getControllerId(), source, game, event.getAppliedEffects());
return false;
}
use of mage.game.events.EntersTheBattlefieldEvent in project mage by magefree.
the class LongRoadHomeEntersBattlefieldEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
if (permanent != null) {
permanent.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game, event.getAppliedEffects());
// use only once
discard();
}
return false;
}
use of mage.game.events.EntersTheBattlefieldEvent in project mage by magefree.
the class AddCounterTargetReplacementEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
if (creature == null) {
return false;
}
creature.addCounters(counter.copy(), source.getControllerId(), source, game, event.getAppliedEffects());
discard();
return false;
}
use of mage.game.events.EntersTheBattlefieldEvent in project mage by magefree.
the class AddCounterSourceReplacementEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
if (creature == null) {
return false;
}
creature.addCounters(counter.copy(), source.getControllerId(), source, game, event.getAppliedEffects());
discard();
return false;
}
Aggregations