Added Phage the Untouchable and all creatures with Dethrone ability.

This commit is contained in:
LevelX2 2014-07-26 17:57:17 +02:00
parent 25e2fb59e1
commit f493d8ff99
30 changed files with 1517 additions and 52 deletions

View file

@ -0,0 +1,52 @@
/*
* 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.conspiracy;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class DacksDuplicate extends mage.sets.vintagemasters.DacksDuplicate {
public DacksDuplicate(UUID ownerId) {
super(ownerId);
this.cardNumber = 43;
this.expansionSetCode = "CNS";
}
public DacksDuplicate(final DacksDuplicate card) {
super(card);
}
@Override
public DacksDuplicate copy() {
return new DacksDuplicate(this);
}
}

View 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.conspiracy;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.DethroneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class EnragedRevolutionary extends CardImpl {
public EnragedRevolutionary(UUID ownerId) {
super(ownerId, 31, "Enraged Revolutionary", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.expansionSetCode = "CNS";
this.subtype.add("Human");
this.subtype.add("Warrior");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Dethrone
this.addAbility(new DethroneAbility());
}
public EnragedRevolutionary(final EnragedRevolutionary card) {
super(card);
}
@Override
public EnragedRevolutionary copy() {
return new EnragedRevolutionary(this);
}
}

View 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.sets.conspiracy;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.DethroneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class GrenzosCutthroat extends CardImpl {
public GrenzosCutthroat(UUID ownerId) {
super(ownerId, 32, "Grenzo's Cutthroat", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.expansionSetCode = "CNS";
this.subtype.add("Goblin");
this.subtype.add("Rogue");
this.color.setRed(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// Dethrone
this.addAbility(new DethroneAbility());
}
public GrenzosCutthroat(final GrenzosCutthroat card) {
super(card);
}
@Override
public GrenzosCutthroat copy() {
return new GrenzosCutthroat(this);
}
}

View file

@ -0,0 +1,52 @@
/*
* 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.conspiracy;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class MarchesaTheBlackRose extends mage.sets.vintagemasters.MarchesaTheBlackRose {
public MarchesaTheBlackRose(UUID ownerId) {
super(ownerId);
this.cardNumber = 49;
this.expansionSetCode = "CNS";
}
public MarchesaTheBlackRose(final MarchesaTheBlackRose card) {
super(card);
}
@Override
public MarchesaTheBlackRose copy() {
return new MarchesaTheBlackRose(this);
}
}

View 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.sets.conspiracy;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.DethroneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class MarchesasEmissary extends CardImpl {
public MarchesasEmissary(UUID ownerId) {
super(ownerId, 21, "Marchesa's Emissary", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.expansionSetCode = "CNS";
this.subtype.add("Human");
this.subtype.add("Rogue");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Hexproof
this.addAbility(HexproofAbility.getInstance());
// Dethrone
this.addAbility(new DethroneAbility());
}
public MarchesasEmissary(final MarchesasEmissary card) {
super(card);
}
@Override
public MarchesasEmissary copy() {
return new MarchesasEmissary(this);
}
}

View file

@ -0,0 +1,69 @@
/*
* 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.conspiracy;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.DethroneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class MarchesasInfiltrator extends CardImpl {
public MarchesasInfiltrator(UUID ownerId) {
super(ownerId, 22, "Marchesa's Infiltrator", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.expansionSetCode = "CNS";
this.subtype.add("Human");
this.subtype.add("Rogue");
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Dethrone
this.addAbility(new DethroneAbility());
// Whenever Marchesa's Infiltrator deals combat damage to a player, draw a card.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
}
public MarchesasInfiltrator(final MarchesasInfiltrator card) {
super(card);
}
@Override
public MarchesasInfiltrator copy() {
return new MarchesasInfiltrator(this);
}
}

View file

@ -0,0 +1,84 @@
/*
* 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.conspiracy;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.DethroneAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author LevelX2
*/
public class MarchesasSmuggler extends CardImpl {
public MarchesasSmuggler(UUID ownerId) {
super(ownerId, 50, "Marchesa's Smuggler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}{R}");
this.expansionSetCode = "CNS";
this.subtype.add("Human");
this.subtype.add("Rogue");
this.color.setRed(true);
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Dethrone
this.addAbility(new DethroneAbility());
// {1}{U}{R}: Target creature you control gains haste until end of turn and can't be blocked this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{U}{R}"));
ability.addTarget(new TargetControlledCreaturePermanent());
Effect effect = new CantBeBlockedTargetEffect(Duration.EndOfTurn);
effect.setText("and can't be blocked this turn");
ability.addEffect(effect);
this.addAbility(ability);
}
public MarchesasSmuggler(final MarchesasSmuggler card) {
super(card);
}
@Override
public MarchesasSmuggler copy() {
return new MarchesasSmuggler(this);
}
}

View file

@ -0,0 +1,54 @@
/*
* 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.conspiracy;
import java.util.UUID;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class PhageTheUntouchable extends mage.sets.tenth.PhageTheUntouchable {
public PhageTheUntouchable(UUID ownerId) {
super(ownerId);
this.cardNumber = 120;
this.expansionSetCode = "CNS";
this.rarity = Rarity.MYTHIC;
}
public PhageTheUntouchable(final PhageTheUntouchable card) {
super(card);
}
@Override
public PhageTheUntouchable copy() {
return new PhageTheUntouchable(this);
}
}

View file

@ -0,0 +1,52 @@
/*
* 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.conspiracy;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class ScourgeOfTheThrone extends mage.sets.vintagemasters.ScourgeOfTheThrone {
public ScourgeOfTheThrone(UUID ownerId) {
super(ownerId);
this.cardNumber = 35;
this.expansionSetCode = "CNS";
}
public ScourgeOfTheThrone(final ScourgeOfTheThrone card) {
super(card);
}
@Override
public ScourgeOfTheThrone copy() {
return new ScourgeOfTheThrone(this);
}
}

View file

@ -0,0 +1,66 @@
/*
* 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.conspiracy;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.DethroneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class TreasonousOgre extends CardImpl {
public TreasonousOgre(UUID ownerId) {
super(ownerId, 36, "Treasonous Ogre", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.expansionSetCode = "CNS";
this.subtype.add("Ogre");
this.subtype.add("Shaman");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Dethrone
this.addAbility(new DethroneAbility());
// Pay 3 life: Add {R} to your mana pool.
}
public TreasonousOgre(final TreasonousOgre card) {
super(card);
}
@Override
public TreasonousOgre copy() {
return new TreasonousOgre(this);
}
}

View file

@ -34,7 +34,7 @@ import mage.constants.TargetController;
import mage.constants.Zone;
import mage.abilities.StateTriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
@ -75,7 +75,7 @@ public class DarksteelReactor extends CardImpl {
class DarksteelReactorStateTriggeredAbility extends StateTriggeredAbility {
public DarksteelReactorStateTriggeredAbility() {
super(Zone.BATTLEFIELD, new WinGameEffect());
super(Zone.BATTLEFIELD, new WinGameSourceControllerEffect());
}
public DarksteelReactorStateTriggeredAbility(final DarksteelReactorStateTriggeredAbility ability) {

View file

@ -34,7 +34,7 @@ import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
@ -68,7 +68,7 @@ public class HelixPinnacle extends CardImpl {
// At the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game.
this.addAbility(new ConditionalTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameEffect(), TargetController.YOU, false),
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.YOU, false),
new SourceHasCounterCondition(CounterType.TOWER, 100),
rule, false ));

View file

@ -74,7 +74,7 @@ public class AureliaTheWarleader extends CardImpl {
// Whenever Aurelia, the Warleader attacks for the first time each turn, untap all creatures you control. After this phase, there is an additional combat phase.
Ability ability = new AureliaAttacksTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(),"untap all creatures you control"), false);
ability.addEffect(new AdditionalCombatPhaseEffect());;
ability.addEffect(new AdditionalCombatPhaseEffect());
this.addAbility(ability);
}

View file

@ -34,7 +34,7 @@ import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.condition.common.ControlsPermanentCondition;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.cards.CardImpl;
import mage.constants.TargetController;
import mage.constants.Zone;
@ -66,7 +66,7 @@ public class Biovisionary extends CardImpl {
this.toughness = new MageInt(3);
//At the beginning of the end step, if you control four or more creatures named Biovisionary, you win the game.
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new WinGameEffect(), TargetController.ANY, new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 3), false));
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.ANY, new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 3), false));
}
public Biovisionary(final Biovisionary card) {

View file

@ -46,7 +46,7 @@ import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@ -82,7 +82,7 @@ public class HellkiteTyrant extends CardImpl {
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new HellkiteTyrantEffect(),false, true));
// At the beginning of your upkeep, if you control twenty or more artifacts, you win the game.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameEffect(), TargetController.YOU, false);
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
this.addAbility(new ConditionalTriggeredAbility(
ability,
new ControlsPermanentCondition(new FilterArtifactPermanent(), ControlsPermanentCondition.CountType.MORE_THAN,19),

View file

@ -0,0 +1,52 @@
/*
* 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.legions;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class PhageTheUntouchable extends mage.sets.tenth.PhageTheUntouchable {
public PhageTheUntouchable(UUID ownerId) {
super(ownerId);
this.cardNumber = 78;
this.expansionSetCode = "LGN";
}
public PhageTheUntouchable(final PhageTheUntouchable card) {
super(card);
}
@Override
public PhageTheUntouchable copy() {
return new PhageTheUntouchable(this);
}
}

View file

@ -36,7 +36,7 @@ import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.players.Player;
@ -54,7 +54,7 @@ public class BattleOfWits extends CardImpl {
this.color.setBlue(true);
// At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameEffect(), TargetController.YOU, false);
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new BattleOfWitsCondition(), "At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game."));
}

View file

@ -0,0 +1,66 @@
/*
* 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.ravnika;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.TransmuteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.target.common.TargetCardInASingleGraveyard;
/**
*
* @author LevelX2
*/
public class ShredMemory extends CardImpl {
public ShredMemory(UUID ownerId) {
super(ownerId, 105, "Shred Memory", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}");
this.expansionSetCode = "RAV";
this.color.setBlack(true);
// Exile up to four target cards from a single graveyard.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 4, new FilterCard("cards")));
// Transmute {1}{B}{B}
this.addAbility(new TransmuteAbility("{1}{B}{B}"));
}
public ShredMemory(final ShredMemory card) {
super(card);
}
@Override
public ShredMemory copy() {
return new ShredMemory(this);
}
}

