mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
fix NPE error in AI when using AF_Discard with "Mode$ RevealDiscardAll"
This commit is contained in:
@@ -1042,7 +1042,7 @@ public class AbilityFactory_ZoneAffecting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!params.get("Mode").equals("Hand")) {
|
if(!params.get("Mode").equals("Hand") && !params.get("Mode").equals("RevealDiscardAll")) {
|
||||||
if (params.get("NumCards").equals("X") && source.getSVar("X").equals("Count$xPaid")){
|
if (params.get("NumCards").equals("X") && source.getSVar("X").equals("Count$xPaid")){
|
||||||
// Set PayX here to maximum value.
|
// Set PayX here to maximum value.
|
||||||
int cardsToDiscard = Math.min(ComputerUtil.determineLeftoverMana(sa),
|
int cardsToDiscard = Math.min(ComputerUtil.determineLeftoverMana(sa),
|
||||||
|
|||||||
Reference in New Issue
Block a user