- Little AI improvements in AF ChangeZone Hidden.

This commit is contained in:
Sloth
2011-09-24 10:25:30 +00:00
parent d1f3b3164b
commit 5e857f9ecc

View File

@@ -304,7 +304,7 @@ public final class AbilityFactory_ChangeZone {
Card source = af.getHostCard();
HashMap<String, String> params = af.getMapParams();
Constant.Zone origin = Constant.Zone.smartValueOf(params.get("Origin"));
//String destination = params.get("Destination");
String destination = params.get("Destination");
if (abCost != null) {
// AI currently disabled for these costs
@@ -360,6 +360,12 @@ public final class AbilityFactory_ChangeZone {
}
}
//don't use fetching to top of library/graveyard before main2
if(AllZone.getPhase().isBefore(Constant.Phase.Main2) && !params.containsKey("ActivatingPhases")
&& !destination.equals("Battlefield") && !destination.equals("Hand")) {
return false;
}
chance &= (r.nextFloat() < .8);
Ability_Sub subAb = sa.getSubAbility();