Search in sources :

Example 1 with ThopterColorlessToken

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

the class LoyalApprenticeEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Token token = new ThopterColorlessToken();
    token.putOntoBattlefield(1, game, source, source.getControllerId());
    game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setTargetPointer(new FixedTargets(token.getLastAddedTokenIds().stream().map(game::getPermanent).filter(Objects::nonNull).collect(Collectors.toList()), game)), source);
    return true;
}
Also used : ThopterColorlessToken(mage.game.permanent.token.ThopterColorlessToken) FixedTargets(mage.target.targetpointer.FixedTargets) GainAbilityTargetEffect(mage.abilities.effects.common.continuous.GainAbilityTargetEffect) Objects(java.util.Objects) Token(mage.game.permanent.token.Token) ThopterColorlessToken(mage.game.permanent.token.ThopterColorlessToken)

Aggregations

Objects (java.util.Objects)1 GainAbilityTargetEffect (mage.abilities.effects.common.continuous.GainAbilityTargetEffect)1 ThopterColorlessToken (mage.game.permanent.token.ThopterColorlessToken)1 Token (mage.game.permanent.token.Token)1 FixedTargets (mage.target.targetpointer.FixedTargets)1