mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Fix Myr Battlesphere allowing you to tap for X = 0
This commit is contained in:
@@ -32,7 +32,7 @@ public class InputSelectEntitiesFromList<T extends GameEntity> extends InputSele
|
|||||||
public InputSelectEntitiesFromList(final PlayerControllerHuman controller, final int min, final int max, final FCollectionView<T> validChoices0, final SpellAbility sa0) {
|
public InputSelectEntitiesFromList(final PlayerControllerHuman controller, final int min, final int max, final FCollectionView<T> validChoices0, final SpellAbility sa0) {
|
||||||
super(controller, Math.min(min, validChoices0.size()), Math.min(max, validChoices0.size()), sa0);
|
super(controller, Math.min(min, validChoices0.size()), Math.min(max, validChoices0.size()), sa0);
|
||||||
validChoices = validChoices0;
|
validChoices = validChoices0;
|
||||||
if (min > validChoices.size()) { // pfps does this really do anything useful??
|
if (min > validChoices.size()) { // pfps does this really do anything useful??
|
||||||
System.out.println(String.format("Trying to choose at least %d things from a list with only %d things!", min, validChoices.size()));
|
System.out.println(String.format("Trying to choose at least %d things from a list with only %d things!", min, validChoices.size()));
|
||||||
}
|
}
|
||||||
ArrayList<CardView> vCards = new ArrayList<>();
|
ArrayList<CardView> vCards = new ArrayList<>();
|
||||||
|
|||||||
@@ -1096,6 +1096,10 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
c = AbilityUtils.calculateAmount(source, amount, ability);
|
c = AbilityUtils.calculateAmount(source, amount, ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c == 0) {
|
||||||
|
return PaymentDecision.number(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (sameType) {
|
if (sameType) {
|
||||||
final CardCollection list2 = typeList;
|
final CardCollection list2 = typeList;
|
||||||
typeList = CardLists.filter(typeList, new Predicate<Card>() {
|
typeList = CardLists.filter(typeList, new Predicate<Card>() {
|
||||||
@@ -1109,9 +1113,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (c == 0) {
|
|
||||||
return PaymentDecision.number(0);
|
|
||||||
}
|
|
||||||
final CardCollection tapped = new CardCollection();
|
final CardCollection tapped = new CardCollection();
|
||||||
while (c > 0) {
|
while (c > 0) {
|
||||||
final InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, 1, 1, typeList, ability);
|
final InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, 1, 1, typeList, ability);
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ public class HumanPlay {
|
|||||||
|
|
||||||
sa = AbilityUtils.addSpliceEffects(sa);
|
sa = AbilityUtils.addSpliceEffects(sa);
|
||||||
|
|
||||||
// System.out.println("Playing:" + sa.getDescription() + " of " + sa.getHostCard() + " new = " + newAbility);
|
|
||||||
final HumanPlaySpellAbility req = new HumanPlaySpellAbility(controller, sa);
|
final HumanPlaySpellAbility req = new HumanPlaySpellAbility(controller, sa);
|
||||||
if (!req.playAbility(true, false, false)) {
|
if (!req.playAbility(true, false, false)) {
|
||||||
if (flippedToCast && !castFaceDown) {
|
if (flippedToCast && !castFaceDown) {
|
||||||
|
|||||||
Reference in New Issue
Block a user