mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Fix Autopay test selecting same mana multiple times
This commit is contained in:
@@ -61,6 +61,24 @@ public class Mana {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sourceCard.equals(m2.sourceCard)) {
|
||||
if (addsKeywords(null) != m2.addsKeywords(null)) {
|
||||
return false;
|
||||
}
|
||||
if (addsCounters(null) != m2.addsCounters(null)) {
|
||||
return false;
|
||||
}
|
||||
if (mp.isCannotCounterPaidWith() != mp2.isCannotCounterPaidWith()) {
|
||||
return false;
|
||||
}
|
||||
if (mp.getTriggersWhenSpent() != mp2.getTriggersWhenSpent()) {
|
||||
return false;
|
||||
}
|
||||
if (mp.isPersistentMana() != mp2.isPersistentMana()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return mp == mp2 || (mp.getManaRestrictions().equals(mp2.getManaRestrictions()) && mp.getExtraManaRestriction().equals(mp2.getExtraManaRestriction()));
|
||||
}
|
||||
|
||||
|
||||
@@ -226,6 +226,10 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
return source.isValid(cannotCounterSpell, sourceCard.getController(), sourceCard, null);
|
||||
}
|
||||
|
||||
public boolean isCannotCounterPaidWith() {
|
||||
return null != cannotCounterSpell;
|
||||
}
|
||||
|
||||
public void addNoCounterEffect(SpellAbility saBeingPaid) {
|
||||
final Game game = sourceCard.getGame();
|
||||
final Card eff = new Card(game.nextCardId(), game);
|
||||
|
||||
Reference in New Issue
Block a user