mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[AVR] 3 cards
This commit is contained in:
parent
262f6cb095
commit
320dd240c1
4 changed files with 297 additions and 0 deletions
65
Mage.Sets/src/mage/sets/avacynrestored/ConjurersCloset.java
Normal file
65
Mage.Sets/src/mage/sets/avacynrestored/ConjurersCloset.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* 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.avacynrestored;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
*/
|
||||
public class ConjurersCloset extends CardImpl<ConjurersCloset> {
|
||||
|
||||
public ConjurersCloset(UUID ownerId) {
|
||||
super(ownerId, 214, "Conjurer's Closet", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||
this.expansionSetCode = "AVR";
|
||||
|
||||
// At the beginning of your end step, you may exile target creature you control, then return that card to the battlefield under your control.
|
||||
Ability ability = new BeginningOfYourEndStepTriggeredAbility(new ExileTargetForSourceEffect("Conjurer's Closet Exile"), true);
|
||||
ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ConjurersCloset(final ConjurersCloset card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConjurersCloset copy() {
|
||||
return new ConjurersCloset(this);
|
||||
}
|
||||
}
|
123
Mage.Sets/src/mage/sets/avacynrestored/GallowsAtWillowHill.java
Normal file
123
Mage.Sets/src/mage/sets/avacynrestored/GallowsAtWillowHill.java
Normal 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.avacynrestored;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
*/
|
||||
public class GallowsAtWillowHill extends CardImpl<GallowsAtWillowHill> {
|
||||
|
||||
private final static FilterControlledPermanent humanFilter = new FilterControlledPermanent("untapped Human you control");
|
||||
|
||||
static {
|
||||
humanFilter.setTapped(false);
|
||||
humanFilter.setUseTapped(true);
|
||||
humanFilter.getSubtype().add("Human");
|
||||
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public GallowsAtWillowHill(UUID ownerId) {
|
||||
super(ownerId, 215, "Gallows at Willow Hill", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.expansionSetCode = "AVR";
|
||||
|
||||
// {3}, {tap}, Tap three untapped Humans you control: Destroy target creature. Its controller puts a 1/1 white Spirit creature token with flying onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GallowsAtWillowHillEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(3, 3, humanFilter, false)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public GallowsAtWillowHill(final GallowsAtWillowHill card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GallowsAtWillowHill copy() {
|
||||
return new GallowsAtWillowHill(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GallowsAtWillowHillEffect extends OneShotEffect<GallowsAtWillowHillEffect> {
|
||||
|
||||
public GallowsAtWillowHillEffect() {
|
||||
super(Constants.Outcome.DestroyPermanent);
|
||||
staticText = "Destroy target creature. Its controller puts a 1/1 white Spirit creature token with flying onto the battlefield";
|
||||
}
|
||||
|
||||
public GallowsAtWillowHillEffect(final GallowsAtWillowHillEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GallowsAtWillowHillEffect copy() {
|
||||
return new GallowsAtWillowHillEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int affectedTargets = 0;
|
||||
if (targetPointer.getTargets(source).size() > 0) {
|
||||
for (UUID permanentId : targetPointer.getTargets(source)) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
if (permanent != null) {
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
permanent.destroy(source.getId(), game, false);
|
||||
if (controller != null) {
|
||||
Token spirit = new SpiritWhiteToken();
|
||||
spirit.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
|
||||
}
|
||||
affectedTargets++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return affectedTargets > 0;
|
||||
}
|
||||
}
|
106
Mage.Sets/src/mage/sets/avacynrestored/OtherworldAtlas.java
Normal file
106
Mage.Sets/src/mage/sets/avacynrestored/OtherworldAtlas.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* 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.avacynrestored;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
*/
|
||||
public class OtherworldAtlas extends CardImpl<OtherworldAtlas> {
|
||||
|
||||
public OtherworldAtlas(UUID ownerId) {
|
||||
super(ownerId, 219, "Otherworld Atlas", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "AVR";
|
||||
|
||||
// {tap}: Put a charge counter on Otherworld Atlas.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new TapSourceCost()));
|
||||
|
||||
// {tap}: Each player draws a card for each charge counter on Otherworld Atlas.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new OtherworldAtlasDrawEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public OtherworldAtlas(final OtherworldAtlas card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtherworldAtlas copy() {
|
||||
return new OtherworldAtlas(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OtherworldAtlasDrawEffect extends OneShotEffect<OtherworldAtlasDrawEffect> {
|
||||
|
||||
public OtherworldAtlasDrawEffect() {
|
||||
super(Constants.Outcome.DrawCard);
|
||||
staticText = "Each player draws a card for each charge counter on {this}";
|
||||
}
|
||||
|
||||
public OtherworldAtlasDrawEffect(final OtherworldAtlasDrawEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtherworldAtlasDrawEffect copy() {
|
||||
return new OtherworldAtlasDrawEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player sourcePlayer = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
int amount = permanent.getCounters().getCount(CounterType.CHARGE);
|
||||
if (amount > 0) {
|
||||
for (UUID playerId : sourcePlayer.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.drawCards(amount, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -35,6 +35,9 @@ public class BeginningOfYourEndStepTriggeredAbility extends TriggeredAbilityImpl
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
if (optional) {
|
||||
return "At the beginning of your end step, you may " + modes.getText();
|
||||
}
|
||||
return "At the beginning of your end step, " + modes.getText();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue