foul-magics/Mage.Sets/src/mage/cards/t/TakeUpTheShield.java
2022-08-20 10:03:48 -04:00

40 lines
1.5 KiB
Java

package mage.cards.t;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TakeUpTheShield extends CardImpl {
public TakeUpTheShield(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Put a +1/+1 counter on target creature. It gains lifelink and indestructible until end of turn.
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(LifelinkAbility.getInstance())
.setText("it gains lifelink"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance())
.setText("and indestructible until end of turn"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private TakeUpTheShield(final TakeUpTheShield card) {
super(card);
}
@Override
public TakeUpTheShield copy() {
return new TakeUpTheShield(this);
}
}