Wounding sources.

This commit is contained in:
marcins78
2013-02-04 16:09:50 +00:00
parent b354e79d2c
commit cbfe04a458
3 changed files with 3 additions and 3 deletions

View File

@@ -255,7 +255,7 @@ public class PlayConditions {
public boolean visitPhysicalCard(PhysicalCard physicalCard) {
if (filter.accepts(gameState, modifiersQuerying, physicalCard)
&& modifiersQuerying.getVitality(gameState, physicalCard) > times
&& modifiersQuerying.canTakeWounds(gameState, Collections.singleton(source), physicalCard, times))
&& modifiersQuerying.canTakeWounds(gameState, (source != null)?Collections.singleton(source):Collections.<PhysicalCard>emptySet(), physicalCard, times))
_woundableCount++;
return _woundableCount >= count;
}

View File

@@ -411,7 +411,7 @@ public class Filters {
return new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
return modifiersQuerying.canTakeWounds(gameState, Collections.singleton(woundSource), physicalCard, count) && modifiersQuerying.getVitality(gameState, physicalCard) >= count;
return modifiersQuerying.canTakeWounds(gameState, (woundSource != null)?Collections.singleton(woundSource):Collections.<PhysicalCard>emptySet(), physicalCard, count) && modifiersQuerying.getVitality(gameState, physicalCard) >= count;
}
};
}

View File

@@ -15,7 +15,7 @@ import java.util.Collection;
import java.util.Collections;
public class WoundCharactersEffect extends AbstractPreventableCardEffect {
private Collection<PhysicalCard> _sources;
private Collection<PhysicalCard> _sources = Collections.emptySet();
private String _sourceText;
public WoundCharactersEffect(Collection<PhysicalCard> sources, Filterable... filter) {