mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 05:09:16 -08:00
* P/T defining static abilities - Fixed that the P/T is also set for the card if it's not a permanent (e.g. fixes that targeting a Nighmare with Margue Burst did always no damage).
This commit is contained in:
parent
d89970afde
commit
ce01d8cf25
9 changed files with 92 additions and 21 deletions
|
|
@ -61,7 +61,7 @@ public class MorgueBurst extends CardImpl<MorgueBurst> {
|
|||
// Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way.
|
||||
this.getSpellAbility().addEffect(new MorgueBurstEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(true));
|
||||
}
|
||||
|
||||
public MorgueBurst(final MorgueBurst card) {
|
||||
|
|
@ -95,7 +95,7 @@ class MorgueBurstEffect extends OneShotEffect<MorgueBurstEffect> {
|
|||
if (card != null) {
|
||||
Player player = game.getPlayer(card.getOwnerId());
|
||||
if (player != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.HAND);
|
||||
int damage = card.getPower().getValue();
|
||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getTargets().get(0));
|
||||
if (creature != null) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class GutterGrimeTriggeredAbility extends TriggeredAbilityImpl<GutterGrimeTrigge
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a nontoken creature you control dies, put a slime counter on Gutter Grime, then put a green Ooze creature token onto the battlefield with \"This creature's power and toughness are each equal to the number of slime counters on Gutter Grime.\"";
|
||||
return "Whenever a nontoken creature you control dies, put a slime counter on {this}, then put a green Ooze creature token onto the battlefield with \"This creature's power and toughness are each equal to the number of slime counters on {this}.\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ class GutterGrimeToken extends Token {
|
|||
|
||||
class GutterGrimeCounters implements DynamicValue {
|
||||
|
||||
private UUID sourceId;
|
||||
private final UUID sourceId;
|
||||
|
||||
public GutterGrimeCounters(UUID sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class DauntlessDourbark extends CardImpl<DauntlessDourbark> {
|
|||
|
||||
// Dauntless Dourbark's power and toughness are each equal to the number of Forests you control plus the number of Treefolk you control.
|
||||
DynamicValue amount = new PermanentsOnBattlefieldCount(filter);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(amount, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(amount, Duration.EndOfGame)));
|
||||
|
||||
// Dauntless Dourbark has trample as long as you control another Treefolk.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), new ControlsPermanentCondition(filter2), rule)));
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class Cantivore extends CardImpl<Cantivore> {
|
|||
this.addAbility(VigilanceAbility.getInstance());
|
||||
// Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards.
|
||||
DynamicValue value = (new CardsInAllGraveyardsCount(filter));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value , Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value , Duration.EndOfGame)));
|
||||
}
|
||||
|
||||
public Cantivore(final Cantivore card) {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class Cognivore extends CardImpl<Cognivore> {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Cognivore's power and toughness are each equal to the number of instant cards in all graveyards.
|
||||
DynamicValue value = (new CardsInAllGraveyardsCount(filter));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
|
||||
}
|
||||
|
||||
public Cognivore(final Cognivore card) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class SoullessOne extends CardImpl<SoullessOne> {
|
|||
this.toughness = new MageInt(0);
|
||||
|
||||
// Soulless One's power and toughness are each equal to the number of Zombies on the battlefield plus the number of Zombie cards in all graveyards.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new SoullessOneDynamicCount(), Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new SoullessOneDynamicCount(), Duration.EndOfGame)));
|
||||
}
|
||||
|
||||
public SoullessOne(final SoullessOne card) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,11 @@ public class ChimericMass extends CardImpl<ChimericMass> {
|
|||
public ChimericMass(UUID ownerId) {
|
||||
super(ownerId, 141, "Chimeric Mass", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{X}");
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
// Chimeric Mass enters the battlefield with X charge counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ChimericMassEffect(), "{this} enters the battlefield with X charge counters on it"));
|
||||
|
||||
// {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it."
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericMassToken(), "", Duration.EndOfTurn), new GenericManaCost(1)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue