mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Fixed Gideon's Triumph that it can sacrifice any creatures, not from current turn;
This commit is contained in:
parent
081ac7ca3c
commit
00915c65d7
1 changed files with 11 additions and 6 deletions
|
|
@ -49,13 +49,13 @@ public final class GideonsTriumph extends CardImpl {
|
||||||
|
|
||||||
class GideonsTriumphEffect extends OneShotEffect {
|
class GideonsTriumphEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterControlledPlaneswalkerPermanent filter
|
private static final FilterControlledPlaneswalkerPermanent filterGideon
|
||||||
= new FilterControlledPlaneswalkerPermanent(SubType.GIDEON);
|
= new FilterControlledPlaneswalkerPermanent(SubType.GIDEON);
|
||||||
private static final FilterPermanent filter2
|
private static final FilterPermanent filterSacrifice
|
||||||
= new FilterPermanent("creature that attacked or blocked this turn");
|
= new FilterPermanent("creature that attacked or blocked this turn");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter2.add(GideonsTriumphCondition.instance);
|
filterSacrifice.add(GideonsTriumphPredicate.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
GideonsTriumphEffect() {
|
GideonsTriumphEffect() {
|
||||||
|
|
@ -76,14 +76,14 @@ class GideonsTriumphEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
int count = 1;
|
int count = 1;
|
||||||
if (!game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game).isEmpty()) {
|
if (!game.getBattlefield().getActivePermanents(filterGideon, source.getControllerId(), game).isEmpty()) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
return new SacrificeEffect(filter2, count, "Target opponent").apply(game, source);
|
return new SacrificeEffect(filterSacrifice, count, "Target opponent").apply(game, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum GideonsTriumphCondition implements Predicate<Permanent> {
|
enum GideonsTriumphPredicate implements Predicate<Permanent> {
|
||||||
instance;
|
instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -123,4 +123,9 @@ class GideonsTriumphWatcher extends Watcher {
|
||||||
return new GideonsTriumphWatcher(this);
|
return new GideonsTriumphWatcher(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
attackedOrBlockedThisTurnCreatures.clear();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue