forked from External/mage
Fixed Issue#35. All tests pass now.
This commit is contained in:
parent
aa071912cb
commit
c61e4f2b32
13 changed files with 230 additions and 18 deletions
|
|
@ -108,6 +108,18 @@ public class ContinuousEffectsList<T extends ContinuousEffect> extends ArrayList
|
|||
return abilityMap.get(effectId);
|
||||
}
|
||||
|
||||
public void removeEffect(T effect) {
|
||||
for (Iterator<T> i = this.iterator(); i.hasNext();) {
|
||||
T entry = i.next();
|
||||
if (entry.equals(effect)) {
|
||||
i.remove();
|
||||
if (abilityMap.containsKey(effect.getId())) {
|
||||
abilityMap.remove(effect.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
super.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue