Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Mage.Sets/src/mage/cards/b/BenevolentRiverSpirit.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;

import java.util.UUID;

Expand All @@ -28,6 +31,9 @@ public BenevolentRiverSpirit(UUID ownerId, CardSetInfo setInfo) {

// As an additional cost to cast this spell, waterbend {5}.
this.getSpellAbility().addCost(new WaterbendCost(5));
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {5}")
).setRuleAtTheTop(true));

// Flying
this.addAbility(FlyingAbility.getInstance());
Expand Down
12 changes: 9 additions & 3 deletions Mage.Sets/src/mage/cards/c/CrashingWave.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package mage.cards.c;

import mage.abilities.Ability;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.WaterbendXCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterOpponentsCreaturePermanent;
Expand All @@ -30,7 +33,10 @@ public CrashingWave(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{U}");

// As an additional cost to cast this spell, waterbend {X}.
this.getSpellAbility().addCost(new WaterbendCost("{X}"));
this.getSpellAbility().addCost(new WaterbendXCost());
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {X}")
).setRuleAtTheTop(true));

// Tap up to X target creatures, then distribute three stun counters among tapped creatures your opponents control.
this.getSpellAbility().addEffect(new TapTargetEffect("tap up to X target creatures"));
Expand Down Expand Up @@ -79,7 +85,7 @@ public boolean apply(Game game, Ability source) {
}
TargetPermanentAmount target = new TargetPermanentAmount(3, 1, filter);
target.withNotTarget(true);
player.chooseTarget(outcome, target, source, game);
target.chooseTarget(outcome, player.getId(), source, game);
for (UUID targetId : target.getTargets()) {
Optional.ofNullable(targetId)
.map(game::getPermanent)
Expand Down
9 changes: 7 additions & 2 deletions Mage.Sets/src/mage/cards/f/FoggySwampVisions.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package mage.cards.f;

import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.costs.common.WaterbendXCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.SacrificeTargetEffect;
import mage.cards.*;
import mage.constants.CardType;
Expand Down Expand Up @@ -33,7 +35,10 @@ public FoggySwampVisions(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");

// As an additional cost to cast this spell, waterbend {X}.
this.getSpellAbility().addCost(new WaterbendCost("{X}"));
this.getSpellAbility().addCost(new WaterbendXCost());
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {X}")
).setRuleAtTheTop(true));

// Exile X target creature cards from graveyards. For each creature card exiled this way, create a token that's a copy of it. At the beginning of your next end step, sacrifice those tokens.
this.getSpellAbility().addEffect(new FoggySwampVisionsEffect());
Expand Down
15 changes: 8 additions & 7 deletions Mage.Sets/src/mage/cards/h/HamaTheBloodbender.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.Costs;
import mage.abilities.costs.CostsImpl;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.MillCardsTargetEffect;
Expand All @@ -20,6 +20,7 @@
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;

Expand All @@ -42,6 +43,7 @@ public HamaTheBloodbender(UUID ownerId, CardSetInfo setInfo) {
// When Hama enters, target opponent mills three cards. Exile up to one noncreature, nonland card from that player's graveyard. For as long as you control Hama, you may cast the exiled card during your turn by waterbending {X} rather than paying its mana cost, where X is its mana value.
Ability ability = new EntersBattlefieldTriggeredAbility(new MillCardsTargetEffect(3));
ability.addEffect(new HamaTheBloodbenderExileEffect());
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}

Expand Down Expand Up @@ -143,10 +145,9 @@ public boolean applies(UUID objectId, Ability source, UUID affectedControllerId,
if (player == null) {
return false;
}
Costs<Cost> newCosts = new CostsImpl<>();
newCosts.add(new WaterbendCost(card.getManaValue()));
newCosts.addAll(card.getSpellAbility().getCosts());
player.setCastSourceIdWithAlternateMana(card.getId(), null, newCosts);
ManaCosts<ManaCost> manaCosts = new ManaCostsImpl<>("{0}");
manaCosts.add(new WaterbendCost(card.getManaValue()));
player.setCastSourceIdWithAlternateMana(card.getId(), manaCosts, card.getSpellAbility().getCosts());
return true;
}
}
7 changes: 2 additions & 5 deletions Mage.Sets/src/mage/cards/k/KataraWaterTribesHope.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.costs.mana.VariableManaCost;
import mage.abilities.costs.common.WaterbendXCost;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.InfoEffect;
Expand All @@ -20,7 +19,6 @@
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.AllyToken;
import mage.util.CardUtil;

import java.util.UUID;

Expand Down Expand Up @@ -49,9 +47,8 @@ public KataraWaterTribesHope(UUID ownerId, CardSetInfo setInfo) {
Ability ability = new ActivateIfConditionActivatedAbility(new SetBasePowerToughnessAllEffect(
GetXValue.instance, GetXValue.instance, Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURES
), new WaterbendCost("{X}"), MyTurnCondition.instance);
), new WaterbendXCost(1), MyTurnCondition.instance);
ability.addEffect(new InfoEffect("X can't be 0"));
CardUtil.castStream(ability.getCosts(), VariableManaCost.class).forEach(cost -> cost.setMinX(1));
this.addAbility(ability);
}

