mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[C21] Implemented Paradox Zone
This commit is contained in:
parent
fd9b055fd3
commit
689efae076
8 changed files with 108 additions and 47 deletions
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.MagecraftAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DoubleP1P1CountersSourceEffect;
|
||||
import mage.abilities.effects.common.DoubleCountersSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -31,7 +31,7 @@ public final class DragonsguardElite extends CardImpl {
|
|||
this.addAbility(new MagecraftAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance())));
|
||||
|
||||
// {4}{G}{G}: Double the number of +1/+1 counters on Dragonsguard Elite.
|
||||
this.addAbility(new SimpleActivatedAbility(new DoubleP1P1CountersSourceEffect(), new ManaCostsImpl<>("{4}{G}{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(new DoubleCountersSourceEffect(CounterType.P1P1), new ManaCostsImpl<>("{4}{G}{G}")));
|
||||
}
|
||||
|
||||
private DragonsguardElite(final DragonsguardElite card) {
|
||||
|
|
55
Mage.Sets/src/mage/cards/p/ParadoxZone.java
Normal file
55
Mage.Sets/src/mage/cards/p/ParadoxZone.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DoubleCountersSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.token.QuandrixToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ParadoxZone extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new CountersSourceCount(CounterType.GROWTH);
|
||||
|
||||
public ParadoxZone(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
|
||||
|
||||
// Paradox Zone enters the battlefield with a growth counter on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.GROWTH.createInstance()),
|
||||
"with a growth counter on it"
|
||||
));
|
||||
|
||||
// At the beginning of your end step, double the number of growth counters on Paradox Zone. Then create a 0/0 blue and green Fractal creature token. Put X +1/+1 counters on it, where X is the number of growth counters on Paradox Zone.
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||
new DoubleCountersSourceEffect(CounterType.GROWTH), TargetController.YOU, false
|
||||
);
|
||||
Effect effect = QuandrixToken.getEffect(
|
||||
xValue, "Put X +1/+1 counters on it, where X is the number of growth counters on {this}"
|
||||
);
|
||||
ability.addEffect(effect.concatBy("Then"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private ParadoxZone(final ParadoxZone card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParadoxZone copy() {
|
||||
return new ParadoxZone(this);
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.DoubleP1P1CountersSourceEffect;
|
||||
import mage.abilities.effects.common.DoubleCountersSourceEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
@ -41,7 +41,7 @@ public final class PrimordialHydra extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, double the number of +1/+1 counters on Primordial Hydra.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new DoubleP1P1CountersSourceEffect(), TargetController.YOU, false
|
||||
new DoubleCountersSourceEffect(CounterType.P1P1), TargetController.YOU, false
|
||||
));
|
||||
|
||||
// Primordial Hydra has trample as long as it has ten or more +1/+1 counters on it.
|
||||
|
|
|
@ -3,12 +3,13 @@ package mage.cards.s;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DoubleP1P1CountersSourceEffect;
|
||||
import mage.abilities.effects.common.DoubleCountersSourceEffect;
|
||||
import mage.abilities.keyword.SunburstAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -27,7 +28,7 @@ public final class Solarion extends CardImpl {
|
|||
this.addAbility(new SunburstAbility(this));
|
||||
|
||||
// {tap}: Double the number of +1/+1 counters on Solarion.
|
||||
this.addAbility(new SimpleActivatedAbility(new DoubleP1P1CountersSourceEffect(), new TapSourceCost()));
|
||||
this.addAbility(new SimpleActivatedAbility(new DoubleCountersSourceEffect(CounterType.P1P1), new TapSourceCost()));
|
||||
}
|
||||
|
||||
private Solarion(final Solarion card) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DoubleP1P1CountersSourceEffect;
|
||||
import mage.abilities.effects.common.DoubleCountersSourceEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.FightTargetSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
@ -41,7 +41,7 @@ public final class VoraciousHydra extends CardImpl {
|
|||
|
||||
// When Voracious Hydra enters the battlefield, choose one —
|
||||
// • Double the number of +1/+1 counters on Voracious Hydra.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DoubleP1P1CountersSourceEffect(), false);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DoubleCountersSourceEffect(CounterType.P1P1), false);
|
||||
|
||||
// • Voracious Hydra fights target creature you don't control.
|
||||
Mode mode = new Mode(
|
||||
|
|
|
@ -60,6 +60,7 @@ public final class Commander2021Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mind Stone", 251, Rarity.COMMON, mage.cards.m.MindStone.class));
|
||||
cards.add(new SetCardInfo("Monologue Tax", 19, Rarity.RARE, mage.cards.m.MonologueTax.class));
|
||||
cards.add(new SetCardInfo("Myr Battlesphere", 253, Rarity.RARE, mage.cards.m.MyrBattlesphere.class));
|
||||
cards.add(new SetCardInfo("Paradox Zone", 64, Rarity.RARE, mage.cards.p.ParadoxZone.class));
|
||||
cards.add(new SetCardInfo("Phyrexia's Core", 309, Rarity.UNCOMMON, mage.cards.p.PhyrexiasCore.class));
|
||||
cards.add(new SetCardInfo("Pia Nalaar", 177, Rarity.RARE, mage.cards.p.PiaNalaar.class));
|
||||
cards.add(new SetCardInfo("Pilgrim's Eye", 257, Rarity.COMMON, mage.cards.p.PilgrimsEye.class));
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DoubleCountersSourceEffect extends OneShotEffect {
|
||||
|
||||
private final CounterType counterType;
|
||||
|
||||
public DoubleCountersSourceEffect(CounterType counterType) {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "double the number of " + counterType.getName() + " counters on {this}";
|
||||
this.counterType = counterType;
|
||||
}
|
||||
|
||||
private DoubleCountersSourceEffect(final DoubleCountersSourceEffect effect) {
|
||||
super(effect);
|
||||
this.counterType = effect.counterType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleCountersSourceEffect copy() {
|
||||
return new DoubleCountersSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return permanent.addCounters(counterType.createInstance(
|
||||
permanent.getCounters(game).getCount(counterType)
|
||||
), source.getControllerId(), source, game);
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DoubleP1P1CountersSourceEffect extends OneShotEffect {
|
||||
|
||||
public DoubleP1P1CountersSourceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "double the number of +1/+1 counters on {this}";
|
||||
}
|
||||
|
||||
private DoubleP1P1CountersSourceEffect(final DoubleP1P1CountersSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleP1P1CountersSourceEffect copy() {
|
||||
return new DoubleP1P1CountersSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return permanent.addCounters(CounterType.P1P1.createInstance(
|
||||
permanent.getCounters(game).getCount(CounterType.P1P1)
|
||||
), source.getControllerId(), source, game);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue