Skip to content

Commit

Permalink
text fixes and filter corrections: GainAbilityControlledEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
xenohedron committed Oct 4, 2023
1 parent c8da0f6 commit 708ec9b
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Mage.Sets/src/mage/cards/a/AtarkasCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AtarkasCommand(UUID ownerId, CardSetInfo setInfo) {
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn);
effect.setText("Creatures you control get +1/+1");
mode = new Mode(effect);
effect = new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn);
effect = new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
effect.setText("and gain reach until end of turn");
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);
Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/b/BattleTactics.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -24,7 +25,7 @@ public BattleTactics(UUID ownerId, CardSetInfo setInfo) {
Effect effect = new BoostControlledEffect(2, 1, Duration.EndOfTurn);
effect.setText("Creatures you control get +2/+1");
this.getSpellAbility().addEffect(effect);
effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
effect.setText("and gain lifelink until end of turn");
this.getSpellAbility().addEffect(effect);
}
Expand Down
7 changes: 3 additions & 4 deletions Mage.Sets/src/mage/cards/b/BullRancor.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package mage.cards.b;

import java.util.UUID;
Expand All @@ -15,7 +14,7 @@
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -36,8 +35,8 @@ public BullRancor(UUID ownerId, CardSetInfo setInfo) {
this.addAbility(new MonstrosityAbility("{3}{R}{G}{G}{W}", 3));

// As long as Bull Rancor is monstrous, creatures you control have menace.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilityControlledEffect(new MenaceAbility(), Duration.WhileOnBattlefield),
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilityControlledEffect(new MenaceAbility(false), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES),
MonstrousCondition.instance,
"As long as Bull Rancor is monstrous, creatures you control have menace")
));
Expand Down
4 changes: 2 additions & 2 deletions Mage.Sets/src/mage/cards/d/DomriCitySmasher.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public DomriCitySmasher(UUID ownerId, CardSetInfo setInfo) {
1, 1, Duration.EndOfTurn
).setText("creatures you control get +1/+1"), 2);
ability.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES
).setText("and gain haste until end of turn"));
this.addAbility(ability);

Expand All @@ -52,7 +52,7 @@ public DomriCitySmasher(UUID ownerId, CardSetInfo setInfo) {
StaticFilters.FILTER_CONTROLLED_CREATURE
), -8);
ability.addEffect(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn
TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES
).setText("Those creatures gain trample until end of turn"));
this.addAbility(ability);
}
Expand Down
6 changes: 2 additions & 4 deletions Mage.Sets/src/mage/cards/f/FlameFusillade.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package mage.cards.f;

import java.util.UUID;
Expand All @@ -23,11 +22,10 @@ public final class FlameFusillade extends CardImpl {
public FlameFusillade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}");


// Until end of turn, permanents you control gain "{tap}: This permanent deals 1 damage to any target."
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "this permanent"), new TapSourceCost());
gainedAbility.addTarget(new TargetAnyTarget());
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(gainedAbility, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(gainedAbility, Duration.EndOfTurn).withDurationRuleAtStart(true));
}

private FlameFusillade(final FlameFusillade card) {
Expand Down
9 changes: 5 additions & 4 deletions Mage.Sets/src/mage/cards/f/FlameKinZealot.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package mage.cards.f;

import java.util.UUID;
Expand All @@ -13,7 +12,7 @@
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -30,8 +29,10 @@ public FlameKinZealot(UUID ownerId, CardSetInfo setInfo) {
this.toughness = new MageInt(2);

// When Flame-Kin Zealot enters the battlefield, creatures you control get +1/+1 and gain haste until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
ability.addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 1, Duration.EndOfTurn)
.setText("creatures you control get +1/+1"));
ability.addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)
.setText("and gain haste until end of turn"));
this.addAbility(ability);
}

Expand Down
5 changes: 3 additions & 2 deletions Mage.Sets/src/mage/cards/g/GarrukSavageHerald.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.other.AnotherTargetPredicate;
import mage.game.Game;
Expand Down Expand Up @@ -60,7 +61,7 @@ public GarrukSavageHerald(UUID ownerId, CardSetInfo setInfo) {
this.addAbility(minusAbility);

// −7: Until end of turn, creatures you control gain "You may have this creature assign its combat damage as though it weren't blocked."
ContinuousEffect ultimateEffect = new GainAbilityControlledEffect(DamageAsThoughNotBlockedAbility.getInstance(), Duration.EndOfTurn);
ContinuousEffect ultimateEffect = new GainAbilityControlledEffect(DamageAsThoughNotBlockedAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
ultimateEffect.setText("Until end of turn, creatures you control gain \"You may have this creature assign its combat damage as though it weren't blocked.\"");
this.addAbility(new LoyaltyAbility(ultimateEffect, -7));
}
Expand Down Expand Up @@ -109,4 +110,4 @@ public boolean apply(Game game, Ability source) {
return player.putCardsOnBottomOfLibrary(card, game, source, false);
}
}
}
}
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/g/GoblinWarParty.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.game.permanent.token.GoblinToken;

import java.util.UUID;
Expand All @@ -31,7 +32,7 @@ public GoblinWarParty(UUID ownerId, CardSetInfo setInfo) {
1, 1, Duration.EndOfTurn
).setText("creatures you control get +1/+1"));
mode.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES
).setText("and gain haste until end of turn"));
this.getSpellAbility().addMode(mode);

