mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[DMU] Implemented Lagomos, Hand of Hatred
This commit is contained in:
parent
180f9bf8dd
commit
3ce05b06c7
3 changed files with 141 additions and 0 deletions
106
Mage.Sets/src/mage/cards/l/LagomosHandOfHatred.java
Normal file
106
Mage.Sets/src/mage/cards/l/LagomosHandOfHatred.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Elemental21TrampleHasteToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.common.CreaturesDiedWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class LagomosHandOfHatred extends CardImpl {
|
||||
|
||||
public LagomosHandOfHatred(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// At the beginning of combat on your turn, create a 2/1 red Elemental creature token with trample and haste. Sacrifice it at the beginning of the next end step.
|
||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new LagomosHandOfHatredEffect(), TargetController.YOU, false));
|
||||
|
||||
// {T}: Search your library for a card, put it into your hand, then shuffle. Activate only if five or more creatures died this turn.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary()),
|
||||
new TapSourceCost(),
|
||||
LagomosHandOfHatredCondition.instance
|
||||
), new CreaturesDiedWatcher());
|
||||
}
|
||||
|
||||
private LagomosHandOfHatred(final LagomosHandOfHatred card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LagomosHandOfHatred copy() {
|
||||
return new LagomosHandOfHatred(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LagomosHandOfHatredEffect extends OneShotEffect {
|
||||
|
||||
public LagomosHandOfHatredEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "create a 2/1 red Elemental creature token with trample and haste. Sacrifice it at the beginning of the next end step.";
|
||||
}
|
||||
|
||||
private LagomosHandOfHatredEffect(final LagomosHandOfHatredEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LagomosHandOfHatredEffect copy() {
|
||||
return new LagomosHandOfHatredEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new Elemental21TrampleHasteToken();
|
||||
token.putOntoBattlefield(1, game, source);
|
||||
for (UUID tokenId : token.getLastAddedTokenIds()) {
|
||||
Permanent permanent = game.getPermanent(tokenId);
|
||||
if (permanent != null) {
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeTargetEffect("sacrifice it")
|
||||
.setTargetPointer(new FixedTarget(permanent, game))), source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
enum LagomosHandOfHatredCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
CreaturesDiedWatcher watcher = game.getState().getWatcher(CreaturesDiedWatcher.class);
|
||||
return watcher != null && watcher.getAmountOfCreaturesDiedThisTurn() >= 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "five or more creatures died this turn";
|
||||
}
|
||||
}
|
|
@ -64,6 +64,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Jhoira, Ageless Innovator", 202, Rarity.RARE, mage.cards.j.JhoiraAgelessInnovator.class));
|
||||
cards.add(new SetCardInfo("Join Forces", 21, Rarity.UNCOMMON, mage.cards.j.JoinForces.class));
|
||||
cards.add(new SetCardInfo("Karplusan Forest", 250, Rarity.RARE, mage.cards.k.KarplusanForest.class));
|
||||
cards.add(new SetCardInfo("Lagomos, Hand of Hatred", 205, Rarity.UNCOMMON, mage.cards.l.LagomosHandOfHatred.class));
|
||||
cards.add(new SetCardInfo("Lightning Strike", 137, Rarity.COMMON, mage.cards.l.LightningStrike.class));
|
||||
cards.add(new SetCardInfo("Liliana of the Veil", 97, Rarity.MYTHIC, mage.cards.l.LilianaOfTheVeil.class));
|
||||
cards.add(new SetCardInfo("Llanowar Loamspeaker", 170, Rarity.RARE, mage.cards.l.LlanowarLoamspeaker.class));
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class Elemental21TrampleHasteToken extends TokenImpl {
|
||||
|
||||
public Elemental21TrampleHasteToken() {
|
||||
super("Elemental Token", "2/1 red Elemental creature token with trample and haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.ELEMENTAL);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(1);
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
private Elemental21TrampleHasteToken(final Elemental21TrampleHasteToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Elemental21TrampleHasteToken copy() {
|
||||
return new Elemental21TrampleHasteToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue