mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- For Multikicker cards, AI should bail if the original cost was {0} and no multikicker was paid (e.g. Everflowing Chalice).
This commit is contained in:
@@ -124,6 +124,7 @@ public class PermanentAi extends SpellAbilityAi {
|
|||||||
// String announce = sa.getParam("Announce");
|
// String announce = sa.getParam("Announce");
|
||||||
ManaCost mkCost = sa.getMultiKickerManaCost();
|
ManaCost mkCost = sa.getMultiKickerManaCost();
|
||||||
ManaCost mCost = sa.getPayCosts().getTotalMana();
|
ManaCost mCost = sa.getPayCosts().getTotalMana();
|
||||||
|
boolean isZeroCost = mCost.isZero();
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
mCost = ManaCost.combine(mCost, mkCost);
|
mCost = ManaCost.combine(mCost, mkCost);
|
||||||
ManaCostBeingPaid mcbp = new ManaCostBeingPaid(mCost);
|
ManaCostBeingPaid mcbp = new ManaCostBeingPaid(mCost);
|
||||||
@@ -133,6 +134,11 @@ public class PermanentAi extends SpellAbilityAi {
|
|||||||
}
|
}
|
||||||
card.setKickerMagnitude(i + 1);
|
card.setKickerMagnitude(i + 1);
|
||||||
}
|
}
|
||||||
|
if (isZeroCost && card.getKickerMagnitude() == 0) {
|
||||||
|
// Bail if the card cost was {0} and no multikicker was paid (e.g. Everflowing Chalice).
|
||||||
|
// TODO: update this if there's ever a card where it makes sense to play it for {0} with no multikicker
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't play cards without being able to pay the upkeep for
|
// don't play cards without being able to pay the upkeep for
|
||||||
|
|||||||
Reference in New Issue
Block a user