Expand Down
5 changes: 2 additions & 3 deletions Mage.Sets/src/mage/cards/i/InvertTheSkies.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package mage.cards.i;

import java.util.UUID;
Expand All @@ -12,10 +11,10 @@
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.AbilityPredicate;

/**
Expand Down Expand Up @@ -43,7 +42,7 @@ public InvertTheSkies(UUID ownerId, CardSetInfo setInfo) {
"Creatures your opponents control lose flying until end of turn if {G} was spent to cast this spell,"));

this.getSpellAbility().addEffect(new ConditionalContinuousEffect(
new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES),
new LockedInCondition(ManaWasSpentCondition.BLUE),
"and creatures you control gain flying until end of turn if {U} was spent to cast this spell"));

Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/k/KyrenFlamewright.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.Elemental11BlueRedToken;

import java.util.UUID;
Expand Down Expand Up @@ -43,7 +44,7 @@ public KyrenFlamewright(UUID ownerId, CardSetInfo setInfo) {
ability.addEffect(new BoostControlledEffect(1, 0, Duration.EndOfTurn)
.setText("creatures you control get +1/+0"));
ability.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES
).setText("and gain haste until end of turn"));
this.addAbility(ability);
}
Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/k/KytheonsTactics.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -26,7 +27,7 @@ public KytheonsTactics(UUID ownerId, CardSetInfo setInfo) {
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 1, Duration.EndOfTurn));
// <i>Spell mastery</i> &mdash; If there are two or more instant and/or sorcery cards in your graveyard, those creatures also gain vigilance until end of turn.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new AddContinuousEffectToGame(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn)),
new AddContinuousEffectToGame(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES)),
SpellMasteryCondition.instance,
"<br><i>Spell mastery</i> &mdash; If there are two or more instant and/or sorcery cards in your graveyard, those creatures also gain vigilance until end of turn"));
}
Expand Down
5 changes: 2 additions & 3 deletions Mage.Sets/src/mage/cards/m/MarshalingCry.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package mage.cards.m;

import java.util.UUID;
Expand All @@ -13,7 +12,7 @@
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TimingRule;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -28,7 +27,7 @@ public MarshalingCry(UUID ownerId, CardSetInfo setInfo) {
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn);
effect.setText("Creatures you control get +1/+1");
this.getSpellAbility().addEffect(effect);
effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn);
effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
effect.setText("and gain vigilance until end of turn");
this.getSpellAbility().addEffect(effect);

Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/n/NissaNaturesArtisan.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import mage.abilities.keyword.TrampleAbility;
import mage.cards.*;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
import mage.players.Player;
Expand Down Expand Up @@ -42,7 +43,7 @@ public NissaNaturesArtisan(UUID ownerId, CardSetInfo setInfo) {
5, 5, Duration.EndOfTurn
).setText("creatures you control get +5/+5"), -12);
ability.addEffect(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn
TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES
).setText("and gain trample until end of turn"));
this.addAbility(ability);
}
Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/p/PippinWardenOfIsengard.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetControlledPermanent;
Expand Down Expand Up @@ -54,7 +55,7 @@ public PippinWardenOfIsengard(UUID ownerId, CardSetInfo setInfo) {
).setText("other creatures you control get +3/+3"), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(4, filter)));
ability.addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, true
).setText("and gain haste until end of turn"));
this.addAbility(ability);
}
Expand Down
5 changes: 3 additions & 2 deletions Mage.Sets/src/mage/cards/s/SoulOfTheros.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -40,10 +41,10 @@ public SoulOfTheros(UUID ownerId, CardSetInfo setInfo) {
Effect effect1 = new BoostControlledEffect(2, 2, Duration.EndOfTurn);
effect1.setText("Creatures you control get +2/+2");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect1, new ManaCostsImpl<>("{4}{W}{W}"));
Effect effect2 = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
Effect effect2 = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
effect2.setText("and gain first strike");
ability.addEffect(effect2);
Effect effect3 = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
Effect effect3 = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
effect3.setText("and lifelink until end of turn");
ability.addEffect(effect3);
this.addAbility(ability);
Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/s/StirThePride.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;

/**
*
Expand All @@ -29,7 +30,7 @@ public StirThePride(UUID ownerId, CardSetInfo setInfo) {
// Creatures you control get +2/+2 until end of turn;
this.getSpellAbility().addEffect(new BoostControlledEffect(2,2, Duration.EndOfTurn));
// or until end of turn, creatures you control gain "Whenever this creature deals damage, you gain that much life."
Effect effect = new GainAbilityControlledEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.EndOfTurn);
Effect effect = new GainAbilityControlledEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
effect.setText("until end of turn, creatures you control gain \"Whenever this creature deals damage, you gain that much life.\"");
Mode mode = new Mode(effect);
this.getSpellAbility().getModes().addMode(mode);
Expand Down
3 changes: 2 additions & 1 deletion Mage.Sets/src/mage/cards/t/TowerDefense.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;

import java.util.UUID;

Expand All @@ -23,7 +24,7 @@ public TowerDefense(UUID ownerId, CardSetInfo setInfo) {
0, 5, Duration.EndOfTurn
).setText("creatures you control get +0/+5"));
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
ReachAbility.getInstance(), Duration.EndOfTurn
ReachAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES
).setText("and gain reach until end of turn"));
}

Expand Down
Loading

0 comments on commit 708ec9b

Please sign in to comment.