mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
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:
parent
e932c139d9
commit
57354d83bb
2 changed files with 23 additions and 6 deletions
|
@ -24,8 +24,7 @@
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package mage.abilities.effects.common.continuous;
|
package mage.abilities.effects.common.continuous;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -44,13 +43,28 @@ import mage.players.Player;
|
||||||
*/
|
*/
|
||||||
public class PlayAdditionalLandsAllEffect extends ContinuousEffectImpl {
|
public class PlayAdditionalLandsAllEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
private int numExtraLands = 1;
|
||||||
|
|
||||||
public PlayAdditionalLandsAllEffect() {
|
public PlayAdditionalLandsAllEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
|
super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
|
||||||
staticText = "Each player may play an additional land on each of their turns";
|
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) {
|
public PlayAdditionalLandsAllEffect(final PlayAdditionalLandsAllEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
|
this.numExtraLands = effect.numExtraLands;
|
||||||
|
this.staticText = effect.staticText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,10 +76,13 @@ public class PlayAdditionalLandsAllEffect extends ContinuousEffectImpl {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(game.getActivePlayerId());
|
Player player = game.getPlayer(game.getActivePlayerId());
|
||||||
if (player != null) {
|
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;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ package mage.constants;
|
||||||
*/
|
*/
|
||||||
public enum Planes {
|
public enum Planes {
|
||||||
PLANE_ACADEMY_AT_TOLARIA_WEST("AcademyAtTolariaWestPlane"),
|
PLANE_ACADEMY_AT_TOLARIA_WEST("AcademyAtTolariaWestPlane"),
|
||||||
PLANE_AGYREM("Agyrem"),
|
PLANE_AGYREM("AgyremPlane"),
|
||||||
PLANE_BANT("BantPlane"),
|
PLANE_BANT("BantPlane"),
|
||||||
PLANE_FEEDING_GROUNDS("FeedingGroundsPlane"),
|
PLANE_FEEDING_GROUNDS("FeedingGroundsPlane"),
|
||||||
PLANE_FIELDS_OF_SUMMER("FieldsOfSummerPlane"),
|
PLANE_FIELDS_OF_SUMMER("FieldsOfSummerPlane"),
|
||||||
|
|
Loading…
Reference in a new issue