forked from External/mage
Implemented Yorion, Sky Nomad (#6407)
* Implemented Yorion, Sky Nomad * Implemented Yorion, Sky Nomad (but for real this time) * updated game creation to use the correct deck size for limited
This commit is contained in:
parent
378dfbf89a
commit
8494e98693
31 changed files with 185 additions and 37 deletions
|
|
@ -130,6 +130,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
private int priorityTime;
|
||||
|
||||
private final int startLife;
|
||||
private final int startingSize;
|
||||
protected PlayerList playerList; // auto-generated from state, don't copy
|
||||
|
||||
// infinite loop check (no copy of this attributes neccessary)
|
||||
|
|
@ -144,7 +145,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
// temporary store for income concede commands, don't copy
|
||||
private final LinkedList<UUID> concedingPlayers = new LinkedList<>();
|
||||
|
||||
public GameImpl(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
public GameImpl(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startingSize) {
|
||||
this.id = UUID.randomUUID();
|
||||
this.range = range;
|
||||
this.mulligan = mulligan;
|
||||
|
|
@ -152,6 +153,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
this.state = new GameState();
|
||||
this.startLife = startLife;
|
||||
this.executingRollback = false;
|
||||
this.startingSize = startingSize;
|
||||
initGameDefaultWatchers();
|
||||
}
|
||||
|
||||
|
|
@ -181,6 +183,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
this.saveGame = game.saveGame;
|
||||
this.startLife = game.startLife;
|
||||
this.enterWithCounters.putAll(game.enterWithCounters);
|
||||
this.startingSize = game.startingSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -939,7 +942,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
for (Ability ability : card.getAbilities(this)) {
|
||||
if (ability instanceof CompanionAbility) {
|
||||
CompanionAbility companionAbility = (CompanionAbility) ability;
|
||||
if (companionAbility.isLegal(new HashSet<>(player.getLibrary().getCards(this)))) {
|
||||
if (companionAbility.isLegal(new HashSet<>(player.getLibrary().getCards(this)), startingSize)) {
|
||||
potentialCompanions.add(card);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue