mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix Scavenge for CDA
This commit is contained in:
@@ -1482,7 +1482,7 @@ public class ComputerUtilMana {
|
||||
|
||||
String restriction = null;
|
||||
if (payCosts != null && payCosts.getCostMana() != null) {
|
||||
restriction = payCosts.getCostMana().getRestiction();
|
||||
restriction = payCosts.getCostMana().getRestriction();
|
||||
}
|
||||
ManaCostBeingPaid cost = new ManaCostBeingPaid(mana, restriction);
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ public class UntapAi extends SpellAbilityAi {
|
||||
if (!ComputerUtilMana.hasEnoughManaSourcesToCast(ab, ai)) {
|
||||
// TODO: Currently limited to predicting something that can be paid with any color,
|
||||
// can ideally be improved to work by color.
|
||||
ManaCostBeingPaid reduced = new ManaCostBeingPaid(ab.getPayCosts().getCostMana().getManaCostFor(ab), ab.getPayCosts().getCostMana().getRestiction());
|
||||
ManaCostBeingPaid reduced = new ManaCostBeingPaid(ab.getPayCosts().getCostMana().getManaCostFor(ab), ab.getPayCosts().getCostMana().getRestriction());
|
||||
reduced.decreaseShard(ManaCostShard.GENERIC, untappingCards.size());
|
||||
if (ComputerUtilMana.canPayManaCost(reduced, ab, ai)) {
|
||||
CardCollection manaLandsTapped = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield),
|
||||
|
||||
@@ -220,5 +220,3 @@ public class CopyPermanentEffect extends TokenEffectBase {
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
if (controlledByPlayer != null) {
|
||||
tgtSA.setControlledByPlayer(controlledByTimeStamp, controlledByPlayer);
|
||||
activator.pushPaidForSA(tgtSA);
|
||||
tgtSA.setManaCostBeingPaid(new ManaCostBeingPaid(tgtSA.getPayCosts().getCostMana().getManaCostFor(tgtSA), tgtSA.getPayCosts().getCostMana().getRestiction()));
|
||||
tgtSA.setManaCostBeingPaid(new ManaCostBeingPaid(tgtSA.getPayCosts().getCostMana().getManaCostFor(tgtSA), tgtSA.getPayCosts().getCostMana().getRestriction()));
|
||||
}
|
||||
|
||||
if (controller.getController().playSaFromPlayEffect(tgtSA)) {
|
||||
|
||||
@@ -3000,7 +3000,7 @@ public class CardFactoryUtil {
|
||||
"| SpellDescription$ (" + inst.getReminderText() + ")";
|
||||
|
||||
final SpellAbility sa = AbilityFactory.getAbility(effect, card);
|
||||
sa.setSVar("ScavengeX", "Count$CardPower");
|
||||
sa.setSVar("ScavengeX", "Exiled$CardPower");
|
||||
sa.setIntrinsic(intrinsic);
|
||||
inst.addSpellAbility(sa);
|
||||
|
||||
|
||||
@@ -864,8 +864,8 @@ public class Cost implements Serializable {
|
||||
CostPartMana mPart = (CostPartMana) part;
|
||||
ManaCostBeingPaid oldManaCost = new ManaCostBeingPaid(mPart.getMana());
|
||||
oldManaCost.addManaCost(costPart2.getMana());
|
||||
String r2 = costPart2.getRestiction();
|
||||
String r1 = mPart.getRestiction();
|
||||
String r2 = costPart2.getRestriction();
|
||||
String r1 = mPart.getRestriction();
|
||||
String r = r1 == null ? r2 : ( r2 == null ? r1 : r1 + "." + r2);
|
||||
costParts.remove(costPart2);
|
||||
boolean XCantBe0 = !mPart.canXbe0() || !costPart2.canXbe0();
|
||||
|
||||
@@ -59,7 +59,6 @@ public class CostExile extends CostPartWithList {
|
||||
this.sameZone = sameZone;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getMaxAmountX(SpellAbility ability, Player payer) {
|
||||
final Card source = ability.getHostCard();
|
||||
|
||||
@@ -124,7 +124,7 @@ public class CostPartMana extends CostPart {
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getRestiction() {
|
||||
public String getRestriction() {
|
||||
return restriction;
|
||||
}
|
||||
|
||||
@@ -136,11 +136,11 @@ public class CostPartMana extends CostPart {
|
||||
if (isExiledCreatureCost() && sa.getPaidList(CostExile.HashLKIListKey)!= null && !sa.getPaidList(CostExile.HashLKIListKey).isEmpty()) {
|
||||
// back from the brink
|
||||
return sa.getPaidList(CostExile.HashLKIListKey).get(0).getManaCost();
|
||||
} if (isEnchantedCreatureCost() && sa.getHostCard().getEnchantingCard() != null) {
|
||||
return sa.getHostCard().getEnchantingCard().getManaCost();
|
||||
} else {
|
||||
return getManaToPay();
|
||||
}
|
||||
if (isEnchantedCreatureCost() && sa.getHostCard().getEnchantingCard() != null) {
|
||||
return sa.getHostCard().getEnchantingCard().getManaCost();
|
||||
}
|
||||
return getManaToPay();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -702,7 +702,7 @@ public class HumanPlay {
|
||||
|
||||
public static boolean payManaCost(final PlayerControllerHuman controller, final ManaCost realCost, final CostPartMana mc, final SpellAbility ability, final Player activator, String prompt, ManaConversionMatrix matrix, boolean isActivatedSa) {
|
||||
final Card source = ability.getHostCard();
|
||||
ManaCostBeingPaid toPay = new ManaCostBeingPaid(realCost, mc.getRestiction());
|
||||
ManaCostBeingPaid toPay = new ManaCostBeingPaid(realCost, mc.getRestriction());
|
||||
|
||||
String xInCard = source.getSVar("X");
|
||||
String xColor = ability.getParam("XColor");
|
||||
|
||||
Reference in New Issue
Block a user