- Hardcoded static abilities are now only be called by checkStaticAbilities.

This commit is contained in:
Sloth
2012-03-08 11:49:17 +00:00
parent 6c9c0d718e
commit 256e6b4123
5 changed files with 0 additions and 89 deletions

View File

@@ -2633,71 +2633,6 @@ public class CombatUtil {
}
} // Mijae Djinn
/*if (c.getName().equals("Zur the Enchanter") && !c.getCreatureAttackedThisCombat()) {
// hack, to make sure this doesn't break grabbing an oblivion ring:
c.setCreatureAttackedThisCombat(true);
CardList enchantments = c.getController().getCardsIn(Zone.Library);
enchantments = enchantments.filter(new CardListFilter() {
@Override
public boolean addCard(final Card card) {
return (card.isEnchantment() && (card.getCMC() <= 3));
}
});
if (enchantments.size() > 0) {
if (c.getController().isHuman()) {
final Object o = GuiUtils.getChoiceOptional("Pick an enchantment to put onto the battlefield",
enchantments.toArray());
if (o != null) {
final Card crd = (Card) o;
Singletons.getModel().getGameAction().moveToPlay(crd);
if (crd.isAura()) {
Object obj = null;
if (crd.hasKeyword("Enchant creature")) {
final CardList creats = AllZoneUtil.getCreaturesInPlay();
obj = GuiUtils.getChoiceOptional("Pick a creature to attach " + crd.getName() + " to",
creats.toArray());
} else if (crd.hasKeyword("Enchant land") || crd.hasKeyword("Enchant land you control")) {
final CardList lands = AllZoneUtil.getLandsInPlay();
if (lands.size() > 0) {
obj = GuiUtils.getChoiceOptional("Pick a land to attach " + crd.getName() + " to",
lands.toArray());
}
}
if (obj != null) {
final Card target = (Card) obj;
if (AllZoneUtil.isCardInPlay(target)) {
crd.enchantEntity(target);
}
}
}
c.getController().shuffle();
// we have to have cards like glorious anthem take
// effect immediately:
for (final String effect : AllZone.getStaticEffects().getStateBasedMap().keySet()) {
final Command com = GameActionUtil.getCommands().get(effect);
com.execute();
}
}
} else if (c.getController().isComputer()) {
enchantments = enchantments.filter(new CardListFilter() {
@Override
public boolean addCard(final Card c) {
return !c.isAura();
}
});
if (enchantments.size() > 0) {
final Card card = CardFactoryUtil.getBestEnchantmentAI(enchantments, null, false);
Singletons.getModel().getGameAction().moveToPlay(card);
c.getController().shuffle();
}
}
} // enchantments.size > 0
}*/ // Zur the enchanter
else if (c.getName().equals("Spectral Bears")) {
final Player opp = c.getController().getOpponent();
CardList list = opp.getCardsIn(Zone.Battlefield);

View File

@@ -500,12 +500,6 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
* </p>
*/
public final void nextPhase() {
// experimental, add executeCardStateEffects() here:
for (final String effect : AllZone.getStaticEffects().getStateBasedMap().keySet()) {
final Command com = GameActionUtil.getCommands().get(effect);
com.execute();
}
this.needToNextPhase = false;
// If the Stack isn't empty why is nextPhase being called?

View File

@@ -264,11 +264,6 @@ public class PlayerZoneComesIntoPlay extends DefaultPlayerZone {
comm.execute();
}
}
for (final String effect : AllZone.getStaticEffects().getStateBasedMap().keySet()) {
final Command com = GameActionUtil.getCommands().get(effect);
com.execute();
}
}
/**

View File

@@ -107,13 +107,6 @@ public class InputAttack extends Input {
// just to make sure the attack symbol is marked
AllZone.getHumanPlayer().getZone(Zone.Battlefield).updateObservers();
// for Castle Raptors, since it gets a bonus if untapped
for (final String effect : AllZone.getStaticEffects().getStateBasedMap().keySet()) {
final Command com = GameActionUtil.getCommands().get(effect);
com.execute();
}
CombatUtil.showCombat();
}
else {

View File

@@ -59,12 +59,6 @@ public class InputBlock extends Input {
/** {@inheritDoc} */
@Override
public final void showMessage() {
// for Castle Raptors, since it gets a bonus if untapped
for (final String effect : AllZone.getStaticEffects().getStateBasedMap().keySet()) {
final Command com = GameActionUtil.getCommands().get(effect);
com.execute();
}
// could add "Reset Blockers" button
ButtonUtil.enableOnlyOK();