diff --git a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerMatch.java b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerMatch.java index 56e3535ee3..64100769d1 100644 --- a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerMatch.java +++ b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerMatch.java @@ -1,4 +1,3 @@ - package mage.game; import mage.game.match.MatchImpl; @@ -17,7 +16,12 @@ public class TwoPlayerMatch extends MatchImpl { @Override public void startGame() throws GameException { Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans()); - TwoPlayerDuel game = new TwoPlayerDuel(options.getAttackOption(), options.getRange(), mulligan, 20, options.isLimited() || "Limited".equals(options.getDeckType()) ? 40 : 60); + + // workaround to enable limited deck size in limited set as deck type (Yorion, Sky Nomad) + // see comments from https://github.com/magefree/mage/commit/4874ad31c199ea573187ea2790268be3a4d4c95a + boolean isLimitedDeck = options.isLimited() || "Limited".equals(options.getDeckType()); + + TwoPlayerDuel game = new TwoPlayerDuel(options.getAttackOption(), options.getRange(), mulligan, 20, isLimitedDeck ? 40 : 60); // Sets a start message about the match score game.setStartMessage(this.createGameStartMessage()); initGame(game); diff --git a/Mage/src/main/java/mage/MageObject.java b/Mage/src/main/java/mage/MageObject.java index ea3c24dbfa..49a8827b0b 100644 --- a/Mage/src/main/java/mage/MageObject.java +++ b/Mage/src/main/java/mage/MageObject.java @@ -106,6 +106,21 @@ public interface MageObject extends MageItem, Serializable { void setStartingLoyalty(int startingLoyalty); + /** + * Dynamic cost modification for card (process only OWN abilities). + *
+ * Usage example: if it need stack related info (like real targets) then must check two + * states (game.inCheckPlayableState): + *
+ * 1. In playable state it must check all possible use cases (e.g. allow to + * reduce on any available target and modes) + *
+ * 2. In real cast state it must check current use case (e.g. real selected + * targets and modes) + * + * @param ability + * @param game + */ void adjustCosts(Ability ability, Game game); void adjustTargets(Ability ability, Game game); diff --git a/Mage/src/main/java/mage/cards/ModalDoubleFacesCardHalfImpl.java b/Mage/src/main/java/mage/cards/ModalDoubleFacesCardHalfImpl.java index 228ffe1b4f..ce24d5e81e 100644 --- a/Mage/src/main/java/mage/cards/ModalDoubleFacesCardHalfImpl.java +++ b/Mage/src/main/java/mage/cards/ModalDoubleFacesCardHalfImpl.java @@ -101,6 +101,7 @@ public class ModalDoubleFacesCardHalfImpl extends CardImpl implements ModalDoubl this.setPT(new MageInt(power), new MageInt(toughness)); } + @Override public void setPT(MageInt power, MageInt toughness) { this.power = power; this.toughness = toughness;