mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Fixed handling of some Revolt triggered abilities from AEN to intervening if clause.
This commit is contained in:
parent
c6c88ee197
commit
7f7e89c257
6 changed files with 45 additions and 32 deletions
|
@ -32,11 +32,12 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
|
@ -58,8 +59,12 @@ public class AirdropAeronauts extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// <i>Revolt</i> — When Airdrop Aeronauts enters the battlefield, if a permanent you controlled left the battlefield this turn, you gain 5 life.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new GainLifeEffect(5), RevoltCondition.getInstance()), false, "<i>Revolt</i> — ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new GainLifeEffect(5), false), RevoltCondition.getInstance(),
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, you gain 5 life."
|
||||
);
|
||||
ability.setAbilityWord(AbilityWord.REVOLT);
|
||||
this.addAbility(ability, new RevoltWatcher());
|
||||
}
|
||||
|
||||
|
|
|
@ -25,23 +25,22 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.permanent.token.ServoToken;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
|
@ -57,9 +56,11 @@ public class CountlessGearsRenegade extends CardImpl {
|
|||
|
||||
// <i>Revolt</i> — When Countless Gears Renegade enters the battlefield, if a permanent you controlled
|
||||
// left the battlefield this turn, create a 1/1 colorless Servo artifact creature token.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new CreateTokenEffect(new ServoToken(), 1), RevoltCondition.getInstance()),
|
||||
false, "<i>Revolt</i> — ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new CreateTokenEffect(new ServoToken(), 1), false), RevoltCondition.getInstance(),
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, create a 1/1 colorless Servo artifact creature token.");
|
||||
ability.setAbilityWord(AbilityWord.REVOLT);
|
||||
ability.addWatcher(new RevoltWatcher());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -32,10 +32,11 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterOpponentsCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
@ -63,11 +64,12 @@ public class DeadeyeHarpooner extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Revolt</i> — When Deadeye Harpooner enters the battlefield, if a permanent you controlled left the battlefield this turn, destroy target tapped creature an opponent controls.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new DestroyTargetEffect(), RevoltCondition.getInstance()),
|
||||
false,
|
||||
"<i>Revolt</i> — "
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new DestroyTargetEffect(), false), RevoltCondition.getInstance(),
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, destroy target tapped creature an opponent controls."
|
||||
);
|
||||
ability.setAbilityWord(AbilityWord.REVOLT);
|
||||
ability.addTarget(new TargetOpponentsCreaturePermanent(filter));
|
||||
ability.addWatcher(new RevoltWatcher());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.Mana;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -53,12 +53,12 @@ public class HiddenHerbalists extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Revolt</i> &mdash When Hidden Herbalists enters the battlefield, if a permanent you controlled left the battlefield this turn add {G}{G} to your mana pool;
|
||||
// <i>Revolt</i> &mdash When Hidden Herbalists enters the battlefield, if a permanent you controlled left the battlefield this turn, add {G}{G} to your mana pool;
|
||||
this.addAbility(
|
||||
new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new BasicManaEffect(Mana.GreenMana(2)), RevoltCondition.getInstance()),
|
||||
false,
|
||||
"<i>Revolt</i> — "),
|
||||
new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new BasicManaEffect(Mana.GreenMana(2)), false), RevoltCondition.getInstance(),
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, add {G}{G} to your mana pool."),
|
||||
new RevoltWatcher()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -32,10 +32,11 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
|
@ -65,9 +66,11 @@ public class RenegadeRallier extends CardImpl {
|
|||
|
||||
// <i>Revolt</i> — When Renegade Rallier enters the battlefield, if a permanent you controlled left the battlefield this turn,
|
||||
// return target permanent card with converted mana cost 2 or less from your graveyard to your battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(), RevoltCondition.getInstance()),
|
||||
false, "<i>Revolt</i> — ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new ReturnFromGraveyardToBattlefieldTargetEffect(), false), RevoltCondition.getInstance(),
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, return target permanent card with converted mana cost 2 or less from your graveyard to your battlefield.");
|
||||
ability.setAbilityWord(AbilityWord.REVOLT);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||
ability.addWatcher(new RevoltWatcher());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -25,23 +25,22 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.watchers.common.RevoltWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
|
@ -59,11 +58,14 @@ public class SilkweaverElite extends CardImpl {
|
|||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// <i>Revolt</i> — When Silkweaver Elite enters the battlefield, if a permanent you controlled left the battlefield this turn, draw a card.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), RevoltCondition.getInstance()),
|
||||
false, "<i>Revolt</i> — ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1), false), RevoltCondition.getInstance(),
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, draw a card.");
|
||||
ability.setAbilityWord(AbilityWord.REVOLT);
|
||||
ability.addWatcher(new RevoltWatcher());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public SilkweaverElite(final SilkweaverElite card) {
|
||||
|
|
Loading…
Reference in a new issue