mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
[MID] Implemented Vampire Socialite
This commit is contained in:
parent
9cf153aeb4
commit
4716af75d6
2 changed files with 116 additions and 0 deletions
115
Mage.Sets/src/mage/cards/v/VampireSocialite.java
Normal file
115
Mage.Sets/src/mage/cards/v/VampireSocialite.java
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
package mage.cards.v;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.common.OpponentsLostLifeCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.EntersTheBattlefieldEvent;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author weirddan455
|
||||||
|
*/
|
||||||
|
public final class VampireSocialite extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter =
|
||||||
|
new FilterControlledPermanent(SubType.VAMPIRE, "other Vampire you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public VampireSocialite(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.VAMPIRE);
|
||||||
|
this.subtype.add(SubType.NOBLE);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Menace
|
||||||
|
this.addAbility(new MenaceAbility());
|
||||||
|
|
||||||
|
// When Vampire Socialite enters the battlefield, if an opponent lost life this turn, put a +1/+1 counter on each other Vampire you control.
|
||||||
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter)),
|
||||||
|
OpponentsLostLifeCondition.instance,
|
||||||
|
"When {this} enters the battlefield, if an opponent lost life this turn, put a +1/+1 counter on each other Vampire you control."
|
||||||
|
));
|
||||||
|
|
||||||
|
// As long as an opponent lost life this turn, each other Vampire you control enters the battlefield with an additional +1/+1 counter on it.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new VampireSocialiteReplacementEffect(filter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private VampireSocialite(final VampireSocialite card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VampireSocialite copy() {
|
||||||
|
return new VampireSocialite(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VampireSocialiteReplacementEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
|
private final FilterPermanent filter;
|
||||||
|
|
||||||
|
public VampireSocialiteReplacementEffect(FilterPermanent filter) {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.BoostCreature);
|
||||||
|
this.filter = filter;
|
||||||
|
staticText = "As long as an opponent lost life this turn, each other Vampire you control enters the battlefield with an additional +1/+1 counter on it";
|
||||||
|
}
|
||||||
|
|
||||||
|
private VampireSocialiteReplacementEffect(final VampireSocialiteReplacementEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
this.filter = effect.filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VampireSocialiteReplacementEffect copy() {
|
||||||
|
return new VampireSocialiteReplacementEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
if (OpponentsLostLifeCondition.instance.apply(game, source)) {
|
||||||
|
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||||
|
return permanent != null && filter.match(permanent, source.getSourceId(), source.getControllerId(), game);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||||
|
if (permanent != null) {
|
||||||
|
permanent.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game, event.getAppliedEffects());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -86,6 +86,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class));
|
cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class));
|
||||||
cards.add(new SetCardInfo("Unnatural Growth", 206, Rarity.RARE, mage.cards.u.UnnaturalGrowth.class));
|
cards.add(new SetCardInfo("Unnatural Growth", 206, Rarity.RARE, mage.cards.u.UnnaturalGrowth.class));
|
||||||
cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class));
|
cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class));
|
||||||
|
cards.add(new SetCardInfo("Vampire Socialite", 249, Rarity.UNCOMMON, mage.cards.v.VampireSocialite.class));
|
||||||
cards.add(new SetCardInfo("Village Reavers", 165, Rarity.UNCOMMON, mage.cards.v.VillageReavers.class));
|
cards.add(new SetCardInfo("Village Reavers", 165, Rarity.UNCOMMON, mage.cards.v.VillageReavers.class));
|
||||||
cards.add(new SetCardInfo("Village Watch", 165, Rarity.UNCOMMON, mage.cards.v.VillageWatch.class));
|
cards.add(new SetCardInfo("Village Watch", 165, Rarity.UNCOMMON, mage.cards.v.VillageWatch.class));
|
||||||
cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class));
|
cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class));
|
||||||
|
|
Loading…
Reference in a new issue