mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
[ORI] Added Starfield of Nyx, Day's Undoing, and Kytheon's Irregulars
This commit is contained in:
parent
35d47229ea
commit
a84f1ab64b
4 changed files with 350 additions and 0 deletions
112
Mage.Sets/src/mage/sets/magicorigins/DaysUndoing.java
Normal file
112
Mage.Sets/src/mage/sets/magicorigins/DaysUndoing.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* 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.sets.magicorigins;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.EndTurnEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class DaysUndoing extends CardImpl {
|
||||
|
||||
public DaysUndoing(UUID ownerId) {
|
||||
super(ownerId, 51, "Day's Undoing", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
||||
this.expansionSetCode = "ORI";
|
||||
|
||||
// Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. If it's your turn, end the turn.
|
||||
this.getSpellAbility().addEffect(new DaysUndoingEffect());
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new EndTurnEffect(), MyTurnCondition.getInstance(), "If it's your turn, end the turn"));
|
||||
}
|
||||
|
||||
public DaysUndoing(final DaysUndoing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaysUndoing copy() {
|
||||
return new DaysUndoing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DaysUndoingEffect extends OneShotEffect {
|
||||
|
||||
public DaysUndoingEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards";
|
||||
}
|
||||
|
||||
public DaysUndoingEffect(final DaysUndoingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player sourcePlayer = game.getPlayer(source.getControllerId());
|
||||
for (UUID playerId: sourcePlayer.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
for (Card card: player.getHand().getCards(game)) {
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
for (Card card: player.getGraveyard().getCards(game)) {
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
|
||||
}
|
||||
}
|
||||
game.getState().handleSimultaneousEvent(game); // needed here so state based triggered effects
|
||||
for (UUID playerId: sourcePlayer.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.drawCards(7, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaysUndoingEffect copy() {
|
||||
return new DaysUndoingEffect(this);
|
||||
}
|
||||
|
||||
}
|
75
Mage.Sets/src/mage/sets/magicorigins/KytheonsIrregulars.java
Normal file
75
Mage.Sets/src/mage/sets/magicorigins/KytheonsIrregulars.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.sets.magicorigins;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.RenownAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class KytheonsIrregulars extends CardImpl {
|
||||
|
||||
public KytheonsIrregulars(UUID ownerId) {
|
||||
super(ownerId, 24, "Kytheon's Irregulars", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
|
||||
this.expansionSetCode = "ORI";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Solder");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Renown 1 <i>(When this creature deals combat damage to a player
|
||||
this.addAbility(new RenownAbility(1));
|
||||
// if it isn't renowned
|
||||
// put a +1/+1 counter on it and it becomes renowned.)</i)
|
||||
// {W}{W}: Tap target creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{W}{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public KytheonsIrregulars(final KytheonsIrregulars card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KytheonsIrregulars copy() {
|
||||
return new KytheonsIrregulars(this);
|
||||
}
|
||||
}
|
162
Mage.Sets/src/mage/sets/magicorigins/StarfieldOfNyx.java
Normal file
162
Mage.Sets/src/mage/sets/magicorigins/StarfieldOfNyx.java
Normal file
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* 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.sets.magicorigins;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterEnchantment;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.other.OwnerPredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class StarfieldOfNyx extends CardImpl {
|
||||
|
||||
private static final String rule1 = "As long as you control five or more enchantments, each other non-Aura enchantment you control is a creature in addition to its other types and has base power and base toughness each equal to its converted mana cost.";
|
||||
|
||||
private static final FilterCard filterGraveyardEnchantment = new FilterCard("enchantment card from your graveyard");
|
||||
private static final FilterEnchantment filterEnchantmentYouControl = new FilterEnchantment("enchantment you control");
|
||||
|
||||
static {
|
||||
filterEnchantmentYouControl.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
static {
|
||||
filterGraveyardEnchantment.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
filterGraveyardEnchantment.add(new OwnerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public StarfieldOfNyx(UUID ownerId) {
|
||||
super(ownerId, 33, "Starfield of Nyx", Rarity.MYTHIC, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}");
|
||||
this.expansionSetCode = "ORI";
|
||||
|
||||
// At the beginning of your upkeep, you may return target enchantment card from your graveyard to the battlefield.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new ReturnFromGraveyardToBattlefieldTargetEffect(), TargetController.YOU, true);
|
||||
ability.addTarget(new TargetCardInGraveyard(filterGraveyardEnchantment));
|
||||
this.addAbility(ability);
|
||||
|
||||
// As long as you control five or more enchantments, each other non-Aura enchantment you control is a creature in addition to its other types and has base power and base toughness each equal to its converted mana cost.
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new StarfieldOfNyxEffect(), new PermanentsOnTheBattlefieldCondition(filterEnchantmentYouControl, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 4), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public StarfieldOfNyx(final StarfieldOfNyx card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarfieldOfNyx copy() {
|
||||
return new StarfieldOfNyx(this);
|
||||
}
|
||||
}
|
||||
|
||||
class StarfieldOfNyxEffect extends ContinuousEffectImpl {
|
||||
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("Each other non-Aura enchantment you control");
|
||||
static {
|
||||
filter.add(Predicates.not(new SubtypePredicate("Aura")));
|
||||
filter.add(new AnotherPredicate());
|
||||
filter.add(new OwnerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public StarfieldOfNyxEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.BecomeCreature);
|
||||
staticText = "Each other non-Aura enchantment is a creature in addition to its other types and has base power and toughness each equal to its converted mana cost";
|
||||
}
|
||||
|
||||
public StarfieldOfNyxEffect(final StarfieldOfNyxEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarfieldOfNyxEffect copy() {
|
||||
return new StarfieldOfNyxEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
if (!permanent.getCardType().contains(CardType.CREATURE)) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PTChangingEffects_7:
|
||||
if (sublayer == SubLayer.SetPT_7b) {
|
||||
int manaCost = permanent.getManaCost().convertedManaCost();
|
||||
permanent.getPower().setValue(manaCost);
|
||||
permanent.getToughness().setValue(manaCost);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasLayer(Layer layer) {
|
||||
return layer == Layer.PTChangingEffects_7 || layer == Layer.TypeChangingEffects_4;
|
||||
}
|
||||
|
||||
}
|
|
@ -26069,6 +26069,7 @@ Hixus, Prison Warden|Magic Origins|19|R|{3}{W}{W}|Legendary Creature - Human Sol
|
|||
Knight of the Pilgrim's Road|Magic Origins|20|C|{2}{W}|Creature - Human Knight|3|2|Renown 1 <i>(When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.)</i>|
|
||||
Gideon, Battle-Forged|Magic Origins|23|M||Planeswalker - Gideon|3|+2: Up to one target creature an opponent controls attacks Gideon, Battle-Forged during its controller's next turn if able.$+1: Until your next turn, target creature gains indestructible. Untap that creature.$0: Until end of turn, Gideon, Battle-Forged becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.|
|
||||
Kytheon, Hero of Akros|Magic Origins|23|M|{W}|Legendary Creature - Human Soldier|2|1|At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, then return him to the battlefield transformed under his owner's control.${2}{W}: Kytheon gains indestructible until end of turn.|
|
||||
Kytheon's Irregulars|Magic Origins|24|R|{2}{W}{W}|Creature - Human Solder|4|3|Renown 1 <i>(When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.)</i)${W}{W}: Tap target creature.|
|
||||
Mighty Leap|Magic Origins|26|C|{1}{W}|Instant|||Target creature gets +2/+2 and gains flying until end of turn.|
|
||||
Patron of the Valiant|Magic Origins|28|U|{3}{W}{W}|Creature - Angel|4|4|Flying$When Patron of the Valiant enters the battlefield, put a +1/+1 counter on each creature you control with a +1/+1 counter on it.|
|
||||
Relic Seeker|Magic Origins|29|R|{1}{W}|Creature - Human|2|2|Renown 1 <i>(When this creature deals combat damage to a player, put a +1/+1 counter on it and it becomes renowned.)</i>$When Relic Seeker becomes renowned, you may search your library for an Equipment card, reveal it, put it in your hand, then shuffle your library.|
|
||||
|
|
Loading…
Reference in a new issue