mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[GTC] 6 hybrid cards.
This commit is contained in:
parent
7b27332791
commit
3bcf5736c0
6 changed files with 626 additions and 0 deletions
63
Mage.Sets/src/mage/sets/gatecrash/ArrowsOfJustice.java
Normal file
63
Mage.Sets/src/mage/sets/gatecrash/ArrowsOfJustice.java
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
/*
|
||||||
|
* 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.gatecrash;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.target.common.TargetAttackingOrBlockingCreature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class ArrowsOfJustice extends CardImpl<ArrowsOfJustice> {
|
||||||
|
|
||||||
|
public ArrowsOfJustice(UUID ownerId) {
|
||||||
|
super(ownerId, 211, "Arrows of Justice", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R/W}");
|
||||||
|
this.expansionSetCode = "GTC";
|
||||||
|
|
||||||
|
this.color.setRed(true);
|
||||||
|
this.color.setWhite(true);
|
||||||
|
|
||||||
|
// Arrows of Justice deals 4 damage to target attacking or blocking creature.
|
||||||
|
getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||||
|
getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrowsOfJustice(final ArrowsOfJustice card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrowsOfJustice copy() {
|
||||||
|
return new ArrowsOfJustice(this);
|
||||||
|
}
|
||||||
|
}
|
140
Mage.Sets/src/mage/sets/gatecrash/Bioshift.java
Normal file
140
Mage.Sets/src/mage/sets/gatecrash/Bioshift.java
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
/*
|
||||||
|
* 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.gatecrash;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class Bioshift extends CardImpl<Bioshift> {
|
||||||
|
|
||||||
|
public Bioshift(UUID ownerId) {
|
||||||
|
super(ownerId, 214, "Bioshift", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G/U}");
|
||||||
|
this.expansionSetCode = "GTC";
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.color.setBlue(true);
|
||||||
|
|
||||||
|
// Move any number of +1/+1 counters from target creature onto another target creature with the same controller.
|
||||||
|
getSpellAbility().addEffect(new MoveCounterFromTargetToTargetEffect());
|
||||||
|
getSpellAbility().addTarget(new TargetCreaturePermanentSameController(2,2,new FilterCreaturePermanent(),false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bioshift(final Bioshift card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Bioshift copy() {
|
||||||
|
return new Bioshift(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TargetCreaturePermanentSameController extends TargetCreaturePermanent {
|
||||||
|
|
||||||
|
public TargetCreaturePermanentSameController(int minNumTargets, int maxNumTargets, FilterCreaturePermanent filter, boolean notTarget) {
|
||||||
|
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||||
|
this.targetName = filter.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public TargetCreaturePermanentSameController(final TargetCreaturePermanentSameController target) {
|
||||||
|
super(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||||
|
UUID firstTarget = this.getFirstTarget();
|
||||||
|
if (firstTarget != null) {
|
||||||
|
Permanent permanent = game.getPermanent(firstTarget);
|
||||||
|
Permanent targetPermanent = game.getPermanent(id);
|
||||||
|
if (permanent == null || targetPermanent == null
|
||||||
|
|| !permanent.getControllerId().equals(targetPermanent.getOwnerId())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.canTarget(id, source, game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TargetCreaturePermanentSameController copy() {
|
||||||
|
return new TargetCreaturePermanentSameController(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MoveCounterFromTargetToTargetEffect extends OneShotEffect<MoveCounterFromTargetToTargetEffect> {
|
||||||
|
|
||||||
|
public MoveCounterFromTargetToTargetEffect() {
|
||||||
|
super(Constants.Outcome.Detriment);
|
||||||
|
this.staticText = "Move any number of +1/+1 counters from target creature onto another target creature with the same controller";
|
||||||
|
}
|
||||||
|
|
||||||
|
public MoveCounterFromTargetToTargetEffect(final MoveCounterFromTargetToTargetEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MoveCounterFromTargetToTargetEffect copy() {
|
||||||
|
return new MoveCounterFromTargetToTargetEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent fromPermanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
|
Permanent toPermanent = null;
|
||||||
|
if (targetPointer.getTargets(game, source).size() > 1) {
|
||||||
|
toPermanent = game.getPermanent(targetPointer.getTargets(game, source).get(1));
|
||||||
|
}
|
||||||
|
if (fromPermanent == null || toPermanent == null || !fromPermanent.getControllerId().equals(toPermanent.getControllerId())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int amountCounters = fromPermanent.getCounters().getCount(CounterType.P1P1);
|
||||||
|
if (amountCounters > 0) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller.getAmount(0, amountCounters, "How many counters do you want to move?", game) > 0){
|
||||||
|
fromPermanent.getCounters().removeCounter(CounterType.P1P1, amountCounters);
|
||||||
|
toPermanent.addCounters(CounterType.P1P1.createInstance(amountCounters), game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
120
Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java
Normal file
120
Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
/*
|
||||||
|
* 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.gatecrash;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class BorosReckoner extends CardImpl<BorosReckoner> {
|
||||||
|
|
||||||
|
public BorosReckoner(UUID ownerId) {
|
||||||
|
super(ownerId, 215, "Boros Reckoner", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R/W}{R/W}{R/W}");
|
||||||
|
this.expansionSetCode = "GTC";
|
||||||
|
this.subtype.add("Minotaur");
|
||||||
|
this.subtype.add("Wizard");
|
||||||
|
|
||||||
|
this.color.setRed(true);
|
||||||
|
this.color.setWhite(true);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Whenever Boros Reckoner is dealt damage, it deals that much damage to target creature or player.
|
||||||
|
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false);
|
||||||
|
ability.addTarget(new TargetCreatureOrPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// {R/W}: Boros Reckoner gains first strike until end of turn.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{R/W}")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BorosReckoner(final BorosReckoner card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BorosReckoner copy() {
|
||||||
|
return new BorosReckoner(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BorosReckonerDealDamageEffect extends OneShotEffect<BorosReckonerDealDamageEffect> {
|
||||||
|
|
||||||
|
public BorosReckonerDealDamageEffect() {
|
||||||
|
super(Outcome.Damage);
|
||||||
|
this.staticText = "it deals that much damage to target creature or player";
|
||||||
|
}
|
||||||
|
|
||||||
|
public BorosReckonerDealDamageEffect(final BorosReckonerDealDamageEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BorosReckonerDealDamageEffect copy() {
|
||||||
|
return new BorosReckonerDealDamageEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
int amount = (Integer) getValue("damage");
|
||||||
|
if (amount > 0) {
|
||||||
|
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||||
|
if (player != null) {
|
||||||
|
player.damage(amount, source.getSourceId(), game, false, true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Permanent creature = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
|
if (creature != null) {
|
||||||
|
creature.damage(amount, source.getSourceId(), game, true, false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
112
Mage.Sets/src/mage/sets/gatecrash/CoercedConfession.java
Normal file
112
Mage.Sets/src/mage/sets/gatecrash/CoercedConfession.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.gatecrash;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class CoercedConfession extends CardImpl<CoercedConfession> {
|
||||||
|
|
||||||
|
public CoercedConfession(UUID ownerId) {
|
||||||
|
super(ownerId, 217, "Coerced Confession", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{U/B}");
|
||||||
|
this.expansionSetCode = "GTC";
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.color.setBlack(true);
|
||||||
|
|
||||||
|
// Target player puts the top four cards of his or her library into his or her graveyard. You draw a card for each creature card put into a graveyard this way.
|
||||||
|
getSpellAbility().addEffect(new CoercedConfessionMillEffect());
|
||||||
|
getSpellAbility().addTarget(new TargetPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
public CoercedConfession(final CoercedConfession card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CoercedConfession copy() {
|
||||||
|
return new CoercedConfession(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CoercedConfessionMillEffect extends OneShotEffect<CoercedConfessionMillEffect> {
|
||||||
|
|
||||||
|
public CoercedConfessionMillEffect() {
|
||||||
|
super(Outcome.DrawCard);
|
||||||
|
this.staticText = "Target player puts the top four cards of his or her library into his or her graveyard. You draw a card for each creature card put into a graveyard this way.";
|
||||||
|
}
|
||||||
|
|
||||||
|
public CoercedConfessionMillEffect(final CoercedConfessionMillEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CoercedConfessionMillEffect copy() {
|
||||||
|
return new CoercedConfessionMillEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||||
|
if (player != null) {
|
||||||
|
int foundCreatures = 0;
|
||||||
|
int cardsCount = Math.min(4, player.getLibrary().size());
|
||||||
|
for (int i = 0; i < cardsCount; i++) {
|
||||||
|
Card card = player.getLibrary().removeFromTop(game);
|
||||||
|
if (card != null) {
|
||||||
|
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||||
|
++foundCreatures;
|
||||||
|
}
|
||||||
|
card.moveToZone(Constants.Zone.GRAVEYARD, source.getId(), game, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (foundCreatures > 0) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
controller.drawCards(foundCreatures, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
106
Mage.Sets/src/mage/sets/gatecrash/DeathcultRogue.java
Normal file
106
Mage.Sets/src/mage/sets/gatecrash/DeathcultRogue.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.gatecrash;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class DeathcultRogue extends CardImpl<DeathcultRogue> {
|
||||||
|
|
||||||
|
public DeathcultRogue(UUID ownerId) {
|
||||||
|
super(ownerId, 218, "Deathcult Rogue", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U/B}{U/B}");
|
||||||
|
this.expansionSetCode = "GTC";
|
||||||
|
this.subtype.add("Human");
|
||||||
|
this.subtype.add("Rogue");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.color.setBlack(true);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Deathcult Rogue can't be blocked except by Rogues.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new DeathcultRogueRestrictionEffect()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeathcultRogue(final DeathcultRogue card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathcultRogue copy() {
|
||||||
|
return new DeathcultRogue(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeathcultRogueRestrictionEffect extends RestrictionEffect<DeathcultRogueRestrictionEffect> {
|
||||||
|
|
||||||
|
public DeathcultRogueRestrictionEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield);
|
||||||
|
staticText = "Deathcult Rogue can't be blocked except by Rogues.";
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeathcultRogueRestrictionEffect(final DeathcultRogueRestrictionEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
|
if (permanent.getId().equals(source.getSourceId())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||||
|
if (blocker.getSubtype().contains("Rogue")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathcultRogueRestrictionEffect copy() {
|
||||||
|
return new DeathcultRogueRestrictionEffect(this);
|
||||||
|
}
|
||||||
|
}
|
85
Mage.Sets/src/mage/sets/gatecrash/GiftOfOrzhova.java
Normal file
85
Mage.Sets/src/mage/sets/gatecrash/GiftOfOrzhova.java
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
/*
|
||||||
|
* 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.gatecrash;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.AttachmentType;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class GiftOfOrzhova extends CardImpl<GiftOfOrzhova> {
|
||||||
|
|
||||||
|
public GiftOfOrzhova(UUID ownerId) {
|
||||||
|
super(ownerId, 219, "Gift of Orzhova", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W/B}{W/B}");
|
||||||
|
this.expansionSetCode = "GTC";
|
||||||
|
|
||||||
|
this.subtype.add("Aura");
|
||||||
|
this.color.setWhite(true);
|
||||||
|
this.color.setBlack(true);
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+1 and has flying and lifelink.
|
||||||
|
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,1, Duration.WhileOnBattlefield));
|
||||||
|
ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield));
|
||||||
|
ability.addEffect(new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftOfOrzhova(final GiftOfOrzhova card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GiftOfOrzhova copy() {
|
||||||
|
return new GiftOfOrzhova(this);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue