mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Implemented Brine Hag, Venarian Gold, Wall of Shadows
This commit is contained in:
parent
dc8a2fbce8
commit
7ffbb939a1
7 changed files with 341 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,4 +75,8 @@ public abstract class FilterImpl<E> implements Filter<E> {
|
|||
this.lockedFilter = lockedFilter;
|
||||
}
|
||||
|
||||
public List<Predicate<? super E>> getPredicates() {
|
||||
return predicates;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue