mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Hardcoded static abilities are now only be called by checkStaticAbilities.
This commit is contained in:
@@ -2633,71 +2633,6 @@ public class CombatUtil {
|
|||||||
}
|
}
|
||||||
} // Mijae Djinn
|
} // 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")) {
|
else if (c.getName().equals("Spectral Bears")) {
|
||||||
final Player opp = c.getController().getOpponent();
|
final Player opp = c.getController().getOpponent();
|
||||||
CardList list = opp.getCardsIn(Zone.Battlefield);
|
CardList list = opp.getCardsIn(Zone.Battlefield);
|
||||||
|
|||||||
@@ -500,12 +500,6 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
|||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public final void nextPhase() {
|
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;
|
this.needToNextPhase = false;
|
||||||
|
|
||||||
// If the Stack isn't empty why is nextPhase being called?
|
// If the Stack isn't empty why is nextPhase being called?
|
||||||
|
|||||||
@@ -264,11 +264,6 @@ public class PlayerZoneComesIntoPlay extends DefaultPlayerZone {
|
|||||||
comm.execute();
|
comm.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final String effect : AllZone.getStaticEffects().getStateBasedMap().keySet()) {
|
|
||||||
final Command com = GameActionUtil.getCommands().get(effect);
|
|
||||||
com.execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -107,13 +107,6 @@ public class InputAttack extends Input {
|
|||||||
|
|
||||||
// just to make sure the attack symbol is marked
|
// just to make sure the attack symbol is marked
|
||||||
AllZone.getHumanPlayer().getZone(Zone.Battlefield).updateObservers();
|
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();
|
CombatUtil.showCombat();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -59,12 +59,6 @@ public class InputBlock extends Input {
|
|||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public final void showMessage() {
|
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
|
// could add "Reset Blockers" button
|
||||||
ButtonUtil.enableOnlyOK();
|
ButtonUtil.enableOnlyOK();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user