mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Fixed the canPlay function of the Morph ability.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user