mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TLA] waterbend is a cost, not an ability
This commit is contained in:
parent
7a241a6f1e
commit
9828e56590
5 changed files with 52 additions and 46 deletions
|
|
@ -2,13 +2,13 @@ package mage.cards.a;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.common.WaterbendCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.WaterbendAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -42,9 +42,9 @@ public final class AangsIceberg extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Waterbend {3}: Sacrifice this enchantment. If you do, scry 2.
|
||||
this.addAbility(new WaterbendAbility(new DoIfCostPaid(
|
||||
this.addAbility(new SimpleActivatedAbility(new DoIfCostPaid(
|
||||
new ScryEffect(2), new SacrificeSourceCost(), null, false
|
||||
), new GenericManaCost(3)));
|
||||
), new WaterbendCost(3)));
|
||||
}
|
||||
|
||||
private AangsIceberg(final AangsIceberg card) {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ package mage.cards.y;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.common.WaterbendCost;
|
||||
import mage.abilities.effects.common.cost.CastFromHandForFreeEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.abilities.keyword.WaterbendAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -45,7 +45,7 @@ public final class YueTheMoonSpirit extends CardImpl {
|
|||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Waterbend {5}, {T}: You may cast a noncreature spell from your hand without paying its mana cost.
|
||||
Ability ability = new WaterbendAbility(new CastFromHandForFreeEffect(filter), new GenericManaCost(5));
|
||||
Ability ability = new SimpleActivatedAbility(new CastFromHandForFreeEffect(filter), new WaterbendCost(5));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package mage.abilities.costs.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* TODO: Implement properly
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class WaterbendCost extends ManaCostsImpl {
|
||||
|
||||
public WaterbendCost(int amount) {
|
||||
this("{" + amount + '}');
|
||||
}
|
||||
|
||||
public WaterbendCost(String mana) {
|
||||
super("");
|
||||
this.text = "waterbend " + mana;
|
||||
}
|
||||
|
||||
private WaterbendCost(final WaterbendCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaterbendCost copy() {
|
||||
return new WaterbendCost(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,6 @@ import mage.constants.ColoredManaSymbol;
|
|||
import mage.constants.ManaType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterMana;
|
||||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
import mage.players.Player;
|
||||
|
|
@ -43,7 +42,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
load(mana);
|
||||
}
|
||||
|
||||
private ManaCostsImpl(final ManaCostsImpl<T> costs) {
|
||||
protected ManaCostsImpl(final ManaCostsImpl<T> costs) {
|
||||
this.id = costs.id;
|
||||
this.text = costs.text;
|
||||
this.ensureCapacity(costs.size());
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* TODO: Implement properly
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class WaterbendAbility extends SimpleActivatedAbility {
|
||||
|
||||
public WaterbendAbility(Effect effect, Cost cost) {
|
||||
this(Zone.BATTLEFIELD, effect, cost);
|
||||
}
|
||||
|
||||
public WaterbendAbility(Zone zone, Effect effect, Cost cost) {
|
||||
super(zone, effect, cost);
|
||||
}
|
||||
|
||||
private WaterbendAbility(final WaterbendAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaterbendAbility copy() {
|
||||
return new WaterbendAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Waterbend " + CardUtil.getTextWithFirstCharUpperCase(super.getRule());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue