mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Merge branch 'master' into 'master'
Fix a logic error in TapAllAi See merge request core-developers/forge!1867
This commit is contained in:
@@ -24,8 +24,7 @@ import java.util.List;
|
|||||||
public class TapAllAi extends SpellAbilityAi {
|
public class TapAllAi extends SpellAbilityAi {
|
||||||
@Override
|
@Override
|
||||||
protected boolean canPlayAI(final Player ai, SpellAbility sa) {
|
protected boolean canPlayAI(final Player ai, SpellAbility sa) {
|
||||||
// If tapping all creatures do it either during declare attackers of AIs
|
// If tapping all creatures do it either during declare attackers of AIs turn
|
||||||
// turn
|
|
||||||
// or during upkeep/begin combat?
|
// or during upkeep/begin combat?
|
||||||
|
|
||||||
final Card source = sa.getHostCard();
|
final Card source = sa.getHostCard();
|
||||||
@@ -86,7 +85,7 @@ public class TapAllAi extends SpellAbilityAi {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// in AI's turn, check if there are possible attackers, before tapping blockers
|
// in AI's turn, check if there are possible attackers, before tapping blockers
|
||||||
if (game.getPhaseHandler().isPlayerTurn(ai) && !SpellAbilityAi.isSorcerySpeed(sa)) {
|
if (game.getPhaseHandler().isPlayerTurn(ai)) {
|
||||||
validTappables = ai.getCardsIn(ZoneType.Battlefield);
|
validTappables = ai.getCardsIn(ZoneType.Battlefield);
|
||||||
final boolean any = Iterables.any(validTappables, new Predicate<Card>() {
|
final boolean any = Iterables.any(validTappables, new Predicate<Card>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user