[JOU] Added 6 cards.

This commit is contained in:
LevelX2 2014-04-15 17:39:21 +02:00
parent f53776725a
commit f9a22291d4
16 changed files with 790 additions and 87 deletions

View file

@ -0,0 +1,69 @@
/*
* 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.journeyintonyx;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continious.GainAbilityControllerEffect;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LevelX2
*/
public class AegisOfTheGods extends CardImpl<AegisOfTheGods> {
public AegisOfTheGods(UUID ownerId) {
super(ownerId, 1, "Aegis of the Gods", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{W}");
this.expansionSetCode = "JOU";
this.subtype.add("Human");
this.subtype.add("Soldier");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// You have hexproof.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield)));
}
public AegisOfTheGods(final AegisOfTheGods card) {
super(card);
}
@Override
public AegisOfTheGods copy() {
return new AegisOfTheGods(this);
}
}

View file

@ -0,0 +1,133 @@
/*
* 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.journeyintonyx;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.CostModificationEffectImpl;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.HeroicAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.CostModificationType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.target.Target;
import mage.util.CardUtil;
/**
*
* @author LevelX2
*/
public class BattlefieldThaumaturge extends CardImpl<BattlefieldThaumaturge> {
public BattlefieldThaumaturge(UUID ownerId) {
super(ownerId, 32, "Battlefield Thaumaturge", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "JOU";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Each instant and sorcery spell you cast costs 1 less to cast for each creature it targets.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BattlefieldThaumaturgeSpellsCostReductionEffect()));
// Heroic - Whenever you cast a spell that targets Battlefield Thaumaturge, Battlefield Thaumaturge gains hexproof until end of turn.
this.addAbility(new HeroicAbility(new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.EndOfTurn)));
}
public BattlefieldThaumaturge(final BattlefieldThaumaturge card) {
super(card);
}
@Override
public BattlefieldThaumaturge copy() {
return new BattlefieldThaumaturge(this);
}
}
class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEffectImpl<BattlefieldThaumaturgeSpellsCostReductionEffect> {
private static final FilterSpell filter = new FilterSpell("instant and sorcery spell");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
}
public BattlefieldThaumaturgeSpellsCostReductionEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
this.staticText = "Each instant and sorcery spell you cast costs 1 less to cast for each creature it targets";
}
protected BattlefieldThaumaturgeSpellsCostReductionEffect(BattlefieldThaumaturgeSpellsCostReductionEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source, Ability abilityToModify) {
int creatureTargets = 0;
for (Target target: abilityToModify.getTargets()) {
for (UUID uuid: target.getTargets()) {
Permanent permanent = game.getPermanent(uuid);
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
creatureTargets++;
}
}
}
CardUtil.reduceCost(abilityToModify, creatureTargets);
return true;
}
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if ((abilityToModify instanceof SpellAbility)
&& abilityToModify.getControllerId().equals(source.getControllerId())) {
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
return spell != null && this.filter.match(spell, game);
}
return false;
}
@Override
public BattlefieldThaumaturgeSpellsCostReductionEffect copy() {
return new BattlefieldThaumaturgeSpellsCostReductionEffect(this);
}
}

View file

@ -0,0 +1,73 @@
/*
* 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.journeyintonyx;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.FilterPermanent;
/**
*
* @author LevelX2
*/
public class BearerOfTheHeavens extends CardImpl<BearerOfTheHeavens> {
public BearerOfTheHeavens(UUID ownerId) {
super(ownerId, 9991, "Bearer of the Heavens", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{7}{R}");
this.expansionSetCode = "JOU";
this.subtype.add("Giant");
this.color.setRed(true);
this.power = new MageInt(10);
this.toughness = new MageInt(10);
// When Bearer of the Heavens dies, destroy all permanents at the beginning of the next end step.
DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new DestroyAllEffect(new FilterPermanent("permanents")));
Effect effect = new CreateDelayedTriggeredAbilityEffect(delayedAbility);
effect.setText("destroy all permanents at the beginning of the next end step");
this.addAbility(new DiesTriggeredAbility(effect, false));
}
public BearerOfTheHeavens(final BearerOfTheHeavens card) {
super(card);
}
@Override
public BearerOfTheHeavens copy() {
return new BearerOfTheHeavens(this);
}
}

View file

