mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge branch 'Shorikai' into 'master'
Fix for Shorikai See merge request core-developers/forge!6375
This commit is contained in:
@@ -540,11 +540,8 @@ public class PumpAi extends PumpAiBase {
|
||||
// Filter AI-specific targets if provided
|
||||
list = ComputerUtil.filterAITgts(sa, ai, list, true);
|
||||
|
||||
if (list.isEmpty()) {
|
||||
if (ComputerUtil.activateForCost(sa, ai)) {
|
||||
return pumpMandatoryTarget(ai, sa);
|
||||
}
|
||||
return mandatory && pumpMandatoryTarget(ai, sa);
|
||||
if (list.isEmpty() || ComputerUtil.activateForCost(sa, ai)) {
|
||||
return pumpMandatoryTarget(ai, sa);
|
||||
}
|
||||
|
||||
if (!sa.isCurse()) {
|
||||
@@ -623,9 +620,9 @@ public class PumpAi extends PumpAiBase {
|
||||
|
||||
if (sa.isCurse()) {
|
||||
pref = CardLists.filterControlledBy(list, ai.getOpponents());
|
||||
forced = CardLists.filterControlledBy(list, ai);
|
||||
forced = CardLists.filterControlledBy(list, ai.getYourTeam());
|
||||
} else {
|
||||
pref = CardLists.filterControlledBy(list, ai);
|
||||
pref = CardLists.filterControlledBy(list, ai.getYourTeam());
|
||||
forced = CardLists.filterControlledBy(list, ai.getOpponents());
|
||||
}
|
||||
|
||||
@@ -634,7 +631,7 @@ public class PumpAi extends PumpAiBase {
|
||||
break;
|
||||
}
|
||||
|
||||
Card c = ComputerUtilCard.getBestAI(list);
|
||||
Card c = ComputerUtilCard.getBestAI(pref);
|
||||
pref.remove(c);
|
||||
sa.getTargets().add(c);
|
||||
}
|
||||
@@ -652,7 +649,6 @@ public class PumpAi extends PumpAiBase {
|
||||
}
|
||||
|
||||
forced.remove(c);
|
||||
|
||||
sa.getTargets().add(c);
|
||||
}
|
||||
|
||||
|
||||
@@ -448,14 +448,11 @@ public abstract class PumpAiBase extends SpellAbilityAi {
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
protected CardCollection getCurseCreatures(final Player ai, final SpellAbility sa, final int defense, final int attack, final List<String> keywords) {
|
||||
CardCollection list = new CardCollection();
|
||||
for (final Player opp : ai.getOpponents()) {
|
||||
list.addAll(opp.getCardsIn(ZoneType.Battlefield));
|
||||
}
|
||||
CardCollection list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
|
||||
final Game game = ai.getGame();
|
||||
final Combat combat = game.getCombat();
|
||||
list = CardLists.getTargetableCards(list, sa);
|
||||
|
||||
|
||||
if (list.isEmpty()) {
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user