View file

@ -41,9 +41,9 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseGameTargetPlayerEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
@ -53,7 +53,6 @@ import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.game.turn.Step;
import mage.players.Player;
import mage.target.common.TargetNonlandPermanent;
import mage.target.targetpointer.FixedTarget;
@ -110,7 +109,7 @@ class VraskaTheUnseenGainAbilityEffect extends ContinuousEffectImpl {
public VraskaTheUnseenGainAbilityEffect(Ability ability) {
super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
this.ability = ability;
staticText = "Until your next turn, whenever a creature deals combat damage to Vraska the Unseen, destroy that creature";
staticText = "Until your next turn, whenever a creature deals combat damage to {this}, destroy that creature";
}
public VraskaTheUnseenGainAbilityEffect(final VraskaTheUnseenGainAbilityEffect effect) {
@ -153,34 +152,7 @@ class AssassinToken extends Token {
subtype.add("Assassin");
power = new MageInt(1);
toughness = new MageInt(1);
addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new VraskaTheUnseenLoseGameEffect(),false, true));
}
}
class VraskaTheUnseenLoseGameEffect extends OneShotEffect {
public VraskaTheUnseenLoseGameEffect() {
super(Outcome.Damage);
this.staticText = "that player loses the game";
}
public VraskaTheUnseenLoseGameEffect(final VraskaTheUnseenLoseGameEffect effect) {
super(effect);
}
@Override
public VraskaTheUnseenLoseGameEffect copy() {
return new VraskaTheUnseenLoseGameEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player target = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (target != null) {
target.lost(game);
return true;
}
return false;
addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseGameTargetPlayerEffect(),false, true));
}
}

View file

@ -36,7 +36,7 @@ import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.cards.CardImpl;
import mage.constants.TargetController;
import mage.game.Game;
@ -54,7 +54,7 @@ public class NearDeathExperience extends CardImpl {
this.color.setWhite(true);
// At the beginning of your upkeep, if you have exactly 1 life, you win the game.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameEffect(), TargetController.YOU, false);
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new OneLifeCondition(), "At the beginning of your upkeep, if you have exactly 1 life, you win the game."));
}

View file

