|
| 1 | +package mage.cards.h; |
| 2 | + |
| 3 | +import mage.MageInt; |
| 4 | +import mage.abilities.common.BeginningOfCombatTriggeredAbility; |
| 5 | +import mage.abilities.condition.common.CovenCondition; |
| 6 | +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; |
| 7 | +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; |
| 8 | +import mage.abilities.hint.common.CovenHint; |
| 9 | +import mage.cards.CardImpl; |
| 10 | +import mage.cards.CardSetInfo; |
| 11 | +import mage.constants.*; |
| 12 | +import mage.filter.common.FilterCreaturePermanent; |
| 13 | +import mage.filter.predicate.mageobject.PowerPredicate; |
| 14 | + |
| 15 | +import java.util.UUID; |
| 16 | + |
| 17 | +/** |
| 18 | + * @author TheElk801 |
| 19 | + */ |
| 20 | +public final class HarvesttideSentry extends CardImpl { |
| 21 | + |
| 22 | + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); |
| 23 | + |
| 24 | + static { |
| 25 | + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); |
| 26 | + } |
| 27 | + |
| 28 | + public HarvesttideSentry(UUID ownerId, CardSetInfo setInfo) { |
| 29 | + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); |
| 30 | + |
| 31 | + this.subtype.add(SubType.HUMAN); |
| 32 | + this.subtype.add(SubType.WARRIOR); |
| 33 | + this.power = new MageInt(3); |
| 34 | + this.toughness = new MageInt(1); |
| 35 | + |
| 36 | + // Coven — At the beginning of combat on your turn, if you control three or more creatures with different powers, Harvesttide Sentry can't be blocked by creatures with power 2 or less this turn. |
| 37 | + this.addAbility(new ConditionalInterveningIfTriggeredAbility( |
| 38 | + new BeginningOfCombatTriggeredAbility( |
| 39 | + new CantBeBlockedByCreaturesSourceEffect(filter, Duration.EndOfTurn), |
| 40 | + TargetController.YOU, false |
| 41 | + ), CovenCondition.instance, "At the beginning of combat on your turn, " + |
| 42 | + "if you control three or more creatures with different powers, " + |
| 43 | + "{this} can't be blocked by creatures with power 2 or less this turn." |
| 44 | + ).addHint(CovenHint.instance).setAbilityWord(AbilityWord.COVEN)); |
| 45 | + } |
| 46 | + |
| 47 | + private HarvesttideSentry(final HarvesttideSentry card) { |
| 48 | + super(card); |
| 49 | + } |
| 50 | + |
| 51 | + @Override |
| 52 | + public HarvesttideSentry copy() { |
| 53 | + return new HarvesttideSentry(this); |
| 54 | + } |
| 55 | +} |
0 commit comments