mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Hungering Hydra
This commit is contained in:
parent
04330a5600
commit
6ad62e023c
2 changed files with 90 additions and 0 deletions
89
Mage.Sets/src/mage/cards/h/HungeringHydra.java
Normal file
89
Mage.Sets/src/mage/cards/h/HungeringHydra.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HungeringHydra extends CardImpl {
|
||||
|
||||
public HungeringHydra(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{G}");
|
||||
|
||||
this.subtype.add(SubType.HYDRA);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Hungering Hydra enters the battlefield with X +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance())
|
||||
));
|
||||
|
||||
// Hungering Hydra can't be blocked by more than one creature.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new CantBeBlockedByMoreThanOneSourceEffect()
|
||||
));
|
||||
|
||||
// Whenever damage is dealt to Hungering Hydra, put that many +1/+1 counters on it.
|
||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new HungeringHydraEffect(),
|
||||
false, false, true
|
||||
));
|
||||
}
|
||||
|
||||
public HungeringHydra(final HungeringHydra card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungeringHydra copy() {
|
||||
return new HungeringHydra(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HungeringHydraEffect extends OneShotEffect {
|
||||
|
||||
public HungeringHydraEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "put that many +1/+1 counters on it";
|
||||
}
|
||||
|
||||
public HungeringHydraEffect(final HungeringHydraEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungeringHydraEffect copy() {
|
||||
return new HungeringHydraEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int damage = (int) this.getValue("damage");
|
||||
if (damage == 0) {
|
||||
return false;
|
||||
}
|
||||
return new AddCountersSourceEffect(
|
||||
CounterType.P1P1.createInstance(damage)
|
||||
).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -92,6 +92,7 @@ public final class CoreSet2019 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Highland Game", 188, Rarity.COMMON, mage.cards.h.HighlandGame.class));
|
||||
cards.add(new SetCardInfo("Horizon Scholar", 59, Rarity.UNCOMMON, mage.cards.h.HorizonScholar.class));
|
||||
cards.add(new SetCardInfo("Hostile Minotaur", 147, Rarity.COMMON, mage.cards.h.HostileMinotaur.class));
|
||||
cards.add(new SetCardInfo("Hungering Hydra", 189, Rarity.RARE, mage.cards.h.HungeringHydra.class));
|
||||
cards.add(new SetCardInfo("Infernal Reckoning", 102, Rarity.RARE, mage.cards.i.InfernalReckoning.class));
|
||||
cards.add(new SetCardInfo("Infernal Scarring", 103, Rarity.COMMON, mage.cards.i.InfernalScarring.class));
|
||||
cards.add(new SetCardInfo("Inspired Charge", 15, Rarity.COMMON, mage.cards.i.InspiredCharge.class));
|
||||
|
|
Loading…
Reference in a new issue