mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge origin/master
This commit is contained in:
commit
2865f13d0c
6 changed files with 306 additions and 0 deletions
164
Mage.Sets/src/mage/cards/i/InfernalDenizen.java
Normal file
164
Mage.Sets/src/mage/cards/i/InfernalDenizen.java
Normal file
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
* 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.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.SourceOnBattlefieldCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class InfernalDenizen extends CardImpl {
|
||||
|
||||
public InfernalDenizen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}{B}");
|
||||
|
||||
this.subtype.add("Demon");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// At the beginning of your upkeep, sacrifice two Swamps. If you can't, tap Infernal Denizen, and an opponent may gain control of a creature you control of his or her choice for as long as Infernal Denizen remains on the battlefield.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new InfernalDenizenEffect(), TargetController.YOU, false));
|
||||
|
||||
// {tap}: Gain control of target creature for as long as Infernal Denizen remains on the battlefield.
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(
|
||||
new GainControlTargetEffect(Duration.Custom, true),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"gain control of target creature for as long as {this} remains on the battlefield");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public InfernalDenizen(final InfernalDenizen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernalDenizen copy() {
|
||||
return new InfernalDenizen(this);
|
||||
}
|
||||
}
|
||||
|
||||
class InfernalDenizenEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.SWAMP));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
InfernalDenizenEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "sacrifice two Swamps. If you can't, tap {this}, "
|
||||
+ "and an opponent may gain control of a creature you control of his or her choice "
|
||||
+ "for as long as {this} remains on the battlefield";
|
||||
}
|
||||
|
||||
InfernalDenizenEffect(final InfernalDenizenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernalDenizenEffect copy() {
|
||||
return new InfernalDenizenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent creature = game.getPermanent(source.getSourceId());
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
DynamicValue swamps = new PermanentsOnBattlefieldCount(filter);
|
||||
boolean canSac = swamps.calculate(game, source, this) > 1;
|
||||
Effect effect = new SacrificeControllerEffect(filter, 2, "Sacrifice two Swamps");
|
||||
effect.apply(game, source);
|
||||
if (!canSac) {
|
||||
if (creature != null) {
|
||||
creature.tap(game);
|
||||
}
|
||||
TargetOpponent targetOpp = new TargetOpponent(true);
|
||||
if (targetOpp.canChoose(player.getId(), game)
|
||||
&& targetOpp.choose(Outcome.Detriment, player.getId(), source.getSourceId(), game)) {
|
||||
Player opponent = game.getPlayer(targetOpp.getFirstTarget());
|
||||
if (opponent != null) {
|
||||
FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature controlled by " + player.getLogName());
|
||||
filter2.add(new ControllerIdPredicate(player.getId()));
|
||||
TargetCreaturePermanent targetCreature = new TargetCreaturePermanent(1, 1, filter2, true);
|
||||
targetCreature.setTargetController(opponent.getId());
|
||||
if (targetCreature.canChoose(id, game)
|
||||
&& opponent.chooseUse(Outcome.GainControl, "Gain control of a creature?", source, game)
|
||||
&& opponent.chooseTarget(Outcome.GainControl, targetCreature, source, game)) {
|
||||
ConditionalContinuousEffect giveEffect = new ConditionalContinuousEffect(
|
||||
new GainControlTargetEffect(Duration.Custom, true, opponent.getId()),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"");
|
||||
giveEffect.setTargetPointer(new FixedTarget(targetCreature.getFirstTarget()));
|
||||
game.addEffect(giveEffect, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/cards/r/RipjawRaptor.java
Normal file
68
Mage.Sets/src/mage/cards/r/RipjawRaptor.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class RipjawRaptor extends CardImpl {
|
||||
|
||||
public RipjawRaptor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||
|
||||
this.subtype.add("Dinosaur");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// <i>Enrage</i> — Whenever Ripjaw Raptor is dealt damage, draw a card.
|
||||
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false);
|
||||
ability.setAbilityWord(AbilityWord.ENRAGE);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public RipjawRaptor(final RipjawRaptor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RipjawRaptor copy() {
|
||||
return new RipjawRaptor(this);
|
||||
}
|
||||
}
|
70
Mage.Sets/src/mage/cards/s/SunCrownedHunters.java
Normal file
70
Mage.Sets/src/mage/cards/s/SunCrownedHunters.java
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* 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.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class SunCrownedHunters extends CardImpl {
|
||||
|
||||
public SunCrownedHunters(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
|
||||
|
||||
this.subtype.add("Dinosaur");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// <i>Enrage</i> — Whenever Sun-Crowned Hunters is dealt damage, it deals 3 damage to target opponent.
|
||||
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), false);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
ability.setAbilityWord(AbilityWord.ENRAGE);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SunCrownedHunters(final SunCrownedHunters card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SunCrownedHunters copy() {
|
||||
return new SunCrownedHunters(this);
|
||||
}
|
||||
}
|
|
@ -164,6 +164,7 @@ public class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Imposing Visage", 193, Rarity.COMMON, mage.cards.i.ImposingVisage.class));
|
||||
cards.add(new SetCardInfo("Incinerate", 194, Rarity.COMMON, mage.cards.i.Incinerate.class));
|
||||
cards.add(new SetCardInfo("Infernal Darkness", 23, Rarity.RARE, mage.cards.i.InfernalDarkness.class));
|
||||
cards.add(new SetCardInfo("Infernal Denizen", 24, Rarity.RARE, mage.cards.i.InfernalDenizen.class));
|
||||
cards.add(new SetCardInfo("Infuse", 80, Rarity.COMMON, mage.cards.i.Infuse.class));
|
||||
cards.add(new SetCardInfo("Island", 334, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
@ -34,7 +34,9 @@ public class Ixalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dragonskull Summit", 252, Rarity.RARE, mage.cards.d.DragonskullSummit.class));
|
||||
cards.add(new SetCardInfo("Drowned Catacomb", 253, Rarity.RARE, mage.cards.d.DrownedCatacomb.class));
|
||||
cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class));
|
||||
cards.add(new SetCardInfo("Ripjaw Raptor", 203, Rarity.RARE, mage.cards.r.RipjawRaptor.class));
|
||||
cards.add(new SetCardInfo("Rootbound Crag", 256, Rarity.RARE, mage.cards.r.RootboundCrag.class));
|
||||
cards.add(new SetCardInfo("Sun-Crowned Hunters", 164, Rarity.COMMON, mage.cards.s.SunCrownedHunters.class));
|
||||
cards.add(new SetCardInfo("Sunpetal Grove", 257, Rarity.RARE, mage.cards.s.SunpetalGrove.class));
|
||||
cards.add(new SetCardInfo("Vanquisher's Banner", 251, Rarity.RARE, mage.cards.v.VanquishersBanner.class));
|
||||
cards.add(new SetCardInfo("Verdant Sun's Avatar", 213, Rarity.RARE, mage.cards.v.VerdantSunsAvatar.class));
|
||||
|
|
|
@ -43,6 +43,7 @@ public enum AbilityWord {
|
|||
DELIRIUM("Delirium"),
|
||||
DOMAIN("Domain"),
|
||||
EMINENCE("Eminence"),
|
||||
ENRAGE("Enrage"),
|
||||
FATEFUL_HOUR("Fateful hour"),
|
||||
FEROCIOUS("Ferocious"),
|
||||
FORMIDABLE("Formidable"),
|
||||
|
|
Loading…
Reference in a new issue