mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
[SOM] Trigon cycle.
This commit is contained in:
parent
a504e5adff
commit
beb1830243
9 changed files with 497 additions and 4 deletions
|
|
@ -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<RemoveCountersSourceCost>
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class AddCountersSourceEffect extends OneShotEffect<AddCountersSourceEffect> {
|
||||
|
|
@ -50,6 +49,12 @@ public class AddCountersSourceEffect extends OneShotEffect<AddCountersSourceEffe
|
|||
this.amount = amount;
|
||||
}
|
||||
|
||||
public AddCountersSourceEffect(Counter counter) {
|
||||
super(Outcome.Benefit);
|
||||
this.name = counter.getName();
|
||||
this.amount = counter.getCount();
|
||||
}
|
||||
|
||||
public AddCountersSourceEffect(final AddCountersSourceEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount;
|
||||
|
|
@ -71,8 +76,7 @@ public class AddCountersSourceEffect extends OneShotEffect<AddCountersSourceEffe
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("put ").append(Integer.toString(amount)).append(" ").append(name).append("counters on {this}");
|
||||
return sb.toString();
|
||||
}
|
||||
else
|
||||
} else
|
||||
return "put a " + name + " counter on {this}";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.RestrictionEffect;
|
|||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.counters.common.MinusOneCounter;
|
||||
import mage.game.Game;
|
||||
|
|
@ -464,7 +465,7 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> 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;
|
||||
}
|
||||
|
|
|
|||
52
Mage/src/mage/game/permanent/token/InsectInfectToken.java
Normal file
52
Mage/src/mage/game/permanent/token/InsectInfectToken.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.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());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue