mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 14:02:05 -08:00
[VOW] Implemented Brine Comber / Brinebound Gift
This commit is contained in:
parent
16df08e3b1
commit
236c974b1e
4 changed files with 217 additions and 30 deletions
94
Mage.Sets/src/mage/cards/b/BrineComber.java
Normal file
94
Mage.Sets/src/mage/cards/b/BrineComber.java
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.DisturbAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BrineComber extends CardImpl {
|
||||
|
||||
public BrineComber(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
this.secondSideCardClazz = mage.cards.b.BrineboundGift.class;
|
||||
|
||||
// Whenever Brine Comber enters the battlefield or becomes the target of an Aura spell, create a 1/1 white Spirit creature token with flying.
|
||||
this.addAbility(new BrineComberTriggeredAbility());
|
||||
|
||||
// Disturb {W}{U}
|
||||
this.addAbility(new DisturbAbility(new ManaCostsImpl<>("{W}{U}")));
|
||||
}
|
||||
|
||||
private BrineComber(final BrineComber card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrineComber copy() {
|
||||
return new BrineComber(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BrineComberTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
BrineComberTriggeredAbility() {
|
||||
super(Zone.ALL, new CreateTokenEffect(new SpiritWhiteToken()));
|
||||
}
|
||||
|
||||
private BrineComberTriggeredAbility(final BrineComberTriggeredAbility effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrineComberTriggeredAbility copy() {
|
||||
return new BrineComberTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
|
||||
|| event.getType() == GameEvent.EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
return event.getTargetId().equals(getSourceId());
|
||||
case TARGETED:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
if (this.getSourcePermanentIfItStillExists(game) == null
|
||||
|| !event.getTargetId().equals(getSourceId())) {
|
||||
return false;
|
||||
}
|
||||
Spell spell = game.getSpell(event.getSourceId());
|
||||
return spell != null && spell.hasSubtype(SubType.AURA, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} enters the battlefield or becomes the target " +
|
||||
"of an Aura spell, create a 1/1 white Spirit creature token with flying";
|
||||
}
|
||||
}
|
||||
107
Mage.Sets/src/mage/cards/b/BrineboundGift.java
Normal file
107
Mage.Sets/src/mage/cards/b/BrineboundGift.java
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.PutIntoGraveFromAnywhereSourceAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BrineboundGift extends CardImpl {
|
||||
|
||||
public BrineboundGift(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
this.color.setWhite(true);
|
||||
this.color.setBlue(true);
|
||||
this.nightCard = true;
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever Brinebound Gift enters the battlefield or enchanted creature becomes the target of an Aura spell, create a 1/1 white Spirit creature token with flying.
|
||||
this.addAbility(new BrineboundGiftTriggeredAbility());
|
||||
|
||||
// If Brinebound Gift would be put into a graveyard from anywhere, exile it instead.
|
||||
this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead")));
|
||||
}
|
||||
|
||||
private BrineboundGift(final BrineboundGift card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrineboundGift copy() {
|
||||
return new BrineboundGift(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BrineboundGiftTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
BrineboundGiftTriggeredAbility() {
|
||||
super(Zone.ALL, new CreateTokenEffect(new SpiritWhiteToken()));
|
||||
}
|
||||
|
||||
private BrineboundGiftTriggeredAbility(final BrineboundGiftTriggeredAbility effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrineboundGiftTriggeredAbility copy() {
|
||||
return new BrineboundGiftTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
|
||||
|| event.getType() == GameEvent.EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
return event.getTargetId().equals(getSourceId());
|
||||
case TARGETED:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = this.getSourcePermanentOrLKI(game);
|
||||
if (permanent == null || !event.getTargetId().equals(permanent.getAttachedTo())) {
|
||||
return false;
|
||||
}
|
||||
Spell spell = game.getSpell(event.getSourceId());
|
||||
return spell != null && spell.hasSubtype(SubType.AURA, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} enters the battlefield or enchanted creature becomes the target " +
|
||||
"of an Aura spell, create a 1/1 white Spirit creature token with flying";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +1,25 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShieldMare extends CardImpl {
|
||||
|
|
@ -43,10 +39,7 @@ public final class ShieldMare extends CardImpl {
|
|||
|
||||
// Shield Mare can't be blocked by red creatures.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new CantBeBlockedByCreaturesSourceEffect(
|
||||
filter, Duration.WhileOnBattlefield
|
||||
)
|
||||
new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)
|
||||
));
|
||||
|
||||
// When Shield Mare enters the battlefield or becomes the target of a spell or ability and opponent controls, you gain 3 life.
|
||||
|
|
@ -65,12 +58,6 @@ public final class ShieldMare extends CardImpl {
|
|||
|
||||
class ShieldMareTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterStackObject filter = new FilterStackObject();
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ShieldMareTriggeredAbility() {
|
||||
super(Zone.ALL, new GainLifeEffect(3));
|
||||
}
|
||||
|
|
@ -92,24 +79,21 @@ class ShieldMareTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
|
||||
return event.getTargetId().equals(getSourceId());
|
||||
}
|
||||
if (event.getType() == GameEvent.EventType.TARGETED) {
|
||||
Permanent permanent = game.getPermanent(getSourceId());
|
||||
if (permanent == null) {
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
return event.getTargetId().equals(getSourceId());
|
||||
case TARGETED:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
StackObject object = game.getStack().getStackObject(event.getSourceId());
|
||||
return event.getTargetId().equals(getSourceId())
|
||||
&& filter.match(object, getSourceId(), getControllerId(), game);
|
||||
}
|
||||
return false;
|
||||
return event.getTargetId().equals(this.getSourceId())
|
||||
&& game.getOpponents(this.getControllerId()).contains(game.getControllerId(event.getSourceId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When {this} enters the battlefield or becomes the target"
|
||||
+ " of a spell or ability an opponent controls, you gain 3 life";
|
||||
return "When {this} enters the battlefield or becomes the target "
|
||||
+ "of a spell or ability an opponent controls, you gain 3 life";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bramble Armor", 188, Rarity.COMMON, mage.cards.b.BrambleArmor.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("Brine Comber", 233, Rarity.UNCOMMON, mage.cards.b.BrineComber.class));
|
||||
cards.add(new SetCardInfo("Brinebound Gift", 233, Rarity.UNCOMMON, mage.cards.b.BrineboundGift.class));
|
||||
cards.add(new SetCardInfo("By Invitation Only", 5, Rarity.RARE, mage.cards.b.ByInvitationOnly.class));
|
||||
cards.add(new SetCardInfo("Cackling Culprit", 28, Rarity.UNCOMMON, mage.cards.c.CacklingCulprit.class));
|
||||
cards.add(new SetCardInfo("Cartographer's Survey", 190, Rarity.UNCOMMON, mage.cards.c.CartographersSurvey.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue