mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fix the AI logic for Expansion // Explosion (casting for 0, underdrawing).
This commit is contained in:
@@ -365,6 +365,10 @@ public class DrawAi extends SpellAbilityAi {
|
||||
if (numCards >= computerLibrarySize) {
|
||||
if (xPaid) {
|
||||
numCards = computerLibrarySize - 1;
|
||||
if (numCards <= 0 && !mandatory) {
|
||||
// not drawing anything, so don't do it
|
||||
return false;
|
||||
}
|
||||
} else if (!ai.isCardInPlay("Laboratory Maniac")) {
|
||||
aiTarget = false;
|
||||
}
|
||||
@@ -398,6 +402,9 @@ public class DrawAi extends SpellAbilityAi {
|
||||
if (computerHandSize + numCards > computerMaxHandSize && game.getPhaseHandler().isPlayerTurn(ai)) {
|
||||
if (xPaid) {
|
||||
numCards = computerMaxHandSize - computerHandSize;
|
||||
if (sa.getHostCard().getZone().is(ZoneType.Hand)) {
|
||||
numCards++; // the card will be spent
|
||||
}
|
||||
source.setSVar("PayX", Integer.toString(numCards));
|
||||
} else {
|
||||
// Don't draw too many cards and then risk discarding
|
||||
|
||||
Reference in New Issue
Block a user