mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
minor rearrangement (just need to get these out of files-to-commit list)
This commit is contained in:
@@ -560,17 +560,7 @@ public class ManaPool {
|
|||||||
this.owner.updateObservers();
|
this.owner.updateObservers();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* accountFor.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param sa
|
|
||||||
* a {@link forge.card.spellability.SpellAbility} object.
|
|
||||||
* @param ma
|
|
||||||
* a {@link forge.card.spellability.AbilityMana} object.
|
|
||||||
* @return a boolean.
|
|
||||||
*/
|
|
||||||
private boolean accountFor(final SpellAbility sa, final AbilityManaPart ma) {
|
private boolean accountFor(final SpellAbility sa, final AbilityManaPart ma) {
|
||||||
final ArrayList<Mana> manaPaid = sa.getPayingMana();
|
final ArrayList<Mana> manaPaid = sa.getPayingMana();
|
||||||
|
|
||||||
@@ -611,23 +601,10 @@ public class ManaPool {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* refundManaPaid.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param sa
|
|
||||||
* a {@link forge.card.spellability.SpellAbility} object.
|
|
||||||
* @param untap
|
|
||||||
* a boolean.
|
|
||||||
*/
|
|
||||||
public final void refundManaPaid(final SpellAbility sa, final boolean untap) {
|
public final void refundManaPaid(final SpellAbility sa, final boolean untap) {
|
||||||
// TODO having some crash in here related to undo and not tracking
|
// TODO having some crash in here related to undo and not tracking abilities properly
|
||||||
// abilities properly
|
|
||||||
final List<SpellAbility> payAbs = sa.getPayingManaAbilities();
|
|
||||||
|
|
||||||
// go through paidAbilities if they are undoable
|
for (final SpellAbility am : sa.getPayingManaAbilities()) { // go through paidAbilities if they are undoable
|
||||||
for (final SpellAbility am : payAbs) {
|
|
||||||
AbilityManaPart m = am.getManaPart();
|
AbilityManaPart m = am.getManaPart();
|
||||||
if (am.isUndoable()) {
|
if (am.isUndoable()) {
|
||||||
if (this.accountFor(sa, m)) {
|
if (this.accountFor(sa, m)) {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package forge.card.spellability;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
@@ -306,10 +307,9 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getOrigProduced().contains("Chosen")) {
|
if (this.getOrigProduced().contains("Chosen") && this.getSourceCard() == null ) {
|
||||||
if (this.getSourceCard() != null && !this.getSourceCard().getChosenColor().isEmpty()
|
List<String> chosenCol = this.getSourceCard().getChosenColor();
|
||||||
&& MagicColor.toShortString(this.getSourceCard().getChosenColor().get(0))
|
if ( !chosenCol.isEmpty() && MagicColor.toShortString(chosenCol.get(0)).contains(s)) {
|
||||||
.contains(s)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user