Implemented Brine Hag, Venarian Gold, Wall of Shadows

This commit is contained in:
L_J 2019-01-27 08:55:39 +01:00 committed by GitHub
parent dc8a2fbce8
commit 7ffbb939a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 341 additions and 3 deletions

View file

@ -23,7 +23,7 @@ public class AddCountersAttachedEffect extends OneShotEffect {
private String textEnchanted;
public AddCountersAttachedEffect(Counter counter, String textEnchanted) {
this(counter, new StaticValue(0), textEnchanted);
this(counter, new StaticValue(1), textEnchanted);
}
/**
@ -56,8 +56,12 @@ public class AddCountersAttachedEffect extends OneShotEffect {
Permanent attachedTo = game.getPermanent(permanent.getAttachedTo());
if (attachedTo != null && counter != null) {
Counter newCounter = counter.copy();
newCounter.add(amount.calculate(game, source, this));
attachedTo.addCounters(newCounter, source, game);
int countersToAdd = amount.calculate(game, source, this);
if (countersToAdd > 0) {
countersToAdd--;
newCounter.add(countersToAdd);
attachedTo.addCounters(newCounter, source, game);
}
}
return true;
}

View file

@ -2,6 +2,7 @@
package mage.filter;
import java.io.Serializable;
import java.util.List;
import mage.filter.predicate.Predicate;
import mage.game.Game;
@ -28,4 +29,5 @@ public interface Filter<E> extends Serializable {
Filter<E> copy();
List<Predicate<? super E>> getPredicates();
}

View file

@ -75,4 +75,8 @@ public abstract class FilterImpl<E> implements Filter<E> {
this.lockedFilter = lockedFilter;
}
public List<Predicate<? super E>> getPredicates() {
return predicates;
}
}