- Cleanup, updates and little fixes.

This commit is contained in:
Sloth
2012-10-11 18:15:40 +00:00
parent f0af638079
commit dabaf38df0
10 changed files with 12 additions and 36 deletions

View File

@@ -411,26 +411,4 @@ public abstract class AllZoneUtil {
return false;
}
/**
* <p>
* matchesValid.
* </p>
*
* @param o
* a {@link java.lang.Object} object.
* @param valids
* an array of {@link java.lang.String} objects.
* @param srcCard
* a {@link forge.Card} object.
* @return a boolean.
*/
/*public static boolean matchesValid(final Object o, final String[] valids, final Card srcCard) {
if (o instanceof GameEntity) {
final GameEntity c = (GameEntity) o;
return c.isValid(valids, srcCard.getController(), srcCard);
}
return false;
}*/
} // end class AllZoneUtil

View File

@@ -26,8 +26,8 @@ public enum CardSuperType {
Basic,
/** The Legendary. */
Legendary,
/** The Show. */
Show,
/** The Snow. */
Snow,
/** The Ongoing. */
Ongoing,
/** The World. */

View File

@@ -17,7 +17,6 @@
*/
package forge.card.cost;
import forge.AllZone;
import forge.Card;
import forge.GameActionUtil;
import forge.card.abilityfactory.AbilityFactory;
@@ -101,7 +100,7 @@ public class CostDamage extends CostPart {
*/
@Override
public final void payAI(final Player ai, final SpellAbility ability, final Card source, final CostPayment payment) {
AllZone.getComputerPlayer().addDamage(this.getLastPaidAmount(), source);
ability.getActivatingPlayer().addDamage(this.getLastPaidAmount(), source);
}
/*

View File

@@ -21,7 +21,6 @@ import java.util.List;
import com.google.common.base.Predicate;
import forge.AllZone;
import forge.Card;
import forge.CardPredicates;
@@ -352,7 +351,7 @@ public class CostDiscard extends CostPartWithList {
this.done();
}
if (AllZone.getHumanPlayer().getZone(ZoneType.Hand).isEmpty()) {
if (sa.getActivatingPlayer().getZone(ZoneType.Hand).isEmpty()) {
this.stop();
}
final StringBuilder type = new StringBuilder("");
@@ -393,7 +392,7 @@ public class CostDiscard extends CostPartWithList {
// in case no more cards in hand
if (this.nDiscard == nNeeded) {
this.done();
} else if (AllZone.getHumanPlayer().getZone(ZoneType.Hand).size() == 0) {
} else if (sa.getActivatingPlayer().getZone(ZoneType.Hand).size() == 0) {
// really
// shouldn't
// happen

View File

@@ -19,7 +19,6 @@ package forge.card.cost;
import java.util.ArrayList;
import forge.AllZone;
import forge.Card;
import forge.card.spellability.SpellAbility;
import forge.card.spellability.SpellAbilityRequirements;
@@ -271,7 +270,7 @@ public class CostPayment {
}
// Move this to CostMana
AllZone.getHumanPlayer().getManaPool().refundManaPaid(this.ability, false);
this.ability.getActivatingPlayer().getManaPool().refundManaPaid(this.ability, false);
}
/**

View File

@@ -19,7 +19,6 @@ package forge.card.cost;
import java.util.List;
import forge.AllZone;
import forge.Card;
import forge.CardLists;
@@ -295,7 +294,7 @@ public class CostReveal extends CostPartWithList {
// in case no more cards in hand
if (this.nReveal == nNeeded) {
this.done();
} else if (AllZone.getHumanPlayer().getZone(ZoneType.Hand).size() == 0) {
} else if (sa.getActivatingPlayer().getZone(ZoneType.Hand).size() == 0) {
// really
// shouldn't
// happen

View File

@@ -234,7 +234,7 @@ public class SpellAbilityRequirements {
this.ability.setStackDescription(sb.toString());
}
AllZone.getHumanPlayer().getManaPool().clearManaPaid(this.ability, false);
this.ability.getActivatingPlayer().getManaPool().clearManaPaid(this.ability, false);
AllZone.getStack().addAndUnfreeze(this.ability);
}
}