mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[MID] Implemented Arrogant Outlaw
This commit is contained in:
parent
c3531dbb2c
commit
b11c8b5c70
9 changed files with 76 additions and 53 deletions
50
Mage.Sets/src/mage/cards/a/ArrogantOutlaw.java
Normal file
50
Mage.Sets/src/mage/cards/a/ArrogantOutlaw.java
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.OpponentsLostLifeCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||||
|
import mage.abilities.hint.common.OpponentsLostLifeHint;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class ArrogantOutlaw extends CardImpl {
|
||||||
|
|
||||||
|
public ArrogantOutlaw(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.VAMPIRE);
|
||||||
|
this.subtype.add(SubType.NOBLE);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// When Arrogant Outlaw enters the battlefield, if an opponent lost life this turn, each opponent loses 2 life and you gain 2 life.
|
||||||
|
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||||
|
new EntersBattlefieldTriggeredAbility(
|
||||||
|
new LoseLifeOpponentsEffect(2), false
|
||||||
|
), OpponentsLostLifeCondition.instance, "When {this} enters the battlefield, " +
|
||||||
|
"if an opponent lost life this turn, each opponent loses 2 life and you gain 2 life."
|
||||||
|
);
|
||||||
|
ability.addEffect(new GainLifeEffect(2));
|
||||||
|
this.addAbility(ability.addHint(OpponentsLostLifeHint.instance));
|
||||||
|
}
|
||||||
|
|
||||||
|
private ArrogantOutlaw(final ArrogantOutlaw card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrogantOutlaw copy() {
|
||||||
|
return new ArrogantOutlaw(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,19 +1,20 @@
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||||
|
import mage.abilities.condition.CompoundCondition;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.common.MyTurnCondition;
|
||||||
|
import mage.abilities.condition.common.OpponentsLostLifeCondition;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||||
|
import mage.abilities.hint.common.OpponentsLostLifeHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -22,6 +23,11 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class Gutterbones extends CardImpl {
|
public final class Gutterbones extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new CompoundCondition(
|
||||||
|
"during your turn and only if an opponent lost life this turn",
|
||||||
|
MyTurnCondition.instance, OpponentsLostLifeCondition.instance
|
||||||
|
);
|
||||||
|
|
||||||
public Gutterbones(UUID ownerId, CardSetInfo setInfo) {
|
public Gutterbones(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
||||||
|
|
||||||
|
@ -36,8 +42,8 @@ public final class Gutterbones extends CardImpl {
|
||||||
// {1}{B}: Return Gutterbones from your graveyard to your hand. Activate this ability only during your turn and only if an opponent lost life this turn.
|
// {1}{B}: Return Gutterbones from your graveyard to your hand. Activate this ability only during your turn and only if an opponent lost life this turn.
|
||||||
this.addAbility(new ConditionalActivatedAbility(
|
this.addAbility(new ConditionalActivatedAbility(
|
||||||
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(),
|
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(),
|
||||||
new ManaCostsImpl("{1}{B}"), GutterbonesCondition.instance
|
new ManaCostsImpl<>("{1}{B}"), condition
|
||||||
));
|
).addHint(OpponentsLostLifeHint.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Gutterbones(final Gutterbones card) {
|
private Gutterbones(final Gutterbones card) {
|
||||||
|
@ -49,21 +55,3 @@ public final class Gutterbones extends CardImpl {
|
||||||
return new Gutterbones(this);
|
return new Gutterbones(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum GutterbonesCondition implements Condition {
|
|
||||||
instance;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
if (game.isActivePlayer(source.getControllerId())) {
|
|
||||||
PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
|
|
||||||
return watcher != null && watcher.getAllOppLifeLost(source.getControllerId(), game) > 0;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "during your turn and only if an opponent lost life this turn";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,8 +7,10 @@ import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
|
import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
|
||||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
|
import mage.abilities.hint.common.OpponentsLostLifeHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
@ -17,7 +19,6 @@ import mage.game.events.GameEvent;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.cards.Card;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -33,7 +34,7 @@ public final class RakdosLordOfRiots extends CardImpl {
|
||||||
this.toughness = new MageInt(6);
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
// You can't cast Rakdos, Lord of Riots unless an opponent lost life this turn.
|
// You can't cast Rakdos, Lord of Riots unless an opponent lost life this turn.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new RakdosLordOfRiotsCantCastEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new RakdosLordOfRiotsCantCastEffect()).addHint(OpponentsLostLifeHint.instance));
|
||||||
|
|
||||||
// Flying, trample
|
// Flying, trample
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.common.OpponentsLostLifeCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
import mage.abilities.hint.common.OpponentsLostLifeHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -13,8 +13,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -37,9 +35,9 @@ public final class SavageGorger extends CardImpl {
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||||
new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(
|
new BeginningOfEndStepTriggeredAbility(new AddCountersSourceEffect(
|
||||||
CounterType.P1P1.createInstance()), TargetController.YOU, false
|
CounterType.P1P1.createInstance()), TargetController.YOU, false
|
||||||
), SavageGorgerCondition.instance, "At the beginning of your end step, " +
|
), OpponentsLostLifeCondition.instance, "At the beginning of your end step, " +
|
||||||
"if an opponent lost life this turn, put a +1/+1 counter on {this}."
|
"if an opponent lost life this turn, put a +1/+1 counter on {this}."
|
||||||
));
|
).addHint(OpponentsLostLifeHint.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private SavageGorger(final SavageGorger card) {
|
private SavageGorger(final SavageGorger card) {
|
||||||
|
@ -51,18 +49,3 @@ public final class SavageGorger extends CardImpl {
|
||||||
return new SavageGorger(this);
|
return new SavageGorger(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SavageGorgerCondition implements Condition {
|
|
||||||
instance;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
|
|
||||||
return watcher != null && watcher.getAllOppLifeLost(source.getControllerId(), game) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.AsThoughEffectImpl;
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.hint.common.OpponentsLostLifeHint;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -36,12 +37,12 @@ public final class TheaterOfHorrors extends CardImpl {
|
||||||
));
|
));
|
||||||
|
|
||||||
// During your turn, if an opponent lost life this turn, you may play cards exiled with Theater of Horrors.
|
// During your turn, if an opponent lost life this turn, you may play cards exiled with Theater of Horrors.
|
||||||
this.addAbility(new SimpleStaticAbility(new TheaterOfHorrorsCastEffect()));
|
this.addAbility(new SimpleStaticAbility(new TheaterOfHorrorsCastEffect()).addHint(OpponentsLostLifeHint.instance));
|
||||||
|
|
||||||
// {3}{R}: Theater of Horrors deals 1 damage to target opponent or planeswalker.
|
// {3}{R}: Theater of Horrors deals 1 damage to target opponent or planeswalker.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new DamageTargetEffect(1),
|
new DamageTargetEffect(1),
|
||||||
new ManaCostsImpl("{3}{R}")
|
new ManaCostsImpl<>("{3}{R}")
|
||||||
);
|
);
|
||||||
ability.addTarget(new TargetOpponentOrPlaneswalker());
|
ability.addTarget(new TargetOpponentOrPlaneswalker());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -27,6 +27,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
||||||
this.ratioBoosterMythic = 8;
|
this.ratioBoosterMythic = 8;
|
||||||
this.numBoosterDoubleFaced = 1;
|
this.numBoosterDoubleFaced = 1;
|
||||||
|
|
||||||
|
cards.add(new SetCardInfo("Arrogant Outlaw", 84, Rarity.COMMON, mage.cards.a.ArrogantOutlaw.class));
|
||||||
cards.add(new SetCardInfo("Candlelit Cavalry", 175, Rarity.COMMON, mage.cards.c.CandlelitCavalry.class));
|
cards.add(new SetCardInfo("Candlelit Cavalry", 175, Rarity.COMMON, mage.cards.c.CandlelitCavalry.class));
|
||||||
cards.add(new SetCardInfo("Champion of the Perished", 91, Rarity.RARE, mage.cards.c.ChampionOfThePerished.class));
|
cards.add(new SetCardInfo("Champion of the Perished", 91, Rarity.RARE, mage.cards.c.ChampionOfThePerished.class));
|
||||||
cards.add(new SetCardInfo("Consider", 44, Rarity.COMMON, mage.cards.c.Consider.class));
|
cards.add(new SetCardInfo("Consider", 44, Rarity.COMMON, mage.cards.c.Consider.class));
|
||||||
|
|
|
@ -9,7 +9,6 @@ import mage.game.Game;
|
||||||
* @author JayDi85
|
* @author JayDi85
|
||||||
*/
|
*/
|
||||||
public enum OpponentsLostLifeCondition implements Condition {
|
public enum OpponentsLostLifeCondition implements Condition {
|
||||||
|
|
||||||
instance;
|
instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,6 +18,6 @@ public enum OpponentsLostLifeCondition implements Condition {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "opponents lost life";
|
return "an opponent lost life this turn";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import mage.game.Game;
|
||||||
/**
|
/**
|
||||||
* @author JayDi85
|
* @author JayDi85
|
||||||
*/
|
*/
|
||||||
public enum SpectacleHint implements Hint {
|
public enum OpponentsLostLifeHint implements Hint {
|
||||||
|
|
||||||
instance;
|
instance;
|
||||||
private static final ConditionHint hint = new ConditionHint(OpponentsLostLifeCondition.instance, "Opponents lost life this turn");
|
private static final ConditionHint hint = new ConditionHint(OpponentsLostLifeCondition.instance, "Opponents lost life this turn");
|
|
@ -3,7 +3,7 @@ package mage.abilities.keyword;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.costs.mana.ManaCost;
|
import mage.abilities.costs.mana.ManaCost;
|
||||||
import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
|
import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
|
||||||
import mage.abilities.hint.common.SpectacleHint;
|
import mage.abilities.hint.common.OpponentsLostLifeHint;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
@ -36,7 +36,7 @@ public class SpectacleAbility extends SpellAbility {
|
||||||
this.setRuleAtTheTop(true);
|
this.setRuleAtTheTop(true);
|
||||||
this.rule = "Spectacle " + spectacleCosts.getText()
|
this.rule = "Spectacle " + spectacleCosts.getText()
|
||||||
+ " <i>(You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn.)</i>";
|
+ " <i>(You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn.)</i>";
|
||||||
this.addHint(SpectacleHint.instance);
|
this.addHint(OpponentsLostLifeHint.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpectacleAbility(final SpectacleAbility ability) {
|
public SpectacleAbility(final SpectacleAbility ability) {
|
||||||
|
|
Loading…
Reference in a new issue