mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Fixed bug #3865, also fixed a few other cards with the same issue.
This commit is contained in:
parent
ea088a4acb
commit
5aeef14429
3 changed files with 11 additions and 7 deletions
|
@ -46,6 +46,7 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCreatureOrPlayer;
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -60,7 +61,7 @@ public class DragonTempest extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public DragonTempest(UUID ownerId, CardSetInfo setInfo) {
|
public DragonTempest(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
|
||||||
|
|
||||||
// Whenever a creature with flying enters the battlefield under your control, it gains haste until the end of turn.
|
// Whenever a creature with flying enters the battlefield under your control, it gains haste until the end of turn.
|
||||||
Effect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
Effect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||||
|
@ -119,7 +120,7 @@ class DragonTempestDamageEffect extends OneShotEffect {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
int amount = game.getBattlefield().countAll(dragonFilter, controller.getId(), game);
|
int amount = game.getBattlefield().countAll(dragonFilter, controller.getId(), game);
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
Permanent targetCreature = game.getPermanent(source.getTargets().getFirstTarget());
|
Permanent targetCreature = ((FixedTarget) getTargetPointer()).getTargetedPermanentOrLKIBattlefield(game);
|
||||||
if (targetCreature != null) {
|
if (targetCreature != null) {
|
||||||
targetCreature.damage(amount, getTargetPointer().getFirst(game, source), game, false, true);
|
targetCreature.damage(amount, getTargetPointer().getFirst(game, source), game, false, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -67,7 +67,8 @@ public class FlameshadowConjuring extends CardImpl {
|
||||||
|
|
||||||
// Whenever a nontoken creature enters the battlefield under your control, you may pay {R}. If you do, create a token that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step.
|
// Whenever a nontoken creature enters the battlefield under your control, you may pay {R}. If you do, create a token that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step.
|
||||||
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(
|
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(
|
||||||
new FlameshadowConjuringEffect(), new ManaCostsImpl("{R}"), "Pay {R} to create a token that's a copy of that creature that entered the battlefield?"), filterNontoken, false, SetTargetPointer.PERMANENT,
|
new FlameshadowConjuringEffect(), new ManaCostsImpl("{R}"), "Pay {R} to create a token that's a copy of that creature that entered the battlefield?"),
|
||||||
|
filterNontoken, false, SetTargetPointer.PERMANENT,
|
||||||
"Whenever a nontoken creature enters the battlefield under your control, "
|
"Whenever a nontoken creature enters the battlefield under your control, "
|
||||||
+ "you may pay {R}. If you do, create a token that's a copy of that creature. "
|
+ "you may pay {R}. If you do, create a token that's a copy of that creature. "
|
||||||
+ "That token gains haste. Exile it at the beginning of the next end step");
|
+ "That token gains haste. Exile it at the beginning of the next end step");
|
||||||
|
@ -102,7 +103,7 @@ class FlameshadowConjuringEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
Permanent permanent = ((FixedTarget) getTargetPointer()).getTargetedPermanentOrLKIBattlefield(game);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true);
|
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true);
|
||||||
effect.setTargetPointer(getTargetPointer());
|
effect.setTargetPointer(getTargetPointer());
|
||||||
|
|
|
@ -55,6 +55,7 @@ import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.filter.predicate.permanent.TappedPredicate;
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
import mage.filter.predicate.permanent.TokenPredicate;
|
import mage.filter.predicate.permanent.TokenPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -69,12 +70,13 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
*/
|
*/
|
||||||
public class InallaArchmageRitualist extends CardImpl {
|
public class InallaArchmageRitualist extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Wizard");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another nontoken Wizard");
|
||||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("untapped Wizards you control");
|
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("untapped Wizards you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.WIZARD));
|
filter.add(new SubtypePredicate(SubType.WIZARD));
|
||||||
filter.add(Predicates.not(new TokenPredicate()));
|
filter.add(Predicates.not(new TokenPredicate()));
|
||||||
|
filter.add(new AnotherPredicate());
|
||||||
filter2.add(new SubtypePredicate(SubType.WIZARD));
|
filter2.add(new SubtypePredicate(SubType.WIZARD));
|
||||||
filter2.add(Predicates.not(new TappedPredicate()));
|
filter2.add(Predicates.not(new TappedPredicate()));
|
||||||
}
|
}
|
||||||
|
@ -94,7 +96,7 @@ public class InallaArchmageRitualist extends CardImpl {
|
||||||
new InallaArchmageRitualistEffect(), new ManaCostsImpl("{1}"), "Pay {1} to create a token copy?"),
|
new InallaArchmageRitualistEffect(), new ManaCostsImpl("{1}"), "Pay {1} to create a token copy?"),
|
||||||
filter, false, SetTargetPointer.PERMANENT, ""),
|
filter, false, SetTargetPointer.PERMANENT, ""),
|
||||||
SourceOnBattlefieldOrCommandZoneCondition.instance,
|
SourceOnBattlefieldOrCommandZoneCondition.instance,
|
||||||
"<i>Eminence</i> - Whenever a nontoken Wizard enters the battlefield under your control, "
|
"<i>Eminence</i> - Whenever another nontoken Wizard enters the battlefield under your control, "
|
||||||
+ "{this} is in the command zone or on the battlefield, "
|
+ "{this} is in the command zone or on the battlefield, "
|
||||||
+ "you may pay {1}. If you do, create a token that's a copy of that Wizard. "
|
+ "you may pay {1}. If you do, create a token that's a copy of that Wizard. "
|
||||||
+ "That token gains haste. Exile it at the beginning of the next end step");
|
+ "That token gains haste. Exile it at the beginning of the next end step");
|
||||||
|
@ -135,7 +137,7 @@ class InallaArchmageRitualistEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
Permanent permanent = ((FixedTarget) getTargetPointer()).getTargetedPermanentOrLKIBattlefield(game);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true);
|
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true);
|
||||||
effect.setTargetPointer(getTargetPointer());
|
effect.setTargetPointer(getTargetPointer());
|
||||||
|
|
Loading…
Reference in a new issue