- Fixed the canPlay function of the Morph ability.

This commit is contained in:
Sloth
2012-03-01 12:03:11 +00:00
parent bc8329e443
commit bead8b6a55

View File

@@ -940,7 +940,7 @@ public class CardFactoryUtil {
@Override
public boolean canPlay() {
return PhaseHandler.canCastSorcery(sourceCard.getController()) && !AllZoneUtil.isCardInPlay(sourceCard);
return sourceCard.getSpellPermanent().canPlay();
}
};
@@ -4510,12 +4510,19 @@ public class CardFactoryUtil {
@Override
public void execute() {
Log.debug("HandSize", "Control changed: " + card.getController());
Player oldController = card.getController();
Player newController = oldController.getOpponent();
oldController.removeHandSizeOperation(Integer.parseInt(card.getSVar("HSStamp")));
newController.addHandSizeOperation(new HandSizeOp(mode, amount, Integer.parseInt(card.getSVar("HSStamp"))));
newController.sortHandSizeOperations();
if (card.getController().isHuman()) {
AllZone.getHumanPlayer().removeHandSizeOperation(Integer.parseInt(card.getSVar("HSStamp")));
AllZone.getComputerPlayer().addHandSizeOperation(
new HandSizeOp(mode, amount, Integer.parseInt(card.getSVar("HSStamp"))));
AllZone.getComputerPlayer().sortHandSizeOperations();
} else if (card.getController().isComputer()) {
AllZone.getComputerPlayer().removeHandSizeOperation(Integer.parseInt(card.getSVar("HSStamp")));
AllZone.getHumanPlayer().addHandSizeOperation(
new HandSizeOp(mode, amount, Integer.parseInt(card.getSVar("HSStamp"))));
AllZone.getHumanPlayer().sortHandSizeOperations();
}
}
};