mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Fix AI never casting paired commanders
This commit is contained in:
@@ -279,6 +279,11 @@ public class AiController {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// can't fetch partner isn't problematic
|
||||||
|
if (tr.getKeyword() != null && tr.getKeyword().getOriginal().startsWith("Partner")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ZoneType.Battlefield.toString().equals(tr.getParam("Destination"))) {
|
if (!ZoneType.Battlefield.toString().equals(tr.getParam("Destination"))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -593,15 +593,6 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
return !ComputerUtil.wantMulligan(player, cardsToReturn);
|
return !ComputerUtil.wantMulligan(player, cardsToReturn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CardCollectionView getCardsToMulligan(Player firstPlayer) {
|
|
||||||
if (!ComputerUtil.wantMulligan(player, 0)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return player.getCardsIn(ZoneType.Hand);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CardCollectionView londonMulliganReturnCards(final Player mulliganingPlayer, int cardsToReturn) {
|
public CardCollectionView londonMulliganReturnCards(final Player mulliganingPlayer, int cardsToReturn) {
|
||||||
// TODO This is better than it was before, but still suboptimal (but fast).
|
// TODO This is better than it was before, but still suboptimal (but fast).
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ public abstract class PlayerController {
|
|||||||
|
|
||||||
public abstract Object vote(SpellAbility sa, String prompt, List<Object> options, ListMultimap<Object, Player> votes, Player forPlayer);
|
public abstract Object vote(SpellAbility sa, String prompt, List<Object> options, ListMultimap<Object, Player> votes, Player forPlayer);
|
||||||
|
|
||||||
public abstract CardCollectionView getCardsToMulligan(Player firstPlayer);
|
|
||||||
public abstract boolean mulliganKeepHand(Player player, int cardsToReturn);
|
public abstract boolean mulliganKeepHand(Player player, int cardsToReturn);
|
||||||
public abstract CardCollectionView londonMulliganReturnCards(Player mulliganingPlayer, int cardsToReturn);
|
public abstract CardCollectionView londonMulliganReturnCards(Player mulliganingPlayer, int cardsToReturn);
|
||||||
|
|
||||||
|
|||||||
@@ -319,11 +319,6 @@ public class PlayerControllerForTests extends PlayerController {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CardCollectionView getCardsToMulligan(Player firstPlayer) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void declareAttackers(Player attacker, Combat combat) {
|
public void declareAttackers(Player attacker, Combat combat) {
|
||||||
//Doing nothing is safe in most cases, but not all (creatures that must attack etc). TODO: introduce checks?
|
//Doing nothing is safe in most cases, but not all (creatures that must attack etc). TODO: introduce checks?
|
||||||
|
|||||||
@@ -1460,14 +1460,6 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
return inp.getSelectedCards();
|
return inp.getSelectedCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CardCollectionView getCardsToMulligan(final Player firstPlayer) {
|
|
||||||
// Partial Paris is gone, so it being commander doesn't really matter anymore...
|
|
||||||
final InputConfirmMulligan inp = new InputConfirmMulligan(this, player, firstPlayer);
|
|
||||||
inp.showAndWait();
|
|
||||||
return inp.isKeepHand() ? null : player.getCardsIn(ZoneType.Hand);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void declareAttackers(final Player attackingPlayer, final Combat combat) {
|
public void declareAttackers(final Player attackingPlayer, final Combat combat) {
|
||||||
if (mayAutoPass()) {
|
if (mayAutoPass()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user