Search in sources :

Example 1 with StaticHint

use of mage.abilities.hint.StaticHint 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;
}
Also used : MageObject(mage.MageObject) LoseLifeTargetEffect(mage.abilities.effects.common.LoseLifeTargetEffect) StaticHint(mage.abilities.hint.StaticHint)

Aggregations

MageObject (mage.MageObject)1 LoseLifeTargetEffect (mage.abilities.effects.common.LoseLifeTargetEffect)1 StaticHint (mage.abilities.hint.StaticHint)1