Search in sources :

Example 1 with SwanSongBirdToken

use of mage.game.permanent.token.SwanSongBirdToken in project mage by magefree.

the class SwanSongEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    boolean countered = false;
    for (UUID targetId : targetPointer.getTargets(game, source)) {
        Spell spell = game.getStack().getSpell(targetId);
        if (game.getStack().counter(targetId, source, game)) {
            countered = true;
        }
        if (spell != null) {
            Token token = new SwanSongBirdToken();
            token.putOntoBattlefield(1, game, source, spell.getControllerId());
        }
    }
    return countered;
}
Also used : SwanSongBirdToken(mage.game.permanent.token.SwanSongBirdToken) SwanSongBirdToken(mage.game.permanent.token.SwanSongBirdToken) Token(mage.game.permanent.token.Token) UUID(java.util.UUID) FilterSpell(mage.filter.FilterSpell) Spell(mage.game.stack.Spell) TargetSpell(mage.target.TargetSpell)

Aggregations

UUID (java.util.UUID)1 FilterSpell (mage.filter.FilterSpell)1 SwanSongBirdToken (mage.game.permanent.token.SwanSongBirdToken)1 Token (mage.game.permanent.token.Token)1 Spell (mage.game.stack.Spell)1 TargetSpell (mage.target.TargetSpell)1