mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
improved Vanishing and [6ED] Armageddon
This commit is contained in:
parent
dcfc2ad7d1
commit
8d5f4f6214
6 changed files with 208 additions and 3 deletions
61
Mage.Sets/src/mage/sets/fifthedition/Armageddon.java
Normal file
61
Mage.Sets/src/mage/sets/fifthedition/Armageddon.java
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
/*
|
||||||
|
* 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.fifthedition;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Loki
|
||||||
|
*/
|
||||||
|
public class Armageddon extends CardImpl<Armageddon> {
|
||||||
|
|
||||||
|
public Armageddon(UUID ownerId) {
|
||||||
|
super(ownerId, 283, "Armageddon", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{W}");
|
||||||
|
this.expansionSetCode = "5ED";
|
||||||
|
|
||||||
|
this.color.setWhite(true);
|
||||||
|
|
||||||
|
// Destroy all lands.
|
||||||
|
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterLandPermanent("lands")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Armageddon(final Armageddon card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Armageddon copy() {
|
||||||
|
return new Armageddon(this);
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/fourthedition/Armageddon.java
Normal file
52
Mage.Sets/src/mage/sets/fourthedition/Armageddon.java
Normal 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.fourthedition;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Loki
|
||||||
|
*/
|
||||||
|
public class Armageddon extends mage.sets.fifthedition.Armageddon {
|
||||||
|
|
||||||
|
public Armageddon(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 255;
|
||||||
|
this.expansionSetCode = "4ED";
|
||||||
|
}
|
||||||
|
|
||||||
|
public Armageddon(final Armageddon card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Armageddon copy() {
|
||||||
|
return new Armageddon(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,6 +35,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.ShroudAbility;
|
import mage.abilities.keyword.ShroudAbility;
|
||||||
import mage.abilities.keyword.VanishingAbility;
|
import mage.abilities.keyword.VanishingAbility;
|
||||||
|
import mage.abilities.keyword.VanishingTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
|
||||||
|
@ -58,6 +59,7 @@ public class Calciderm extends CardImpl<Calciderm> {
|
||||||
// Vanishing 4
|
// Vanishing 4
|
||||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(4))));
|
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(4))));
|
||||||
this.addAbility(new VanishingAbility());
|
this.addAbility(new VanishingAbility());
|
||||||
|
this.addAbility(new VanishingTriggeredAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Calciderm(final Calciderm card) {
|
public Calciderm(final Calciderm card) {
|
||||||
|
|
52
Mage.Sets/src/mage/sets/sixthedition/Armageddon.java
Normal file
52
Mage.Sets/src/mage/sets/sixthedition/Armageddon.java
Normal 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.sixthedition;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Loki
|
||||||
|
*/
|
||||||
|
public class Armageddon extends mage.sets.fifthedition.Armageddon {
|
||||||
|
|
||||||
|
public Armageddon(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 4;
|
||||||
|
this.expansionSetCode = "6ED";
|
||||||
|
}
|
||||||
|
|
||||||
|
public Armageddon(final Armageddon card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Armageddon copy() {
|
||||||
|
return new Armageddon(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -44,9 +44,7 @@ class VanishingEffect extends OneShotEffect<VanishingEffect> {
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
int amount = p.getCounters().getCount(CounterType.TIME);
|
int amount = p.getCounters().getCount(CounterType.TIME);
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
p.getCounters().removeCounter(CounterType.TIME, 1);
|
p.removeCounters(CounterType.TIME.createInstance(), game);
|
||||||
} else {
|
|
||||||
p.sacrifice(source.getSourceId(), game);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
|
import mage.Constants;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
public class VanishingTriggeredAbility extends TriggeredAbilityImpl<VanishingTriggeredAbility> {
|
||||||
|
public VanishingTriggeredAbility() {
|
||||||
|
super(Constants.Zone.BATTLEFIELD, new SacrificeSourceEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public VanishingTriggeredAbility(final VanishingTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (event.getType() == GameEvent.EventType.COUNTER_REMOVED && event.getData().equals("Time") && event.getTargetId().equals(this.getSourceId())) {
|
||||||
|
Permanent p = game.getPermanent(this.getSourceId());
|
||||||
|
if (p != null) {
|
||||||
|
return p.getCounters().getCount(CounterType.TIME) == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VanishingTriggeredAbility copy() {
|
||||||
|
return new VanishingTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue