- Fixed AI for Tribute to the Wild.

This commit is contained in:
Sloth
2012-07-06 06:21:57 +00:00
parent 03f1f0ab92
commit fd815cd6e6

View File

@@ -398,14 +398,17 @@ public class AbilityFactorySacrifice {
tgt.resetTargets(); tgt.resetTargets();
if (AllZone.getHumanPlayer().canBeTargetedBy(sa)) { if (AllZone.getHumanPlayer().canBeTargetedBy(sa)) {
tgt.addTarget(AllZone.getHumanPlayer()); tgt.addTarget(AllZone.getHumanPlayer());
return true;
} else { } else {
return false; return false;
} }
} else { }
final String defined = params.get("Defined"); final String defined = params.get("Defined");
if (defined == null) { if (defined == null) {
// Self Sacrifice. // Self Sacrifice.
} else if (defined.equals("Each")) { } else if (defined.equals("Each")
|| (defined.equals("Opponent") && !sa.isTrigger())) {
// If Sacrifice hits both players: // If Sacrifice hits both players:
// Only cast it if Human has the full amount of valid // Only cast it if Human has the full amount of valid
// Only cast it if AI doesn't have the full amount of Valid // Only cast it if AI doesn't have the full amount of Valid
@@ -424,6 +427,9 @@ public class AbilityFactorySacrifice {
CardList humanList = AllZone.getHumanPlayer().getCardsIn(ZoneType.Battlefield); CardList humanList = AllZone.getHumanPlayer().getCardsIn(ZoneType.Battlefield);
humanList = humanList.getValidCards(valid.split(","), sa.getActivatingPlayer(), sa.getSourceCard()); humanList = humanList.getValidCards(valid.split(","), sa.getActivatingPlayer(), sa.getSourceCard());
CardList computerList = AllZone.getComputerPlayer().getCardsIn(ZoneType.Battlefield); CardList computerList = AllZone.getComputerPlayer().getCardsIn(ZoneType.Battlefield);
if (defined.equals("Opponent")) {
computerList = new CardList();
}
computerList = computerList.getValidCards(valid.split(","), sa.getActivatingPlayer(), computerList = computerList.getValidCards(valid.split(","), sa.getActivatingPlayer(),
sa.getSourceCard()); sa.getSourceCard());
@@ -433,7 +439,6 @@ public class AbilityFactorySacrifice {
return false; return false;
} }
} }
}
return true; return true;
} }