Expand Down
6 changes: 6 additions & 0 deletions Mage.Sets/src/mage/cards/w/WaterWhip.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package mage.cards.w;

import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;

import java.util.UUID;
Expand All @@ -23,6 +26,9 @@ public WaterWhip(UUID ownerId, CardSetInfo setInfo) {

// As an additional cost to cast this spell, waterbend {5}.
this.getSpellAbility().addCost(new WaterbendCost(5));
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {5}")
).setRuleAtTheTop(true));

// Return up to two target creatures to their owners' hands. Draw two cards.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
Expand Down
10 changes: 8 additions & 2 deletions Mage.Sets/src/mage/cards/w/WaterbendersRestoration.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package mage.cards.w;

import mage.abilities.costs.common.WaterbendCost;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.WaterbendXCost;
import mage.abilities.effects.common.ExileReturnBattlefieldNextEndStepTargetEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetadjustment.XTargetsCountAdjuster;

Expand All @@ -22,7 +25,10 @@ public WaterbendersRestoration(UUID ownerId, CardSetInfo setInfo) {
this.subtype.add(SubType.LESSON);

// As an additional cost to cast this spell, waterbend {X}.
this.getSpellAbility().addCost(new WaterbendCost("{X}"));
this.getSpellAbility().addCost(new WaterbendXCost());
this.addAbility(new SimpleStaticAbility(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't currently test this, but I think this would already be handled by AbiliitesImpl.getRules unless I'm mistaken.
Image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a mana cost so it gets excluded and I don't think it's worth figuring out how to make it work rather than just having a workaround

Zone.ALL, new InfoEffect("as an additional cost to cast this spell, waterbend {X}")
).setRuleAtTheTop(true));

// Exile X target creatures you control. Return those cards to the battlefield under their owner's control at the beginning of the next end step.
this.getSpellAbility().addEffect(new ExileReturnBattlefieldNextEndStepTargetEffect()
Expand Down
6 changes: 0 additions & 6 deletions Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
import mage.constants.Rarity;
import mage.constants.SetType;

import java.util.Arrays;
import java.util.List;

/**
* @author TheElk801
*/
public final class AvatarTheLastAirbender extends ExpansionSet {

private static final List<String> unfinished = Arrays.asList("Aang's Iceberg", "Aang, Swift Savior", "Avatar Aang", "Benevolent River Spirit", "Crashing Wave", "Flexible Waterbender", "Foggy Swamp Vinebender", "Foggy Swamp Visions", "Geyser Leaper", "Giant Koi", "Hama, the Bloodbender", "Invasion Submersible", "Katara, Bending Prodigy", "Katara, Water Tribe's Hope", "North Pole Patrol", "Ruinous Waterbending", "Secret of Bloodbending", "Spirit Water Revival", "The Legend of Kuruk", "The Unagi of Kyoshi Island", "Waterbender Ascension", "Waterbending Lesson", "Water Tribe Rallier", "Watery Grasp", "Yue, the Moon Spirit");
private static final AvatarTheLastAirbender instance = new AvatarTheLastAirbender();

public static AvatarTheLastAirbender getInstance() {
Expand Down Expand Up @@ -430,7 +426,5 @@ private AvatarTheLastAirbender() {
cards.add(new SetCardInfo("Zuko, Conflicted", 253, Rarity.RARE, mage.cards.z.ZukoConflicted.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Zuko, Conflicted", 302, Rarity.RARE, mage.cards.z.ZukoConflicted.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Zuko, Exiled Prince", 163, Rarity.UNCOMMON, mage.cards.z.ZukoExiledPrince.class));

cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName()));
}
}
7 changes: 0 additions & 7 deletions Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
import mage.constants.Rarity;
import mage.constants.SetType;

import java.util.Arrays;
import java.util.List;

/**
* @author TheElk801
*/
public final class AvatarTheLastAirbenderEternal extends ExpansionSet {

private static final List<String> unfinished = Arrays.asList("Katara, Seeking Revenge", "Ruthless Waterbender", "Waterbender's Restoration", "Water Whip");

private static final AvatarTheLastAirbenderEternal instance = new AvatarTheLastAirbenderEternal();

public static AvatarTheLastAirbenderEternal getInstance() {
Expand Down Expand Up @@ -342,7 +337,5 @@ private AvatarTheLastAirbenderEternal() {
cards.add(new SetCardInfo("Zuko, Firebending Master", 127, Rarity.MYTHIC, mage.cards.z.ZukoFirebendingMaster.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Zuko, Firebending Master", 200, Rarity.MYTHIC, mage.cards.z.ZukoFirebendingMaster.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Zuko, Seeking Honor", 150, Rarity.UNCOMMON, mage.cards.z.ZukoSeekingHonor.class));

cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName()));
}
}
Loading