mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed Dearly Departed
This commit is contained in:
parent
eea1aa3c52
commit
649fb13734
3 changed files with 21 additions and 13 deletions
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.innistrad;
|
||||
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -36,6 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -44,6 +44,8 @@ import mage.counters.CounterType;
|
|||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
|
@ -51,6 +53,8 @@ public class DearlyDeparted extends CardImpl<DearlyDeparted> {
|
|||
|
||||
private static final FilterCreaturePermanent filterHuman = new FilterCreaturePermanent("Human creatures");
|
||||
|
||||
private static final String ruleText = "As long as Dearly Departed is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it";
|
||||
|
||||
static {
|
||||
filterHuman.getSubtype().add("Human");
|
||||
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
|
@ -68,8 +72,10 @@ public class DearlyDeparted extends CardImpl<DearlyDeparted> {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// As long as Dearly Departed is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it.
|
||||
Ability ability0 = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.GRAVEYARD, new GainAbilityControlledEffect(ability0, Constants.Duration.OneUse, filterHuman)));
|
||||
Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)));
|
||||
ContinuousEffect effect = new GainAbilityControlledEffect(ability, Constants.Duration.WhileInGraveyard, filterHuman);
|
||||
effect.overrideRuleText(ruleText);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.GRAVEYARD, effect));
|
||||
}
|
||||
|
||||
public DearlyDeparted(final DearlyDeparted card) {
|
||||
|
|
|
@ -28,13 +28,14 @@
|
|||
|
||||
package mage.abilities.effects;
|
||||
|
||||
import java.util.Date;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -52,4 +53,5 @@ public interface ContinuousEffect<T extends ContinuousEffect<T>> extends Effect<
|
|||
public void init(Ability source, Game game);
|
||||
public Layer getLayer();
|
||||
public SubLayer getSublayer();
|
||||
public void overrideRuleText(String text);
|
||||
}
|
||||
|
|
|
@ -28,20 +28,14 @@
|
|||
|
||||
package mage.abilities.effects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.EffectType;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.Constants.*;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -55,6 +49,7 @@ public abstract class ContinuousEffectImpl<T extends ContinuousEffectImpl<T>> ex
|
|||
protected boolean used = false;
|
||||
protected boolean affectedObjectsSet = false;
|
||||
protected List<UUID> objects = new ArrayList<UUID>();
|
||||
protected Map<UUID, Integer> metadata = new HashMap<UUID, Integer>();
|
||||
|
||||
public ContinuousEffectImpl(Duration duration, Outcome outcome) {
|
||||
super(outcome);
|
||||
|
@ -157,4 +152,9 @@ public abstract class ContinuousEffectImpl<T extends ContinuousEffectImpl<T>> ex
|
|||
return sublayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void overrideRuleText(String text) {
|
||||
this.staticText = text;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue