mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Merge origin/master
This commit is contained in:
commit
871f8d6393
5 changed files with 211 additions and 18 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -22,13 +21,12 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public final class EbonyOwlNetsuke extends CardImpl {
|
||||
|
||||
public EbonyOwlNetsuke(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
// At the beginning of each opponent's upkeep, if that player has seven or more cards in hand, Ebony Owl Netsuke deals 4 damage to him or her.
|
||||
this.addAbility(new EbonyOwlNetsukeTriggeredAbility(new DamageTargetEffect(4, true)));
|
||||
this.addAbility(new EbonyOwlNetsukeTriggeredAbility());
|
||||
}
|
||||
|
||||
|
||||
public EbonyOwlNetsuke(final EbonyOwlNetsuke card) {
|
||||
super(card);
|
||||
}
|
||||
|
@ -40,15 +38,15 @@ public final class EbonyOwlNetsuke extends CardImpl {
|
|||
}
|
||||
|
||||
class EbonyOwlNetsukeTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
EbonyOwlNetsukeTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
|
||||
EbonyOwlNetsukeTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamageTargetEffect(4), false);
|
||||
}
|
||||
|
||||
|
||||
EbonyOwlNetsukeTriggeredAbility(final EbonyOwlNetsukeTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EbonyOwlNetsukeTriggeredAbility copy() {
|
||||
return new EbonyOwlNetsukeTriggeredAbility(this);
|
||||
|
@ -58,29 +56,29 @@ class EbonyOwlNetsukeTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UPKEEP_STEP_PRE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
||||
Player player = game.getPlayer(event.getPlayerId());
|
||||
if (player != null) {
|
||||
for (Effect effect: getEffects() ) {
|
||||
effect.setTargetPointer(new FixedTarget(player.getId()));
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(player.getId(), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
return player != null && player.getHand().size() >= 7;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of each opponent's upkeep, if that player has seven or more cards in hand, {this} deals 4 damage to him or her.";
|
||||
return "At the beginning of each opponent's upkeep, if that player has seven or more cards in hand, {this} deals 4 damage to that player";
|
||||
}
|
||||
}
|
||||
|
|
83
Mage.Sets/src/mage/cards/m/MisersCage.java
Normal file
83
Mage.Sets/src/mage/cards/m/MisersCage.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MisersCage extends CardImpl {
|
||||
|
||||
public MisersCage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// At the beginning of each opponent's upkeep, if that player has five or more cards in hand, Misers' Cage deals 2 damage to him or her.
|
||||
this.addAbility(new MisersCageTriggeredAbility());
|
||||
}
|
||||
|
||||
public MisersCage(final MisersCage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MisersCage copy() {
|
||||
return new MisersCage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MisersCageTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
MisersCageTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamageTargetEffect(2), false);
|
||||
}
|
||||
|
||||
MisersCageTriggeredAbility(final MisersCageTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MisersCageTriggeredAbility copy() {
|
||||
return new MisersCageTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
||||
Player player = game.getPlayer(event.getPlayerId());
|
||||
if (player != null) {
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(player.getId(), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
return player != null && player.getHand().size() >= 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "at the beginning of each opponent’s upkeep, if that player has five or more cards in hand, {this} deals 2 damage to that player";
|
||||
}
|
||||
}
|
47
Mage.Sets/src/mage/cards/p/PyricSalamander.java
Normal file
47
Mage.Sets/src/mage/cards/p/PyricSalamander.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PyricSalamander extends CardImpl {
|
||||
|
||||
public PyricSalamander(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.SALAMANDER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {R}: Pyric Salamander gets +1/+0 until end of turn. Sacrifice Pyric Salamander at the beginning of the next end step.
|
||||
Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
|
||||
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect())
|
||||
).setText("Sacrifice {this} at the beginning of the next end step"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public PyricSalamander(final PyricSalamander card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PyricSalamander copy() {
|
||||
return new PyricSalamander(this);
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/cards/r/RavenousVampire.java
Normal file
63
Mage.Sets/src/mage/cards/r/RavenousVampire.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RavenousVampire extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a nonartifact creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT)));
|
||||
}
|
||||
|
||||
public RavenousVampire(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// At the beginning of your upkeep, you may sacrifice a nonartifact creature. If you do, put a +1/+1 counter on Ravenous Vampire. If you don't, tap Ravenous Vampire.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new DoIfCostPaid(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
new TapSourceEffect(),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))
|
||||
),
|
||||
TargetController.YOU, true
|
||||
));
|
||||
}
|
||||
|
||||
public RavenousVampire(final RavenousVampire card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RavenousVampire copy() {
|
||||
return new RavenousVampire(this);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
|
@ -42,7 +41,7 @@ public final class Mirage extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Auspicious Ancestor", 3, Rarity.RARE, mage.cards.a.AuspiciousAncestor.class));
|
||||
cards.add(new SetCardInfo("Azimaet Drake", 53, Rarity.COMMON, mage.cards.a.AzimaetDrake.class));
|
||||
cards.add(new SetCardInfo("Bad River", 324, Rarity.UNCOMMON, mage.cards.b.BadRiver.class));
|
||||
cards.add(new SetCardInfo("Barbed Foliage", 105, Rarity.UNCOMMON, mage.cards.b.BarbedFoliage.class));
|
||||
cards.add(new SetCardInfo("Barbed Foliage", 207, Rarity.UNCOMMON, mage.cards.b.BarbedFoliage.class));
|
||||
cards.add(new SetCardInfo("Barbed-Back Wurm", 105, Rarity.UNCOMMON, mage.cards.b.BarbedBackWurm.class));
|
||||
cards.add(new SetCardInfo("Bay Falcon", 54, Rarity.COMMON, mage.cards.b.BayFalcon.class));
|
||||
cards.add(new SetCardInfo("Benthic Djinn", 257, Rarity.RARE, mage.cards.b.BenthicDjinn.class));
|
||||
|
@ -186,6 +185,7 @@ public final class Mirage extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Merfolk Seer", 76, Rarity.COMMON, mage.cards.m.MerfolkSeer.class));
|
||||
cards.add(new SetCardInfo("Mind Harness", 78, Rarity.UNCOMMON, mage.cards.m.MindHarness.class));
|
||||
cards.add(new SetCardInfo("Mire Shade", 131, Rarity.UNCOMMON, mage.cards.m.MireShade.class));
|
||||
cards.add(new SetCardInfo("Misers' Cage", 276, Rarity.RARE, mage.cards.m.MisersCage.class));
|
||||
cards.add(new SetCardInfo("Mist Dragon", 79, Rarity.RARE, mage.cards.m.MistDragon.class));
|
||||
cards.add(new SetCardInfo("Moss Diamond", 312, Rarity.UNCOMMON, mage.cards.m.MossDiamond.class));
|
||||
cards.add(new SetCardInfo("Mountain Valley", 328, Rarity.UNCOMMON, mage.cards.m.MountainValley.class));
|
||||
|
@ -221,11 +221,13 @@ public final class Mirage extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Psychic Transfer", 85, Rarity.RARE, mage.cards.p.PsychicTransfer.class));
|
||||
cards.add(new SetCardInfo("Purgatory", 275, Rarity.RARE, mage.cards.p.Purgatory.class));
|
||||
cards.add(new SetCardInfo("Purraj of Urborg", 135, Rarity.RARE, mage.cards.p.PurrajOfUrborg.class));
|
||||
cards.add(new SetCardInfo("Pyric Salamander", 187, Rarity.COMMON, mage.cards.p.PyricSalamander.class));
|
||||
cards.add(new SetCardInfo("Quirion Elves", 234, Rarity.COMMON, mage.cards.q.QuirionElves.class));
|
||||
cards.add(new SetCardInfo("Radiant Essence", 276, Rarity.UNCOMMON, mage.cards.r.RadiantEssence.class));
|
||||
cards.add(new SetCardInfo("Raging Spirit", 188, Rarity.COMMON, mage.cards.r.RagingSpirit.class));
|
||||
cards.add(new SetCardInfo("Rampant Growth", 235, Rarity.COMMON, mage.cards.r.RampantGrowth.class));
|
||||
cards.add(new SetCardInfo("Rashida Scalebane", 35, Rarity.RARE, mage.cards.r.RashidaScalebane.class));
|
||||
cards.add(new SetCardInfo("Ravenous Vampire", 136, Rarity.UNCOMMON, mage.cards.r.RavenousVampire.class));
|
||||
cards.add(new SetCardInfo("Ray of Command", 86, Rarity.COMMON, mage.cards.r.RayOfCommand.class));
|
||||
cards.add(new SetCardInfo("Reality Ripple", 87, Rarity.COMMON, mage.cards.r.RealityRipple.class));
|
||||
cards.add(new SetCardInfo("Reckless Embermage", 189, Rarity.RARE, mage.cards.r.RecklessEmbermage.class));
|
||||
|
|
Loading…
Reference in a new issue