mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
* Some minor fixes/code cleanups to IKO cards.
This commit is contained in:
parent
abda99e203
commit
5743e4361e
9 changed files with 22 additions and 13 deletions
|
@ -26,7 +26,7 @@ public final class ChargeOfTheForeverBeast extends CardImpl {
|
|||
|
||||
// As an additional cost to cast this spell, reveal a creature card from your hand.
|
||||
this.getSpellAbility().addCost(new RevealTargetFromHandCost(
|
||||
new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A)
|
||||
new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_YOUR_HAND)
|
||||
));
|
||||
|
||||
// Charge of the Forever-Beast deals damage to target creature or planeswalker equal to the revealed card's power.
|
||||
|
@ -64,7 +64,7 @@ class ChargeOfTheForeverBeastEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
RevealTargetFromHandCost cost = (RevealTargetFromHandCost) source.getCosts().get(0);
|
||||
if (permanent == null && cost == null) {
|
||||
if (permanent == null || cost == null) {
|
||||
return false;
|
||||
}
|
||||
Card card = cost.getRevealedCards().get(0);
|
||||
|
|
|
@ -92,8 +92,8 @@ class CrystallineGiantEffect extends OneShotEffect {
|
|||
List<CounterType> counterTypes = new ArrayList();
|
||||
counterTypes.addAll(counterTypeSet);
|
||||
counterTypes.removeIf(counters::containsKey);
|
||||
if (counterTypes.size() == 0) {
|
||||
return false;
|
||||
if (counterTypes.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
return permanent.addCounters(counterTypes.get(
|
||||
RandomUtil.nextInt(counterTypes.size())
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class CrystallineResonance extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||
|
||||
// Whenever you cycle a card, you may have Crystalline Resonance become a copy of another target permanent until your next turn, except it has this ability.
|
||||
this.addAbility(this.createAbility());
|
||||
this.addAbility(CrystallineResonance.createAbility());
|
||||
}
|
||||
|
||||
private CrystallineResonance(final CrystallineResonance card) {
|
||||
|
|
|
@ -44,7 +44,7 @@ class DarkBargainEffect extends OneShotEffect {
|
|||
|
||||
public DarkBargainEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Look at the top three cards of your library. Put two of them into your hand and the rest into your graveyard";
|
||||
this.staticText = "Look at the top three cards of your library. Put two of them into your hand and the other into your graveyard";
|
||||
}
|
||||
|
||||
public DarkBargainEffect(final DarkBargainEffect effect) {
|
||||
|
|
|
@ -79,7 +79,6 @@ class LavabrinkVenturerEffect extends GainAbilitySourceEffect {
|
|||
if (choosenMode == null) {
|
||||
return false;
|
||||
}
|
||||
Ability ability;
|
||||
switch (choosenMode) {
|
||||
case "Odd":
|
||||
this.ability = new ProtectionAbility(oddFilter);
|
||||
|
|
|
@ -40,6 +40,7 @@ public class MythosOfSnapdax extends CardImpl {
|
|||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MythosOfSnapdax copy() {
|
||||
return new MythosOfSnapdax(this);
|
||||
}
|
||||
|
@ -113,10 +114,8 @@ class MythosOfSnapdaxEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
for (Iterator<Permanent> iterator = game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_PERMANENT_NON_LAND, source.getControllerId(), game
|
||||
).iterator(); iterator.hasNext(); ) {
|
||||
Permanent permanent = iterator.next();
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_PERMANENT_NON_LAND, source.getControllerId(), game)) {
|
||||
if (permanent == null || toKeep.contains(permanent.getId())) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,10 @@ class TitansNestEffect extends OneShotEffect {
|
|||
class TitansNestManaAbility extends ActivatedManaAbilityImpl {
|
||||
|
||||
TitansNestManaAbility() {
|
||||
super(Zone.BATTLEFIELD, (BasicManaEffect) new BasicManaEffect(new TitansNestConditionalMana()).setText("Add {C}. Spend this mana only to cast a colored spell without {X} in its mana cost."), new ExileFromGraveCost(new TargetCardInYourGraveyard()));
|
||||
super(Zone.BATTLEFIELD, (BasicManaEffect) new BasicManaEffect(
|
||||
new TitansNestConditionalMana())
|
||||
.setText("Add {C}. Spend this mana only to cast a colored spell without {X} in its mana cost."),
|
||||
new ExileFromGraveCost(new TargetCardInYourGraveyard()));
|
||||
this.netMana.add(Mana.ColorlessMana(1));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ public class ExileFromGraveCost extends CostImpl {
|
|||
+ CardUtil.numberToText(target.getMaxNumberOfTargets()))
|
||||
+ ' ' + target.getTargetName();
|
||||
} else {
|
||||
this.text = "Exile " + target.getTargetName();
|
||||
this.text = "Exile "
|
||||
+ (target.getTargetName().startsWith("card ") ? "a ":"")
|
||||
+ target.getTargetName();
|
||||
}
|
||||
if (!this.text.endsWith(" from your graveyard")) {
|
||||
this.text = this.text + " from your graveyard";
|
||||
|
|
|
@ -89,6 +89,12 @@ public final class StaticFilters {
|
|||
FILTER_CARD_CREATURE_A.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterCreatureCard FILTER_CARD_CREATURE_YOUR_HAND = new FilterCreatureCard("a creature card from your hand");
|
||||
|
||||
static {
|
||||
FILTER_CARD_CREATURE_YOUR_HAND.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterCreatureCard FILTER_CARD_CREATURE_YOUR_GRAVEYARD = new FilterCreatureCard("creature card from your graveyard");
|
||||
|
||||
static {
|
||||
|
|
Loading…
Reference in a new issue