[C14] Added two planeswalker and 10 black cards.

This commit is contained in:
LevelX2 2014-11-27 00:56:35 +01:00
parent bda59fafcf
commit 1cdf2ab4b0
87 changed files with 2257 additions and 148 deletions

View file

@ -39,20 +39,20 @@ import mage.game.permanent.Permanent;
*
* @author North
*/
public class AtEndOfTurnDelayedTriggeredAbility extends DelayedTriggeredAbility {
public class AtTheBeginOfNextEndStepDelayedTriggeredAbility extends DelayedTriggeredAbility {
private TargetController targetController;
public AtEndOfTurnDelayedTriggeredAbility(Effect effect) {
public AtTheBeginOfNextEndStepDelayedTriggeredAbility(Effect effect) {
this(effect, TargetController.ANY);
}
public AtEndOfTurnDelayedTriggeredAbility(Effect effect, TargetController targetController) {
public AtTheBeginOfNextEndStepDelayedTriggeredAbility(Effect effect, TargetController targetController) {
super(effect);
this.targetController = targetController;
}
public AtEndOfTurnDelayedTriggeredAbility(AtEndOfTurnDelayedTriggeredAbility ability) {
public AtTheBeginOfNextEndStepDelayedTriggeredAbility(AtTheBeginOfNextEndStepDelayedTriggeredAbility ability) {
super(ability);
this.targetController = ability.targetController;
}
@ -86,8 +86,8 @@ public class AtEndOfTurnDelayedTriggeredAbility extends DelayedTriggeredAbility
}
@Override
public AtEndOfTurnDelayedTriggeredAbility copy() {
return new AtEndOfTurnDelayedTriggeredAbility(this);
public AtTheBeginOfNextEndStepDelayedTriggeredAbility copy() {
return new AtTheBeginOfNextEndStepDelayedTriggeredAbility(this);
}
@Override

View file

@ -95,7 +95,7 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
}
StringBuilder sb = new StringBuilder();
Target target = mode.getTargets().get(0);
sb.append("Return ");
sb.append("return ");
if (target.getMaxNumberOfTargets() > 1) {
if (target.getMaxNumberOfTargets() != target.getNumberOfTargets()) {
sb.append("up to ");

View file

@ -969,6 +969,7 @@ public abstract class GameImpl implements Game, Serializable {
@Override
public void end() {
if (!state.isGameOver()) {
logger.debug("END of gameId: " + this.getId());
endTime = new Date();
state.endGame();
for (Player player: state.getPlayers().values()) {

View file

@ -585,6 +585,7 @@ public class GameState implements Serializable, Copyable<GameState> {
public void addCommandObject(CommandObject commandObject) {
getCommand().add(commandObject);
setZone(commandObject.getId(), Zone.COMMAND);
for (Ability ability: commandObject.getAbilities()) {
addAbility(ability, commandObject);
}

View file

@ -81,6 +81,7 @@ import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.SplitCard;
import mage.cards.decks.Deck;
import mage.constants.AbilityType;
import mage.constants.AsThoughEffectType;
import mage.constants.CardType;
import mage.constants.ManaType;
@ -104,6 +105,7 @@ import mage.game.ExileZone;
import mage.game.Game;
import mage.game.Table;
import mage.game.combat.CombatGroup;
import mage.game.command.CommandObject;
import mage.game.command.Commander;
import mage.game.events.DamagePlayerEvent;
import mage.game.events.DamagedPlayerEvent;
@ -615,7 +617,10 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public int drawCards(int num, Game game) {
return game.doAction(new MageDrawAction(this, num, null));
if (num > 0) {
return game.doAction(new MageDrawAction(this, num, null));
}
return 0;
}
@Override
@ -2228,18 +2233,29 @@ public abstract class PlayerImpl implements Player, Serializable {
}
}
}
// get cast commander if available
if (!(this.getCommanderId() == null)) {
Zone zone = game.getState().getZone(this.getCommanderId());
if (zone != null && zone.equals(Zone.COMMAND)) {
MageObject object = game.getObject(this.getCommanderId());
if (object != null) {
for (ActivatedAbility ability : ((Commander) object).getAbilities().getActivatedAbilities(Zone.COMMAND)) {
if (canPlay(ability, availableMana, object, game)) {
playableActivated.put(ability.toString(), ability);
}
}
// // get cast commander if available
// if (!(this.getCommanderId() == null)) {
// Zone zone = game.getState().getZone(this.getCommanderId());
// if (zone != null && zone.equals(Zone.COMMAND)) {
// MageObject object = game.getObject(this.getCommanderId());
// if (object != null) {
// for (ActivatedAbility ability : ((Commander) object).getAbilities().getActivatedAbilities(Zone.COMMAND)) {
// if (canPlay(ability, availableMana, object, game)) {
// playableActivated.put(ability.toString(), ability);
// }
// }
// }
// }
// }
// activated abilities from objects in the command zone
for (CommandObject commandObject: game.getState().getCommand()) {
for (ActivatedAbility ability: commandObject.getAbilities().getActivatedAbilities(Zone.COMMAND)) {
if (ability.getControllerId().equals(getId())
&& ability.getAbilityType().equals(AbilityType.ACTIVATED)
&& canPlay(ability, availableMana, game.getObject(ability.getSourceId()), game)) {
playableActivated.put(ability.toString(), ability);
}
}
}
playable.addAll(playableActivated.values());