mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Added a default logic to ProtectionEffect AI.
This commit is contained in:
@@ -113,9 +113,8 @@ public class ProtectEffect extends SpellAbilityEffect {
|
||||
} else {
|
||||
Player ai = sa.getActivatingPlayer();
|
||||
String choice = choices.get(0);
|
||||
if (sa.hasParam("AILogic")) {
|
||||
final String logic = sa.getParam("AILogic");
|
||||
if (logic.equals("MostProminentHumanCreatures")) {
|
||||
if (logic == null || logic.equals("MostProminentHumanCreatures")) {
|
||||
List<Card> list = new ArrayList<Card>();
|
||||
for (Player opp : ai.getOpponents()) {
|
||||
list.addAll(opp.getCreaturesInPlay());
|
||||
@@ -127,7 +126,6 @@ public class ProtectEffect extends SpellAbilityEffect {
|
||||
choice = ComputerUtilCard.getMostProminentColor(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
gains.add(choice);
|
||||
GuiDialog.message("Computer chooses " + gains, host.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user