mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[AER] Fixed some problems with revolt.
This commit is contained in:
parent
2033095e3d
commit
c7e149904b
5 changed files with 69 additions and 66 deletions
|
@ -46,6 +46,7 @@ import mage.constants.Zone;
|
|||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,17 +54,16 @@ import mage.players.Player;
|
|||
*/
|
||||
public class AidFromTheCowl extends CardImpl {
|
||||
|
||||
private static final String ruleText = "<i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, " +
|
||||
"you may reveal the top card of your library. If it's a permanent card, you may put it onto the battlefield. Otherwise, put it on the bottom of your library.";
|
||||
private static final String ruleText = "<i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, "
|
||||
+ "you may reveal the top card of your library. If it's a permanent card, you may put it onto the battlefield. Otherwise, put it on the bottom of your library.";
|
||||
|
||||
public AidFromTheCowl(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}");
|
||||
|
||||
|
||||
// <i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn,
|
||||
// reveal the top card of your library. If it is a permanent card, you may put it onto the battlefield. Otherwise, put it on the bottom of your library.
|
||||
TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AidFromTheCowlEffect(), false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new RevoltCondition(), ruleText));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.getInstance(), ruleText), new RevoltWatcher());
|
||||
}
|
||||
|
||||
public AidFromTheCowl(final AidFromTheCowl card) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -58,7 +59,7 @@ public class CallForUnity extends CardImpl {
|
|||
|
||||
// <i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, put a unity counter on Call for Unity.
|
||||
TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.UNITY.createInstance(), true), false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new RevoltCondition(), ruleText));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.getInstance(), ruleText), new RevoltWatcher());
|
||||
|
||||
// Creatures you control get +1/+1 for each unity counter on Call for Unity.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,8 +47,8 @@ import mage.counters.CounterType;
|
|||
*/
|
||||
public class SolemnRecruit extends CardImpl {
|
||||
|
||||
private static final String ruleText = "<i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, " +
|
||||
"put a +1/+1 counter on {this}.";
|
||||
private static final String ruleText = "<i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, "
|
||||
+ "put a +1/+1 counter on {this}.";
|
||||
|
||||
public SolemnRecruit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
|
||||
|
@ -62,7 +63,7 @@ public class SolemnRecruit extends CardImpl {
|
|||
|
||||
// <i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, put a +1/+1 counter on Solemn Recruit.
|
||||
TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new RevoltCondition(), ruleText));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.getInstance(), ruleText), new RevoltWatcher());
|
||||
}
|
||||
|
||||
public SolemnRecruit(final SolemnRecruit card) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.constants.TargetController;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -68,12 +69,12 @@ public class VengefulRebel extends CardImpl {
|
|||
// target creature an opponent controls gets -3/-3 until end of turn.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-3, -3, Duration.EndOfTurn), false),
|
||||
new RevoltCondition(),
|
||||
RevoltCondition.getInstance(),
|
||||
"When {this} enters the battlefield, if a permanent you controlled left the battlefield this turn, "
|
||||
+ "target creature an opponent controls gets -3/-3 until end of turn");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.setAbilityWord(AbilityWord.REVOLT);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability, new RevoltWatcher());
|
||||
}
|
||||
|
||||
public VengefulRebel(final VengefulRebel card) {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class RevoltCondition implements Condition {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
RevoltWatcher watcher = (RevoltWatcher) game.getState().getWatchers().get("Revolt");
|
||||
return watcher.revoltActive(source.getControllerId());
|
||||
return watcher != null && watcher.revoltActive(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue