mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Fixed the canPlay function of the Morph ability.
This commit is contained in:
@@ -940,7 +940,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlay() {
|
public boolean canPlay() {
|
||||||
return PhaseHandler.canCastSorcery(sourceCard.getController()) && !AllZoneUtil.isCardInPlay(sourceCard);
|
return sourceCard.getSpellPermanent().canPlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -4510,12 +4510,19 @@ public class CardFactoryUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
Log.debug("HandSize", "Control changed: " + card.getController());
|
Log.debug("HandSize", "Control changed: " + card.getController());
|
||||||
Player oldController = card.getController();
|
if (card.getController().isHuman()) {
|
||||||
Player newController = oldController.getOpponent();
|
AllZone.getHumanPlayer().removeHandSizeOperation(Integer.parseInt(card.getSVar("HSStamp")));
|
||||||
|
AllZone.getComputerPlayer().addHandSizeOperation(
|
||||||
|
new HandSizeOp(mode, amount, Integer.parseInt(card.getSVar("HSStamp"))));
|
||||||
|
|
||||||
oldController.removeHandSizeOperation(Integer.parseInt(card.getSVar("HSStamp")));
|
AllZone.getComputerPlayer().sortHandSizeOperations();
|
||||||
newController.addHandSizeOperation(new HandSizeOp(mode, amount, Integer.parseInt(card.getSVar("HSStamp"))));
|
} else if (card.getController().isComputer()) {
|
||||||
newController.sortHandSizeOperations();
|
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