Merge origin/master

This commit is contained in:
LevelX2 2017-08-27 08:07:45 +02:00
commit 4f758d42b4
6 changed files with 212 additions and 45 deletions

View file

@ -92,6 +92,7 @@ public class CanadianHighlander extends Constructed {
String cn = entry.getKey();
if (cn.equals("Balance")
|| cn.equals("Dig Through Time")
|| cn.equals("Enlightened Tutor")
|| cn.equals("Fastbond")
|| cn.equals("Intuition")
|| cn.equals("Library of Alexandria")
@ -112,7 +113,6 @@ public class CanadianHighlander extends Constructed {
invalid.put(entry.getKey(), " 1 point " + cn);
}
if (cn.equals("Doomsday")
|| cn.equals("Enlightened Tutor")
|| cn.equals("Gifts Ungiven")
|| cn.equals("Imperial Seal")
|| cn.equals("Mana Crypt")
@ -125,6 +125,7 @@ public class CanadianHighlander extends Constructed {
invalid.put(entry.getKey(), " 2 points " + cn);
}
if (cn.equals("Birthing Pod")
|| cn.equals("Hermit Druid")
|| cn.equals("Mox Emerald")
|| cn.equals("Mox Jet")
|| cn.equals("Mox Pearl")
@ -136,18 +137,20 @@ public class CanadianHighlander extends Constructed {
invalid.put(entry.getKey(), " 3 points " + cn);
}
if (cn.equals("Demonic Tutor")
|| cn.equals("Hermit Druid")
|| cn.equals("Sol Ring")) {
totalPoints += 4;
invalid.put(entry.getKey(), " 4 points " + cn);
}
if (cn.equals("Ancestral Recall")
|| cn.equals("Natural Order")
|| cn.equals("Time Walk")
|| cn.equals("Tinker")) {
if (cn.equals("Natural Order")
|| cn.equals("Time Walk")) {
totalPoints += 5;
invalid.put(entry.getKey(), " 5 points " + cn);
}
if (cn.equals("Ancestral Recall")
|| cn.equals("Time Walk")) {
totalPoints += 6;
invalid.put(entry.getKey(), " 5 points " + cn);
}
if (cn.equals("Black Lotus")
|| cn.equals("Flash")
|| cn.equals("Time Vault")) {

View file

@ -0,0 +1,81 @@
/*
* 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.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author TheElk801
*/
public class AphettoVulture extends CardImpl {
private static final FilterCard filter = new FilterCard("Zombie card from your graveyard");
static {
filter.add(new SubtypePredicate(SubType.ZOMBIE));
}
public AphettoVulture(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
this.subtype.add("Zombie");
this.subtype.add("Bird");
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Aphetto Vulture dies, you may put target Zombie card from your graveyard on top of your library.
Ability ability = new DiesTriggeredAbility(new PutOnLibraryTargetEffect(true), true);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
public AphettoVulture(final AphettoVulture card) {
super(card);
}
@Override
public AphettoVulture copy() {
return new AphettoVulture(this);
}
}

View file

@ -37,16 +37,19 @@ import mage.abilities.mana.TriggeredManaAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ManaEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetLandPermanent;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
@ -56,11 +59,20 @@ import mage.util.CardUtil;
*/
public class ExtraplanarLens extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
static {
filter.add(new ControllerPredicate(TargetController.YOU));
}
public ExtraplanarLens(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// Imprint - When Extraplanar Lens enters the battlefield, you may exile target land you control.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ExtraplanarLensImprintEffect(), true, "<i>Imprint - </i>"));
Ability ability = new EntersBattlefieldTriggeredAbility(new ExtraplanarLensImprintEffect(), true);
ability.setAbilityWord(AbilityWord.IMPRINT);
ability.addTarget(new TargetLandPermanent(filter));
this.addAbility(ability);
// Whenever a land with the same name as the exiled card is tapped for mana, its controller adds one mana to his or her mana pool of any type that land produced.
this.addAbility(new ExtraplanarLensTriggeredAbility());
@ -79,8 +91,6 @@ public class ExtraplanarLens extends CardImpl {
class ExtraplanarLensImprintEffect extends OneShotEffect {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent();
public ExtraplanarLensImprintEffect() {
super(Outcome.Neutral);
staticText = "you may exile target land you control";
@ -95,20 +105,14 @@ class ExtraplanarLensImprintEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
Permanent extraplanarLens = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (controller != null) {
if (game.getBattlefield().countAll(filter, controller.getId(), game) > 0) {
TargetPermanent target = new TargetPermanent(1, filter);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.choose(Outcome.Neutral, target, source.getSourceId(), game)) {
Permanent targetLand = game.getPermanent(target.getFirstTarget());
Permanent targetLand = game.getPermanent(source.getFirstTarget());
if (targetLand != null) {
targetLand.moveToExile(null, extraplanarLens.getName() + " (Imprint)", source.getSourceId(), game);
extraplanarLens.imprint(targetLand.getId(), game);
extraplanarLens.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + targetLand.getLogName() + ']'), game);
}
}
return true;
}
}
return false;
}

View file

@ -78,7 +78,6 @@ public class IslandOfWakWak extends CardImpl {
}
}
class IslandOfWakWakEffect extends OneShotEffect {
public IslandOfWakWakEffect() {
@ -94,7 +93,7 @@ class IslandOfWakWakEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
if (targetCreature != null) {
int toughness = targetCreature.getToughness().getBaseValue();
int toughness = targetCreature.getToughness().getBaseValueModified();
game.addEffect(new SetPowerToughnessTargetEffect(0, toughness, Duration.EndOfTurn), source);
return true;
}

View file

@ -0,0 +1,78 @@
/*
* 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 java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetSpell;
/**
*
* @author TheElk801
*/
public class PsychicTrance extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wizards you control");
static {
filter.add(new SubtypePredicate(SubType.WIZARD));
}
public PsychicTrance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
// Until end of turn, Wizards you control gain "{tap}: Counter target spell."
Ability abilityToAdd = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new TapSourceCost());
abilityToAdd.addTarget(new TargetSpell());
Effect effect = new GainAbilityControlledEffect(abilityToAdd, Duration.EndOfTurn, filter);
effect.setText("until end of turn, Wizards you control gain \"{tap}: Counter target spell\"");
this.getSpellAbility().addEffect(effect);
}
public PsychicTrance(final PsychicTrance card) {
super(card);
}
@Override
public PsychicTrance copy() {
return new PsychicTrance(this);
}
}

View file

@ -36,6 +36,7 @@ public class Onslaught extends ExpansionSet {
cards.add(new SetCardInfo("Aphetto Alchemist", 64, Rarity.UNCOMMON, mage.cards.a.AphettoAlchemist.class));
cards.add(new SetCardInfo("Aphetto Dredging", 125, Rarity.COMMON, mage.cards.a.AphettoDredging.class));
cards.add(new SetCardInfo("Aphetto Grifter", 65, Rarity.UNCOMMON, mage.cards.a.AphettoGrifter.class));
cards.add(new SetCardInfo("Aphetto Vulture", 126, Rarity.UNCOMMON, mage.cards.a.AphettoVulture.class));
cards.add(new SetCardInfo("Arcanis the Omnipotent", 66, Rarity.RARE, mage.cards.a.ArcanisTheOmnipotent.class));
cards.add(new SetCardInfo("Ascending Aven", 68, Rarity.COMMON, mage.cards.a.AscendingAven.class));
cards.add(new SetCardInfo("Astral Slide", 4, Rarity.UNCOMMON, mage.cards.a.AstralSlide.class));
@ -222,6 +223,7 @@ public class Onslaught extends ExpansionSet {
cards.add(new SetCardInfo("Primal Boost", 277, Rarity.UNCOMMON, mage.cards.p.PrimalBoost.class));
cards.add(new SetCardInfo("Profane Prayers", 162, Rarity.COMMON, mage.cards.p.ProfanePrayers.class));
cards.add(new SetCardInfo("Prowling Pangolin", 163, Rarity.UNCOMMON, mage.cards.p.ProwlingPangolin.class));
cards.add(new SetCardInfo("Psychic Trance", 102, Rarity.RARE, mage.cards.p.PsychicTrance.class));
cards.add(new SetCardInfo("Quicksilver Dragon", 103, Rarity.RARE, mage.cards.q.QuicksilverDragon.class));
cards.add(new SetCardInfo("Ravenous Baloth", 278, Rarity.RARE, mage.cards.r.RavenousBaloth.class));
cards.add(new SetCardInfo("Read the Runes", 104, Rarity.RARE, mage.cards.r.ReadTheRunes.class));