use of mage.abilities.effects.common.LoseLifeTargetEffect in project mage by magefree.
the class DefiantBloodlordTriggeredAbility method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getPlayerId().equals(this.controllerId)) {
this.getEffects().clear();
this.addEffect(new LoseLifeTargetEffect(event.getAmount()));
return true;
}
return false;
}
use of mage.abilities.effects.common.LoseLifeTargetEffect in project mage by magefree.
the class CurseOfFoolsWisdomTriggeredAbility method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Permanent enchantment = game.getPermanentOrLKIBattlefield(getSourceId());
if (enchantment == null || !event.getPlayerId().equals(enchantment.getAttachedTo())) {
return false;
}
this.getEffects().clear();
Effect effect = new LoseLifeTargetEffect(2);
effect.setTargetPointer(new FixedTarget(event.getPlayerId(), game));
this.addEffect(effect);
this.addEffect(new GainLifeEffect(2));
return true;
}
use of mage.abilities.effects.common.LoseLifeTargetEffect in project mage by magefree.
the class VitoThornOfTheDuskRoseTriggeredAbility method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getPlayerId().equals(getControllerId())) {
MageObject mageObject = game.getObject(event.getSourceId());
this.getEffects().clear();
this.getHints().clear();
this.addHint(new StaticHint("Lose life amount: " + event.getAmount()));
if (mageObject != null) {
this.addHint(new StaticHint("Caused by: " + mageObject.getLogName()));
}
this.addEffect(new LoseLifeTargetEffect(event.getAmount()));
return true;
}
return false;
}
use of mage.abilities.effects.common.LoseLifeTargetEffect in project mage by magefree.
the class CalculatingLichTriggeredAbility method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Player player = game.getPlayer(getControllerId());
UUID defenderId = game.getCombat().getDefenderId(event.getSourceId());
if (player == null || !player.hasOpponent(defenderId, game)) {
return false;
}
getEffects().clear();
addEffect(new LoseLifeTargetEffect(1).setTargetPointer(new FixedTarget(defenderId, game)));
return true;
}
use of mage.abilities.effects.common.LoseLifeTargetEffect in project mage by magefree.
the class FalseCureTriggeredAbility method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
this.getEffects().clear();
Effect effect = new LoseLifeTargetEffect(2 * event.getAmount());
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
this.addEffect(effect);
return true;
}
Aggregations