From beb183024323cc5c3385ebe13b8aded8f4bba4cc Mon Sep 17 00:00:00 2001 From: magenoxx Date: Thu, 30 Dec 2010 15:51:09 +0300 Subject: [PATCH] [SOM] Trigon cycle. --- .../scarsofmirrodin/TrigonofCorruption.java | 91 +++++++++++++++++++ .../scarsofmirrodin/TrigonofInfestation.java | 83 +++++++++++++++++ .../sets/scarsofmirrodin/TrigonofMending.java | 82 +++++++++++++++++ .../sets/scarsofmirrodin/TrigonofRage.java | 91 +++++++++++++++++++ .../sets/scarsofmirrodin/TrigonofThought.java | 82 +++++++++++++++++ .../common/RemoveCountersSourceCost.java | 7 ++ .../common/AddCountersSourceEffect.java | 10 +- .../mage/game/permanent/PermanentImpl.java | 3 +- .../permanent/token/InsectInfectToken.java | 52 +++++++++++ 9 files changed, 497 insertions(+), 4 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java create mode 100644 Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java create mode 100644 Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java create mode 100644 Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java create mode 100644 Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java create mode 100644 Mage/src/mage/game/permanent/token/InsectInfectToken.java diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java new file mode 100644 index 00000000000..63e23d523a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java @@ -0,0 +1,91 @@ +/* + * 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.scarsofmirrodin; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author nantuko + */ +public class TrigonofCorruption extends CardImpl { + + public TrigonofCorruption (UUID ownerId) { + super(ownerId, 213, "Trigon of Corruption", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "SOM"; + + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.getName(), 3))); + + Costs costs = new CostsImpl(); + costs.add(new ManaCostsImpl("{2}")); + costs.add(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + costs.add(new TapSourceCost()); + Effect putCounterEffect = new AddCountersTargetEffect(CounterType.M1M1.createInstance()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, putCounterEffect, costs); + Target target = new TargetCreaturePermanent(); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + + Costs costs2 = new CostsImpl(); + costs2.add(new ManaCostsImpl("{B}{B}")); + costs2.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), costs2)); + } + + public TrigonofCorruption (final TrigonofCorruption card) { + super(card); + } + + @Override + public TrigonofCorruption copy() { + return new TrigonofCorruption(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java new file mode 100644 index 00000000000..018aa5e24db --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java @@ -0,0 +1,83 @@ +/* + * 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.scarsofmirrodin; + +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.permanent.token.InsectInfectToken; + +import java.util.UUID; + +/** + * @author nantuko + */ +public class TrigonofInfestation extends CardImpl { + + private static InsectInfectToken insectToken = new InsectInfectToken(); + + public TrigonofInfestation(UUID ownerId) { + super(ownerId, 214, "Trigon of Infestation", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "SOM"; + + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.getName(), 3))); + + Costs costs = new CostsImpl(); + costs.add(new ManaCostsImpl("{2}")); + costs.add(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + costs.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(insectToken), costs)); + + Costs costs2 = new CostsImpl(); + costs2.add(new ManaCostsImpl("{G}{G}")); + costs2.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), costs2)); + } + + public TrigonofInfestation(final TrigonofInfestation card) { + super(card); + } + + @Override + public TrigonofInfestation copy() { + return new TrigonofInfestation(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java new file mode 100644 index 00000000000..e2cab80fbe9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java @@ -0,0 +1,82 @@ +/* + * 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.scarsofmirrodin; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * @author nantuko + */ +public class TrigonofMending extends CardImpl { + + public TrigonofMending(UUID ownerId) { + super(ownerId, 215, "Trigon of Mending", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "SOM"; + + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.getName(), 3))); + + Costs costs = new CostsImpl(); + costs.add(new ManaCostsImpl("{2}")); + costs.add(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + costs.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), costs)); + + Costs costs2 = new CostsImpl(); + costs2.add(new ManaCostsImpl("{W}{W}")); + costs2.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), costs2)); + } + + public TrigonofMending(final TrigonofMending card) { + super(card); + } + + @Override + public TrigonofMending copy() { + return new TrigonofMending(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java new file mode 100644 index 00000000000..79ecb331511 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java @@ -0,0 +1,91 @@ +/* + * 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.scarsofmirrodin; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * @author Loki + */ +public class TrigonofRage extends CardImpl { + + public TrigonofRage(UUID ownerId) { + super(ownerId, 216, "Trigon of Rage", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "SOM"; + + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.getName(), 3))); + + Costs costs = new CostsImpl(); + costs.add(new ManaCostsImpl("{2}")); + costs.add(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + costs.add(new TapSourceCost()); + Effect pumpEffect = new BoostTargetEffect(3, 0, Duration.EndOfTurn); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, pumpEffect, costs); + Target target = new TargetCreaturePermanent(); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + + Costs costs2 = new CostsImpl(); + costs2.add(new ManaCostsImpl("{R}{R}")); + costs2.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), costs2)); + } + + public TrigonofRage(final TrigonofRage card) { + super(card); + } + + @Override + public TrigonofRage copy() { + return new TrigonofRage(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java new file mode 100644 index 00000000000..f836d76cbd4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java @@ -0,0 +1,82 @@ +/* + * 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.scarsofmirrodin; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * @author nantuko + */ +public class TrigonofThought extends CardImpl { + + public TrigonofThought(UUID ownerId) { + super(ownerId, 217, "Trigon of Thought", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "SOM"; + + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.getName(), 3))); + + Costs costs = new CostsImpl(); + costs.add(new ManaCostsImpl("{2}")); + costs.add(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); + costs.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardControllerEffect(1), costs)); + + Costs costs2 = new CostsImpl(); + costs2.add(new ManaCostsImpl("{U}{U}")); + costs2.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), costs2)); + } + + public TrigonofThought(final TrigonofThought card) { + super(card); + } + + @Override + public TrigonofThought copy() { + return new TrigonofThought(this); + } + +} diff --git a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java index 77bea55d0cd..cd86841753d 100644 --- a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java @@ -31,6 +31,7 @@ package mage.abilities.costs.common; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; +import mage.counters.Counter; import mage.game.Game; import mage.game.permanent.Permanent; @@ -49,6 +50,12 @@ public class RemoveCountersSourceCost extends CostImpl this.text = "Remove " + amount + " " + name + " counters from {this}"; } + public RemoveCountersSourceCost(Counter counter) { + this.amount = counter.getCount(); + this.name = counter.getName(); + this.text = "Remove " + amount + " " + name + " counters from {this}"; + } + public RemoveCountersSourceCost(RemoveCountersSourceCost cost) { super(cost); this.amount = cost.amount; diff --git a/Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java b/Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java index f4bdad5b266..1e9a8b0b04e 100644 --- a/Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java @@ -36,7 +36,6 @@ import mage.game.Game; import mage.game.permanent.Permanent; /** - * * @author BetaSteward_at_googlemail.com */ public class AddCountersSourceEffect extends OneShotEffect { @@ -50,6 +49,12 @@ public class AddCountersSourceEffect extends OneShotEffect> extends CardImpl Permanent source = game.getPermanent(sourceId); if (source != null && (source.getAbilities().containsKey(InfectAbility.getInstance().getId()) || source.getAbilities().containsKey(WitherAbility.getInstance().getId()))) { - addCounters(new MinusOneCounter(actualDamage)); + addCounters(CounterType.M1M1.createInstance(actualDamage)); } else { this.damage += actualDamage; } diff --git a/Mage/src/mage/game/permanent/token/InsectInfectToken.java b/Mage/src/mage/game/permanent/token/InsectInfectToken.java new file mode 100644 index 00000000000..5e37beb48a1 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/InsectInfectToken.java @@ -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.game.permanent.token; + +import mage.Constants.CardType; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.InfectAbility; + +/** + * + * @author nantuko + */ +public class InsectInfectToken extends Token { + + public InsectInfectToken() { + super("Insect", "1/1 green Insect creature token with infect"); + cardType.add(CardType.CREATURE); + color = ObjectColor.GREEN; + subtype.add("Insect"); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(InfectAbility.getInstance()); + } +} \ No newline at end of file