mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
* Fixed function and handling of the Ice Age depletion counter lands.
This commit is contained in:
parent
ef3e432188
commit
01a14a2665
9 changed files with 95 additions and 79 deletions
|
|
@ -31,9 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -83,12 +81,12 @@ class CantBeEquippedSourceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
}
|
||||
|
||||
public CantBeEquippedSourceEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Neutral);
|
||||
staticText = "{this} can't be equipped";
|
||||
super(Duration.WhileOnBattlefield, Outcome.Neutral);
|
||||
staticText = "{this} can't be equipped";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ContinuousEffect copy() {
|
||||
public CantBeEquippedSourceEffect copy() {
|
||||
return new CantBeEquippedSourceEffect(this);
|
||||
}
|
||||
|
||||
|
|
@ -96,14 +94,14 @@ class CantBeEquippedSourceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ATTACH;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getTargetId().equals(source.getSourceId())) {
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
if(permanent != null && permanent.getSubtype().contains("Equipment")){
|
||||
return true;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
if (permanent != null && permanent.getSubtype().contains("Equipment")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect;
|
||||
|
|
@ -50,7 +49,7 @@ import mage.counters.CounterType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author Luna Skyrise
|
||||
*/
|
||||
public class LandCap extends CardImpl {
|
||||
|
||||
|
|
@ -59,15 +58,15 @@ public class LandCap extends CardImpl {
|
|||
this.expansionSetCode = "ICE";
|
||||
|
||||
// Land Cap doesn't untap during your untap step if it has a depletion counter on it.
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 0));
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(false, true),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 1, Integer.MAX_VALUE));
|
||||
effect.setText("{this} doesn't untap during your untap step if it has a depletion counter on it");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
this.addAbility(ability);
|
||||
// At the beginning of your upkeep, remove a depletion counter from Land Cap.
|
||||
Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.DEPLETION.createInstance()), TargetController.YOU, false);
|
||||
this.addAbility(ability2);
|
||||
// {tap}: Add {W} or {U} to your mana pool. Put a depletion counter on Land Cap.
|
||||
// {T}: Add {W} or {U} to your mana pool. Put a depletion counter on Land Cap.
|
||||
Ability ability3 = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.WhiteMana, new TapSourceCost());
|
||||
ability3.addEffect(new AddCountersSourceEffect(CounterType.DEPLETION.createInstance()));
|
||||
this.addAbility(ability3);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import mage.counters.CounterType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author Luna Skyrise
|
||||
*/
|
||||
public class LavaTubes extends CardImpl {
|
||||
|
||||
|
|
@ -58,8 +58,8 @@ public class LavaTubes extends CardImpl {
|
|||
this.expansionSetCode = "ICE";
|
||||
|
||||
// Lava Tubes doesn't untap during your untap step if it has a depletion counter on it.
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 0));
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(false, true),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 1, Integer.MAX_VALUE));
|
||||
effect.setText("{this} doesn't untap during your untap step if it has a depletion counter on it");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect;
|
||||
|
|
@ -50,7 +49,7 @@ import mage.counters.CounterType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author Luna Skyrise
|
||||
*/
|
||||
public class RiverDelta extends CardImpl {
|
||||
|
||||
|
|
@ -59,8 +58,8 @@ public class RiverDelta extends CardImpl {
|
|||
this.expansionSetCode = "ICE";
|
||||
|
||||
// River Delta doesn't untap during your untap step if it has a depletion counter on it.
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 0));
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(false, true),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 1, Integer.MAX_VALUE));
|
||||
effect.setText("{this} doesn't untap during your untap step if it has a depletion counter on it");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import mage.counters.CounterType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author Luna Skyrise
|
||||
*/
|
||||
public class TimberlineRidge extends CardImpl {
|
||||
|
||||
|
|
@ -58,8 +58,8 @@ public class TimberlineRidge extends CardImpl {
|
|||
this.expansionSetCode = "ICE";
|
||||
|
||||
// Timberline Ridge doesn't untap during your untap step if it has a depletion counter on it.
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 0));
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(false, true),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 1, Integer.MAX_VALUE));
|
||||
effect.setText("{this} doesn't untap during your untap step if it has a depletion counter on it");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import mage.counters.CounterType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author Luna Skyrise
|
||||
*/
|
||||
public class Veldt extends CardImpl {
|
||||
|
||||
|
|
@ -58,8 +58,8 @@ public class Veldt extends CardImpl {
|
|||
this.expansionSetCode = "ICE";
|
||||
|
||||
// Veldt doesn't untap during your untap step if it has a depletion counter on it.
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 0));
|
||||
Effect effect = new ConditionalContinuousRuleModifyingEffect(new DontUntapInControllersUntapStepSourceEffect(false, true),
|
||||
new SourceHasCounterCondition(CounterType.DEPLETION, 1, Integer.MAX_VALUE));
|
||||
effect.setText("{this} doesn't untap during your untap step if it has a depletion counter on it");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue