begin fix for multiple copies of Krark's Thumb

This commit is contained in:
Evan Kranzler 2019-01-16 15:11:14 -05:00
parent c34f611279
commit 74c1cbf6d9
4 changed files with 68 additions and 29 deletions

View file

@ -2418,6 +2418,16 @@ public class TestPlayer implements Player {
computerPlayer.setLoyaltyUsePerTurn(loyaltyUsePerTurn);
}
@Override
public int getExtraCoinFlips() {
return computerPlayer.getExtraCoinFlips();
}
@Override
public void setExtraCoinFlips(int extraCoinFlips) {
computerPlayer.setExtraCoinFlips(extraCoinFlips);
}
@Override
public int getMaxHandSize() {
return computerPlayer.getMaxHandSize();

View file

@ -262,6 +262,16 @@ public class PlayerStub implements Player {
}
@Override
public int getExtraCoinFlips() {
return 0;
}
@Override
public void setExtraCoinFlips(int extraCoinFlips) {
}
@Override
public int getMaxHandSize() {
return 0;

View file

@ -141,6 +141,10 @@ public interface Player extends MageItem, Copyable<Player> {
void setLoyaltyUsePerTurn(int loyaltyUsePerTurn);
int getExtraCoinFlips();
void setExtraCoinFlips(int getExtraCoinFlips);
int getMaxHandSize();
void setMaxHandSize(int maxHandSize);
@ -355,6 +359,7 @@ public interface Player extends MageItem, Copyable<Player> {
/**
* Reveals all players' libraries. Useful for abilities like Jace, Architect of Thought's -8
* that have effects that require information from all libraries.
*
* @param source
* @param game
* @return

View file

@ -98,6 +98,7 @@ public abstract class PlayerImpl implements Player, Serializable {
protected int landsPlayed;
protected int landsPerTurn = 1;
protected int loyaltyUsePerTurn = 1;
protected int extraCoinFlips = 1;
protected int maxHandSize = 7;
protected int maxAttackedBy = Integer.MAX_VALUE;
protected ManaPool manaPool;
@ -223,6 +224,7 @@ public abstract class PlayerImpl implements Player, Serializable {
this.landsPlayed = player.landsPlayed;
this.landsPerTurn = player.landsPerTurn;
this.loyaltyUsePerTurn = player.loyaltyUsePerTurn;
this.extraCoinFlips = player.extraCoinFlips;
this.maxHandSize = player.maxHandSize;
this.maxAttackedBy = player.maxAttackedBy;
this.manaPool = player.manaPool.copy();
@ -313,6 +315,7 @@ public abstract class PlayerImpl implements Player, Serializable {
this.landsPlayed = player.getLandsPlayed();
this.landsPerTurn = player.getLandsPerTurn();
this.loyaltyUsePerTurn = player.getLoyaltyUsePerTurn();
this.extraCoinFlips = player.getExtraCoinFlips();
this.maxHandSize = player.getMaxHandSize();
this.maxAttackedBy = player.getMaxAttackedBy();
this.manaPool = player.getManaPool().copy();
@ -433,6 +436,7 @@ public abstract class PlayerImpl implements Player, Serializable {
this.abilities.clear();
this.landsPerTurn = 1;
this.loyaltyUsePerTurn = 1;
this.extraCoinFlips = 1;
this.maxHandSize = 7;
this.maxAttackedBy = Integer.MAX_VALUE;
this.canGainLife = true;
@ -2079,6 +2083,16 @@ public abstract class PlayerImpl implements Player, Serializable {
this.loyaltyUsePerTurn = loyaltyUsePerTurn;
}
@Override
public int getExtraCoinFlips() {
return extraCoinFlips;
}
@Override
public void setExtraCoinFlips(int extraCoinFlips) {
this.extraCoinFlips = extraCoinFlips;
}
@Override
public int getMaxHandSize() {
return maxHandSize;