mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
[VOW] Implemented Bride's Gown
This commit is contained in:
parent
256c94aee2
commit
6e089124bb
2 changed files with 90 additions and 0 deletions
89
Mage.Sets/src/mage/cards/b/BridesGown.java
Normal file
89
Mage.Sets/src/mage/cards/b/BridesGown.java
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
package mage.cards.b;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.hint.ConditionHint;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.keyword.EquipAbility;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterEquipmentPermanent;
|
||||||
|
import mage.filter.predicate.ObjectSourcePlayer;
|
||||||
|
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class BridesGown extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterEquipmentPermanent();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new NamePredicate("Groom's Finery"));
|
||||||
|
filter.add(BridesGownPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, false);
|
||||||
|
private static final Hint hint = new ConditionHint(
|
||||||
|
condition, "An Equipment named Groom's Finery is attached to a creature you control"
|
||||||
|
);
|
||||||
|
|
||||||
|
public BridesGown(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
|
// Equipped creature gets +2/+0. It gets an additional +0/+2 and has first strike as long as an equipment named Groom's Finery is attached to a creature you control.
|
||||||
|
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 0));
|
||||||
|
ability.addEffect(new ConditionalContinuousEffect(
|
||||||
|
new BoostEquippedEffect(0, 2),
|
||||||
|
condition, "It gets an additional +0/+2"
|
||||||
|
));
|
||||||
|
ability.addEffect(new ConditionalContinuousEffect(
|
||||||
|
new GainAbilityAttachedEffect(
|
||||||
|
FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||||
|
), condition, "and has first strike as long as an Equipment " +
|
||||||
|
"named Groom's Finery is attached to a creature you control"
|
||||||
|
));
|
||||||
|
this.addAbility(ability.addHint(hint));
|
||||||
|
|
||||||
|
// Equip {2}
|
||||||
|
this.addAbility(new EquipAbility(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
private BridesGown(final BridesGown card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BridesGown copy() {
|
||||||
|
return new BridesGown(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BridesGownPredicate implements ObjectSourcePlayerPredicate<Permanent> {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
|
||||||
|
Permanent permanent = game.getPermanent(input.getObject().getAttachedTo());
|
||||||
|
return permanent != null
|
||||||
|
&& permanent.isCreature(game)
|
||||||
|
&& permanent.isControlledBy(input.getPlayerId());
|
||||||
|
}
|
||||||
|
}
|
|
@ -47,6 +47,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Bloodvial Purveyor", 98, Rarity.RARE, mage.cards.b.BloodvialPurveyor.class));
|
cards.add(new SetCardInfo("Bloodvial Purveyor", 98, Rarity.RARE, mage.cards.b.BloodvialPurveyor.class));
|
||||||
cards.add(new SetCardInfo("Blossom-Clad Werewolf", 226, Rarity.COMMON, mage.cards.b.BlossomCladWerewolf.class));
|
cards.add(new SetCardInfo("Blossom-Clad Werewolf", 226, Rarity.COMMON, mage.cards.b.BlossomCladWerewolf.class));
|
||||||
cards.add(new SetCardInfo("Bramble Wurm", 189, Rarity.UNCOMMON, mage.cards.b.BrambleWurm.class));
|
cards.add(new SetCardInfo("Bramble Wurm", 189, Rarity.UNCOMMON, mage.cards.b.BrambleWurm.class));
|
||||||
|
cards.add(new SetCardInfo("Bride's Gown", 4, Rarity.UNCOMMON, mage.cards.b.BridesGown.class));
|
||||||
cards.add(new SetCardInfo("By Invitation Only", 5, Rarity.RARE, mage.cards.b.ByInvitationOnly.class));
|
cards.add(new SetCardInfo("By Invitation Only", 5, Rarity.RARE, mage.cards.b.ByInvitationOnly.class));
|
||||||
cards.add(new SetCardInfo("Cartographer's Survey", 190, Rarity.UNCOMMON, mage.cards.c.CartographersSurvey.class));
|
cards.add(new SetCardInfo("Cartographer's Survey", 190, Rarity.UNCOMMON, mage.cards.c.CartographersSurvey.class));
|
||||||
cards.add(new SetCardInfo("Catapult Captain", 99, Rarity.UNCOMMON, mage.cards.c.CatapultCaptain.class));
|
cards.add(new SetCardInfo("Catapult Captain", 99, Rarity.UNCOMMON, mage.cards.c.CatapultCaptain.class));
|
||||||
|
|
Loading…
Reference in a new issue