Search in sources :

Example 1 with ReboundAbility

use of mage.abilities.keyword.ReboundAbility in project mage by magefree.

the class NarsetTranscendentGainReboundEffect method addReboundAbility.

private void addReboundAbility(Card card, Game game) {
    boolean found = false;
    for (Ability ability : card.getAbilities(game)) {
        if (ability instanceof ReboundAbility) {
            found = true;
            break;
        }
    }
    if (!found) {
        Ability ability = new ReboundAbility();
        game.getState().addOtherAbility(card, ability);
    }
}
Also used : LoyaltyAbility(mage.abilities.LoyaltyAbility) DelayedTriggeredAbility(mage.abilities.DelayedTriggeredAbility) ReboundAbility(mage.abilities.keyword.ReboundAbility) Ability(mage.abilities.Ability) ReboundAbility(mage.abilities.keyword.ReboundAbility)

Example 2 with ReboundAbility

use of mage.abilities.keyword.ReboundAbility in project mage by magefree.

the class GainReboundEffect method addReboundAbility.

private void addReboundAbility(Card card, Game game) {
    if (CastThroughTime.filter.match(card, game)) {
        boolean found = card.getAbilities(game).containsClass(ReboundAbility.class);
        if (!found) {
            Ability ability = new ReboundAbility();
            game.getState().addOtherAbility(card, ability);
        }
    }
}
Also used : SimpleStaticAbility(mage.abilities.common.SimpleStaticAbility) ReboundAbility(mage.abilities.keyword.ReboundAbility) Ability(mage.abilities.Ability) ReboundAbility(mage.abilities.keyword.ReboundAbility)

Example 3 with ReboundAbility

use of mage.abilities.keyword.ReboundAbility in project mage by magefree.

the class TaigamOjutaiMasterGainReboundEffect method addReboundAbility.

private void addReboundAbility(Card card, Ability source, Game game) {
    boolean found = card.getAbilities(game).containsClass(ReboundAbility.class);
    if (!found) {
        Ability ability = new ReboundAbility();
        game.getState().addOtherAbility(card, ability);
    }
}
Also used : SimpleStaticAbility(mage.abilities.common.SimpleStaticAbility) ConditionalInterveningIfTriggeredAbility(mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility) DelayedTriggeredAbility(mage.abilities.DelayedTriggeredAbility) ReboundAbility(mage.abilities.keyword.ReboundAbility) Ability(mage.abilities.Ability) ReboundAbility(mage.abilities.keyword.ReboundAbility)

Example 4 with ReboundAbility

use of mage.abilities.keyword.ReboundAbility in project mage by magefree.

the class TrailOfTheMageRingsReboundEffect method addReboundAbility.

private void addReboundAbility(Card card, Ability source, Game game) {
    if (filter.match(card, game)) {
        boolean found = card.getAbilities(game).containsClass(ReboundAbility.class);
        if (!found) {
            Ability ability = new ReboundAbility();
            game.getState().addOtherAbility(card, ability);
        }
    }
}
Also used : SimpleStaticAbility(mage.abilities.common.SimpleStaticAbility) ActivateIfConditionActivatedAbility(mage.abilities.common.ActivateIfConditionActivatedAbility) ReboundAbility(mage.abilities.keyword.ReboundAbility) Ability(mage.abilities.Ability) ReboundAbility(mage.abilities.keyword.ReboundAbility)

Aggregations

Ability (mage.abilities.Ability)4 ReboundAbility (mage.abilities.keyword.ReboundAbility)4 SimpleStaticAbility (mage.abilities.common.SimpleStaticAbility)3 DelayedTriggeredAbility (mage.abilities.DelayedTriggeredAbility)2 LoyaltyAbility (mage.abilities.LoyaltyAbility)1 ActivateIfConditionActivatedAbility (mage.abilities.common.ActivateIfConditionActivatedAbility)1 ConditionalInterveningIfTriggeredAbility (mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility)1