@ -0,0 +1,208 @@
/*
* 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.journeyintonyx;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.common.continious.ExchangeControlTargetEffect;
import mage.abilities.keyword.InspiredAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent;
import mage.util.CardUtil;
/**
*
* @author LevelX2
*/
public class DaringThief extends CardImpl<DaringThief> {
public DaringThief(UUID ownerId) {
super(ownerId, 36, "Daring Thief", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.expansionSetCode = "JOU";
this.subtype.add("Human");
this.subtype.add("Rogue");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Inspired - Whenever Daring Thief becomes untapped, you may exchange control of target nonland permanent you control and target permanent an opponent controls that shares a card type with it.
Ability ability = new InspiredAbility(new ExchangeControlTargetEffect(Duration.EndOfGame,
"you may exchange control of target nonland permanent you control and target permanent an opponent controls that shares a card type with it", false, true), true);
ability.addTarget(new TargetControlledPermanentSharingOpponentPermanentCardType());
ability.addTarget(new DaringThiefSecondTarget());
this.addAbility(ability);
}
public DaringThief(final DaringThief card) {
super(card);
}
@Override
public DaringThief copy() {
return new DaringThief(this);
}
}
class TargetControlledPermanentSharingOpponentPermanentCardType extends TargetControlledPermanent<TargetControlledPermanentSharingOpponentPermanentCardType> {
public TargetControlledPermanentSharingOpponentPermanentCardType() {
super();
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
setTargetName("nonland permanent you control");
setRequired(true);
}
public TargetControlledPermanentSharingOpponentPermanentCardType(final TargetControlledPermanentSharingOpponentPermanentCardType target) {
super(target);
}
@Override
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {
if (super.canTarget(controllerId, id, source, game)) {
Set<CardType> cardTypes = getOpponentPermanentCardTypes(source.getSourceId(), controllerId, game);
Permanent permanent = game.getPermanent(id);
for (CardType type : permanent.getCardType()) {
if (cardTypes.contains(type)) {
return true;
}
}
}
return false;
}
@Override
public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) {
// get all cardtypes from opponents permanents
Set<CardType> cardTypes = getOpponentPermanentCardTypes(sourceId, sourceControllerId, game);
Set<UUID> possibleTargets = new HashSet<>();
MageObject targetSource = game.getObject(sourceId);
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, sourceControllerId, sourceId, game)) {
if (!targets.containsKey(permanent.getId()) && permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) {
for (CardType type : permanent.getCardType()) {
if (cardTypes.contains(type)) {
possibleTargets.add(permanent.getId());
break;
}
}
}
}
return possibleTargets;
}
@Override
public TargetControlledPermanentSharingOpponentPermanentCardType copy() {
return new TargetControlledPermanentSharingOpponentPermanentCardType(this);
}
private Set<CardType> getOpponentPermanentCardTypes(UUID sourceId, UUID sourceControllerId, Game game) {
Player controller = game.getPlayer(sourceControllerId);
Set<CardType> cardTypes = new HashSet<>();
if (controller != null) {
for (Permanent permanent: game.getBattlefield().getActivePermanents(sourceId, game)) {
if (controller.hasOpponent(permanent.getControllerId(), game)) {
cardTypes.addAll(permanent.getCardType());
}
}
}
return cardTypes;
}
}
class DaringThiefSecondTarget extends TargetPermanent<DaringThiefSecondTarget> {
private Permanent firstTarget = null;
public DaringThiefSecondTarget() {
super();
filter.add(new ControllerPredicate(TargetController.OPPONENT));
setTargetName("permanent an opponent controls that shares a card type with it");
}
public DaringThiefSecondTarget(final DaringThiefSecondTarget target) {
super(target);
this.firstTarget = target.firstTarget;
}
@Override
public boolean canTarget(UUID id, Ability source, Game game) {
if (super.canTarget(id, source, game)) {
Permanent target1 = game.getPermanent(source.getFirstTarget());
Permanent opponentPermanent = game.getPermanent(id);
if (target1 != null && opponentPermanent != null) {
return CardUtil.shareTypes(target1, opponentPermanent);
}
}
return false;
}
@Override
public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) {
Set<UUID> possibleTargets = new HashSet<>();
if (firstTarget != null) {
MageObject targetSource = game.getObject(sourceId);
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, sourceControllerId, sourceId, game)) {
if (!targets.containsKey(permanent.getId()) && permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) {
if (CardUtil.shareTypes(permanent, firstTarget)) {
possibleTargets.add(permanent.getId());
}
}
}
}
return possibleTargets;
}
@Override
public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game) {
firstTarget = game.getPermanent(source.getFirstTarget());
return super.chooseTarget(Outcome.Damage, playerId, source, game);
}
@Override
public DaringThiefSecondTarget copy() {
return new DaringThiefSecondTarget(this);
}
}

View file

@ -0,0 +1,149 @@
/*
* 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.journeyintonyx;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.watchers.Watcher;
import mage.watchers.WatcherImpl;
/**
*
* @author LevelX2
*/
public class EidolonOfRhetoric extends CardImpl<EidolonOfRhetoric> {
public EidolonOfRhetoric(UUID ownerId) {
super(ownerId, 10, "Eidolon of Rhetoric", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}");
this.expansionSetCode = "JOU";
this.subtype.add("Spirit");
this.color.setWhite(true);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
// Each player can't cast more than one spell each turn.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EidolonOfRhetoricEffect()));
this.addWatcher(new EidolonOfRhetoricWatcher());
}
public EidolonOfRhetoric(final EidolonOfRhetoric card) {
super(card);
}
@Override
public EidolonOfRhetoric copy() {
return new EidolonOfRhetoric(this);
}
}
class EidolonOfRhetoricWatcher extends WatcherImpl<EidolonOfRhetoricWatcher> {
public EidolonOfRhetoricWatcher() {
super("SpellCast", WatcherScope.PLAYER);
}
public EidolonOfRhetoricWatcher(final EidolonOfRhetoricWatcher watcher) {
super(watcher);
}
@Override
public EidolonOfRhetoricWatcher copy() {
return new EidolonOfRhetoricWatcher(this);
}
@Override
public void watch(GameEvent event, Game game) {
if (condition == true) {//no need to check - condition has already occured
return;
}
if (event.getType() == GameEvent.EventType.SPELL_CAST ) {
Permanent enchantment = game.getPermanent(this.sourceId);
if (enchantment != null && enchantment.getAttachedTo() != null) {
Player player = game.getPlayer(enchantment.getAttachedTo());
if (player != null && event.getPlayerId().equals(player.getId())) {
condition = true;
}
}
}
}
}
class EidolonOfRhetoricEffect extends ReplacementEffectImpl<EidolonOfRhetoricEffect> {
public EidolonOfRhetoricEffect() {
super(Duration.WhileOnBattlefield, Outcome.Detriment);
staticText = "Each player can't cast more than one spell each turn";
}
public EidolonOfRhetoricEffect(final EidolonOfRhetoricEffect effect) {
super(effect);
}
@Override
public EidolonOfRhetoricEffect copy() {
return new EidolonOfRhetoricEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
return true;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == GameEvent.EventType.CAST_SPELL) {
Watcher watcher = game.getState().getWatchers().get("SpellCast", event.getPlayerId());
if (watcher != null && watcher.conditionMet()) {
return true;
}
}
return false;
}
}

View file

@ -36,10 +36,8 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.target.targetpointer.FixedTarget;
@ -50,7 +48,7 @@ import mage.target.targetpointer.FixedTarget;
public class EidolonOfTheGreatRevel extends CardImpl<EidolonOfTheGreatRevel> {
public EidolonOfTheGreatRevel(UUID ownerId) {
super(ownerId, 999, "Eidolon of the Great Revel", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{R}{R}");
super(ownerId, 9992, "Eidolon of the Great Revel", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{R}{R}");
this.expansionSetCode = "JOU";
this.subtype.add("Spirit");

View file

@ -43,7 +43,7 @@ import mage.target.common.TargetCreatureOrPlayer;
public class ForgebornOreads extends CardImpl<ForgebornOreads> {
public ForgebornOreads(UUID ownerId) {
super(ownerId, 999, "Forgeborn Oreads", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{R}{R}");
super(ownerId, 98, "Forgeborn Oreads", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{R}{R}");
this.expansionSetCode = "JOU";
this.subtype.add("Nymph");

View file

@ -0,0 +1,66 @@
/*
* 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.journeyintonyx;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
/**
*
* @author LevelX2
*/
public class NyxFleeceRam extends CardImpl<NyxFleeceRam> {
public NyxFleeceRam(UUID ownerId) {
super(ownerId, 18, "Nyx-Fleece Ram", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{W}");
this.expansionSetCode = "JOU";
this.subtype.add("Sheep");
this.color.setWhite(true);
this.power = new MageInt(0);
this.toughness = new MageInt(5);
// At the beginning of your upkeep, you gain 1 life.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(1), TargetController.YOU, false));
}
public NyxFleeceRam(final NyxFleeceRam card) {
super(card);
}
@Override
public NyxFleeceRam copy() {
return new NyxFleeceRam(this);
}
}

View file

@ -50,7 +50,7 @@ import mage.target.common.TargetCreaturePermanent;
public class SilenceTheBelievers extends CardImpl<SilenceTheBelievers> {
public SilenceTheBelievers(UUID ownerId) {
super(ownerId, 999, "Silence the Believers", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{B}{B}");
super(ownerId, 82, "Silence the Believers", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{B}{B}");
this.expansionSetCode = "JOU";
this.color.setBlack(true);

View file

@ -44,7 +44,7 @@ import mage.target.common.TargetCreaturePermanent;
public class SpiteOfMogis extends CardImpl<SpiteOfMogis> {
public SpiteOfMogis(UUID ownerId) {
super(ownerId, 999, "Spite of Mogis", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R}");
super(ownerId, 113, "Spite of Mogis", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R}");
this.expansionSetCode = "JOU";
this.color.setRed(true);