minor rearrangement (just need to get these out of files-to-commit list)

This commit is contained in:
Maxmtg
2013-05-16 06:21:15 +00:00
parent acda6157a7
commit a44f27d280
2 changed files with 14 additions and 37 deletions

View File

@@ -560,17 +560,7 @@ public class ManaPool {
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) {
final ArrayList<Mana> manaPaid = sa.getPayingMana();
@@ -611,23 +601,10 @@ public class ManaPool {
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) {
// TODO having some crash in here related to undo and not tracking
// abilities properly
final List<SpellAbility> payAbs = sa.getPayingManaAbilities();
// TODO having some crash in here related to undo and not tracking abilities properly
// go through paidAbilities if they are undoable
for (final SpellAbility am : payAbs) {
for (final SpellAbility am : sa.getPayingManaAbilities()) { // go through paidAbilities if they are undoable
AbilityManaPart m = am.getManaPart();
if (am.isUndoable()) {
if (this.accountFor(sa, m)) {

View File

@@ -19,6 +19,7 @@ package forge.card.spellability;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import forge.Card;
@@ -306,10 +307,9 @@ public class AbilityManaPart implements java.io.Serializable {
return true;
}
if (this.getOrigProduced().contains("Chosen")) {
if (this.getSourceCard() != null && !this.getSourceCard().getChosenColor().isEmpty()
&& MagicColor.toShortString(this.getSourceCard().getChosenColor().get(0))
.contains(s)) {
if (this.getOrigProduced().contains("Chosen") && this.getSourceCard() == null ) {
List<String> chosenCol = this.getSourceCard().getChosenColor();
if ( !chosenCol.isEmpty() && MagicColor.toShortString(chosenCol.get(0)).contains(s)) {
return true;
}
}