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.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();
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue