- Added Joraga Warcaller, Feral Contest, Seers Sundial, and Vastwood Zendikon.

This commit is contained in:
jeffwadsworth 2012-11-18 23:04:47 -06:00
parent 8ee25859a7
commit 14cbddcf11
5 changed files with 425 additions and 0 deletions

View file

@ -0,0 +1,123 @@
/*
* 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.worldwake;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.RequirementEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author jeffwadsworth
*/
public class FeralContest extends CardImpl<FeralContest> {
public FeralContest(UUID ownerId) {
super(ownerId, 100, "Feral Contest", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}");
this.expansionSetCode = "WWK";
this.color.setGreen(true);
// Put a +1/+1 counter on target creature you control. Another target creature blocks it this turn if able.
TargetControlledCreaturePermanent target1 = new TargetControlledCreaturePermanent();
TargetCreaturePermanent target2 = new TargetCreaturePermanent();
Effect effect1 = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
RequirementEffect effect2 = new FeralContestEffect();
this.getSpellAbility().addEffect(effect1);
this.getSpellAbility().addTarget(target1);
this.getSpellAbility().addEffect(effect2);
this.getSpellAbility().addTarget(target2);
}
public FeralContest(final FeralContest card) {
super(card);
}
@Override
public FeralContest copy() {
return new FeralContest(this);
}
}
class FeralContestEffect extends RequirementEffect<FeralContestEffect> {
public FeralContestEffect() {
this(Constants.Duration.EndOfTurn);
}
public FeralContestEffect(Constants.Duration duration) {
super(duration);
staticText = "Another target creature blocks it this turn if able";
}
public FeralContestEffect(final FeralContestEffect effect) {
super(effect);
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
if (creature != null) {
return true;
}
return false;
}
@Override
public boolean mustAttack(Game game) {
return false;
}
@Override
public boolean mustBlock(Game game) {
return true;
}
@Override
public UUID mustBlockAttacker(Ability source, Game game) {
return source.getFirstTarget();
}
@Override
public FeralContestEffect copy() {
return new FeralContestEffect(this);
}
}

View file

@ -0,0 +1,135 @@
/*
* 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.worldwake;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.TargetController;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.CountersCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continious.BoostAllEffect;
import mage.abilities.keyword.MultikickerAbility;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author jeffwadsworth
*/
public class JoragaWarcaller extends CardImpl<JoragaWarcaller> {
String rule = "Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller";
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other elf creatures you control");
static {
filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Elf"));
filter.add(new AnotherPredicate());
}
public JoragaWarcaller(UUID ownerId) {
super(ownerId, 106, "Joraga Warcaller", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}");
this.expansionSetCode = "WWK";
this.subtype.add("Elf");
this.subtype.add("Warrior");
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Multikicker {1}{G}
MultikickerAbility ability = new MultikickerAbility(new EmptyEffect(""), false);
ability.addManaCost(new ManaCostsImpl("{1}{G}"));
this.addAbility(ability);
// Joraga Warcaller enters the battlefield with a +1/+1 counter on it for each time it was kicked.
this.addAbility(new EntersBattlefieldAbility(new JoragaWarcallerEffect()));
// Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller.
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostAllEffect(new CountersCount(CounterType.P1P1), new CountersCount(CounterType.P1P1), Constants.Duration.WhileOnBattlefield, filter, true, rule)));
}
public JoragaWarcaller(final JoragaWarcaller card) {
super(card);
}
@Override
public JoragaWarcaller copy() {
return new JoragaWarcaller(this);
}
}
class JoragaWarcallerEffect extends OneShotEffect<JoragaWarcallerEffect> {
public JoragaWarcallerEffect() {
super(Constants.Outcome.Benefit);
staticText = "with a +1/+1 counter on it for each time it was kicked";
}
public JoragaWarcallerEffect(final JoragaWarcallerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
for (Ability ability : permanent.getAbilities()) {
if (ability instanceof MultikickerAbility) {
int count = ((MultikickerAbility)ability).getActivateCount();
if (count > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(count), game);
}
}
}
}
return true;
}
@Override
public JoragaWarcallerEffect copy() {
return new JoragaWarcallerEffect(this);
}
}

View file

@ -0,0 +1,61 @@
/*
* 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.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.common.LandfallAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl;
/**
*
* @author jeffwadsworth
*/
public class SeersSundial extends CardImpl<SeersSundial> {
public SeersSundial(UUID ownerId) {
super(ownerId, 130, "Seer's Sundial", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "WWK";
// Landfall - Whenever a land enters the battlefield under your control, you may pay {2}. If you do, draw a card.
this.addAbility(new LandfallAbility(new DoIfCostPaid(new DrawCardControllerEffect(1), new ManaCostsImpl("{2}")), true));
}
public SeersSundial(final SeersSundial card) {
super(card);
}
@Override
public SeersSundial copy() {
return new SeersSundial(this);
}
}

View file

@ -0,0 +1,96 @@
/*
* 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.worldwake;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesAttachedTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ReturnToHandAttachedEffect;
import mage.abilities.effects.common.continious.BecomesCreatureAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
import mage.target.TargetPermanent;
import mage.target.common.TargetLandPermanent;
/**
*
* @author jeffwadsworth
*/
public class VastwoodZendikon extends CardImpl<VastwoodZendikon> {
public VastwoodZendikon(UUID ownerId) {
super(ownerId, 117, "Vastwood Zendikon", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
this.expansionSetCode = "WWK";
this.subtype.add("Aura");
this.color.setGreen(true);
// Enchant land
// Enchanted land is a 6/4 green Elemental creature. It's still a land.
// When enchanted land dies, return that card to its owner's hand.
TargetPermanent auraTarget = new TargetLandPermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.PutCreatureInPlay));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
Ability ability2 = new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureAttachedEffect(new VastwoodElementalToken(), "Enchanted land is a 6/4 green Elemental creature. It's still a land", Constants.Duration.Custom));
this.addAbility(ability2);
Ability ability3 = new DiesAttachedTriggeredAbility(new ReturnToHandAttachedEffect(), "enchanted land");
this.addAbility(ability3);
}
public VastwoodZendikon(final VastwoodZendikon card) {
super(card);
}
@Override
public VastwoodZendikon copy() {
return new VastwoodZendikon(this);
}
}
class VastwoodElementalToken extends Token {
VastwoodElementalToken() {
super("", "6/4 green Elemental creature");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Elemental");
power = new MageInt(6);
toughness = new MageInt(4);
}
}

View file

@ -75,6 +75,15 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
this.excludeSource = excludeSource;
setText();
}
public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource, String rule) {
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, isCanKill(toughness) ? Outcome.UnboostCreature : Outcome.BoostCreature);
this.power = power;
this.toughness = toughness;
this.filter = filter;
this.excludeSource = excludeSource;
this.staticText = rule;
}
public BoostAllEffect(final BoostAllEffect effect) {
super(effect);
@ -82,6 +91,7 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
this.toughness = effect.toughness;
this.filter = effect.filter.copy();
this.excludeSource = effect.excludeSource;
this.staticText = effect.staticText;
}
@Override