mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TMC] Implement Heroes in a Half Shell
This commit is contained in:
parent
102b5b519d
commit
3cf6da1735
3 changed files with 97 additions and 1 deletions
80
Mage.Sets/src/mage/cards/h/HeroesInAHalfShell.java
Normal file
80
Mage.Sets/src/mage/cards/h/HeroesInAHalfShell.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.OneOrMoreCombatDamagePlayerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HeroesInAHalfShell extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent("Mutants, Ninjas, and/or Turtles you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.MUTANT.getPredicate(),
|
||||
SubType.NINJA.getPredicate(),
|
||||
SubType.TURTLE.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public HeroesInAHalfShell(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.MUTANT);
|
||||
this.subtype.add(SubType.NINJA);
|
||||
this.subtype.add(SubType.TURTLE);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility());
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Whenever one or more Mutants, Ninjas, and/or Turtles you control deal combat damage to a player, put a +1/+1 counter on each of those creatures and draw a card.
|
||||
Ability ability = new OneOrMoreCombatDamagePlayerTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance())
|
||||
.setText("put a +1/+1 counter on each of those creatures"),
|
||||
SetTargetPointer.PERMANENT, filter, false
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private HeroesInAHalfShell(final HeroesInAHalfShell card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeroesInAHalfShell copy() {
|
||||
return new HeroesInAHalfShell(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ public final class TeenageMutantNinjaTurtlesEternal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dark Ritual", 131, Rarity.MYTHIC, mage.cards.d.DarkRitual.class));
|
||||
cards.add(new SetCardInfo("Donatello, Rad Scientist", 109, Rarity.MYTHIC, mage.cards.d.DonatelloRadScientist.class));
|
||||
cards.add(new SetCardInfo("Donatello, the Brains", 2, Rarity.MYTHIC, mage.cards.d.DonatelloTheBrains.class));
|
||||
cards.add(new SetCardInfo("Heroes in a Half Shell", 6, Rarity.MYTHIC, mage.cards.h.HeroesInAHalfShell.class));
|
||||
cards.add(new SetCardInfo("Leonardo, Worldly Warrior", 101, Rarity.MYTHIC, mage.cards.l.LeonardoWorldlyWarrior.class));
|
||||
cards.add(new SetCardInfo("Leonardo, the Balance", 1, Rarity.MYTHIC, mage.cards.l.LeonardoTheBalance.class));
|
||||
cards.add(new SetCardInfo("Michelangelo, the Heart", 5, Rarity.MYTHIC, mage.cards.m.MichelangeloTheHeart.class));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.BatchTriggeredAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
|
@ -13,8 +14,12 @@ import mage.game.events.DamagedPlayerEvent;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Xanderhall, xenohedron
|
||||
|
|
@ -85,6 +90,16 @@ public class OneOrMoreDamagePlayerTriggeredAbility extends TriggeredAbilityImpl
|
|||
case PLAYER:
|
||||
this.getAllEffects().setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
break;
|
||||
case PERMANENT:
|
||||
Set<MageObjectReference> attackerSet = events
|
||||
.stream()
|
||||
.map(GameEvent::getSourceId)
|
||||
.map(game::getPermanent)
|
||||
.filter(Objects::nonNull)
|
||||
.map(permanent -> new MageObjectReference(permanent, game))
|
||||
.collect(Collectors.toSet());
|
||||
this.getAllEffects().setTargetPointer(new FixedTargets(attackerSet));
|
||||
break;
|
||||
case NONE:
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue