mirror of
https://github.com/correl/mage.git
synced 2025-04-10 17:00:08 -09:00
[ONE] Implement Bloated Contaminator
This commit is contained in:
parent
c1d425ba09
commit
4acd7d6604
5 changed files with 95 additions and 0 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage
Utils
46
Mage.Sets/src/mage/cards/b/BloatedContaminator.java
Normal file
46
Mage.Sets/src/mage/cards/b/BloatedContaminator.java
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
package mage.cards.b;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.counter.ProliferateEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.abilities.keyword.ToxicAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class BloatedContaminator extends CardImpl {
|
||||||
|
|
||||||
|
public BloatedContaminator(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.PHYREXIAN);
|
||||||
|
this.subtype.add(SubType.BEAST);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// Toxic 1
|
||||||
|
this.addAbility(new ToxicAbility(1));
|
||||||
|
|
||||||
|
// Whenever Bloated Contaminator deals combat damage to a player, proliferate.
|
||||||
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ProliferateEffect(), false));
|
||||||
|
}
|
||||||
|
|
||||||
|
private BloatedContaminator(final BloatedContaminator card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BloatedContaminator copy() {
|
||||||
|
return new BloatedContaminator(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
||||||
this.hasBoosters = false; // temporary
|
this.hasBoosters = false; // temporary
|
||||||
|
|
||||||
cards.add(new SetCardInfo("Blackcleave Cliffs", 248, Rarity.RARE, mage.cards.b.BlackcleaveCliffs.class));
|
cards.add(new SetCardInfo("Blackcleave Cliffs", 248, Rarity.RARE, mage.cards.b.BlackcleaveCliffs.class));
|
||||||
|
cards.add(new SetCardInfo("Bloated Contaminator", 159, Rarity.RARE, mage.cards.b.BloatedContaminator.class));
|
||||||
cards.add(new SetCardInfo("Blue Sun's Twilight", 43, Rarity.RARE, mage.cards.b.BlueSunsTwilight.class));
|
cards.add(new SetCardInfo("Blue Sun's Twilight", 43, Rarity.RARE, mage.cards.b.BlueSunsTwilight.class));
|
||||||
cards.add(new SetCardInfo("Copperline Gorge", 249, Rarity.RARE, mage.cards.c.CopperlineGorge.class));
|
cards.add(new SetCardInfo("Copperline Gorge", 249, Rarity.RARE, mage.cards.c.CopperlineGorge.class));
|
||||||
cards.add(new SetCardInfo("Dragonwing Glider", 126, Rarity.RARE, mage.cards.d.DragonwingGlider.class));
|
cards.add(new SetCardInfo("Dragonwing Glider", 126, Rarity.RARE, mage.cards.d.DragonwingGlider.class));
|
||||||
|
|
40
Mage/src/main/java/mage/abilities/keyword/ToxicAbility.java
Normal file
40
Mage/src/main/java/mage/abilities/keyword/ToxicAbility.java
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
|
import mage.abilities.MageSingleton;
|
||||||
|
import mage.abilities.StaticAbility;
|
||||||
|
import mage.abilities.icon.abilities.InfectAbilityIcon;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
import java.io.ObjectStreamException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ToxicAbility extends StaticAbility {
|
||||||
|
|
||||||
|
private final int amount;
|
||||||
|
|
||||||
|
public ToxicAbility(int amount) {
|
||||||
|
super(Zone.BATTLEFIELD, null);
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ToxicAbility(final ToxicAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
this.amount = ability.amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "toxic " + amount + " <i>(Players dealt combat damage by this creature also get a poison counter.)</i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ToxicAbility copy() {
|
||||||
|
return new ToxicAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAmount() {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2178,6 +2178,13 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
player.gainLife(actualDamage, game, source);
|
player.gainLife(actualDamage, game, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (combatDamage && sourceAbilities != null && sourceAbilities.containsClass(ToxicAbility.class)) {
|
||||||
|
int counters = CardUtil
|
||||||
|
.castStream(sourceAbilities.stream(), ToxicAbility.class)
|
||||||
|
.mapToInt(ToxicAbility::getAmount)
|
||||||
|
.sum();
|
||||||
|
addCounters(CounterType.POISON.createInstance(counters), sourceControllerId, source, game);
|
||||||
|
}
|
||||||
// Unstable ability - Earl of Squirrel
|
// Unstable ability - Earl of Squirrel
|
||||||
if (sourceAbilities != null && sourceAbilities.containsKey(SquirrellinkAbility.getInstance().getId())) {
|
if (sourceAbilities != null && sourceAbilities.containsKey(SquirrellinkAbility.getInstance().getId())) {
|
||||||
Player player = game.getPlayer(sourceControllerId);
|
Player player = game.getPlayer(sourceControllerId);
|
||||||
|
|
|
@ -116,6 +116,7 @@ Suspend|number, cost, card|
|
||||||
Swampcycling|cost|
|
Swampcycling|cost|
|
||||||
Swampwalk|new|
|
Swampwalk|new|
|
||||||
Totem armor|new|
|
Totem armor|new|
|
||||||
|
Toxic|number|
|
||||||
Training|new|
|
Training|new|
|
||||||
Trample|instance|
|
Trample|instance|
|
||||||
Tribute|number|
|
Tribute|number|
|
||||||
|
|
Loading…
Add table
Reference in a new issue