mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Reworked Stratadon.
This commit is contained in:
parent
7938824b17
commit
87e953f6ba
1 changed files with 16 additions and 19 deletions
|
@ -30,13 +30,14 @@ package mage.sets.planeshift;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.CostModificationType;
|
||||||
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
@ -62,13 +63,6 @@ public class Stratadon extends CardImpl {
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void adjustCosts(Ability ability, Game game) {
|
|
||||||
super.adjustCosts(ability, game);
|
|
||||||
CardUtil.adjustCost((SpellAbility)ability, new DomainValue().calculate(game, ability, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Stratadon(final Stratadon card) {
|
public Stratadon(final Stratadon card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
@ -79,27 +73,30 @@ public class Stratadon extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dummy to get the text on the card.
|
class StratadonCostReductionEffect extends CostModificationEffectImpl {
|
||||||
class StratadonCostReductionEffect extends OneShotEffect {
|
|
||||||
private static final String effectText = "Domain - {this} costs {1} less to cast for each basic land type among lands you control.";
|
|
||||||
|
|
||||||
StratadonCostReductionEffect() {
|
public StratadonCostReductionEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Duration.WhileOnStack, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||||
this.staticText = effectText;
|
staticText = "<i>Domain</i> - {this} costs {1} less to cast for each basic land type among lands you control.";
|
||||||
}
|
}
|
||||||
|
|
||||||
StratadonCostReductionEffect(StratadonCostReductionEffect effect) {
|
protected StratadonCostReductionEffect(final StratadonCostReductionEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
return false;
|
CardUtil.reduceCost(abilityToModify, new DomainValue().calculate(game, source, this));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
|
return abilityToModify.getSourceId().equals(source.getSourceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StratadonCostReductionEffect copy() {
|
public StratadonCostReductionEffect copy() {
|
||||||
return new StratadonCostReductionEffect(this);
|
return new StratadonCostReductionEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue