Beginning of implementation of Planechase.

10 or so initial planes that (mostly) have been tested, no phenomenons as yet and no modifying yet of chaos rolls.  Also no support for a user to be able to set if it is planechase (able to do so via the cheat button).
This commit is contained in:
spjspj 2018-04-09 19:38:37 +10:00
parent e932c139d9
commit 57354d83bb
2 changed files with 23 additions and 6 deletions

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
*/
package mage.abilities.effects.common.continuous;
import mage.abilities.Ability;
@ -44,13 +43,28 @@ import mage.players.Player;
*/
public class PlayAdditionalLandsAllEffect extends ContinuousEffectImpl {
private int numExtraLands = 1;
public PlayAdditionalLandsAllEffect() {
super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
staticText = "Each player may play an additional land on each of their turns";
numExtraLands = 1;
}
public PlayAdditionalLandsAllEffect(int numExtraLands) {
super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
this.numExtraLands = numExtraLands;
if (numExtraLands == Integer.MAX_VALUE) {
staticText = "Each player may play any number of additional lands on each of their turns";
} else {
staticText = "Each player may play an additional " + numExtraLands + " lands on each of their turns";
}
}
public PlayAdditionalLandsAllEffect(final PlayAdditionalLandsAllEffect effect) {
super(effect);
this.numExtraLands = effect.numExtraLands;
this.staticText = effect.staticText;
}
@Override
@ -62,10 +76,13 @@ public class PlayAdditionalLandsAllEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(game.getActivePlayerId());
if (player != null) {
player.setLandsPerTurn(player.getLandsPerTurn() + 1);
if (numExtraLands == Integer.MAX_VALUE) {
player.setLandsPerTurn(Integer.MAX_VALUE);
} else {
player.setLandsPerTurn(player.getLandsPerTurn() + numExtraLands);
}
return true;
}
return true;
}
}

View file

@ -33,7 +33,7 @@ package mage.constants;
*/
public enum Planes {
PLANE_ACADEMY_AT_TOLARIA_WEST("AcademyAtTolariaWestPlane"),
PLANE_AGYREM("Agyrem"),
PLANE_AGYREM("AgyremPlane"),
PLANE_BANT("BantPlane"),
PLANE_FEEDING_GROUNDS("FeedingGroundsPlane"),
PLANE_FIELDS_OF_SUMMER("FieldsOfSummerPlane"),