mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
fixed Rookie Mistake being able to target the same creature twice
This commit is contained in:
parent
3f88f350f6
commit
9824c9bfd2
1 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,9 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
@ -22,6 +25,12 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class RookieMistake extends CardImpl {
|
public final class RookieMistake extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterCreaturePermanent();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new AnotherTargetPredicate(2));
|
||||||
|
}
|
||||||
|
|
||||||
public RookieMistake(UUID ownerId, CardSetInfo setInfo) {
|
public RookieMistake(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
|
||||||
|
|
||||||
|
@ -30,7 +39,7 @@ public final class RookieMistake extends CardImpl {
|
||||||
TargetPermanent target = new TargetCreaturePermanent();
|
TargetPermanent target = new TargetCreaturePermanent();
|
||||||
target.setTargetTag(1);
|
target.setTargetTag(1);
|
||||||
this.getSpellAbility().addTarget(target.withChooseHint("+0/+2"));
|
this.getSpellAbility().addTarget(target.withChooseHint("+0/+2"));
|
||||||
target = new TargetCreaturePermanent();
|
target = new TargetPermanent(filter);
|
||||||
target.setTargetTag(2);
|
target.setTargetTag(2);
|
||||||
this.getSpellAbility().addTarget(target.withChooseHint("-2/-0"));
|
this.getSpellAbility().addTarget(target.withChooseHint("-2/-0"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue