remove summoning sickness from cheat creatures

This commit is contained in:
BetaSteward 2011-03-07 22:59:14 -05:00
parent d5a7a0ad5f
commit 0bde24648b
2 changed files with 6 additions and 4 deletions

View file

@ -65,6 +65,7 @@ import java.io.IOException;
import java.io.Serializable;
import java.util.*;
import java.util.logging.Logger;
import mage.game.permanent.PermanentImpl;
public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializable {
@ -317,10 +318,6 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
saveState();
}
// protected void init(UUID choosingPlayerId) {
// init(choosingPlayerId, false);
// }
//
protected void init(UUID choosingPlayerId, boolean testMode) {
for (Player player: state.getPlayers().values()) {
player.beginTurn(this);
@ -1011,6 +1008,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
card.setOwnerId(ownerId);
PermanentCard permanent = new PermanentCard(card, ownerId);
permanent.setTapped(card.isTapped());
((PermanentImpl)permanent).removeSummoningSickness();
getBattlefield().addPermanent(permanent);
}
applyEffects();

View file

@ -313,6 +313,10 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
return false;
}
public void removeSummoningSickness() {
this.controlledFromStartOfTurn = true;
}
@Override
public boolean hasSummoningSickness() {
return !(this.controlledFromStartOfTurn || this.abilities.containsKey(HasteAbility.getInstance().getId()));