forked from External/mage
59 lines
1.9 KiB
Java
59 lines
1.9 KiB
Java
package mage.cards.g;
|
|
|
|
import java.util.UUID;
|
|
import mage.MageInt;
|
|
import mage.abilities.common.SimpleStaticAbility;
|
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
|
import mage.abilities.keyword.DoubleStrikeAbility;
|
|
import mage.constants.SubType;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.Duration;
|
|
import mage.constants.Zone;
|
|
import mage.filter.FilterPermanent;
|
|
import mage.filter.common.FilterControlledPermanent;
|
|
|
|
/**
|
|
*
|
|
* @author TheElk801
|
|
*/
|
|
public final class GarrisonSergeant extends CardImpl {
|
|
|
|
private static final FilterPermanent filter = new FilterControlledPermanent();
|
|
|
|
static {
|
|
filter.add(SubType.GATE.getPredicate());
|
|
}
|
|
|
|
public GarrisonSergeant(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}");
|
|
|
|
this.subtype.add(SubType.LIZARD);
|
|
this.subtype.add(SubType.SOLDIER);
|
|
this.power = new MageInt(3);
|
|
this.toughness = new MageInt(3);
|
|
|
|
// Garrison Sergeant has double strike as long as you control a Gate.
|
|
this.addAbility(new SimpleStaticAbility(
|
|
new ConditionalContinuousEffect(
|
|
new GainAbilitySourceEffect(
|
|
DoubleStrikeAbility.getInstance(),
|
|
Duration.WhileOnBattlefield
|
|
), new PermanentsOnTheBattlefieldCondition(filter),
|
|
"{this} has double strike as long as you control a Gate."
|
|
)
|
|
));
|
|
}
|
|
|
|
private GarrisonSergeant(final GarrisonSergeant card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public GarrisonSergeant copy() {
|
|
return new GarrisonSergeant(this);
|
|
}
|
|
}
|