fix broken fix

This commit is contained in:
Hans Mackowiak
2021-02-26 18:39:14 +01:00
parent a84af140f2
commit 87e6974f3f
4 changed files with 4 additions and 4 deletions

View File

@@ -42,8 +42,7 @@ public class RestartGameEffect extends SpellAbilityEffect {
CardCollection newLibrary = new CardCollection(p.getCardsIn(restartZones, false));
List<Card> filteredCards = null;
if (leaveZone != null) {
filteredCards = CardLists.filter(p.getCardsIn(leaveZone),
CardPredicates.restriction(leaveRestriction.split(","), p, sa.getHostCard(), null));
filteredCards = CardLists.getValidCards(p.getCardsIn(leaveZone), leaveRestriction.split(","), p, sa.getHostCard(), null);
newLibrary.addAll(filteredCards);
}

View File

@@ -55,6 +55,7 @@ public class TriggerCounterRemoved extends Trigger {
* @param runParams*/
@Override
public final boolean performTest(final Map<AbilityKey, Object> runParams) {
final Card addedTo = (Card) runParams.get(AbilityKey.Card);
final CounterType addedType = (CounterType) runParams.get(AbilityKey.CounterType);
final Integer addedNewCounterAmount = (Integer) runParams.get(AbilityKey.NewCounterAmount);

View File

@@ -55,6 +55,7 @@ public class TriggerCounterRemovedOnce extends Trigger {
* @param runParams*/
@Override
public final boolean performTest(final Map<AbilityKey, Object> runParams) {
final Card removedFrom = (Card) runParams.get(AbilityKey.Card);
final CounterType removedType = (CounterType) runParams.get(AbilityKey.CounterType);
if (hasParam("ValidCard")) {

View File

@@ -67,9 +67,8 @@ public class TriggerTokenCreated extends Trigger {
* @param runParams*/
@Override
public final boolean performTest(final Map<AbilityKey, Object> runParams) {
Player p = (Player) runParams.get(AbilityKey.Player);
if (hasParam("ValidPlayer")) {
if (!matchesValid(p, getParam("ValidPlayer").split(","), getHostCard())) {
if (!matchesValid(runParams.get(AbilityKey.Player), getParam("ValidPlayer").split(","), getHostCard())) {
return false;
}
}