Implemented Glaive of the Guildpact

This commit is contained in:
Evan Kranzler 2018-09-14 14:38:51 -04:00
parent 295d42d7a6
commit 78d34f7289
2 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,68 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
* @author TheElk801
*/
public final class GlaiveOfTheGuildpact extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledPermanent("Gate you control");
static {
filter.add(new SubtypePredicate(SubType.GATE));
}
public GlaiveOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +1/+0 for each Gate you control and has vigilance and menace.
Ability ability = new SimpleStaticAbility(
Zone.BATTLEFIELD,
new BoostEquippedEffect(
new PermanentsOnBattlefieldCount(filter),
new StaticValue(0)
)
);
ability.addEffect(new GainAbilityAttachedEffect(
VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has vigilance"));
ability.addEffect(new GainAbilityAttachedEffect(
new MenaceAbility(), AttachmentType.EQUIPMENT
).setText("and menace"));
// Equip {3}
this.addAbility(new EquipAbility(3));
}
public GlaiveOfTheGuildpact(final GlaiveOfTheGuildpact card) {
super(card);
}
@Override
public GlaiveOfTheGuildpact copy() {
return new GlaiveOfTheGuildpact(this);
}
}

View file

@ -70,6 +70,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
cards.add(new SetCardInfo("Fresh-Faced Recruit", 216, Rarity.COMMON, mage.cards.f.FreshFacedRecruit.class));
cards.add(new SetCardInfo("Garrison Sergeant", 172, Rarity.COMMON, mage.cards.g.GarrisonSergeant.class));
cards.add(new SetCardInfo("Gateway Plaza", 247, Rarity.COMMON, mage.cards.g.GatewayPlaza.class));
cards.add(new SetCardInfo("Glaive of the Guildpact", 236, Rarity.UNCOMMON, mage.cards.g.GlaiveOfTheGuildpact.class));
cards.add(new SetCardInfo("Glowspore Shaman", 173, Rarity.UNCOMMON, mage.cards.g.GlowsporeShaman.class));
cards.add(new SetCardInfo("Goblin Banneret", 102, Rarity.UNCOMMON, mage.cards.g.GoblinBanneret.class));
cards.add(new SetCardInfo("Goblin Cratermaker", 103, Rarity.UNCOMMON, mage.cards.g.GoblinCratermaker.class));