mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
Addressed Feedback and added cards
* Addressed feedback on Pull Request #3053 * Fixed a copy-paste bug in Destined // Lead * Added two new Aftermath Split cards that were revealed today
This commit is contained in:
parent
18663f0a7a
commit
fd73fd39af
6 changed files with 218 additions and 35 deletions
|
@ -54,18 +54,8 @@ public class ModernSplitCardRenderer extends ModernCardRenderer {
|
||||||
rightHalf.name = cardView.getRightSplitName();
|
rightHalf.name = cardView.getRightSplitName();
|
||||||
leftHalf.name = cardView.getLeftSplitName();
|
leftHalf.name = cardView.getLeftSplitName();
|
||||||
|
|
||||||
for (String rule: view.getRules()) {
|
isFuse = view.getRules().stream().anyMatch(rule -> rule.contains("Fuse"));
|
||||||
if (rule.contains("Fuse")) {
|
isAftermath = view.getRightSplitRules().stream().anyMatch(rule -> rule.contains("Aftermath"));
|
||||||
isFuse = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (String rule: view.getRightSplitRules()) {
|
|
||||||
if (rule.contains("Aftermath")) {
|
|
||||||
isAftermath = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// It's easier for rendering to swap the card halves here because for aftermath cards
|
// It's easier for rendering to swap the card halves here because for aftermath cards
|
||||||
// they "rotate" in opposite directions making consquence and normal split cards
|
// they "rotate" in opposite directions making consquence and normal split cards
|
||||||
|
|
|
@ -28,34 +28,19 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.*;
|
|
||||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.AftermathAbility;
|
import mage.abilities.keyword.AftermathAbility;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.SplitCard;
|
import mage.cards.SplitCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterCard;
|
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,7 +61,7 @@ public class DestinedLead extends SplitCard {
|
||||||
effect.setText("Target creature gets +1/+0");
|
effect.setText("Target creature gets +1/+0");
|
||||||
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
|
effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
|
||||||
effect.setText("and gains indestructible until end of turn");
|
effect.setText("and gains indestructible until end of turn");
|
||||||
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
|
|
99
Mage.Sets/src/mage/cards/o/OnwardVictory.java
Normal file
99
Mage.Sets/src/mage/cards/o/OnwardVictory.java
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package mage.cards.o;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.TargetPermanentPowerCount;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.*;
|
||||||
|
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.AftermathAbility;
|
||||||
|
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.SplitCard;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author stravant
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public class OnwardVictory extends SplitCard {
|
||||||
|
|
||||||
|
public OnwardVictory(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY},"{2}{R}","{2}{W}",false);
|
||||||
|
|
||||||
|
// Onward
|
||||||
|
// Target creature gets +X/+0 until end of turn where X is its power.
|
||||||
|
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true));
|
||||||
|
|
||||||
|
// to
|
||||||
|
|
||||||
|
// Victory
|
||||||
|
// Target creature gains double strike until end of turn.
|
||||||
|
((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
|
||||||
|
Effect effect = new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||||
|
getRightHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
}
|
||||||
|
|
||||||
|
public OnwardVictory(final OnwardVictory card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OnwardVictory copy() {
|
||||||
|
return new OnwardVictory(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
109
Mage.Sets/src/mage/cards/p/PreparedFight.java
Normal file
109
Mage.Sets/src/mage/cards/p/PreparedFight.java
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.common.OpponentControlsPermanentCondition;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.*;
|
||||||
|
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.AftermathAbility;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.SplitCard;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author stravant
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public class PreparedFight extends SplitCard {
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
|
||||||
|
static {
|
||||||
|
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||||
|
}
|
||||||
|
|
||||||
|
public PreparedFight(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY},"{1}{W}","{3}{G}",false);
|
||||||
|
|
||||||
|
// Prepared
|
||||||
|
// Untap target creature. It gets +2/+2 and gains lifelink until end of turn.
|
||||||
|
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
Effect effect = new UntapTargetEffect();
|
||||||
|
effect.setText("Untap target creature.");
|
||||||
|
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
|
||||||
|
effect.setText("It gets +2/+2");
|
||||||
|
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
|
||||||
|
effect.setText("and gains lifelink until end of turn.");
|
||||||
|
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
|
// to
|
||||||
|
|
||||||
|
// Fight
|
||||||
|
// Target creature you control fights target creature you don't control.
|
||||||
|
((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
|
||||||
|
getRightHalfCard().getSpellAbility().addEffect(new FightTargetsEffect());
|
||||||
|
getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||||
|
Target target = new TargetCreaturePermanent(filter);
|
||||||
|
getRightHalfCard().getSpellAbility().addTarget(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PreparedFight(final PreparedFight card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PreparedFight copy() {
|
||||||
|
return new PreparedFight(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -54,5 +54,7 @@ public class Amonkhet extends ExpansionSet {
|
||||||
this.ratioBoosterMythic = 8;
|
this.ratioBoosterMythic = 8;
|
||||||
cards.add(new SetCardInfo("Dusk // Dawn", 210, Rarity.RARE, mage.cards.d.DuskDawn.class));
|
cards.add(new SetCardInfo("Dusk // Dawn", 210, Rarity.RARE, mage.cards.d.DuskDawn.class));
|
||||||
cards.add(new SetCardInfo("Destined // Lead", 217, Rarity.UNCOMMON, mage.cards.d.DestinedLead.class));
|
cards.add(new SetCardInfo("Destined // Lead", 217, Rarity.UNCOMMON, mage.cards.d.DestinedLead.class));
|
||||||
|
cards.add(new SetCardInfo("Onward // Victory", 218, Rarity.UNCOMMON, mage.cards.o.OnwardVictory.class));
|
||||||
|
cards.add(new SetCardInfo("Prepared // Fight", 220, Rarity.RARE, mage.cards.p.PreparedFight.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package mage.constants;
|
package mage.constants;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,13 +35,9 @@ public enum CardType {
|
||||||
* Duplicates are eliminated.
|
* Duplicates are eliminated.
|
||||||
*/
|
*/
|
||||||
public static CardType[] mergeTypes(CardType[] a, CardType[] b) {
|
public static CardType[] mergeTypes(CardType[] a, CardType[] b) {
|
||||||
HashSet<CardType> cardTypes = new HashSet<>();
|
EnumSet<CardType> cardTypes = EnumSet.noneOf(CardType.class);
|
||||||
for (CardType t: a) {
|
cardTypes.addAll(Arrays.asList(a));
|
||||||
cardTypes.add(t);
|
cardTypes.addAll(Arrays.asList(b));
|
||||||
}
|
|
||||||
for (CardType t: b) {
|
|
||||||
cardTypes.add(t);
|
|
||||||
}
|
|
||||||
return cardTypes.toArray(new CardType[0]);
|
return cardTypes.toArray(new CardType[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue