mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
remove summoning sickness from cheat creatures
This commit is contained in:
parent
d5a7a0ad5f
commit
0bde24648b
2 changed files with 6 additions and 4 deletions
|
@ -65,6 +65,7 @@ import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import mage.game.permanent.PermanentImpl;
|
||||||
|
|
||||||
public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializable {
|
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();
|
saveState();
|
||||||
}
|
}
|
||||||
|
|
||||||
// protected void init(UUID choosingPlayerId) {
|
|
||||||
// init(choosingPlayerId, false);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
protected void init(UUID choosingPlayerId, boolean testMode) {
|
protected void init(UUID choosingPlayerId, boolean testMode) {
|
||||||
for (Player player: state.getPlayers().values()) {
|
for (Player player: state.getPlayers().values()) {
|
||||||
player.beginTurn(this);
|
player.beginTurn(this);
|
||||||
|
@ -1011,6 +1008,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
||||||
card.setOwnerId(ownerId);
|
card.setOwnerId(ownerId);
|
||||||
PermanentCard permanent = new PermanentCard(card, ownerId);
|
PermanentCard permanent = new PermanentCard(card, ownerId);
|
||||||
permanent.setTapped(card.isTapped());
|
permanent.setTapped(card.isTapped());
|
||||||
|
((PermanentImpl)permanent).removeSummoningSickness();
|
||||||
getBattlefield().addPermanent(permanent);
|
getBattlefield().addPermanent(permanent);
|
||||||
}
|
}
|
||||||
applyEffects();
|
applyEffects();
|
||||||
|
|
|
@ -313,6 +313,10 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeSummoningSickness() {
|
||||||
|
this.controlledFromStartOfTurn = true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasSummoningSickness() {
|
public boolean hasSummoningSickness() {
|
||||||
return !(this.controlledFromStartOfTurn || this.abilities.containsKey(HasteAbility.getInstance().getId()));
|
return !(this.controlledFromStartOfTurn || this.abilities.containsKey(HasteAbility.getInstance().getId()));
|
||||||
|
|
Loading…
Reference in a new issue