mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[SPM] Implement Angry Rabble
This commit is contained in:
parent
75b553fe72
commit
a5e9796010
8 changed files with 83 additions and 44 deletions
56
Mage.Sets/src/mage/cards/a/AngryRabble.java
Normal file
56
Mage.Sets/src/mage/cards/a/AngryRabble.java
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AngryRabble extends CardImpl {
|
||||
|
||||
public AngryRabble(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.CITIZEN);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever you cast a spell with mana value 4 or greater, this creature deals 1 damage to each opponent.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DamagePlayersEffect(1, TargetController.OPPONENT),
|
||||
StaticFilters.FILTER_SPELL_MV_4_OR_GREATER, false
|
||||
));
|
||||
|
||||
// {5}{R}: Put two +1/+1 counters on this creature. Activate only as a sorcery.
|
||||
this.addAbility(new ActivateAsSorceryActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ManaCostsImpl<>("{5}{R}")
|
||||
));
|
||||
}
|
||||
|
||||
private AngryRabble(final AngryRabble card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngryRabble copy() {
|
||||
return new AngryRabble(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +1,31 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class AscendantPackleader extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("a permanent with mana value 4 or greater");
|
||||
private static final FilterSpell filter2 = new FilterSpell("a spell with mana value 4 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||
filter2.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||
}
|
||||
|
||||
public AscendantPackleader(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -48,8 +46,7 @@ public final class AscendantPackleader extends CardImpl {
|
|||
// Whenever you cast a spell with mana value 4 or greater, put a +1/+1 counter on Ascendant Packleader.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
filter2,
|
||||
false
|
||||
StaticFilters.FILTER_SPELL_MV_4_OR_GREATER, false
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +1,25 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class DisdainfulStroke extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("spell with mana value 4 or greater");
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||
}
|
||||
|
||||
public DisdainfulStroke(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
|
||||
// Counter target spell with converted mana cost 4 or greater.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
||||
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_MV_4_OR_GREATER));
|
||||
}
|
||||
|
||||
private DisdainfulStroke(final DisdainfulStroke card) {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.ThopterColorlessToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -19,12 +17,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class EtheriumSpinner extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a spell with mana value 4 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||
}
|
||||
|
||||
public EtheriumSpinner(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
|
|
@ -35,7 +27,8 @@ public final class EtheriumSpinner extends CardImpl {
|
|||
|
||||
// Whenever you cast a spell with mana value 4 or greater, create a 1/1 colorless Thopter artifact creature token with flying.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CreateTokenEffect(new ThopterColorlessToken()), filter, false
|
||||
new CreateTokenEffect(new ThopterColorlessToken()),
|
||||
StaticFilters.FILTER_SPELL_MV_4_OR_GREATER, false
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ import mage.abilities.keyword.TrampleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -20,12 +18,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LurkingLizards extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a spell with mana value 4 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
|
||||
}
|
||||
|
||||
public LurkingLizards(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
|
|
@ -39,7 +31,8 @@ public final class LurkingLizards extends CardImpl {
|
|||
|
||||
// Whenever you cast a spell with mana value 4 or greater, put a +1/+1 counter on this creature.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
StaticFilters.FILTER_SPELL_MV_4_OR_GREATER, false
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ public final class MarvelsSpiderMan extends ExpansionSet {
|
|||
this.blockName = "Marvel's Spider-Man"; // for sorting in GUI
|
||||
this.hasBasicLands = true;
|
||||
|
||||
cards.add(new SetCardInfo("Angry Rabble", 75, Rarity.COMMON, mage.cards.a.AngryRabble.class));
|
||||
cards.add(new SetCardInfo("Aunt May", 3, Rarity.UNCOMMON, mage.cards.a.AuntMay.class));
|
||||
cards.add(new SetCardInfo("Beetle, Legacy Criminal", 26, Rarity.COMMON, mage.cards.b.BeetleLegacyCriminal.class));
|
||||
cards.add(new SetCardInfo("Daily Bugle Reporters", 6, Rarity.COMMON, mage.cards.d.DailyBugleReporters.class));
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author North, Susucr
|
||||
|
|
@ -103,7 +104,7 @@ public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
private void makeTriggerPhrase() {
|
||||
String text = getWhen() + "you cast " + filter.getMessage();
|
||||
String text = getWhen() + "you cast " + CardUtil.addArticle(filter.getMessage());
|
||||
|
||||
switch (fromZone) {
|
||||
case ALL:
|
||||
|
|
|
|||
|
|
@ -1093,6 +1093,13 @@ public final class StaticFilters {
|
|||
FILTER_SPELL_KICKED_A.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterSpell FILTER_SPELL_MV_4_OR_GREATER = new FilterSpell("spell with mana value 4 or greater");
|
||||
|
||||
static {
|
||||
FILTER_SPELL_MV_4_OR_GREATER.add(new ManaValuePredicate(ComparisonType.OR_GREATER, 4));
|
||||
FILTER_SPELL_MV_4_OR_GREATER.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterSpell FILTER_SPELL_NO_MANA_SPENT = new FilterSpell("a spell, if no mana was spent to cast it");
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue