Added Myr Servitor, Salvaging Station, Porphyry Nodes, and Gaea's Blessing.

This commit is contained in:
LevelX2 2014-04-01 17:33:58 +02:00
parent c9f72bfc0c
commit a558c052ef
13 changed files with 673 additions and 25 deletions

View file

@ -40,9 +40,21 @@ import mage.game.Game;
*/
public class SourceOnBattelfieldCondition implements Condition {
private static final SourceOnBattelfieldCondition fInstance = new SourceOnBattelfieldCondition();
public static SourceOnBattelfieldCondition getInstance() {
return fInstance;
}
@Override
public boolean apply(Game game, Ability source) {
return (game.getPermanent(source.getSourceId()) != null);
}
@Override
public String toString() {
return "if {this} is on the battlefield";
}
}

View file

@ -206,7 +206,12 @@ public interface Player extends MageItem, Copyable<Player> {
void init(Game game);
void init(Game game, boolean testMode);
void useDeck(Deck deck, Game game);
/**
* Called before each applyEffects, to rest all what can be applyed by continuous effects
*/
void reset();
void shuffleLibrary(Game game);
int drawCards(int num, Game game);
int drawCards(int num, Game game, ArrayList<UUID> appliedEffects);

View file

@ -158,7 +158,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
// conceded or connection lost game
protected boolean left;
// quit match
// set if the player quits the complete match
protected boolean quit;
protected RangeOfInfluence range;
@ -337,7 +337,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
this.wins = false;
this.loses = false;
this.left = false;
this.quit = false;
this.quit = false; // reset is neccessary because in tournament player will be used for each round
this.passed = false;
this.passedTurn = false;
this.passedAllTurns = false;
@ -346,9 +346,9 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
this.topCardRevealed = false;
this.setLife(game.getLife(), game);
this.setReachedNextTurnAfterLeaving(false);
game.getState().getWatchers().add(new BloodthirstWatcher(playerId));
game.getState().getWatchers().add(new BloodthirstWatcher(playerId));
}
@Override
public void reset() {
this.abilities.clear();