From 64e96dd50f51d63a00b4a78b58f180cc3dc4e31d Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 17:18:05 +0000 Subject: [PATCH] - Fix for Sanguine Praetor (calculateAmount needs to happen before getValidCards() is called. Solution isn't great, but it is functional. --- src/forge/AbilityFactory_Destroy.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/forge/AbilityFactory_Destroy.java b/src/forge/AbilityFactory_Destroy.java index fda0ffb3cf8..208ad1c481a 100644 --- a/src/forge/AbilityFactory_Destroy.java +++ b/src/forge/AbilityFactory_Destroy.java @@ -482,6 +482,10 @@ public class AbilityFactory_Destroy { if(params.containsKey("ValidCards")) Valid = params.get("ValidCards"); + // Ugh. If calculateAmount needs to be called with DestroyAll it _needs_ to use the X variable + // We really need a better solution to this + if (Valid.contains("X")) + Valid = Valid.replace("X", Integer.toString(AbilityFactory.calculateAmount(card, "X", sa))); CardList list = AllZoneUtil.getCardsInPlay();