@ -0,0 +1,86 @@
/*
* 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.tenth;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToACreatureTriggeredAbility;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.CastFromHandCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseGameSourceControllerEffect;
import mage.abilities.effects.common.LoseGameTargetPlayerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.watchers.common.CastFromHandWatcher;
/**
*
* @author LevelX2
*/
public class PhageTheUntouchable extends CardImpl {
public PhageTheUntouchable(UUID ownerId) {
super(ownerId, 166, "Phage the Untouchable", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}{B}");
this.expansionSetCode = "10E";
this.supertype.add("Legendary");
this.subtype.add("Zombie");
this.subtype.add("Minion");
this.color.setBlack(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.
this.addAbility(new ConditionalTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false),
new InvertCondition(new CastFromHandCondition()),
"When {this} enters the battlefield, if you didn't cast it from your hand, you lose the game"
));
this.addWatcher(new CastFromHandWatcher());
// Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated.
this.addAbility(new DealsCombatDamageToACreatureTriggeredAbility(new DestroyTargetEffect(true), false, true));
// Whenever Phage deals combat damage to a player, that player loses the game.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseGameTargetPlayerEffect(), false, true));
}
public PhageTheUntouchable(final PhageTheUntouchable card) {
super(card);
}
@Override
public PhageTheUntouchable copy() {
return new PhageTheUntouchable(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* 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.vintagemasters;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.EntersBattlefieldEffect;
import mage.abilities.effects.common.CopyPermanentEffect;
import mage.abilities.keyword.DethroneAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.functions.ApplyToPermanent;
/**
*
* @author LevelX2
*/
public class DacksDuplicate extends CardImpl {
public DacksDuplicate(UUID ownerId) {
super(ownerId, 248, "Dack's Duplicate", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.expansionSetCode = "VMA";
this.subtype.add("Shapeshifter");
this.color.setRed(true);
this.color.setBlue(true);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// You may have Dack's Duplicate enter the battlefield as a copy of any creature on the battlefield except it gains haste and dethrone.
this.addAbility(new SimpleStaticAbility(
Zone.BATTLEFIELD,
new EntersBattlefieldEffect(new CopyPermanentEffect(new DacksDuplicateApplyToPermanent()),
"You may have {this} enter the battlefield as a copy of any creature on the battlefield except it gains haste and dethrone",
true)));
}
public DacksDuplicate(final DacksDuplicate card) {
super(card);
}
@Override
public DacksDuplicate copy() {
return new DacksDuplicate(this);
}
}
class DacksDuplicateApplyToPermanent extends ApplyToPermanent {
@Override
public Boolean apply(Game game, Permanent permanent) {
permanent.addAbility(new DethroneAbility(), game);
permanent.addAbility(HasteAbility.getInstance(), game);
return true;
}
}

View file

@ -0,0 +1,169 @@
/*
* 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.vintagemasters;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.DethroneAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author LevelX2
*/
public class MarchesaTheBlackRose extends CardImpl {
public MarchesaTheBlackRose(UUID ownerId) {
super(ownerId, 256, "Marchesa, the Black Rose", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}");
this.expansionSetCode = "VMA";
this.supertype.add("Legendary");
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setRed(true);
this.color.setBlue(true);
this.color.setBlack(true);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Dethrone
this.addAbility(new DethroneAbility());
// Other creatures you control have dethrone.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(new DethroneAbility(), Duration.WhileOnBattlefield, new FilterCreaturePermanent(), true)));
// Whenever a creature you control with a +1/+1 counter on it dies, return that card to the battlefield under your control at the beginning of the next end step.
this.addAbility(new MarchesaTheBlackRoseTriggeredAbility());
}
public MarchesaTheBlackRose(final MarchesaTheBlackRose card) {
super(card);
}
@Override
public MarchesaTheBlackRose copy() {
return new MarchesaTheBlackRose(this);
}
}
class MarchesaTheBlackRoseTriggeredAbility extends TriggeredAbilityImpl {
public MarchesaTheBlackRoseTriggeredAbility() {
super(Zone.BATTLEFIELD, new MarchesaTheBlackRoseEffect());
}
public MarchesaTheBlackRoseTriggeredAbility(final MarchesaTheBlackRoseTriggeredAbility ability) {
super(ability);
}
@Override
public MarchesaTheBlackRoseTriggeredAbility copy() {
return new MarchesaTheBlackRoseTriggeredAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD
&& ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) {
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (permanent != null &&
permanent.getControllerId().equals(this.getControllerId())
&& permanent.getCardType().contains(CardType.CREATURE)
&& permanent.getCounters().getCount(CounterType.P1P1) > 0) {
for (Effect effect: this.getEffects()) {
effect.setTargetPointer(new FixedTarget(permanent.getId()));
}
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever a creature you control with a +1/+1 counter on it dies, " + super.getRule();
}
}
class MarchesaTheBlackRoseEffect extends OneShotEffect {
MarchesaTheBlackRoseEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "return that card to the battlefield under your control at the beginning of the next end step.";
}
MarchesaTheBlackRoseEffect(final MarchesaTheBlackRoseEffect effect) {
super(effect);
}
@Override
public MarchesaTheBlackRoseEffect copy() {
return new MarchesaTheBlackRoseEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
if (card != null) {
Effect effect = new ReturnToBattlefieldUnderYourControlTargetEffect();
effect.setText("return that card to the battlefield under your control at the beginning of the next end step");
DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(effect);
delayedAbility.setSourceId(source.getSourceId());
delayedAbility.setControllerId(source.getControllerId());
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
game.addDelayedTriggeredAbility(delayedAbility);
return true;
}
return false;
}
}

View file

@ -0,0 +1,175 @@
/*
* 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.vintagemasters;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.UntapAllControllerEffect;
import mage.abilities.keyword.DethroneAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TurnPhase;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.turn.TurnMod;
import mage.players.Player;
import mage.util.CardUtil;
/**
*
* @author LevelX2
*/
public class ScourgeOfTheThrone extends CardImpl {
public ScourgeOfTheThrone(UUID ownerId) {
super(ownerId, 184, "Scourge of the Throne", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
this.expansionSetCode = "VMA";
this.subtype.add("Dragon");
this.color.setRed(true);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Dethrone (Whenever this creature attacks the player with the most life or tied for most life, put a +1/+1 counter on it.)
this.addAbility(new DethroneAbility());
// Whenever Scourge of the Throne attacks for the first time each turn, if it's attacking the player with the most life or tied for most life, untap all attacking creatures. After this phase, there is an additional combat phase.
Ability ability = new ScourgeOfTheThroneAttacksTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(),"untap all creatures you control"), false);
ability.addEffect(new AdditionalCombatPhaseEffect());
this.addAbility(ability);
}
public ScourgeOfTheThrone(final ScourgeOfTheThrone card) {
super(card);
}
@Override
public ScourgeOfTheThrone copy() {
return new ScourgeOfTheThrone(this);
}
}
class ScourgeOfTheThroneAttacksTriggeredAbility extends TriggeredAbilityImpl {
public ScourgeOfTheThroneAttacksTriggeredAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
}
public ScourgeOfTheThroneAttacksTriggeredAbility(final ScourgeOfTheThroneAttacksTriggeredAbility ability) {
super(ability);
}
@Override
public void reset(Game game) {
game.getState().setValue(CardUtil.getCardZoneString("amountAttacks", getSourceId(), game), new Integer(0));
}
@Override
public boolean checkInterveningIfClause(Game game) {
UUID defenderId = game.getCombat().getDefenderId(getSourceId());
if (defenderId != null) {
Player attackedPlayer = game.getPlayer(defenderId);
Player controller = game.getPlayer(getControllerId());
if (attackedPlayer != null && controller != null) {
int mostLife = Integer.MIN_VALUE;
for (UUID playerId: controller.getInRange()) {
Player player = game.getPlayer(playerId);
if (player != null) {
if (player.getLife() > mostLife) {
mostLife = player.getLife();
}
}
}
return attackedPlayer.getLife() == mostLife;
}
}
return false;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId()) ) {
Integer amountAttacks = (Integer) game.getState().getValue(CardUtil.getCardZoneString("amountAttacks", getSourceId(), game));
if (amountAttacks == null || amountAttacks.intValue() < 1) {
if (amountAttacks == null) {
amountAttacks = new Integer(1);
} else {
++amountAttacks;
}
game.getState().setValue(CardUtil.getCardZoneString("amountAttacks", getSourceId(), game), amountAttacks);
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever {this} attacks for the first time each turn, if it's attacking the player with the most life or tied for most life, " + super.getRule();
}
@Override
public ScourgeOfTheThroneAttacksTriggeredAbility copy() {
return new ScourgeOfTheThroneAttacksTriggeredAbility(this);
}
}
class AdditionalCombatPhaseEffect extends OneShotEffect {
public AdditionalCombatPhaseEffect() {
super(Outcome.Benefit);
staticText = "After this phase, there is an additional combat phase";
}
public AdditionalCombatPhaseEffect(final AdditionalCombatPhaseEffect effect) {
super(effect);
}
@Override
public AdditionalCombatPhaseEffect copy() {
return new AdditionalCombatPhaseEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), TurnPhase.COMBAT, null, false));
return true;
}
}

View file

@ -37,7 +37,7 @@ import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.WinGameEffect;
import mage.abilities.effects.common.WinGameSourceControllerEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
@ -62,7 +62,7 @@ public class FelidarSovereign extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
this.addAbility(LifelinkAbility.getInstance());
// At the beginning of your upkeep, if you have 40 or more life, you win the game.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameEffect(), TargetController.YOU, false);
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new FortyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 40 or more life, you win the game."));
}

View file

@ -0,0 +1,67 @@
/*
* 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.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class LoseGameSourceControllerEffect extends OneShotEffect {
public LoseGameSourceControllerEffect() {
super(Outcome.Detriment);
this.staticText = "you lose the game";
}
public LoseGameSourceControllerEffect(final LoseGameSourceControllerEffect effect) {
super(effect);
}
@Override
public LoseGameSourceControllerEffect copy() {
return new LoseGameSourceControllerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
controller.lost(game);
return true;
}
return false;
}
}

View file

@ -0,0 +1,67 @@
/*
* 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.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class LoseGameTargetPlayerEffect extends OneShotEffect {
public LoseGameTargetPlayerEffect() {
super(Outcome.Detriment);
this.staticText = "that player loses the game";
}
public LoseGameTargetPlayerEffect(final LoseGameTargetPlayerEffect effect) {
super(effect);
}
@Override
public LoseGameTargetPlayerEffect copy() {
return new LoseGameTargetPlayerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player target = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (target != null) {
target.lost(game);
return true;
}
return false;
}
}

View file

@ -28,9 +28,9 @@
package mage.abilities.effects.common;
import mage.constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
@ -40,20 +40,20 @@ import mage.players.Player;
*/
public class WinGameEffect extends OneShotEffect {
public class WinGameSourceControllerEffect extends OneShotEffect {
public WinGameEffect() {
public WinGameSourceControllerEffect() {
super(Outcome.Win);
this.staticText = "you win the game";
}
public WinGameEffect(final WinGameEffect effect) {
public WinGameSourceControllerEffect(final WinGameSourceControllerEffect effect) {
super(effect);
}
@Override
public WinGameEffect copy() {
return new WinGameEffect(this);
public WinGameSourceControllerEffect copy() {
return new WinGameSourceControllerEffect(this);
}
@Override

View file

@ -0,0 +1,94 @@
/*
* 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.abilities.keyword;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
/**
* Dethrone triggers whenever a creature with dethrone attacks the player with the most life or tied
* for the most life. When the ability resolves, you put a +1/+1 counter on the creature. This happens
* before blockers are declared. Once the ability triggers, it doesn't matter what happens to anybody's
* life total. If the defending player doesn't have the most life when the ability resolves, the creature
* will still get the +1/+1 counter. Note that dethrone won't trigger if the creature attacks a Planeswalker.
* You're going after the crown, after all, not the royal advisors. If you have the most life, your dethrone
* abilities won't trigger, but you may find a few choice ways to avoid that situation.
*
* @author LevelX2
*/
public class DethroneAbility extends TriggeredAbilityImpl {
public DethroneAbility() {
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false);
}
public DethroneAbility(final DethroneAbility ability) {
super(ability);
}
@Override
public DethroneAbility copy() {
return new DethroneAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (GameEvent.EventType.DECLARED_ATTACKERS.equals(event.getType())) {
UUID defenderId = game.getCombat().getDefenderId(getSourceId());
if (defenderId != null) {
Player attackedPlayer = game.getPlayer(defenderId);
Player controller = game.getPlayer(getControllerId());
if (attackedPlayer != null && controller != null) {
int mostLife = Integer.MIN_VALUE;
for (UUID playerId: controller.getInRange()) {
Player player = game.getPlayer(playerId);
if (player != null) {
if (player.getLife() > mostLife) {
mostLife = player.getLife();
}
}
}
return attackedPlayer.getLife() == mostLife;
}
}
}
return false;
}
@Override
public String getRule() {
return "Dethrone (<i>Whenever this creature attacks the player with the most life or tied for most life, put a +1/+1 counter on it.</i>)";
}
}

View file

@ -8,6 +8,7 @@ Cascade|new|
Cumulative upkeep|cost|
Cycling|cost|
Deathtouch|instance|
Dethrone|new|
Defender|instance|
Double Strike|instance|
Dredge|number|